/* Etienda: a porch light left on. Night-blue band up top, warm amber for anything live or actionable,
   quiet blue-biased neutrals underneath. Single column, phone first. */
:root {
  --bg: #f3f4f9;
  --surface: #ffffff;
  --surface-2: #e8eaf3;
  --ink: #15172a;
  --ink-2: #4b4f69;
  --line: #d6d9e6;
  --night: #1b1e3a;
  --on-night: #f1f2fb;
  --on-night-2: #a9add0;
  --lamp: #f5a623;
  --lamp-ink: #2b1c00;
  --lamp-soft: #fdf0d6;
  --open: #1d8a59;
  --warn: #a8511b;
  --warn-soft: #fbe9dc;
  --danger: #c0352b;
  --focus: #3d6cf0;

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.25rem, 6vw, 3.5rem);

  --radius: 10px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1020;
    --surface: #171a30;
    --surface-2: #21253f;
    --ink: #eef0fa;
    --ink-2: #a8acc7;
    --line: #2d3253;
    --night: #090b18;
    --on-night: #f1f2fb;
    --on-night-2: #8f94b8;
    --lamp: #ffb83d;
    --lamp-ink: #2b1c00;
    --lamp-soft: #3a2c12;
    --open: #44c98e;
    --warn: #f19a5f;
    --warn-soft: #3b2418;
    --danger: #ff6e61;
    --focus: #8aa6ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--font-body);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
.mono, .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 28px 120px; display: grid; gap: 40px; }

/* ---------- header ---------- */
.site-header { background: var(--night); color: var(--on-night); padding-top: env(safe-area-inset-top, 0px); }
.header-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 60px; padding-block: 10px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--on-night);
  display: inline-flex;
  align-items: center;
}
.wordmark-e {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.04em;
  border-radius: 50%;
  background: var(--lamp);
  color: var(--lamp-ink);
  box-shadow: 0 0 18px color-mix(in srgb, var(--lamp) 55%, transparent);
  line-height: 1;
  padding-bottom: 0.08em;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.95rem; color: var(--on-night-2); text-transform: lowercase; }
.crumbs a { color: var(--on-night); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: 0.6; }
.header-end { margin-left: auto; display: flex; gap: 14px; align-items: center; }
#account-link { display: flex; align-items: center; }
.header-link { color: var(--on-night-2); font-size: var(--step--1); text-decoration: none; }
.header-link:hover { color: var(--on-night); }

/* ---------- buttons & forms ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--step-0)/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--lamp); border-color: var(--lamp); color: var(--lamp-ink); }
.btn-primary:hover { border-color: var(--lamp); filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger.is-armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: var(--step--1); }
.btn-block { width: 100%; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-weight: 400; color: var(--ink-2); }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
  min-width: 0;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.fields { display: grid; gap: 14px; }
.fields-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); }
.choice input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--lamp); }
.choice:has(input:checked) { border-color: var(--lamp); background: var(--lamp-soft); }
.form-error { color: var(--danger); font-weight: 600; }
.form-error:empty { display: none; }

/* ---------- shared blocks ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.section { display: grid; gap: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice { padding: 14px 16px; border-radius: var(--radius); background: var(--warn-soft); color: var(--ink); border-left: 4px solid var(--warn); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--radius); }

.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--step--1); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); opacity: 0.5; }
.status[data-open="true"] { color: var(--open); }
.status[data-open="true"]::before { background: var(--open); opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--open) 60%, transparent); animation: glow 2.4s ease-out infinite; }
@keyframes glow { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: var(--step--1); font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.pill-new { background: var(--lamp); color: var(--lamp-ink); }
.pill-accepted { background: var(--lamp-soft); color: var(--ink); }
.pill-out { background: color-mix(in srgb, var(--open) 18%, var(--surface)); color: var(--open); }
.pill-delivered { color: var(--open); }
.pill-cancelled { color: var(--danger); }

.toast-host { position: fixed; left: 0; right: 0; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; pointer-events: none; z-index: 1000; padding-inline: 16px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / 0.2); }
.toast-error { background: var(--danger); color: #fff; }

.site-footer { padding-block: 24px 40px; color: var(--ink-2); font-size: var(--step--1); border-top: 1px solid var(--line); }

/* ---------- home / city / start ---------- */
.hero { display: grid; gap: 16px; padding-top: 12px; }
.hero p.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 36em; }
.town-list, .shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.town, .shop-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
}
.town:hover, .shop-card:hover { border-color: var(--lamp); }
.town-name, .shop-card-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 4px; padding: 16px; border-top: 3px solid var(--lamp); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.steps li::before { content: counter(step); font-family: var(--font-mono); color: var(--ink-2); font-size: var(--step--1); }
.steps-plain li::before { content: none; }
.steps strong { font-size: var(--step-1); font-family: var(--font-display); }
.cta-band { display: grid; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--night); color: var(--on-night); }
.cta-band p { color: var(--on-night-2); }
.cta-band .btn-primary { justify-self: start; }

/* ---------- storefront ---------- */
.shop-hero { display: grid; gap: 10px; }
.shop-hero h1 { font-size: var(--step-3); }
.shop-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: var(--step--1); }
.last-order { font-size: var(--step--1); }
.category { display: grid; gap: 4px; }
.category h2 { font-size: var(--step-1); padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.items { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.item-main { display: grid; gap: 2px; min-width: 0; }
.item-img { display: block; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.item-img svg, .item-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.item.is-out .item-img { opacity: 0.45; filter: grayscale(1); }
.item-img-sm { width: 48px; height: 48px; border-radius: 10px; }
.photo-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photo-row .margin { flex: 1 1 200px; }
.item-name { font-weight: 600; }
.item-meta { font-size: var(--step--1); color: var(--warn); }
.item.is-out .item-name, .item.is-out .price { color: var(--ink-2); }
.item .price { font-size: 0.95rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.stepper button { appearance: none; border: 0; background: none; color: var(--ink); width: 40px; height: 40px; font-size: 1.25rem; font-weight: 600; cursor: pointer; border-radius: 999px; }
.stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper output { min-width: 22px; text-align: center; font-family: var(--font-mono); font-weight: 500; }
.add-btn { min-width: 84px; }

.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.event { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.event-date { display: grid; place-items: center; align-content: center; width: 58px; height: 58px; border-radius: 8px; background: var(--night); color: var(--on-night); line-height: 1.05; text-align: center; }
.event-date b { font-family: var(--font-display); font-size: 1.4rem; }
.event-date small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lamp); }
.event-body { display: grid; gap: 2px; min-width: 0; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--night); color: var(--on-night);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding-top: 12px;
  box-shadow: 0 -8px 30px rgb(0 0 0 / 0.18);
}
.cart-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-bar-sum { display: grid; line-height: 1.25; }
.cart-bar-sum small { color: var(--on-night-2); }

.checkout { display: grid; gap: 22px; }
.back-link { justify-self: start; background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.summary-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.summary-lines li, .totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.totals .total { font-weight: 700; font-size: var(--step-1); padding-top: 6px; border-top: 1px solid var(--line); }
.map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.results button { width: 100%; text-align: left; background: var(--surface-2); border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.distance-line { font-weight: 600; }
.distance-line.is-out { color: var(--warn); }
.start-own { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--night); color: var(--on-night); }
.start-own p { color: var(--on-night-2); }
.start-own a { color: var(--lamp); font-weight: 600; }

.member-offer { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--lamp-soft); border: 2px solid var(--lamp); }
.member-offer h2 { font-size: var(--step-1); }
.member-offer p { color: var(--ink-2); }
.totals .perk { color: var(--open); font-weight: 600; }
.card-fields { display: grid; gap: 14px; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 520px) { .card-fields { grid-template-columns: 1fr 1fr; } .card-fields .field-card { grid-column: span 2; } }
.test-card { font-size: var(--step--1); padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }

.map-tall { height: 380px; }
.map-hero { height: 260px; }
.map-caption { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; font-size: var(--step--1); color: var(--ink-2); }
.map-caption a { color: var(--ink); font-weight: 600; }
.map-popup { display: grid; gap: 4px; font: 500 0.9rem/1.35 var(--font-body); min-width: 150px; }
.map-popup strong { font-family: var(--font-display); font-size: 1rem; }
.map-popup a { font-weight: 600; }
.town-label { background: var(--night); color: var(--on-night); border: 0; border-radius: 999px; padding: 4px 10px; font: 600 0.8rem/1.2 var(--font-body); box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.town-label::before { display: none; }
.legend { display: inline-flex; gap: 14px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend .on::before { background: var(--lamp); }
.legend .off::before { background: var(--ink-2); }

/* map pins */
.pin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.35); }
.pin-shop { background: var(--lamp); }
.pin-home { background: var(--focus); }

/* ---------- tracking ---------- */
.track-head { display: grid; gap: 8px; }
.track-head h1 { font-size: var(--step-3); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding-bottom: 18px; position: relative; color: var(--ink-2); }
.timeline li::before { content: ""; width: 14px; height: 14px; margin: 4px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--open); border-color: var(--open); }
.timeline li.current::before { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 0 5px color-mix(in srgb, var(--lamp) 25%, transparent); }
.timeline time { font-family: var(--font-mono); font-size: var(--step--1); }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { font-family: var(--font-mono); background: var(--surface-2); padding: 6px 10px; border-radius: 6px; user-select: all; overflow-wrap: anywhere; }

/* ---------- operator ---------- */
.op-bar { background: var(--night); color: var(--on-night); }
.op-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: 12px; }
.oncall { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.oncall input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oncall .track { width: 56px; height: 32px; border-radius: 999px; background: var(--surface-2); position: relative; transition: background 0.2s; flex: none; }
.oncall .track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); }
.oncall input:checked + .track { background: var(--open); }
.oncall input:checked + .track::after { transform: translateX(24px); }
.oncall input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.oncall small { display: block; color: var(--on-night-2); font-weight: 400; }
.conn { font-size: var(--step--1); color: var(--on-night-2); }
.conn[data-live="true"]::before { content: "● "; color: var(--open); }
.conn[data-live="false"]::before { content: "● "; color: var(--warn); }

.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 14px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lamp); }
.tabs .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--lamp); color: var(--lamp-ink); font-size: 0.75rem; }

.order-group { display: grid; gap: 12px; }
.order-group h2 { font-size: var(--step-1); display: flex; gap: 8px; align-items: center; }
.orders { display: grid; gap: 12px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; min-width: 0; }
.order-new { border-color: var(--lamp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lamp) 30%, transparent); }
.order-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-code { font-weight: 500; }
.order-ago { margin-left: auto; color: var(--ink-2); font-size: var(--step--1); }
.order-who, .order-where { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; }
.order-dropoff { padding: 8px 10px; border-radius: 6px; background: var(--lamp-soft); }
.order-notes { background: var(--surface-2); padding: 8px 10px; border-radius: 6px; }
.order-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-actions .btn-primary { flex: 1; }

.item-editor { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item-row {
  display: grid; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) repeat(3, minmax(70px, 0.8fr)) auto auto;
  align-items: end;
}
.item-row.is-hidden { opacity: 0.6; }
.item-row .field > span { font-weight: 500; color: var(--ink-2); }
.item-row .margin { font-size: var(--step--1); color: var(--ink-2); grid-column: 1 / -1; }
.toggle-field { display: flex; gap: 6px; align-items: center; min-height: 44px; font-size: var(--step--1); }
.toggle-field input { width: auto; min-height: 0; accent-color: var(--lamp); }
@media (max-width: 720px) {
  .item-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-row .field-name, .item-row .field-cat { grid-column: span 3; }
}

.restock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.restock-row {
  display: grid; gap: 10px 14px; align-items: end; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  grid-template-columns: minmax(0, 1fr) repeat(3, 88px);
}
.restock-row.is-low { border-color: var(--lamp); }
.restock-row.is-picked { background: var(--lamp-soft); }
.restock-row .field > span { font-weight: 500; color: var(--ink-2); }
.restock-name { display: grid; gap: 2px; align-self: center; min-width: 0; }
.restock-meta { font-size: var(--step--1); color: var(--ink-2); }
.restock-meta .warn { color: var(--warn); font-weight: 600; }
@media (max-width: 560px) {
  .restock-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .restock-name { grid-column: 1 / -1; }
}

.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 2px; }
.tile b { font-family: var(--font-mono); font-size: var(--step-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: var(--step--1); color: var(--ink-2); font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--font-mono); }
tr:last-child td { border-bottom: 0; }
.fee-preview { font-size: var(--step--1); color: var(--ink-2); }

.login { max-width: 420px; margin-inline: auto; }

.demo-bar { background: var(--lamp); color: var(--lamp-ink); padding-top: env(safe-area-inset-top, 0px); font-size: var(--step--1); }
.demo-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-block: 8px; }
.demo-bar .btn { background: var(--lamp-ink); color: var(--lamp); border-color: var(--lamp-ink); }
.demo-bar ~ .site-header { padding-top: 0; }
.feedback-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); color: var(--ink); }
.feedback-dialog::backdrop { background: rgb(10 12 26 / 0.6); }

.sign-preview { border-radius: 6px; overflow: hidden; box-shadow: 0 8px 30px rgb(0 0 0 / 0.25); aspect-ratio: 4 / 3; max-width: 100%; }
.sign-preview svg { display: block; width: 100%; height: 100%; }
.sign-total { display: flex; gap: 10px; align-items: baseline; font-size: var(--step-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
