/* Olympus POS — shared shell.
   Palette is stone and pool water: a cyan-biased near-black rather than a
   generic dark grey, with one accent and disciplined per-centre colour. */

:root {
  --ground: #EDF1F0;
  --surface: #FFFFFF;
  --surface-2: #F5F8F7;
  --surface-3: #E4EAE9;
  --hairline: rgba(14, 40, 45, 0.11);
  --hairline-strong: rgba(14, 40, 45, 0.20);
  --text: #0B1417;
  --text-2: rgba(11, 20, 23, 0.62);
  --text-3: rgba(11, 20, 23, 0.40);
  --accent: #0E9B98;
  --accent-ink: #FFFFFF;
  --accent-wash: rgba(14, 155, 152, 0.10);
  --c-fnb: #B87A22;
  --c-coffee: #8A5A3B;
  --c-retail: #BC5B3B;
  --c-parking: #3E6FD0;
  --c-tickets: #3E9C63;
  --c-events: #7C7F86;
  --ok: #2E9E63;
  --warn: #B5761C;
  --crit: #C13539;
  --ok-wash: rgba(46, 158, 99, 0.12);
  --warn-wash: rgba(181, 118, 28, 0.12);
  --crit-wash: rgba(193, 53, 57, 0.10);
  --shadow-sm: 0 1px 2px rgba(9, 26, 30, 0.06), 0 0 0 1px rgba(9, 26, 30, 0.04);
  --shadow-lg: 0 24px 60px -12px rgba(9, 26, 30, 0.28), 0 0 0 1px rgba(9, 26, 30, 0.06);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1417; --surface: #161E22; --surface-2: #1E282D; --surface-3: #26333A;
    --hairline: rgba(160, 200, 210, 0.13); --hairline-strong: rgba(160, 200, 210, 0.24);
    --text: #EDF4F5; --text-2: rgba(237, 244, 245, 0.60); --text-3: rgba(237, 244, 245, 0.36);
    --accent: #16C5C0; --accent-ink: #05201F; --accent-wash: rgba(22, 197, 192, 0.13);
    --c-fnb: #E0A040; --c-coffee: #C08457; --c-retail: #D2704F;
    --c-parking: #5B8DEF; --c-tickets: #59B77A; --c-events: #9AA0A6;
    --ok: #45C583; --warn: #E0A040; --crit: #E5484D;
    --ok-wash: rgba(69, 197, 131, 0.14); --warn-wash: rgba(224, 160, 64, 0.14);
    --crit-wash: rgba(229, 72, 77, 0.14);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px rgba(160,200,210,.07);
    --shadow-lg: 0 28px 70px -14px rgba(0,0,0,.7), 0 0 0 1px rgba(160,200,210,.10);
    --key-rest: 0 2px 0 0 rgba(0, 0, 0, 0.55), 0 4px 10px -3px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(190, 225, 235, 0.14);
    --key-press: 0 0 0 0 rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.5),
                 inset 0 2px 6px rgba(0, 0, 0, 0.55);
    --key-travel: 2px;
  }
}

/* Explicit theme choice overrides the OS. The toggle stamps data-theme. */
:root[data-theme="light"] {
  --ground: #EDF1F0; --surface: #FFFFFF; --surface-2: #F5F8F7; --surface-3: #E4EAE9;
  --hairline: rgba(14,40,45,.11); --hairline-strong: rgba(14,40,45,.20);
  --text: #0B1417; --text-2: rgba(11,20,23,.62); --text-3: rgba(11,20,23,.40);
  --accent: #0E9B98; --accent-ink: #FFFFFF; --accent-wash: rgba(14,155,152,.10);
  --c-fnb: #B87A22; --c-coffee: #8A5A3B; --c-retail: #BC5B3B;
  --c-parking: #3E6FD0; --c-tickets: #3E9C63; --c-events: #7C7F86;
  --ok: #2E9E63; --warn: #B5761C; --crit: #C13539;
  --ok-wash: rgba(46,158,99,.12); --warn-wash: rgba(181,118,28,.12); --crit-wash: rgba(193,53,57,.10);
  --shadow-sm: 0 1px 2px rgba(9,26,30,.06), 0 0 0 1px rgba(9,26,30,.04);
  --shadow-lg: 0 24px 60px -12px rgba(9,26,30,.28), 0 0 0 1px rgba(9,26,30,.06);
  --key-rest: 0 2px 0 0 rgba(9,26,30,.13), 0 3px 8px -2px rgba(9,26,30,.16),
              inset 0 1px 0 rgba(255,255,255,.7);
  --key-press: 0 0 0 0 rgba(9,26,30,.13), 0 1px 2px -1px rgba(9,26,30,.2),
               inset 0 2px 5px rgba(9,26,30,.14);
}

:root[data-theme="dark"] {
  --ground: #0E1417; --surface: #161E22; --surface-2: #1E282D; --surface-3: #26333A;
  --hairline: rgba(160,200,210,.13); --hairline-strong: rgba(160,200,210,.24);
  --text: #EDF4F5; --text-2: rgba(237,244,245,.60); --text-3: rgba(237,244,245,.36);
  --accent: #16C5C0; --accent-ink: #05201F; --accent-wash: rgba(22,197,192,.13);
  --c-fnb: #E0A040; --c-coffee: #C08457; --c-retail: #D2704F;
  --c-parking: #5B8DEF; --c-tickets: #59B77A; --c-events: #9AA0A6;
  --ok: #45C583; --warn: #E0A040; --crit: #E5484D;
  --ok-wash: rgba(69,197,131,.14); --warn-wash: rgba(224,160,64,.14); --crit-wash: rgba(229,72,77,.14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px rgba(160,200,210,.07);
  --shadow-lg: 0 28px 70px -14px rgba(0,0,0,.7), 0 0 0 1px rgba(160,200,210,.10);
  --key-rest: 0 2px 0 0 rgba(0,0,0,.55), 0 4px 10px -3px rgba(0,0,0,.6),
              inset 0 1px 0 rgba(190,225,235,.14);
  --key-press: 0 0 0 0 rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.5),
               inset 0 2px 6px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--sans); background: var(--ground); color: var(--text);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.u-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-3);
}

/* ------------------------------ chrome ------------------------------ */
.app { height: 100%; display: flex; flex-direction: column; }

.topbar {
  height: 58px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 16px; border-bottom: 1px solid var(--hairline); background: var(--surface);
}
.wordmark { display: flex; gap: 8px; padding-right: 14px; border-right: 1px solid var(--hairline); }
.wordmark b, .wordmark span {
  font-family: var(--serif); font-size: 15px; letter-spacing: .16em; text-transform: uppercase;
}
.wordmark b { font-weight: 600; }
.wordmark span { color: var(--accent); }
.station-name { font-size: 13.5px; font-weight: 600; }
.station-sub { font-size: 11.5px; color: var(--text-3); }
.spacer { flex: 1; }

.pill {
  display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--hairline); color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); background: var(--ok-wash); }
.pill.offline { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 34%, transparent); background: var(--warn-wash); }
.linkish { font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; }

.banner {
  flex: none; display: none; align-items: center; gap: 8px; padding: 7px 18px;
  font-size: 12.5px; font-weight: 500; background: var(--warn-wash); color: var(--warn);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 22%, transparent);
}
.banner.shown { display: flex; }
.banner.crit { background: var(--crit-wash); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 22%, transparent); }

.body { flex: 1; display: flex; min-height: 0; }

/* fluted column, a nod to what the place is named after */
.rail {
  width: 96px; flex: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid var(--hairline);
  background: repeating-linear-gradient(90deg, transparent 0 13px, var(--hairline) 13px 14px), var(--surface);
}
.mode {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px 10px; border-radius: var(--r-md); color: var(--text-3);
  transition: color .15s, background .15s;
}
.mode:hover { color: var(--text-2); background: var(--surface-2); }
.mode.active { color: var(--mc); background: var(--surface-2); }
.mode.active::after {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 26px; border-radius: 0 3px 3px 0; background: var(--mc);
}
.mode-name { font-size: 11px; font-weight: 600; }
.mode-glyph { font-size: 19px; line-height: 1; }
.rail-gap { flex: 1; }

.canvas { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.canvas-head { flex: none; padding: 16px 20px 0; display: flex; flex-direction: column; gap: 13px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}
.search input { flex: 1; border: none; background: none; font: inherit; font-size: 14.5px; color: var(--text); outline: none; min-width: 0; }
.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--hairline); white-space: nowrap;
}
.chip.active { color: var(--accent-ink); background: var(--mc); border-color: var(--mc); }

.grid-scroll { flex: 1; overflow-y: auto; padding: 14px 20px 24px; min-height: 0; }
.cat-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.cat-head:first-child { margin-top: 0; }
.cat-head .rule { flex: 1; height: 1px; background: var(--hairline); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }

.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 104px; padding: 13px; border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); text-align: left; overflow: hidden;
  transition: transform .11s var(--ease), border-color .14s;
}
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--mc); opacity: .85; }
.tile:hover { border-color: var(--hairline-strong); }
.tile-name { font-size: 13.5px; font-weight: 600; line-height: 1.28; text-wrap: balance; }
.tile-price { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tile.sixed, .tile.blocked { opacity: .45; }
.tile.sixed .tile-name { text-decoration: line-through; }
.tile.blocked::before { background: var(--crit); }
.flags { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.flag { font-size: 10px; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-3); }
.flag.low { background: var(--warn-wash); color: var(--warn); }
.flag.no { background: var(--crit-wash); color: var(--crit); }
.tile.added { animation: pop .42s var(--ease); }
@keyframes pop { 0% { box-shadow: var(--shadow-sm); } 22% { box-shadow: 0 0 0 2px var(--mc); } 100% { box-shadow: var(--shadow-sm); } }

.notice {
  display: flex; gap: 11px; padding: 13px 14px; border-radius: var(--r-md);
  background: var(--crit-wash); color: var(--crit); font-size: 12.5px; line-height: 1.55; margin-bottom: 16px;
}
.notice .stripe { width: 3px; align-self: stretch; border-radius: 2px; background: currentColor; flex: none; }
.notice b { display: block; margin-bottom: 3px; }
.notice span { color: var(--text); }

/* ------------------------------ order ------------------------------ */
.order { width: 372px; flex: none; border-left: 1px solid var(--hairline); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.order-head { flex: none; padding: 13px 16px 12px; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 11px; }
.order-meta { display: flex; align-items: center; justify-content: space-between; }
.txt-btn { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 5px 9px; border-radius: 7px; }
.txt-btn:hover { background: var(--surface-2); color: var(--text); }
.guest-btn {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--hairline-strong);
  text-align: left; font-size: 13.5px; color: var(--text-2);
}
.guest-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-wash); }
.guest-btn:disabled { opacity: .45; cursor: not-allowed; }
.guest-card {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: var(--r-md);
  background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.guest-info { flex: 1; min-width: 0; }
.guest-name { font-size: 13.5px; font-weight: 650; }
.guest-sub { font-size: 11.5px; color: var(--text-2); }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--text-3); font-size: 15px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.lines { flex: 1; overflow-y: auto; min-height: 0; padding: 6px 0; }
.line { display: flex; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--hairline); animation: slide .3s var(--ease); }
@keyframes slide { from { opacity: 0; transform: translateY(7px); } }
.line-qty { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.line-tags { display: flex; gap: 6px; align-items: center; }
.line-vert { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mc); }
.owner-chip { font-size: 9.5px; font-weight: 700; letter-spacing: .055em; padding: 2px 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); }
.line-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.line-mods { font-size: 11.5px; color: var(--text-2); }
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.line-price { font-size: 13.5px; font-weight: 600; }
.stepper { display: flex; gap: 2px; }
.step { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); font-size: 14px; }
.step:hover { background: var(--surface-3); color: var(--text); }
.step.del:hover { background: var(--crit-wash); color: var(--crit); }
.lines-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); font-size: 13px; text-align: center; padding: 20px; }

.totals { flex: none; padding: 13px 16px 14px; border-top: 1px solid var(--hairline); background: var(--surface-2); display: flex; flex-direction: column; gap: 7px; }
.trow { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.trow-total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--hairline); }
.trow-total .lbl { font-size: 13px; font-weight: 600; }
.trow-total .amt { font-size: 27px; font-weight: 700; letter-spacing: -.022em; }
.routing { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.routing code { font-family: var(--mono); font-size: 10.5px; color: var(--text-2); }
.pay {
  height: 54px; border-radius: var(--r-md); background: var(--mc); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
  font-size: 16px; font-weight: 650; margin-top: 5px; transition: transform .11s var(--ease);
}
.pay:disabled { opacity: .35; cursor: default; transform: none; }

/* ------------------------------ sheets ------------------------------ */
.scrim { position: fixed; inset: 0; background: rgba(4,12,14,.5); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: end center; animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100%); max-height: 88vh; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: up .38s var(--ease) both; overflow: hidden; }
@keyframes up { from { transform: translateY(100%); } }
.grabber { width: 36px; height: 4px; border-radius: 2px; background: var(--hairline-strong); margin: 9px auto 0; flex: none; }
.sheet-head { flex: none; padding: 14px 20px 13px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--hairline); }
.sheet-title { flex: 1; }
.sheet-title h3 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: -.012em; }
.sheet-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.sheet-scroll { flex: 1; overflow-y: auto; padding: 4px 20px 8px; min-height: 0; }
.sheet-foot { flex: none; padding: 12px 20px 18px; border-top: 1px solid var(--hairline); background: var(--surface-2); }

.mgroup { padding: 15px 0 4px; }
.mgroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.req { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; padding: 2.5px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }
.opt-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--surface); margin-bottom: 6px; text-align: left; }
.opt-row.on { border-color: var(--accent); background: var(--accent-wash); }
.opt-box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--hairline-strong); display: grid; place-items: center; color: transparent; font-size: 12px; font-weight: 800; }
.opt-row.on .opt-box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt-name { flex: 1; font-size: 14px; font-weight: 550; }
.opt-price { font-size: 12.5px; font-weight: 600; color: var(--text-2); }

/* item wizard */
.wiz-note { font-size: 11.5px; color: var(--text-2); line-height: 1.55; margin-top: 12px; }
.wiz-chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--hairline-strong); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-1); }
.wiz-chip.on { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); }

.tender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 16px 0 4px; }
.tender { display: flex; align-items: center; gap: 12px; padding: 16px 15px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface); text-align: left; }
.tender:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-wash); }
.tender:disabled { opacity: .38; cursor: not-allowed; }
.tender.wide { grid-column: 1 / -1; }
.tender.guest { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); }
.tender .glyph { font-size: 20px; }
.tn { font-size: 14px; font-weight: 620; display: block; }
.ts { font-size: 11.5px; color: var(--text-2); display: block; margin-top: 2px; }
.why { display: block; font-size: 11px; color: var(--crit); margin-top: 3px; font-weight: 650; }

.interco { padding: 13px 14px; border-radius: var(--r-md); background: var(--warn-wash); font-size: 12px; line-height: 1.55; margin-top: 14px; }
.interco b { color: var(--warn); display: block; margin-bottom: 4px; }
.interco .flow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.interco .ent { padding: 3px 8px; border-radius: 5px; background: var(--surface-3); color: var(--text); }

.btn-primary { width: 100%; height: 50px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-size: 15.5px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ghost { width: 100%; height: 44px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong); font-size: 14px; font-weight: 600; color: var(--text-2); margin-top: 8px; }

.done { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 40px 24px 34px; }
.done-ring { width: 74px; height: 74px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; color: var(--surface); font-size: 34px; animation: popin .46s var(--ease) both; }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.done h3 { margin: 0; font-size: 20px; font-weight: 700; }
.done p { margin: 0; font-size: 13.5px; color: var(--text-2); text-align: center; line-height: 1.55; max-width: 34ch; }
.pass { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 6px 10px; border-radius: 6px; margin-top: 4px; }

.err { background: var(--crit-wash); color: var(--crit); padding: 12px 14px; border-radius: var(--r-md); font-size: 12.5px; line-height: 1.5; margin: 14px 0 4px; }

.list-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.list-row:last-child { border-bottom: none; }
.list-row .nm { flex: 1; font-weight: 550; }
.list-row .vl { font-weight: 600; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  /* The depth cue stays — only the movement goes. */
  :root { --key-travel: 0px; }
}

/* ------------------------------ receipt ------------------------------ */
.rcpt { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; padding: 4px 2px 10px; }
.rcpt .rc-head { text-align: center; padding-bottom: 10px; border-bottom: 1px dashed var(--hairline-strong); }
.rcpt .rc-head .biz { font-family: var(--serif); font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.rcpt .rc-head .meta { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.rcpt .rc-void { color: var(--crit); font-weight: 700; letter-spacing: .1em; margin-top: 6px; }
.rcpt .rc-line { display: flex; gap: 8px; padding: 5px 0; }
.rcpt .rc-line .q { width: 26px; flex: none; }
.rcpt .rc-line .n { flex: 1; }
.rcpt .rc-line .n em { display: block; font-style: normal; font-size: 11px; color: var(--text-2); padding-left: 6px; }
.rcpt .rc-line .a { text-align: right; white-space: nowrap; }
.rcpt .rc-tot { border-top: 1px dashed var(--hairline-strong); margin-top: 8px; padding-top: 8px; }
.rcpt .rc-tot .row { display: flex; justify-content: space-between; }
.rcpt .rc-tot .grand { font-size: 16px; font-weight: 700; margin-top: 4px; }
.rcpt .rc-tender { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--hairline-strong); }
.rcpt .rc-foot { text-align: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--hairline-strong); font-size: 11px; color: var(--text-2); }
.rcpt .rc-kt { text-align: center; font-size: 20px; font-weight: 800; margin: 8px 0; }
.rcpt .rc-pass { font-size: 11px; text-align: center; padding: 2px 0; }

/* Browser print → an 80mm thermal roll. Everything but the receipt is dropped. */
@media print {
  body * { visibility: hidden !important; }
  .rcpt, .rcpt * { visibility: visible !important; }
  .rcpt {
    position: absolute; left: 0; top: 0; width: 76mm;
    color: #000; background: #fff; font-size: 11px;
  }
  .rcpt .rc-head, .rcpt .rc-tot, .rcpt .rc-tender, .rcpt .rc-foot { border-color: #999 !important; }
  .scrim { position: static !important; background: none !important; backdrop-filter: none !important; }
  .sheet { box-shadow: none !important; max-height: none !important; }
  .sheet-head, .sheet-foot, .grabber { display: none !important; }
}

/* ---------------------------- key feel ------------------------------ */
/* Rest on a hard bottom edge; on press the edge collapses and the surface
   sinks into it. 70ms down / 120ms up — down must feel instant, up can ease. */
.tile, .pay, .btn-primary, .tender, .chip, .key, .cfg, .opt-row, .bump,
.step, .mode, .btn-ghost, .pill {
  box-shadow: var(--key-rest);
  transform: translateY(0);
  /* ONLY the press animates. Colour must switch instantly, or every button
     crossfades when the theme flips — slow, and it can strand a control
     mid-transition showing the wrong palette. */
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tile:active, .pay:active:not(:disabled), .btn-primary:active:not(:disabled),
.tender:active:not(:disabled), .chip:active, .key:active, .cfg:active,
.opt-row:active, .bump:active, .step:active, .mode:active,
.btn-ghost:active, .pill:active {
  transform: translateY(var(--key-travel));
  box-shadow: var(--key-press);
  transition-duration: 70ms;
}
.pay:disabled, .btn-primary:disabled, .tender:disabled {
  box-shadow: none;
}

/* ------------------------- phone register (≤640px) ------------------- */
/* The three-pane register collapses to one column: tabs scroll across the
   top, products fill the screen, and the cart is a slide-up sheet reached
   from a floating "review & pay" bar. Desktop/tablet are untouched. */
.cartbar, .cart-scrim, .cart-close { display: none; }

@media (max-width: 640px) {
  .topbar { gap: 9px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .topbar::-webkit-scrollbar { display: none; }
  .topbar .linkish { display: none; }             /* Portal/Kitchen/Back office move off the till screen */
  .wordmark { padding-right: 9px; }
  .station-name, .station-sub { white-space: nowrap; }
  .spacer { flex: 0 0 2px; }
  .pill { flex: none; }

  .body { flex-direction: column; }

  /* Tab rail → horizontal scroller */
  .rail {
    width: auto; flex-direction: row; gap: 4px; overflow-x: auto; padding: 7px 10px;
    border-right: none; border-bottom: 1px solid var(--hairline);
    background: var(--surface); scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-gap { display: none; }
  .mode { flex: none; flex-direction: row; gap: 7px; padding: 8px 13px; }
  .mode-name { font-size: 12px; }
  .mode-glyph { font-size: 16px; }
  .mode.active::after {
    left: 10px; right: 10px; top: auto; bottom: -1px; transform: none;
    width: auto; height: 3px; border-radius: 3px 3px 0 0;
  }

  .canvas { flex: 1 1 auto; min-height: 0; }
  .canvas-head { padding: 12px 14px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }

  /* Cart → bottom sheet */
  .order {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 88vh;
    z-index: 60; border-left: none; border-top: 1px solid var(--hairline);
    border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(101%); transition: transform .33s var(--ease); padding-top: 12px;
  }
  .app.cart-open .order { transform: translateY(0); }
  .order::before {
    content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 3px; background: var(--hairline-strong);
  }

  .cart-scrim {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .app.cart-open .cart-scrim { opacity: 1; pointer-events: auto; }

  .cart-close {
    display: grid; place-items: center; position: fixed; z-index: 61; right: 14px;
    top: calc(12vh + 10px); width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-3); color: var(--text-2); font-size: 17px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .app.cart-open .cart-close { opacity: 1; pointer-events: auto; }

  /* Floating review-&-pay bar (only when the cart has items and the sheet is shut) */
  .cartbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 45; height: 56px; border-radius: var(--r-lg); background: var(--accent);
    color: var(--accent-ink); align-items: center; gap: 12px; padding: 0 16px; box-shadow: var(--shadow-lg);
  }
  .cartbar:not([hidden]) { display: flex; }
  .app.cart-open .cartbar { display: none; }
  .cartbar-count {
    min-width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.22);
    display: grid; place-items: center; font-size: 13px; font-weight: 700; padding: 0 6px;
  }
  .cartbar-label { flex: 1; font-size: 15px; font-weight: 650; }
  .cartbar-total { font-size: 16px; font-weight: 700; }
}
