/* =====================================================================
   AetherBD site theme. Same palette, type and spacing as the launcher
   (Themes/Colors.xaml + AetherTheme.xaml). The Central Market has its own
   in-game look in market.css.
   ===================================================================== */

:root {
  /* surfaces */
  --bg: #080b0d;
  --bg-2: #0a0e10;
  --panel: #101518;
  --panel-2: #13181b;
  --panel-3: #1a2227;
  --card: linear-gradient(180deg, #141a1e, #101518);
  --line: rgba(255, 255, 255, .05);
  --line-2: rgba(255, 255, 255, .08);
  --line-3: rgba(255, 255, 255, .12);
  --white-02: rgba(255, 255, 255, .02);
  --white-04: rgba(255, 255, 255, .04);
  --white-06: rgba(255, 255, 255, .06);

  /* text */
  --text: #eaeaea;
  --text-2: #cfd6db;
  --text-3: #98a2a8;
  --muted: #7f8a90;
  --faint: #5f6a72;

  /* accent + status */
  --gold: #d59e50;
  --gold-hi: #f0c277;
  --gold-soft: rgba(213, 158, 80, .14);
  --gold-line: rgba(213, 158, 80, .34);
  --gold-ink: #1b1308;
  --green: #4fb37a;
  --green-soft: rgba(79, 179, 122, .14);
  --amber: #d8924a;
  --red: #e26a5f;
  --red-soft: rgba(226, 106, 95, .14);
  --steel: #6f93b0;
  --steel-soft: rgba(111, 147, 176, .12);
  --silver: #b8c5cc;
  --bronze: #c68a5c;

  /* type */
  --brand: "Marcellus", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, ui-monospace, monospace;

  /* shape + motion */
  --r: 8px;
  --r-sm: 6px;
  --header-h: 52px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sweep: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text-2);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
#root { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-hi); }
::selection { background: var(--gold); color: var(--gold-ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.2; color: var(--text); }
h1, h2 { font-family: var(--brand); }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 15px; font-family: var(--sans); font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; padding: 1px 5px; border-radius: 4px; background: var(--white-06); color: var(--gold-hi); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.page { padding: 20px 0 32px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.gold { color: var(--gold); }
.good { color: var(--green); }
.bad { color: var(--red); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* small uppercase label, the launcher's eyebrow */
.label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.section-head { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 8px; }
.section-head .label { color: var(--faint); }
.section-head .count { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.section-head .more { margin-left: auto; font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* ---------- panels ---------- */
.panel { position: relative; padding: 14px 16px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); }
.panel.flat { background: var(--panel); }
.panel.pad-0 { padding: 0; overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer;
  font: 600 13px/1 var(--sans); white-space: nowrap;
  transition: transform .12s ease, box-shadow .3s ease, border-color .15s, color .15s, background-color .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 5px; }

/* Gold action button: a lighter gold sweeps in from the left. */
.btn-gold { color: var(--gold-ink); background: var(--gold); }
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--gold) 70%, #fff4da 30%);
  transform: scaleX(0); transform-origin: left center; transition: transform .4s var(--sweep);
}
.btn-gold:hover:not(:disabled), .btn-gold:focus-visible { color: var(--gold-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.btn-gold:hover:not(:disabled)::after, .btn-gold:focus-visible::after { transform: scaleX(1); }
.btn-gold:active:not(:disabled) { transform: scale(.97); }

.btn-ghost { color: var(--text-2); background: var(--white-04); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--white-06); border-color: var(--gold-line); }
.btn-danger { color: #f0a49c; background: transparent; border-color: rgba(226, 106, 95, .4); }
.btn-danger:hover:not(:disabled) { color: #fff; background: var(--red-soft); border-color: var(--red); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Download: lift, glow, a shine across and a bobbing arrow. */
.btn-shine { color: var(--gold-ink); background: linear-gradient(180deg, #e2ab5c, var(--gold)); transition: transform .2s var(--ease), box-shadow .3s ease, filter .3s ease; }
.btn-shine::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 246, 222, .55), transparent); transform: skewX(-20deg);
}
.btn-shine:hover, .btn-shine:focus-visible { color: var(--gold-ink); transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--gold) 75%, transparent); }
.btn-shine:hover::before, .btn-shine:focus-visible::before { animation: shine .85s ease forwards; }
.btn-shine:active { transform: translateY(0) scale(.97); }
.btn-shine:hover .dl-icon { animation: nudge .9s ease-in-out infinite; }
@keyframes shine { to { left: 130%; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }

/* The launcher's PLAY button, used for DOWNLOAD. */
.btn-play {
  display: inline-grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  width: 220px; height: 56px; padding: 0 14px 0 20px; border-radius: 10px; text-align: left;
  color: var(--gold-ink); background: linear-gradient(180deg, #e7b264, #c48a3d);
  box-shadow: 0 4px 22px -6px rgba(213, 158, 80, .55);
}
.btn-play b { display: block; font: 700 19px/1.1 var(--brand); letter-spacing: .02em; }
.btn-play small { display: block; margin-top: 3px; font: 500 10px/1 var(--sans); color: rgba(27, 19, 8, .7); }
.btn-play .ring { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); transition: transform .25s var(--ease), background-color .25s; }
.btn-play:hover .ring { transform: scale(1.1); background: rgba(255, 255, 255, .35); }

.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--text-3); cursor: pointer; transition: color .15s, background-color .15s; }
.icon-btn:hover { color: var(--text); background: var(--white-06); }

/* ---------- header (the launcher's nav row) ---------- */
#site-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(13, 18, 21, .94), rgba(13, 18, 21, .86)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--white-04); }
.nav { height: var(--header-h); display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: baseline; color: var(--text); }
.brand:hover { color: var(--text); }
.wordmark { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--brand); }
.wordmark .wm-a { font-size: 19px; font-weight: 700; letter-spacing: .02em; color: var(--gold); }
.wordmark .wm-dot { font-size: 14px; color: var(--faint); }
.wordmark .wm-b { font-size: 14px; font-weight: 600; color: var(--text-2); }
.nav-links { display: flex; align-items: center; flex: 1; gap: 4px; }
.nav-items { display: flex; align-items: center; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; height: var(--header-h); margin: 0 11px;
  color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  transition: color .18s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 12px; height: 2px; border-radius: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left center; transition: transform .18s ease;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.admin-link { color: var(--gold); }
.nav-side { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-pane { display: flex; align-items: center; gap: 2px; padding: 2px 2px 2px 4px; border-radius: 8px; background: var(--white-02); border: 1px solid var(--line); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 3px; border-radius: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.user-chip:hover { color: var(--text); background: var(--white-04); }
.user-chip .av { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); font: 700 11px/1 var(--sans); }
.nav-login { padding: 0 12px; height: 30px; display: inline-flex; align-items: center; color: var(--text-2); font-size: 13px; font-weight: 600; }
.nav-login:hover { color: var(--text); }
.nav-dl { height: 32px; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; background: none; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); cursor: pointer; font-size: 16px; }
/* The phone menu (see 860px below) wherever the full row doesn't fit: .compact is set by
   Header.jsx and the wiki's wiki.js, which measure the row (Admin, a name, a language). */
#site-header.compact .nav-toggle { display: grid; place-items: center; }
#site-header.compact .nav { gap: 12px; }
#site-header.compact .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px; background: rgba(10, 14, 16, .98); border-bottom: 1px solid var(--line-2); }
#site-header.compact.open .nav-links { display: flex; }
#site-header.compact .nav-items { flex-direction: column; align-items: stretch; }
#site-header.compact .nav-link { height: 44px; margin: 0; }
#site-header.compact .nav-link::after { bottom: 8px; right: auto; width: 24px; }
#site-header.compact .nav-side { margin: 8px 0 0; justify-content: space-between; }

/* ---------- banners under the header (launcher status banners) ---------- */
.alert-bar { font-size: 12px; color: var(--text-2); border-bottom: 1px solid; }
.alert-bar .wrap { display: flex; gap: 10px; align-items: center; min-height: 28px; padding: 4px 0; }
.alert-bar b { font-size: 11px; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.alert-bar.maint { background: rgba(216, 146, 74, .1); border-color: rgba(216, 146, 74, .45); }
.alert-bar.maint b { color: var(--amber); }
.alert-bar.info { background: rgba(111, 147, 176, .1); border-color: rgba(111, 147, 176, .45); }
.alert-bar.info b { color: var(--steel); }
.alert-bar.warn { background: rgba(216, 146, 74, .1); border-color: rgba(216, 146, 74, .45); }
.alert-bar.warn b { color: var(--amber); }
.alert-bar.hype { background: rgba(79, 179, 122, .1); border-color: rgba(79, 179, 122, .45); }
.alert-bar.hype b { color: var(--green); }
.alert-bar.preview { border: 1px solid; border-radius: 6px; padding: 7px 12px; display: flex; gap: 10px; align-items: center; }
.alert-bar .x { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.alert-bar .x:hover { color: var(--text); }

/* ---------- game art behind the pages (HeroScene.jsx, scenes.js) ---------- */
/* The frame is the box plus a little bleed for the motion. The stage covers it like a
   background image, and --ax/--ay work like background-position: that point of the
   stage sits on the same point of the frame, so no box size can open a gap. */
.scene { position: absolute; inset: 0; overflow: hidden; background: #07090c; --px: 0; --py: 0; --sy: 0; --ax: 50%; --ay: 100%; }
.scene .frame { position: absolute; inset: -14px -40px; container-type: size; }
.scene .stage {
  position: absolute; left: var(--ax); top: var(--ay);
  width: 100%;
  width: max(100cqw, 100cqh * var(--ar));
  aspect-ratio: var(--ar);
  translate: calc(var(--ax) * -1) calc(var(--ay) * -1);
  opacity: 0; transition: opacity .9s ease;
}
.scene.ready .stage { opacity: 1; }
/* Which part of each scene shows. */
.scene-edania { --ay: 34%; }
.scene-edania.scene-banner { --ay: 50%; }
.scene-drieghan.scene-banner { --ay: 71%; }
@container (orientation: portrait) {
  .scene-edania .stage { --ax: 82%; }     /* keep the warrior in view */
  .scene-drieghan .stage { --ax: 74%; }   /* keep the rock spire in view */
}
/* Layers sit where scenes.js puts them; nearer ones (higher --depth) move more. */
.scene .stage img {
  position: absolute; display: block; max-width: none; height: auto; pointer-events: none; user-select: none; will-change: translate;
  translate: calc(var(--px) * (6px + 24px * var(--depth)) * -1) calc(var(--py) * (3px + 5px * var(--depth)) * -1 + var(--sy) * (1 - var(--depth)) * .2px);
}
.scene .stage img.drift { transform-origin: 70% 30%; animation: sky-drift 60s ease-in-out infinite alternate; }
.scene .mist {
  position: absolute; left: -10%; right: -10%; bottom: 8%; height: 26%; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(175, 200, 225, .1), transparent 70%),
    radial-gradient(ellipse 50% 45% at 75% 55%, rgba(175, 200, 225, .08), transparent 70%);
  animation: fog 30s ease-in-out infinite alternate;
}
.scene-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 16, .92) 0%, rgba(10, 14, 16, .7) 45%, rgba(10, 14, 16, .2) 100%),
    linear-gradient(0deg, rgba(10, 14, 16, .85) 0%, rgba(10, 14, 16, 0) 45%);
}
/* Edania is darker art: shade only behind the text, so the statue and the sunset show. */
.scene-edania .scene-shade {
  background:
    linear-gradient(90deg, rgba(10, 14, 16, .9) 0%, rgba(10, 14, 16, .62) 32%, rgba(10, 14, 16, .12) 66%, rgba(10, 14, 16, .04) 100%),
    linear-gradient(0deg, rgba(10, 14, 16, .8) 0%, rgba(10, 14, 16, 0) 36%);
}
.scene-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes sky-drift { from { scale: 1; } to { scale: 1.06; } }
@keyframes fog { from { transform: translateX(-120px); } to { transform: translateX(120px); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, 3%); } 80% { transform: translate(3%, 1%); } 100% { transform: translate(0, 0); } }

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: 16px; padding: 16px 0 28px; }
.hero {
  position: relative; overflow: hidden; min-height: 460px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 28px 32px 18px;
}
.hero > .hero-top, .hero > .patch-strip { position: relative; z-index: 2; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; max-width: 480px; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 4px 10px; border-radius: 99px; background: var(--gold-soft); border: 1px solid rgba(213, 158, 80, .25); color: var(--gold); font-size: 11px; font-weight: 600; }
.hero-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero-copy h1 { font-size: clamp(28px, 4vw, 38px); color: #f0f0f0; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.hero-copy p { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }

/* server status pill */
.status-pill { display: flex; flex-direction: column; min-width: 196px; padding: 10px 16px; border-radius: 8px; background: rgba(8, 11, 13, .55); border: 1px solid var(--line-2); backdrop-filter: blur(4px); }
.status-pill .now { display: flex; align-items: center; gap: 12px; }
.status-pill .now b { font-size: 13px; font-weight: 600; color: var(--green); }
.status-pill .now b.down { color: var(--amber); }
.status-pill .now span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.status-pill .now span em { font-style: normal; font-weight: 600; color: var(--text-2); }
.status-pill .row { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 12px; }
.status-pill .row span { color: var(--muted); }
.status-pill .row b { font-family: var(--mono); font-weight: 400; color: var(--text-2); }
.pulse { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #6bd08c; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: pulse 2s ease-out infinite; }
.pulse.down { background: var(--amber); }
.pulse.down::after { display: none; }
@keyframes pulse { from { transform: scale(1); opacity: .45; } to { transform: scale(2.4); opacity: 0; } }

/* latest patch strip */
.patch-strip { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 8px; background: rgba(8, 11, 13, .6); border: 1px solid var(--white-06); color: var(--text); }
.patch-strip:hover { color: var(--text); border-color: var(--line-3); }
.patch-strip .tick { width: 3px; height: 28px; flex: none; border-radius: 2px; background: var(--gold); }
.patch-strip .lbl { display: flex; flex-direction: column; gap: 2px; flex: none; }
.patch-strip .lbl b { font-size: 9px; font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.patch-strip .lbl small { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.patch-strip .ttl { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patch-strip .all { flex: none; font-size: 11px; font-weight: 600; color: var(--gold); }
.patch-strip .all small { font-family: var(--mono); font-weight: 400; color: var(--faint); margin-left: 4px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }

/* homepage trailer (components/Trailer.jsx) */
.btn-trailer { gap: 8px; }
.btn-trailer svg { color: var(--gold); }
.trailer { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line-2); background: #000; }
.trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; background: #000; object-fit: contain; }
.trailer-play {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(0deg, rgba(8, 11, 13, .7) 0%, rgba(8, 11, 13, 0) 40%), rgba(8, 11, 13, .18);
  transition: background-color .3s ease;
}
.trailer-play:hover { background-color: rgba(8, 11, 13, 0); }
.trailer-play .ring {
  position: relative; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  color: var(--gold-ink); background: linear-gradient(180deg, #e2ab5c, var(--gold));
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .8); transition: transform .25s var(--ease);
}
.trailer-play .ring svg { margin-left: 4px; }
.trailer-play .ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); animation: trailer-pulse 2.4s ease-out infinite; }
.trailer-play:hover .ring, .trailer-play:focus-visible .ring { transform: scale(1.08); }
.trailer-cap { position: absolute; left: 20px; bottom: 16px; display: flex; align-items: baseline; gap: 10px; }
.trailer-cap b { font: 600 11px var(--sans); letter-spacing: .14em; color: var(--gold); }
.trailer-cap span { font: 12px var(--mono); color: var(--text-3); }
@keyframes trailer-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 0; }
.box-head h2 { font-size: 18px; }
.box-head a { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.box .tabs { padding: 4px 14px 0; }
.lock { position: relative; }
.lock > table { filter: blur(5px); opacity: .4; pointer-events: none; user-select: none; }
.lock .unlock { position: absolute; inset: 0; display: grid; place-items: center; }
.news { display: flex; flex-direction: column; padding: 4px 14px 8px; }
.news-row { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.news-row:last-child { border-bottom: 0; }
.news-row .meta { display: flex; gap: 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.news-row .meta .ver { color: var(--gold); }
.news-row h4 { margin: 3px 0 2px; font-size: 13px; font-weight: 600; color: var(--text); }
.news-row p { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.news-row:hover h4 { color: var(--gold-hi); }
.news-row .body { margin-top: 6px; font-size: 12px; color: var(--text-3); white-space: pre-line; }

/* ---------- inner page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 26px; }
.page-head p { margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm);
  background: #0c1013; color: var(--text); border: 1px solid var(--line-2);
  font: 13px var(--sans); outline: none; color-scheme: dark; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 110px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px rgba(213, 158, 80, .12); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.field .hint { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: var(--faint); }
.field .hint.over { color: #f0a49c; }
.check { display: flex; align-items: center; gap: 9px; margin: 6px 0 12px; cursor: pointer; font-size: 13px; }
.check input { width: 15px; height: 15px; accent-color: var(--gold); }
.search { position: relative; flex: 1 1 220px; }
.search input { padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }

/* tabs: launcher rail tabs */
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin-bottom: -1px; padding: 0;
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-3); cursor: pointer;
  font: 600 11px/1 var(--sans); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; transition: color .15s, border-color .15s;
}
.tabs button:hover:not(:disabled) { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--gold); }
.tabs button:disabled { opacity: .35; cursor: not-allowed; }
/* segmented control (time periods) */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 7px; background: var(--white-02); border: 1px solid var(--line-2); }
.seg button { height: 26px; padding: 0 11px; border: 0; border-radius: 5px; background: none; color: var(--text-3); cursor: pointer; font: 600 12px/1 var(--sans); transition: color .15s, background-color .15s; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(213, 158, 80, .25); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- notices ---------- */
.notice { padding: 9px 12px; margin-bottom: 12px; font-size: 13px; border-radius: 6px; background: var(--white-02); border: 1px solid var(--line-2); border-left: 2px solid var(--gold); color: var(--text-2); }
.notice.error { border-left-color: var(--red); background: rgba(226, 106, 95, .06); color: #f6c8c1; }
.notice.info { border-left-color: var(--steel); background: var(--steel-soft); }
.pill { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-line); vertical-align: middle; }
.pill.fill { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.pill.green { color: var(--green); border-color: rgba(79, 179, 122, .4); }
.skeleton { height: 14px; margin: 12px 0; border-radius: 4px; background: linear-gradient(90deg, var(--white-02) 25%, var(--white-06) 50%, var(--white-02) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 18px; text-align: center; font-size: 12px; font-style: italic; color: var(--muted); }
.result-count { margin: 8px 2px 0; font-size: 11px; color: var(--faint); }

/* ---------- tables (launcher grid lists) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 30px; padding: 0 12px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { height: 36px; padding: 0 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: var(--white-02); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.me { background: var(--gold-soft); box-shadow: inset 2px 0 0 var(--gold); }
td.num, th.num { text-align: right; }
td.num, td.mono { font-family: var(--mono); font-size: 12px; }
.rank-badge { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px; font: 12px var(--mono); color: var(--text-3); background: var(--white-04); }
.rank-1 { color: var(--gold-ink); background: var(--gold); }
.rank-2 { color: var(--gold-ink); background: var(--silver); }
.rank-3 { color: var(--gold-ink); background: var(--bronze); }
.trend { font: 11px var(--mono); }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }

/* ---------- rankings ---------- */
.rank-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.rank-cats { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.rank-cats .label { padding: 4px 8px 6px; color: var(--faint); }
.rank-cats .label:not(:first-child) { margin-top: 10px; }
/* The per-family boards: the character (and class) under the family, and the detail. */
.rank-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cats button { height: 32px; padding: 0 10px; text-align: left; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; font: 600 13px var(--sans); transition: color .15s, background-color .15s; }
.rank-cats button:hover { color: var(--text); background: var(--white-04); }
.rank-cats button.on { color: var(--text); background: var(--white-06); box-shadow: inset 2px 0 0 var(--gold); }
.my-rank { display: flex; align-items: center; gap: 16px; padding: 10px 14px; }
.my-rank b { font: 22px var(--brand); color: var(--gold); }
.my-rank .of { font: 11px var(--mono); color: var(--faint); }
.my-rank .val { margin-left: auto; text-align: right; }
.my-rank .val b { font: 15px var(--mono); color: var(--text); }
.podium { display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 10px; align-items: end; margin: 12px 0; }
.plate { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; text-align: center; transition: transform .2s var(--ease); }
.plate:hover { transform: translateY(-2px); }
.plate .rank-badge { margin-bottom: 6px; }
.plate .who { font: 17px var(--brand); color: var(--text); word-break: break-word; }
.plate .guild { font-size: 11px; color: var(--muted); }
.plate .val { margin-top: 4px; font: 13px var(--mono); color: var(--text-2); }
.plate.r1 { padding: 20px 10px; border-color: var(--gold-line); background: linear-gradient(180deg, rgba(213, 158, 80, .1), rgba(16, 21, 24, .9)); }
.plate.r1 .who { font-size: 20px; }
.plate.r1 .val { color: var(--gold); }

/* ---------- account ---------- */
.acct-head { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 112px; padding: 18px 20px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); margin-bottom: 12px; }
.acct-head > :not(.scene) { position: relative; z-index: 2; }
.acct-head .scene-shade { background: linear-gradient(90deg, rgba(10, 14, 16, .95) 0%, rgba(10, 14, 16, .78) 50%, rgba(10, 14, 16, .35) 100%); }
.acct-head .scene-edania .scene-shade { background: linear-gradient(90deg, rgba(10, 14, 16, .94) 0%, rgba(10, 14, 16, .72) 40%, rgba(10, 14, 16, .1) 100%); }
.acct-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-id .label { color: var(--faint); }
.acct-id h1 { font-size: 28px; line-height: 1.1; color: #f0f0f0; }
.acct-id .sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.acct-id .sub b { color: var(--text); font-weight: 600; }
.acct-id .sub .dot { color: var(--faint); }
.acct-head .acct-actions { margin-left: auto; display: flex; gap: 8px; }
.stat-row { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 10px; margin-bottom: 4px; }
.stat { padding: 12px 14px; }
.stat > b { display: block; margin-top: 4px; font: 18px/1.2 var(--brand); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b.gold { color: var(--gold); }
.stat > b.mono { font: 600 16px/1.3 var(--mono); }
.stat small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.kd-bar { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--red-soft); overflow: hidden; }
.kd-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: left; animation: grow 1s var(--ease) .15s both; }
.kd-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 11px; white-space: nowrap; }
.kd-legend b { font: 600 11px var(--mono); color: var(--text); }
.kd-legend .k { color: var(--gold); }
.kd-legend .d { color: var(--red); }
@keyframes grow { from { transform: scaleX(0); } }
.chars td.name { font-weight: 600; color: var(--text); }
.chars td.cls { color: var(--muted); }
.chars td.lv { width: 60px; }
.chars td.when { width: 150px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.chars td.srv { width: 100px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.chars tr.main td.name::after { content: "MAIN"; margin-left: 8px; padding: 1px 5px; border-radius: 3px; font: 700 9px var(--sans); color: var(--gold); background: var(--gold-soft); vertical-align: 1px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li .who { font-weight: 600; color: var(--text); }
.mini-list li .g { font-size: 11px; color: var(--faint); }
.mini-list li .n { font: 12px var(--mono); color: var(--text-3); white-space: nowrap; }
.mini-list li.empty { justify-content: center; font-size: 12px; font-style: italic; color: var(--muted); }
.mini-list.kills .who { color: var(--green); }
.mini-list.deaths .who { color: var(--red); }

/* ---------- login (the launcher's sign-in overlay) ---------- */
.login-page { position: relative; flex: 1; display: grid; place-items: center; min-height: calc(100svh - var(--header-h) - 64px); padding: 32px 16px; overflow: hidden; }
.login-page .scene-shade { background: radial-gradient(ellipse at center, rgba(8, 11, 13, .55), rgba(8, 11, 13, .92) 70%); }
.login-card { position: relative; z-index: 2; width: min(360px, 100%); padding: 26px 26px 22px; border-radius: 12px; background: rgba(10, 14, 16, .92); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.login-card .mark { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 22px; }
.login-card .mark .wordmark .wm-a { font-size: 26px; }
.login-card .mark small { font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--faint); }
.login-card .btn { width: 100%; height: 40px; margin-top: 4px; }
.login-card .foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }
.login-card .code { margin: 14px 0 18px; padding: 12px; text-align: center; border-radius: 8px; background: var(--white-04); border: 1px solid var(--gold-line); font: 22px var(--mono); letter-spacing: .1em; color: var(--gold); }
.login-card h2 { margin-bottom: 6px; text-align: center; }
.login-card p { font-size: 13px; color: var(--text-3); text-align: center; }
/* Discord sign-in code step */
.login-card form > p { margin-bottom: 14px; }
.login-card .code-input { text-align: center; font: 22px var(--mono); letter-spacing: .25em; }
.login-card .code-warn { margin-top: 8px; font-size: 11px; color: var(--faint); }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.admin-nav button { height: 32px; padding: 0 10px; text-align: left; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; font: 600 13px var(--sans); transition: color .15s, background-color .15s; }
.admin-nav button:hover { color: var(--text); background: var(--white-04); }
.admin-nav button.on { color: var(--text); background: var(--white-06); box-shadow: inset 2px 0 0 var(--gold); }
.admin-section { padding: 20px 22px; }
.admin-section h2 { margin-bottom: 4px; }
.admin-section > p.muted { margin: 0 0 18px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.sub-label { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.sub-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.preview-hero { position: relative; overflow: hidden; min-height: 200px; display: flex; align-items: flex-end; padding: 22px; border: 1px solid var(--line-2); border-radius: 10px; }
.preview-hero .inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.row-list { display: flex; flex-direction: column; gap: 6px; }
.row-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 6px; background: var(--white-02); border: 1px solid var(--line); }
.row-item .grow { flex: 1; min-width: 180px; }
.row-item .title { font-size: 13px; font-weight: 600; color: var(--text); }
.row-item .sub { font-size: 11px; color: var(--faint); }
.status { height: 18px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.status.live { color: var(--green); border-color: rgba(79, 179, 122, .4); }
.status.draft { color: var(--amber); border-color: rgba(216, 146, 74, .4); }
.status.on { color: var(--red); border-color: rgba(226, 106, 95, .45); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--white-06); border: 1px solid var(--line-2); cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--text-3); transition: .2s var(--ease); }
.switch input:checked + span { background: rgba(216, 146, 74, .3); border-color: var(--amber); }
.switch input:checked + span::before { transform: translateX(18px); background: #ffd2a6; }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(213, 158, 80, .2); }
.note-card { padding: 14px 16px; }
.note-card .meta { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.note-card .meta .ver { color: var(--gold); }
.note-card h3 { margin: 4px 0; font-size: 14px; }
.note-card p { font-size: 12px; color: var(--muted); }

/* ---------- vote (the launcher's VOTE window) ---------- */
.vote-page { width: min(720px, 100% - 32px); }
.vote-banner { min-height: 96px; }
.vote-list { display: flex; flex-direction: column; gap: 8px; }
.vote-site { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.vote-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vote-name { font-size: 14px; font-weight: 600; color: var(--text); }
.vote-reward { font: 12px/1.45 var(--mono); color: var(--gold); }
.vote-reward .sep { margin: 0 8px; color: var(--faint); }
.vote-reward .when { white-space: nowrap; }
.vote-status { margin-top: 2px; font-size: 12px; color: var(--muted); }
.vote-status.good { color: var(--green); }
.vote-status.warn { color: var(--amber); }
.vote-status.wait { color: var(--gold); }
.vote-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--gold); vertical-align: 1px; animation: vote-blink 1.2s ease-in-out infinite; }
@keyframes vote-blink { 50% { opacity: .25; } }
.vote-btn { flex: none; min-width: 104px; }
.vote-btn.wait:disabled { opacity: 1; cursor: default; color: var(--text-3); font: 400 12px/1 var(--mono); }
.vote-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.vote-foot p { font-size: 12px; color: var(--muted); }

/* ---------- world bosses (the launcher's Bosses tab + Boss Alerts window) ---------- */
.boss-page { width: min(960px, 100% - 32px); }
.boss-login { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.boss-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 12px 14px; }
.boss-notify { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text); }
.boss-notify b { font-weight: 600; }
.boss-notify.off { cursor: default; color: var(--muted); }
.boss-notify.off .switch span { cursor: default; opacity: .5; }
.boss-lead { display: inline-flex; align-items: center; gap: 8px; }
.boss-lead .faint { font-size: 11px; }
.boss-all { margin-left: auto; }
.boss-note { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.boss-list { display: flex; flex-direction: column; gap: 6px; }
.boss-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 104px; align-items: center; gap: 12px; padding: 7px 12px 7px 7px; border-radius: var(--r-sm); border: 1px solid var(--white-04); transition: background-color .15s, border-color .15s; }
.boss-row.on { background: var(--white-02); border-color: var(--white-06); }
.boss-bell { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; transition: color .15s, background-color .15s; }
.boss-bell:hover:not(:disabled) { color: var(--text-2); background: var(--white-04); }
.boss-bell.on { color: var(--gold); background: var(--gold-soft); }
.boss-bell.on:hover:not(:disabled) { color: var(--gold-hi); background: var(--gold-soft); }
.boss-bell:disabled { cursor: default; opacity: .6; }
.boss-bell:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(213, 158, 80, .2); }
.boss-name { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.boss-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.boss-name small { white-space: nowrap; font-size: 11px; color: var(--faint); }
.boss-when { white-space: nowrap; font-size: 12px; color: var(--text-3); }
.boss-count { text-align: right; white-space: nowrap; font: 12px var(--mono); color: var(--text-3); }
.boss-row.on .boss-count { color: var(--gold); }
.boss-week { overflow-x: auto; }
.boss-week table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.boss-week th, .boss-week td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
.boss-week thead th { font: 700 10px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.boss-week thead th:first-child { width: 78px; }
.boss-week thead th.today { color: var(--gold); }
.boss-week tbody th { white-space: nowrap; font: 400 12px var(--mono); color: var(--text-3); }
.boss-week td.today { background: var(--white-02); }
.boss-week td span { display: block; line-height: 1.35; color: var(--text-2); }
.boss-week td span + span { margin-top: 3px; }
.boss-week td span.on { color: var(--gold); }
.boss-week td.past span { opacity: .4; }
.boss-week td.next { box-shadow: inset 2px 0 0 var(--gold); }
.boss-week tbody tr:last-child th, .boss-week tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .boss-all { margin-left: 0; }
  .boss-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "bell name count" "bell when count"; row-gap: 1px; }
  .boss-bell { grid-area: bell; }
  .boss-name { grid-area: name; }
  .boss-name small { display: none; }
  .boss-when { grid-area: when; }
  .boss-count { grid-area: count; }
}

/* ---------- footer ---------- */
#site-footer { border-top: 1px solid var(--white-04); }
#site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-size: 11px; color: var(--faint); }
#site-footer .wordmark .wm-a { font-size: 15px; }
#site-footer .wordmark .wm-b { font-size: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { color: var(--muted); font-size: 12px; }
.foot-links a:hover { color: var(--text); }

/* ---------- modal, toast, badge ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 5, .7); backdrop-filter: blur(3px); animation: fade-in .2s var(--ease); }
.modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 20px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: pop-in .22s var(--ease); }
.modal.wide { width: min(760px, 100%); }
.modal-title { font: 600 15px var(--sans); color: var(--text); margin-bottom: 12px; }
.modal-actions { margin-top: 16px; }
.modal-actions .btn { flex: 1; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 120; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; font-size: 13px; font-weight: 500; border-radius: 8px; background: #0f1a14; border: 1px solid rgba(79, 179, 122, .35); color: #c9f0d6; box-shadow: 0 14px 36px rgba(0, 0, 0, .55); animation: toast-in .3s var(--ease); }
.toast.error { background: #1d1210; border-color: rgba(226, 106, 95, .4); color: #ffc9c1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.demo-badge { position: fixed; right: 12px; bottom: 12px; z-index: 60; pointer-events: none; padding: 3px 9px; border-radius: 99px; font: 700 10px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold); opacity: .85; }

/* collect: a burst of silver signs from the button */
.cash-layer { position: fixed; inset: 0; pointer-events: none; z-index: 130; }
.cash-burst { position: absolute; width: 0; height: 0; }
.cash { position: absolute; left: 0; top: 0; font-family: var(--brand); font-weight: 700; line-height: 1; text-shadow: 0 0 10px rgba(213, 158, 80, .6); opacity: 0; animation: cash-burst var(--t, 1.15s) cubic-bezier(.2, .75, .3, 1) var(--d, 0s) both; }
.cash-gain { position: absolute; left: 0; top: -8px; white-space: nowrap; font: 13px var(--mono); color: #ffd36a; opacity: 0; animation: gain-rise 1.6s ease-out .15s both; }
@keyframes cash-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  12% { opacity: 1; }
  55% { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--r)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * 1.15), calc(-50% + var(--dy) + 46px)) scale(.85) rotate(calc(var(--r) * 1.6)); }
}
@keyframes gain-rise { 0% { opacity: 0; transform: translate(-50%, 0); } 20%, 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -44px); } }

/* ---------- entrance motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.rise { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .cash { display: none; }
  .cash-gain { opacity: 1; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .home-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { gap: 12px; }
  .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px; background: rgba(10, 14, 16, .98); border-bottom: 1px solid var(--line-2); }
  #site-header.open .nav-links { display: flex; }
  .nav-items { flex-direction: column; align-items: stretch; }
  .nav-link { height: 44px; margin: 0; }
  .nav-link::after { bottom: 8px; right: auto; width: 24px; }
  .nav-side { margin: 8px 0 0; justify-content: space-between; }
  .rank-layout, .admin-layout { grid-template-columns: 1fr; }
  .rank-cats, .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .rank-cats .label { display: none; }
  .duo, .form-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row .stat:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero { padding: 20px 16px 14px; min-height: 0; }
  .hero-cta .btn-play { width: 100%; }
  .status-pill { width: 100%; }
  .patch-strip .all small { display: none; }
  .acct-head { padding: 16px; }
  .acct-head .acct-actions { margin-left: 0; }
  .podium { grid-template-columns: 1fr; }
  .podium .plate.r1 { order: -1; }
  .chars td.srv, .chars th.srv { display: none; }
  .alert-bar .wrap { flex-wrap: wrap; gap: 2px 10px; }
  .trailer-play .ring { width: 58px; height: 58px; }
  .trailer-play .ring svg { width: 20px; height: 20px; }
  .trailer-cap { left: 14px; bottom: 10px; }
}
