:root {
  --orange: #F47B20;
  --orange-deep: #D9650F;
  --orange-soft: #FFE3CC;
  --ink: #141414;
  --ink-2: #4a4440;
  --muted: #8a817a;
  --cream: #FFF6EC;
  --card: #FFFFFF;
  --line: #EEDFD0;
  --danger: #C62D1F;
  --radius: 22px;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shell: 480px;
  --dock-h: 92px;
  --tab-h: 74px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--ink) var(--doodle);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .95; margin: 0; }
.ic { flex: none; }

#app {
  max-width: var(--shell);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,.4);
}
.screen { padding: 0 16px calc(var(--tab-h) + 24px); }
.screen.product, .screen.cart, .screen.checkout { padding-bottom: calc(var(--dock-h) + 24px); }

/* ── Splash ─────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: var(--orange) var(--doodle);
  transition: opacity .45s ease, transform .45s ease;
}
#splash img { width: min(56vw, 240px); animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 10px 30px rgba(0,0,0,.25)); }
#splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ── Home ───────────────────────────────────────────── */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 10px; }
.home-top .logo { height: 46px; width: auto; }
.region {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 10px; font-size: 12px; font-weight: 700; max-width: 60%;
}
.region select { border: 0; background: transparent; font-weight: 700; font-size: 12px; appearance: none; -webkit-appearance: none; padding-right: 2px; min-width: 0; text-overflow: ellipsis; }
.region::after { content: "▾"; font-size: 11px; }

.hero {
  position: relative; overflow: hidden;
  background: var(--orange) var(--doodle);
  border-radius: var(--radius);
  min-height: 210px; padding: 22px 20px;
  display: flex; align-items: flex-end;
  margin-top: 4px;
}
.hero-text { position: relative; z-index: 1; max-width: 58%; }
.hero h2 { font-size: 46px; color: #fff; text-shadow: 3px 3px 0 var(--ink); }
.hero p { margin: 10px 0 0; color: var(--ink); font-weight: 700; font-size: 13px; line-height: 1.35; }
/* Mirrored so the fox looks at the headline and only the back of his neck runs off the edge. */
.hero-fox { position: absolute; right: -34px; bottom: -6px; width: 58%; max-width: 240px; transform: scaleX(-1); filter: drop-shadow(6px 6px 0 rgba(0,0,0,.18)); }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 0 18px; height: 50px; margin: 16px 0 12px;
}
.search input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; outline: none; font-size: 15px; font-weight: 600; }
.search input::placeholder { color: #aaa39d; }
.search:focus-within { box-shadow: 0 0 0 3px var(--orange); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 16px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--card);
  font-weight: 700; font-size: 13px;
}
.chip.on { background: var(--orange); color: #fff; border-color: var(--orange); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.section-head h3 { font-size: 26px; }
.count { font-size: 13px; font-weight: 600; color: var(--muted); }
.pill-sm { background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 999px; }

.cards { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card { position: relative; flex: none; width: 168px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.grid .card { width: auto; }
.card-art { aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; border: 2px solid var(--ink); }
.card-art .art { width: 84%; }
.art.photo { width: 100% !important; height: 100%; object-fit: cover; border-radius: inherit; }
.card-heart { position: absolute; top: 8px; right: 8px; }
.card-name { font-weight: 800; font-size: 14px; margin-top: 10px; text-transform: uppercase; letter-spacing: .01em; }
.card-meta { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.card-price { font-family: var(--display); font-size: 22px; color: var(--orange-deep); margin-top: 4px; }
.card-price small { font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--muted); }

/* Illustration backdrops per product type */
.card-art, .row-art, .p-hero { background-color: #FFD3AE; }
.art-mince  { background: #FFD3AE var(--doodle-sm, none); }
.art-frames { background: #FFC08A; }
.art-necks  { background: #FFE7D1; }
.art-wings  { background: #FFB984; }
.art-box    { background: #FFDDBB; }

.heart {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 2px solid var(--ink); color: var(--ink);
}
.heart.on { background: var(--ink); color: var(--orange); }
.heart.on .ic { fill: currentColor; }

.run {
  display: flex; align-items: center; gap: 14px; margin-top: 18px;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 16px;
}
.run-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; flex: none; color: var(--ink); }
.run b { display: block; font-size: 14px; }
.run span { display: block; font-size: 12px; color: #d8cfc7; margin-top: 2px; font-weight: 600; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row-art { width: 74px; height: 74px; border-radius: 16px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); }
.row-art .art { width: 84%; }
.row-body { flex: 1; min-width: 0; }
.row-name { font-family: var(--display); font-size: 20px; text-transform: uppercase; line-height: 1; }
.row-blurb { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.35; }
.row-price { font-size: 13px; font-weight: 800; color: var(--orange-deep); margin-top: 5px; }
.plus {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--orange); color: #fff; display: grid; place-items: center;
  box-shadow: 0 3px 0 var(--ink); transition: transform .1s;
}
.plus:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.empty-line { color: var(--muted); font-weight: 600; text-align: center; padding: 30px 0; }
.foot { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; margin: 26px 0 0; line-height: 1.6; }

/* ── Tab bar ────────────────────────────────────────── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--shell); z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--ink); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #9c938c; font-size: 10px; font-weight: 700; padding: 6px 0; }
.tabbar a.on { color: var(--orange); }
.badge { position: absolute; top: 0; left: calc(50% + 6px); background: var(--orange); color: #fff; font-size: 10px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--ink); }

/* ── Top bar (inner screens) ────────────────────────── */
.topbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 14px 0 6px; }
.topbar h1 { text-align: center; font-size: 28px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--ink); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.light { border-color: var(--ink); }

/* ── Product ────────────────────────────────────────── */
.screen.product { padding-left: 0; padding-right: 0; }
.p-hero { position: relative; padding: 14px 16px 40px; background-image: var(--doodle); }
.p-hero.art-mince  { background-color: #FFB984; }
.p-bar { display: flex; justify-content: space-between; }
.p-bar .heart { width: 44px; height: 44px; }
.p-art { width: 68%; max-width: 280px; margin: 0 auto; display: block; filter: drop-shadow(0 8px 0 rgba(0,0,0,.08)); }
.sheet { background: var(--cream); border-radius: 28px 28px 0 0; margin-top: -26px; position: relative; padding: 24px 16px 0; }
.p-name { font-size: 40px; }
.p-blurb { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin: 10px 0 12px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { display: inline-flex; align-items: center; gap: 5px; background: var(--orange-soft); color: var(--orange-deep); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; }
.label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 24px 0 10px; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.size { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.size b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.size span { font-weight: 800; font-size: 14px; }
.size small { font-size: 11px; color: var(--muted); font-weight: 600; }
.size.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.size.on span { color: var(--orange); }
.size.on small { color: #bbb; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; flex: none; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.stepper button:last-child { background: var(--orange); color: #fff; }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; }
.stepper.big button { width: 44px; height: 44px; }
.stepper.big output { min-width: 40px; font-size: 18px; }

.dock {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--shell); z-index: 10;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 70%, rgba(255,246,236,0));
}
.btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; height: 58px; padding: 0 24px; border-radius: 999px;
  background: var(--orange); color: #fff;
  font-family: var(--display); font-size: 21px; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 0 4px 0 var(--ink); transition: transform .1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.dark { background: var(--ink); box-shadow: 0 4px 0 var(--orange-deep); }
.btn span { font-size: 19px; }
.empty .btn, .done .btn { justify-content: center; }

/* ── Cart / receipt ─────────────────────────────────── */
.receipt {
  position: relative; background: var(--card); border-radius: 18px 18px 0 0;
  padding: 18px 18px 26px; margin-top: 16px;
  --zig: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  filter: drop-shadow(0 2px 0 var(--line));
}
.r-items { list-style: none; margin: 0; padding: 0; }
.r-items li { display: grid; grid-template-columns: 1fr auto; padding: 5px 0; }
.r-items b { font-family: var(--display); font-weight: 400; font-size: 18px; text-transform: uppercase; }
.r-items span { grid-row: 2; font-size: 12px; color: var(--muted); font-weight: 600; }
.r-items em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-weight: 800; }
.receipt hr { border: 0; border-top: 2px dashed var(--line); margin: 12px 0; }
.r-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; padding: 4px 0; color: var(--ink-2); }
.r-line.total { color: var(--ink); font-weight: 800; font-size: 15px; margin-top: 6px; padding-top: 10px; border-top: 2px dashed var(--line); }
.r-line.total span:last-child { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--orange-deep); }
.r-hint { font-size: 12px; color: var(--orange-deep); font-weight: 700; padding: 2px 0 4px; }

.empty { text-align: center; padding: 30px 12px; display: flex; flex-direction: column; align-items: center; }
.empty img { width: 180px; margin-bottom: 10px; }
.empty h2 { font-size: 36px; }
.empty p { color: var(--ink-2); font-weight: 500; line-height: 1.45; margin: 12px 0 22px; max-width: 280px; }
.empty-ic { width: 84px; height: 84px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }

/* ── Checkout ───────────────────────────────────────── */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 13px 14px; font-size: 16px; font-weight: 600; outline: none; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field.bad input, .field.bad select { border-color: var(--danger); }
.field em { display: block; color: var(--danger); font-size: 12px; font-weight: 700; font-style: normal; margin-top: 5px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.seg label { text-align: center; padding: 10px 6px; border-radius: 999px; font-size: 13px; font-weight: 800; cursor: pointer; }
.seg label.on { background: var(--ink); color: #fff; }
.seg input, .days input, .pay input { position: absolute; opacity: 0; pointer-events: none; }

.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.day { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 4px; text-align: center; cursor: pointer; }
.day b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; }
.day span { font-size: 12px; font-weight: 700; color: var(--muted); }
.day.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.day.on span { color: #fff; }
.day:has(input:focus-visible), .pay label:has(input:focus-visible), .seg label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

.pay { display: flex; flex-direction: column; gap: 8px; }
.pay label { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px 12px 44px; cursor: pointer; }
.pay label::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.pay label.on { border-color: var(--ink); }
.pay label.on::before { background: var(--orange); box-shadow: inset 0 0 0 3px #fff; }
.pay b { display: block; font-size: 14px; }
.pay span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fine { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; margin: 14px 0 0; line-height: 1.5; }

/* ── Order placed ───────────────────────────────────── */
.screen.done { padding: 0 0 30px; }
.done-hero { background: var(--orange) var(--doodle); text-align: center; padding: 30px 16px 54px; color: #fff; }
.done-hero img { width: 170px; margin: 0 auto 6px; animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.done-hero h1 { font-size: 48px; text-shadow: 3px 3px 0 var(--ink); }
.done-hero p { margin: 12px 0 0; font-weight: 800; color: var(--ink); }
.done .sheet { padding-bottom: 10px; }
.eta { text-align: center; }
.eta span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.eta b { display: block; font-size: 38px; margin: 4px 0; }
.eta small { font-weight: 600; color: var(--ink-2); }
.track { list-style: none; padding: 0; margin: 22px 0 6px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.track li { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.track li::after { content: ""; position: absolute; top: 12px; left: calc(50% + 16px); width: calc(100% - 26px); height: 3px; background: var(--line); border-radius: 2px; }
.track li:last-child::after { display: none; }
.track i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; }
.track li.on { color: var(--ink); }
.track li.on i { background: var(--orange); border-color: var(--orange); color: #fff; }
.done .btn { margin-top: 20px; }

.order-row { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px; margin-top: 12px; }
.order-row b { font-family: var(--display); font-weight: 400; font-size: 20px; display: block; }
.order-row span { font-size: 12px; color: var(--muted); font-weight: 600; }
.order-row em { font-style: normal; font-family: var(--display); font-size: 22px; color: var(--orange-deep); }
.again { align-self: flex-end; font-size: 12px; font-weight: 800; color: var(--orange-deep); padding: 8px 4px 0; }

/* ── Toast ──────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; transition: .25s; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
#toast .ic { color: var(--orange); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 520px) { #app { border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); } }

/* ── Card payments (Square) ─────────────────────────── */
.card-box { margin-top: 12px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallets:not(:has(#google-pay > *)):not(:has(#apple-pay:not([hidden]))) { display: none; }
#apple-pay { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; -apple-pay-button-style: black; height: 48px; width: 100%; border-radius: 10px; }
#card-container { min-height: 90px; }
.secure { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.pay-error { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #FDE8E6; color: var(--danger); font-weight: 700; font-size: 14px; line-height: 1.4; }
.btn .lbl { font-style: normal; }
.btn[disabled] { opacity: .7; cursor: progress; }
.link { color: var(--orange-deep); text-decoration: underline; }

.price-line { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.price-line b { font-size: 36px; color: var(--orange-deep); }
.price-line span { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.art-mince-red { background-color: #FFCDB8; }
.art-hearts, .art-giblets, .art-livers { background-color: #FFE0D4; }
.art-bone, .art-bones-small, .art-marrow { background-color: #FFE7D1; }
.art-wingtips, .art-feet { background-color: #FFC9A0; }

/* Delivery weeks */
.days.weeks { grid-template-columns: repeat(3, 1fr); }
.days.weeks .day b { font-size: 17px; line-height: 1.1; }
.days.weeks .day span { font-size: 11px; white-space: nowrap; }
.fine.left { text-align: left; margin-top: 8px; }

/* PayID details on the confirmation screen */
.payid { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 16px; margin: 16px 0 4px; }
.payid h3 { margin: 0 0 4px; font-size: 16px; }
.payid p { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.payid-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.payid-row span { flex: 1; white-space: nowrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.payid-row b { font-size: 16px; text-align: right; }
