:root {
  --night: #0d2419;
  --cream: #fff8ec;
  --cream-2: #f4e8d2;
  --line: #e6d7bc;
  --ink: #2a1d14;
  --ink-soft: #6b5646;
  --gold: #e6b450;
  --gold-soft: #f3d79a;
  --berry: #b8283a;

  /* status: fill colour for marks, ink colour for text */
  --good: #0aac23;  --good-ink: #006c10;  --good-bg: #e2f4e4;
  --bad: #dc3c3d;   --bad-ink: #a8232a;   --bad-bg: #fbe4e3;
  --warn: #fbb315;  --warn-ink: #7a4d00;  --warn-bg: #fdf0d2;
  --none: #c2b8aa;  --none-ink: #6b5f55;  --none-bg: #efe8de;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, #2b5e43 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #2a0f15 0%, transparent 50%),
    var(--night);
  background-attachment: fixed;
  line-height: 1.45;
}
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }
a { color: var(--gold-soft); }
code { font-size: .85em; background: rgba(0, 0, 0, .25); padding: 1px 5px; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.small { font-size: .8rem; }
.num, table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* tones shared by marks, glyphs and pills */
.tone-good { --tone: var(--good); --tone-ink: var(--good-ink); --tone-bg: var(--good-bg); }
.tone-seen { --tone: var(--good); --tone-ink: var(--good-ink); --tone-bg: var(--good-bg); }
.tone-bad  { --tone: var(--bad);  --tone-ink: var(--bad-ink);  --tone-bg: var(--bad-bg); }
.tone-warn { --tone: var(--warn); --tone-ink: var(--warn-ink); --tone-bg: var(--warn-bg); }
.tone-none { --tone: var(--none); --tone-ink: var(--none-ink); --tone-bg: var(--none-bg); }
/* "seen" uses the good colour with diagonal stripes, so it never relies on colour alone */
.seg.tone-seen, .swatch.tone-seen, .tile.tone-seen .swatch, .status.tone-seen .dot {
  background: repeating-linear-gradient(135deg, var(--good) 0 3px, #8fd99a 3px 6px);
}

/* ---------- Header ---------- */
.hero { text-align: center; padding: 48px 16px 22px; max-width: 760px; margin: 0 auto; }
.eyebrow { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; font-weight: 800; margin: 0 0 8px; }
h1 {
  font-family: "Fraunces", Georgia, serif; font-weight: 800;
  font-size: clamp(2.1rem, 6.5vw, 3.6rem); line-height: 1.05; margin: 0 0 12px;
  text-shadow: 0 2px 0 #0006, 0 0 40px rgba(230, 180, 80, .25);
}
.lede { color: #e9dcc4; margin: 0 auto; max-width: 600px; }

main { max-width: 1240px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- Panels ---------- */
.panel { background: var(--cream); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.panel a { color: #8a3a10; }

/* ---------- Dashboard ---------- */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-label { font-size: .78rem; font-weight: 800; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.tile .swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }
.tile-value { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: .76rem; color: var(--ink-soft); }
.charts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 12px; }
.chart { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; }
.chart figcaption { font-weight: 800; font-size: .9rem; margin-bottom: 10px; }
.chart figcaption span { font-weight: 600; color: var(--ink-soft); font-size: .78rem; margin-left: 6px; }
.chart-empty { margin: 8px 0; color: var(--ink-soft); font-size: .88rem; }
.segbar { display: flex; gap: 2px; height: 26px; }
.seg { border: 0; padding: 0; min-width: 6px; cursor: pointer; background: var(--tone); border-radius: 0; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg:only-child { border-radius: 4px; }
.seg:hover { filter: brightness(1.08); }
.seg.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 10px 0 0; font-size: .82rem; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }
svg.history { width: 100%; height: auto; display: block; overflow: visible; }
svg.history .grid { stroke: #ece3d3; stroke-width: 1; }
svg.history .tick { fill: var(--ink-soft); font-size: 10px; font-family: inherit; }
svg.history .line { fill: none; stroke: var(--good); stroke-width: 2; }
svg.history .area { fill: var(--good); opacity: .12; }
svg.history .cross { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
svg.history .hit { fill: transparent; }

/* ---------- Controls ---------- */
.search-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { flex: 1 1 300px; }
.search input, .select select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 999px; padding: 9px 16px;
}
.select { flex: 0 1 260px; }
.search input:focus, .select select:focus { outline: none; border-color: var(--gold); }
.view-toggle { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; }
.view-toggle button { font: inherit; font-weight: 800; font-size: .86rem; border: 0; cursor: pointer; padding: 6px 14px; border-radius: 999px; background: transparent; color: var(--ink); }
.view-toggle button[aria-selected="true"] { background: var(--berry); color: #fff; }
.tips { margin: 10px 0 0; font-size: .85rem; color: var(--ink-soft); }
.tips summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.tips ul { margin: 6px 0 0; padding-left: 18px; }
.tips code { background: var(--cream-2); color: var(--ink); }
.facets { display: grid; gap: 8px; margin-top: 10px; }
.facet-box summary { cursor: pointer; font-weight: 800; font-size: .9rem; }
.facet-box summary .n { font-size: .76rem; color: #fff; background: var(--berry); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.facet-rows { display: grid; gap: 8px; margin-top: 10px; }
.facet { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: start; }
.facet-label { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-top: 6px; }
.facet-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fchip-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .84rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.fchip-btn .n { font-size: .74rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.fchip-btn.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.fchip-btn.on .n { color: var(--gold-soft); }
.fchip-btn:disabled { opacity: .4; cursor: default; }
.clear { justify-self: start; font: inherit; font-size: .84rem; font-weight: 800; border: 0; background: none; color: var(--berry); cursor: pointer; text-decoration: underline; padding: 0; }
.result-meta { color: var(--gold-soft); font-size: .92rem; margin: 4px 2px 12px; }
.result-meta b { color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  --foil: var(--berry);
  position: relative; background: var(--cream); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card::before, .detail-foil {
  content: ""; display: block; height: 12px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .35) 0 6px, transparent 6px 16px),
    linear-gradient(90deg, color-mix(in srgb, var(--foil) 70%, #000) 0%, var(--foil) 30%, color-mix(in srgb, var(--foil) 60%, #fff) 50%, var(--foil) 70%, color-mix(in srgb, var(--foil) 70%, #000) 100%);
}
.shop-group::before { background: linear-gradient(90deg, var(--gold), var(--gold-soft), var(--gold)); height: 6px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
button.card { font: inherit; text-align: left; border: 0; padding: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
button.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .2); }
button.card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.title-row { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.name { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.12rem; line-height: 1.2; }
.brand { display: block; color: var(--ink-soft); font-size: .84rem; margin: 2px 0 0; }
.flags { display: flex; gap: 2px; font-size: .95rem; flex: none; }
.facts { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .82rem; color: var(--ink-soft); }
.facts b { color: var(--ink); }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; background: var(--cream-2); border-radius: 999px; padding: 2px 9px; }
.fchip b { color: var(--berry); font-variant-numeric: tabular-nums; }
.shop-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* status pill */
.status { display: flex; gap: 8px; align-items: flex-start; border-radius: 12px; padding: 7px 10px; background: var(--tone-bg); color: var(--tone-ink); }
.status .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--tone); }
.status-label { font-weight: 800; font-size: .9rem; }
.status small { display: block; font-size: .78rem; font-weight: 600; opacity: .95; }

/* shop icons: the shop's own icon (or initials), ringed by the check result */
.shop-icon {
  --ring: var(--line);
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 9px; background: #fff;
  box-shadow: 0 0 0 2px var(--ring);
}
.shop-icon.tone-good, .shop-icon.tone-bad, .shop-icon.tone-warn { --ring: var(--tone); }
.shop-icon img { width: 22px; height: 22px; border-radius: 4px; object-fit: contain; }
.shop-icon .mono {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 9px;
  background: var(--shop); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .02em;
}
.shop-icon .glyph {
  position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: .62rem; font-weight: 900; line-height: 1;
  background: var(--tone); color: #fff; border: 2px solid var(--cream);
}
.shop-icon.tone-warn .glyph { color: #0b0b0b; }
.shop-icon.tone-none .glyph { background: var(--none); }
.shop-icon.small { width: 24px; height: 24px; border-radius: 7px; }
.shop-icon.small img { width: 16px; height: 16px; }
.shop-icon.small .mono { border-radius: 7px; font-size: .56rem; }
.shop-icon.tiny { width: 18px; height: 18px; border-radius: 5px; box-shadow: none; }
.shop-icon.tiny img { width: 14px; height: 14px; }
.shop-icon.tiny .mono { border-radius: 5px; font-size: .5rem; }
.shop-icon.large { width: 44px; height: 44px; border-radius: 12px; }
.shop-icon.large img { width: 30px; height: 30px; }
.shop-icon.large .mono { border-radius: 12px; font-size: .9rem; }
.glyph-inline {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; margin-right: 6px;
  font-size: .6rem; font-weight: 900; background: var(--tone); color: #fff; vertical-align: -2px;
}
.glyph-inline.tone-warn { color: #0b0b0b; }

/* ---------- Table view ---------- */
.table-wrap { padding: 0; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data thead th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); background: var(--cream-2); position: sticky; top: 0; white-space: nowrap; }
table.data thead th.num { text-align: right; }
table.data tbody tr[data-id] { cursor: pointer; }
table.data tbody tr[data-id]:hover, table.data tbody tr[data-id]:focus-visible { background: #fff; outline: none; }
.th-sort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.th-sort.on { color: var(--ink); text-decoration: underline; }
.th-sort.on::after { content: " ↓"; }
.t-name { display: block; font-weight: 800; }
.t-brand { display: block; font-weight: 600; color: var(--ink-soft); font-size: .8rem; }
.t-shops .shop-row { margin: 0 0 6px; }
.t-count { display: block; color: var(--ink-soft); font-size: .78rem; }
table.data .status { padding: 4px 8px; min-width: 190px; }

/* ---------- By shop ---------- */
.shop-head { display: flex; gap: 12px; align-items: center; }
.shop-head h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; margin: 0; }
.shop-head a { font-size: .82rem; color: #8a3a10; }
.tallies { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.tally { display: inline-flex; align-items: center; }
.shop-group .row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.shop-group .row:last-child { border-bottom: 0; }
.row-status { flex: 0 1 50%; font-size: .8rem; font-weight: 700; text-align: right; color: var(--ink-soft); text-decoration: none; }
a.row-status:hover { text-decoration: underline; }
.linkish { font: inherit; border: 0; background: none; padding: 0; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline dotted; }

.empty { text-align: center; font-size: 1.05rem; color: var(--gold-soft); padding: 40px 0; }

/* ---------- Popup ---------- */
dialog#detail, dialog#box {
  color-scheme: light;
  width: min(820px, calc(100% - 24px)); max-height: min(90vh, 980px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  overflow: auto; overscroll-behavior: contain;
}
dialog#detail::backdrop, dialog#box::backdrop { background: rgba(5, 15, 10, .65); backdrop-filter: blur(3px); }
dialog#detail[open], dialog#box[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.detail-foil { height: 16px; }
.detail-body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.detail-body h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; line-height: 1.15; margin: 0; padding-right: 40px; }
.detail-body a { color: #8a3a10; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); }
.tag.vegan { background: #dcefdf; color: #1b5e37; }
.tag.accidental { background: #e8f0d0; color: #4d5f12; }
.tag.check { background: #fde9c8; color: #7a4d00; }
.tag.alcohol { background: #f7d7dc; color: #8e1c2c; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0; }
.kv div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.kv dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.kv dd { margin: 2px 0 0; font-size: .92rem; }
.section-label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
table.data.mini { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
table.data.mini tr:last-child > * { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.shops-table { min-width: 680px; }
.shops-table td:nth-child(3), .shops-table td:nth-child(4), .shops-table td:nth-child(5) { white-space: nowrap; }
.cell-shop { display: inline-flex; align-items: center; gap: 8px; }
svg.timeline { width: 120px; height: 12px; display: block; }
svg.timeline .tl-bg { fill: var(--none-bg); }
svg.timeline .tl { fill: var(--tone); }

/* prices */
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: .84rem; color: var(--ink); }
.price-line .price { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pchg { font-size: .76rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--cream-2); color: var(--ink); font-variant-numeric: tabular-nums; }
.prices-table { min-width: 760px; }
s.was { color: var(--ink-soft); font-weight: 400; font-size: .85em; }
.pchg.offer { background: #f7d7dc; color: #8e1c2c; }
.prices-table td.num { white-space: nowrap; }
.prices-table tr.best > * { background: #fdf6e6; }
svg.pricechart { width: 140px; height: 30px; display: block; overflow: visible; }
svg.pricechart .grid { stroke: var(--line); stroke-width: 1; }
svg.pricechart .pline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg.pricechart .pdot { fill: var(--ink); stroke: #fff; stroke-width: 1.5; }
svg.pricechart .hit { fill: transparent; }
.notes { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.close {
  position: sticky; float: right; top: 12px; z-index: 5; margin: 24px 14px -60px 0;
  width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  border: 0; background: var(--cream-2); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.close:hover { background: #ead9bb; }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; left: 0; top: 0; z-index: 10; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--cream); font-size: .8rem; font-weight: 700;
  padding: 6px 9px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

/* ---------- About & footer ---------- */
.about { margin-top: 28px; padding: 14px 18px; border-radius: var(--radius); background: rgba(255, 248, 236, .07); border: 1px solid rgba(255, 248, 236, .14); }
.about summary { cursor: pointer; font-weight: 800; color: var(--gold-soft); }
.about li { margin: 6px 0; color: #e9dcc4; }
footer { text-align: center; padding: 10px 16px 40px; color: #cdbfa6; font-size: .9rem; }
footer p { margin: 4px 0; }
#edit-link { display: inline-block; margin-top: 8px; padding: 9px 18px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 800; text-decoration: none; }
#edit-link:hover { background: var(--gold-soft); }

@media (max-width: 600px) {
  .hero { padding-top: 32px; }
  .panel { padding: 12px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile-value { font-size: 1.5rem; }
  .facet { grid-template-columns: 1fr; gap: 4px; }
  .facet-label { padding-top: 0; }
  .select, .view-toggle { flex: 1 1 100%; }
  .view-toggle button { flex: 1; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  button.card, dialog#detail[open], dialog#box[open] { transition: none; animation: none; }
}

/* ---------- Minimal cards ---------- */
.card.mini .card-body { gap: 8px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--tone-bg); color: var(--tone-ink); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.pill.tone-seen .dot { background: repeating-linear-gradient(135deg, var(--good) 0 2px, var(--good-bg) 2px 4px); box-shadow: 0 0 0 1px var(--good); }
.mini-price { font-size: .9rem; white-space: nowrap; }
.mini-price b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.mini-price small { color: var(--ink-soft); font-size: .78rem; }
.mini-flavours { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .9rem; }
.ftext { font-size: .72rem; font-weight: 700; background: var(--cream-2); border-radius: 999px; padding: 1px 7px; }
.flavour-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flavour-stack li { display: inline-flex; align-items: baseline; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.flavour-stack b { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn { font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; background: var(--berry); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ghost { background: var(--cream-2); color: var(--ink); }
.hero-btn { margin-top: 10px; font-size: 1.02rem; padding: 12px 24px; background: var(--gold); color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }

/* ---------- Box builder ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.steps button { font: inherit; font-size: .82rem; font-weight: 800; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.steps .on button { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.steps .done button { color: var(--ink); }
.steps button:disabled { opacity: .45; cursor: default; }
.box-step { display: flex; flex-direction: column; gap: 10px; }
.box-step h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; margin: 6px 0 0; }
.box-step p { margin: 0; }
.box-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.budget { display: inline-flex; align-items: center; gap: 6px; font-size: 1.6rem; font-weight: 800; }
.budget input { font: inherit; width: 140px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.budget input:focus { outline: none; border-color: var(--gold); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--berry); }
.box-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.box-nav .muted { flex: 1; text-align: right; }
.box-note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.box-tiles .tile { background: #fff; }
.box-shop { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.box-shop header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--cream-2); }
.box-shop header .muted { margin-left: auto; font-weight: 800; color: var(--ink); }
.box-shop ul { list-style: none; margin: 0; padding: 0; }
.box-shop li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--cream); }
.qty button { font: inherit; font-weight: 800; width: 30px; height: 30px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--cream-2); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding-left: 10px; }
.qty b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.box-shop li:first-child { border-top: 0; }
.box-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.box-item .linkish { font-weight: 800; }
.box-price { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.box-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .84rem; }
.box-actions a { text-decoration: none; font-weight: 800; }
@media (max-width: 600px) {
  .box-shop li { grid-template-columns: 1fr auto auto; }
  .box-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; gap: 14px; }
  .box-nav .muted { flex-basis: 100%; order: -1; text-align: left; }
}

/* A flavour in a mixed box that isn't vegan: always shown, never colour alone. */
.nv-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fde8e4; border: 2px solid #b3261e; color: #5c1410; font-size: .95rem; line-height: 1.4; }
.nv-banner b { color: #8c1d18; }
.nv-icon { font-size: 1.25rem; line-height: 1.1; color: #b3261e; }
.nv-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #b3261e; color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .01em; }
.nv-text { display: inline-block; color: #8c1d18; font-weight: 800; font-size: .85rem; }
tr.nv-row td { background: #fde8e4; }
.tag.notvegan { background: #b3261e; color: #fff; border-color: #b3261e; }



.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-hint { margin: 6px 0 0; font-size: .9rem; color: rgba(255, 248, 235, .8); }
.hero-hint a { color: var(--gold); font-weight: 800; }

/* Floating liveness indicator */
.live { position: fixed; left: 14px; bottom: 14px; z-index: 40; max-width: calc(100vw - 28px); font-size: .85rem; }
.live summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(18, 32, 24, .92); color: #fff8eb; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 248, 235, .18); backdrop-filter: blur(6px); }
.live summary::-webkit-details-marker { display: none; }
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #9aa39c; flex: none; }
.live-dot.live { background: #3fcf6e; }
.live-dot.late { background: #f0b429; }
.live-dot.live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3fcf6e; animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
.live-panel { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--cream); color: var(--ink); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); width: min(300px, calc(100vw - 28px)); box-sizing: border-box; }
.live-panel dl { margin: 0; display: grid; gap: 8px; }
.live-panel dt { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.live-panel dd { margin: 2px 0 0; font-weight: 700; }
.live-panel p { margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .live-dot.live::after { animation: none; } }

/* Posts tagged with the hashtag, in the popup */
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.posts li { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.post-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.post-facts { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.post-text { margin: 6px 0 0; font-size: .9rem; color: var(--ink-soft); overflow-wrap: anywhere; white-space: pre-line; }
