/* The George — order at table · brand tokens + iOS-style components */
:root {
  --navy: #142B40;
  --cream: #F5EFE4;
  --gold: #B89A5E;
  --orange: #A94F2E;
  --ink: #202428;
  --muted: #5A6069;
  --faint: #7A8088;
  --hair: rgba(20, 43, 64, 0.12);
  --card: #FFFFFF;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--navy); }
body { font-family: var(--sans); font-size: 17px; line-height: 1.35; color: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:active { opacity: .7; }
input, textarea { font: inherit; color: inherit; }
textarea { resize: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* phone frame on desktop, full-bleed on a phone */
#app { position: relative; margin: 0 auto; width: 100%; max-width: 430px; height: 100dvh; background: var(--cream); overflow: hidden; }
@media (min-width: 600px) { #app { height: min(100dvh, 932px); margin-top: calc((100dvh - min(100dvh, 932px)) / 2); border-radius: 0; box-shadow: 0 30px 80px rgba(0,0,0,.4); } }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--cream); }
.screen.dark { background: var(--navy); color: var(--cream); }
.scroll { flex: 1 1 0; overflow-y: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { display: none; }
.hscroll { overflow-x: auto; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.pad { padding-left: 20px; padding-right: 20px; }
.safe-top { padding-top: calc(var(--safe-top) + 12px); }
.safe-bottom { padding-bottom: calc(var(--safe-bottom) + 12px); }

/* nav */
.nav { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.nav .brand { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--navy); padding-left: 8px; }
.back { height: 44px; display: flex; align-items: center; gap: 2px; color: var(--navy); font-size: 17px; padding-right: 10px; }
.pill { height: 32px; padding: 0 12px 0 14px; border-radius: 16px; background: var(--card); border: 1px solid rgba(184,154,94,.55); color: var(--navy); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
h1.title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.1; color: var(--navy); }
h1.title.sm { font-size: 30px; }
.sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #7D6534; }
.screen.dark .eyebrow { color: var(--gold); }

/* search */
.search { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.search .field { flex: 1 1 0; min-width: 0; height: 38px; border-radius: 11px; background: rgba(20,43,64,.08); display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.search .ico { color: var(--faint); display: flex; flex: none; }
.search input { flex: 1 1 0; min-width: 0; width: 100%; height: 100%; border: 0; outline: none; background: transparent; font-size: 17px; padding: 0; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; }
.search .clear { width: 20px; height: 20px; border-radius: 10px; background: rgba(20,43,64,.35); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.search .cancel { color: var(--navy); font-size: 17px; height: 38px; flex: none; }
.search.active .field { background: #fff; box-shadow: inset 0 0 0 1px rgba(20,43,64,.15); }

/* segmented control + chips */
.seg { display: flex; background: rgba(20,43,64,.08); border-radius: 10px; padding: 2px; margin-top: 14px; }
.seg button { flex: 1 1 0; height: 32px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(20,43,64,.18); }
.chips { display: flex; gap: 8px; padding: 12px 20px 6px; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 600; white-space: nowrap; background: #fff; color: var(--navy); border: 1px solid rgba(20,43,64,.15); }
.chip.on { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* cards & rows */
.card { background: var(--card); border-radius: 14px; border: 1px solid rgba(20,43,64,.08); overflow: hidden; }
.row { display: flex; align-items: stretch; }
.row + .row { border-top: 1px solid var(--hair); }
h2.section { margin: 0 0 10px; font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--navy); }
.item-main { flex: 1 1 0; min-width: 0; padding: 14px 8px 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.item-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(20,43,64,.06); }
.item-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item-name { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--navy); }
.item-desc { font-size: 14px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-price { font-size: 15px; font-weight: 700; color: var(--navy); padding-top: 2px; }
.item-add { display: flex; align-items: center; padding: 0 12px 0 4px; }
.item-add button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.item-add span { width: 32px; height: 32px; border-radius: 16px; border: 1.5px solid var(--navy); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #7D6534; border: 1px solid rgba(184,154,94,.8); border-radius: 4px; padding: 1px 5px; }

/* buttons */
.btn { height: 54px; border-radius: 14px; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.btn.primary { background: var(--navy); color: var(--cream); }
.btn.cream { background: var(--cream); color: var(--navy); }
.btn.outline { border: 1.5px solid rgba(20,43,64,.3); color: var(--navy); font-weight: 600; }
.screen.dark .btn.outline { border-color: rgba(245,239,228,.55); color: var(--cream); }
.btn.black { background: #000; color: #fff; }
.btn.split { justify-content: space-between; padding: 0 18px; }
.btn:disabled { background: rgba(20,43,64,.18); color: rgba(20,43,64,.5); }
.btn.sm { height: 44px; font-size: 15px; border-radius: 12px; width: auto; padding: 0 22px; }
.link { height: 44px; color: var(--navy); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* sticky footer */
.footer { padding: 12px 20px calc(var(--safe-bottom) + 12px); background: var(--cream); border-top: 1px solid rgba(20,43,64,.1); display: flex; gap: 12px; align-items: center; }
.stepper { height: 54px; border-radius: 14px; background: #fff; border: 1px solid var(--hair); display: flex; align-items: center; flex: none; }
.stepper button { width: 44px; height: 54px; display: flex; align-items: center; justify-content: center; color: var(--navy); }
.stepper .n { width: 28px; text-align: center; font-size: 17px; font-weight: 700; color: var(--navy); }
.stepper.sm { height: 36px; border-radius: 10px; background: var(--cream); }
.stepper.sm button { width: 36px; height: 36px; }
.stepper.sm .n { width: 22px; font-size: 15px; }

/* option rows */
.opt { width: 100%; min-height: 52px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.mark { width: 22px; height: 22px; border-radius: 11px; flex: none; border: 1.5px solid rgba(20,43,64,.35); display: flex; align-items: center; justify-content: center; }
.mark.sq { border-radius: 6px; }
.mark.on { background: var(--navy); border-color: var(--navy); }
.opt .name { flex: 1 1 0; font-size: 16px; color: var(--ink); }
.opt .price { font-size: 15px; font-weight: 600; color: var(--muted); }
.group-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 10px; }
.group-head .name { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--navy); }
.group-head .hint { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--faint); }
.group-head .hint.req { color: var(--orange); }

/* basket bar & tab bar */
.basket-bar { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 61px); }
.basket-bar button { width: 100%; height: 56px; border-radius: 16px; background: var(--navy); color: var(--cream); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; box-shadow: 0 10px 28px rgba(20,43,64,.28); font-weight: 700; font-size: 16px; }
.basket-bar .count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--cream); color: var(--navy); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; }
.tabs { position: absolute; left: 0; right: 0; bottom: 0; height: calc(49px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: rgba(245,239,228,.96); border-top: 1px solid var(--hair); display: flex; backdrop-filter: blur(20px); }
.tabs button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #6B7075; position: relative; }
.tabs button.on { color: var(--navy); }
.tabs span { font-size: 10px; font-weight: 600; }
.tabs .dot { position: absolute; top: 4px; left: 50%; margin-left: 8px; width: 8px; height: 8px; border-radius: 4px; background: var(--orange); }

/* keypad */
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; justify-items: center; padding: 0 44px; }
.key { width: 76px; height: 76px; border-radius: 38px; background: #fff; border: 1px solid var(--hair); font-size: 30px; font-weight: 500; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.key.bare { background: none; border: 0; }
.table-display { width: 160px; height: 96px; border-radius: 16px; background: #fff; border: 1px solid rgba(184,154,94,.5); display: flex; align-items: center; justify-content: center; margin: 24px auto 0; font-family: var(--serif); font-weight: 700; font-size: 52px; color: var(--navy); }

/* dish sheet */
.hero { position: relative; height: 300px; background: var(--navy); display: flex; align-items: flex-end; justify-content: center; padding: 0 20px 20px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .frame { width: 100%; height: 200px; border: 1px solid rgba(245,239,228,.45); display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(245,239,228,.65); font-size: 13px; line-height: 1.4; padding: 0 30px; }
.hero .close { position: absolute; right: 16px; top: calc(var(--safe-top) + 12px); width: 32px; height: 32px; border-radius: 16px; background: rgba(245,239,228,.18); color: var(--cream); display: flex; align-items: center; justify-content: center; z-index: 2; }
.hero .grab { position: absolute; left: 50%; top: 8px; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(245,239,228,.5); z-index: 2; }
.note-card { background: #fff; border-radius: 14px; border: 1px solid rgba(20,43,64,.08); padding: 12px 16px; }
.note-card label { display: block; font-size: 12px; color: var(--faint); padding-bottom: 4px; }
.note-card textarea, .note-card input { width: 100%; border: 0; outline: none; background: transparent; font-size: 16px; line-height: 1.4; padding: 0; }

/* summary */
.summary { border-top: 1px solid rgba(184,154,94,.6); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.summary .total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; color: var(--navy); padding-top: 4px; }
.summary .fine { font-size: 13px; color: var(--faint); }

/* toggle */
.toggle { width: 51px; height: 31px; border-radius: 16px; flex: none; position: relative; background: rgba(20,43,64,.2); transition: background .2s; }
.toggle.on { background: var(--navy); }
.toggle i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }
.toggle.on i { left: 22px; }

/* payments */
#card-container { min-height: 90px; }
#apple-pay-button { height: 48px; border-radius: 12px; display: none; -webkit-appearance: -apple-pay-button; appearance: -apple-pay-button; -apple-pay-button-type: plain; -apple-pay-button-style: black; }
#google-pay-button { min-height: 48px; display: none; }
.pay-divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--faint); margin: 14px 0 10px; }
.pay-divider::before, .pay-divider::after { content: ""; flex: 1 1 0; height: 1px; background: var(--hair); }

/* timeline */
.timeline { border: 1px solid rgba(245,239,228,.3); border-radius: 16px; padding: 18px 18px 6px; margin-top: 28px; }
.step { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.step .ring { width: 24px; height: 24px; border-radius: 12px; border: 2px solid rgba(245,239,228,.35); flex: none; display: flex; align-items: center; justify-content: center; }
.step.done .ring { background: var(--cream); border-color: var(--cream); }
.step.now .ring { border-color: var(--gold); }
.step.now .ring i { width: 8px; height: 8px; border-radius: 4px; background: var(--gold); }
.step .label { flex: 1 1 0; display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; font-weight: 600; color: rgba(245,239,228,.6); }
.step.done .label, .step.now .label { color: var(--cream); }
.step.now .label { color: var(--gold); }
.step .label small { font-size: 13px; font-weight: 400; color: rgba(245,239,228,.6); }
.step:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: rgba(245,239,228,.25); }
.step:last-child { padding-bottom: 12px; }
.receipt { margin-top: 20px; }
.receipt .line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; color: rgba(245,239,228,.85); border-top: 1px solid rgba(245,239,228,.14); }
.receipt .total { display: flex; justify-content: space-between; padding: 10px 0; font-size: 17px; font-weight: 700; border-top: 1px solid rgba(245,239,228,.14); }

/* misc */
.empty { padding: 80px 32px 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.empty .h { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--navy); }
.empty p { margin: 0; font-size: 15px; color: var(--muted); }
.toast { position: absolute; left: 20px; right: 20px; top: calc(var(--safe-top) + 14px); background: var(--navy); color: var(--cream); border-radius: 12px; padding: 12px 16px; font-size: 15px; box-shadow: 0 10px 28px rgba(20,43,64,.3); z-index: 20; opacity: 0; transform: translateY(-8px); transition: all .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--orange); }
.spinner { width: 22px; height: 22px; border-radius: 11px; border: 2px solid rgba(245,239,228,.3); border-top-color: var(--cream); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
