:root {
  --bg: #fbd89f; --surface: #fde8c4; --card: #fff3dc; --ink: #2a2214; --muted: #6b5a3c;
  --green: #3c4a1f; --red: #c8372d; --orange: #f39a1e; --line: #e2bd84; --chip: #f6cf91; --badge: #f9dcaa;
  --open: #2f6b2a; --closed: #a3352b; --on-accent: #fff8ea;
  --shadow: 0 10px 30px -12px rgba(90, 50, 10, .35);
  --font-display: "Rammetto One", "Arial Black", Impact, sans-serif;
  --font-body: "Quicksand", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1810; --surface: #26211a; --card: #2e281d; --ink: #f6e3c0; --muted: #c4ae86;
    --green: #c9d89a; --red: #f07a5c; --orange: #f5a742; --line: #4a4029; --chip: #383020; --badge: #3b3324;
    --open: #8fd27f; --closed: #f28b7a; --on-accent: #1b1810; --shadow: 0 10px 30px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.45;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
button { font: inherit; color: inherit; }
.wrap {
  max-width: 1040px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }

.picado { position: relative; overflow: hidden; height: 84px; display: flex; justify-content: center; gap: 4px; }
.picado::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--muted); opacity: .5; }
.flag { flex: 0 0 auto; width: 52px; height: 64px; margin-top: 6px; transform-origin: 50% 0; }
.flag:nth-child(odd) { transform: rotate(-2deg); }
.flag:nth-child(even) { transform: rotate(2deg); }
.flag svg { display: block; width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) {
  .flag { animation: sway 3.2s ease-in-out infinite alternate; }
  .hero .logo { animation: tip 4s ease-in-out infinite; }
}
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

.hero { padding-block: 4px 18px; text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2px; }
.hero .logo { width: min(240px, 62vw); height: auto; transform-origin: 50% 80%; }
@keyframes tip { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(-3px); } }
.hero h1 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 400; color: var(--red); font-size: clamp(2.3rem, 9vw, 3.8rem); line-height: 1; letter-spacing: .02em; }
.hero .sub { font-family: var(--font-display); color: var(--green); font-size: clamp(1.15rem, 4.6vw, 1.75rem); letter-spacing: .04em; }
.status { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status[data-state="open"] .dot { background: var(--open); }
.status[data-state="closed"] .dot { background: var(--closed); }

.antojo { margin: 18px auto 6px; max-width: 560px; width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); text-align: left; }
.antojo .ic { grid-row: span 2; width: 84px; height: 84px; border-radius: 50%; background: var(--badge); display: grid; place-items: center; }
.antojo .ic svg { width: 76px; height: auto; }
.antojo .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.antojo .what { font-size: 1.15rem; font-weight: 700; line-height: 1.25; min-width: 0; }
.antojo .what b { color: var(--red); font-variant-numeric: tabular-nums; }
.antojo .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 0; cursor: pointer; border-radius: 999px; padding: 10px 18px; font-weight: 700; background: var(--chip); color: var(--green); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--red); color: var(--on-accent); }
.btn.green { background: var(--green); color: var(--on-accent); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.rolling .what { opacity: .6; }

.bar { background: var(--bg); border-block: 1px solid var(--line); margin-top: 8px; }
.bar .wrap { padding-block: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.bar nav { min-width: 0; }
.search { position: relative; }
.search input { width: 100%; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; padding: 0 16px 0 42px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.chips { list-style: none; margin: 0; padding: 0 0 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips a { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--chip); color: var(--green); text-decoration: none; font-weight: 700; font-size: .92rem; }
.chips a svg { width: 26px; height: 22px; }

.sections { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); padding-block: 22px 30px; align-items: start; }
.sec { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px 18px 14px; scroll-margin-top: 16px; }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 12px; }
.sec-head .ic { width: 78px; height: 78px; border-radius: 50%; background: var(--badge); display: grid; place-items: center; }
.sec-head .ic svg { width: 70px; height: auto; }
.sec h2 { margin: 0; color: var(--green); font-size: 1.6rem; line-height: 1.1; }
.sec .desc { margin: 2px 0 0; color: var(--muted); font-size: .9rem; font-weight: 500; }
.sec .meta { margin-top: 4px; font-size: .8rem; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.grp { margin: 12px 0 4px; font-size: .82rem; color: var(--red); text-transform: uppercase; letter-spacing: .1em; }
ul.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 12px; border-top: 1px dashed var(--line); }
.items li:first-child { border-top: 0; }
.item.in { background: rgba(243, 154, 30, .16); }
.item .name { min-width: 0; }
.item .opts { display: block; font-weight: 500; color: var(--muted); font-size: .84rem; }
.item .price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.add, .step button { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--red); color: var(--on-accent); font-size: 1.3rem; font-weight: 700; line-height: 1; display: grid; place-items: center; padding: 0; }
.add.pick { width: auto; padding: 0 14px; border-radius: 999px; font-size: .9rem; position: relative; }
.add .n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--green); color: var(--on-accent); font-size: .75rem; display: grid; place-items: center; padding: 0 5px; }
.step { display: flex; align-items: center; gap: 6px; }
.step button { width: 34px; height: 34px; font-size: 1.1rem; }
.step button.minus { background: var(--chip); color: var(--green); }
.step .q { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.info { background: var(--surface); border-block: 1px solid var(--line); }
.info .wrap { padding-block: 30px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.info h3 { margin: 0 0 6px; color: var(--green); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.info p { margin: 0; }
.info .num { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.info a { color: inherit; }
.rule { padding-block: 20px 14px; text-align: center; color: var(--red); font-size: .88rem; max-width: 62ch; margin: 0 auto; }
.greca { display: block; width: 100%; height: 40px; }

.cartbar { position: fixed; z-index: 25; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; border: 0; cursor: pointer; border-radius: 999px; padding: 10px 12px 10px 10px; background: var(--green); color: var(--on-accent); box-shadow: var(--shadow); font-weight: 700; text-align: left; }
.cartbar .count { min-width: 36px; height: 36px; border-radius: 50%; background: #c8372d; color: #fff8ea; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.cartbar .lbl { flex: 1; }
.cartbar .tot { font-variant-numeric: tabular-nums; padding-right: 8px; }

.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 12, 4, .5); }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 620px; margin: 0 auto; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h2 { margin: 0; color: var(--green); font-size: 1.4rem; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); color: var(--green); cursor: pointer; font-size: 1.2rem; }
.lines { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.lines .sum { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 52px; text-align: right; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--chip); padding: 4px; border-radius: 999px; margin: 6px 0 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 9px 8px; border-radius: 999px; cursor: pointer; color: var(--green); font-weight: 700; font-size: .92rem; }
.seg input:checked + label { background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { font-size: .85rem; color: var(--muted); }
.field input, .field textarea { font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; width: 100%; }
.field textarea { min-height: 64px; resize: vertical; }
.totals { display: grid; gap: 4px; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.25rem; font-weight: 700; color: var(--red); border-top: 1px dashed var(--line); padding-top: 6px; }
.warn { background: rgba(200, 55, 45, .14); border-radius: 12px; padding: 8px 12px; font-size: .9rem; margin-bottom: 10px; }
.hint { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.sheet-acts { display: grid; gap: 8px; }
.sheet-acts .row { display: flex; gap: 8px; }
.sheet-acts .row .btn { flex: 1; }
.choices { display: grid; gap: 8px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.choices button { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 12px; cursor: pointer; font-weight: 700; color: var(--green); text-align: left; min-height: 56px; }
.toast { position: fixed; z-index: 50; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
