/* ==========================================================================
   CrownMyGame — the royal court.
   Ink-violet ground, gold leaf on edges and ornaments only, crimson wax for
   seals. Cormorant Garamond for proclamations and numerals, Hanken Grotesk
   for everything you read and click.
   ========================================================================== */

:root {
  /* Ground */
  --ink-0: #0b0810;
  --ink-1: #110c16;
  --ink-2: #17111d;
  --ink-3: #1f1827;
  --ink-4: #2a2134;

  /* Gold leaf */
  --gold: #d8b25e;
  --gold-hi: #f1d897;
  --gold-lo: #9c7a31;
  --gold-ink: #1a1206;
  --leaf: linear-gradient(180deg, #f7e6ad 0%, #e2c072 38%, #c79b45 70%, #a9823a 100%);
  --hair: rgba(216, 178, 94, .16);
  --hair-2: rgba(216, 178, 94, .3);
  --hair-3: rgba(216, 178, 94, .55);

  /* Text */
  --text: #f2ead9;
  --muted: #b9ad98;
  --dim: #85796a;

  /* Heraldry and meaning */
  --crimson: #9b2335;
  --silver: #c7cbd3;
  --bronze: #c58b5a;
  --green: #72c99a;
  --amber: #e3a33c;
  --red: #e57373;

  /* Aliases used by older templates */
  --bg: var(--ink-0); --bg-2: var(--ink-1); --surface: var(--ink-2); --surface-2: var(--ink-3); --surface-3: var(--ink-4);
  --line: var(--hair); --line-2: var(--hair-2);

  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --font-display: var(--display);

  /* Heraldic diaper pattern: a gold lozenge lattice at very low opacity. */
  --diaper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M22 0 44 22 22 44 0 22z' fill='none' stroke='%23d8b25e' stroke-opacity='.07'/%3E%3Ccircle cx='22' cy='22' r='1.3' fill='%23d8b25e' fill-opacity='.12'/%3E%3C/svg%3E");
  --lozenge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M7 0 14 7 7 14 0 7z' fill='%23d8b25e'/%3E%3Cpath d='M7 4 10 7 7 10 4 7z' fill='%230b0810'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font: 15.5px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff3cf; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; font-weight: 600; }
h1 { font: 600 clamp(34px, 4.6vw, 52px)/1.05 var(--display); letter-spacing: -.005em; }
h2 { font: 600 clamp(26px, 2.6vw, 32px)/1.1 var(--display); }
h3 { font: 600 17px/1.3 var(--font); }
h4 { font: 600 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
code, pre { font-family: var(--mono); font-size: 13px; }
code { background: var(--ink-3); border: 1px solid var(--hair); padding: 1px 6px; border-radius: 3px; color: #efe2c4; }
pre { background: #08060b; border: 1px solid var(--hair); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; line-height: 1.55; margin: 0 0 1em; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--hair); margin: 24px 0; }
::selection { background: rgba(216, 178, 94, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; }
.skip:focus { left: 16px; }

/* Layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap, .wrap-narrow { padding: 0 16px; } }
.section { padding-top: 40px; padding-bottom: 40px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 780px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13.5px; }
.gold { color: var(--gold); }
.text { color: var(--text); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* Gold-leaf text */
.gilt-text {
  background: var(--leaf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
}

/* Small-caps label */
.eyebrow { display: inline-block; font: 600 11.5px/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

/* Ornaments */
.crown-mark { display: block; width: 34px; height: auto; overflow: visible; }
.fleuron { display: block; width: 200px; height: 16px; margin: 0 auto; }
.crest { display: block; width: 40px; height: 48px; }
.laurel { display: block; }
.seal { display: block; width: 64px; height: 64px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 8, 16, .94);
  border-bottom: 1px solid var(--hair-2);
  box-shadow: 0 3px 0 -2px var(--hair); /* the second hairline of the double rule */
}
@supports (backdrop-filter: blur(1px)) { .site-header { background: rgba(11, 8, 16, .84); backdrop-filter: saturate(140%) blur(10px); } }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand .crown-mark { width: 36px; }
.wordmark { font: 600 25px/1 var(--display); letter-spacing: .01em; }
.brand-sm .crown-mark { width: 28px; }
.brand-sm .wordmark { font-size: 21px; }
.nav { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.nav a, .nav .linklike { color: var(--muted); padding: 8px 12px; font: 500 14px/1 var(--font); letter-spacing: .02em; position: relative; }
.nav a:hover, .nav .linklike:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 1px; background: var(--gold); }
.nav form { margin: 0; }
.nav .nav-cta { margin-left: 8px; padding: 0 14px; color: var(--gold-ink); }
.nav .nav-cta:hover { color: var(--gold-ink); }
.linklike { background: none; border: 0; cursor: pointer; }
@media (max-width: 1000px) { .nav .hide-md { display: none; } }
@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  .site-header .wrap { gap: 8px; height: 62px; }
  .wordmark { font-size: 21px; }
  .brand .crown-mark { width: 28px; }
  .nav a { padding: 8px 8px; font-size: 13.5px; }
}
@media (max-width: 420px) { .wordmark { font-size: 18px; } .nav .nav-cta { display: none; } }

.event-banner { background: linear-gradient(90deg, #3a1420, #241332 50%, #3a1420); border-bottom: 1px solid var(--hair-2); color: var(--text); text-align: center; padding: 10px 16px; font-size: 14px; }
.event-banner .eyebrow { margin-right: 6px; }
.event-banner span[data-countdown] { font-variant-numeric: tabular-nums; color: var(--gold-hi); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 3px;
  font: 600 14px/1 var(--font); letter-spacing: .04em;
  color: var(--text); background: transparent;
  border: 1px solid var(--hair-3);
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { color: #fff; border-color: var(--gold); background: rgba(216, 178, 94, .07); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn-gold {
  color: var(--gold-ink); background: var(--leaf); border-color: #b48c3e;
  box-shadow: inset 0 1px 0 rgba(255, 249, 225, .65), inset 0 -1px 0 rgba(90, 60, 10, .35), 0 8px 18px -10px rgba(216, 178, 94, .55);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .35);
}
.btn-gold:hover { color: var(--gold-ink); background: linear-gradient(180deg, #fbeec4 0%, #ead08a 38%, #d4aa55 70%, #b38c40 100%); border-color: #c79b45; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: var(--hair-2); background: transparent; }
.btn-danger { border-color: rgba(229, 115, 115, .45); color: #f3c4c4; }
.btn-danger:hover { border-color: var(--red); background: rgba(229, 115, 115, .08); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Labels, pills, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 2px; font: 600 11.5px/1 var(--font); letter-spacing: .06em; color: var(--muted); border: 1px solid var(--hair-2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live, .pill-delivered { color: var(--green); border-color: rgba(114, 201, 154, .35); }
.pill-pending, .pill-changes_requested, .pill-amber { color: var(--amber); border-color: rgba(227, 163, 60, .4); }
.pill-rejected, .pill-failed { color: var(--red); border-color: rgba(229, 115, 115, .4); }
.pill-offline, .pill-draft { color: var(--dim); }
.pill-gold { color: var(--gold-hi); border-color: var(--hair-3); }
.label-sponsored { font: 700 10.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.plan-badge { display: inline-block; vertical-align: 4px; font: 700 9.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; padding: 4px 6px 3px; border-radius: 2px; }
.plan-badge.pro { color: var(--muted); border: 1px solid var(--hair-2); }
.plan-badge.elite { color: var(--gold-ink); background: var(--leaf); }
.boost { font-style: normal; color: var(--gold); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.elite-frame { box-shadow: 0 0 0 1px var(--gold), 0 0 0 3px var(--ink-0), 0 0 0 4px var(--hair-3); }

/* ---------- Gilt frame: leaf border, inner hairline, corner lozenges ---------- */
.gilt-frame {
  position: relative; display: block;
  padding: 10px;
  background: linear-gradient(var(--ink-1), var(--ink-1)) padding-box, var(--leaf) border-box;
  border: 2px solid transparent;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.gilt-frame::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--hair-3); pointer-events: none; }
.gilt-frame::after {
  content: ''; position: absolute; inset: -8px; pointer-events: none;
  background: var(--lozenge) top left / 14px no-repeat, var(--lozenge) top right / 14px no-repeat,
              var(--lozenge) bottom left / 14px no-repeat, var(--lozenge) bottom right / 14px no-repeat;
}
.gilt-frame > .art { display: block; width: 100%; aspect-ratio: 3 / 2; }

/* ---------- Art for games without a banner ---------- */
.art { background-size: cover; background-position: center; }
.art-fallback { display: grid; place-items: center; font: 600 24px/1 var(--display); color: rgba(255, 244, 220, .88); letter-spacing: .08em; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.portrait-art.art-fallback { font-size: 72px; }

/* ---------- The Throne ---------- */
.throne {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--hair-2);
  background:
    radial-gradient(900px 420px at 72% 40%, rgba(216, 178, 94, .13), transparent 60%),
    radial-gradient(800px 600px at 15% 0%, rgba(80, 30, 110, .45), transparent 65%),
    linear-gradient(180deg, #160d1f 0%, var(--ink-0) 100%);
}
.throne::before { content: ''; position: absolute; inset: 0; background: var(--diaper); z-index: -1; mask-image: linear-gradient(180deg, #000 30%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); }
.throne-drape { position: absolute; left: 0; top: 0; bottom: 0; width: 120px; z-index: -1; opacity: .9;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 14px), linear-gradient(90deg, #3a1420, #241332);
  mask-image: linear-gradient(90deg, #000, transparent); -webkit-mask-image: linear-gradient(90deg, #000, transparent); }
.throne-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.throne-name { font-size: clamp(46px, 7vw, 86px); line-height: .95; margin: 14px 0 16px; }
.throne-tag { font: italic 500 clamp(19px, 2vw, 23px)/1.4 var(--display); color: #ddd0b8; max-width: 34ch; margin-bottom: 28px; }
.throne-facts { display: flex; margin: 0 0 30px; padding: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.throne-facts > div { flex: 1; padding: 14px 18px 14px 0; }
.throne-facts > div + div { padding-left: 18px; border-left: 1px solid var(--hair); }
.throne-facts dt { font: 600 10.5px/1.2 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.throne-facts dd { margin: 0; font: 600 30px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.throne-facts dd small { font: 500 13px var(--font); color: var(--muted); }
.throne-facts dd .boost { font-size: 13px; }
.throne-actions { margin-bottom: 18px; }
.throne-note { margin: 0; }
.throne-portrait { position: relative; display: block; padding-top: 38px; color: var(--text); }
.throne-portrait:hover { color: var(--text); }
.throne-portrait .gilt-frame { transition: transform .3s ease; }
.throne-portrait:hover .gilt-frame { transform: translateY(-2px); }
.throne-crown { position: absolute; top: -8px; left: 50%; width: 110px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); animation: crown-settle 1.1s cubic-bezier(.2, 1.3, .4, 1) both; }
.throne-crown .crown-mark { width: 110px; }
@keyframes crown-settle { from { transform: translate(-50%, -26px) rotate(-6deg); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.throne-plinth { display: block; text-align: center; margin-top: 18px; }
@media (max-width: 900px) {
  .throne { padding: 40px 0 48px; }
  .throne-grid { grid-template-columns: 1fr; gap: 28px; }
  .throne-portrait { order: -1; max-width: 520px; width: 100%; margin: 0 auto; }
  .throne-crown, .throne-crown .crown-mark { width: 84px; }
  .throne-drape { display: none; }
}
@media (max-width: 520px) {
  .throne-facts { flex-wrap: wrap; }
  .throne-facts > div { flex: 1 1 45%; }
  .throne-facts > div:nth-child(3) { flex-basis: 100%; padding-left: 0; border-left: 0; border-top: 1px solid var(--hair); }
  .throne-actions .btn { flex: 1; }
}

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.section-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair-2), transparent); min-width: 40px; }

/* ---------- Featured proclamation (paid) ---------- */
.proclamation {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; align-items: center;
  margin-top: 28px; padding: 14px 24px 14px 14px;
  border: 1px solid rgba(227, 163, 60, .35); background: linear-gradient(90deg, rgba(227, 163, 60, .06), transparent 60%), var(--ink-1);
  color: var(--text);
}
.proclamation:hover { color: var(--text); border-color: rgba(227, 163, 60, .6); }
.proclamation-art .art { height: 74px; }
.proclamation-copy { display: grid; gap: 4px; min-width: 0; }
.proclamation-copy b { font: 600 26px/1.1 var(--display); }
.proclamation-copy .muted { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .proclamation { grid-template-columns: 1fr; padding: 12px; } .proclamation-art .art { height: 120px; } }

/* ---------- The Court ---------- */
.court { padding-bottom: 8px; }
.court-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.court-card {
  position: relative; display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  padding: 20px 24px 20px 16px; color: var(--text);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--hair);
}
.court-card::before { content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; }
.court-silver::before { background: linear-gradient(180deg, #eef0f3, #7d828c); }
.court-bronze::before { background: linear-gradient(180deg, #f0c39b, #7a4f2c); }
.court-card:hover { color: var(--text); border-color: var(--hair-2); }
.court-crest { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.court-crest .laurel { position: absolute; inset: 0; width: 92px; height: 92px; }
.court-crest .crest { position: relative; width: 38px; height: 46px; margin-top: 4px; }
.court-body { display: grid; gap: 4px; min-width: 0; }
.court-silver .eyebrow { color: var(--silver); }
.court-bronze .eyebrow { color: var(--bronze); }
.court-name { font: 600 28px/1.1 var(--display); }
.court-body .small { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.court-votes { text-align: right; }
.court-votes b { display: block; font: 600 34px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.court-votes small { color: var(--dim); font-size: 12px; letter-spacing: .06em; }
@media (max-width: 860px) { .court-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .court-card { grid-template-columns: 64px 1fr; }
  .court-crest, .court-crest .laurel { width: 64px; height: 64px; }
  .court-crest .crest { width: 28px; height: 34px; }
  .court-votes { grid-column: 2; text-align: left; }
}

/* ---------- Hall of Crowns ---------- */
.hall { padding-bottom: 8px; }
.hall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hall-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 12px; border: 1px solid var(--hair); background: var(--ink-1); color: var(--text); }
.hall-card:hover { color: var(--text); border-color: var(--hair-2); }
.hall-card .seal { width: 58px; height: 58px; flex: none; }
.hall-card > span { display: grid; gap: 2px; min-width: 0; }
.hall-card b { font: 600 22px/1.15 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .hall-grid { grid-template-columns: 1fr; } }

/* ---------- The Royal Register ---------- */
.register-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.register-head h2 { margin: 6px 0 4px; }
.tabs { display: inline-flex; border-bottom: 1px solid var(--hair-2); }
.tabs a { padding: 10px 18px; color: var(--muted); font: 600 12.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--gold-hi); border-bottom-color: var(--gold); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 14px; margin-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 7px 14px; border: 1px solid var(--hair); color: var(--muted); font-size: 13px; font-weight: 500; border-radius: 2px; }
.chips a:hover { color: var(--text); border-color: var(--hair-2); }
.chips a.on { color: var(--gold-ink); background: var(--leaf); border-color: #b48c3e; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.ledger-row {
  display: grid; grid-template-columns: 64px 176px 1fr auto; gap: 22px; align-items: center;
  padding: 16px 12px 16px 4px; border-bottom: 1px solid var(--hair);
  transition: background-color .15s;
}
.ledger-row:hover { background: rgba(216, 178, 94, .035); }
.ledger-rank { display: grid; place-items: center; }
.rank-num { font: 600 30px/1 var(--display); color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.ledger-row.top { background: linear-gradient(90deg, rgba(216, 178, 94, .07), transparent 55%); }
.ledger-row.top-1 { background: linear-gradient(90deg, rgba(216, 178, 94, .13), transparent 60%); }
.ledger-row.top-1 .ledger-info h3 a { color: var(--gold-hi); }
.ledger-thumb { display: block; width: 176px; height: 56px; overflow: hidden; background: var(--ink-3); }
.ledger-thumb > * { width: 100%; height: 100%; }
.ledger-info { min-width: 0; }
.ledger-info h3 { margin: 0 0 3px; font: 600 23px/1.15 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-info h3 a { color: var(--text); }
.ledger-info h3 a:hover { color: var(--gold-hi); }
.ledger-info p { margin: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ledger-votes { display: flex; align-items: center; gap: 18px; }
.vote-count { text-align: right; min-width: 84px; }
.vote-count b { display: block; font: 600 28px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.vote-count span { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.ledger-row.sponsored { border-bottom-style: dashed; border-bottom-color: rgba(227, 163, 60, .25); background: linear-gradient(90deg, rgba(227, 163, 60, .05), transparent 60%); }
.sponsored-list { border-top-color: rgba(227, 163, 60, .3); }
.sponsored-list + .ledger { border-top: 0; }
.inlist-ad { list-style: none; display: flex; justify-content: center; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.bump { animation: bump .7s ease; }
@keyframes bump { 0% { color: var(--gold-hi); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }
@media (max-width: 900px) { .ledger-row { grid-template-columns: 52px 1fr auto; gap: 14px; } .ledger-thumb { display: none; } }
@media (max-width: 540px) {
  .ledger-row { grid-template-columns: 44px 1fr; row-gap: 10px; padding-right: 4px; }
  .ledger-votes { grid-column: 2; justify-content: space-between; }
  .vote-count { text-align: left; }
  .ledger-info h3 { font-size: 21px; }
  .ledger-info p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ledger-rank .crest { width: 34px; height: 41px; }
}
/* The seasons page uses the older ranking markup; give it the ledger look. */
.ranking { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-2); }
.rank-row { display: grid; grid-template-columns: 64px 176px 1fr auto; gap: 22px; align-items: center; padding: 16px 12px 16px 4px; border-bottom: 1px solid var(--hair); }
.rank-row .rank-num { text-align: center; }
.rank-row.top-1 { background: linear-gradient(90deg, rgba(216, 178, 94, .13), transparent 60%); }
.rank-row.top-1 .rank-num { color: var(--gold); }
.rank-row.top-2 .rank-num { color: var(--silver); }
.rank-row.top-3 .rank-num { color: var(--bronze); }
.rank-thumb { display: block; width: 176px; height: 56px; overflow: hidden; background: var(--ink-3); }
.rank-thumb > * { width: 100%; height: 100%; }
.rank-info { min-width: 0; }
.rank-info h3 { margin: 0 0 3px; font: 600 23px/1.15 var(--display); }
.rank-info h3 a { color: var(--text); }
.rank-info p { margin: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-votes { display: flex; align-items: center; gap: 18px; }
@media (max-width: 900px) { .rank-row { grid-template-columns: 52px 1fr auto; } .rank-thumb { display: none; } }

/* Closing decree */
.decree { text-align: center; padding: 64px 0 24px; max-width: 640px; margin: 0 auto; }
.decree h2 { margin: 18px 0 10px; font-size: clamp(30px, 3.4vw, 42px); }
.decree p { margin-bottom: 24px; }

/* ---------- Inner page heads ---------- */
.page-head { padding: 52px 0 12px; }
.page-head h1 { margin: 10px 0 12px; }
.page-head p { max-width: 62ch; }
.page-head.center { text-align: center; }
.page-head.center p { margin-left: auto; margin-right: auto; }

/* ---------- Cards and panels ---------- */
.card { position: relative; background: var(--ink-1); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px 24px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 25px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); border: 1px solid var(--hair); background: var(--ink-1); }
.empty .crown-mark { width: 54px; margin: 0 auto 14px; opacity: .8; }
.empty h2 { color: var(--text); }
.flash { margin: 18px 0 0; padding: 12px 16px; font-weight: 500; border: 1px solid; border-left-width: 3px; }
.flash-ok { color: #cfeedd; background: rgba(114, 201, 154, .07); border-color: rgba(114, 201, 154, .3); border-left-color: var(--green); }
.flash-error { color: #f6d0d0; background: rgba(229, 115, 115, .07); border-color: rgba(229, 115, 115, .3); border-left-color: var(--red); }
.preview-banner { margin-top: 18px; padding: 10px 14px; background: rgba(227, 163, 60, .08); border: 1px solid rgba(227, 163, 60, .3); color: #f4dfb6; font-size: 14px; }
.status-box { padding: 14px 16px; border: 1px solid var(--hair-2); border-left-width: 3px; background: var(--ink-2); }
.status-box.warn { border-color: rgba(227, 163, 60, .35); border-left-color: var(--amber); }
.status-box.bad { border-color: rgba(229, 115, 115, .35); border-left-color: var(--red); }
.status-box.good { border-color: rgba(114, 201, 154, .3); border-left-color: var(--green); }
.lock { padding: 18px; border: 1px dashed var(--hair-2); color: var(--muted); text-align: center; }
.removed-note { font-size: 13.5px; color: var(--muted); border-left: 3px solid var(--crimson); padding: 8px 12px; background: rgba(155, 35, 53, .08); }

/* Stats */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hair); background: var(--ink-1); }
.stat-tiles .stat { border: 0; background: none; }
.stat-tiles .stat + .stat { border-left: 1px solid var(--hair); }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 16px 20px; border: 1px solid var(--hair); background: var(--ink-1); }
.stat span { display: block; font: 600 10.5px/1.2 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.stat b { display: block; font: 600 36px/1.1 var(--display); font-variant-numeric: lining-nums tabular-nums; margin-top: 4px; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat small span { display: inline; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
@media (max-width: 780px) {
  .stat-tiles, .metric-row { grid-template-columns: 1fr 1fr; }
  .stat-tiles .stat:nth-child(3) { border-left: 0; }
  .stat-tiles .stat:nth-child(n+3) { border-top: 1px solid var(--hair); }
}

.detail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.detail-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--hair); padding-bottom: 10px; }
.detail-list li:last-child { border: 0; padding: 0; }
.detail-list span { color: var(--dim); }
.prose { color: #e5dac5; white-space: pre-line; }

/* ---------- Game page: the realm ---------- */
.realm {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 56px 0 52px; border-bottom: 1px solid var(--hair-2);
  background: radial-gradient(800px 400px at 80% 30%, rgba(216, 178, 94, .1), transparent 60%), radial-gradient(700px 500px at 10% 0%, rgba(80, 30, 110, .35), transparent 65%), linear-gradient(180deg, #150d1d, var(--ink-0));
}
.realm::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--diaper); mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); }
.realm-grid { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: center; }
.realm h1 { font-size: clamp(42px, 6vw, 74px); line-height: .98; margin: 14px 0 14px; }
.realm-tag { font: italic 500 21px/1.4 var(--display); color: #ddd0b8; max-width: 38ch; margin-bottom: 26px; }
.realm-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.realm-portrait { position: relative; }
.realm.champion .gilt-frame { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 90px -20px rgba(216, 178, 94, .4); }
.realm-portrait .throne-crown { top: -46px; }
@media (max-width: 900px) { .realm-grid { grid-template-columns: 1fr; gap: 28px; } .realm-portrait { order: -1; max-width: 520px; width: 100%; } }
.trophy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trophy { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; font: 600 12px/1.2 var(--font); letter-spacing: .04em; border: 1px solid var(--hair-2); color: var(--muted); }
.trophy .seal { width: 30px; height: 30px; filter: none; }
.trophy.p1 { color: var(--gold-hi); border-color: var(--hair-3); }
.trophy.p2 { color: var(--silver); }
.trophy.p3 { color: var(--bronze); }
.game-layout { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .game-layout { grid-template-columns: 1fr; } }

/* Bar chart: one series in gold */
.chart { position: relative; }
.chart svg { width: 100%; height: 140px; display: block; overflow: visible; }
.chart .bar { fill: var(--gold); opacity: .82; }
.chart .bar-hit { fill: transparent; }
.chart g:hover .bar { opacity: 1; fill: var(--gold-hi); }
.chart .axis { stroke: var(--hair-2); stroke-width: 1; }
.chart .grid { stroke: var(--hair); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .tick { fill: var(--dim); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--ink-4); border: 1px solid var(--hair-2); padding: 6px 10px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); opacity: 0; transition: opacity .08s; }
.chart-tip b { font-variant-numeric: tabular-nums; }
.chart-empty { height: 140px; display: grid; place-items: center; color: var(--dim); font-size: 13px; border: 1px dashed var(--hair); }

/* Ads in sidebars and lists */
.side-ad { display: flex; justify-content: center; margin-top: 16px; }
.inlist-ad a, .side-ad a { position: relative; display: block; width: 300px; height: 250px; overflow: hidden; border: 1px solid var(--hair); }
.inlist-ad img, .side-ad img { width: 300px; height: 250px; object-fit: cover; }
.inlist-ad .label-sponsored, .side-ad .label-sponsored, .cat-banner .label-sponsored { position: absolute; top: 6px; left: 6px; background: rgba(11, 8, 16, .85); padding: 4px 6px; z-index: 1; }
.cat-banner { position: relative; display: block; max-width: 728px; height: 90px; margin: 28px auto 0; overflow: hidden; border: 1px solid var(--hair); }
.cat-banner img { width: 100%; height: 90px; object-fit: cover; }
@media (max-width: 760px) { .cat-banner, .cat-banner img { height: auto; aspect-ratio: 320 / 100; max-width: 320px; } }

/* ---------- Vote: the royal decree ---------- */
.vote-shell { max-width: 560px; margin: 44px auto; padding: 0 16px; }
.vote-card { position: relative; background: var(--ink-1); border: 1px solid var(--hair-2); box-shadow: var(--shadow); }
.vote-card::after { content: ''; position: absolute; inset: 6px; border: 1px solid var(--hair); pointer-events: none; }
.vote-art { height: 168px; }
.vote-art.art-fallback { font-size: 44px; }
.vote-body { position: relative; padding: 0 36px 34px; text-align: center; }
.vote-body h1 { font-size: clamp(36px, 5vw, 48px); margin: 8px 0 8px; }
.vote-tag { font: italic 500 19px/1.4 var(--display); color: #ddd0b8; }
.vote-crown { width: 76px; margin: -38px auto 14px; position: relative; z-index: 2; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .6)); }
.vote-crown .crown-mark { width: 76px; }
.turnstile-box { min-height: 68px; display: flex; justify-content: center; margin: 22px 0 16px; }
.vote-btn { position: relative; overflow: hidden; height: 58px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.vote-btn .fill { position: absolute; inset: 0; background: rgba(255, 250, 230, .45); transform: scaleX(0); transform-origin: left; }
.vote-btn .label { position: relative; }
.vote-btn.sending .fill { transform: scaleX(1); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.countdown { font: 600 50px/1 var(--display); color: var(--gold-hi); font-variant-numeric: lining-nums tabular-nums; margin: 14px 0 8px; }
.done-mark { width: 112px; height: 112px; margin: 0 auto 10px; }
.done-mark .seal { width: 112px; height: 112px; }
.drop-in { animation: stamp .55s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes stamp { 0% { transform: scale(1.7) rotate(-14deg); opacity: 0; } 60% { transform: scale(.94) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.reward-note { border: 1px solid var(--hair-2); padding: 12px 16px; font-size: 14px; color: var(--muted); margin: 16px 0; background: var(--ink-2); }
.featured-strip { display: flex; align-items: center; gap: 14px; padding: 10px; margin-top: 16px; background: var(--ink-1); border: 1px solid rgba(227, 163, 60, .3); color: var(--text); }
.featured-strip:hover { color: var(--text); border-color: rgba(227, 163, 60, .55); }
.featured-strip .art { width: 120px; height: 42px; flex: none; }
.featured-strip div { min-width: 0; display: grid; gap: 2px; }
.featured-strip b { font: 600 19px/1.1 var(--display); }
.featured-strip span.muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.try-next { margin-top: 26px; }
.try-next h2 { font: 600 11.5px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.try-next h2::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.try-list { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.try-item { display: flex; align-items: center; gap: 14px; padding: 10px; background: var(--ink-1); color: var(--text); }
.try-item:hover { color: var(--text); background: var(--ink-2); }
.try-item .art { width: 96px; height: 40px; flex: none; }
.try-item .art-fallback { font-size: 14px; }
.try-item b { display: block; font: 600 18px/1.2 var(--display); }
.try-item span { font-size: 12.5px; color: var(--muted); }
.queue-note { margin-top: 14px; padding: 10px 14px; background: rgba(216, 178, 94, .07); border: 1px solid var(--hair-2); font-size: 14px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 3px;
  background: var(--ink-0); border: 1px solid var(--hair-2); color: var(--text);
  font: 15px var(--font);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 178, 94, .15); }
.input::placeholder { color: #6e6458; }
input[type=file].input { padding: 9px 12px; height: auto; }
input[type=radio], input[type=checkbox] { accent-color: var(--gold); }
.form-error { padding: 11px 14px; background: rgba(229, 115, 115, .07); border: 1px solid rgba(229, 115, 115, .3); border-left: 3px solid var(--red); color: #f6d0d0; }
.auth-card { max-width: 440px; margin: 56px auto; padding: 36px 36px 30px; }
.auth-card::after { content: ''; position: absolute; inset: 6px; border: 1px solid var(--hair); pointer-events: none; }
.auth-card > * { position: relative; z-index: 1; }
.auth-card h1 { font-size: 40px; }
.auth-crown { width: 48px; margin-bottom: 14px; }
.auth-crown .crown-mark { width: 48px; }
.inline-form { display: inline; margin: 0; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--hair-2); font-weight: 500; cursor: pointer; }
.radio-row label:has(input:checked) { border-color: var(--gold); background: rgba(216, 178, 94, .07); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--hair); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 10.5px/1.2 var(--font); color: var(--dim); text-transform: uppercase; letter-spacing: .14em; padding: 11px 12px; background: var(--ink-0); border-bottom: 1px solid var(--hair-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(216, 178, 94, .03); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
details.attempts summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details.attempts pre { margin: 8px 0 0; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* ---------- Dashboard ---------- */
.owner-games { display: grid; border-top: 1px solid var(--hair-2); }
.owner-game { display: grid; grid-template-columns: 160px 1fr auto; gap: 18px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--hair); }
.owner-game .art { height: 54px; }
.owner-game h3 { margin: 0 0 6px; font: 600 23px/1.1 var(--display); }
@media (max-width: 640px) { .owner-game { grid-template-columns: 1fr; } .owner-game .art { display: none; } }
.secret { display: flex; gap: 8px; align-items: center; }
.secret input { font-family: var(--mono); font-size: 12.5px; }
.code-tabs { display: flex; border-bottom: 1px solid var(--hair); }
.code-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); padding: 10px 14px; cursor: pointer; font: 600 13px var(--font); }
.code-tabs button.on { color: var(--gold-hi); border-bottom-color: var(--gold); }
[data-code-tabs] pre { border-top: 0; border-radius: 0 0 4px 4px; }
.subnav { display: flex; border-bottom: 1px solid var(--hair-2); margin: 22px 0; overflow-x: auto; }
.subnav a { padding: 11px 16px; color: var(--muted); font: 600 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a:hover { color: var(--text); }
.fill-art .art { height: 100%; }
.admin-art { height: 160px; }
.admin-art .art { height: 100%; }

/* Admin */
.review-card { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.review-card .art { height: 72px; }
@media (max-width: 760px) { .review-card { grid-template-columns: 1fr; } }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 14px; }
.diff > div { background: var(--ink-0); border: 1px solid var(--hair); padding: 12px 14px; }
.diff .art { height: 60px; margin-top: 8px; }
.decide { display: grid; gap: 10px; margin-top: 14px; }

/* ---------- Plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--hair-2); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px 30px; background: var(--ink-1); }
.plan + .plan { border-left: 1px solid var(--hair-2); }
.plan.featured-plan { background: radial-gradient(500px 300px at 50% 0%, rgba(216, 178, 94, .13), transparent 70%), var(--ink-2); }
.plan.featured-plan::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: var(--leaf); }
.plan-crown { width: 40px; margin-bottom: 14px; }
.plan-crown .crown-mark { width: 40px; }
.plan h2 { font-size: 34px; margin-bottom: 2px; }
.plan .price { font: 600 56px/1 var(--display); margin: 20px 0 4px; font-variant-numeric: lining-nums; }
.plan .price small { font: 500 14px var(--font); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 11px; font-size: 14.5px; flex: 1; }
.plan li { position: relative; padding-left: 24px; }
.plan li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.plan li.no { color: var(--dim); }
.plan li.no::before { background: none; border: 1px solid var(--dim); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan + .plan { border-left: 0; border-top: 1px solid var(--hair-2); } }

/* ---------- Advertise ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.slot-card { display: flex; flex-direction: column; gap: 12px; }
.slot-card .price { font: 600 38px/1 var(--display); color: var(--gold-hi); }
.slot-card .price small { font: 500 13px var(--font); color: var(--muted); }
.slot-card .btn { margin-top: auto; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.cal div { padding: 8px; border: 1px solid var(--hair); font-size: 12px; text-align: center; background: var(--ink-0); }
.cal div b { display: block; font-size: 13px; color: var(--text); }
.cal .free { color: var(--green); }
.cal .sold { color: var(--dim); text-decoration: line-through; }
.period-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.period-pick label { display: block; padding: 11px 13px; border: 1px solid var(--hair-2); cursor: pointer; font-size: 14px; }
.period-pick label:has(input:checked) { border-color: var(--gold); background: rgba(216, 178, 94, .07); }
.period-pick label.sold { opacity: .45; cursor: not-allowed; }
.period-pick input { margin-right: 6px; }
.period-pick small { display: block; color: var(--muted); }

/* ---------- Vote Hub ---------- */
.hub-list { display: grid; border-top: 1px solid var(--hair-2); }
.hub-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 18px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--hair); }
.hub-item.ready { background: linear-gradient(90deg, rgba(216, 178, 94, .08), transparent 60%); }
.hub-item h3 { margin: 0; font: 600 23px/1.15 var(--display); }
.ring { width: 58px; height: 58px; position: relative; }
.ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--hair-2); }
.ring .prog { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-item.ready .ring span { color: var(--gold-hi); }
.streak { display: flex; align-items: center; gap: 18px; }
.streak b { font: 600 64px/1 var(--display); color: var(--gold-hi); font-variant-numeric: lining-nums; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 72px; padding: 0 0 36px; border-top: 1px solid var(--hair-2); box-shadow: 0 -3px 0 -2px var(--hair); background: linear-gradient(180deg, var(--ink-1), var(--ink-0)); }
.footer-mark { padding: 36px 0 30px; text-align: center; }
.footer-motto { font: italic 500 26px/1.3 var(--display); color: #ddd0b8; margin: 14px 0 0; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--hair); }
.footer-cols p { max-width: 36ch; margin-top: 14px; }
.footer-cols a:not(.brand) { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.footer-cols a:not(.brand):hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--hair); }
@media (max-width: 720px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-cols > div:first-child { grid-column: 1 / -1; } }

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

/* Heraldic placeholder art: the game's hue, a lattice, a gilt monogram in a hairline frame. */
.art-fallback {
  position: relative; overflow: hidden;
  background:
    var(--diaper),
    radial-gradient(120% 140% at 30% 20%, hsl(var(--h, 280) 38% 22%), hsl(var(--h, 280) 42% 9%) 70%);
  background-size: 22px 22px, cover;
  box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .18), inset 0 0 40px rgba(0, 0, 0, .55);
}
.art-fallback::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(216, 178, 94, .22); pointer-events: none; }
.art-fallback .monogram {
  font: 600 1em/1 var(--display); letter-spacing: .06em;
  background: var(--leaf); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
}
.gilt-frame > .art-fallback { display: grid; font-size: clamp(64px, 9vw, 112px); }
.gilt-frame > .art-fallback::after { inset: 14px; }
.ledger-thumb .art-fallback, .rank-thumb .art-fallback { font-size: 24px; }
.realm-rank { display: inline-flex; align-items: center; gap: 12px; }
.realm-rank .crest { width: 34px; height: 41px; }
.realm-rank > span { display: grid; gap: 3px; }
.realm-rank b { font: 600 18px/1 var(--display); }
.realm-portrait { padding-top: 36px; }
.realm-portrait .throne-crown { top: -6px; }
.stat b span { display: inline; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.subnav, .tabs { scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .throne-portrait, .realm-portrait { order: 0; max-width: 300px; }
  .throne-crown, .throne-crown .crown-mark { width: 70px; }
  .throne-name { margin-top: 10px; }
  .realm h1 { font-size: 46px; }
}
.legal h2 { font-size: 24px; margin-top: 28px; }
.legal h2:first-of-type { margin-top: 12px; }
.legal p, .legal li { color: #e5dac5; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }

/* ==========================================================================
   Banners are 3:1 everywhere (the upload size is 1200 × 400), so what an owner
   uploads is exactly what players see. The hero shows it as a wide tapestry.
   ========================================================================== */
.banner-art { display: block; width: 100%; aspect-ratio: 3 / 1; }
.gilt-frame > .banner-art.art-fallback { display: grid; font-size: clamp(56px, 8vw, 104px); }

.throne { padding: 34px 0 56px; }
.throne-eyebrow { display: block; text-align: center; margin-bottom: 8px; }
.tapestry { position: relative; display: block; padding-top: 58px; color: var(--text); }
.tapestry:hover { color: var(--text); }
.tapestry .gilt-frame { transition: transform .3s ease; }
a.tapestry:hover .gilt-frame { transform: translateY(-2px); }
/* The crown rests on the top edge of the frame instead of covering the art. */
.tapestry-crown { position: absolute; top: 0; left: 50%; width: 92px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .6)); animation: crown-settle 1.1s cubic-bezier(.2, 1.3, .4, 1) both; }
.tapestry-crown .crown-mark { width: 92px; }
.realm .tapestry { padding-top: 0; }
.realm .tapestry.crowned { padding-top: 58px; }

.throne-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: 30px; }
.throne-name { font-size: clamp(44px, 6vw, 76px); margin: 0 0 10px; }
.throne-tag { margin-bottom: 0; }
.throne-side { display: grid; gap: 18px; justify-items: end; }
.throne-side .throne-facts { margin: 0; min-width: 440px; }
.throne-side .throne-note { text-align: right; }
.realm { padding: 34px 0 44px; }
.realm h1 { margin: 12px 0 10px; }
.realm .realm-tag { margin-bottom: 18px; }
@media (max-width: 900px) {
  .throne-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 22px; }
  .throne-side { justify-items: stretch; }
  .throne-side .throne-facts { min-width: 0; }
  .throne-side .throne-note { text-align: left; }
}
@media (max-width: 600px) {
  .tapestry { padding-top: 44px; }
  .tapestry-crown, .tapestry-crown .crown-mark { width: 64px; }
  .gilt-frame { padding: 6px; }
  .gilt-frame::before { inset: 3px; }
}

/* Small banner spots, all 3:1 */
.ledger-thumb, .rank-thumb { width: 168px; height: 56px; }
.vote-art { height: auto; aspect-ratio: 3 / 1; }
.proclamation { grid-template-columns: 222px 1fr auto; }
.proclamation-art .art { height: 74px; }
.owner-game .art { height: auto; aspect-ratio: 3 / 1; }
.try-item .art { width: 120px; height: 40px; }
.featured-strip .art { width: 126px; height: 42px; }
.review-card .art { height: auto; aspect-ratio: 3 / 1; }
.diff .art { height: auto; aspect-ratio: 3 / 1; }
.admin-art { height: auto; aspect-ratio: 3 / 1; }
@media (max-width: 720px) { .proclamation-art .art { height: auto; aspect-ratio: 3 / 1; } }
.gilt-frame > .banner-art { aspect-ratio: 3 / 1; }
.tapestry { max-width: 960px; margin: 0 auto; }
/* Vote page: the crown sits under the banner, never on top of the art. */
.vote-crown { margin: 18px auto 10px; }
