/* THE CUSTOMER'S ORDERING PAGE (POS-21, 2026-10-07): order.cycatel.com/<restaurant>.
   A phone first, like an app: the page itself never scrolls or zooms, its bars stay, one part in the middle scrolls.
   Flat. The restaurant's own colour is --brand (app.js sets it). No text is ever cut with dots: words wrap.
   Every key is 44 px or more. The look is the POS kit's (betapos/kit.css tokens). */
:root { --bg: #f6f5f2; --surface: #fff; --sunken: #efede8; --ink: #15201b; --ink2: #38443e; --muted: #5f6a63; --line: #e4e1d9; --line2: #d0ccc2;
  --brand: #15201b; --onbrand: #fff; --ok: #0a7040; --okBg: #e1f3e8; --warn: #87480a; --warnBg: #fdf1de; --bad: #a5251d; --badBg: #fbeae8; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }
body { background: var(--bg); color: var(--ink); font: 16px/1.35 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif; letter-spacing: -.006em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, p { margin: 0; }
svg { display: block; flex-shrink: 0; }
.hide { display: none !important; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.loading, .whole { margin: auto; padding: 24px; text-align: center; color: var(--muted); }
.whole h1 { color: var(--ink); font-size: 22px; font-weight: 650; margin-bottom: 6px; }

/* bars that stay */
.bar { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 10px; }
.bar.row { flex-direction: row; align-items: center; gap: 8px; }
.bar h1 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.brandrow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brandrow .bt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.logo.mark { display: flex; align-items: center; justify-content: center; background: var(--brand); color: var(--onbrand); border: 0; font-weight: 650; font-size: 18px; }
.sub { font-size: 14px; color: var(--muted); }
.sub b { font-weight: 600; }
.sub.open b { color: var(--ok); }
.sub.shut b { color: var(--bad); }
.how { font-size: 14px; color: var(--muted); }
.off { font-size: 15px; font-weight: 500; color: var(--warn); background: var(--warnBg); border-radius: 12px; padding: 10px 12px; }
.back { height: 44px; min-width: 44px; padding: 0 12px 0 6px; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; font-size: 16px; font-weight: 500; color: var(--ink2); border-radius: 10px; flex-shrink: 0; }
.foot { flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* the one part that scrolls */
.scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wrap { flex: 1 1 0; min-height: 0; display: flex; }
.side { display: none; }
.col { max-width: 680px; margin: 0 auto; padding: 14px 16px 22px; display: flex; flex-direction: column; gap: 12px; }

/* keys */
.btn { height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center; line-height: 1.15; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--onbrand); }
.btn.big { min-height: 54px; height: auto; padding: 8px 18px; font-size: 17px; font-weight: 600; }
.btn.block { display: flex; width: 100%; }
.btn.quiet { border-color: transparent; background: none; color: var(--ink2); }
.btn[disabled] { opacity: .45; }
.btn.busy { opacity: .7; pointer-events: none; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 13px; background: var(--sunken); }
.seg > button { min-height: 44px; padding: 4px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 550; }
.seg > .on { background: var(--surface); color: var(--ink); }
.step { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); overflow: hidden; flex-shrink: 0; }
.step > button { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink2); }
.step > span { min-width: 38px; height: 44px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* the menu */
/* (the sections wrap onto a second row; they never slide off the edge of the screen half-shown) */
.chips { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink2); font-size: 15px; font-weight: 550; white-space: nowrap; flex-shrink: 0; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--onbrand); }
.sec h2 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; padding: 18px 16px 8px; }
.dish { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 76px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: var(--surface); text-align: left; }
.sec .dish:last-child { border-bottom: 1px solid var(--line); }
.dtxt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dname { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.ddesc { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.dfoot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.dprice { font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; }
.dcount { font-size: 13px; font-weight: 600; color: var(--ok); background: var(--okBg); border-radius: 8px; padding: 2px 8px; }
.dimg { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sunken); flex-shrink: 0; }
.dplus { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; background: var(--surface); }
.menuend { height: 18px; }

/* cards, lines, sums */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 17px; font-weight: 650; }
.line { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; padding-top: 0; }
.line:last-child { padding-bottom: 0; }
.lrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lrow.mid { align-items: center; }
.lname { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.lqty { color: var(--muted); font-weight: 500; }
.lpicks { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.lprice { font-weight: 550; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink2); }
.kv span:last-child { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.kv.total { font-size: 18px; font-weight: 650; color: var(--ink); padding-top: 10px; border-top: 1px solid var(--line); }
.sums { display: flex; flex-direction: column; gap: 6px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 550; color: var(--ink2); }
.field input, .field textarea { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--ink); font-size: 16px; font-weight: 500; width: 100%; min-width: 0; outline: none; }
.field input:focus { border-color: var(--brand); }
.field input.err { border-color: var(--bad); background: var(--badBg); }
.pair { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.ferr { font-size: 14px; color: var(--bad); font-weight: 500; margin-top: -4px; }
.msg { font-size: 15px; color: var(--muted); min-height: 0; }
.msg.bad { color: var(--bad); font-weight: 550; }
.note { font-size: 14px; color: var(--muted); }
.cardbox { min-height: 52px; padding: 15px 14px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; }
.cardbox.wait { border-style: dashed; background: var(--bg); color: var(--muted); font-size: 15px; padding: 14px; }
.cardbox.StripeElement--focus { border-color: var(--brand); }
.cardbox.StripeElement--invalid { border-color: var(--bad); }
.cardbox input.standin { width: 100%; height: 44px; margin: -11px 0; border: 0; outline: none; background: none; font-size: 16px; }

/* a dish with choices: a sheet from the foot of the screen */
.sheetwrap { position: absolute; inset: 0; background: rgba(10, 22, 16, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.sheet { width: 100%; max-width: 560px; max-height: 92%; background: var(--surface); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; min-height: 0; }
.sheet .top { flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 16px 10px; }
.sheet .top h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sheet .top p { font-size: 14px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.xkey { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheet .mid { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 16px; }
.sheet .end { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet .end .btn { flex: 1 1 0; }
.grp { display: flex; flex-direction: column; gap: 8px; }
.ghead { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.ghead b { font-size: 16px; font-weight: 650; }
.rule { font-size: 13px; font-weight: 550; color: var(--ink2); background: var(--sunken); border-radius: 8px; padding: 3px 9px; }
.rule.need { color: var(--warn); background: var(--warnBg); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); text-align: left; }
.opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt .oname { flex: 1 1 0; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.opt .oadd { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--onbrand); }
.tick.round { border-radius: 11px; }
.opt.on .tick { background: var(--brand); border-color: var(--brand); }
.opt.on .tick.round { background: var(--surface); border-width: 6px; }

/* the order is in */
.in h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.in .when { font-size: 17px; color: var(--ink2); margin-top: 4px; }
.okmark { width: 52px; height: 52px; border-radius: 26px; background: var(--okBg); color: var(--ok); display: flex; align-items: center; justify-content: center; }

/* a tablet or a laptop: the menu and the order side by side; the checkout stays one column in the middle */
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; width: 380px; flex-shrink: 0; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
  .side .shead { flex-shrink: 0; padding: 16px 18px 8px; font-size: 18px; font-weight: 650; }
  .side .sbody { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 4px 18px 12px; }
  .side .sfoot { flex-shrink: 0; padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
  .side .empty { color: var(--muted); padding: 8px 0; }
  .cartbar { display: none !important; }
  .sheetwrap { align-items: center; }
  .sheet { border-radius: 20px; max-height: 88%; }
  .bar.top { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .bar.top .seg { width: 300px; }
  .dish { padding-left: 24px; padding-right: 24px; }
  .sec h2 { padding-left: 24px; }
  .chips { padding-left: 24px; }
}
@media (min-width: 900px) { .checkout .foot > .btn { max-width: 648px; margin: 0 auto; } }      /* the Pay key is as wide as the column it pays for */

/* ── POS-24 (2026-10-07): the delivery address. Streets are listed under the box while it is typed, in the page's
   own flow (a phone's keyboard covers half the screen: nothing floats); the picked address is its own block with
   the zone's answer under it. Nothing is cut with dots. */
.sugs { display: flex; flex-direction: column; }
.sugs:empty { display: none; }
.sug { display: flex; flex-direction: column; gap: 1px; min-height: 52px; padding: 9px 2px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-size: 16px; color: var(--ink); justify-content: center; }
.sug:active { background: var(--sunken); }
.sug > b { font-weight: 600; }
.sug > span { font-size: 14px; color: var(--muted); }
.sugnone { padding: 10px 2px 0; font-size: 14px; color: var(--muted); }
.picked { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; }
.picked .where { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.picked .where > b { font-size: 17px; font-weight: 600; }
.picked .where > span { font-size: 15px; color: var(--muted); }
.picked .zone { grid-column: 1 / -1; font-size: 15px; font-weight: 500; color: var(--muted); }
.picked .zone.ok { color: var(--ok); }
.picked .zone.bad { color: var(--bad); }
.btn.small { height: 44px; padding: 0 14px; font-size: 15px; }
[data-addr] [data-find], [data-addr] [data-more] { display: flex; flex-direction: column; gap: 10px; }
[data-addr] [data-more] { margin-top: 2px; }
