/* ───────────────────────── tokens ───────────────────────── */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-2: #10131a;
  --bg-3: #161a23;
  --bg-4: #1c2130;
  --line: #242a3a;
  --line-2: #2e3548;
  --text: #ecEEF4;
  --text-2: #b4bccd;
  --muted: #7f889c;
  --gold: #f2c04b;
  --gold-2: #ffd97a;
  --green: #35d38f;
  --lime: #a3e635;
  --amber: #fbbf24;
  --red: #f0616b;
  --crimson: #b3202e;
  --blue: #6eb5ff;
  --violet: #b59cff;
  --foil: linear-gradient(120deg, #f2c04b 0%, #ff8fbf 30%, #7ad0ff 60%, #a6ff9c 100%);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 62px;
  --side-w: 236px;
  --gutter: 16px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ───────────────────────── base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(242, 192, 75, 0.06), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(110, 181, 255, 0.05), transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.85em; color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.warn { color: var(--amber); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.h2 { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; letter-spacing: 0.01em; }

/* ───────────────────────── shell ───────────────────────── */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: none; }
.main { padding: 0 var(--gutter) calc(var(--nav-h) + 24px); max-width: 1280px; width: 100%; margin: 0 auto; min-width: 0; }
.view { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--foil); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 6px 18px rgba(242, 192, 75, 0.25); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px solid rgba(11, 13, 18, 0.85); }
.brand-text { font-weight: 800; font-size: 16px; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(16, 19, 26, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); z-index: 30;
}
.bottomnav-item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); min-height: 48px; }
.bottomnav-item.on { color: var(--gold-2); }
.bottomnav-item.on svg { filter: drop-shadow(0 0 6px rgba(242, 192, 75, 0.5)); }

.sidenav { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.sidenav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 700; color: var(--text-2); }
.sidenav-item:hover { background: var(--bg-3); color: var(--text); }
.sidenav-item.on { background: linear-gradient(90deg, rgba(242, 192, 75, 0.14), transparent); color: var(--gold-2); box-shadow: inset 2px 0 0 var(--gold); }
.side-status { margin-top: auto; padding: 14px 12px; border-top: 1px solid var(--line); font-size: 12px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.side-status-row { display: flex; align-items: center; gap: 8px; }
.side-status-row.scanning { color: var(--blue); }
.side-foot { padding: 10px 12px 14px; }
.storebadge { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; color: var(--muted); }
.storebadge-physical { color: var(--gold-2); }
.storebadge-text { font-size: 12px; font-weight: 600; }
.offer-retailer-wrap { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.group { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.group + .group { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.group-head { display: flex; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.group-count { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.group-instant .group-label { color: var(--gold-2); }
.group-good .group-label { color: var(--green, #6fdc8c); }
.group-expensive .group-label { color: var(--red, #ff7b7b); }
.group-row td { padding: 14px 8px 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line); }
.group-row .group-count { margin-left: 8px; }
.langswitch { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; }
.langswitch button { padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.langswitch button.on { background: var(--bg-4); color: var(--gold-2); }
.langswitch button:hover { color: var(--text); }
.langswitch-compact button { padding: 4px 7px; font-size: 11px; }
.viewhead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot-ok { background: var(--green); box-shadow: 0 0 8px rgba(53, 211, 143, 0.6); }
.dot-warn { background: var(--amber); }
.dot-bad { background: var(--red); }

/* ───────────────────────── top bar ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px 0 8px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); background: linear-gradient(180deg, rgba(11, 13, 18, 0.98) 70%, rgba(11, 13, 18, 0)); }
.searchbox { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.searchbox:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 192, 75, 0.15); }
.searchbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; min-width: 0; }
.searchbox input::placeholder { color: var(--muted); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--text-2); }
.iconbtn:hover { background: var(--bg-4); color: var(--text); }
.iconbtn.on { background: var(--bg-4); color: var(--gold-2); }
.viewtoggle { display: none; gap: 2px; padding: 2px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; white-space: nowrap; transition: transform 0.08s ease, background 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: linear-gradient(180deg, #ffd66b, #f0b52f); color: #17120a; box-shadow: 0 6px 18px rgba(242, 192, 75, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-primary:hover { background: linear-gradient(180deg, #ffde86, #f5bd3c); }
.btn-ghost { background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--text); }
.btn-filter { position: relative; padding: 0 12px; }
.btn-filter .btn-label { display: none; }
.btn-filter .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #17120a; font-size: 11px; display: grid; place-items: center; }
.linkbtn { color: var(--gold-2); font-weight: 700; padding: 6px 0; }
.linkbtn:hover { text-decoration: underline; }

.um-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }

/* ───────────────────────── users panel ───────────────────────── */
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.users-add { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 14px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-sm); }
.users-add-title { font-size: 13px; font-weight: 700; color: var(--text-2); }
.users-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.users-add-row input { flex: 1 1 200px; min-width: 0; height: 34px; padding: 0 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.users-add-row input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 192, 75, 0.15); }
.users-add-row select, .users-role select { height: 34px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 13px; }
.users-table td { vertical-align: middle; }
.users-email { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; overflow-wrap: anywhere; }
.users-email-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.users-err { color: var(--red); font-size: 12px; }
.users-role { display: inline-flex; align-items: center; gap: 8px; }
.users-pending { opacity: 0.85; }
.when { white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
@media (max-width: 767px) {
  .users-table thead { display: none; }
  .users-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .users-table td { display: block; padding: 0; border: 0; }
  .users-table td.users-email { grid-column: 1 / -1; }
  .users-table td.users-when { grid-column: 1 / -1; font-size: 13px; }
  .users-table td.users-when::before { content: attr(data-label) ': '; color: var(--muted); }
  .users-table td.users-when .when { white-space: normal; }
  .users-table td.num { text-align: left; }
}

/* ───────────────────────── last update line ───────────────────────── */
.lastupdate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.lastupdate .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.lastupdate.stale .dot { background: var(--amber); }
.lastupdate.running .dot { background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.lastupdate span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ───────────────────────── set chips ───────────────────────── */
.setchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.setchips::-webkit-scrollbar { display: none; }
.setchip { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 14px; min-height: 52px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); text-align: left; transition: border-color 0.15s, background 0.15s; }
.setchip:hover { border-color: var(--line-2); }
.setchip.on { background: linear-gradient(180deg, rgba(242, 192, 75, 0.16), rgba(242, 192, 75, 0.06)); border-color: rgba(242, 192, 75, 0.55); box-shadow: 0 0 0 1px rgba(242, 192, 75, 0.15), 0 6px 20px rgba(242, 192, 75, 0.12); }
.setchip-name { font-weight: 800; font-size: 14px; }
.setchip.on .setchip-name { color: var(--gold-2); }
.setchip-meta { font-size: 11px; color: var(--muted); }
.setchip-up { border-style: dashed; }
.skeleton-row { height: 52px; }

.activefilters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip-on { background: rgba(242, 192, 75, 0.14); border-color: rgba(242, 192, 75, 0.5); color: var(--gold-2); }
.chip-removable button { display: inline-flex; padding: 2px; border-radius: 50%; color: inherit; }
.chip-removable button:hover { background: rgba(255, 255, 255, 0.1); }

/* ───────────────────────── badges ───────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; border: 1px solid transparent; }
.badge-sm { height: 21px; padding: 0 8px; font-size: 11px; }
.badge-pct { font-weight: 600; opacity: 0.85; font-variant-numeric: tabular-nums; }
.badge-green { background: rgba(53, 211, 143, 0.14); color: #7fe7b6; border-color: rgba(53, 211, 143, 0.35); }
.badge-lime { background: rgba(163, 230, 53, 0.12); color: #c7f56b; border-color: rgba(163, 230, 53, 0.3); }
.badge-amber { background: rgba(251, 191, 36, 0.14); color: #ffd36b; border-color: rgba(251, 191, 36, 0.35); }
.badge-red { background: rgba(240, 97, 107, 0.14); color: #ff9aa2; border-color: rgba(240, 97, 107, 0.35); }
.badge-crimson { background: rgba(179, 32, 46, 0.35); color: #ffb3b9; border-color: rgba(255, 90, 105, 0.5); }
.badge-grey { background: rgba(127, 136, 156, 0.14); color: var(--text-2); border-color: rgba(127, 136, 156, 0.3); }
.badge-blue { background: rgba(110, 181, 255, 0.14); color: #a9d3ff; border-color: rgba(110, 181, 255, 0.35); }
.badge-violet { background: rgba(181, 156, 255, 0.14); color: #cdbdff; border-color: rgba(181, 156, 255, 0.35); }
.badge-gold { background: rgba(245, 197, 66, 0.18); color: var(--gold); border-color: rgba(245, 197, 66, 0.55); font-weight: 800; letter-spacing: 0.02em; }
.pcard-instant { border-color: rgba(245, 197, 66, 0.55); box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.25), 0 8px 24px -12px rgba(245, 197, 66, 0.35); }
.pcard-instant:hover { border-color: var(--gold); }
.pcard-good { border-color: rgba(53, 211, 143, 0.4); }
.prow-instant td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.prow-good td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.prow-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.badge-foil { position: relative; color: #17120a; background: var(--foil); background-size: 200% 200%; animation: foil 6s ease-in-out infinite; border-color: rgba(255, 255, 255, 0.35); }
@keyframes foil { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.fresh { font-size: 12px; color: var(--muted); }
.price { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; display: inline-flex; align-items: baseline; gap: 8px; }
.price-sm { font-size: 14px; }
.price-md { font-size: 16px; }
.price-lg { font-size: 22px; }
.price-xl { font-size: 32px; line-height: 1; }
.price-orig { font-size: 0.7em; font-weight: 600; color: var(--muted); }

/* ───────────────────────── product cards ───────────────────────── */
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pcard { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r); transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.pcard::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%); }
.pcard:hover { transform: translateY(-1px); border-color: var(--line-2); box-shadow: var(--shadow); }
.pcard-quiet { opacity: 0.85; }
.art { border-radius: var(--r-sm); background: radial-gradient(120% 100% at 30% 20%, #2a3042, #131721); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; aspect-ratio: 1 / 1; }
.art img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.art-has-img { border-color: rgba(255, 255, 255, 0.14); }
.art-link { display: block; flex: 0 0 auto; }
.art-link:hover .art { border-color: var(--gold); }
.art-fallback { font-family: var(--mono); font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: 0.1em; }
.art-sm { width: 44px; height: 44px; flex: 0 0 44px; }
.art-md { width: 96px; height: 96px; }
.art-lg { width: 120px; height: 120px; }
.art-xl { width: 128px; height: 128px; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pcard-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.pcard-name { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pcard-offer { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.pcard-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pcard-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pcard-retailer { font-weight: 700; color: var(--text-2); font-size: 13px; }
.pcard-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.pcard-none { color: var(--muted); font-size: 13px; }
.pcard-release { font-size: 12px; color: var(--blue); }

/* table */
.tablewrap { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.ptable, .mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th, .mtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td, .mtable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.prow-name a { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.prow-title { display: block; font-weight: 700; }
.prow-meta { display: block; font-size: 12px; color: var(--muted); }
.row-dim { opacity: 0.55; }
.mtable code { font-size: 12px; }

/* ───────────────────────── product view ───────────────────────── */
.backrow { display: flex; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.phead { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; }
.ptitle { font-size: 22px; line-height: 1.2; margin: 4px 0 10px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.facts-adv { grid-template-columns: 1fr; margin-top: 10px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.panel .tablewrap { margin: 0; padding: 0; }
.panel-advanced { background: transparent; }
.best { position: relative; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border-color: rgba(242, 192, 75, 0.35); overflow: hidden; }
.best::after { content: ''; position: absolute; inset: -40% -20% auto auto; width: 60%; height: 120%; background: radial-gradient(closest-side, rgba(242, 192, 75, 0.14), transparent); pointer-events: none; }
.best-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.best-row { display: flex; flex-direction: column; gap: 12px; }
.best-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.best-retailer { font-weight: 800; }
.best-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.bench-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.offer-main { flex: 1 1 auto; min-width: 0; }
.offer-best { border-color: rgba(242, 192, 75, 0.5); box-shadow: inset 3px 0 0 var(--gold); }
.offer-dim { opacity: 0.6; }
.offer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.offer-retailer { font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.offer-retailer:hover { color: var(--gold-2); }
.offer-title { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 6px; }
.offer-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.offer-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; }
.offers-sep { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.offers-sep small { font-weight: 500; text-transform: none; letter-spacing: 0; }
.offers-more { padding: 4px 2px; }

.events { display: flex; flex-direction: column; }
.events li { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.events li:last-child { border-bottom: 0; }
.ev-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; grid-row: span 2; }
.ev-retailer { font-weight: 700; }
.ev-label { color: var(--text-2); }
.ev-up .ev-label { color: #7fe7b6; }
.ev-down .ev-label { color: #ff9aa2; }

/* chart */
.chart { display: flex; flex-direction: column; gap: 8px; }
.chart-ranges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chart-ranges .chip { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.chart-legend { margin-left: auto; font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.lg-best { background: var(--gold); }
.lg-ref { background: var(--blue); }
.lg-mkt { background: var(--violet); }
.chart-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(242, 192, 75, 0.35)); }
.chart-dot { fill: var(--bg-2); stroke: var(--gold); stroke-width: 2; }
.chart-ref { stroke: var(--blue); stroke-dasharray: 4 4; stroke-width: 1.5; }
.chart-mkt { stroke: var(--violet); stroke-dasharray: 2 4; stroke-width: 1.5; }
.chart-cursor { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 2; }
.chart-tip { fill: var(--bg-4); stroke: var(--line-2); }
.chart-tip-text { fill: var(--text); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart-tip-sub { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart-empty { color: var(--muted); font-size: 13px; padding: 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-sm); }

/* ───────────────────────── lists (deals, preorders) ───────────────────────── */
.viewhead { display: flex; flex-direction: column; gap: 6px; }
.viewhead h1 { font-size: 22px; }
.prelist { display: flex; flex-direction: column; gap: 8px; }
.prerow { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.prerow-hot { border-color: rgba(242, 192, 75, 0.5); background: linear-gradient(180deg, rgba(242, 192, 75, 0.08), var(--bg-2)); }
.prerow-link { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.prerow-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.prerow-title { display: flex; gap: 8px; align-items: center; font-weight: 700; flex-wrap: wrap; }
.prerow-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.prerow-offer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 13px; }

/* ───────────────────────── system ───────────────────────── */
.subnav { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.subnav a.on { background: var(--bg-3); color: var(--gold-2); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.kv div { display: flex; flex-direction: column; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.kv dd { margin: 0; font-weight: 800; font-size: 18px; }
.notes { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; padding-left: 16px; list-style: disc; }
.scanbox { border-color: rgba(110, 181, 255, 0.3); }
.scan-row { display: flex; flex-direction: column; gap: 12px; }
.scan-actions { display: flex; gap: 8px; }
.progress { position: relative; margin-top: 12px; height: 34px; border-radius: 10px; background: var(--bg-4); overflow: hidden; border: 1px solid var(--line); }
.progress-bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(110, 181, 255, 0.5), rgba(110, 181, 255, 0.85)); transition: width 0.3s ease; }
.progress-label { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; font-size: 12.5px; font-weight: 700; }
.steps { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; max-height: 260px; overflow: auto; }
.steps li { display: flex; gap: 10px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--bg-3); }
.step-r { font-weight: 700; min-width: 110px; }
.unmapped { display: flex; flex-direction: column; gap: 8px; }
.unmapped li { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--bg-3); border: 1px solid var(--line); }
.um-main { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.um-main a { font-weight: 700; }
.um-actions { display: flex; gap: 8px; }
.select { flex: 1; height: 40px; padding: 0 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; min-width: 0; }

/* ───────────────────────── states ───────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 36px 16px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.empty h3 { color: var(--text-2); font-size: 15px; }
.empty p { font-size: 13px; max-width: 420px; }
.empty-orb { width: 44px; height: 44px; border-radius: 50%; background: var(--foil); opacity: 0.35; filter: blur(2px); margin-bottom: 4px; }
.errorbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(240, 97, 107, 0.1); border: 1px solid rgba(240, 97, 107, 0.4); font-size: 13.5px; }
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.skeleton-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); min-height: 120px; }
.skeleton-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-3), var(--bg-4), var(--bg-3)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ───────────────────────── filter sheet ───────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 20px 20px 0 0; animation: rise 0.2s ease; padding-bottom: env(safe-area-inset-bottom); }
@keyframes rise { from { transform: translateY(24px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 18px; }
.sheet-head h2 { font-size: 17px; }
.sheet-body { overflow: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 18px; }
.sheet-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.sheet-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.switch { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; }
.switch input { width: 20px; height: 20px; accent-color: var(--gold); }

/* ───────────────────────── tablet ───────────────────────── */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-filter .btn-label { display: inline; }
  .scan-row { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .best-row { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .unmapped li { flex-direction: row; align-items: center; justify-content: space-between; }
  .um-actions { flex: 0 0 auto; }
  .select { min-width: 260px; }
  .sheet { max-width: 560px; border-radius: 20px; margin-bottom: 24px; max-height: 80dvh; }
  .sheet-backdrop { align-items: center; }
}

/* ───────────────────────── desktop ───────────────────────── */
@media (min-width: 1024px) {
  :root { --gutter: 28px; }
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--bg-2); }
  .bottomnav { display: none; }
  .main { padding-bottom: 40px; max-width: none; }
  .view { max-width: 1240px; gap: 16px; padding-top: 16px; }
  .topbar { margin: 0; padding-left: 0; padding-right: 0; }
  .art-xl { width: 220px; height: 220px; }
  .phead { grid-template-columns: 220px 1fr; gap: 22px; }
  .art-sm { width: 56px; height: 56px; flex-basis: 56px; }
  .viewtoggle { display: inline-flex; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .pcard { grid-template-columns: 104px 1fr; }
  .lastupdate { font-size: 14px; }
  .setchips { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
  .tablewrap { margin: 0; padding: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
  .ptable th:first-child, .ptable td:first-child { padding-left: 14px; }
  .art-lg { width: 160px; height: 160px; }
  .ptitle { font-size: 28px; }
  .facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .view-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: max-content; column-gap: 16px; }
  .view-product > .backrow, .view-product > .phead, .view-product > .best, .view-product > .panel-advanced { grid-column: 1 / -1; }
  .kv { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .events li { grid-template-columns: 130px 140px 1fr; }
  .ev-time { grid-row: auto; }
}
@media (min-width: 1440px) {
  .view { max-width: 1360px; }
}
@media (min-width: 1680px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── markets (HU · Ft / CH · CHF) ── */
.countryswitch button { letter-spacing: 0; }
.side-foot { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.users-markets-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.users-markets-row .check { gap: 4px; }
.listed { margin-top: 8px; }
.listed-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.listed-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 2px; border-top: 1px dashed var(--line); }
.lastupdate { align-items: center; }
.lastupdate-tools { margin-left: auto; display: inline-flex; }

/* System → Alerts */
.alerts-settings { display: grid; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.alerts-settings .chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.alerts-settings .chips legend { width: 100%; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.alerts-settings .field { display: grid; gap: 4px; max-width: 320px; }
.alerts-settings .field > span:first-child { font-size: 12px; color: var(--text-2); }
.alerts-settings .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plain { list-style: none; margin: 0; padding: 0; }
/* Alerts panel key-values: the channel badge and the recipient list are text, not numbers — they wrap and span the row. */
.kv-alerts .kv-wide { grid-column: 1 / -1; }
.kv-alerts .kv-wide dd { font-size: 14px; font-weight: 600; }
.kv-alerts .kv-wide .badge { height: auto; min-height: 24px; padding: 3px 9px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.kv-alerts .plain li { font-weight: 600; }

/* Public preview banner (time-boxed anonymous read mode) */
.public-banner { margin: 8px 0 12px; padding: 8px 12px; border-radius: 10px; background: rgba(242, 192, 75, 0.12); border: 1px solid rgba(242, 192, 75, 0.4); color: var(--gold-2); font-size: 13px; font-weight: 600; }
