/* =========================================================
   Valkyrie RSPS — Site Stylesheet
   Palette pulled from the Valkyrie crest: midnight navy,
   forged gold trim, sapphire gems, weathered stone.
   ========================================================= */

:root {
  /* Core palette */
  --bg:            #070b16;
  --bg-2:          #0b1224;
  --surface:       #101a31;
  --surface-2:     #15213f;
  --surface-3:     #1b2a4f;
  --royal:         #1d3577;
  --royal-2:       #26449a;

  --gold:          #d8ad4a;
  --gold-bright:   #f3d27a;
  --gold-dark:     #9a7228;
  --sapphire:      #2f8bff;
  --sapphire-glow: #59b8ff;
  --stone:         #a9b0bb;
  --feather:       #eef1f6;

  --text:          #e9edf5;
  --text-muted:    #a3aec4;
  --text-dim:      #7d89a3;

  --success:       #3fd38a;
  --danger:        #ff6b6b;

  --border:        rgba(216, 173, 74, 0.22);
  --border-strong: rgba(216, 173, 74, 0.55);
  --border-soft:   rgba(255, 255, 255, 0.07);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow:    0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow-gold: 0 0 0 1px var(--border-strong), 0 8px 30px rgba(216, 173, 74, 0.18);
  --glow-blue: 0 0 24px rgba(47, 139, 255, 0.45);

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(38, 68, 154, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(47, 139, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sapphire-glow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
  color: var(--feather);
}
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Accessible focus */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--sapphire-glow);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--gold); color: #120d02; font-weight: 700;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #120d02; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
@media (max-width: 480px) { .container { padding-inline: 16px; } }

/* ---------- Status bar (top strip) ---------- */
.status-bar {
  background: linear-gradient(90deg, #060a14, #0d1730 50%, #060a14);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.status-bar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 38px; flex-wrap: wrap;
}
.status-pill { display: inline-flex; align-items: center; gap: 0.5rem; }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(63, 211, 138, 0.6);
  animation: pulse 2s infinite;
}
.status-dot.offline { background: var(--danger); animation: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 211, 138, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(63, 211, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 211, 138, 0); }
}
.status-bar strong { color: var(--feather); }
.status-links { display: flex; gap: 1rem; }
.status-links a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.status-links a:hover { color: var(--gold-bright); }
@media (max-width: 560px) { .status-links { display: none; } .status-bar .container { justify-content: center; } }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  isolation: isolate; top: 0; z-index: 100;
  background: rgba(7, 11, 22, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.55;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--feather); }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); box-shadow: 0 0 18px rgba(47,139,255,0.25); }
.brand-name {
  font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; letter-spacing: 0.08em;
  background: linear-gradient(180deg, #ffffff 0%, var(--stone) 55%, #7b828d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 var(--gold-dark));
}
.brand:hover .brand-name { filter: drop-shadow(0 1px 0 var(--gold)); }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.primary-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.95rem; border-radius: 10px;
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em; transition: color .2s, background-color .2s;
}
.primary-nav a svg { width: 18px; height: 18px; opacity: 0.85; }
.primary-nav a:hover { color: var(--feather); background: rgba(255,255,255,0.04); }
.primary-nav a[aria-current="page"] { color: var(--gold-bright); }
.primary-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.95rem; right: 0.95rem; bottom: 0.3rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright), var(--gold-dark));
}
.primary-nav .nav-play a {
  margin-left: 0.5rem; color: #120d02; padding: 0.6rem 1.25rem;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 0 0 1px #6b4f17 inset, 0 6px 18px rgba(216,173,74,0.25);
}
.primary-nav .nav-play a:hover { color: #120d02; filter: brightness(1.08); background: linear-gradient(180deg, #fff0b8, var(--gold-bright) 55%, var(--gold)); }
.primary-nav .nav-play a[aria-current="page"]::after { display: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--feather);
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #090e1c; border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px rgba(0,0,0,0.6);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .3s ease, visibility .3s;
  }
  .primary-nav.open { max-height: 80vh; visibility: visible; overflow-y: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: 0.75rem 16px 1.25rem; gap: 0.2rem; }
  .primary-nav a { display: flex; padding: 0.9rem 1rem; font-size: 1.05rem; }
  .primary-nav a[aria-current="page"] { background: rgba(216,173,74,0.08); }
  .primary-nav a[aria-current="page"]::after { left: 0; right: auto; top: 20%; bottom: 20%; width: 3px; height: auto; }
  .primary-nav .nav-play a { margin: 0.5rem 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.4rem; border-radius: 12px; border: 0;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .2s, box-shadow .2s, background-color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold {
  color: #120d02;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 0 0 1px #6b4f17 inset, 0 10px 26px rgba(216,173,74,0.28);
}
.btn-gold:hover { color: #120d02; filter: brightness(1.08); }
.btn-blue {
  color: #fff;
  background: linear-gradient(180deg, #4aa6ff, var(--sapphire) 55%, #1b5fc4);
  box-shadow: 0 0 0 1px #144a99 inset, 0 10px 26px rgba(47,139,255,0.3);
}
.btn-blue:hover { color: #fff; filter: brightness(1.1); }
.btn-ghost {
  color: var(--feather); background: rgba(255,255,255,0.03);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}
.btn-ghost:hover { color: var(--gold-bright); background: rgba(216,173,74,0.07); }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.92rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; filter: grayscale(0.3); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-scene.webp") center 30% / cover no-repeat;
  opacity: 0.38; transform: scale(1.05);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 420px at 72% 45%, rgba(47,139,255,0.18), transparent 70%),
    linear-gradient(90deg, rgba(7,11,22,0.96) 0%, rgba(7,11,22,0.75) 45%, rgba(7,11,22,0.55) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2.5rem;
  padding-block: clamp(3rem, 8vw, 6.5rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 900; letter-spacing: 0.04em; margin-bottom: 0.4em;
  background: linear-gradient(180deg, #ffffff 0%, #dfe3ea 45%, var(--stone) 70%, #8a919c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(154,114,40,0.7)) drop-shadow(0 10px 25px rgba(0,0,0,0.5));
}
.hero h1 .accent { background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, var(--gold-dark)); -webkit-background-clip: text; background-clip: text; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); max-width: 36rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.hero-stats li {
  min-width: 130px; padding: 0.8rem 1.1rem; border-radius: var(--radius);
  background: rgba(16,26,49,0.7); border: 1px solid var(--border-soft);
}
.hero-stats .num { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--feather); line-height: 1.2; }
.hero-stats .label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-crest { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-crest::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,139,255,0.45), transparent 65%);
  filter: blur(30px); z-index: -1; animation: breathe 6s ease-in-out infinite;
}
.hero-crest img { width: 100%; filter: drop-shadow(0 25px 45px rgba(0,0,0,0.6)); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breathe { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; padding-top: 2rem; }
  .hero-crest { order: -1; width: min(300px, 78vw); }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .eyebrow { justify-content: center; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .hero-stats li { flex: 1 1 40%; min-width: 0; }
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--border); text-align: center; }
.page-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-scene.webp") center 35% / cover no-repeat; opacity: 0.22;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px 240px at 50% 60%, rgba(47,139,255,0.18), transparent 70%), linear-gradient(0deg, var(--bg) 0%, rgba(7,11,22,0.65) 100%);
}
.page-banner .container { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-banner h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.3em; }
.page-banner p { color: var(--text-muted); max-width: 40rem; margin: 0 auto; }
.page-banner .eyebrow { justify-content: center; }
.page-banner .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-alt { background: linear-gradient(180deg, rgba(16,26,49,0.35), rgba(16,26,49,0.1)); border-block: 1px solid var(--border-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0; }
.section-head p { margin: 0.35rem 0 0; color: var(--text-muted); }
.divider {
  display: flex; align-items: center; gap: 0.75rem; color: var(--gold); margin-block: 0.5rem 0;
}
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-dark)); }
.divider::after { background: linear-gradient(90deg, var(--gold-dark), transparent); }
.gem {
  width: 12px; height: 12px; transform: rotate(45deg); flex: none;
  background: linear-gradient(135deg, var(--sapphire-glow), #0d3d8f);
  border: 2px solid var(--gold); box-shadow: var(--glow-blue);
}

/* ---------- Cards ---------- */
.card {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-hover { transition: transform .2s ease, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Feature tiles */
.feature { padding: 1.6rem; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem;
  background: radial-gradient(circle at 30% 25%, rgba(89,184,255,0.35), rgba(29,53,119,0.6));
  border: 1px solid var(--border-strong); color: var(--gold-bright);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.feature p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }

/* ---------- News ---------- */
.news-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.news-card:hover { color: inherit; }
.news-thumb {
  aspect-ratio: 16 / 8; position: relative; overflow: hidden;
  background: url("../img/hero-scene.webp") center / cover no-repeat;
}
.news-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface-2) 2%, rgba(16,26,49,0.25)); }
.news-thumb.t2 { background-size: 220%; background-position: 92% 35%; }
.news-thumb.t3 { background-size: 200%; background-position: 30% 20%; }
.news-thumb.t4 { background-size: 240%; background-position: 70% 95%; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.28rem 0.6rem; border-radius: 999px; border: 1px solid; line-height: 1.3;
}
.tag-update   { color: var(--sapphire-glow); border-color: rgba(89,184,255,0.45); background: rgba(47,139,255,0.12); }
.tag-event    { color: var(--gold-bright);   border-color: var(--border-strong);   background: rgba(216,173,74,0.12); }
.tag-announce { color: #c9b8ff; border-color: rgba(201,184,255,0.4); background: rgba(140,110,255,0.12); }
.tag-patch    { color: var(--success); border-color: rgba(63,211,138,0.4); background: rgba(63,211,138,0.1); }
.news-thumb .tag { position: absolute; left: 1rem; bottom: 1rem; z-index: 1; }
.news-card .card-body { display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.news-card h3 { font-size: 1.2rem; }
.news-card p { color: var(--text-muted); font-size: 0.97rem; flex: 1; }
.read-more { font-weight: 700; color: var(--gold-bright); display: inline-flex; align-items: center; gap: 0.35rem; }

.news-featured { display: grid; grid-template-columns: 1.2fr 1fr; }
.news-featured .news-thumb { aspect-ratio: auto; min-height: 280px; }
.news-featured .news-thumb::after { background: linear-gradient(90deg, transparent 40%, var(--surface-2)); }
.news-featured .card-body { padding: 2rem; justify-content: center; }
.news-featured h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
@media (max-width: 800px) {
  .news-featured { grid-template-columns: 1fr; }
  .news-featured .news-thumb { min-height: 200px; }
  .news-featured .news-thumb::after { background: linear-gradient(0deg, var(--surface-2) 2%, transparent); }
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.chip {
  min-height: 40px; padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-muted); font-weight: 600; font-size: 0.92rem;
}
.chip:hover { color: var(--feather); border-color: var(--border); }
.chip[aria-pressed="true"] { color: #120d02; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); border-color: var(--gold); }

/* Article dialog */
.article-dialog {
  width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.article-dialog::backdrop { background: rgba(3,6,14,0.78); backdrop-filter: blur(4px); }
.article-dialog .dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1.4rem 1.5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.article-dialog .dialog-head h2 { margin: 0.4rem 0 0; font-size: 1.5rem; }
.article-dialog .dialog-body { padding: 1.25rem 1.5rem 1.75rem; color: var(--text-muted); }
.article-dialog .dialog-body h3 { font-size: 1.1rem; margin-top: 1.4em; color: var(--gold-bright); }
.article-dialog .dialog-body ul { padding-left: 1.2rem; }
.icon-btn {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--feather);
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--gold-bright); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Vote ---------- */
.vote-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; height: 100%; }
.vote-top { display: flex; align-items: center; gap: 0.9rem; }
.vote-num {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px;
  font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: #120d02;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dark));
}
.vote-card h3 { margin: 0; font-size: 1.1rem; }
.vote-card .sub { color: var(--text-dim); font-size: 0.88rem; }
.vote-reward { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.7rem 0.9rem; border-radius: 10px; background: rgba(0,0,0,0.22); border: 1px solid var(--border-soft); }
.vote-reward b { color: var(--gold-bright); }
.vote-card .btn { margin-top: auto; }
.vote-card.voted { border-color: rgba(63,211,138,0.45); }
.vote-card.voted .vote-num { background: linear-gradient(180deg, #7ff0b8, #1f9e62); }
.cooldown { font-size: 0.85rem; color: var(--success); min-height: 1.3em; }

.username-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; }
.username-form .field { flex: 1 1 260px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1.1rem 1.1rem 1.1rem 4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); }
.steps li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1.05rem; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: var(--gold-bright); border: 1px solid var(--border-strong); background: rgba(216,173,74,0.08);
}
.steps strong { color: var(--feather); }
.steps p { margin: 0.2rem 0 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Forms ---------- */
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; color: var(--feather); }
.input, .select {
  width: 100%; min-height: 48px; padding: 0.7rem 0.95rem; border-radius: 12px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.12); color: var(--feather);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-dim); }
.input:hover, .select:hover { border-color: var(--border); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--sapphire-glow); box-shadow: 0 0 0 3px rgba(89,184,255,0.3); border-radius: 12px; }
.select { appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8ad4a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 18px; }
.select option { background: var(--surface); }
.input-search { position: relative; }
.input-search svg { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-dim); pointer-events: none; }
.input-search .input { padding-left: 2.6rem; }

/* ---------- Hiscores ---------- */
.hs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .hs-layout { grid-template-columns: 1fr; } }
.hs-side { position: sticky; top: calc(var(--header-h) + 16px); padding: 1rem; }
@media (max-width: 900px) { .hs-side { position: static; } }
.hs-side h2 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); font-family: var(--font-body); margin: 0.25rem 0.5rem 0.75rem; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 1rem; padding: 0.3rem; border-radius: 12px; background: rgba(0,0,0,0.25); }
.mode-tabs button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.mode-tabs button[aria-pressed="true"] { background: var(--royal); color: var(--feather); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
.skill-list button {
  width: 100%; display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem; border-radius: 9px;
  border: 0; background: transparent; color: var(--text-muted); text-align: left; cursor: pointer; font-size: 0.95rem;
}
.skill-list button:hover { background: rgba(255,255,255,0.04); color: var(--feather); }
.skill-list button[aria-current="true"] { background: linear-gradient(90deg, rgba(216,173,74,0.16), transparent); color: var(--gold-bright); box-shadow: inset 3px 0 0 var(--gold); }
.skill-ico { width: 22px; height: 22px; display: grid; place-items: center; font-size: 14px; flex: none; }
.skill-select-mobile { display: none; }
@media (max-width: 900px) {
  .skill-list { display: none; }
  .skill-select-mobile { display: block; }
}

.hs-toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border-soft); }
.hs-toolbar h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 0.6rem; }
.hs-toolbar .input-search { flex: 0 1 300px; }
@media (max-width: 560px) { .hs-toolbar .input-search { flex: 1 1 100%; } }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.table caption { text-align: left; }
.table th, .table td { padding: 0.85rem 1.25rem; text-align: left; white-space: nowrap; }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); font-weight: 700; background: rgba(0,0,0,0.2); }
.table tbody tr { border-top: 1px solid var(--border-soft); }
.table tbody tr:hover { background: rgba(47,139,255,0.06); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-badge { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 0.4rem; border-radius: 8px; font-weight: 800; font-size: 0.9rem; color: var(--text-muted); background: rgba(255,255,255,0.04); }
.rank-1 { color: #1a1203; background: linear-gradient(180deg, #ffe599, #d8ad4a); }
.rank-2 { color: #11151c; background: linear-gradient(180deg, #f2f5f9, #a9b0bb); }
.rank-3 { color: #1a0e05; background: linear-gradient(180deg, #f1b787, #b56c34); }
.player { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--feather); font-weight: 600; text-decoration: none; }
.player:hover { color: var(--gold-bright); }
.mode-icon { width: 16px; height: 16px; flex: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border-soft); color: var(--text-dim); font-size: 0.9rem; flex-wrap: wrap; }
.pager .btns { display: flex; gap: 0.5rem; }
.empty { padding: 3rem 1.25rem; text-align: center; color: var(--text-dim); }

/* Player profile panel */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; padding: 1.25rem; }
.profile-skill { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border-radius: 10px; background: rgba(0,0,0,0.22); border: 1px solid var(--border-soft); }
.profile-skill b { color: var(--feather); margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- Store ---------- */
.store-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .store-layout { grid-template-columns: 1fr; } }
.product { display: flex; flex-direction: column; height: 100%; }
.product-art {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative;
  background:
    radial-gradient(circle at 50% 55%, rgba(47,139,255,0.35), transparent 60%),
    linear-gradient(180deg, var(--surface-3), var(--surface));
  border-bottom: 1px solid var(--border-soft);
}
.product-art svg { width: 44%; height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5)); }
.product-art .tag { position: absolute; top: 0.8rem; left: 0.8rem; }
.product .card-body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.product h3 { font-size: 1.05rem; margin: 0; }
.product p { color: var(--text-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }
.price { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--gold-bright); }
.price s { font-size: 0.9rem; color: var(--text-dim); margin-left: 0.35rem; font-family: var(--font-body); }

.cart { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 1000px) { .cart { position: static; } }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border-soft); }
.cart-head h2 { margin: 0; font-size: 1.2rem; }
.cart-count { min-width: 26px; height: 26px; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 0.45rem; font-size: 0.85rem; font-weight: 800; background: var(--sapphire); color: #fff; }
.cart-items { list-style: none; margin: 0; padding: 0.5rem 1.25rem; max-height: 340px; overflow-y: auto; }
.cart-items li { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border-soft); }
.cart-items li:last-child { border-bottom: 0; }
.cart-items .name { flex: 1; font-size: 0.95rem; color: var(--feather); }
.cart-items .line-price { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.92rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: rgba(255,255,255,0.04); color: var(--feather); cursor: pointer; font-weight: 700; }
.qty button:hover { background: rgba(216,173,74,0.15); }
.qty span { min-width: 26px; text-align: center; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cart-foot { padding: 1.1rem 1.25rem 1.25rem; border-top: 1px solid var(--border-soft); display: grid; gap: 0.85rem; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; }
.cart-total span:last-child { color: var(--gold-bright); font-family: var(--font-display); }
.cart-empty { padding: 1.5rem 0; text-align: center; color: var(--text-dim); font-size: 0.95rem; }
.fine-print { font-size: 0.82rem; color: var(--text-dim); }

/* Rank tiers */
.tier { padding: 1.5rem; text-align: center; }
.tier-badge { width: 64px; height: 64px; margin: 0 auto 0.8rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid; }
.tier-badge svg { width: 30px; height: 30px; }
.tier h3 { margin-bottom: 0.2rem; }
.tier .req { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 0.8rem; }
.tier ul { list-style: none; padding: 0; margin: 0; text-align: left; display: grid; gap: 0.4rem; font-size: 0.92rem; color: var(--text-muted); }
.tier li::before { content: "◆"; color: var(--gold); font-size: 0.7rem; margin-right: 0.5rem; vertical-align: 1px; }

/* ---------- Play ---------- */
.download-card { padding: clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.download-card .os-icon { width: 54px; height: 54px; margin: 0 auto 1rem; color: var(--gold-bright); }
.download-card h3 { font-size: 1.35rem; }
.download-card p { color: var(--text-muted); }
.download-meta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-dim); margin-top: 0.9rem; }
.download-card.primary { border-color: var(--border-strong); box-shadow: var(--shadow-lg), var(--glow-gold); }
.download-card.primary::before {
  content: "Recommended"; position: absolute; top: 1rem; right: -2.6rem; transform: rotate(45deg);
  background: var(--gold); color: #120d02; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 3rem;
}
.req-table { width: 100%; border-collapse: collapse; }
.req-table th, .req-table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: 0.95rem; }
.req-table th { color: var(--text-dim); font-weight: 600; width: 38%; }

/* FAQ */
.faq { display: grid; gap: 0.75rem; }
.faq details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); }
.faq details[open] { border-color: var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 1.25rem; font-weight: 600; color: var(--feather); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.25rem 1.2rem; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../img/hero-scene.webp") center 60% / cover; opacity: 0.35; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 220px at 50% 50%, rgba(29,53,119,0.5), rgba(7,11,22,0.92)); }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.cta-band p { color: var(--text-muted); max-width: 34rem; margin: 0 auto 1.6rem; }
.cta-band .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.8rem; }

/* Top players mini-list */
.mini-list { list-style: none; margin: 0; padding: 0.5rem 0; }
.mini-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.25rem; border-top: 1px solid var(--border-soft); }
.mini-list li:first-child { border-top: 0; }
.mini-list .who { flex: 1; color: var(--feather); font-weight: 600; }
.mini-list .val { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border-soft); }
.card-title h3 { margin: 0; font-size: 1.1rem; }
.card-title a { font-size: 0.9rem; font-weight: 600; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(11,18,36,0.6), #050810); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-block: 3rem 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-dim); font-size: 0.93rem; max-width: 22rem; margin-top: 0.9rem; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer ul a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.site-footer ul a:hover { color: var(--gold-bright); }
.socials { display: flex; gap: 0.5rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-muted); }
.socials a:hover { color: var(--gold-bright); border-color: var(--border-strong); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid var(--border-soft); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Toast ---------- */
.toast-region { position: fixed; z-index: 500; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 0.5rem; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); color: var(--feather); font-size: 0.95rem;
  animation: toastIn .25s ease;
}
.toast .gem { width: 10px; height: 10px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.gold { color: var(--gold-bright); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 2rem; }
.stack > * + * { margin-top: 1.5rem; }
.copy-ip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem 0.35rem 0.85rem; border-radius: 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-soft); font-family: ui-monospace, Consolas, monospace; }
.copy-ip button { border: 0; background: var(--surface-3); color: var(--gold-bright); border-radius: 7px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.82rem; font-weight: 700; font-family: var(--font-body); }

@media (forced-colors: active) {
  .btn, .chip, .tag, .card { border: 1px solid CanvasText; }
  .hero h1, .brand-name { color: CanvasText; background: none; -webkit-text-fill-color: CanvasText; }
}
