/* The guest's ordering page. Styled to sit inside 17 Restaurant's site: black
   ground, charcoal cards, gold serif titles, orange pills. */
:root {
  --bg: #000000;
  --card: #1b1b17;
  --card-2: #23231e;
  --line: #454a38;
  --ink: #ece9df;
  --muted: #a9a79f;
  --gold: #cfae58;
  --orange: #f18006;
  --orange-2: #ff9a2e;
  --error: #ff7a6b;
  --serif: 'Cormorant Garamond', 'Minion Pro', Georgia, serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }
.app { max-width: 1200px; margin: 0 auto; padding: 16px 16px 96px; }

.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 68px; width: auto; max-width: 120px; object-fit: contain; background: transparent; border-radius: 0; flex: none; }
@media (max-width: 480px) { .brand-logo { height: 54px; max-width: 96px; } }
.brand h1 { font-family: var(--serif); font-weight: 600; color: var(--gold); font-size: clamp(26px, 4vw, 38px); margin: 0; line-height: 1.1; }
.status { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.status.closed { color: var(--orange-2); }

.pill { font: inherit; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; border: 0; border-radius: 999px;
  padding: 10px 18px; background: var(--card-2); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; }
.pill:hover { background: #2c2c26; }
.pill:active { transform: translateY(1px); }
.pill.active, .pill.primary { background: var(--orange); color: #000; }
.pill.primary:hover { background: var(--orange-2); }
.pill.big { font-size: 15px; padding: 14px 22px; }
.pill.wide { width: 100%; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
.mode { display: flex; gap: 8px; }
.mode.inline { margin: 0 0 16px; }

.search-wrap { display: flex; justify-content: center; margin: 8px 0 16px; }
.search { width: min(560px, 100%); font: inherit; font-size: 16px; padding: 14px 20px; border-radius: 14px; border: 1px solid #2a2a25; background: var(--card); color: var(--ink); text-align: center; }
.search::placeholder { color: var(--muted); }
.search:focus { outline: 2px solid var(--orange); outline-offset: 1px; }

.cats { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
.cats .pill { background: var(--orange); color: #000; opacity: .82; }
.cats .pill.active, .cats .pill:hover { opacity: 1; }
.cats-rule { height: 4px; background: #14140f; border-radius: 4px; margin-bottom: 20px; overflow: hidden; }
.cats-rule i { display: block; height: 100%; width: 0; background: #b8630a; border-radius: 4px; transition: width .2s; }

.section { margin: 0 0 28px; scroll-margin-top: 76px; }
.section h2 { font-family: var(--serif); color: var(--gold); font-weight: 600; font-size: 26px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.card { display: grid; grid-template-columns: 1fr 96px; gap: 12px; align-items: start; background: var(--card); border: 1px solid #23231d; border-radius: 18px; padding: 16px; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: border-color .15s, background .15s; }
.card:hover, .card:focus-visible { border-color: #3a3a31; background: #1f1f1a; outline: none; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--gold); margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .price { margin-top: 8px; color: var(--ink); font-weight: 700; }
.card .thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: #14140f; }
.card .thumb.ph { display: grid; place-items: center; color: #3b3b33; font-family: var(--serif); font-size: 36px; }
.card .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); background: rgba(241,128,6,.12); padding: 2px 8px; border-radius: 6px; margin: 4px 0; }
.card.nophoto { grid-template-columns: 1fr; }

.allergy { color: var(--muted); font-size: 13px; text-align: center; margin: 32px 0 0; }

.cart-fab { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; border: 0; border-radius: 999px; padding: 16px 26px; background: var(--orange); color: #000; font: inherit; font-weight: 700; font-size: 16px; box-shadow: 0 10px 30px rgba(241,128,6,.35); cursor: pointer; }
.cart-fab:hover { background: var(--orange-2); }

/* sheets */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
dialog.sheet::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(2px); }
.sheet-body { position: relative; width: min(560px, 100%); max-height: 100vh; overflow-y: auto; margin: 0 auto; background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 20px 20px 28px; }
@media (min-width: 640px) { dialog.sheet { display: grid; place-items: center; } .sheet-body { border-radius: 22px; max-height: 92vh; } }
dialog.sheet:not([open]) { display: none; }
.sheet-body h2 { color: var(--gold); font-size: 28px; margin: 4px 40px 6px 0; }
.sheet-body .center { text-align: center; }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet-photo { margin: -20px -20px 14px; height: 200px; background: #14140f center/cover no-repeat; border-radius: 22px 22px 0 0; }
.sheet-photo.ph { display: grid; place-items: center; font-family: var(--serif); font-size: 64px; color: #3b3b33; background: linear-gradient(160deg, #1f1f19, #121210); }
.sheet-photo.tall { height: 300px; }
.showcase-story { font-size: 17px; line-height: 1.6; color: var(--ink); margin: 8px 0 16px; }
.showcase-story p { margin: 0 0 10px; }
.showcase-desc { font-size: 17px; line-height: 1.55; color: var(--ink); margin: 6px 0 14px; }
.showcase-price { font-family: var(--serif); font-size: 30px; color: var(--gold); margin: 0 0 18px; }
.sheet-body h2.small { font-size: 22px; margin-bottom: 2px; }

.group { margin: 14px 0; padding-top: 12px; border-top: 1px solid #2a2a24; }
.group h3 { font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.group h3 .req { color: var(--orange); font-size: 11px; }
.group h3 .req.ok { color: #7fc48a; }
.opt { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.opt:hover { background: var(--card-2); }
.opt input { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; flex: none; }
.opt .n { flex: 1; }
.opt .p { color: var(--muted); font-size: 14px; }

.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid #2f2f28; background: #121210; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips .pill { padding: 8px 14px; }

.sheet-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.qty { display: flex; align-items: center; background: var(--card-2); border-radius: 999px; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.sheet-actions .pill { flex: 1; }

.line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid #2a2a24; }
.line .name { font-weight: 700; }
.line .mods { color: var(--muted); font-size: 14px; }
.line .right { text-align: right; }
.line .qty { margin-top: 6px; transform: scale(.85); transform-origin: right; }
.line .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; margin-top: 4px; }
.line .rm:hover { color: var(--error); }
.line .price-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
/* A real button, 44px to the finger, so taking a dish out never needs a precise tap. */
.line .trash { width: 44px; height: 44px; margin: -12px -12px -12px 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.line .trash:hover, .line .trash:focus-visible { color: var(--error); background: var(--card-2); outline: none; }

.totals { margin: 16px 0; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.totals div.total { color: var(--ink); font-weight: 700; font-size: 18px; border-top: 1px solid #2a2a24; margin-top: 6px; padding-top: 10px; }
.error { color: var(--error); min-height: 1.4em; margin: 6px 0; font-weight: 700; }
.notice { background: rgba(241,128,6,.12); border: 1px solid rgba(241,128,6,.55); border-radius: 14px; padding: 14px 16px; margin: 6px 0 10px; color: var(--ink); font-size: 14px; line-height: 1.45; }
.notice strong { color: var(--orange-2); display: block; font-size: 15px; margin-bottom: 4px; }
.notice .hot-items { color: var(--gold); font-weight: 600; }
.notice .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.notice.ok { border-style: dashed; color: var(--muted); padding: 10px 14px; }
.error:empty { display: none; }
.fine { font-size: 12px; text-align: center; margin: 12px 0 0; }
.ref { font-size: 18px; }
.ref strong { font-family: var(--serif); font-size: 40px; color: var(--gold); letter-spacing: .08em; display: block; }
.done-lines { text-align: left; margin: 16px 0; }
.banner { background: rgba(241,128,6,.12); border: 1px solid rgba(241,128,6,.4); color: var(--orange-2); border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- checkout as a page ---- */
.cart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--orange-2); }
.checkout-page { max-width: 1100px; margin: 0 auto; }
body.page-mode .search-wrap, body.page-mode .cats, body.page-mode .cats-rule, body.page-mode #menu, body.page-mode .cart-fab, body.page-mode .top .mode { display: none !important; }
body.page-mode .checkout-page .sheet-body { position: static; width: auto; max-height: none; overflow: visible; margin: 0; padding: 0; background: transparent; border-radius: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
body.page-mode .checkout-page .close { display: none; }
body.page-mode .checkout-page .cart-head { grid-column: 1 / -1; }
body.page-mode .checkout-page #cart-lines, body.page-mode .checkout-page #cart-empty { grid-column: 1; }
body.page-mode .checkout-page #checkout { grid-column: 1; background: var(--card); border-radius: 22px; padding: 20px; margin-top: 16px; align-self: start; }
@media (min-width: 900px) {
  body.page-mode .checkout-page .sheet-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  body.page-mode .checkout-page #checkout { grid-column: 2; grid-row: 2 / span 3; margin-top: 0; position: sticky; top: 16px; }
}
body.page-mode .line { padding: 16px 0; }

.consent { display: grid; gap: 10px; margin: 14px 0 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.4; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); margin: 1px 0 0; flex: none; }
.check input:checked + span { color: var(--ink); }
.track { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; }
.track span { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--card-2); color: var(--muted); }
.track span.done { background: var(--orange); color: #000; }

/* Install this app: the same bar the staff app shows, in the guest page's dark palette. */
.install-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; width: min(720px, calc(100vw - 24px)); padding: 12px 14px 12px 18px; border-radius: 999px; background: #1f2748; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.55); animation: install-rise .35s ease both; }
.install-bar.hidden { display: none; }
.install-bar-icon { font-size: 22px; flex: none; }
.install-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-bar-text strong { font-size: 17px; font-weight: 700; line-height: 1.2; }
.install-bar-text small { color: #c8cfe6; font-size: 13px; line-height: 1.3; }
.install-bar-text small.hidden { display: none; }
.install-bar-btn { flex: none; border: 0; border-radius: 999px; padding: 12px 26px; background: #2f6bff; color: #fff; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }
.install-bar-btn:hover { background: #4a7dff; }
.install-bar-btn.hidden { display: none; }
.install-bar-x { flex: none; border: 0; background: transparent; color: #c8cfe6; font-size: 26px; line-height: 1; padding: 4px 8px; cursor: pointer; }
.install-bar-x:hover { color: #fff; }
@keyframes install-rise { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .install-bar { animation: none; } }
@media (max-width: 480px) { .install-bar { padding: 10px 10px 10px 14px; gap: 8px; } .install-bar-text strong { font-size: 15px; } .install-bar-btn { padding: 10px 18px; font-size: 15px; } }
/* The cart button sits above the install bar so neither hides the other. */
.install-bar ~ .cart-fab, body:has(.install-bar:not(.hidden)) .cart-fab { bottom: 92px; }
