/* HeroHall — one stylesheet, tokens first. */

:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --surface-2: #f4efe6;
  --ink: #1b1533;
  --muted: #6b6580;
  --line: #e8e1d4;
  --accent: #6d4aff;
  --accent-hover: #5a38f0;
  --accent-ink: #ffffff;
  --accent-soft: #efeaff;
  --gold: #a86f00;
  --gold-strong: #f4b93e;
  --gold-soft: #fff4d6;
  --silver-soft: #eef0f4;
  --bronze-soft: #fbece2;
  --up: #13865a;
  --down: #c2410c;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(27, 21, 51, .05), 0 6px 20px rgba(27, 21, 51, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0c1d;
    --surface: #18132e;
    --surface-2: #211a3d;
    --ink: #f3efff;
    --muted: #a59dc2;
    --line: #2e2650;
    --accent: #8b70ff;
    --accent-hover: #9d86ff;
    --accent-ink: #0f0c1d;
    --accent-soft: #261e4d;
    --gold: #f4b93e;
    --gold-soft: #2b2210;
    --silver-soft: #23213a;
    --bronze-soft: #2c1d1a;
    --up: #3ccf8e;
    --down: #ff8a5c;
    --danger: #ff8a7a;
    --danger-soft: #3a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0c1d;
  --surface: #18132e;
  --surface-2: #211a3d;
  --ink: #f3efff;
  --muted: #a59dc2;
  --line: #2e2650;
  --accent: #8b70ff;
  --accent-hover: #9d86ff;
  --accent-ink: #0f0c1d;
  --accent-soft: #261e4d;
  --gold: #f4b93e;
  --gold-soft: #2b2210;
  --silver-soft: #23213a;
  --bronze-soft: #2c1d1a;
  --up: #3ccf8e;
  --down: #ff8a5c;
  --danger: #ff8a7a;
  --danger-soft: #3a1714;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

/* ---- header ---- */

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--gold-strong); font-size: 17px; }
.logo:hover { color: var(--ink); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); background: var(--surface); white-space: nowrap; }
.live-pill b { color: var(--up); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--ink); background: var(--surface-2); }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .live-pill .hide-sm { display: none; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .menu-btn { display: grid; margin-left: auto; }
}

/* ---- category bar ---- */

.catbar { border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.catbar .wrap::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- hero / claim form ---- */

.hero { padding: 36px 0 22px; text-align: center; }
.board-toggle { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }
.board-toggle a { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.board-toggle a.active { background: var(--accent); color: var(--accent-ink); }
.board-toggle .pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--down); margin-right: 6px; vertical-align: 1px; }

.claim-title { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.claim-title .rank-word { color: var(--ink); }
.amount-control { display: inline-flex; align-items: center; gap: 6px; }
.step { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
.step:hover { color: var(--accent); border-color: var(--accent); }
.amount-field { display: inline-flex; align-items: baseline; color: var(--accent); }
.amount-field input { width: 6ch; border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 800; padding: 0; text-align: left; -moz-appearance: textfield; }
.amount-field input::-webkit-inner-spin-button, .amount-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.amount-field input:focus { outline: none; border-bottom: 2px dashed var(--accent); }

.claim-form { display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; max-width: 760px; margin: 22px auto 0; }
.field { position: relative; display: flex; align-items: center; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; gap: 10px; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input, .field select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; }
.field select { cursor: pointer; }
.field .favicon { width: 20px; height: 20px; border-radius: 5px; flex: none; object-fit: cover; }
.field .globe { width: 20px; text-align: center; color: var(--muted); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.customize { max-width: 760px; margin: 12px auto 0; text-align: left; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); }
.customize summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.customize[open] summary { margin-bottom: 2px; }
.link-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .link-fields { grid-template-columns: minmax(0, 1fr); } }
.link-icon { width: 20px; text-align: center; font-weight: 700; font-size: 13px; color: var(--muted); flex: none; }
.link-chips { display: inline-flex; gap: 4px; }
.link-chip { position: relative; z-index: 1; display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 700; color: var(--ink); line-height: 1; }
.link-chip:hover { border-color: var(--accent); color: var(--accent); }
.field.field-area { height: auto; padding: 10px 12px; }
.field.field-area textarea { width: 100%; border: 0; background: transparent; outline: none; resize: vertical; min-height: 48px; }
.claim-hint { min-height: 22px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.claim-hint.error { color: var(--danger); }
.claim-hint b { color: var(--ink); }

@media (max-width: 720px) {
  .claim-form { grid-template-columns: 1fr; }
}

/* ---- layout ---- */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding-bottom: 60px; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-head h3 { font-size: 15px; }
.section-head a { font-size: 13px; color: var(--accent); }

/* ---- entries ---- */

.entries { display: flex; flex-direction: column; gap: 10px; }
.entry { position: relative; display: grid; grid-template-columns: 54px 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .12s ease, border-color .12s ease; }
.entry:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.entry.rank-1 { background: linear-gradient(120deg, var(--gold-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--gold-strong) 60%, var(--line)); }
.entry.rank-2 { background: linear-gradient(120deg, var(--silver-soft), var(--surface) 70%); }
.entry.rank-3 { background: linear-gradient(120deg, var(--bronze-soft), var(--surface) 70%); }
.rank-col { text-align: center; }
.rank-num { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--muted); }
.rank-1 .rank-num { color: var(--gold); font-size: 24px; }
.crown { display: block; font-size: 16px; line-height: 1; color: var(--gold-strong); }
.move { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 700; }
.move.up { color: var(--up); }
.move.down { color: var(--down); }
.move.new { color: var(--accent); }
.logo-img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.logo-fallback { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.entry-main { min-width: 0; }
.entry-top { display: flex; align-items: baseline; gap: 12px; }
.entry-title { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.price { font-family: var(--font-display); font-weight: 800; color: var(--accent); white-space: nowrap; }
.rank-1 .price { color: var(--gold); }
.entry-desc { margin: 2px 0 4px; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.meta a, .meta button { position: relative; z-index: 1; }
.meta .cat { color: var(--ink); font-weight: 600; }
.meta .sep::before { content: "·"; }
/* "claim this rank for ₹X": a fixed spot in the row's bottom-right corner that fades in on hover,
   so showing it never changes the row's height. The details line keeps room for it. */
.beat { position: absolute; right: 14px; bottom: 12px; z-index: 1; padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px; background: var(--surface); color: var(--accent); font-weight: 600; font-size: 12px; white-space: nowrap; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.beat:hover { background: var(--accent); color: var(--accent-ink); }
.beat-short { display: none; }
.entry:hover .beat, .entry:focus-within .beat { opacity: 1; pointer-events: auto; }
.entry.has-beat .meta { padding-right: 214px; }
/* Touch screens and narrow rows: no hover, so it simply sits on its own line, always visible. */
@media (hover: none), (max-width: 760px) {
  .beat { position: static; grid-column: 3; justify-self: start; opacity: 1; pointer-events: auto; margin-top: -2px; }
  .entry.has-beat .meta { padding-right: 0; }
}
@media (max-width: 560px) { .beat-long { display: none; } .beat-short { display: inline; } }

@media (max-width: 560px) {
  .entry { grid-template-columns: 34px 40px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .logo-img, .logo-fallback { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
  .rank-num { font-size: 16px; }
  .entry-title { font-size: 15px; }
}

.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; width: fit-content; max-width: 100%;
  margin: 22px auto 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.pager-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink); }
.pager-arrow:hover { background: var(--surface-2); color: var(--accent); }
.pager-arrow.disabled { color: var(--line); }
.pager-pages { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pager-num { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px;
  font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
a.pager-num:hover { background: var(--surface-2); color: var(--accent); }
.pager-num.current { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.pager-gap { display: grid; place-items: center; min-width: 28px; height: 40px; color: var(--muted); letter-spacing: 1px; }
.pager-compact { display: none; padding: 0 10px; font-variant-numeric: tabular-nums; color: var(--muted); }
.pager-compact b { color: var(--ink); font-weight: 700; }
.pager-go { display: flex; align-items: center; gap: 8px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); font-size: 14px; }
.pager-go input { width: 64px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.pager-go input::-webkit-inner-spin-button, .pager-go input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pager-go input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pager-go button { display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 8px; border: 0; border-radius: 10px;
  background: none; color: var(--accent); font-weight: 700; cursor: pointer; }
.pager-go button:hover { background: var(--accent-soft); }
.pager-mode { display: flex; flex-direction: column; margin: 0; padding: 2px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); }
.pager-mode label { position: relative; cursor: pointer; }
.pager-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pager-mode span { display: block; padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; line-height: 15px; color: var(--muted); }
.pager-mode input:checked + span { background: var(--accent); color: var(--accent-ink); }
.pager-mode input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.go-rank { display: none; }
.pager-go:has(input[value="rank"]:checked) .go-page { display: none; }
.pager-go:has(input[value="rank"]:checked) .go-rank { display: inline; }
/* A row reached with "Go to rank" flashes so it's easy to spot. */
.entry.jumped { animation: jumped 2.4s ease; }
@keyframes jumped { 0%, 35% { box-shadow: 0 0 0 3px var(--accent), var(--shadow); } 100% { box-shadow: none; } }
/* Phones: the compact "‹ 4 / 16 ›" */
@media (max-width: 640px) {
  .pager { gap: 0; padding: 4px; border-radius: 14px; }
  .pager-pages, .pager-go { display: none; }
  .pager-compact { display: block; padding: 0 18px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); line-height: 40px; }
}

/* ---- sidebar ---- */

.sidebar { display: flex; flex-direction: column; gap: 16px; }
.mini-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mini { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mini img, .mini .logo-fallback { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; flex: none; }
.mini-main { flex: 1; min-width: 0; }
.mini-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-amount { font-weight: 700; color: var(--accent); white-space: nowrap; }
.reign-card { background: linear-gradient(140deg, #1b1533, #3a2390); color: #f3efff; border: 0; }
.reign-card .muted { color: #c9c0ec; }
.reign-card a:hover { color: var(--gold-strong); }
.reign-time { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--gold-strong); }

/* ---- generic pages ---- */

.page { padding: 34px 0 70px; }
.page-head { margin-bottom: 24px; max-width: 680px; }
.page-head p { color: var(--muted); font-size: 16px; margin: 10px 0 0; }
.prose { max-width: 720px; }
.prose h2 { margin: 30px 0 10px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 34px; margin: 4px 0; }

/* product */
.product-hero { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 20px; padding: 26px; }
.product-hero .logo-img, .product-hero .logo-fallback { width: 84px; height: 84px; border-radius: 20px; font-size: 36px; }
.product-hero h1 { font-size: clamp(24px, 4vw, 36px); }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 560px) { .product-hero { grid-template-columns: 1fr; } }
.banner { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); margin-bottom: 16px; font-weight: 500; }
.code { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }

/* daily */
.day-card { padding: 18px; }
.day-card.live { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: linear-gradient(140deg, var(--accent-soft), var(--surface) 60%); }
.live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.day-entries { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.day-entries .entry { padding: 10px 12px; box-shadow: none; }

/* categories */
.cat-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cat-card h3 { display: flex; align-items: center; gap: 8px; }
.cat-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); font-size: 16px; }
.hot { background: linear-gradient(140deg, var(--gold-soft), var(--surface) 70%); }

/* hall of fame */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.reign-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; }
.reign-row.current { border-color: color-mix(in srgb, var(--gold-strong) 60%, var(--line)); background: linear-gradient(120deg, var(--gold-soft), var(--surface) 70%); }
.reign-row .logo-img, .reign-row .logo-fallback { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.reign-duration { font-family: var(--font-display); font-weight: 800; color: var(--gold); text-align: right; }

/* admin */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; }
.table select, .table input { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.table form { display: inline; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--danger-soft); color: var(--danger); }
.scroll-x { overflow-x: auto; }

/* ---- design toggle (top right) ---- */

.design-toggle { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 10px; margin-left: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 13px; }
.design-toggle:hover { border-color: var(--accent); }
.design-switch { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--line); transition: background .15s ease; }
.design-switch span { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
[data-design="podium"] .design-toggle { border-color: var(--accent); color: var(--accent); }
[data-design="podium"] .design-switch { background: var(--accent); }
[data-design="podium"] .design-switch span { transform: translateX(12px); }
@media (max-width: 860px) { .design-toggle { margin-left: 8px; } .menu-btn { margin-left: auto; } }
@media (max-width: 420px) { .design-toggle-label { display: none; } }

/* ---- A · Podium design ----
   Top 3 become podium cards (#1 in the middle, tallest); ranks 4-10 get a violet tint that fades
   rank by rank; 11+ stay plain. Keyed on each entry's real rank, so it works on any page. */

[data-design="podium"] [data-rankable] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
[data-design="podium"] [data-rankable] > .entry { grid-column: 1 / -1; }
[data-design="podium"] [data-rankable] > .entry .move { display: none; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) {
  grid-row: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 16px; overflow: hidden; }
[data-design="podium"] [data-rankable] > .entry[data-rank="1"] { grid-column: 2; padding-bottom: 96px;
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--surface) 100%); border: 2px solid var(--gold-strong); box-shadow: 0 18px 44px rgba(168,111,0,0.22); }
[data-design="podium"] [data-rankable] > .entry[data-rank="2"] { grid-column: 1; padding-bottom: 60px;
  background: linear-gradient(180deg, var(--silver-soft) 0%, var(--surface) 100%); border-color: #c3c9d5; }
[data-design="podium"] [data-rankable] > .entry[data-rank="3"] { grid-column: 3; padding-bottom: 36px;
  background: linear-gradient(180deg, var(--bronze-soft) 0%, var(--surface) 100%); border-color: #e2b48f; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"])::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; }
[data-design="podium"] [data-rankable] > .entry[data-rank="1"]::before { height: 72px; background: linear-gradient(180deg, #f8cf6b, #f4b93e); }
[data-design="podium"] [data-rankable] > .entry[data-rank="2"]::before { height: 44px; background: linear-gradient(180deg, #d5d9e2, #c3c9d5); }
[data-design="podium"] [data-rankable] > .entry[data-rank="3"]::before { height: 24px; background: linear-gradient(180deg, #e7b38c, #d99a6c); }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .entry-top { flex-direction: column; align-items: center; gap: 4px; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .entry-title { white-space: normal; font-size: 17px; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .entry-desc {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .meta { justify-content: center; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .beat {
  position: static; opacity: 1; pointer-events: auto; align-self: center; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .meta { padding-right: 0; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .price { font-size: 24px; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) .rank-num { font-size: 34px; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) :is(.logo-fallback, .logo-img) {
  width: 68px; height: 68px; font-size: 30px; border-radius: 18px; }
[data-design="podium"] [data-rankable] > .entry[data-rank="1"] :is(.logo-fallback, .logo-img) { width: 84px; height: 84px; font-size: 36px; }
[data-design="podium"] [data-rankable] > .entry[data-rank="1"] .rank-num { font-size: 44px; }
[data-design="podium"] [data-rankable] > .entry[data-rank="1"] .price { font-size: 30px; }
[data-design="podium"] [data-rankable] > .entry[data-rank="2"] :is(.rank-num, .price) { color: #6d7586; }
[data-design="podium"] [data-rankable] > .entry[data-rank="3"] :is(.rank-num, .price) { color: #b46a3a; }
[data-design="podium"] [data-rankable] > .entry:is([data-rank="4"], [data-rank="5"], [data-rank="6"], [data-rank="7"], [data-rank="8"], [data-rank="9"], [data-rank="10"]) :is(.rank-num, .price) { color: var(--accent); }
[data-design="podium"] [data-rankable] > .entry[data-rank="4"] { background: linear-gradient(90deg, rgba(109,74,255,0.240) 0%, rgba(109,74,255,0.072) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.408); }
[data-design="podium"] [data-rankable] > .entry[data-rank="5"] { background: linear-gradient(90deg, rgba(109,74,255,0.210) 0%, rgba(109,74,255,0.063) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.357); }
[data-design="podium"] [data-rankable] > .entry[data-rank="6"] { background: linear-gradient(90deg, rgba(109,74,255,0.180) 0%, rgba(109,74,255,0.054) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.306); }
[data-design="podium"] [data-rankable] > .entry[data-rank="7"] { background: linear-gradient(90deg, rgba(109,74,255,0.150) 0%, rgba(109,74,255,0.045) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.255); }
[data-design="podium"] [data-rankable] > .entry[data-rank="8"] { background: linear-gradient(90deg, rgba(109,74,255,0.120) 0%, rgba(109,74,255,0.036) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.204); }
[data-design="podium"] [data-rankable] > .entry[data-rank="9"] { background: linear-gradient(90deg, rgba(109,74,255,0.090) 0%, rgba(109,74,255,0.027) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.153); }
[data-design="podium"] [data-rankable] > .entry[data-rank="10"] { background: linear-gradient(90deg, rgba(109,74,255,0.060) 0%, rgba(109,74,255,0.018) 55%, var(--surface) 100%); border-color: rgba(109,74,255,0.102); }
@media (max-width: 720px) {
  [data-design="podium"] [data-rankable] { grid-template-columns: minmax(0, 1fr); }
  [data-design="podium"] [data-rankable] > .entry:is([data-rank="1"], [data-rank="2"], [data-rank="3"]) { grid-column: 1 / -1; grid-row: auto; }
}

/* ---- footer ---- */

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
/* Feedback: a button at the very end of the page (in the footer), opening a centred popup. */
.footer-bottom { align-items: center; }
.feedback-bubble { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border: 0;
  border-radius: 999px; cursor: pointer; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.feedback-bubble:hover { background: var(--accent-hover); }
.feedback-bubble:focus-visible { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.feedback-dialog { width: min(420px, calc(100vw - 32px)); padding: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(27,21,51,0.28); }
.feedback-dialog::backdrop { background: rgba(15,12,29,0.25); }
.feedback-dialog[open] { animation: feedback-in .18s ease; }
@keyframes feedback-in { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.feedback-form { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-head h2 { font-size: 18px; }
.confirm-dialog { text-align: left; }
.confirm-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface-2); }
.confirm-big { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.confirm-terms { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; cursor: pointer; }
.confirm-terms:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.confirm-terms input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.confirm-terms a, .confirm-dialog .tiny a { color: var(--accent); text-decoration: underline; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---- toasts ---- */

.toasts { position: fixed; z-index: 50; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 14px; animation: toast-in .25s ease; }
.toast.top { background: linear-gradient(120deg, #a86f00, #f4b93e); color: #1b1533; font-weight: 600; }
.toast img { width: 28px; height: 28px; border-radius: 7px; }
.toast a { text-decoration: underline; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.refresh-pill { position: fixed; z-index: 40; left: 50%; top: 74px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px; box-shadow: var(--shadow); border: 0; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
