:root {
  --bg: #0d0b0a;
  --bg-alt: #120f0d;
  --surface: #1a1512;
  --surface-2: #231c18;
  --border: #33291f;
  --text: #ece4da;
  --muted: #a3978a;
  --accent: #e08a52;
  --accent-2: #f6c58f;
  --accent-dark: #b8612d;
  --online: #5fd07a;
  --offline: #e05c4f;
  --radius: 12px;
  --serif: "Cinzel", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.2; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 780px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 8px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 6px 24px -8px rgba(224, 138, 82, .6);
}
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(224, 138, 82, .8); }
.btn-ghost { background: rgba(0,0,0,.35); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(13, 11, 10, .75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(51, 41, 31, .6);
  transition: background .3s;
}
.nav.scrolled { background: rgba(13, 11, 10, .95); }
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 16px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; letter-spacing: .08em; color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-sep { width: 1px; height: 22px; background: var(--border); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 96px 16px 80px;
  background: url("../img/hero.jpg") center / cover no-repeat, #0a0807;
  overflow: hidden;
}
/* Animated sea loop (same render as the client's server-select screen: _tools/loginbg/animate_water.py) */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 40% 34% at 50% 50%, rgba(10, 8, 7, .62), rgba(10, 8, 7, .3) 55%, transparent 80%),
    linear-gradient(180deg, rgba(10, 8, 7, .35), rgba(10, 8, 7, 0) 22%, rgba(10, 8, 7, 0) 70%, var(--bg));
}
.hero-inner .eyebrow, .hero-inner .tagline { text-shadow: 0 1px 2px #000, 0 0 10px rgba(0,0,0,.9), 0 0 24px rgba(0,0,0,.8); }
.hero-inner .tagline { color: #e6dccf; }
.hero-inner .eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 99px;
  background: rgba(10, 8, 7, .6); backdrop-filter: blur(4px); border: 1px solid rgba(224, 138, 82, .3);
  color: var(--accent-2);
}
.hero h1 { filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)); }
.hero .status { background: rgba(10, 8, 7, .55); backdrop-filter: blur(4px); }
.hero .status[data-state="offline"] { background: rgba(48, 12, 10, .65); }
.hero .status[data-state="online"] { background: rgba(10, 40, 18, .65); }
.hero .btn-ghost { background: rgba(10, 8, 7, .6); backdrop-filter: blur(4px); }
.hero-inner, .scroll-hint { z-index: 1; }
.hero-inner { position: relative; max-width: 760px; animation: rise .9s ease-out both; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; }
.hero h1 {
  font-size: clamp(42px, 9vw, 84px);
  background: linear-gradient(180deg, #fff6ea 20%, var(--accent-2) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(224, 138, 82, .25);
}
.tagline { margin: 16px 0 28px; color: var(--muted); font-family: var(--serif); font-size: clamp(17px, 2.6vw, 22px); }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 99px; font-size: 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--muted);
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status[data-state="online"] { color: var(--online); border-color: rgba(95, 208, 122, .3); background: rgba(95, 208, 122, .08); }
.status[data-state="online"] .dot { background: var(--online); box-shadow: 0 0 0 0 rgba(95,208,122,.6); animation: pulse 2s infinite; }
.status[data-state="offline"] { color: var(--offline); border-color: rgba(224, 92, 79, .3); background: rgba(224, 92, 79, .08); }
.status[data-state="offline"] .dot { background: var(--offline); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
}
.scroll-hint svg { animation: bob 2s infinite; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; text-align: center; }
.section-alt { background: var(--bg-alt); border-block: 1px solid #1c1714; }
.pill {
  display: inline-block; margin: 0 0 14px; padding: 5px 16px;
  border: 1px solid rgba(224, 138, 82, .4); border-radius: 99px;
  color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  background: rgba(224, 138, 82, .06);
}
.section h2 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 18px; }
.lead { max-width: 680px; margin: 0 auto 56px; color: var(--muted); font-size: 17px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: left; }
.card {
  position: relative; padding: 28px 24px;
  background: linear-gradient(180deg, var(--surface), #15110f);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(224, 138, 82, .5); }
.card-wide {
  grid-column: 1 / -1; padding: 36px;
  background:
    radial-gradient(ellipse 50% 100% at 100% 50%, rgba(224, 138, 82, .18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.card-wide h3 { font-size: 26px; }
.card-wide p { max-width: 560px; }
.card .icon { font-size: 26px; color: var(--accent); margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag {
  position: absolute; top: 18px; right: 18px;
  padding: 3px 10px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* Races */
.races { display: grid; grid-template-columns: 200px 1fr 200px; gap: 32px; align-items: center; margin-top: 40px; }
.faction h3 { font-size: 18px; margin-bottom: 28px; color: var(--accent-2); }
.race-list { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.race-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--muted); font: 600 14px var(--sans); cursor: pointer;
}
.race-btn .ring {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--border);
  transition: .25s;
}
.race-btn .ring img { width: 62px; height: 62px; filter: grayscale(.85) brightness(.75); transition: .25s; }
.race-btn:hover .ring { border-color: var(--accent); }
.race-btn:hover .ring img { filter: grayscale(.3) brightness(.95); }
.race-btn.active { color: var(--text); }
.race-btn.active .ring { border-color: var(--glow); box-shadow: 0 0 26px var(--glow); }
.race-btn.active .ring img { filter: none; }
.race-btn[data-faction="west"] { --glow: rgba(110, 180, 255, .75); }
.race-btn[data-faction="east"] { --glow: rgba(110, 230, 170, .7); }
.race-stage { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.race-emblem {
  width: min(340px, 72vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle, rgba(224, 138, 82, .2), transparent 62%),
    repeating-conic-gradient(from 0deg, rgba(224,138,82,.07) 0 6deg, transparent 6deg 18deg);
  border: 1px solid var(--border);
  transition: opacity .25s, transform .25s;
}
.race-emblem.swap { opacity: 0; transform: scale(.92); }
.race-crest { width: 78%; height: auto; filter: drop-shadow(0 0 30px rgba(120, 200, 255, .35)); animation: float 5s ease-in-out infinite; }
.race-stage.has-models .race-emblem {
  width: 100%; max-width: 520px; aspect-ratio: auto; border-radius: 0; border: 0;
  display: flex; justify-content: center; align-items: flex-end; gap: 4%;
  background: radial-gradient(ellipse 60% 55% at 50% 60%, rgba(224, 138, 82, .18), transparent 70%);
}
.race-stage.has-models .race-emblem { height: clamp(260px, 42vw, 440px); }
.race-model { height: 100%; max-width: 48%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)); }
.race-info {
  width: 100%; max-width: 440px; padding: 20px 26px;
  background: rgba(26, 21, 18, .85); border: 1px solid var(--border); border-radius: var(--radius);
}
.race-name { color: var(--accent); font-size: 20px; margin-bottom: 6px; }
.race-desc { margin: 0; color: var(--muted); font-size: 15px; }

/* Skills */
.skill-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.skill {
  padding: 26px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.skill:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 10px 30px -14px var(--c); }
.skill .orb {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-size: 22px; font-weight: 700; color: #120f0d;
  background: radial-gradient(circle at 35% 30%, #fff8, var(--c) 55%);
  box-shadow: 0 0 20px -4px var(--c);
}
.skill h3 { font-size: 16px; margin-bottom: 6px; }
.skill p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: left; }
.news-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s, border-color .25s;
}
.news-card:hover { transform: translateY(-4px); border-color: rgba(224, 138, 82, .5); }
.news-banner {
  height: 130px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent-2);
  background:
    radial-gradient(ellipse at 30% 0%, rgba(224, 138, 82, .35), transparent 60%),
    linear-gradient(135deg, #2a1d15, #120e0c);
  border-bottom: 1px solid var(--border);
}
.news-body { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.news-date { color: var(--accent); font-size: 13px; font-weight: 600; }
.news-body h3 { font-size: 19px; margin: 8px 0; }
.news-body p { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.read-more { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--accent); font: 600 14px var(--sans); cursor: pointer; }
.read-more:hover { color: var(--accent-2); }

/* Perks */
.perk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.perk { padding: 10px 16px; }
.perk-icon {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 18px;
  display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); transform: rotate(45deg);
}
.perk-icon span { transform: rotate(-45deg); line-height: 1; }
.perk h3 { font-size: 19px; margin-bottom: 8px; }
.perk p { margin: 0 auto; max-width: 300px; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 30px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s; }
.faq details[open] { border-color: rgba(224, 138, 82, .5); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 24px; font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); }

/* Footer */
.footer { padding: 48px 0 36px; border-top: 1px solid var(--border); background: #0a0807; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer nav { display: flex; gap: 24px; color: var(--muted); font-size: 14px; }
.footer nav a:hover { color: var(--text); }
.fine { flex-basis: 100%; margin: 12px 0 0; color: #6f665c; font-size: 12.5px; text-align: center; }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity .3s, border-color .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); }

/* News dialog */
dialog.post {
  width: min(640px, calc(100vw - 32px)); padding: 32px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
dialog.post::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
dialog.post .close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; }
dialog.post .close:hover { color: var(--text); }
.post-date { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.post-title { font-size: 26px; margin: 6px 0 14px; }
.post-body { color: var(--muted); }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes bob { 50% { transform: translateY(5px); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(95,208,122,0); } 100% { box-shadow: 0 0 0 0 rgba(95,208,122,0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: rgba(13, 11, 10, .98); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid #1f1915; }
  .nav-links .btn { margin-top: 14px; justify-content: center; }
  .nav-sep { display: none; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 80px 0; }
  .races { grid-template-columns: 1fr 1fr; gap: 28px; }
  .race-stage { grid-column: 1 / -1; grid-row: 1; }
  .race-list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; }
  .race-btn .ring { width: 58px; height: 58px; }
  .race-btn .ring img { width: 50px; height: 50px; }
  .news-grid, .perk-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .card-wide { padding: 28px 24px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Auth pages (login / register / account) ---------- */
.auth {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 104px 16px 64px; overflow: hidden;
  background: url("../img/hero.jpg") center / cover no-repeat, #0a0807;
}
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 8, 7, .55), rgba(10, 8, 7, .35) 40%, rgba(10, 8, 7, .6) 85%, var(--bg));
}
.auth-card, .account { position: relative; z-index: 1; }
.auth-card {
  width: 100%; max-width: 440px; padding: 36px 32px 28px; text-align: center;
  background: rgba(24, 19, 16, .9); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  animation: rise .5s ease-out both;
}
.auth-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: 0 8px 24px -8px rgba(224, 138, 82, .7);
}
.auth-icon svg { width: 28px; height: 28px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-sub { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text); }
.field small { color: #7d7268; font-size: 12px; }
.input {
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #0f0c0b; border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s;
}
.input:focus-within { border-color: var(--accent); }
.input.bad, .check.bad { border-color: var(--offline); }
.input > svg { flex: none; color: #7d7268; }
.input input {
  flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: none;
  background: none; color: var(--text); font: 15px var(--sans);
}
.input input::placeholder { color: #5f564e; }
.input input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px #0f0c0b inset; caret-color: var(--text); }
.eye { flex: none; background: none; border: 0; padding: 4px; color: #7d7268; cursor: pointer; display: grid; }
.eye:hover, .eye.on { color: var(--accent); }
.strength { height: 4px; border-radius: 2px; background: #241d19; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.strength[data-score="1"] i { width: 25%; background: var(--offline); }
.strength[data-score="2"] i { width: 50%; background: #e0a24f; }
.strength[data-score="3"] i { width: 75%; background: #c9d05f; }
.strength[data-score="4"] i { width: 100%; background: var(--online); }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 14px; cursor: pointer; border: 1px solid transparent; border-radius: 6px; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check a, .auth-switch a, .auth-note a, .legal a { color: var(--accent); }
.check a:hover, .auth-switch a:hover, .auth-note a:hover, .legal a:hover { color: var(--accent-2); }
.terms { font-size: 13px; line-height: 1.5; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: 500 14px var(--sans); cursor: pointer; }
.link:hover { color: var(--accent-2); }
.auth-note { margin: -4px 0 0; padding: 12px 14px; border-radius: 8px; background: rgba(224, 138, 82, .08); border: 1px solid rgba(224, 138, 82, .25); color: var(--muted); font-size: 13.5px; }
.captcha { display: flex; justify-content: center; }
.auth-error { min-height: 1.2em; margin: 0; color: var(--offline); font-size: 14px; }
.auth-error:empty { min-height: 0; }
.auth-ok { margin: 0; color: var(--online); font-size: 14px; }
.auth-ok:empty { display: none; }
.auth-submit { justify-content: center; width: 100%; }
.auth-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Account page */
.account { width: 100%; max-width: 900px; animation: rise .5s ease-out both; }
.account-head {
  display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 22px 26px;
  background: rgba(24, 19, 16, .9); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 16px;
}
.account-head .pill { margin-bottom: 6px; }
.account-head h1 { font-size: clamp(24px, 4vw, 34px); word-break: break-all; }
.account-head .logout { margin-left: auto; }
.acc-banned { margin: 0 0 18px; padding: 14px 18px; border-radius: 10px; background: rgba(224, 92, 79, .12); border: 1px solid rgba(224, 92, 79, .4); color: #f0a49b; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  padding: 26px; background: rgba(24, 19, 16, .9); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 16px;
}
.panel-wide { grid-column: 1 / -1; }
.panel h2 { font-size: 20px; margin-bottom: 14px; color: var(--accent-2); }
.panel p { color: var(--muted); margin: 0 0 18px; }
.panel strong { color: var(--text); }
.panel-sub { font-size: 14px; }
.panel .pw-form { max-width: 420px; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--text); word-break: break-all; }

/* Legal pages */
.legal { padding: 130px 0 90px; }
.legal h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 30px; }
.legal h2 { font-size: 20px; margin: 30px 0 10px; color: var(--accent-2); }
.legal p, .legal li { color: #cfc5b9; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal code { background: var(--surface); padding: 1px 6px; border-radius: 4px; }

/* Signed-in nav link */
.nav-account { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--text) !important; }
.nav-account:hover { border-color: var(--accent); }
.nav-account svg { width: 16px; height: 16px; color: var(--accent); }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-head { flex-wrap: wrap; }
  .account-head .logout { margin-left: 0; }
  .auth-card { padding: 30px 20px 24px; }
  .nav-account { justify-content: center; margin-top: 14px; }
}
