:root {
  --mustard: #eecf62;
  --mustard-deep: #b89a42;
  --mustard-dark: #625524;
  --cream: #fef8e6;
  --paper: #fffcf4;
  --surface: #fffdf8;
  --ink: #2e2d29;
  --muted: #5f594c;
  --line: #e7dcb8;
  --frame: #eecf62;
  --danger: #984438;
  --success: #496347;
  --surface-glass: rgba(255, 253, 248, .82);
  --surface-soft: rgba(255, 253, 248, .58);
  --border-soft: rgba(105, 92, 44, .14);
  --shadow: 0 16px 42px rgba(75, 63, 26, .13), 0 3px 10px rgba(75, 63, 26, .07);
  --shadow-soft: 0 10px 30px rgba(75, 63, 26, .10), 0 1px 4px rgba(75, 63, 26, .05);
  --shadow-subtle: 0 6px 18px rgba(75, 63, 26, .07);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --gutter: 20px;
  --nav-height: 82px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--frame);
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100svh; background: var(--frame); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(105,92,44,.72); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--cream); }

#app { min-height: 100svh; }
.intro-screen { position: fixed; z-index: 100; inset: 0; background: var(--mustard); display: grid; place-items: center; overflow: hidden; color: white; }
.intro-brand { position: relative; z-index: 2; display: grid; justify-items: center; gap: 22px; animation: intro-brand-in 1s cubic-bezier(.2,.85,.25,1) both; }
.intro-logo { width: 156px; height: auto; display: block; filter: drop-shadow(0 12px 28px rgba(105,92,44,.18)); }
.intro-brand p { margin: 0; color: rgba(255,255,255,.92); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; animation: intro-copy-in .7s .45s ease both; }
.intro-ambient { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.intro-ambient span { position: absolute; width: min(76vw, 430px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; animation: intro-ring 2.4s cubic-bezier(.2,.75,.25,1) infinite; }
.intro-ambient span:nth-child(2) { animation-delay: .38s; }
.intro-ambient span:nth-child(3) { animation-delay: .76s; }
.intro-skip { position: absolute; z-index: 3; top: max(20px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); min-width: 76px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(46,45,41,.24); border-radius: var(--radius-pill); background: rgba(255,253,248,.3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.intro-skip:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@keyframes intro-brand-in { from { opacity: 0; transform: scale(.72) translateY(12px); } 70% { transform: scale(1.025) translateY(0); } }
@keyframes intro-copy-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes intro-ring { 0% { opacity: 0; transform: scale(.42); } 32% { opacity: .7; } 100% { opacity: 0; transform: scale(1.18); } }
.app-shell { min-height: 100svh; max-width: 520px; margin: 0 auto; background: var(--mustard); position: relative; overflow-x: hidden; box-shadow: 0 0 80px rgba(75,63,26,.16); isolation: isolate; }
.screen { min-height: 100svh; padding: max(24px, env(safe-area-inset-top)) var(--gutter) 28px; background: radial-gradient(circle at 100% 0, rgba(255,255,255,.16), transparent 28%), linear-gradient(180deg, rgba(255,255,255,.035), transparent 42%), var(--mustard); animation: screen-in .35s cubic-bezier(.2,.8,.2,1) both; }
.screen--with-nav { padding-bottom: calc(var(--nav-height) + 44px + env(safe-area-inset-bottom)); }
.screen--gold { background: var(--mustard); }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }

.topbar { position: relative; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 30px; }
.topbar--centered { justify-content: center; margin-bottom: 34px; }
.topbar-action { position: absolute; top: 50%; right: 0; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: var(--surface-soft); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow-subtle); cursor: pointer; transform: translateY(-50%); transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.topbar-action svg { width: 24px; height: 24px; }
.topbar-action:active { transform: translateY(-50%) scale(.94); box-shadow: none; }
.brand { display: flex; align-items: center; justify-content: flex-start; min-width: 72px; background: transparent; }
h1, h2, h3 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; }
.brand-logo { display: block; width: auto; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 3px 8px rgba(75,63,26,.08)); }
.brand-logo--header { height: 58px; }
.brand-logo--home { height: 94px; }

.eyebrow { margin: 0 0 10px; color: var(--mustard-dark); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; line-height: 1.35; font-weight: 800; }
h1 { font-size: clamp(38px, 9vw, 50px); line-height: 1.01; margin: 0; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: 30px; line-height: 1.06; margin: 0; letter-spacing: -.025em; }
h3 { font-size: 21px; line-height: 1.16; margin: 0; letter-spacing: -.012em; }
.subtitle { max-width: 42ch; color: var(--muted); font-size: 15px; line-height: 1.55; margin: 11px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 34px 0 16px; gap: 16px; }
.text-btn { min-height: 44px; border: 0; border-radius: var(--radius-pill); background: none; padding: 8px 2px 8px 12px; font-weight: 700; color: var(--mustard-dark); cursor: pointer; transition: color .22s ease, transform .22s ease; }

.loyalty-card { margin-top: 26px; padding: 24px; border: 1px solid rgba(255,255,255,.09); border-radius: 32px; background: linear-gradient(145deg, #34332f 0%, var(--ink) 62%); color: white; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.loyalty-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.055), transparent 36%); pointer-events: none; }
.loyalty-card::after { content: ""; position: absolute; width: 180px; height: 180px; border: 40px solid rgba(238,207,98,.13); border-radius: 50%; right: -76px; top: -80px; }
.loyalty-card__top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.loyalty-card__count { font: 46px/1 "DM Serif Display", serif; margin-top: 5px; letter-spacing: -.03em; }
.loyalty-card__label { color: #eee7d4; font-size: 13px; letter-spacing: .015em; }
.reward-chip { background: var(--mustard); color: var(--ink); border: 1px solid rgba(255,255,255,.24); border-radius: var(--radius-pill); padding: 10px 13px; font-size: 12px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.32); }
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 26px 0 18px; position: relative; z-index: 1; }
.stamp { aspect-ratio: 1; border: 1px dashed rgba(255,255,255,.34); border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.45); background: rgba(255,255,255,.018); }
.stamp svg { width: 23px; height: 23px; }
.stamp--earned { background: linear-gradient(145deg, #f3d973, var(--mustard)); border-style: solid; border-color: rgba(255,255,255,.5); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 5px 12px rgba(0,0,0,.12); }
.progress-copy { font-size: 13px; line-height: 1.4; color: #eee7d4; position: relative; z-index: 1; }
.loyalty-card__footer { position: relative; z-index: 2; display: grid; gap: 14px; }
.loyalty-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.loyalty-card__request { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius-pill); background: var(--mustard); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.36); transition: transform .2s ease, background-color .2s ease, opacity .2s ease; }
.loyalty-card__request--reward { background: rgba(255,255,255,.08); color: #fffaf0; }
.loyalty-card__request:active { transform: scale(.98); }
.loyalty-card__request:disabled { cursor: wait; opacity: .7; }
.loyalty-card__request--reward:disabled { cursor: not-allowed; opacity: .48; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-card { grid-column: span 2; height: 132px; min-width: 0; padding: 14px; border: 1px solid rgba(255,253,248,.58); border-radius: 24px; background: rgba(255,253,248,.78); -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%); box-shadow: 0 8px 22px rgba(75,63,26,.08), inset 0 1px 0 rgba(255,255,255,.5); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; overflow: hidden; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background-color .22s ease; }
.quick-card--button { font: inherit; text-align: left; cursor: pointer; }
.quick-card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
.quick-card:active { transform: scale(.97); box-shadow: 0 4px 12px rgba(75,63,26,.08); }
.quick-card__icon { width: 48px; height: 48px; border-radius: 15px; background: rgba(238,207,98,.42); display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.quick-card__icon--transparent { border-radius: 0; background: transparent; overflow: visible; }
.quick-card__icon svg { width: 38px; height: 38px; }
.quick-card__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.quick-card__icon--glovo { background: #fdc500; }
.quick-card__icon--glovo img { width: 46px; height: auto; max-height: 40px; padding: 0; }
.quick-card__uber-mark { width: 34px; height: 32px; display: block; background: #171612; -webkit-mask: url("/assets/uber-eats-logo.png") center / contain no-repeat; mask: url("/assets/uber-eats-logo.png") center / contain no-repeat; }
.quick-card__copy { display: grid; gap: 2px; width: 100%; min-width: 0; }
.quick-card__copy strong, .quick-card__copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-card__copy strong { font-size: 15px; line-height: 1.15; }
.quick-card__copy small { color: var(--muted); font-size: 12px; line-height: 1.2; }

.menu-shell { height: 100svh; max-width: 760px; background: var(--paper); overflow: hidden; }
.menu-screen { height: 100svh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 100% 0, rgba(238,207,98,.12), transparent 30%), var(--paper); }
.menu-sticky { position: relative; z-index: 24; flex: 0 0 auto; padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid rgba(105,92,44,.15); background: rgba(238,207,98,.93); -webkit-backdrop-filter: blur(24px) saturate(125%); backdrop-filter: blur(24px) saturate(125%); box-shadow: 0 8px 24px rgba(75,63,26,.08); }
.menu-titlebar { min-height: 56px; display: grid; grid-template-columns: 48px 66px minmax(0,1fr); align-items: center; gap: 10px; margin-bottom: 10px; }
.menu-titlebar h1 { font-size: 38px; line-height: 1; }
.menu-brand { display: grid; place-items: center; height: 56px; }
.brand-logo--menu { width: auto; height: 54px; }
.menu-icon-button { width: 46px; height: 46px; padding: 0; border: 1px solid rgba(105,92,44,.15); border-radius: 50%; background: rgba(255,253,248,.62); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.menu-icon-button svg { width: 25px; height: 25px; }
.menu-icon-button:active { transform: scale(.94); }
.menu-search { height: 52px; padding: 0 12px 0 15px; border: 1px solid rgba(105,92,44,.13); border-radius: var(--radius-pill); background: rgba(255,253,248,.94); display: grid; grid-template-columns: 24px minmax(0,1fr) 36px; align-items: center; gap: 9px; box-shadow: inset 0 1px 0 white, 0 5px 14px rgba(75,63,26,.06); }
.menu-search > span:first-child { display: grid; place-items: center; color: var(--muted); }
.menu-search > span svg { width: 22px; height: 22px; }
.menu-search input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.menu-search input::placeholder { color: #7d7668; opacity: 1; }
.menu-search__clear { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(105,92,44,.08); display: grid; place-items: center; cursor: pointer; }
.menu-search__clear[hidden] { display: none; }
.menu-search__clear svg { width: 18px; height: 18px; }
.menu-categories { display: flex; gap: 8px; margin: 12px -20px 0; padding: 0 20px 2px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.menu-categories::-webkit-scrollbar { display: none; }
.menu-category-tab { min-height: 40px; flex: 0 0 auto; padding: 0 16px; border: 1px solid rgba(105,92,44,.2); border-radius: var(--radius-pill); background: rgba(255,253,248,.72); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; scroll-snap-align: center; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.menu-category-tab:active { transform: scale(.96); }
.menu-category-tab--active { border-color: var(--mustard-deep); background: var(--ink); color: var(--cream); box-shadow: 0 5px 13px rgba(46,45,41,.14); }
.menu-content { min-height: 0; flex: 1 1 auto; padding: 10px max(22px, env(safe-area-inset-right)) max(40px, calc(env(safe-area-inset-bottom) + 24px)) max(22px, env(safe-area-inset-left)); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scroll-behavior: smooth; }
.menu-category { padding-top: 28px; scroll-margin-top: 190px; }
.menu-category + .menu-category { margin-top: 20px; }
.menu-category__head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.menu-category__head h2 { color: var(--mustard-dark); font-size: 30px; text-transform: uppercase; letter-spacing: .045em; }
.menu-category__head p { max-width: 52ch; margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.menu-notes, .menu-product__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.menu-note-chip { max-width: 100%; padding: 6px 9px; border: 1px solid rgba(184,154,66,.5); border-radius: var(--radius-pill); background: rgba(238,207,98,.12); color: var(--mustard-dark); font-size: 11px; line-height: 1.25; font-weight: 700; }
.menu-products { display: grid; }
.menu-product { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 94px; gap: 18px; padding: 18px 0; border-bottom: 1px solid rgba(105,92,44,.13); }
.menu-product__main { min-width: 0; }
.menu-product__main h3 { color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.28; font-weight: 750; letter-spacing: -.012em; overflow-wrap: anywhere; }
.menu-product__main p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.menu-product__tags { margin-top: 9px; }
.menu-product__price { min-width: 0; display: grid; align-content: start; justify-items: end; gap: 5px; text-align: right; }
.menu-product__price strong { color: var(--ink); font-size: 15px; line-height: 1.3; white-space: nowrap; }
.menu-product__price small { color: var(--mustard-dark); font-size: 11px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.menu-results { padding-top: 28px; }
.menu-results > h2 { margin-bottom: 26px; font-size: 34px; }
.menu-result-group + .menu-result-group { margin-top: 30px; }
.menu-result-group > h3 { padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--mustard-dark); font-family: "DM Sans", system-ui, sans-serif; font-size: 12px; line-height: 1.3; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.menu-empty { min-height: 48svh; padding: 48px 20px; display: grid; justify-items: center; align-content: center; text-align: center; }
.menu-empty__icon { width: 64px; height: 64px; border-radius: 22px; background: rgba(238,207,98,.25); display: grid; place-items: center; color: var(--mustard-dark); }
.menu-empty__icon svg { width: 30px; height: 30px; }
.menu-empty h2 { max-width: 15ch; margin-top: 20px; font-size: 28px; }
.menu-empty p { max-width: 34ch; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.menu-to-top { position: fixed; z-index: 26; right: max(20px, calc((100vw - 760px) / 2 + 20px)); bottom: max(24px, calc(env(safe-area-inset-bottom) + 18px)); width: 52px; height: 52px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.92); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; }
.menu-to-top svg { width: 24px; height: 24px; }
.menu-to-top--visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.menu-to-top:active { transform: scale(.94); }

.bottom-nav { min-height: var(--nav-height); position: fixed; z-index: 20; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 496px); transform: translateX(-50%); padding: 10px 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: rgba(254,248,230,.68); -webkit-backdrop-filter: blur(24px) saturate(135%); backdrop-filter: blur(24px) saturate(135%); border: 1px solid rgba(255,253,248,.62); border-radius: 26px; box-shadow: 0 10px 30px rgba(75,63,26,.13), inset 0 1px 0 rgba(255,255,255,.46); }
.nav-item { min-width: 0; min-height: 60px; padding: 5px 4px; border: 1px solid transparent; border-radius: 20px; background: transparent; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); cursor: pointer; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; }
.nav-item span:last-child { font-size: 10px; font-weight: 700; }
.nav-item--active { color: var(--ink); background: rgba(238,207,98,.78); border-color: rgba(105,92,44,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.34); }
.nav-item:active { transform: scale(.97); }
.nav-icon { width: 36px; height: 32px; border-radius: var(--radius-pill); display: grid; place-items: center; }

.cards { display: grid; gap: 14px; }
.reward-card { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 16px; padding: 15px; background: var(--surface-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.56); border-radius: 26px; box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255,255,255,.48); }
.reward-art { width: 84px; height: 94px; border: 1px solid rgba(105,92,44,.1); border-radius: 20px; background: linear-gradient(145deg, #f4da77, var(--mustard)); display: grid; place-items: center; font-size: 38px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.reward-card h3 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reward-card p { margin: 6px 0 13px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.reward-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cost { font-weight: 700; color: var(--mustard-dark); font-size: 13px; }
.small-button, .primary-button { border: 0; border-radius: var(--radius-pill); font-weight: 800; cursor: pointer; transition: transform .22s cubic-bezier(.2,.8,.2,1), background-color .22s ease, box-shadow .22s ease; }
.small-button { min-height: 42px; padding: 0 16px; background: var(--ink); color: white; box-shadow: 0 4px 12px rgba(46,45,41,.14); }
.small-button:disabled { background: #ddd6c4; color: #575247; cursor: not-allowed; }
.primary-button { width: 100%; min-height: 58px; padding: 0 22px; background: var(--ink); color: white; box-shadow: 0 8px 20px rgba(46,45,41,.18); }
.primary-button--light { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-subtle); }
.small-button:not(:disabled):active, .primary-button:active { transform: scale(.98); box-shadow: 0 3px 10px rgba(46,45,41,.14); }

.timeline { display: grid; gap: 0; padding: 0 16px; background: var(--surface-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.56); border-radius: 26px; box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255,255,255,.48); overflow: hidden; }
.history-row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; min-height: 78px; padding: 15px 0; border-bottom: 1px solid rgba(105,92,44,.11); align-items: center; }
.history-row:last-child { border-bottom: 0; }
.history-row__icon { width: 44px; height: 44px; border: 1px solid rgba(105,92,44,.1); border-radius: 50%; background: linear-gradient(145deg, var(--cream), #f6dda0); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.history-row__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row__date { color: var(--muted); font-size: 12px; margin-top: 3px; }
.history-row__points { padding: 5px 8px; border-radius: var(--radius-pill); background: rgba(73,99,71,.1); font-size: 13px; font-weight: 800; color: var(--success); }
.history-row__points--spent { background: rgba(152,68,56,.09); color: var(--danger); }

.profile-card, .settings-list { background: var(--surface-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.56); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255,255,255,.48); }
.profile-card { padding: 19px; display: flex; align-items: center; gap: 16px; }
.avatar { width: 66px; height: 66px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.46); border-radius: 50%; background: linear-gradient(145deg, #f4da77, var(--mustard)); display: grid; place-items: center; font: 27px "DM Serif Display", serif; box-shadow: 0 6px 16px rgba(75,63,26,.1), inset 0 1px 0 rgba(255,255,255,.4); overflow: hidden; }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.profile-card p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.settings-row { min-height: 64px; width: 100%; border: 0; border-bottom: 1px solid rgba(105,92,44,.11); background: transparent; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: left; transition: background-color .22s ease; }
.settings-row:last-child { border-bottom: 0; }
.settings-row small { color: var(--muted); }
.settings-row--switch { cursor: default; }
.settings-row__copy { min-width: 0; display: grid; gap: 3px; padding: 10px 14px 10px 0; }
.settings-row__copy small { max-width: 32ch; font-size: 11px; line-height: 1.35; }
.settings-row--danger { color: var(--danger); }
.switch { width: 50px; height: 30px; position: relative; flex: 0 0 auto; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__track { position: absolute; inset: 0; border: 1px solid rgba(105,92,44,.16); border-radius: var(--radius-pill); background: rgba(95,89,76,.22); box-shadow: inset 0 1px 3px rgba(46,45,41,.08); transition: background-color .22s ease, border-color .22s ease; cursor: pointer; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 7px rgba(46,45,41,.22); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.switch input:checked + .switch__track { background: var(--mustard-dark); border-color: var(--mustard-dark); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(105,92,44,.42); outline-offset: 3px; }

.onboarding-shell { --onboarding-bg: #eecf62; --onboarding-tint: rgba(105,92,44,.2); background: var(--onboarding-bg); }
.onboarding-shell--2 { --onboarding-bg: #c6b268; --onboarding-tint: rgba(74,66,37,.34); }
.onboarding-shell--3 { --onboarding-bg: #d8bc58; --onboarding-tint: rgba(76,62,25,.24); }
.screen--onboarding { min-height: 100svh; padding: max(20px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); background: radial-gradient(circle at 20% 0, rgba(255,255,255,.16), transparent 30%), var(--onboarding-bg); animation: none; }
.onboarding-header { min-height: 102px; position: relative; display: grid; place-items: center; }
.brand-logo--onboarding { height: 92px; filter: drop-shadow(0 8px 22px rgba(46,45,41,.14)); }
.skip { position: absolute; z-index: 4; right: 0; top: 4px; min-height: 44px; padding: 0 17px; border: 1px solid rgba(46,45,41,.16); border-radius: var(--radius-pill); background: rgba(255,253,248,.34); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); font-weight: 800; cursor: pointer; box-shadow: var(--shadow-subtle); transition: transform .2s ease, background-color .2s ease; }
.skip:active { transform: scale(.97); }
.onboarding-stage { touch-action: pan-y; animation: onboarding-fade-in .23s ease-in-out both; }
.onboarding-stage--leaving { pointer-events: none; animation: onboarding-fade-out .23s ease-in-out both; }
@keyframes onboarding-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes onboarding-fade-out { from { opacity: 1; } to { opacity: 0; } }
.onboarding-photo { height: clamp(310px, 43svh, 430px); margin: 8px 0 0; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.24); border-radius: 34px; background: #28251d; box-shadow: 0 18px 45px rgba(75,63,26,.2); }
.onboarding-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 48%; }
.onboarding-shell--2 .onboarding-photo img { object-position: center 54%; }
.onboarding-shell--3 .onboarding-photo img { object-position: center 42%; }
.onboarding-photo__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,22,18,.04) 18%, rgba(23,22,18,.18) 62%, rgba(23,22,18,.82) 100%), linear-gradient(var(--onboarding-tint),var(--onboarding-tint)); pointer-events: none; }
.onboarding-panel { min-height: 350px; margin: -52px 12px 0; padding: 31px 24px 24px; position: relative; z-index: 2; border: 1px solid rgba(255,255,255,.72); border-radius: 34px; background: rgba(255,250,240,.97); box-shadow: 0 20px 48px rgba(46,45,41,.2), inset 0 1px 0 white; color: var(--ink); display: flex; flex-direction: column; }
.onboarding-panel .eyebrow { margin-bottom: 9px; color: #796625; }
.onboarding-panel h1 { max-width: 100%; margin: 0; color: var(--ink); font-size: clamp(40px, 11.5vw, 58px); line-height: .91; letter-spacing: -.04em; text-wrap: balance; overflow-wrap: normal; word-break: normal; hyphens: none; }
.onboarding-copy { max-width: 36ch; margin: 16px 0 0; color: #5f594c; font-size: 15px; line-height: 1.5; }
.dots { min-height: 8px; display: flex; align-items: center; justify-content: center; column-gap: 8px; margin: auto 0 17px; padding-top: 24px; }
.dot { display: block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: rgba(46,45,41,.34); transition: width .25s ease-in-out, border-radius .25s ease-in-out, background-color .25s ease-in-out; }
.dot--active { width: 24px; border-radius: 8px; background: var(--mustard); animation: onboarding-dot-grow .25s ease-in-out both; }
@keyframes onboarding-dot-grow { from { width: 8px; } to { width: 24px; } }
.onboarding-cta { min-height: 56px; background: var(--ink); color: white; box-shadow: 0 9px 22px rgba(46,45,41,.18); }

.form { display: grid; gap: 15px; margin-top: 28px; padding: 18px; background: var(--surface-soft); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.46); border-radius: 28px; box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255,255,255,.4); }
.auth-switch { margin: 24px 0 -12px; padding: 4px; border: 1px solid var(--border-soft); border-radius: 999px; background: rgba(255,253,248,.48); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.auth-switch button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.auth-switch .auth-switch--active { background: var(--surface); color: var(--ink); box-shadow: 0 5px 14px rgba(75,63,26,.1); }
.oauth-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-actions--single { grid-template-columns: 1fr; }
.oauth-actions button { min-height: 52px; border: 1px solid var(--border-soft); border-radius: 17px; background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-subtle); }
.oauth-actions button:active { transform: scale(.98); }
.auth-divider { margin: 14px 0 -14px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border-soft); }
.settings-row--link { text-decoration: none; }
.profile-completion { width: 100%; margin: 4px 0 16px; padding: 13px 16px; border: 1px solid rgba(105,92,44,.18); border-radius: 16px; background: rgba(255,250,240,.58); color: var(--ink); font-weight: 800; text-align: left; cursor: pointer; }
.history-more { margin-top: 14px; }
.auth-link { min-height: 40px; padding: 0 4px; border: 0; background: transparent; color: var(--mustard-deep); font-weight: 800; text-align: left; cursor: pointer; }
.form-notice { min-height: 0; margin: 0 4px; color: #496347; font-size: 12px; font-weight: 700; line-height: 1.45; }
.form-notice:empty { display: none; }
.screen--recovery { display: flex; flex-direction: column; }
.screen--recovery .topbar { flex: 0 0 auto; }
.screen--recovery > h1 { max-width: 430px; }
.recovery-intro { max-width: 420px; margin-top: -4px; }
.recovery-state { min-height: 240px; align-content: center; justify-items: center; text-align: center; }
.recovery-state .auth-spinner { margin-bottom: 4px; }
.recovery-state h2 { margin: 0; font-family: "DM Serif Display", serif; font-size: clamp(28px, 8vw, 38px); font-weight: 400; line-height: 1.02; }
.recovery-state p { max-width: 360px; margin: 0; color: var(--muted); line-height: 1.55; }
.recovery-state .primary-button { width: 100%; margin-top: 8px; }
.recovery-state__icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(238,207,98,.38); color: var(--ink); font-size: 26px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(105,92,44,.12); }
.recovery-state--success .recovery-state__icon { background: var(--mustard); }
.auth-link--centered { width: 100%; text-align: center; }
.auth-loading { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 16px; color: var(--muted); font-weight: 700; }
.auth-loading .topbar { position: absolute; inset: max(18px, env(safe-area-inset-top)) 20px auto; }
.auth-spinner { width: 30px; height: 30px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin .75s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.field label { font-size: 12px; font-weight: 800; display: block; margin: 0 0 8px 4px; letter-spacing: .01em; }
.field input, .field select { width: 100%; min-height: 58px; border: 1px solid var(--border-soft); border-radius: 18px; background: rgba(255,253,248,.9); padding: 0 16px; outline: none; color: var(--ink); box-shadow: inset 0 1px 2px rgba(75,63,26,.035); transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.field input::placeholder { color: #8a8374; }
.field input:focus, .field select:focus { border-color: var(--mustard-dark); background: var(--surface); box-shadow: 0 0 0 4px rgba(105,92,44,.12); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 12px; line-height: 1.45; margin: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(29,27,22,.52); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: end center; padding: 20px; }
.modal { width: min(100%,480px); background: rgba(255,252,244,.94); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border: 1px solid rgba(255,255,255,.6); border-radius: 32px; padding: 27px; padding-bottom: max(27px, env(safe-area-inset-bottom)); text-align: center; box-shadow: 0 24px 70px rgba(29,27,22,.24); animation: modal-in .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes modal-in { from { transform: translateY(30px); opacity:0; } }
.modal--form { max-height: calc(100svh - 40px); overflow-y: auto; text-align: left; overscroll-behavior: contain; }
.modal--stamp-request { text-align: left; }
.stamp-request { display: grid; justify-items: center; gap: 14px; text-align: center; }
.stamp-request > .subtitle { margin: -6px 0 2px; }
.stamp-request__qr { width: min(72vw, 300px); aspect-ratio: 1; padding: 12px; border: 1px solid var(--border-soft); border-radius: 25px; background: #fffaf0; box-shadow: var(--shadow-subtle); }
.stamp-request__qr img { width: 100%; height: 100%; display: block; border-radius: 16px; }
.stamp-request__label { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stamp-request__code { font: 42px/1 "DM Serif Display", serif; letter-spacing: .16em; padding-left: .16em; font-variant-numeric: tabular-nums; }
.stamp-request__countdown { min-width: 142px; margin: 0; padding: 9px 14px; border-radius: var(--radius-pill); background: rgba(238,207,98,.25); color: var(--mustard-dark); font-size: 12px; font-weight: 800; }
.stamp-request__security { max-width: 34ch; margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.stamp-request--expired { min-height: 280px; align-content: center; }
.stamp-request--expired p { margin: 0; color: var(--muted); }
.stamp-request--expired .primary-button { width: 100%; }
.stamp-request__expired-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: rgba(238,207,98,.28); font-size: 30px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.sheet-head .eyebrow { margin-bottom: 7px; }
.sheet-close { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--border-soft); border-radius: 50%; background: var(--surface-soft); display: grid; place-items: center; color: var(--ink); font-size: 27px; line-height: 1; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.sheet-close:active { transform: scale(.94); }
.sheet-form { display: grid; gap: 15px; }
.photo-editor { display: grid; justify-items: center; gap: 12px; margin-bottom: 6px; padding: 18px; border: 1px solid rgba(105,92,44,.1); border-radius: 24px; background: rgba(238,207,98,.18); }
.avatar--editor { width: 104px; height: 104px; font-size: 38px; }
.photo-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.photo-action { min-height: 42px; padding: 0 16px; border: 1px solid var(--border-soft); border-radius: var(--radius-pill); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.photo-action:active { transform: scale(.97); }
.field input[readonly] { color: var(--muted); background: rgba(231,220,184,.32); cursor: default; }
.field-note { display: block; margin: 6px 4px 0; color: var(--muted); font-size: 11px; }
.sheet-link { min-height: 56px; width: 100%; padding: 0 16px; border: 1px solid var(--border-soft); border-radius: 18px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; }
.language-options { display: grid; gap: 10px; }
.language-option { min-height: 60px; width: 100%; padding: 0 18px; border: 1px solid var(--border-soft); border-radius: 19px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.language-option--active { border-color: var(--mustard-dark); background: rgba(238,207,98,.3); }
.language-option:active { transform: scale(.98); }
.form-error { min-height: 18px; margin: -2px 4px 0; color: var(--danger); font-size: 12px; font-weight: 700; line-height: 1.4; }
.code { font: 34px "DM Serif Display", serif; letter-spacing: .18em; background: var(--cream); border: 1px solid var(--border-soft); border-radius: 18px; padding: 18px 8px; margin: 22px 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.empty { min-height: 48svh; display: grid; place-items: center; text-align: center; padding: 40px 24px; background: var(--surface-soft); border: 1px solid rgba(255,255,255,.45); border-radius: 28px; box-shadow: var(--shadow-subtle); }
.empty__icon { width: 96px; height:96px; border: 1px solid rgba(255,255,255,.48); border-radius:50%; background:linear-gradient(145deg, #f4da77, var(--mustard)); display:grid; place-items:center; font-size:42px; margin:auto auto 20px; box-shadow: var(--shadow-subtle); }
.empty p { color:var(--muted); line-height:1.5; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 104px; transform: translate(-50%, 20px); width: min(calc(100% - 40px), 480px); padding: 14px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-pill); background: rgba(46,45,41,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: white; text-align: center; opacity: 0; pointer-events: none; transition: .25s ease; font-weight: 700; box-shadow: 0 12px 28px rgba(29,27,22,.2); }
.toast--show { opacity: 1; transform: translate(-50%, 0); }

html[data-theme="dark"] {
  color-scheme: dark;
  --cream: #302d25;
  --paper: #211f19;
  --surface: #2a2822;
  --muted: #c3baa7;
  --line: #484338;
  --frame: #11100d;
  --mustard-dark: #eecf62;
  --danger: #f0a095;
  --success: #a7cba3;
  --surface-glass: rgba(43, 41, 35, .88);
  --surface-soft: rgba(47, 44, 37, .72);
  --border-soft: rgba(238, 207, 98, .2);
  --shadow: 0 18px 48px rgba(0,0,0,.34), 0 3px 12px rgba(0,0,0,.2);
  --shadow-soft: 0 12px 34px rgba(0,0,0,.28);
  --shadow-subtle: 0 8px 22px rgba(0,0,0,.22);
  background: var(--frame);
  color: #f7f0de;
}
html[data-theme="dark"] body { background: var(--frame); color: #f7f0de; }
html[data-theme="dark"] ::selection { background: var(--mustard); color: #171612; }
html[data-theme="dark"] .app-shell { background: #171612; box-shadow: 0 0 90px rgba(0,0,0,.48); }
html[data-theme="dark"] .screen { background: radial-gradient(circle at 100% 0, rgba(238,207,98,.09), transparent 30%), linear-gradient(180deg, rgba(255,255,255,.015), transparent 44%), #171612; }
html[data-theme="dark"] .screen--gold { background: #171612; }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .text-btn,
html[data-theme="dark"] .cost { color: var(--mustard); }
html[data-theme="dark"] .subtitle { color: var(--muted); }
html[data-theme="dark"] .topbar-action { border-color: rgba(238,207,98,.2); background: rgba(47,44,37,.82); color: var(--mustard); }
html[data-theme="dark"] .loyalty-card { border-color: rgba(238,207,98,.12); background: linear-gradient(145deg, #292720, #0f0e0c 68%); }
html[data-theme="dark"] .loyalty-card__request { background: var(--mustard); color: #171612; }
html[data-theme="dark"] .loyalty-card__request--reward { border-color: rgba(238,207,98,.28); background: rgba(238,207,98,.09); color: #f7f0de; }
html[data-theme="dark"] .quick-card { border-color: rgba(238,207,98,.14); background: rgba(43,41,35,.84); color: #f7f0de; box-shadow: 0 9px 26px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] .quick-card__icon { background: rgba(238,207,98,.16); color: var(--mustard); }
html[data-theme="dark"] .quick-card__icon--glovo { background: #fdc500; }
html[data-theme="dark"] .quick-card__uber-mark { background: #06c167; }
html[data-theme="dark"] .quick-card__copy small { color: var(--muted); }
html[data-theme="dark"] .menu-shell,
html[data-theme="dark"] .menu-screen { background: #171612; }
html[data-theme="dark"] .menu-screen { background-image: radial-gradient(circle at 100% 0, rgba(238,207,98,.07), transparent 30%); }
html[data-theme="dark"] .menu-sticky { border-color: rgba(238,207,98,.16); background: rgba(28,26,21,.94); box-shadow: 0 10px 28px rgba(0,0,0,.26); }
html[data-theme="dark"] .menu-icon-button,
html[data-theme="dark"] .menu-search,
html[data-theme="dark"] .menu-category-tab { border-color: rgba(238,207,98,.17); background: #292720; color: #f7f0de; }
html[data-theme="dark"] .menu-search input { color: #f7f0de; }
html[data-theme="dark"] .menu-search input::placeholder { color: #aaa291; }
html[data-theme="dark"] .menu-search__clear { background: rgba(238,207,98,.1); color: var(--mustard); }
html[data-theme="dark"] .menu-category-tab--active { border-color: var(--mustard); background: var(--mustard); color: #171612; }
html[data-theme="dark"] .menu-category__head,
html[data-theme="dark"] .menu-product,
html[data-theme="dark"] .menu-result-group > h3 { border-color: rgba(238,207,98,.13); }
html[data-theme="dark"] .menu-category__head h2,
html[data-theme="dark"] .menu-result-group > h3,
html[data-theme="dark"] .menu-product__price small { color: var(--mustard); }
html[data-theme="dark"] .menu-product__main h3,
html[data-theme="dark"] .menu-product__price strong { color: #f7f0de; }
html[data-theme="dark"] .menu-note-chip { border-color: rgba(238,207,98,.32); background: rgba(238,207,98,.09); color: var(--mustard); }
html[data-theme="dark"] .menu-empty__icon { background: rgba(238,207,98,.12); color: var(--mustard); }
html[data-theme="dark"] .menu-to-top { border-color: rgba(238,207,98,.3); background: var(--mustard); color: #171612; }
html[data-theme="dark"] .bottom-nav { border-color: rgba(238,207,98,.14); background: rgba(33,31,25,.78); box-shadow: 0 14px 38px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] .nav-item { color: var(--muted); }
html[data-theme="dark"] .nav-item--active { border-color: rgba(238,207,98,.28); background: var(--mustard); color: #171612; }
html[data-theme="dark"] .reward-card,
html[data-theme="dark"] .timeline,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .settings-list { border-color: rgba(238,207,98,.13); background: var(--surface-glass); box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] .reward-art { border-color: rgba(238,207,98,.24); }
html[data-theme="dark"] .small-button,
html[data-theme="dark"] .primary-button { background: var(--mustard); color: #171612; box-shadow: 0 8px 22px rgba(0,0,0,.24); }
html[data-theme="dark"] .small-button:disabled { background: #4a463c; color: #aaa291; }
html[data-theme="dark"] .primary-button--light { background: var(--surface); color: #f7f0de; }
html[data-theme="dark"] .history-row { border-color: rgba(238,207,98,.1); }
html[data-theme="dark"] .history-row__icon { border-color: rgba(238,207,98,.15); background: linear-gradient(145deg, #373329, #292720); }
html[data-theme="dark"] .avatar { color: #171612; }
html[data-theme="dark"] .settings-row { border-color: rgba(238,207,98,.1); }
html[data-theme="dark"] .switch__track { border-color: rgba(238,207,98,.18); background: #4a463c; }
html[data-theme="dark"] .switch__track::after { background: #f7f0de; }
html[data-theme="dark"] .switch input:checked + .switch__track { background: var(--mustard); border-color: var(--mustard); }
html[data-theme="dark"] .form,
html[data-theme="dark"] .empty { border-color: rgba(238,207,98,.14); background: var(--surface-soft); }
html[data-theme="dark"] .onboarding-shell { --onboarding-bg: #171612; --onboarding-tint: rgba(23,22,18,.16); background: var(--onboarding-bg); }
html[data-theme="dark"] .onboarding-shell--2 { --onboarding-bg: #242117; --onboarding-tint: rgba(76,67,35,.26); }
html[data-theme="dark"] .onboarding-shell--3 { --onboarding-bg: #171612; --onboarding-tint: rgba(23,22,18,.2); }
html[data-theme="dark"] .screen--onboarding { background: radial-gradient(circle at 20% 0, rgba(238,207,98,.075), transparent 30%), var(--onboarding-bg); }
html[data-theme="dark"] .onboarding-photo { border-color: rgba(238,207,98,.16); box-shadow: 0 20px 52px rgba(0,0,0,.4); }
html[data-theme="dark"] .onboarding-panel { border-color: rgba(238,207,98,.16); background: #f6efdf; color: var(--ink); box-shadow: 0 22px 54px rgba(0,0,0,.42), inset 0 1px 0 white; }
html[data-theme="dark"] .onboarding-panel .eyebrow { color: #796625; }
html[data-theme="dark"] .onboarding-panel h1 { color: var(--ink); }
html[data-theme="dark"] .onboarding-panel .dot { background: rgba(46,45,41,.22); }
html[data-theme="dark"] .onboarding-panel .dot--active { background: var(--mustard); }
html[data-theme="dark"] .onboarding-cta { background: #171612; color: #fffaf0; }
html[data-theme="dark"] .skip { border-color: rgba(238,207,98,.18); background: rgba(43,41,35,.82); color: #f7f0de; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select { border-color: rgba(238,207,98,.17); background: #24221d; color: #f7f0de; }
html[data-theme="dark"] .field input::placeholder { color: #a9a18f; }
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus { border-color: var(--mustard); background: #2a2822; box-shadow: 0 0 0 4px rgba(238,207,98,.12); }
html[data-theme="dark"] .field input[readonly] { background: #201e19; color: #aaa291; }
html[data-theme="dark"] .check input { accent-color: var(--mustard); }
html[data-theme="dark"] .auth-switch { border-color: rgba(238,207,98,.16); background: rgba(255,255,255,.035); }
html[data-theme="dark"] .auth-switch .auth-switch--active { background: #302d26; color: #f7f0de; box-shadow: 0 5px 16px rgba(0,0,0,.24); }
html[data-theme="dark"] .oauth-actions button { border-color: rgba(238,207,98,.17); background: #24221d; color: #f7f0de; }
html[data-theme="dark"] .auth-link { color: var(--mustard); }
html[data-theme="dark"] .form-notice { color: #b9d2ae; }
html[data-theme="dark"] .recovery-state__icon { background: rgba(238,207,98,.14); color: var(--mustard); box-shadow: inset 0 0 0 1px rgba(238,207,98,.18); }
html[data-theme="dark"] .recovery-state--success .recovery-state__icon { background: var(--mustard); color: #171612; }
html[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.68); }
html[data-theme="dark"] .modal { border-color: rgba(238,207,98,.15); background: rgba(33,31,25,.96); color: #f7f0de; box-shadow: 0 28px 80px rgba(0,0,0,.48); }
html[data-theme="dark"] .stamp-request__qr { border-color: rgba(238,207,98,.2); background: #fffaf0; }
html[data-theme="dark"] .stamp-request__countdown { background: rgba(238,207,98,.14); color: var(--mustard); }
html[data-theme="dark"] .sheet-close,
html[data-theme="dark"] .sheet-link,
html[data-theme="dark"] .language-option { border-color: rgba(238,207,98,.16); background: #2a2822; color: #f7f0de; }
html[data-theme="dark"] .photo-editor { border-color: rgba(238,207,98,.15); background: rgba(238,207,98,.08); }
html[data-theme="dark"] .photo-action { border-color: rgba(238,207,98,.18); background: #2a2822; color: #f7f0de; }
html[data-theme="dark"] .language-option--active { border-color: var(--mustard); background: rgba(238,207,98,.14); }
html[data-theme="dark"] .code { border-color: rgba(238,207,98,.18); background: #292720; }
html[data-theme="dark"] .toast { border-color: rgba(238,207,98,.14); background: rgba(15,14,12,.94); }

@media (hover: hover) {
  .text-btn:hover { color: var(--ink); transform: translateY(-1px); }
  .quick-card:hover { transform: translateY(-2px); border-color: rgba(105,92,44,.22); background: rgba(255,253,248,.88); box-shadow: 0 11px 26px rgba(75,63,26,.12), inset 0 1px 0 rgba(255,255,255,.58); }
  .menu-icon-button:hover, .menu-category-tab:not(.menu-category-tab--active):hover { background: var(--surface); border-color: rgba(105,92,44,.32); }
  .menu-to-top:hover { transform: translateY(-2px); }
  .nav-item:hover { color: var(--ink); }
  .nav-item:not(.nav-item--active):hover { background: rgba(255,253,248,.38); }
  .small-button:not(:disabled):hover, .primary-button:not(.primary-button--light):hover { background: var(--mustard-dark); }
  .primary-button--light:hover { background: #f7edcf; }
  .settings-row:hover { background: rgba(255,255,255,.36); }
  .field input:hover, .field select:hover { border-color: var(--mustard-deep); }
}

@media (hover: hover) {
  html[data-theme="dark"] .text-btn:hover,
  html[data-theme="dark"] .nav-item:hover { color: var(--mustard); }
  html[data-theme="dark"] .nav-item--active:hover { color: #171612; }
  html[data-theme="dark"] .quick-card:hover { border-color: rgba(238,207,98,.3); background: rgba(50,47,40,.94); box-shadow: 0 13px 30px rgba(0,0,0,.3); }
  html[data-theme="dark"] .menu-icon-button:hover,
  html[data-theme="dark"] .menu-category-tab:not(.menu-category-tab--active):hover { border-color: rgba(238,207,98,.3); background: #353229; }
  html[data-theme="dark"] .nav-item:not(.nav-item--active):hover,
  html[data-theme="dark"] .settings-row:hover { background: rgba(238,207,98,.08); }
  html[data-theme="dark"] .small-button:not(:disabled):hover,
  html[data-theme="dark"] .primary-button:not(.primary-button--light):hover { background: #f4d978; color: #171612; }
  html[data-theme="dark"] .primary-button--light:hover { background: #353229; }
}

@media (max-width: 699px) {
  .app-shell { width: 100%; max-width: none; }
  .screen {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .bottom-nav {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    width: auto;
    transform: none;
  }
  .modal-backdrop {
    padding-top: 12px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .toast {
    left: max(20px, env(safe-area-inset-left));
    right: max(20px, env(safe-area-inset-right));
    width: auto;
    transform: translateY(20px);
  }
  .toast--show { transform: translateY(0); }
  .menu-to-top { right: max(20px, env(safe-area-inset-right)); }
}

@media (display-mode: standalone) {
  body { min-height: 100dvh; overscroll-behavior-y: none; }
  #app, .app-shell, .screen { min-height: 100dvh; }
  .menu-shell, .menu-screen { height: 100dvh; min-height: 0; }
}

@media (max-width: 699px) and (max-height: 650px) {
  .intro-logo { width: 132px; }
  .intro-brand { gap: 16px; }
  .intro-ambient span { width: min(64vw, 310px); }
}

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  h1 { font-size: 36px; }
  h2 { font-size: 27px; }
  .loyalty-card { padding: 19px; }
  .stamps { gap: 8px; }
  .reward-card { grid-template-columns: 76px minmax(0,1fr); gap: 12px; padding: 12px; }
  .reward-art { width: 76px; height: 88px; }
  .history-row { grid-template-columns: 44px minmax(0,1fr) auto; gap: 9px; }
  .menu-sticky { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .menu-titlebar { grid-template-columns: 44px 58px minmax(0,1fr); gap: 8px; }
  .menu-titlebar h1 { font-size: 34px; }
  .brand-logo--menu { height: 50px; }
  .menu-categories { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .menu-content { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .menu-product { grid-template-columns: minmax(0,1fr) 82px; gap: 12px; }
}

@media (min-width: 700px) {
  .screen { padding-top: 36px; }
}
@media (min-width: 700px) and (max-width: 1023px) {
  .quick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .quick-card { grid-column: span 2; }
  .quick-card:last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
  .quick-card:nth-last-child(2):nth-child(3n + 1) { grid-column: 2 / span 2; }
  .quick-card:last-child:nth-child(3n + 2) { grid-column: 4 / span 2; }
}
@media (min-width: 1024px) {
  .quick-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .quick-card { grid-column: span 2; }
  .quick-card:last-child:nth-child(odd) { grid-column: auto / span 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
