/* The till. Dark, calm, big targets: the café is dim and the cashier is fast. */
.pos { height: 100dvh; display: grid; grid-template-columns: 236px minmax(0, 1fr) 408px; grid-template-rows: auto 64px minmax(0, 1fr); }
.pos > .banner { grid-column: 1 / -1; grid-row: 1; }
.pos > .top { grid-row: 2; } .pos > .rail, .pos > .grid-wrap, .pos > .ticket { grid-row: 3; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); min-width: 0; }
.top .sep { width: 1px; height: 28px; background: var(--line); }
.top .chip { min-height: 40px; }
.top .who { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); height: 44px; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.top .who i { width: 28px; height: 28px; border-radius: 50%; background: var(--caramel); color: var(--roast); display: grid; place-items: center; font: 600 13px var(--font-ui); font-style: normal; }

.rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cats { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); flex: 1 1 auto; min-height: 0; }
.cat { min-height: var(--touch); padding: 0 var(--s4); border-radius: var(--r-btn); text-align: left; font-weight: 500; display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); }
.cat.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--caramel); }
.corner { padding: var(--s3); border-top: 1px solid var(--line); }

.grid-wrap { padding: var(--s4); min-height: 0; display: flex; flex-direction: column; gap: var(--s3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--s3); align-content: start; }
.tile { position: relative; min-height: 104px; padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s2); transition: background .15s ease-out, transform .12s ease-out; }
.tile:active { background: var(--surface-2); transform: scale(.98); }
.tile b { font-weight: 500; line-height: 1.2; }
.tile span { color: var(--text-soft); font-size: 15px; font-variant-numeric: tabular-nums; }
.tile.out { opacity: .45; }
.tile.out::after { content: 'SOLD OUT'; position: absolute; top: var(--s3); right: var(--s3); font: 600 11px/1 var(--font-ui); letter-spacing: .1em; color: var(--warn); }
.tile.pop { animation: pop .25s ease-out; }
@keyframes pop { 40% { background: var(--caramel); color: var(--roast); } }
.mode86 .tile { border-style: dashed; border-color: var(--warn); }

.ticket { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.ticket .head { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s3); border-bottom: 1px solid var(--line); }
.member { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-btn); background: var(--surface-2); min-height: var(--touch); width: 100%; text-align: left; }
.member .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--caramel); color: var(--roast); display: grid; place-items: center; font-weight: 600; flex: none; }
.member.empty { border: 1px dashed var(--line); background: transparent; color: var(--text-soft); justify-content: center; }
.lines { flex: 1 1 auto; min-height: 0; padding: var(--s2) 0; }
.line { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s2); padding: var(--s3) var(--s4); text-align: left; align-items: start; border-bottom: 1px solid var(--line); }
.line:active { background: var(--surface-2); }
.line .q { font-weight: 600; color: var(--caramel); font-variant-numeric: tabular-nums; }
.line .mods { color: var(--text-soft); font-size: 15px; line-height: 1.3; margin-top: 2px; }
.line .mods em { font-style: normal; color: var(--oat); }
.empty-ticket { height: 100%; display: grid; place-items: center; text-align: center; color: var(--text-soft); padding: var(--s6); }
.totals { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.totals .row { justify-content: space-between; }
.totals .reward { color: var(--oat); }
.totals .grand { font-size: 22px; font-weight: 600; padding-top: 6px; }
.actions { padding: var(--s3) var(--s4) var(--s4); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s2); }
.actions .charge { grid-column: 1 / -1; min-height: 72px; font-size: 22px; justify-content: space-between; padding: 0 var(--s5); }
.slot-box:empty { display: none; }
.slot-box { padding: 0 var(--s4) var(--s3); }

/* item sheet */
.opt-group { display: flex; flex-direction: column; gap: var(--s2); }
.opt-group .chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.stepper { display: inline-flex; align-items: center; gap: var(--s3); }
.stepper b { min-width: 32px; text-align: center; font-size: 22px; font-variant-numeric: tabular-nums; }

/* pay sheet */
.pay { display: grid; grid-template-columns: 1fr 360px; gap: var(--s5); }
.pay .due { margin: 4px 0 8px; font: 400 64px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pay .keypad button { height: 54px; }
.pay .col { gap: var(--s2); }
.pay .amount { height: 60px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; justify-content: flex-end; padding: 0 var(--s4); font: 500 32px var(--font-ui); font-variant-numeric: tabular-nums; }
.lucky { border-radius: var(--r-card); padding: var(--s4); background: var(--caramel); color: var(--roast); font-weight: 600; text-align: center; animation: glow 1.2s ease-in-out 3; }
@keyframes glow { 50% { background: var(--crema); } }
.paid-big { font: 400 88px/1 var(--font-display); }

/* orders drawer */
.tabs { display: flex; gap: var(--s2); }
.order-lines { display: flex; flex-direction: column; gap: var(--s2); }
.order-lines > div { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--s2); }

/* receipt (also what the printer gets through the browser for now) */
.receipt { width: 72mm; margin: 0 auto; background: #fff; color: #000; padding: 6mm 4mm; font: 400 12px/1.35 var(--font-ui); border-radius: 6px; }
.receipt .c { text-align: center; } .receipt .big { font: 400 30px/1.1 var(--font-display); }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt .r { display: flex; justify-content: space-between; gap: 8px; } .receipt .sm { font-size: 11px; color: #222; padding-left: 14px; }
.receipt b { font-weight: 600; }
@media print { .receipt { border-radius: 0; margin: 0; } @page { size: 80mm auto; margin: 0; } }

@media (max-width: 1100px) { .pos { grid-template-columns: 180px minmax(0, 1fr) 360px; } .top .hide-narrow { display: none; } }
