/* Flowood Nutrition: disco-ball pinks, mosaic tiles, zebra & leopard accents. */
:root {
  --pink: #f6a9d6;          /* logo lettering */
  --magenta: #b4458a;       /* logo frame */
  --hot: #d6338a;           /* buttons & prices */
  --hot-2: #b4458a;
  --lilac: #c9a7f0;
  --bg: #fde8f3;            /* flyer blush */
  --surface: #ffffff;
  --tile: linear-gradient(135deg, #fde2f1, #f1e4fb);
  --ink: #2b1026;
  --muted: #7d5b73;
  --line: #f3d3e6;
  --ok: #059669;
  --warn-bg: #fff4d6;
  --warn-ink: #7a4a00;
  --err: #d11a4a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(180, 69, 138, .08), 0 8px 24px rgba(180, 69, 138, .10);
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --script: "Sacramento", "Brush Script MT", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140a12;
    --surface: #221320;
    --tile: linear-gradient(135deg, #34192d, #2a1a3a);
    --ink: #fde7f3;
    --muted: #c7a3bb;
    --line: #3b2236;
    --warn-bg: #3a2a08;
    --warn-ink: #fde68a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
a { color: var(--hot); }
h1, h2, h3, .btn, .link-btn, .cat-tabs a, .item-name, .item-price, .segmented span, .cart-bar, legend {
  font-family: var(--display);
}
h1 { font-size: 1.6rem; margin: .4em 0; line-height: 1.15; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; font-weight: 600; }
main { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.error { color: var(--err); font-weight: 600; }
.script { font-family: var(--script); font-weight: 400; color: var(--magenta); line-height: 1; }
[hidden] { display: none !important; }
@media (prefers-color-scheme: dark) { .script { color: var(--pink); } }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { height: 46px; width: auto; border-radius: 6px; display: block; }
.brand-status { font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.2; }
.top-actions { display: flex; gap: 6px; flex: none; }
.link-btn {
  font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--hot) 12%, transparent); color: var(--hot);
}
@media (max-width: 420px) { .hide-sm { display: none; } .brand-status { max-width: 110px; } }

.banner { max-width: 900px; margin: 12px auto 0; padding: 12px 16px; border-radius: 12px; background: #f3e8ff; color: #581c87; }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
@media (max-width: 932px) { .banner { margin: 12px 16px 0; } }

/* Hero: disco night */
.hero {
  position: relative; overflow: hidden; margin: 16px 0 0; padding: 22px 20px 20px; border-radius: 26px 26px 0 0;
  color: #fff; display: flex; align-items: center; gap: 18px;
  background:
    radial-gradient(circle at 18% 30%, rgba(246, 169, 214, .35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(201, 167, 240, .30), transparent 45%),
    #140a12;
}
.hero::after { /* sparkles */
  content: "✦  ✧   ✦     ✧  ✦"; position: absolute; top: 10px; right: 18px; color: var(--pink);
  letter-spacing: .3em; font-size: .9rem; opacity: .8; pointer-events: none;
}
.hero-ball { width: 150px; height: 150px; flex: none; filter: drop-shadow(0 0 24px rgba(246, 169, 214, .45)); animation: spin-glow 6s ease-in-out infinite; }
@keyframes spin-glow { 50% { transform: rotate(-4deg) scale(1.03); filter: drop-shadow(0 0 34px rgba(246, 169, 214, .7)); } }
@media (prefers-reduced-motion: reduce) { .hero-ball { animation: none; } }
.hero-script { font-size: 3.1rem; color: var(--pink) !important; margin: 0; }
.hero h1 { margin: .1em 0 .2em; font-size: 1.45rem; }
.hero-sub { margin: 0; opacity: .9; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hero-chips span {
  font-family: var(--display); font-weight: 600; font-size: .82rem; padding: 5px 10px; border-radius: 999px;
  background: rgba(246, 169, 214, .16); border: 1px solid rgba(246, 169, 214, .4); color: #ffe3f3;
}
@media (max-width: 560px) {
  .hero { flex-direction: column; text-align: center; padding-top: 16px; }
  .hero-ball { width: 170px; height: 170px; }
  .hero-chips { justify-content: center; }
}
.mosaic-strip {
  height: 18px; border-radius: 0 0 10px 10px;
  background: url("/brand/mosaic-strip.webp") repeat-x left center / auto 100%, var(--magenta);
}

.cat-tabs {
  position: sticky; top: 63px; z-index: 10; display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 0 10px; background: var(--bg); scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a {
  flex: none; padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line);
}
.cat-tabs a:hover { border-color: var(--pink); }

.category { margin: 14px 0 28px; }
.cat-title { font-size: 3rem; margin: 0 0 2px; }
.nutri {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--pink) 25%, var(--surface)); color: var(--magenta);
}
@media (prefers-color-scheme: dark) { .nutri { color: var(--pink); } }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.item {
  display: flex; gap: 12px; align-items: stretch; text-align: left; width: 100%;
  padding: 10px; border: 2px solid transparent; border-radius: var(--radius);
  background: var(--surface); color: inherit; font: inherit; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .1s ease, border-color .15s;
}
.item:hover { border-color: var(--pink); }
.item:active { transform: scale(.98); }
.item.soldout { opacity: .5; cursor: not-allowed; }
.item-art { flex: none; width: 80px; min-height: 84px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--tile); }
.item-art img { width: 100%; height: 100%; object-fit: cover; }
.item-info { display: flex; flex-direction: column; min-width: 0; }
.item-name { font-weight: 600; font-size: 1.08rem; }
.item-desc { font-size: .86rem; color: var(--muted); flex: 1; }
.item-price { font-weight: 700; color: var(--hot); margin-top: 4px; }

/* Drink artwork */
.drink { display: block; position: relative; width: 34px; height: 54px; }
.drink.tea {
  border-radius: 3px 3px 11px 11px; margin-top: 8px;
  background: linear-gradient(180deg, var(--l1) 0%, var(--l2) 52%, var(--l3) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), inset 6px 0 0 rgba(255, 255, 255, .25);
}
.drink.tea::before { /* straw */
  content: ""; position: absolute; left: 55%; top: -16px; width: 4px; height: 24px; border-radius: 2px;
  background: repeating-linear-gradient(180deg, #fff 0 4px, var(--pink) 4px 8px); transform: rotate(12deg);
}
.drink.tea::after { /* lid */
  content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .85);
}
.drink.shake {
  width: 34px; height: 48px; margin-top: 16px; border-radius: 3px 3px 11px 11px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--l1) 70%, #fff), var(--l1));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
}
.drink.shake::after { /* whipped dome */
  content: ""; position: absolute; left: -3px; right: -3px; top: -14px; height: 18px; border-radius: 20px 20px 4px 4px;
  background: radial-gradient(circle at 30% 40%, #fff, #fbe7f3); box-shadow: 0 -2px 0 rgba(255, 255, 255, .6);
}
.drink.shake::before {
  content: ""; position: absolute; left: 60%; top: -26px; width: 4px; height: 18px; border-radius: 2px; background: var(--hot); transform: rotate(14deg);
}
.duo { display: flex; gap: 4px; align-items: flex-end; transform: scale(.85); }

/* Buttons & fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary { background: linear-gradient(135deg, var(--hot), var(--hot-2)); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(214, 51, 138, .3); }
.btn.big { width: 100%; padding: 16px; font-size: 1.15rem; margin-top: 8px; }
.btn:disabled { opacity: .6; cursor: progress; }
.back { background: none; border: 0; color: var(--hot); font: inherit; font-weight: 600; padding: 16px 0 0; cursor: pointer; }
.page-script { font-size: 3.2rem; margin: .1em 0 .1em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.field { display: block; margin: 10px 0; font-weight: 600; font-size: .9rem; flex: 1; min-width: 0; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; font-weight: 400;
  border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--hot); }
.row { display: flex; gap: 12px; }
@media (max-width: 480px) { .row { flex-direction: column; gap: 0; } }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.check input { accent-color: var(--hot); width: 18px; height: 18px; }
.note-box { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--pink) 18%, var(--surface)); font-size: .9rem; }
.note-box:empty { display: none; }
.note-box.warn { background: var(--warn-bg); color: var(--warn-ink); }

.segmented { display: flex; gap: 8px; }
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; padding: 12px 8px; border-radius: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid var(--line); background: var(--bg);
}
.segmented input:checked + span { border-color: var(--hot); background: color-mix(in srgb, var(--hot) 12%, var(--surface)); color: var(--hot); }
.segmented input:disabled + span { opacity: .4; cursor: not-allowed; }
.segmented input:focus-visible + span { outline: 2px solid var(--hot); }

/* Cart */
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-lines li:last-child { border-bottom: 0; }
.line-main { display: flex; justify-content: space-between; gap: 12px; }
.line-qty { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.line-qty button, .qty button {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg);
  color: var(--ink); font-size: 1.2rem; cursor: pointer;
}
.totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; }

.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  width: min(560px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border: 0; border-radius: 999px; font-size: 1.05rem; font-weight: 600; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--hot), var(--hot-2)); box-shadow: 0 10px 30px rgba(214, 51, 138, .4);
}
.cart-count { background: rgba(255, 255, 255, .25); border-radius: 999px; padding: 2px 10px; }

/* Item sheet */
.sheet {
  padding: 0; border: 0; border-radius: 24px; width: min(520px, calc(100% - 24px)); max-height: 92vh;
  background: var(--surface); color: var(--ink); overflow: hidden;
}
.sheet::backdrop { background: rgba(20, 10, 18, .6); }
.sheet form { display: flex; flex-direction: column; max-height: 92vh; position: relative; }
.sheet-hero {
  height: 150px; flex: none; display: grid; place-items: center; overflow: hidden; position: relative;
  background: radial-gradient(circle at 30% 30%, rgba(246, 169, 214, .45), transparent 55%), #140a12;
}
.sheet-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: url("/brand/mosaic-strip.webp") repeat-x left center / auto 100%; }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-hero > .drink, .sheet-hero > .duo { transform: scale(1.6); }
.sheet-body { padding: 16px; overflow-y: auto; }
.sheet-body h2 { font-size: 1.5rem; margin-bottom: .1em; }
.sheet-body > p { margin: 0 0 8px; }
.sheet-actions { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.sheet-actions .btn { flex: 1; }
.sheet-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: #222; font-size: 1rem; cursor: pointer;
}
.qty { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.opt-group { border: 0; padding: 0; margin: 14px 0; }
.opt-group legend { font-weight: 600; display: flex; gap: 8px; align-items: baseline; padding: 0; margin-bottom: 6px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt span:nth-child(2) { flex: 1; }
.opt input { width: 20px; height: 20px; accent-color: var(--hot); }
.opt-select { font-family: var(--display); font-size: 1rem; }
.opt.out { opacity: .5; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 13px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  border: 2px solid var(--line); background: var(--bg); transition: background .1s, border-color .1s;
}
.chip input:checked + span { border-color: var(--hot); background: color-mix(in srgb, var(--hot) 14%, var(--surface)); color: var(--hot); }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 2px solid var(--hot); outline-offset: 2px; }
.chip.out { cursor: not-allowed; }
.chip.out span { opacity: .45; text-decoration: line-through; }

/* Order page */
.order-hero { text-align: center; overflow: hidden; position: relative; padding-top: 26px; }
.order-hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: url("/brand/leopard.webp") repeat-x left center / auto 100%;
}
.order-num { font-family: var(--display); font-weight: 700; color: var(--hot); }
.steps { display: flex; list-style: none; padding: 0; margin: 20px 0 4px; counter-reset: s; }
.steps li { flex: 1; position: relative; font-size: .75rem; color: var(--muted); padding-top: 30px; }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--line); color: var(--muted); z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.steps li:first-child::after { display: none; }
.steps li.done::before { content: "✓"; background: var(--pink); color: #fff; }
.steps li.done::after, .steps li.now::after { background: var(--pink); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::before { background: var(--hot); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--hot) 25%, transparent); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.refund { background: #e0f2fe; color: #075985; }
.refund-line { color: #0369a1; font-weight: 600; }
.pill.s-received { background: #f3e8ff; color: #6b21a8; }
.pill.s-preparing { background: #fef3c7; color: #92400e; }
.pill.s-ready, .pill.s-out_for_delivery { background: #fce7f3; color: #9d174d; }
.pill.s-completed { background: #d1fae5; color: #065f46; }
.pill.s-cancelled { background: #fee2e2; color: #991b1b; }

.order-list { list-style: none; padding: 0; }
.order-list a {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px; margin-bottom: 10px; color: inherit;
  text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.order-list .right { text-align: right; }

/* Footer */
.footer { margin-top: 36px; color: var(--muted); font-size: .92rem; }
.zebra-band { height: 34px; background: url("/brand/zebra.webp") repeat-x left center / auto 100%, #6c6e78; }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 20px 16px 28px; display: flex; gap: 18px; align-items: flex-start; }
.footer-ball { flex: none; width: 96px; height: 96px; }
.footer-script { font-size: 2.4rem; margin: 0 0 4px; }
.hours { list-style: none; padding: 0; margin: 8px 0; max-width: 240px; }
.hours li { display: flex; justify-content: space-between; }
@media (max-width: 480px) { .footer-ball { width: 64px; height: 64px; } }

.area-note { margin: 4px 0 0; color: var(--muted); }
.custom-tip { max-width: 200px; }
#payNote code { background: var(--surface); padding: 1px 5px; border-radius: 5px; font-weight: 700; }
.area-note.ok { color: var(--ok); font-weight: 600; }

.notify-box { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--pink) 15%, var(--surface)); }
.notify-title { margin: 0 0 6px; font-family: var(--display); font-weight: 600; }
.notify-box .check { margin: 4px 0; }
.fine { margin: 0 0 6px 26px; font-size: .78rem; color: var(--muted); }

.pick-count { margin: -2px 0 8px; min-height: 1.2em; font-size: .9rem; font-weight: 600; color: var(--hot); }
.chip-price { font-weight: 500; opacity: .8; margin-left: 2px; }

/* − 0 + counters (e.g. 2× Pom Lift) */
.step-opt { cursor: default; }
.step-opt.on span:first-child { font-weight: 700; color: var(--hot); }
.stepper { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }
.stepper button {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg);
  color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; touch-action: manipulation;
}
.stepper button:not(:disabled):active { background: var(--line); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper b { min-width: 1.2em; text-align: center; font-family: var(--display); font-size: 1.1rem; }
