:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe4;
  --ink: #1d1a14;
  --muted: #6b6457;
  --faint: #9a9282;
  --line: #e9e3d6;
  --accent: #b07d12;
  --accent-ink: #7d5704;
  --accent-soft: #fbf1d9;
  --good: #147a3e;
  --good-soft: #e5f3e9;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgb(40 30 10 / 6%), 0 4px 16px rgb(40 30 10 / 5%);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100c;
    --surface: #1b1812;
    --surface-2: #231f17;
    --ink: #f3eee2;
    --muted: #b3aa98;
    --faint: #857d6e;
    --line: #2f2a20;
    --accent: #e0b04b;
    --accent-ink: #f0c56a;
    --accent-soft: #2c2312;
    --good: #5fcb8d;
    --good-soft: #14281b;
    --bad: #f28b82;
    --bad-soft: #2d1614;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
em { font-style: normal; font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 16px; top: -40px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }
.hint { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }
.hint.sub { margin-top: 10px; }
.hint.top { margin-top: 0; margin-bottom: 8px; }

/* ------------------------------ top bar ------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.logo-mark { width: 28px; height: 28px; }
.logo-mark .coin-face { fill: var(--accent); stroke: none; }
.logo-mark .coin-ring { fill: none; stroke: var(--bg); stroke-width: 1.6; opacity: .75; }

.gold-rate { margin-left: auto; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.gold-rate-label { font-weight: 600; }
.gold-rate strong { color: var(--accent-ink); font-size: 18px; }
.gold-rate small { font-size: 12px; }
@media (max-width: 719.98px) { .gold-rate { flex-basis: 100%; justify-content: flex-start; } }

/* -------------------------------- hero -------------------------------- */
.hero { padding-block: 28px 16px; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(26px, 4.6vw, 42px); line-height: 1.1; margin: 0 0 10px; 
}
.lede { color: var(--muted); max-width: 66ch; margin: 0 0 18px; font-size: 15.5px; }

.notice {
  margin-block: 4px 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.notice.error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

/* ------------------------------ filter bar ------------------------------ */
.filterbar {
  position: sticky; top: 60px; z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-block: 1px solid var(--line);
  padding-block: 8px 6px;
}
@media (max-width: 719.98px) { .filterbar { top: 0; position: static; } }
.frow { display: flex; align-items: center; gap: 8px; padding-block: 4px; min-width: 0; }
.flabel { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; width: 56px; flex: none; }
.frow-tools { flex-wrap: wrap; gap: 8px 10px; padding-top: 6px; }
.frow-tools .clear-all { margin-left: auto; }

.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; padding-block: 2px; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip-toggle { flex: none; }
.chip-toggle {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; font-size: 14px; font-weight: 600; min-height: 36px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip-toggle small { color: var(--faint); font-weight: 500; margin-left: 2px; }
.chip-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-toggle[aria-pressed="true"] small { color: inherit; opacity: .7; }
.chip-toggle:disabled { opacity: .45; cursor: default; }
.chip-toggle.weight { min-width: 58px; justify-content: center; }
.chip-toggle.weight small { display: none; }
.chip-toggle.weight[data-count="0"] { opacity: .45; }

.dd { position: relative; flex: none; }
.dd > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; font-weight: 600; min-height: 36px; white-space: nowrap;
}
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.dd[open] > summary { border-color: var(--ink); }
.dd[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.dd.is-on > summary { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background: var(--accent-soft); color: var(--accent-ink); }
.dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 240px; max-width: min(92vw, 360px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px;
  max-height: min(60vh, 440px); overflow: auto;
}
.dd-panel.wide { min-width: 300px; }
.dd-done { display: none; }
@media (max-width: 719.98px) {
  /* backdrop-filter would make the bar the containing block for the fixed
     bottom sheets below, pinning them to the bar instead of the screen. */
  .filterbar { backdrop-filter: none; background: var(--bg); }
  /* Label and dropdown share the first line; the chips get full-width lines below. */
  .frow { flex-wrap: wrap; }
  .frow .dd { margin-left: auto; }
  #weightOpts, #brandOpts { flex: 1 1 100%; order: 3; }
  .chip-toggle.weight { flex: 1 1 calc(33.333% - 6px); min-width: 0; }
  .chip-scroll { mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
  /* Panels become bottom sheets: always on screen, however far down the bar sits. */
  .dd-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; margin: 0; max-width: none; min-width: 0;
    border-radius: 16px 16px 0 0; max-height: 70vh; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgb(0 0 0 / 25%);
  }
  .dd-done {
    display: block; width: 100%; margin-top: 12px; min-height: 42px; border-radius: 999px; border: 0;
    background: var(--ink); color: var(--bg); font-weight: 700; cursor: pointer;
  }
}
.dd-search { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin-bottom: 8px; }

.check {
  display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; min-height: 36px;
}
.check:hover { background: var(--surface-2); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.check .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check .n { color: var(--faint); font-size: 13px; }
.check.zero .label { color: var(--faint); }

.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.range input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.range input:focus { outline: none; border-color: var(--accent); }
.range span { color: var(--faint); }

.offer { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.offer label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.offer input { width: 110px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-weight: 600; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 32px; height: 18px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 25%); transition: transform .15s; }
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.is-off { opacity: .5; cursor: not-allowed; }
.switch.is-on { border-color: color-mix(in srgb, var(--good) 60%, var(--line)); color: var(--good); }

/* ------------------------------- buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.link { border: 0; background: none; color: var(--accent-ink); cursor: pointer; padding: 4px; font-weight: 600; }
.link:hover { text-decoration: underline; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 8px; border-radius: 999px; font-size: 20px; display: inline-flex; }
.icon-btn:hover { background: var(--surface-2); }
.pill { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11.5px; padding: 0 7px; line-height: 18px; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips:not(:empty) { padding-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px;
  border-radius: 999px; background: var(--surface-2); font-size: 13px; border: 1px solid var(--line);
}
.chip button { border: 0; background: none; cursor: pointer; padding: 2px; display: inline-flex; color: var(--muted); border-radius: 999px; font-size: 14px; }
.chip button:hover { color: var(--ink); background: var(--line); }

/* ------------------------------ best strip ------------------------------ */
.best-strip { padding-block: 22px 6px; }
.strip-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.strip-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; }
.strip-head .hint { margin: 0; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.best-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; scroll-snap-align: start; min-width: 0;
}
.best-card.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.best-main { text-align: left; border: 0; background: none; padding: 12px 12px 8px; cursor: pointer; font: inherit; color: inherit; flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.best-main:hover { background: var(--surface-2); }
.best-main .w { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.best-main .w small { font-weight: 500; text-transform: none; letter-spacing: 0; }
.best-main .r { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--accent-ink); }
.best-main .r small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.best-main .b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-main .p { font-size: 12.5px; color: var(--muted); }
.best-main .p .good { color: var(--good); font-weight: 600; }
.best-buy { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent-ink); }
.best-buy:hover { background: var(--accent-soft); }
.best-buy svg { font-size: 13px; }

/* ------------------------------- toolbar ------------------------------ */
.results { padding-block: 16px 40px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.count { font-size: 18px; margin: 0; }
.count small { font-weight: 500; color: var(--muted); font-size: 14px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sort { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sort select {
  height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; max-width: 62vw;
}
@media (max-width: 520px) { .sort > span { display: none; } #shareBtn span { display: none; } }
.view-toggle { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.view-toggle button { border: 0; background: none; padding: 7px 12px; min-height: 36px; border-radius: 999px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.view-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }

/* -------------------------------- cards ------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 16px; }

.deal {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.deal:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ink) 14%, var(--line)); }
.deal.is-best { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }

.media { position: relative; height: 120px; max-width: 100%; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: contain; }

.coin {
  width: min(42%, 76px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: clamp(12px, 3vw, 15px); color: #5a3d05;
  background: radial-gradient(circle at 32% 28%, #fff3c4 0%, #f0cf73 32%, #c7962a 70%, #9c6e10 100%);
  box-shadow: inset 0 0 0 5px rgb(255 240 200 / 45%), 0 6px 18px rgb(120 80 10 / 25%);
}
.badges { position: absolute; inset: 10px 10px auto 10px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.badges .left, .badges .right { display: flex; gap: 6px; flex-wrap: wrap; }
.badges .right { justify-content: flex-end; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); white-space: nowrap;
}
.badge.rank { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.badge.best { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge.drop { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.new { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.under { background: var(--good); color: #fff; border-color: var(--good); }

.deal-body { display: flex; flex-direction: column; gap: 7px; padding: 14px; flex: 1; }
.brand { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; justify-content: space-between; gap: 8px; }
.brand .store { color: var(--faint); font-weight: 600; letter-spacing: .03em; text-transform: none; }
.title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.title a { text-decoration: none; }
.title a:hover { text-decoration: underline; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-weight: 600; }

.rate { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.rate strong { font-size: 24px; letter-spacing: -0.01em; line-height: 1.1; }
.rate span { font-size: 13px; color: var(--muted); }
.rate .was { font-size: 12px; color: var(--faint); width: 100%; }
.deal.is-best .rate strong { color: var(--accent-ink); }
.vs { font-size: 13px; color: var(--muted); min-height: 1.5em; }
.good { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.price .now { font-weight: 700; font-size: 16px; }
.price s { color: var(--faint); }
.price .off { color: var(--good); font-weight: 700; }
.price .after { font-size: 12px; color: var(--accent-ink); font-weight: 600; width: 100%; }

.deal .cta { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.cta .btn { flex: 1; }
.cta .btn svg { font-size: 14px; }

/* -------------------------------- table ------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.deals { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }
table.deals th, table.deals td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.deals th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.deals tr:last-child td { border-bottom: 0; }
table.deals td.num, table.deals th.num { text-align: right; white-space: nowrap; }
table.deals .t-title { max-width: 360px; }
table.deals .t-title a { font-weight: 600; text-decoration: none; }
table.deals .t-title a:hover { text-decoration: underline; }
table.deals .t-brand { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
table.deals .t-rate { font-weight: 800; }
table.deals tr.is-best td { background: var(--accent-soft); }
table.deals tr.is-best .t-rate { color: var(--accent-ink); }
table.deals small.was { display: block; color: var(--faint); font-size: 12px; }
table.deals .off { color: var(--good); font-weight: 700; }

/* ------------------------------- admin ------------------------------- */
.admin-tag {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.admin-signout { margin-left: auto; }
.admin { max-width: 660px; padding-block: 28px 48px; display: flex; flex-direction: column; gap: 14px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.admin-card h1 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.admin-card h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.admin-stores { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-stores th, .admin-stores td { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
.admin-stores th { background: var(--surface-2); }
.admin-stores tr:last-child td { border-bottom: 0; }
.admin-stores small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.admin-stores td:nth-child(2) { font-variant-numeric: tabular-nums; }
#storeStatus { font-size: 13px; color: var(--muted); }
.admin-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.admin-form > label { font-size: 13px; font-weight: 600; color: var(--muted); }
.admin-form input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.admin-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-row input { flex: 1 1 180px; }
.admin-now {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin: 16px 0 0; padding: 14px; background: var(--surface-2); border-radius: 12px;
}
.admin-now div { min-width: 0; }
.admin-now dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.admin-now dd { margin: 2px 0 0; font-weight: 600; }
.admin-now dd.big { font-size: 20px; font-weight: 800; }
.admin-now dd.big small { font-size: 13px; font-weight: 500; color: var(--muted); }
.admin-now dd.warn { color: var(--bad); }
.admin-now dd.pinned { color: var(--accent-ink); }

/* The automatic Tanishq fetch: what it last did, and the two buttons over it. */
.admin-sync {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sync-line { margin: 0; font-size: 12.5px; color: var(--muted); }
.sync-line.ok { color: var(--good); }
.sync-line.bad { color: var(--bad); }

/* ------------------------------ states ------------------------------ */
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 18px; }
.skeleton { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.skeleton .media { animation: shimmer 1.2s ease-in-out infinite; }
.skeleton .bar { height: 12px; margin: 14px; border-radius: 6px; background: var(--surface-2); animation: shimmer 1.2s ease-in-out infinite; }
.skeleton .bar.short { width: 45%; }
@keyframes shimmer { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skeleton .media, .skeleton .bar { animation: none; } .switch .track, .switch .track::after { transition: none; } }

.more { display: flex; justify-content: center; margin-top: 24px; }
#list { transition: opacity .15s ease; }
#list.is-loading { opacity: .55; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); }

.footer { padding-block: 20px 40px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); margin-top: 8px; }
.footer p { margin: 0 0 8px;  }
.footer p:last-child { margin-bottom: 0; }
.footer strong { color: var(--muted); font-weight: 700; }
