/* Holiday Watch dashboard - one stylesheet, no build step. A sibling of Price Watch's page.
   Built for a presbyopic reader: 18 px body, 24-32 px prices, 44 px tap targets, strong contrast.
   Colour jobs (as in Price Watch): blue = navigation and actions; green = cheaper / in stock;
   amber = check this / partial; red = problems only (sold out, refused, stale).
   The festive deep green (#0b6b3a light / #5fe394 dark) is kept to the header and the holiday banner. */

/* ------------------------------------------------------------------ tokens (copied from Price Watch) */
:root {
  color-scheme: light;
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eceff5;
  --border: #dde2eb;
  --border-strong: #c3cad8;
  --text: #0c111d;
  --text-2: #353d4f;
  --muted: #545d70;
  --accent: #2443e6;
  --accent-hover: #1a34c4;
  --accent-ink: #ffffff;
  --accent-soft: #e7ebff;
  --accent-text: #1b33bd;
  --good: #0a7a3d;
  --good-soft: #dcf5e6;
  --good-strong: #13a152;
  --warn: #8f4c00;
  --warn-soft: #ffefcc;
  --warn-strong: #e8960c;
  --bad: #b3261e;
  --bad-soft: #fde5e2;
  --bad-strong: #e0362a;
  --tile: #ffffff;
  --tile-border: #e6e9ef;
  --header-bg: rgba(242, 244, 248, 0.88);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.12), 0 2px 6px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px -12px rgba(16, 24, 40, 0.35);
  /* festive accent: header and holiday banner only */
  --festive: #0b6b3a;
  --festive-ink: #ffffff;
  --festive-soft: #dff3e7;
  --festive-text: #0a5c32;
  --banner-a: #073f23;
  --banner-b: #0b6b3a;
  --banner-c: #13874b;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0d13; --surface: #131823; --surface-2: #181e2b; --surface-3: #212838;
    --border: #283042; --border-strong: #3a4459; --text: #f3f5fa; --text-2: #cdd3df; --muted: #a4adbf;
    --accent: #7f95ff; --accent-hover: #9cadff; --accent-ink: #0a0d13; --accent-soft: rgba(127, 149, 255, 0.16); --accent-text: #aebbff;
    --good: #5fe394; --good-soft: rgba(95, 227, 148, 0.13); --good-strong: #3ccf77;
    --warn: #ffc65a; --warn-soft: rgba(255, 198, 90, 0.14); --warn-strong: #f5ab26;
    --bad: #ff8b80; --bad-soft: rgba(255, 139, 128, 0.14); --bad-strong: #ff6b5e;
    --tile: #f3f3f1; --tile-border: transparent; --header-bg: rgba(10, 13, 19, 0.86);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.6); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.75);
    --festive: #5fe394; --festive-ink: #06210f; --festive-soft: rgba(95, 227, 148, 0.14); --festive-text: #8ef0b5;
    --banner-a: #062c18; --banner-b: #0a4d2a; --banner-c: #10663a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0d13; --surface: #131823; --surface-2: #181e2b; --surface-3: #212838;
  --border: #283042; --border-strong: #3a4459; --text: #f3f5fa; --text-2: #cdd3df; --muted: #a4adbf;
  --accent: #7f95ff; --accent-hover: #9cadff; --accent-ink: #0a0d13; --accent-soft: rgba(127, 149, 255, 0.16); --accent-text: #aebbff;
  --good: #5fe394; --good-soft: rgba(95, 227, 148, 0.13); --good-strong: #3ccf77;
  --warn: #ffc65a; --warn-soft: rgba(255, 198, 90, 0.14); --warn-strong: #f5ab26;
  --bad: #ff8b80; --bad-soft: rgba(255, 139, 128, 0.14); --bad-strong: #ff6b5e;
  --tile: #f3f3f1; --tile-border: transparent; --header-bg: rgba(10, 13, 19, 0.86);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.6); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.75);
  --festive: #5fe394; --festive-ink: #06210f; --festive-soft: rgba(95, 227, 148, 0.14); --festive-text: #8ef0b5;
  --banner-a: #062c18; --banner-b: #0a4d2a; --banner-c: #10663a;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 160px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num, .price, .money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 28px; } }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ header (festive accent) */
.app-header {
  position: sticky; top: 0; z-index: 30; background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border); box-shadow: inset 0 4px 0 var(--festive);
}
.header-row { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.brand-mark {
  width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--banner-b), var(--banner-c)); color: #fff;
  box-shadow: 0 6px 14px -6px rgba(11, 107, 58, 0.75);
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-text { min-width: 0; }
.brand h1 { font-size: 25px; font-weight: 800; color: var(--festive-text); }
:root[data-theme="dark"] .brand h1 { color: var(--festive); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand h1 { color: var(--festive); } }
.status-line { margin: 1px 0 0; font-size: 16px; color: var(--muted); line-height: 1.35; }
.status-line strong { color: var(--text-2); font-weight: 600; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good-strong); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px var(--good-soft); }
.status-dot.is-stale { background: var(--bad-strong); box-shadow: 0 0 0 3px var(--bad-soft); }
.status-dot.is-boost { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--good-soft); } 50% { box-shadow: 0 0 0 7px transparent; } }
.header-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 12px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.is-spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs-bar { padding-bottom: 12px; }
.tabs {
  /* every section stays visible: the tabs wrap onto a second row instead of scrolling sideways */
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 15px; background: var(--surface-3); max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: 1 0 auto; min-height: 46px; padding: 8px 16px; border: 0; border-radius: 11px;
  background: transparent; color: var(--text-2); font-weight: 650; font-size: 18px; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s var(--ease), color 0.2s, box-shadow 0.2s;
}
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; font-size: 15px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.tab-count:empty { display: none; }
.tab[aria-selected="true"] .tab-count { background: var(--accent-soft); color: var(--accent-text); }

/* ------------------------------------------------------------------ notices */
.notices { display: grid; gap: 10px; margin-top: 16px; }
.notices:empty { display: none; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 17px; }
.notice svg { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.notice strong { font-weight: 700; }
.notice.is-bad { background: var(--bad-soft); border-color: transparent; }
.notice.is-bad svg { color: var(--bad); }
.notice.is-warn { background: var(--warn-soft); border-color: transparent; }
.notice.is-warn svg { color: var(--warn); }
.notice.is-info { background: var(--accent-soft); border-color: transparent; }
.notice.is-info svg { color: var(--accent-text); }
.notice a { font-weight: 700; }

/* ------------------------------------------------------------------ holiday banner (festive) */
.banner-slot:empty { display: none; }
.holiday-banner {
  position: relative; overflow: hidden; margin-top: 18px; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(120deg, var(--banner-a) 0%, var(--banner-b) 60%, var(--banner-c) 100%);
  box-shadow: var(--shadow-md); padding: 20px 22px; display: grid; gap: 12px;
}
.holiday-banner::after {
  content: ""; position: absolute; inset: auto -80px -150px auto; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent); pointer-events: none;
}
.hb-kicker { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(255, 255, 255, 0.16); padding: 5px 12px; border-radius: 99px; }
.hb-kicker .live-dot { width: 9px; height: 9px; border-radius: 50%; background: #7dffb0; animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(125, 255, 176, 0); } 0% { box-shadow: 0 0 0 0 rgba(125, 255, 176, 0.7); } }
.hb-title { font-size: clamp(22px, 3.6vw, 32px); font-weight: 800; line-height: 1.2; }
.hb-sub { margin: 0; font-size: 18px; color: rgba(255, 255, 255, 0.92); }
.hb-pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: 16px; position: relative; z-index: 1; }
.hb-pill { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.hb-pill b { font-weight: 700; }
.next-row { margin-top: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: inset 4px 0 0 var(--festive); }
.next-row .ne-title { font-weight: 700; font-size: 19px; }
.next-row .ne-sub { color: var(--muted); font-size: 16px; }

/* ------------------------------------------------------------------ panels */
main { padding-bottom: 40px; }
.panel { padding-top: 24px; animation: panel-in 0.28s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-title { font-size: 28px; font-weight: 800; }
.panel-sub { margin: 4px 0 0; color: var(--text-2); font-size: 18px; max-width: 900px; }
.section-title { font-size: 22px; font-weight: 800; margin: 30px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-title .count { font-size: 17px; font-weight: 600; color: var(--muted); }
.section-sub { margin: -6px 0 14px; color: var(--text-2); font-size: 17px; }

/* ------------------------------------------------------------------ chips & filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; margin-bottom: 16px; }
.chip {
  flex: none; min-height: 44px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font-size: 17px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip span.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--text-2); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .chip-n { font-size: 15px; font-weight: 700; opacity: 0.75; font-variant-numeric: tabular-nums; }
.results-line { margin: -4px 0 14px; color: var(--muted); font-size: 17px; }
.results-line strong { color: var(--text); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 17px; text-decoration: none; text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px -6px rgba(36, 67, 230, 0.8); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); min-height: 44px; font-size: 16px; padding: 8px 14px; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost[aria-pressed="true"] { background: var(--warn-soft); color: var(--text); border-color: transparent; }
.link-btn { border: 0; background: none; padding: 8px 4px; min-height: 44px; color: var(--accent-text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ grids and cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s;
}
.card.is-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.card.is-flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: var(--shadow-sm); } }
.card.is-ended .tile img { opacity: 0.6; filter: grayscale(0.7); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.tile { position: relative; background: var(--tile); aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--tile-border); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px; mix-blend-mode: multiply; }
.tile-ph { display: none; flex-direction: column; align-items: center; gap: 6px; color: #6b7385; font-size: 16px; font-weight: 600; }
.tile-ph svg { width: 38px; height: 38px; }
.tile.no-img img { display: none; }
.tile.no-img .tile-ph { display: flex; }
.tile.no-img { background: repeating-linear-gradient(135deg, var(--tile), var(--tile) 12px, #f1f2f5 12px, #f1f2f5 24px); }
.tile-badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.tile-badges .badge { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
/* tiles stay white in both themes: their badges use fixed light-surface colours */
.tile-badges .badge.is-solid { background: #2443e6; color: #fff; }
.tile-badges .badge.is-star { background: #fff3c4; color: #6b4400; }
.tile-badges .badge.is-strong { background: #0a7a3d; color: #fff; }

.store-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 2px 10px; border-radius: 8px; font-size: 16px; font-weight: 650; background: var(--surface-3); color: var(--text-2); max-width: 100%; }
.tag.is-store { background: var(--accent-soft); color: var(--accent-text); }
.card-title { font-family: var(--font-ui); font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.variant { font-size: 17px; color: var(--text-2); font-weight: 600; }
.seller { font-size: 17px; color: var(--text-2); }
.seller.is-third { color: var(--warn); font-weight: 650; }
.price-row { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
.price.is-none { font-size: 20px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.price-cur { font-size: 16px; font-weight: 700; color: var(--muted); }
.price-label { font-size: 16px; color: var(--muted); font-weight: 600; }
.saving { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border-radius: 9px; background: var(--good-soft); color: var(--good); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.line { font-size: 17px; color: var(--text-2); line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.line svg { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--muted); }
.line.is-muted { color: var(--muted); }
.line.is-good { color: var(--good); font-weight: 650; }
.line.is-good svg { color: var(--good); }
.line.is-warn { color: var(--warn); font-weight: 600; }
.line.is-warn svg { color: var(--warn); }
.line.is-bad { color: var(--bad); font-weight: 650; }
.line.is-bad svg { color: var(--bad); }
.line.is-gift svg { color: var(--festive-text); }
.status-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 30px; padding: 3px 11px; border-radius: 99px; font-size: 16px; font-weight: 700; background: var(--surface-3); color: var(--text-2); max-width: 100%; }
.status-pill.is-good { background: var(--good-soft); color: var(--good); }
.status-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.status-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
.status-pill.is-accent { background: var(--accent-soft); color: var(--accent-text); }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 10px; border-radius: 99px; font-size: 15px; font-weight: 700; line-height: 1.2; background: var(--surface-3); color: var(--text-2); }
.badge .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.badge.is-good { background: var(--good-soft); color: var(--good); }
.badge.is-warn { background: var(--warn-soft); color: var(--warn); }
.badge.is-bad { background: var(--bad-soft); color: var(--bad); }
.badge.is-muted { background: var(--surface-3); color: var(--text-2); }
.badge.is-event { background: var(--festive-soft); color: var(--festive-text); }
.avail { display: grid; gap: 4px; justify-items: start; }
.cond-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cond { font-size: 16px; padding: 4px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--text); font-weight: 600; }
details.more { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 4px; }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--accent-text); font-size: 17px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 20px; height: 20px; transition: transform 0.2s var(--ease); }
details.more[open] > summary svg { transform: rotate(180deg); }
.facts { margin: 4px 0 6px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 16px; color: var(--text-2); }
.facts li { padding: 6px 10px; background: var(--surface-2); border-radius: 10px; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.card-actions .btn { flex: 1 1 200px; }
.local-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.local-actions .btn { flex: 1 1 140px; }
.local-note { font-size: 16px; color: var(--text); background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; }

/* featured */
.featured { margin-bottom: 8px; }
.feat-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.feat {
  display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-height: 104px; color: var(--text); width: 100%;
}
.feat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.feat .tile { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--tile-border); }
.feat .tile img { padding: 8px; }
.feat .tile-ph span { display: none; }
.feat-title { font-weight: 700; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-price { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; }
.feat-price .price { font-size: 25px; }
.feat-price .saving { font-size: 16px; min-height: 28px; }
.feat-where { font-size: 15px; color: var(--muted); font-weight: 600; }

/* list rows: events, notifications, sources, targets */
.rows { display: grid; gap: 10px; }
.row-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
.row-card.is-event { box-shadow: inset 4px 0 0 var(--festive); }
.row-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.row-title { font-weight: 750; font-size: 19px; overflow-wrap: anywhere; }
.row-meta { color: var(--muted); font-size: 16px; }
.row-text { color: var(--text-2); font-size: 17px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px 14px; margin: 4px 0 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 15px; color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.meter { height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter > span.is-high { background: var(--warn-strong); }
.cat-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.cat-table th { text-align: left; font-size: 15px; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.cat-table td { padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.cat-table td.n { text-align: right; font-variant-numeric: tabular-nums; width: 76px; }
@media (max-width: 560px) {
  .cat-table thead { display: none; }
  .cat-table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .cat-table td { border: 0; padding: 0; }
  .cat-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
  .cat-table td.n { text-align: left; width: auto; font-size: 16px; color: var(--text-2); }
  .cat-table td.n::before { content: attr(data-label) " "; color: var(--muted); }
  .cat-table td.mute { grid-column: 1 / -1; }
}
.fold { border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; background: var(--surface); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 54px; font-weight: 700; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .chev { margin-left: auto; width: 22px; height: 22px; color: var(--muted); transition: transform 0.2s var(--ease); flex: none; }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold-body { padding: 0 16px 16px; }
.warn-box { padding: 14px 16px; border-radius: var(--radius); background: var(--warn-soft); font-size: 17px; margin-bottom: 14px; }

/* ------------------------------------------------------------------ empty / loading */
.empty { text-align: center; padding: 44px 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-2); background: var(--surface); }
.empty svg { width: 52px; height: 52px; color: var(--muted); margin-bottom: 8px; }
.empty h3 { font-size: 21px; margin-bottom: 6px; color: var(--text); }
.empty p { margin: 0 auto; max-width: 620px; }
.empty .btn { margin-top: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { height: 420px; border-radius: var(--radius-lg); }

/* ------------------------------------------------------------------ footer */
.app-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 26px 0 40px; margin-top: 20px; }
.footer-meta { color: var(--muted); font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.theme-switch { display: inline-flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 12px; }
.theme-switch button { border: 0; background: transparent; min-height: 44px; padding: 6px 14px; border-radius: 9px; font-weight: 650; font-size: 16px; color: var(--text-2); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 650; font-size: 17px;
  box-shadow: var(--shadow-lg); transition: opacity 0.25s, transform 0.25s var(--ease); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .chip[aria-pressed="true"], .tab[aria-selected="true"] { outline: 2px solid CanvasText; } }

/* ------------------------------------------------------------------ phone */
@media (max-width: 560px) {
  /* every section stays visible: big tabs wrap onto rows instead of a sideways-scrolling bar */
  .tab { flex: 1 1 auto; padding: 8px 10px; font-size: 17px; gap: 6px; }
  .brand h1 { font-size: 23px; }
  .brand-mark { width: 42px; height: 42px; }
  .status-line { font-size: 15px; }
  .header-row { gap: 10px; }
  .panel-title { font-size: 25px; }
  .holiday-banner { padding: 18px 16px; }
  .feat { grid-template-columns: 72px 1fr; }
  html { scroll-padding-top: 230px; }
  .app-header { position: static; }
}
.nowrap { white-space: nowrap; }

/* versions of one product line (2026-10-23) */
.variants { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 4px 0; }
.variants-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; color: var(--muted); }
.variants ul { margin: 0; padding-left: 18px; }
.variants li { margin: 4px 0; overflow-wrap: anywhere; }
.variants .v-price { font-weight: 800; }
.variants .v-saving { color: var(--good); font-weight: 700; }
details.group-more { margin-top: 24px; }
details.group-more > summary { font-size: 20px; }
