:root {
  color-scheme: dark;
  --page: #101722;
  --nav: #141e2b;
  --panel: #1b2635;
  --panel-light: #222f40;
  --field: #141d2a;
  --line: #354355;
  --line-soft: #2b394a;
  --text: #f0f4fa;
  --sub: #adbbce;
  --quiet: #96a6bc;
  --gold: #ffd05a;
  --gold-text: #ffdb82;
  --gold-wash: #342f25;
  --gold-edge: #6b5939;
  --green: #8de0b9;
  --red: #ffb7af;
  --rail: 224px;
  --radius: 14px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font: 100%/1.45 var(--sans);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 670; }
h2 { font-size: 1.2rem; font-weight: 620; }
h3 { font-size: 1.13rem; font-weight: 610; }
p, dd, dt, th, td, h1, h2, h3 { overflow-wrap: anywhere; }
p, small, dt { color: var(--sub); }
small { font-size: .875rem; }
a { color: inherit; text-decoration: none; }
input, select, button, textarea { color: inherit; font: inherit; }
input, select, textarea {
  min-width: 0; width: 100%; min-height: 46px;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  padding: .62rem .8rem; font-size: 1rem; line-height: 1.4;
}
input::placeholder, textarea::placeholder { color: var(--quiet); opacity: .85; }
input, select, button { -webkit-tap-highlight-color: transparent; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-text); }
button { background: transparent; border: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 2px solid #a4d9ff; outline-offset: 3px; }
h1:focus, main:focus { outline: none; }
label { display: block; font-weight: 580; font-size: .95rem; }
label span { color: var(--quiet); font-weight: 400; }
pre, code, .mono { font-family: var(--mono); }
.number, .price { font-variant-numeric: tabular-nums; }
.icon {
  flex: none; width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn, .btn, .power-btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; border-radius: 8px; font-weight: 590; line-height: 1.25;
}
.icon-btn { width: 44px; padding: 0; color: var(--sub); }
.icon-btn:hover, .power-btn:hover { color: var(--text); background: var(--panel-light); }
.btn { border: 1px solid transparent; padding: .62rem 1rem; font-size: .94rem; }
.btn.primary { background: var(--gold); color: #251e0d; }
.btn.primary:hover:not(:disabled) { background: #ffda7b; }
.btn.secondary, .btn.subtle { border-color: var(--line); background: var(--panel-light); }
.btn.subtle { background: var(--panel); }
.btn.secondary:hover:not(:disabled), .btn.subtle:hover:not(:disabled) { border-color: var(--quiet); }
.btn.compact { padding: .4rem .7rem; min-height: 36px; font-size: .875rem; }
.wide { width: 100%; }
.skip { position: fixed; z-index: 90; left: 16px; top: -100px; padding: 8px 12px; border-radius: 6px; background: var(--gold); color: #251e0d; }
.skip:focus { top: 12px; }
.loading-screen, .no-script { padding: 1.5rem; margin: 0 auto; max-width: 760px; }
.loading-screen { color: var(--sub); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.065em; font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.brand-domain { color: var(--sub); font-weight: 400; }
.logo { display: grid; place-items: center; color: var(--gold); }
.logo .icon { width: 32px; height: 32px; }

/* Entry screen and the locally drawn brand mark. */
.entry { min-height: 100vh; max-width: 1080px; padding: 42px clamp(1rem, 5vw, 60px) 64px; margin: 0 auto; }
.entry-brand { margin-bottom: clamp(48px, 12vh, 115px); }
.entry-panel {
  width: 100%; display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr);
  border-radius: 22px; border: 1px solid var(--line); overflow: hidden; background: var(--panel);
  box-shadow: 0 24px 70px #070e172e;
}
.entry-art {
  min-height: 358px; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 63% 47%, #5c4829 0%, #37362e 40%, #202b39 78%);
}
.art-mesh, .art-orbit { position: absolute; pointer-events: none; }
.art-mesh { inset: 0; background-image: radial-gradient(#f9cb763e .8px, transparent .85px); background-size: 16px 16px; }
.art-orbit { left: 50%; top: 53%; width: 80%; height: 39%; border: 1px solid #f0c37442; border-radius: 50%; transform: translate(-50%, -50%) rotate(-30deg); }
.art-orbit::before, .art-orbit::after { content: ""; position: absolute; border: 1px solid #f0c37430; border-radius: 50%; }
.art-orbit::before { inset: -14%; }
.art-orbit::after { inset: 13%; }
.emblem { position: absolute; width: 100px; height: 100px; left: calc(50% - 50px); top: calc(50% - 66px); }
.emblem > div {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 1px solid #e6b95e; border-radius: 26%; transform: rotate(-24deg) skew(9deg, 5deg) scale(1, .86);
}
.emblem > div:nth-child(1) { top: 22px; bottom: -22px; border-color: #885e2c; background: #7b5129; box-shadow: 0 12px 18px #171b1f5e; }
.emblem > div:nth-child(2) { top: 11px; bottom: -11px; background: linear-gradient(135deg, #cca057, #aa7836); }
.emblem > div:nth-child(3) { background: linear-gradient(145deg, #ffe9ac, #f2bf62 73%, #d39a49); border-color: #ffdc91; box-shadow: inset 1px 1px 3px #fff8, 0 4px #c4934f; }
.emblem .icon { width: 55%; height: 55%; color: #543c1e; }
.entry-body { align-self: center; padding: clamp(28px, 4vw, 56px); }
.entry-body h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.entry-body > p { margin: 9px 0 28px; }
.key-field { position: relative; margin: 7px 0 18px; }
.key-field input { padding-right: 50px; }
.key-field .icon-btn { position: absolute; right: 2px; top: 1px; }
.entry-body .notice { margin-bottom: 14px; }

/* Navigation */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--rail);
  display: flex; flex-direction: column; background: var(--nav); border-right: 1px solid var(--line-soft);
}
.rail-brand { min-height: 70px; display: flex; align-items: center; padding: 0 23px; border-bottom: 1px solid var(--line-soft); }
.side-nav { padding: 20px 12px; overflow-y: auto; flex: 1; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; margin: 2px 0; padding: 8px 12px; border-radius: 8px; border: 1px solid transparent; color: var(--sub); font-size: .95rem; font-weight: 530; }
.nav-link:hover { color: var(--text); background: var(--panel); }
.nav-link[aria-current="page"] { background: var(--gold-wash); color: var(--gold-text); border-color: var(--gold-edge); }
.nav-link[aria-current="page"]::after { content: ""; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.rail-account { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); padding: 16px; }
.rail-account div { min-width: 0; }
.rail-account strong, .rail-account small { display: block; word-break: break-word; }
.rail-account strong { font-size: .9rem; }
.account-glyph, .title-icon, .large-glyph {
  display: inline-grid; place-items: center; flex: none; color: var(--gold-text);
  background: var(--gold-wash); border-radius: 9px;
}
.account-glyph { width: 38px; height: 38px; border: 1px solid var(--gold-edge); }
.canvas { margin-left: var(--rail); min-height: 100vh; }
.topbar { background: var(--nav); border-bottom: 1px solid var(--line-soft); }
.top-inner, #content { max-width: 1490px; margin: 0 auto; padding-inline: clamp(20px, 3.5vw, 55px); }
.top-inner { height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.desktop-crumb, .mobile-brand, .top-tools, .top-mode, .power-btn { display: flex; align-items: center; }
.desktop-crumb, .top-mode { color: var(--sub); font-size: .875rem; }
.desktop-crumb { gap: 9px; }
.desktop-crumb .icon { width: 13px; height: 13px; }
.desktop-crumb strong { font-weight: 570; color: var(--text); }
.top-tools { gap: 14px; }
.top-mode:not(:empty)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); margin-right: 7px; }
.top-mode[data-mode="live"]::before { background: var(--green); }
.top-mode[data-mode="sandbox"]::before { background: var(--gold); }
.power-btn { color: var(--sub); gap: 7px; padding: 0 8px; font-size: .875rem; }
.mobile-brand, .dock { display: none; }
#content { padding-block: clamp(24px, 4vw, 50px) 62px; min-width: 0; }
.view-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.view-heading p { margin-top: 6px; }
.notice { background: var(--panel-light); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; font-size: .94rem; }
#feedback, #data-error { margin-bottom: 16px; }
.notice.error, #data-error { background: #38272b; border-color: #74514f; color: var(--red); }
.notice.success { background: #1b342e; border-color: #395b50; color: var(--green); }
.btn:focus-visible, a:focus-visible { position: relative; z-index: 1; }

/* Order entry and charge station */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); gap: 20px; align-items: start; }
.panel-title { min-height: 60px; display: flex; gap: 10px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); }
.title-icon { background: none; }
.form-stack, .info-body { padding: 20px; }
.form-stack { display: grid; gap: 17px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.select-shell, .search-wrap { position: relative; min-width: 0; }
.select-shell select { appearance: none; -webkit-appearance: none; padding-right: 2rem; text-overflow: ellipsis; }
.select-shell > .icon { position: absolute; right: 11px; top: calc(50% - 8px); width: 16px; height: 16px; pointer-events: none; color: var(--sub); }
.checkout-row { margin: 4px -20px -20px; padding: 16px 20px; background: var(--panel-light); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.checkout-row small, .checkout-row strong { display: block; }
.checkout-row strong { font-size: 1.4rem; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.service-hero {
  position: relative; display: flex; align-items: end; justify-content: space-between; overflow: hidden; isolation: isolate;
  min-height: 143px; padding: 20px; gap: 10px; background: radial-gradient(ellipse at 79% 34%, #67523f, #443a38 45%, #2b2d3b 86%);
}
.service-hero::before { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: -1; background: radial-gradient(#ffffff23 .75px, transparent .85px); background-size: 14px 14px; }
.service-hero small { display: block; color: #e8dccb; }
.service-hero h2 { margin-top: 3px; font-size: 1.58rem; }
.service-tile {
  flex: none; align-self: center; margin-right: 12px; width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 17px; color: #493821; border: 1px solid #ffdb99;
  transform: rotate(-20deg) skew(8deg, 3deg); background: linear-gradient(145deg, #fff0c0, #f3bd65);
  box-shadow: 0 5px 0 #ae844a, 0 10px 0 #795b3c, 0 17px 20px #1517225c;
}
.service-tile .icon { width: 33px; height: 33px; }
.facts { margin: 13px 0 0; }
.facts > div, .routes > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.facts dt { font-size: .9rem; }
.facts dd { text-align: right; font-weight: 540; }
.charge-head { display: flex; align-items: center; gap: 15px; padding: 19px 20px; margin-bottom: 16px; }
.charge-head p { margin-top: 3px; }
.large-glyph { width: 45px; height: 45px; }
.large-glyph .icon { width: 24px; height: 24px; }
.empty { text-align: center; padding: clamp(28px, 5vw, 54px) 22px; }
.empty .empty-icon { display: inline-flex; color: var(--gold-text); background: var(--gold-wash); padding: 10px; border-radius: 11px; margin-bottom: 10px; }
.empty h3 { margin-bottom: 5px; }
.empty p { max-width: 520px; margin: 0 auto; }
.empty .btn { margin-top: 14px; }

/* Lists and compact order cards */
.toolbar { padding: 14px 18px; display: flex; gap: 10px; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.toolbar .select-shell { flex: 0 1 210px; }
.search-wrap { flex: 1; }
.search-wrap > .icon { position: absolute; top: calc(50% - 9px); left: 12px; width: 17px; height: 17px; color: var(--sub); }
.search-wrap input { padding-left: 38px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .93rem; }
th { color: var(--sub); font-weight: 560; background: var(--field); font-size: .8rem; }
th, td { padding: 12px 15px; }
td { border-top: 1px solid var(--line-soft); vertical-align: middle; }
.service-col { min-width: 140px; max-width: 350px; }
td strong, td small { display: block; overflow-wrap: anywhere; }
td small { margin-top: 2px; font-size: .85rem; }
td strong { font-weight: 560; }
.service-cell { display: flex; align-items: center; gap: 10px; }
.platform-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 8px; color: var(--gold-text); }
.platform-icon[data-platform="instagram"] { color: #f0a0c3; }
.platform-icon[data-platform="facebook"] { color: #94bcff; }
.platform-icon[data-platform="youtube"] { color: #f49a9d; }
.id-link { color: var(--gold-text); text-align: left; font: .875rem var(--mono); padding: 5px 0; }
.id-link:hover, .safe-link:hover { text-decoration: underline; }
.status { display: inline-block; width: fit-content; padding: 3px 8px; border-radius: 7px; color: var(--sub); background: var(--field); font-size: .82rem; font-weight: 560; }
.status[data-tone="green"] { color: var(--green); background: #1b362e; }
.status[data-tone="amber"] { color: var(--gold-text); background: var(--gold-wash); }
.status[data-tone="blue"] { color: #a2ceff; background: #23364b; }
.status[data-tone="red"] { color: var(--red); background: #39292d; }
.published-id { display: block; margin-bottom: 5px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; border-top: 1px solid var(--line-soft); color: var(--sub); font-size: .875rem; }
.pager:empty { display: none; }
.pager-controls { display: flex; gap: 3px; }
.pager-controls .icon-btn { width: 38px; min-height: 38px; }
.api-panel { max-width: 840px; }
.api-panel pre { padding: 13px; margin: 14px 0; background: var(--field); border: 1px solid var(--line); border-radius: 8px; font-size: .875rem; overflow-x: auto; }
.routes > div { display: grid; grid-template-columns: minmax(155px, .75fr) minmax(0, 1.45fr); }
.routes dt { color: var(--gold-text); font: .875rem var(--mono); }
.routes dd { color: var(--sub); }

/* Native dialogs handle keyboard focus, the Escape key and touch scrolling. */
dialog {
  width: min(calc(100% - 32px), 510px); max-height: calc(100dvh - 44px); margin: auto; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text);
  box-shadow: 0 25px 90px #050a1177; overflow-y: auto; overscroll-behavior: contain;
}
dialog::backdrop { background: #060b14bf; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 10px 8px 19px; border-bottom: 1px solid var(--line-soft); }
.dialog-body { padding: 17px 20px 21px; }
.dialog-body .facts { margin-top: 7px; }
.dialog-body .form-stack { padding: 0; }
.dialog-body .notice, .dialog-body .field, .dialog-actions { margin-top: 13px; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: end; }
.safe-link { color: var(--gold-text); word-break: break-word; }
.key-field input, .dialog-body input { min-width: 0; }
.menu-nav .nav-link { margin: 0; }
.section-note { font-size: .9rem; margin-top: 12px; }

@media (min-width: 1650px) {
  :root { --rail: 242px; }
}
@media (max-width: 1080px) {
  :root { --rail: 205px; }
  .rail-brand { padding-inline: 16px; }
  .top-inner, #content { padding-inline: 23px; }
  .order-grid { grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr); gap: 14px; }
  .brand { font-size: 1.48rem; }
}
@media (max-width: 900px) {
  .rail, .desktop-crumb { display: none; }
  .mobile-brand { display: inline-flex; align-items: center; gap: 3px; }
  .canvas { margin-left: 0; }
  .top-inner { height: 61px; }
  .top-inner, #content { padding-inline: 16px; }
  #content { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .dock {
    position: fixed; z-index: 12; inset: auto 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    background: var(--nav); border-top: 1px solid var(--line); padding: 4px 7px calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .dock a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; min-height: 50px; padding: 3px 2px; color: var(--sub); font-size: .77rem; }
  .dock a[aria-current="page"] { color: var(--gold-text); }
  .dock .icon { width: 19px; height: 19px; }
}
@media (max-width: 660px) {
  .entry { padding: 24px 16px 32px; }
  .entry-brand { margin-bottom: 30px; }
  .entry-panel { grid-template-columns: minmax(0, 1fr); border-radius: 15px; }
  .entry-art { min-height: 128px; }
  .emblem { transform: scale(.7); transform-origin: center; top: calc(50% - 54px); }
  .entry-body { padding: 24px 19px; }
  .entry-body > p { margin-bottom: 20px; }
  .order-grid { grid-template-columns: minmax(0, 1fr); }
  .service-hero { min-height: 106px; }
  .view-heading { margin-bottom: 17px; align-items: start; }
  .view-heading h1 { font-size: 2rem; }
  .view-heading p { font-size: .92rem; }
  .view-heading .btn { padding-inline: 9px; }
  .brand { font-size: 1.28rem; gap: 5px; }
  .logo .icon { width: 26px; height: 26px; }
  .top-tools { gap: 6px; }
  .power-btn span { display: none; }
  .power-btn { min-width: 44px; }
  .top-mode { font-size: .78rem; }
  .top-inner { padding-inline: 5px 9px; }
  .form-stack, .info-body, .dialog-body { padding: 15px; }
  .panel-title { min-height: 54px; padding: 11px 15px; }
  .checkout-row { margin-inline: -15px; margin-bottom: -15px; padding: 13px 15px; }
  .toolbar { flex-wrap: wrap; padding: 12px; }
  .toolbar .search-wrap { flex: 1 1 100%; }
  .toolbar .select-shell { flex: 1; }
  .table-wrap { overflow: visible; }
  .data-table, .data-table tbody { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; padding: 13px 15px; border-top: 1px solid var(--line-soft); }
  .data-table tr:first-child { border-top: 0; }
  .data-table td { border: 0; padding: 0; min-width: 0; }
  .data-table td::before { display: block; content: attr(data-label); color: var(--quiet); font-size: .8rem; margin-bottom: 3px; }
  .data-table .service-col { grid-column: 1/-1; max-width: none; }
  .data-table .service-col::before { display: none; }
  .data-table .id-link, .data-table button { min-height: 44px; }
  .charge-head { padding: 15px; align-items: start; }
  .charge-head p { font-size: .92rem; }
}
@media (max-width: 380px) {
  .fields, .routes > div { grid-template-columns: 1fr; gap: 8px; }
  .view-heading #refresh span { display: none; }
  #content { padding-inline: 11px; }
  .top-mode { max-width: 70px; }
  .facts > div { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
