/* Etiket — "Schap": the price comparator that knows your allergens.
 * White surfaces on a cool grey ground, one plum accent that collides with no
 * supermarket colour, Plus Jakarta Sans throughout, 16px cards, 999px pills.
 * Green, red and amber are reserved for the verdict. Allergens carry their
 * own colours (icons.js) in both themes. */
:root {
  --paper: #eef2f5;
  --panel: #ffffff;
  --panel-2: #f4f6f8;
  --line: #dfe5ea;
  --line-strong: #c5ced6;
  --ink: #10202e;
  --ink-2: #33465a;
  --muted: #5a6b7a;
  --muted-2: #8394a3;
  --divider: #dfe5ea;
  --accent: #5b2a86;
  --accent-ink: #ffffff;
  --accent-soft: #f1e9fa;
  --accent-600: #4a2070;
  --accent-700: #3a175a;
  --ok: #0f8a5f;  --ok-soft: #e3f4ec;
  --no: #c62f2f;  --no-soft: #fbe7e7;
  --spor: #b56b00; --spor-soft: #fbefdc;
  --danger: var(--no); --danger-soft: var(--no-soft);
  --amber: var(--spor); --amber-soft: var(--spor-soft);
  --mint: var(--ok); --mint-soft: var(--ok-soft);
  --shadow: 0 1px 2px rgba(16,32,46,.05);
  --shadow-lg: 0 16px 40px rgba(16,32,46,.18);
  --r-ctl: 12px;
  --r-card: 16px;
  --r-sheet: 22px;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Plus Jakarta Sans', system-ui, sans-serif;
  --bar-h: 64px;
  --rail-w: 300px;
  --tab-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1721; --panel: #182230; --panel-2: #1f2b3a; --line: #2a3747; --line-strong: #3b4a5c; --divider: #2a3747;
    --ink: #e8edf2; --ink-2: #c3cdd7; --muted: #94a3b3; --muted-2: #6f8091;
    --accent: #b58ee0; --accent-ink: #1a0f27; --accent-soft: #2c2140; --accent-600: #c7a6ea; --accent-700: #d9c1f2;
    --ok: #4fc48f; --ok-soft: #14322a; --no: #ff8080; --no-soft: #3a1c1c; --spor: #f0b25a; --spor-soft: #3a2b12;
    --shadow: none; --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1721; --panel: #182230; --panel-2: #1f2b3a; --line: #2a3747; --line-strong: #3b4a5c; --divider: #2a3747;
  --ink: #e8edf2; --ink-2: #c3cdd7; --muted: #94a3b3; --muted-2: #6f8091;
  --accent: #b58ee0; --accent-ink: #1a0f27; --accent-soft: #2c2140; --accent-600: #c7a6ea; --accent-700: #d9c1f2;
  --ok: #4fc48f; --ok-soft: #14322a; --no: #ff8080; --no-soft: #3a1c1c; --spor: #f0b25a; --spor-soft: #3a2b12;
  --shadow: none; --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14.5px; line-height: 1.45; padding-bottom: var(--tab-h); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .mono { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--panel); border-radius: 8px; }
.skip:focus { left: 8px; }
.hint { font-size: 12px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; font-size: 13px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); background: var(--panel); font-weight: 700; font-size: 14px; }
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-600); }
.field { min-height: 40px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); }
.field:focus { border-color: var(--accent); outline: none; }
.field.mini { min-height: 36px; font-size: 13px; width: 100%; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); }
.tag.shop { background: var(--shop, var(--panel-2)); color: var(--shop-ink, var(--ink)); }
.tag.bonus { background: var(--spor-soft); color: var(--spor); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

/* ------------------------------------------------------------- header */
.bar { display: flex; align-items: center; gap: 28px; height: var(--bar-h); padding: 0 32px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.bar-nav { display: flex; gap: 22px; margin-left: auto; }
.bar-nav a { font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.bar-nav a:hover { color: var(--ink); }
.bar-nav a[aria-current="page"], .bar-nav [data-nav][aria-current="page"] { color: var(--accent); }
/* the Informatie menu */
.nav-dd { position: relative; }
.nav-dd > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 6px 0; display: flex; align-items: center; gap: 5px; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-dd[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.nav-dd > summary:hover { color: var(--ink); }
.dd-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; display: flex; gap: 20px; min-width: 420px; padding: 14px 18px; background: var(--panel); border-radius: var(--r-card); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.dd-col { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.dd-col a { padding: 6px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.dd-col a:hover { background: var(--paper); color: var(--accent); }
.dd-col a:first-child { color: var(--accent); margin-bottom: 4px; }
.dd-more { border-left: 1px solid var(--line); padding-left: 16px; }
.dd-more a:first-child { color: var(--ink); margin-bottom: 0; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a, .lang span, .lang button { display: inline-flex; align-items: center; min-height: 30px; padding: 0 9px; font-size: 12px; font-weight: 700; color: var(--muted); border: 0; background: none; }
.lang [aria-current="true"] { background: var(--ink); color: var(--panel); }
.account[hidden], .menu-btn { display: none; }

/* ---------------------------------------------------------- search row */
.searchrow { display: flex; align-items: center; gap: 24px; padding: 18px 32px; background: var(--panel); border-bottom: 1px solid var(--line); }
.question { font-size: 20px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.question em { font-style: normal; color: var(--accent); }
.searchbar { display: flex; gap: 8px; flex: 1; max-width: 640px; }
.searchfield { position: relative; flex: 1; }
.searchfield input { width: 100%; height: 46px; padding: 0 40px 0 44px; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: var(--paper); font-size: 15px; font-weight: 600; }
.searchfield input:focus { border-color: var(--accent); background: var(--panel); outline: none; }
.searchfield input::placeholder { color: var(--muted-2); font-weight: 500; }
.search-icon { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; }
.search-clear:hover { background: var(--panel-2); }
.search-go { min-height: 46px; padding: 0 20px; }

/* --------------------------------------------------------- chip strips */
.quick { display: none; }
.chipstrip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 32px 0; }
.chipstrip .label { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; }
.chip .al { display: none; }
.chip button { border: 0; background: rgba(255,255,255,.18); color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.chip.strict { background: var(--panel); color: var(--ink-2); border: 1.5px solid var(--line); padding-right: 12px; }
.chipstrip .clear { margin-left: 4px; }

/* the allergen mark: coloured glyph, used by chips, tiles, rail rows and detail */
.al { --al: var(--muted); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--al) 14%, var(--panel)); color: var(--al); flex: none; }
.al svg { width: 14px; height: 14px; }
.al.may { background: transparent; border: 1.5px dashed var(--al); }
.al.hit { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--al); }
.al-more, .chip-more { font-size: 11.5px; color: var(--muted); font-weight: 700; }

/* --------------------------------------------------------------- layout */
.layout { display: block; padding: 14px 32px 40px; }
/* The filter panel: one dialog everywhere. The page dims to light grey
   behind it and the panel takes the width it needs: shops and strictness in
   the left column, the allergens as a wide tile grid on the right. */
.rail { display: none; position: fixed; top: 4vh; left: 50%; transform: translateX(-50%); width: min(1080px, 94vw); height: 92vh; z-index: 70; background: var(--panel); border-radius: var(--r-sheet); padding: 20px 28px 110px; overflow-y: auto; scrollbar-width: thin; box-shadow: var(--shadow-lg); }
.rail.open { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 40px; align-content: start; }
.rail-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rail-section.first, .strict-section, #brandSection { grid-column: 1; }
#allergenSection { grid-column: 2; grid-row: 2 / span 4; border-top: 0; padding-top: 8px; }
#allergenSection .tiles { grid-template-columns: repeat(3, 1fr); }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(238,242,245,.82); backdrop-filter: blur(2px); }
.sheet-foot { position: fixed; left: 50%; transform: translateX(-50%); bottom: 4vh; width: min(1080px, 94vw); z-index: 71; padding: 12px 28px 16px; background: var(--panel); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sheet) var(--r-sheet); display: none; }
.sheet-foot.open { display: block; }
.sheet-foot .btn { width: 100%; min-height: 52px; font-size: 15px; }
.check .via { font-size: 11px; color: var(--accent); font-weight: 700; margin-left: 6px; }
.rail-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.rail-title small, .rail-title-mobile { display: none; }
.rail-clear { margin-left: auto; white-space: nowrap; }
.rail-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 22px; margin-left: 8px; }
/* the scanner */
.scan-btn { display: none; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); }
.scan-btn svg { width: 22px; height: 22px; }
.scanner { position: fixed; inset: 0; z-index: 80; background: var(--ink); color: #fff; display: flex; flex-direction: column; }
.scanner-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 16px; }
.scanner-head .rail-close { background: rgba(255,255,255,.15); color: #fff; }
.scanner video { flex: 1; width: 100%; min-height: 0; object-fit: cover; background: #000; }
.scanner-hint { margin: 0; padding: 12px 16px 0; font-size: 14px; color: rgba(255,255,255,.8); }
.scanner-manual { display: flex; gap: 8px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.scanner-manual .field { flex: 1; min-height: 46px; }
.rail-section { padding: 14px 0 8px; border-top: 1px solid var(--line); }
.rail-section.first { border-top: 0; padding-top: 8px; }
.rail-section h2 { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.step-no { display: none; }
.step-hint { margin: 0 0 10px; }
.rail-head-inline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-head-inline .link-btn { font-size: 12px; }
.sync { display: none; }
.shopnotes { margin-top: 8px; }
.shopnotes > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent); list-style: none; min-height: 32px; display: flex; align-items: center; }
.shopnotes > summary::-webkit-details-marker { display: none; }
.shopnotes > summary::before { content: "+ "; }
.shopnotes[open] > summary::before { content: "− "; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 12.5px; }
.pill .count { display: none; }
.pill:hover { background: var(--line); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pill[aria-pressed="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--shop, transparent); }
.pill[aria-pressed="true"]:first-child::before { display: none; }
/* strictness rows as switches */
.check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.check > span { display: flex; flex-direction: column; gap: 2px; }
.check .hint { font-weight: 400; }
.strict-section .check input { order: 2; appearance: none; -webkit-appearance: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.strict-section .check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.strict-section .check input:checked { background: var(--ok); }
.strict-section .check input:checked::after { left: 19px; }
/* the fourteen as tiles; the other groups as rows under folded headings */
.agroup > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.agroup > summary::-webkit-details-marker { display: none; }
.agroup > summary::before { content: "+"; width: 18px; text-align: center; color: var(--accent); font-size: 15px; }
.agroup[open] > summary::before { content: "−"; }
.agroup:first-child > summary { display: none; }
.agroup .badge { margin-left: auto; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 6px; }
.tile { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 700; font-size: 12.5px; text-align: left; }
.tile svg { width: 20px; height: 20px; color: var(--al); flex: none; }
.tile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile:hover { border-color: var(--line-strong); }
.tile[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
/* half a family: the tile is neither off nor on, and says so */
.tile.partial { border-color: var(--ink); border-width: 2px; background: var(--accent-soft); }
.tile-n { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; color: var(--ink); }
.tile-n .half { width: 14px; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) 0 50%, var(--panel) 50%); border: 1.5px solid var(--ink); }
.brandbox { position: relative; }
.brand-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 260px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--shadow-lg); padding: 4px; }
.brand-list button { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.brand-list button:hover, .brand-list button.on { background: var(--paper); color: var(--accent); }
.brand-list small { color: var(--muted); font-weight: 600; }
.brand-none { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.tile[aria-pressed="true"] svg { color: var(--paper); }
.agroup:not(:first-child) .check { justify-content: flex-start; padding: 6px 0 6px 8px; font-weight: 600; }
.agroup:not(:first-child) .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.agroup .check .count { margin-left: 6px; font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
#allergenFilter { margin: 4px 0 10px; }
.folded > summary { cursor: pointer; list-style: none; min-height: 36px; display: flex; align-items: center; }
.folded > summary::-webkit-details-marker { display: none; }
.folded > summary h2::after { content: "+"; margin-left: auto; color: var(--accent); }
.folded[open] > summary h2::after { content: "−"; }
.brandbox { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.brandbox .field { flex: 1; min-width: 0; }

.filters-btn { min-height: 40px; padding: 0 16px 0 14px; border-radius: 999px; gap: 8px; }
.filters-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.filters-btn[aria-expanded="true"], .filters-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; line-height: 20px; }

/* -------------------------------------------------------------- results */
main { min-width: 0; }
.guides { padding: 0 32px; margin: 0 0 6px; }
.guides-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.guides-head h2 { font-size: 14px; }
.guides-head a { font-size: 13px; font-weight: 700; color: var(--accent); }
.guides-row { display: flex; gap: 6px; flex-wrap: wrap; }
.guide-card { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--panel); font-size: 12.5px; font-weight: 700; }
.guide-card:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 13px 18px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent-700); font-size: 14px; }
.suggest b { text-decoration: underline; text-underline-offset: 3px; }
.suggest-lbl { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.suggest-n { margin-left: auto; font-weight: 700; font-size: 13px; }
.suggest:hover { background: var(--accent); color: var(--accent-ink); }
.results-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.results-head .sortwrap { margin-left: auto; }
.results-count { font-size: 14px; }
.results-count b { font-size: 20px; font-weight: 800; }
.results-count .sub { color: var(--muted); }
.sortwrap { display: flex; align-items: center; gap: 8px; }
.sortwrap .lbl { font-size: 12.5px; color: var(--muted); }
.field.sort { min-height: 36px; padding: 0 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.notice { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 16px; border-radius: var(--r-ctl); background: var(--panel); font-size: 13px; color: var(--muted); }
.notice b { color: var(--ink); }
.notice.warn { background: var(--spor-soft); color: var(--spor); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; background: var(--panel); border-radius: var(--r-card); padding: 16px; color: var(--ink); transition: box-shadow .15s; box-shadow: var(--shadow); }
.card:hover { box-shadow: 0 0 0 1.5px var(--line-strong), var(--shadow-lg); }
.card .thumb { display: none; }
.card .body { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.verdict { align-self: flex-start; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 10px; line-height: 1.2; }
.verdict.past { background: var(--ok-soft); color: var(--ok); }
.verdict.bevat { background: var(--no-soft); color: var(--no); }
.verdict.sporen { background: var(--spor-soft); color: var(--spor); }
.verdict.nodata { background: var(--panel-2); color: var(--muted); }
.card .title { font-size: 15px; font-weight: 800; line-height: 1.25; margin-top: 2px; }
.card .sub { font-size: 12.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; }
.card .al-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 26px; margin: 2px 0; }
.achip { --al: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px 3px 6px; border-radius: 999px; background: color-mix(in srgb, var(--al) 13%, var(--panel)); color: color-mix(in srgb, var(--al) 72%, var(--ink)); }
.achip svg { width: 14px; height: 14px; color: var(--al); }
.achip.may { background: transparent; border: 1.5px dashed var(--al); }
.achip small { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.achip.hit { box-shadow: 0 0 0 1.5px var(--al); }
.chip-none { font-size: 11.5px; color: var(--muted); }
.offers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.offers a { display: contents; }
.tag.offer { padding: 3px 10px 3px 3px; gap: 7px; background: var(--panel-2); color: var(--ink); font-size: 13px; }
.tag.offer .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--shop, var(--muted)); color: var(--shop-ink, #fff); font-style: normal; font-size: 9.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tag.offer .shopname { display: none; }
.tag.offer > b { font-weight: 800; }
.tag.offer.best { background: var(--ok-soft); color: var(--ok); }
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--panel); border-radius: var(--r-card); }
.skeleton i { display: block; border-radius: 6px; background: var(--panel-2); animation: sk 1.2s infinite; }
.sk-img { width: 90px; height: 22px; border-radius: 999px; } .sk-t { height: 16px; width: 80%; } .sk-s { height: 12px; width: 50%; } .sk-p { height: 24px; width: 40%; margin-top: 8px; }
@keyframes sk { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } * { transition: none !important; } }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 20px 0; font-weight: 700; }
.pager button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--panel); font-weight: 700; }
.pager button:disabled { opacity: .4; cursor: default; }
.empty { text-align: center; padding: 48px 20px; background: var(--panel); border-radius: var(--r-card); }
.empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0; }
.relax { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 16px auto 0; }
.relax .btn { justify-content: space-between; text-align: left; border-radius: var(--r-ctl); }
.relax .btn b { color: var(--ok); font-weight: 800; }
.page-head { margin: 8px 0 18px; }
.page-head h1 { font-size: 28px; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; max-width: 64ch; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 20px); transform: translateX(-50%); z-index: 90; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13px; }

/* --------------------------------------------------------------- detail */
.detail { background: transparent; padding: 0; max-width: 860px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.detail-head { display: flex; gap: 24px; flex-wrap: wrap; }
.detail-head .photo { width: 200px; height: 200px; flex: 0 0 200px; background: var(--panel); border-radius: var(--r-card); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-head .photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-head .photo[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.detail-head .info { flex: 1; min-width: 260px; }
.detail-head .meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head h1 { font-size: 30px; margin: 10px 0 6px; }
.detail-head .desc { color: var(--ink-2); font-size: 14px; max-width: 62ch; margin: 0 0 12px; }
.pricecard { background: var(--panel); border-radius: var(--r-card); padding: 14px 16px; margin: 14px 0 0; }
.pricecard h2 { font-size: 13.5px; margin-bottom: 10px; }
.pricecard .offers { flex-direction: column; align-items: stretch; gap: 6px; padding: 0; border: 0; margin: 0; }
.pricecard .tag.offer { justify-content: flex-start; font-size: 14px; padding: 6px 12px 6px 6px; }
.pricecard .tag.offer .shopname { display: inline; font-weight: 700; }
.pricecard .tag.offer > b { margin-left: auto; }
.pricecard .note { margin: 8px 0 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; margin: 14px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.nutri { display: inline-flex; gap: 2px; }
.nutri span { display: none; }
.nutri .on { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; }
.nutri .A.on { background: #038141; } .nutri .B.on { background: #85bb2f; } .nutri .C.on { background: #fecb02; } .nutri .D.on { background: #ee8100; } .nutri .E.on { background: #e63e11; }
.section { margin-top: 24px; }
.section h2 { font-size: 16px; margin-bottom: 10px; }
.ticket { background: var(--panel); border-radius: var(--r-card); padding: 6px 16px 14px; }
.ticket-stub { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.statement { font-size: 15px; line-height: 1.7; margin: 10px 0 0; }
.statement b { font-weight: 800; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-item { border-bottom: 1px solid var(--line); }
.ing-list > .ing-item:last-child { border-bottom: 0; }
.ing-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14.5px; font-weight: 500; }
.ing-item.has-al > .ing-row { font-weight: 600; }
.ing-text b { font-weight: 800; }
.ing-marks { display: inline-flex; gap: 3px; flex: none; min-width: 24px; }
.ing-marks .al, .ing-nomark { width: 24px; height: 24px; flex: none; }
.ing-text { flex: 1; min-width: 0; }
.ing-detail { color: var(--muted); font-weight: 500; }
.ing-pct { min-width: 56px; text-align: right; color: var(--ink-2); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ing-list.sub { margin: 0 0 6px 36px; padding-left: 12px; border-left: 2px solid var(--line); }
.ing-list.sub .ing-row { padding: 6px 0; font-size: 13.5px; }
.ing-list.sub .ing-item { border-bottom: 0; }
.ing-list.sub .ing-marks .al, .ing-list.sub .ing-nomark { width: 20px; height: 20px; }
.ing-mark { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-700); font-size: 11px; font-weight: 800; flex: none; }
.ing-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ing-note b { font-weight: 800; margin-right: 4px; }
.ing-note.may b { color: var(--spor); }
.ing-note-text { color: var(--ink-2); }
.ing-foot { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.sdiff { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.sdiff-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: var(--r-ctl); background: var(--panel-2); font-size: 14px; }
.sdiff-body { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; line-height: 1.5; min-width: 0; }
.sdiff-lbl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; flex: 0 0 150px; padding-top: 3px; color: var(--muted); }
.sdiff-row.add { background: var(--ok-soft); } .sdiff-row.add .sdiff-lbl { color: var(--ok); }
.sdiff-row.rm { background: var(--no-soft); } .sdiff-row.rm .sdiff-lbl { color: var(--no); }
.sdiff-row.pct { background: var(--spor-soft); } .sdiff-row.pct .sdiff-lbl { color: var(--spor); }
.sdiff-row.al-add { background: var(--no-soft); border: 1.5px solid var(--no); } .sdiff-row.al-add .sdiff-lbl { color: var(--no); }
.sdiff-row.al-rm { background: var(--ok-soft); } .sdiff-row.al-rm .sdiff-lbl { color: var(--ok); }
.sdiff-name { font-weight: 600; }
.sdiff-name del { color: var(--no); text-decoration: line-through; } .sdiff-name ins { color: var(--ok); text-decoration: none; font-weight: 800; }
.change-title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.change .ing-raw > summary { font-size: 12.5px; min-height: 32px; }
.ing-raw { margin-top: 12px; }
.ing-raw > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; }
.ing-raw > summary::-webkit-details-marker { display: none; }
.ing-raw > summary:hover { background: var(--panel-2); }
.ing-raw .statement { font-size: 14px; color: var(--ink-2); }
.al-legend { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border-radius: var(--r-card); padding: 14px 16px; }
.al-legend .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.al-legend .row .lbl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 96px; }
.al-named { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--al, var(--muted)) 13%, var(--panel)); color: var(--ink); }
.al-named .al { width: 20px; height: 20px; background: transparent; }
.al-named.m { background: transparent; border: 1.5px dashed var(--al, var(--line)); }
.al-named.f { background: var(--panel-2); color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); border-radius: var(--r-card); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
table.data td.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; border-radius: var(--r-card); }
.change { background: var(--panel); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 10px; }
.change-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.change-date { font-weight: 800; }
.badge-add { background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.badge-rm { background: var(--no-soft); color: var(--no); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.diff { line-height: 1.8; }
.diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; padding: 1px 4px; border-radius: 4px; }
.diff del { background: var(--no-soft); color: var(--no); padding: 1px 4px; border-radius: 4px; }
.change-list { margin: 6px 0 8px; padding-left: 20px; }
.note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.source-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.source-line a { font-weight: 700; color: var(--accent); }

/* --------------------------------------------------------------- footer */
.foot { padding: 28px 32px calc(28px + var(--tab-h)); color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.disclaimer { max-width: 72ch; margin: 0 0 10px; }
.disclaimer.dim { color: var(--muted-2); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.foot-links a { font-weight: 700; color: var(--ink-2); }

/* ---------------------------------------------------------------- phone */
.tabbar { display: none; }
@media (max-width: 900px) {
  :root { --bar-h: 56px; --tab-h: calc(64px + env(safe-area-inset-bottom)); }
  :root { --bar-h: 96px; }
  .bar { flex-wrap: wrap; height: auto; padding: 0 16px; gap: 0 12px; }
  .brand { padding: 12px 0 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 19px; }
  .bar-right { margin-left: auto; }
  /* the nav sits on its own row, as it does on a desktop */
  .bar-nav { order: 3; flex-basis: 100%; margin: 0; gap: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .bar-nav::-webkit-scrollbar { display: none; }
  .bar-nav a { flex: 0 0 auto; font-size: 13px; padding: 4px 0; border-bottom: 2px solid transparent; }
  .bar-nav a[aria-current="page"] { border-color: var(--accent); }
  .nav-dd { position: static; }
  .nav-dd > summary { font-size: 13px; padding: 4px 0; }
  .dd-menu { left: 0; right: 0; top: 100%; min-width: 0; flex-direction: column; gap: 6px; border-radius: 0 0 var(--r-card) var(--r-card); max-height: 70vh; overflow-y: auto; }
  .dd-col { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .dd-col a { white-space: normal; background: var(--paper); }
  .dd-more { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 8px; }
  .searchrow { padding: 12px 16px; gap: 0; }
  .question { display: none; }
  .searchbar { max-width: none; }
  .searchfield input { height: 46px; }
  .search-go { display: none; }
  .chipstrip { display: none; }
  /* the active chip row */
  .quick { display: flex; align-items: center; gap: 6px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick > * { flex: 0 0 auto; }
  .quick .qshop, .quick .qtoggle, .quick .qsep, .quick .qmore { display: none; }
  .qchips { display: contents; }
  .qchip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; }
  .qchip .al { display: none; }
  .qchip[aria-pressed="true"]::after { content: "×"; opacity: .7; }
  .qchip[aria-pressed="false"] { display: none; }
  .qmore-count { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }
  .layout { display: block; padding: 12px 16px 24px; }
  .guides { padding: 0 16px; margin-bottom: 12px; }
  .results-head { margin-bottom: 10px; }
  .sortwrap { display: none; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 14px; }
  .detail-head h1 { font-size: 24px; }
  /* the filter sheet */
  .filters-btn { display: none; }
  .rail, .rail.open { display: block; left: 0; right: 0; bottom: 0; top: 72px; width: auto; height: auto; transform: translateY(105%); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 10px 18px 110px; transition: transform .22s ease-out; }
  #allergenSection { border-top: 1px solid var(--line); padding-top: 14px; }
  #allergenSection .tiles { grid-template-columns: 1fr 1fr; }
  .scan-btn { display: flex; }
  .searchfield input { padding-right: 76px; }
  .search-clear { right: 42px; }
  .rail::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 10px; }
  .rail.open, body.rail-open .rail.open { transform: none; }
  .rail-head { position: sticky; top: -10px; background: var(--panel); z-index: 2; padding: 4px 0 8px; }
  .rail-title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
  .rail-title-mobile { display: inline; }
  .rail-title-desktop { display: none; }
  .rail-close { margin-left: auto; }
  .rail-clear { margin-left: 0; }
  .rail-title { font-size: 17px; }
  .step-no { display: none; }
  .sheet-foot { display: block; left: 0; right: 0; bottom: 0; width: auto; transform: translateY(105%); border-radius: 0; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); transition: transform .22s ease-out; }
  .sheet-foot.open { display: block; transform: none; }
  .scrim { background: rgba(16,32,46,.4); backdrop-filter: none; }
  /* the tab bar */
  :root { --tab-h: 0px; }
  .tabbar { display: block; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; }
  .tabbar button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg); }
  .tabbar button svg { width: 16px; height: 16px; }
  .tabbar[hidden] { display: none; }
  .foot { padding-bottom: 90px; }
  .tab-badge { position: static; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; line-height: 20px; }
  .tab-badge[hidden] { display: none; }
  .foot { padding: 20px 16px calc(20px + var(--tab-h)); }
}
