/* Unsung website: hand written styles, no build step. Night sky above the clouds of Holic. */

/* Cinzel (SIL Open Font License, fonts/OFL-Cinzel.txt), served from this host. */
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --night-0: #050915;
  --night-1: #09112a;
  --night-2: #101a3a;
  --night-3: #18244d;
  --panel: rgba(16, 26, 58, .62);
  --panel-solid: #0f1834;
  --line: rgba(222, 186, 116, .2);
  --line-soft: rgba(255, 255, 255, .07);
  --gold: #dcb46c;
  --gold-hi: #f7dd9d;
  --gold-deep: #9b7436;
  --gold-line: rgba(222, 186, 116, .32);
  --ivory: #f4ecda;
  --ivory-2: #dcd3c0;
  --muted: #a3abc6;
  --muted-2: #8790ac;
  --sky: #86c9ff;
  --violet: #a594ff;
  --primus: #6fb1ff;
  --ganav: #ff7a7a;
  --ok: #9fdc94;
  --danger: #ff9b8f;
  --font-display: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-0);
  color: var(--ivory-2);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--ivory); font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
[hidden] { display: none !important; }
[id], .update { scroll-margin-top: 88px; }
/* A faint fixed starfield keeps the long page feeling like night sky. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 68% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 84% 42%, #ffe9b8, transparent), radial-gradient(1px 1px at 32% 64%, #fff, transparent),
    radial-gradient(1px 1px at 52% 84%, #cfe3ff, transparent), radial-gradient(1px 1px at 92% 76%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 6% 88%, #fff, transparent), radial-gradient(1px 1px at 44% 34%, #fff, transparent);
  background-size: 620px 620px;
}
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .6rem 1rem; background: var(--gold); color: var(--night-0); border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: rgba(255, 255, 255, .04);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .7rem 1.35rem;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: var(--btn-bg); color: var(--ivory);
  font: 600 .95rem/1 var(--font-body); letter-spacing: .02em; text-decoration: none;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #fff; border-color: var(--gold); background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold {
  border-color: transparent; color: #1b1205;
  background: linear-gradient(180deg, #fbe5ad, #dcb46c 55%, #b78b45);
  box-shadow: 0 8px 26px rgba(220, 180, 108, .28), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-gold:hover { color: #120c03; background: linear-gradient(180deg, #fff0c8, #e9c47e 55%, #c49751); box-shadow: 0 10px 34px rgba(220, 180, 108, .42), inset 0 1px 0 rgba(255, 255, 255, .7); }
.btn-small { min-height: 38px; padding: .5rem 1rem; font-size: .86rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; color: var(--gold-hi); font-weight: 600; text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 9, 21, .55);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled { background: rgba(5, 9, 21, .86); border-bottom-color: var(--line-soft); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ivory); text-decoration: none; flex: none; }
.brand img { width: 34px; height: 34px; }
.brand-name { font: 700 1.2rem/1 var(--font-display); letter-spacing: .22em; }
.brand-sub { display: block; margin-top: .3rem; color: var(--muted-2); font-size: .62rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav a { white-space: nowrap; padding: .5rem .8rem; border-radius: 999px; color: var(--ivory-2); font-size: .9rem; font-weight: 500; text-decoration: none; transition: color .15s ease, background .15s ease; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--gold-hi); }
.nav .ext::after { content: " ↗"; font-size: .75em; color: var(--muted-2); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .btn { white-space: nowrap; }
.realm-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem;
  border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255, 255, 255, .03);
  color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none;
}
.realm-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.realm-pill.online { color: #cfeec8; }
.realm-pill.online .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(159, 220, 148, .6); animation: pulse 2.4s infinite; }
.realm-pill.maintenance .dot { background: var(--gold); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(159, 220, 148, .55); } 70% { box-shadow: 0 0 0 8px rgba(159, 220, 148, 0); } 100% { box-shadow: 0 0 0 0 rgba(159, 220, 148, 0); } }
.menu-toggle { display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .03); color: var(--ivory); cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero banner ---------- */
.hero { position: relative; isolation: isolate; min-height: min(100svh, 980px); display: flex; align-items: center; margin-top: -68px; padding: 120px 0 170px; overflow: hidden; }
.hero .sky { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; z-index: -1; background: linear-gradient(180deg, rgba(5, 9, 21, 0), var(--night-0) 88%); pointer-events: none; }
.sky-stars .tw { animation: twinkle 4s ease-in-out infinite; }
.sky-stars .tw2 { animation-duration: 5.5s; animation-delay: -2s; }
.sky-stars .tw3 { animation-duration: 3.2s; animation-delay: -1s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.sky-layer, .sky-island { transform-box: fill-box; }
.sky-far { animation: drift 38s ease-in-out infinite alternate; }
.sky-mid { animation: drift 26s ease-in-out infinite alternate-reverse; }
.sky-near { animation: drift 20s ease-in-out infinite alternate; }
.sky-island { animation: bob 9s ease-in-out infinite; }
.sky-island:nth-of-type(2n) { animation-duration: 12s; animation-delay: -4s; }
.sky-window { fill: #ffd98a; filter: drop-shadow(0 0 4px #ffd98a); }
.sky-comet { stroke-dasharray: 190; stroke-dashoffset: 190; animation: comet 9s ease-in 3s infinite; }
@keyframes drift { from { transform: translateX(-24px); } to { transform: translateX(24px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes comet { 0% { stroke-dashoffset: 190; opacity: 1; } 8% { stroke-dashoffset: -190; opacity: 0; } 100% { stroke-dashoffset: -190; opacity: 0; } }
.hero-content { position: relative; max-width: 760px; }
.hero-crest { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.hero-crest::before, .hero-crest::after { content: ""; height: 1px; width: 48px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-crest::after { transform: scaleX(-1); }
.wordmark {
  position: relative; margin: 0 0 .1em;
  font: 700 clamp(2.5rem, 14vw, 9.6rem)/.92 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  color: transparent; background: linear-gradient(180deg, #fff8e2 0%, #f7dd9d 38%, #d6a95c 62%, #f3d38d 78%, #a27737 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 4px 0 rgba(60, 38, 8, .55)) drop-shadow(0 18px 40px rgba(0, 0, 0, .55));
}
.hero-brand { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.3rem; }
.hero-emblem { flex: none; width: clamp(64px, 7vw, 84px); height: auto; filter: drop-shadow(0 10px 28px rgba(220, 180, 108, .3)); }
.hero-brand .hero-crest { margin: 0; padding: .45rem .9rem; border: 1px solid var(--gold-line); border-radius: 999px; background: rgba(5, 9, 21, .45); letter-spacing: .28em; }
.hero-brand .hero-crest::before, .hero-brand .hero-crest::after { display: none; }
.crest-world { color: var(--gold-hi); }
.crest-sep { width: 4px; height: 4px; margin: 0 .7rem; border-radius: 50%; background: var(--gold); }
.hero-brand .hero-crest { display: inline-flex; align-items: center; }
.btn-download svg { width: 18px; height: 18px; }
.download-meta { margin-top: .8rem; color: var(--muted); font-size: .82rem; }
.flourish { display: flex; align-items: center; gap: 1rem; width: min(100%, 560px); margin: .9rem 0 1.4rem; }
.flourish::before, .flourish::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 60%, transparent); }
.tagline { color: var(--ivory); font: 500 clamp(1.05rem, 2.6vw, 1.5rem)/1.3 var(--font-display); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.hero-lead { max-width: 560px; margin: 0 0 2rem; color: #cfd3e6; font-size: clamp(1rem, 2.2vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 2rem; color: var(--muted); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.hero-meta strong { color: var(--gold-hi); font-weight: 600; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(244, 236, 218, .35); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold-hi); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(72px, 10vw, 120px) 0; }
#races::before, #adventure::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; }
#races::before { background: radial-gradient(50% 40% at 50% 30%, rgba(220, 180, 108, .08), transparent 70%); }
#adventure::before { background: radial-gradient(45% 45% at 15% 40%, rgba(165, 148, 255, .1), transparent 70%), radial-gradient(40% 40% at 90% 70%, rgba(134, 201, 255, .08), transparent 70%); }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .9rem; color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.eyebrow::before { content: "✦"; font-size: .8rem; letter-spacing: 0; }
.section-title { font-size: clamp(2rem, 5vw, 3.1rem); }
.section-lead { margin-top: 1rem; color: var(--muted); font-size: 1.06rem; }
.glow-divider { height: 1px; max-width: var(--wrap); margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }

.card {
  position: relative; border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 36, 77, .55), rgba(12, 19, 42, .55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* Realm panel overlapping the hero */
.realm-wrap { position: relative; z-index: 2; margin-top: -120px; }

/* ---------- World / journey ---------- */
.world-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lore p + p { margin-top: 1rem; }
.lore p { color: #c9cde0; font-size: 1.05rem; }
.nations { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.nation { padding: 1.2rem 1.25rem; overflow: hidden; }
.nation::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--nation); box-shadow: 0 0 18px var(--nation); }
.nation.primus { --nation: var(--primus); }
.nation.ganav { --nation: var(--ganav); }
.nation h3 { font-size: 1.35rem; letter-spacing: .08em; }
.nation .home { margin: .2rem 0 .6rem; color: var(--nation); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.nation p:last-child { color: var(--muted); font-size: .92rem; }
.journey { position: relative; padding: 1.6rem; }
.journey h3 { font-size: 1.1rem; letter-spacing: .06em; margin-bottom: 1.2rem; }
.route { position: relative; list-style: none; margin: 0; padding: 0; }
.route::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(180deg, var(--sky), var(--violet), var(--gold)); opacity: .5; }
.route li { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 1rem; align-items: center; padding: .7rem 0; }
.route .node { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--night-2); color: var(--gold-hi); font: 700 .85rem var(--font-display); box-shadow: 0 0 0 5px var(--night-1); }
.route strong { display: block; color: var(--ivory); font: 600 1.08rem var(--font-display); letter-spacing: .04em; }
.route span.where { color: var(--muted-2); font-size: .84rem; }
.route .lv { padding: .25rem .6rem; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--gold-hi); font-size: .74rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.route li.pvp .lv { border-color: rgba(255, 122, 122, .35); color: #ffb1a8; }
.legend { margin-top: 1rem; color: var(--muted-2); font-size: .78rem; }

/* ---------- Races ---------- */
.races { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.race { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.race:hover { transform: translateY(-4px); border-color: var(--gold-line); box-shadow: var(--shadow); }
.race-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.race-art img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 30%; transition: transform .6s ease; }
.race:hover .race-art img { transform: scale(1.05); }
.race-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(12, 19, 42, .95)); }
.race-body { position: relative; padding: 0 1.3rem 1.4rem; margin-top: -34px; }
.race-emblem { width: 52px; height: 52px; margin-bottom: .7rem; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.race h3 { font-size: 1.5rem; letter-spacing: .08em; }
.race .kind { margin: .25rem 0 .7rem; color: var(--race); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.race p { color: var(--muted); font-size: .95rem; }
.race.seneka { --race: #e8c87e; }
.race.koshare { --race: #a8d68a; }
.race.matsuka { --race: #c9a6ff; }

/* ---------- Classes ---------- */
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.class { padding: 1.4rem; display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: start; transition: border-color .2s ease, background .2s ease; }
.class:hover { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(34, 48, 98, .6), rgba(14, 22, 48, .6)); }
.class-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: radial-gradient(circle at 30% 25%, rgba(247, 221, 157, .25), rgba(247, 221, 157, .04)); border: 1px solid var(--gold-line); color: var(--gold-hi); }
.class-icon svg { width: 30px; height: 30px; }
.class h3 { font-size: 1.2rem; letter-spacing: .05em; }
.class .role { margin: .15rem 0 .5rem; color: var(--sky); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.class p { color: var(--muted); font-size: .93rem; }
.subclass-note { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.6rem; color: var(--muted); font-size: .95rem; text-align: center; }
.subclass-note strong { color: var(--gold-hi); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature { padding: 1.4rem; overflow: hidden; }
.feature.wide { grid-column: span 2; }
.feature .icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--gold-hi); }
.feature h3 { font-size: 1.15rem; letter-spacing: .03em; margin-bottom: .45rem; }
.feature p { color: var(--muted); font-size: .93rem; }
.feature.seven { background: radial-gradient(120% 140% at 100% 0%, rgba(165, 148, 255, .22), transparent 55%), linear-gradient(180deg, rgba(24, 36, 77, .55), rgba(12, 19, 42, .55)); }
.signs { display: flex; gap: .4rem; margin-top: 1rem; }
.signs i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }

/* ---------- Updates teaser + list ---------- */
.update-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.update-card { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.update-card:hover { border-color: var(--gold-line); transform: translateY(-3px); color: inherit; }
.update-card time, .update time { color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.update-card h3 { font-size: 1.15rem; line-height: 1.3; }
.update-card p { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.update-card .link-arrow { margin-top: auto; font-size: .88rem; }
.section-foot { display: flex; justify-content: center; margin-top: 2rem; }

.updates-list { display: grid; gap: 1.2rem; }
.update { padding: clamp(1.2rem, 3vw, 1.8rem); }
.update h2 { margin: .4rem 0 .7rem; font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.25; }
.update > p { color: #c9cde0; }
.update-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.6rem; margin-top: 1.2rem; }
.update-sections h3 { margin-bottom: .45rem; font: 600 .98rem var(--font-body); color: var(--gold-hi); }
.update-sections ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .93rem; }
.update-sections li + li { margin-top: .35rem; }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.lang-switch button { min-height: 34px; padding: .3rem .9rem; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .82rem var(--font-body); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: #1b1205; }
.page-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-tools p { color: var(--muted-2); font-size: .88rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step { padding: 1.6rem 1.4rem; counter-increment: step; }
.step::before { content: counter(step, upper-roman); display: block; margin-bottom: .9rem; color: var(--gold); font: 700 1.6rem var(--font-display); }
.step h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.step p { color: var(--muted); font-size: .94rem; margin-bottom: 1rem; }

/* ---------- Call to action band ---------- */
.cta-band { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 80px) var(--gutter); border-radius: 24px; text-align: center; background: radial-gradient(80% 120% at 50% 120%, rgba(220, 180, 108, .28), transparent 60%), linear-gradient(180deg, var(--night-3), var(--night-1)); border: 1px solid var(--line); }
.cta-band blockquote { margin: 0 auto 1.6rem; max-width: 760px; color: var(--ivory); font: 500 clamp(1.5rem, 4vw, 2.4rem)/1.25 var(--font-display); }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Pages ---------- */
.page { padding: clamp(48px, 8vw, 88px) 0 clamp(72px, 10vw, 120px); min-height: 70vh; }
.page-hero { position: relative; padding: clamp(40px, 7vw, 72px) 0 0; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 420px; z-index: -1; background: radial-gradient(50% 60% at 70% 30%, rgba(134, 201, 255, .12), transparent 70%), radial-gradient(40% 50% at 20% 20%, rgba(220, 180, 108, .1), transparent 70%); }
.page-title { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.page-lead { margin-top: .8rem; max-width: 640px; color: var(--muted); font-size: 1.08rem; }
.prose { max-width: 760px; }
.prose h2 { margin: 2.4rem 0 .8rem; font-size: 1.5rem; }
.prose p { color: #c9cde0; }
.prose p + p { margin-top: 1rem; }

.faq { max-width: 820px; display: grid; gap: .75rem; }
.faq details { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel); transition: border-color .2s ease; }
.faq details[open] { border-color: var(--gold-line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; color: var(--ivory); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-line); color: var(--gold-hi); font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* ---------- Forms ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 68px); }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; padding: clamp(32px, 5vw, 64px); overflow: hidden; border-right: 1px solid var(--line-soft); background: radial-gradient(60% 50% at 30% 30%, rgba(134, 201, 255, .12), transparent 70%), radial-gradient(50% 40% at 70% 80%, rgba(220, 180, 108, .12), transparent 70%), linear-gradient(180deg, var(--night-2), var(--night-0)); }
.auth-art img { width: 100%; max-width: 620px; aspect-ratio: 868 / 405; object-fit: cover; object-position: 85% 30%; border: 1px solid var(--gold-line); border-radius: 20px; box-shadow: var(--shadow); }
.auth-art blockquote { max-width: 520px; margin: 0; color: var(--ivory); font: 500 clamp(1.4rem, 2.4vw, 1.9rem)/1.3 var(--font-display); }
.auth-art blockquote span { display: block; margin-top: .6rem; color: var(--gold); font: 700 .72rem var(--font-body); letter-spacing: .24em; text-transform: uppercase; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vw, 72px) var(--gutter); }
.form-card { width: 100%; max-width: 440px; }
.form-card h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.form-card .intro { margin: .7rem 0 1.8rem; color: var(--muted); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: .45rem; color: var(--ivory); font-size: .9rem; font-weight: 600; }
.field .hint { margin-top: .4rem; color: var(--muted-2); font-size: .8rem; }
.field .error { margin-top: .4rem; color: var(--danger); font-size: .82rem; }
.input-row { position: relative; }
.input {
  width: 100%; min-height: 50px; padding: .75rem 1rem;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  background: rgba(5, 9, 21, .6); color: var(--ivory);
  font: 400 1rem var(--font-body); transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(220, 180, 108, .15); }
.input[aria-invalid="true"] { border-color: rgba(255, 155, 143, .6); }
.input-row .input { padding-right: 4.6rem; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 38px; padding: 0 .8rem; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .06); color: var(--ivory-2); font: 600 .78rem var(--font-body); cursor: pointer; }
.reveal:hover { background: rgba(255, 255, 255, .12); }
.strength { height: 4px; margin-top: .55rem; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gold); transition: width .2s ease, background .2s ease; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.form-actions .btn { min-width: 170px; }
.form-alt { color: var(--muted); font-size: .92rem; }
.alert { margin-bottom: 1.2rem; padding: .85rem 1rem; border-radius: 12px; font-size: .92rem; }
.alert.error { border: 1px solid rgba(255, 155, 143, .35); background: rgba(255, 155, 143, .08); color: #ffd0c9; }
.alert.success { border: 1px solid rgba(159, 220, 148, .35); background: rgba(159, 220, 148, .08); color: #d7f3d1; }
.secure-note { display: flex; gap: .6rem; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: .8rem; }
.secure-note svg { flex: none; width: 16px; height: 16px; margin-top: .15rem; color: var(--ok); }

/* ---------- Account ---------- */
.account-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.2rem; align-items: start; }
.account-card { padding: 1.6rem; }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 18px; background: linear-gradient(135deg, var(--gold-hi), var(--gold-deep)); color: #1b1205; font: 700 1.6rem var(--font-display); }
.account-card h2 { font-size: 1.5rem; word-break: break-word; }
.account-card .muted { margin: .3rem 0 1.4rem; color: var(--muted-2); font-size: .88rem; }
.account-card .btn { width: 100%; }
.account-card .btn + .btn { margin-top: .6rem; }
.characters { padding: 1.6rem; }
.characters h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; list-style: none; margin: 0; padding: 0; }
.char { display: flex; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(5, 9, 21, .4); }
.char .class-icon { width: 46px; height: 46px; border-radius: 12px; }
.char .class-icon svg { width: 24px; height: 24px; }
.char strong { display: block; color: var(--ivory); font-size: 1rem; word-break: break-word; }
.char span { color: var(--muted); font-size: .84rem; }
.fineprint { margin-top: 1.2rem; color: var(--muted-2); font-size: .8rem; }
.empty { padding: 2rem 1rem; color: var(--muted); text-align: center; }

/* ---------- Support the realm ---------- */
.support { margin-top: 1.2rem; padding: clamp(1.3rem, 3vw, 2rem); overflow: hidden; background: radial-gradient(70% 90% at 100% 0%, rgba(220, 180, 108, .14), transparent 60%), linear-gradient(180deg, rgba(24, 36, 77, .6), rgba(12, 19, 42, .6)); border-color: var(--gold-line); }
.support h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.support h3 { margin-bottom: .9rem; font: 600 1rem var(--font-body); color: var(--gold-hi); letter-spacing: .02em; }
.support-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.support-lead { max-width: 620px; margin-top: .6rem; color: #c9cde0; }
.support-lead strong { color: var(--gold-hi); }
.coin-balance { display: grid; justify-items: end; gap: .1rem; padding: .9rem 1.2rem; border: 1px solid var(--gold-line); border-radius: 16px; background: rgba(5, 9, 21, .45); }
.coin-balance span { color: var(--muted-2); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.coin-balance strong { color: var(--gold-hi); font: 700 2rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.support-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2rem; margin-top: 1.6rem; }
.support-pay, .support-move { padding: 1.3rem; border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(5, 9, 21, .35); min-width: 0; }
.support-move .hint { margin: -.4rem 0 1rem; color: var(--muted-2); font-size: .86rem; }
.support-move .btn { width: 100%; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.network-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.chip { min-height: 38px; padding: .45rem .9rem; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--ivory-2); font: 600 .84rem var(--font-body); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.chip:hover { border-color: var(--gold-line); color: #fff; }
.chip[aria-selected="true"] { border-color: var(--gold); background: rgba(220, 180, 108, .16); color: var(--gold-hi); }
.pay-what { color: var(--ivory); font-size: .95rem; margin-bottom: .6rem; }
.address-row { display: flex; gap: .5rem; align-items: center; }
.address-row code { flex: 1; min-width: 0; padding: .75rem .9rem; border: 1px dashed var(--gold-line); border-radius: 12px; background: rgba(5, 9, 21, .6); color: var(--gold-hi); font: 500 .9rem/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.pay-notes { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .84rem; }
.pay-notes li + li { margin-top: .25rem; }
.calc { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.calc label { display: block; margin-bottom: .45rem; color: var(--ivory); font-size: .88rem; font-weight: 600; }
.calc-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.calc-row .input { width: 140px; }
.calc-row span { color: var(--muted-2); }
.calc-row strong { color: var(--gold-hi); font: 700 1.25rem var(--font-display); font-variant-numeric: tabular-nums; }
.history-title { margin-top: 1.8rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 14px; }
.deposits { width: 100%; border-collapse: collapse; font-size: .9rem; }
.deposits th { padding: .7rem .9rem; color: var(--muted-2); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-align: left; text-transform: uppercase; background: rgba(5, 9, 21, .4); }
.deposits td { padding: .75rem .9rem; border-top: 1px solid var(--line-soft); color: var(--ivory-2); white-space: nowrap; }
.deposits td.num { color: var(--gold-hi); font-weight: 600; font-variant-numeric: tabular-nums; }
.status { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgba(255, 255, 255, .06); color: var(--muted); }
.status.credited { background: rgba(159, 220, 148, .12); color: var(--ok); }
.status.seen, .status.confirmed { background: rgba(220, 180, 108, .14); color: var(--gold-hi); }

/* ---------- Security (2FA) and account cards ---------- */
.account-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: start; margin-top: 1.2rem; }
.security, .donate-card { padding: 1.6rem; }
.security h2, .donate-card h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.security p, .donate-card p { color: var(--muted); }
.security p + p, .security .btn { margin-top: 1rem; }
.status-line { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; color: var(--muted-2) !important; font-size: .9rem; font-weight: 600; }
.status-line::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-line.on { color: var(--ok) !important; }
.status-line.on::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.setup-steps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--ivory-2); }
.setup-steps li + li { margin-top: .3rem; }
.qr-wrap { display: inline-block; padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.qr-wrap img { width: 196px; height: 196px; image-rendering: pixelated; }
.secret { padding: .15rem .45rem; border-radius: 6px; background: rgba(5, 9, 21, .6); color: var(--gold-hi); font: 600 .9rem ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .06em; word-break: break-all; }
.code-input { font: 600 1.25rem ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .25em; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0; padding: 1rem; list-style: none; border: 1px dashed var(--gold-line); border-radius: 12px; background: rgba(5, 9, 21, .5); }
.recovery-codes li { color: var(--gold-hi); font: 600 1rem ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .08em; }
.turn-off { margin-top: 1rem; }
.turn-off summary { color: var(--muted); font-size: .9rem; cursor: pointer; }
.turn-off form { margin-top: 1rem; }
.text-button { padding: .4rem 0; border: 0; background: none; color: var(--gold-hi); font: 600 .9rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: #fff; }
.donate-card { background: radial-gradient(90% 90% at 100% 0%, rgba(220, 180, 108, .16), transparent 60%), linear-gradient(180deg, rgba(24, 36, 77, .6), rgba(12, 19, 42, .6)); border-color: var(--gold-line); }
.donate-card .coin-balance { justify-items: start; margin: 1.2rem 0; }
.donate-card .btn { width: 100%; }
.alert.notice { border: 1px solid var(--gold-line); background: rgba(220, 180, 108, .08); color: var(--ivory); }
.nav .nav-donate { color: var(--gold-hi); }
.nav .nav-donate::before { content: "✦ "; font-size: .75em; }

/* ---------- Member area (app shell) ---------- */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.6rem; align-items: start; padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(64px, 8vw, 96px); }
.app-side { position: sticky; top: 88px; padding: 1.1rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(180deg, rgba(24, 36, 77, .6), rgba(12, 19, 42, .6)); }
.app-profile { display: flex; align-items: center; gap: .8rem; padding: .2rem .2rem 1rem; border-bottom: 1px solid var(--line-soft); }
.app-profile .avatar { flex: none; width: 46px; height: 46px; margin: 0; border-radius: 14px; font-size: 1.2rem; }
.app-who { display: grid; gap: .25rem; min-width: 0; }
.app-who strong { color: var(--ivory); font: 600 1.05rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { justify-self: start; padding: .1rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge.ok { background: rgba(159, 220, 148, .12); color: var(--ok); }
.app-nav { display: flex; flex-direction: column; gap: .2rem; margin: .9rem 0; }
.app-nav a { position: relative; display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; color: var(--ivory-2); font-size: .94rem; font-weight: 500; text-decoration: none; transition: background .15s ease, color .15s ease; }
.app-nav a svg { flex: none; width: 18px; height: 18px; color: var(--muted-2); }
.app-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.app-nav a[aria-current="page"] { background: rgba(220, 180, 108, .12); color: var(--gold-hi); }
.app-nav a[aria-current="page"] svg { color: var(--gold-hi); }
.app-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -1.1rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.app-logout { width: 100%; }
.app-main { min-width: 0; }
.app-head { margin-bottom: 1.4rem; }
.app-head .eyebrow { margin-bottom: .5rem; }
.app-title { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.app-lead { margin-top: .45rem; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding: 1.05rem 1.15rem; color: inherit; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
a.stat:hover { border-color: var(--gold-line); transform: translateY(-2px); color: inherit; }
.stat-label { color: var(--muted-2); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.stat-value { color: var(--ivory); font: 700 1.65rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-value.gold { color: var(--gold-hi); }
.stat-value.ok { color: var(--ok); }
.stat-note { color: var(--muted); font-size: .8rem; }
.stat.warn { border-color: rgba(255, 155, 143, .45); }
.stat.warn .stat-value { color: var(--danger); }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
.panel { padding: 1.4rem; min-width: 0; }
.panel h2 { font-size: 1.25rem; margin-bottom: .8rem; }
.panel h3 { margin-bottom: .9rem; color: var(--gold-hi); font: 600 1rem var(--font-body); }
.panel h3 small { margin-left: .35rem; color: var(--muted-2); font-weight: 500; }
.panel-text { margin-bottom: 1rem; color: var(--muted); }
.activity { margin: 0; padding: 0; list-style: none; }
.activity li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line-soft); font-size: .9rem; }
.activity li:first-child { border-top: 0; }
.activity li.empty { display: block; padding: 1rem 0; text-align: left; }
.activity-what { color: var(--ivory-2); overflow-wrap: anywhere; }
.activity-delta { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-delta.plus { color: var(--ok); }
.activity-delta.minus { color: var(--muted); }
.activity time { color: var(--muted-2); font-size: .8rem; white-space: nowrap; }
.quick { display: grid; gap: .3rem; }
.quick h2 { margin-bottom: .4rem; }
.quick-link { display: flex; align-items: center; gap: .9rem; padding: .75rem; border-radius: 12px; color: inherit; text-decoration: none; transition: background .15s ease; }
.quick-link:hover { background: rgba(255, 255, 255, .05); color: inherit; }
.quick-link svg { flex: none; width: 22px; height: 22px; color: var(--gold-hi); }
.quick-link strong { display: block; color: var(--ivory); font-size: .95rem; }
.quick-link small { color: var(--muted); font-size: .82rem; }
.section-label { margin: 1.8rem 0 .9rem; font-size: 1.15rem; }
.chart { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg .grid { stroke: rgba(255, 255, 255, .06); }
.chart-svg .baseline { stroke: rgba(255, 255, 255, .2); }
.chart-svg .tick { fill: var(--muted-2); font: 11px var(--font-body); }
.chart-svg .hit { fill: transparent; }
.chart-svg .hit.on { fill: rgba(255, 255, 255, .05); }
.chart-tip { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 8px)); padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 9, 21, .95); color: var(--ivory); font-size: .8rem; white-space: nowrap; pointer-events: none; }
.chart-table { margin-top: .6rem; }
.chart-table summary { color: var(--muted); font-size: .82rem; cursor: pointer; }
.chart-table table { margin-top: .6rem; }
.deposits th.num, .deposits td.num { text-align: right; }
.panel .deposits th, .panel .deposits td { padding: .6rem .65rem; }
.panel .deposits { font-size: .86rem; }
.app .support { margin-top: 0; }
.app .security { padding: 1.4rem; }
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .app-side { position: static; padding: .9rem; }
  .app-profile { border-bottom: 0; padding-bottom: .4rem; }
  .app-nav { flex-direction: row; gap: .4rem; margin: .4rem 0 .6rem; overflow-x: auto; scrollbar-width: none; }
  .app-nav a { flex: none; padding: .5rem .8rem; border: 1px solid var(--line-soft); border-radius: 999px; font-size: .88rem; }
  .app-nav a[aria-current="page"]::before { display: none; }
  .app-nav a[aria-current="page"] { border-color: var(--gold-line); }
  .app-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .stat-value { font-size: 1.35rem; }
  .stat { padding: .9rem; }
  .activity li { grid-template-columns: minmax(0, 1fr) auto; }
  .activity time { grid-column: 1; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--night-0), #03060e); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { margin-bottom: .9rem; color: var(--gold); font: 700 .72rem var(--font-body); letter-spacing: .22em; text-transform: uppercase; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-grid a { color: var(--ivory-2); font-size: .92rem; text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-about p { margin-top: 1rem; max-width: 340px; color: var(--muted-2); font-size: .88rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: .78rem; }

/* ---------- Reveal on scroll ---------- */
.js .reveal-up { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal-up.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1140px) {
  .menu-toggle { display: block; }
  .nav, .header-actions { display: none; }
  .menu-open .nav, .menu-open .header-actions { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .menu-open .site-header { background: rgba(5, 9, 21, .97); max-height: 100vh; overflow-y: auto; }
  .menu-open .nav { order: 3; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding: .5rem 0; }
  .menu-open .nav a { padding: .85rem .6rem; font-size: 1.05rem; border-radius: 10px; }
  .menu-open .header-actions { order: 4; width: 100%; padding: 0 0 1rem; flex-wrap: wrap; }
  .menu-open .header-actions > span { flex: 1 1 140px; }
  .menu-open .header-actions .btn { width: 100%; }
  .menu-open .realm-pill { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 960px) {
  .world-grid, .account-grid, .support-grid, .account-row { grid-template-columns: 1fr; }
  .races, .classes, .update-grid, .steps { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 110px 0 150px; min-height: 0; }
  /* The sky is cropped to its centre on portrait screens; bring the moon into view. */
  .sky-moon { transform: translate(-190px, -200px); }
  .tagline { white-space: normal; letter-spacing: .14em; }
  .hero-crest { gap: .6rem; letter-spacing: .22em; white-space: nowrap; }
  .hero-crest::before, .hero-crest::after { width: 24px; }
  .hero-brand { gap: .8rem; }
  .hero-brand .hero-crest { padding: .35rem .7rem; letter-spacing: .18em; font-size: .64rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .races, .classes, .update-grid, .steps, .features, .nations { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .route li { grid-template-columns: 44px 1fr; }
  .route .lv { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .form-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal-up { opacity: 1; transform: none; }
}
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-top: .9rem; }
.pay-qr svg { width: min(200px, 60vw); height: auto; padding: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--gold-line); }
.pay-qr-hint { margin: 0; font-size: .82rem; opacity: .75; }
.pay-qr[hidden] { display: none; }
