/* =====================================================================================================
   Everheim Online Idle - landing page (landing.html, served at /). Standalone: the game's style.css is 116 KB, so the
   page carries its own copy of the tokens it uses (same names and values as css/style.css: keep them in step).
   Look: the game's light-frame glass cards, Cinzel titles, Nunito text, blue actions, navy/frost titles.
   No yellow or gold text anywhere (the game's rule).
   ===================================================================================================== */
:root {
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --title: 'Cinzel', Georgia, 'Times New Roman', serif;
  --radius-xs: 6px; --radius-sm: 8px; --radius: 10px; --radius-lg: 12px; --radius-xl: 16px; --radius-pill: 999px;
  --dur-fast: 120ms; --dur: 180ms; --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 16px;
  --wrap: 1180px;
  --top-h: 64px;

  /* light theme (default) - css/style.css :root */
  color-scheme: light;
  --bg: #e1e8f2;
  --bg-glow-1: rgba(47, 107, 208, 0.18);
  --bg-glow-2: rgba(120, 160, 225, 0.14);
  --bg-glow-3: rgba(47, 107, 208, 0.10);
  --surface-sunken: #f5f1e7;
  --surface-2: #ffffff;
  --surface-3: #eef3fa;
  --border-soft: #e0e6ee;
  --border: #c9d3e1;
  --border-strong: #8d9db6;
  --border-accent: #9dbbe8;
  --text: #1b2a47;
  --text-strong: #0f1b33;
  --text-soft: #2f3e5c;
  --text-muted: #4f5d78;
  --text-faint: #5b6780;
  --text-title: #183a78;
  --text-on-primary: #ffffff;
  --accent: #34589f;
  --accent-text: #22468c;
  --accent-line: rgba(52, 88, 159, 0.45);
  --accent-soft: rgba(52, 88, 159, 0.11);
  --accent-softer: rgba(52, 88, 159, 0.055);
  --frame-inner: rgba(52, 88, 159, 0.2);
  --frame-hi: rgba(255, 255, 255, 0.9);
  --frame-corner-filter: hue-rotate(-72deg) saturate(1.5) brightness(1.6);
  --corner-opacity: 0.9;
  --primary: #2f6bd0;
  --primary-text: #1d4fa8;
  --primary-line: #2558b4;
  --primary-line-hover: #163a78;
  --primary-glow: rgba(47, 107, 208, 0.26);
  --sel: #2f6bd0;
  --sel-text: #1f56b8;
  --sel-line: #4f86de;
  --sel-soft: rgba(47, 107, 208, 0.12);
  --focus: #1f5fd0;
  --good: #1b7340;
  --bad: #bb2b37;
  --bad-strong: #9a1f2a;
  --bad-line: #e09aa0;
  --bad-soft: rgba(187, 43, 55, 0.08);
  --link-hover: #163a78;
  --brand-1: #183a78;
  --brand-2: #2f6bd0;
  --input-bg: #ffffff;
  --glass-top: rgba(255, 253, 248, 0.95);
  --glass-bottom: rgba(251, 248, 241, 0.97);
  --glass-clear: rgba(255, 255, 255, 0.72);
  --modal-bg: linear-gradient(180deg, #ffffff, #fbf8f1);
  --btn-bg: linear-gradient(180deg, #ffffff, #f1f4f9);
  --btn-bg-hover: linear-gradient(180deg, #f6f9fd, #e6edf7);
  --btn-line: #c3cedd;
  --btn-primary-bg: linear-gradient(180deg, #3473d8, #2559bb);
  --btn-primary-bg-hover: linear-gradient(180deg, #3d7ee6, #2a62c6);
  --role-tank: #2f6bd0; --role-healer: #1b7340; --role-dps: #bb2b37;
  --shade: rgba(20, 40, 80, 0.14);
  --gloss: rgba(255, 255, 255, 0.9);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 14px rgba(20, 40, 80, 0.10);
  --shadow-3: 0 18px 50px rgba(20, 40, 80, 0.24);
  --scrim: rgba(15, 27, 51, 0.42);
  /* landing only */
  --scene: url(../assets/landing/scene_day.webp);
  --scene-fallback: linear-gradient(180deg, #3f9ad6 0%, #b8d6e8 50%, #ffe8b4 72%, #f6cb76 80%, #d99a48 100%);   /* Sunscar Dunes */
  --veil: rgba(225, 233, 242, 0.88);
  --veil-soft: rgba(225, 233, 242, 0.55);
  --hero-text-halo: 0 1px 0 rgba(255, 255, 255, 0.75), 0 0 18px rgba(255, 255, 255, 0.65);
  --mote: rgba(255, 255, 255, 0.95);
  --bolt: #8dc4ff;
  --tree-line: rgba(52, 88, 159, 0.38);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e15;
  --bg-glow-1: rgba(58, 116, 218, 0.20);
  --bg-glow-2: rgba(110, 140, 220, 0.06);
  --bg-glow-3: rgba(58, 116, 218, 0.08);
  --surface-sunken: #0e121a;
  --surface-2: #1a2130;
  --surface-3: #20283a;
  --border-soft: #273045;
  --border: #323d56;
  --border-strong: #586684;
  --border-accent: #3d5a8f;
  --text: #ece4d4;
  --text-strong: #fbf4e4;
  --text-soft: #d2d6e2;
  --text-muted: #a3acc0;
  --text-faint: #8a93a8;
  --text-title: #e1e9f7;
  --accent: #9dbbec;
  --accent-text: #c3d4f1;
  --accent-line: rgba(157, 187, 236, 0.42);
  --accent-soft: rgba(157, 187, 236, 0.12);
  --accent-softer: rgba(157, 187, 236, 0.055);
  --frame-inner: rgba(157, 187, 236, 0.11);
  --frame-hi: rgba(255, 255, 255, 0.045);
  --frame-corner-filter: hue-rotate(-75deg) saturate(1.8) brightness(1.25);
  --corner-opacity: 1;
  --primary: #3a74da;
  --primary-text: #8dbdff;
  --primary-line: #5a95f0;
  --primary-line-hover: #a8d0ff;
  --primary-glow: rgba(58, 116, 218, 0.38);
  --sel: #6aa6ff;
  --sel-text: #8dbdff;
  --sel-line: #5a95f0;
  --sel-soft: rgba(90, 149, 240, 0.16);
  --focus: #a8d0ff;
  --good: #74d896;
  --bad: #ff8585;
  --bad-strong: #ffd6d6;
  --bad-line: #b8454c;
  --bad-soft: rgba(255, 133, 133, 0.10);
  --link-hover: #c2dcff;
  --brand-1: #f3f6fc;
  --brand-2: #9dbbec;
  --input-bg: #0e121a;
  --glass-top: rgba(32, 40, 58, 0.90);
  --glass-bottom: rgba(22, 28, 40, 0.94);
  --glass-clear: rgba(22, 28, 40, 0.62);
  --modal-bg: linear-gradient(180deg, #20283a, #161c28);
  --btn-bg: linear-gradient(180deg, #273045, #20283a);
  --btn-bg-hover: linear-gradient(180deg, #323d56, #273045);
  --btn-line: #44516d;
  --btn-primary-bg: linear-gradient(180deg, #3a74da, #2a5ec2);
  --btn-primary-bg-hover: linear-gradient(180deg, #437fe6, #3069d0);
  --role-tank: #8dbdff; --role-healer: #74d896; --role-dps: #ff8585;
  --shade: rgba(0, 0, 0, 0.35);
  --gloss: rgba(255, 255, 255, 0.18);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.09) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, 0.09) inset, 0 24px 64px rgba(0, 0, 0, 0.6);
  --scrim: rgba(4, 6, 10, 0.72);
  --scene: url(../assets/landing/scene_night.webp);
  --scene-fallback: linear-gradient(180deg, #0e1438 0%, #3a4c8c 50%, #7090d0 72%, #6c7690 80%, #3a4156 100%);   /* Stormcrown Eyrie */
  --veil: rgba(11, 14, 21, 0.82);
  --veil-soft: rgba(11, 14, 21, 0.45);
  --hero-text-halo: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 0, 0, 0.55);
  --mote: rgba(200, 220, 255, 0.95);
  --bolt: #b9a0ff;
  --tree-line: rgba(157, 187, 236, 0.32);
}
:root.theme-switching *, :root.theme-switching *::before, :root.theme-switching *::after { transition: none !important; }

/* ===================================================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 8px); }
body {
  margin: 0; color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(1100px 620px at 50% 110vh, var(--bg-glow-1), transparent 62%),
    radial-gradient(900px 520px at 100% 60%, var(--bg-glow-3), transparent 60%),
    radial-gradient(700px 420px at 0% 85%, var(--bg-glow-2), transparent 60%),
    var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-text); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
::selection { background: var(--primary-glow); color: var(--text-strong); }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; left: 12px; top: 8px; z-index: 100; transform: translateY(-160%); padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--text-on-primary); font-weight: 800; text-decoration: none; transition: transform var(--dur) var(--ease);
}
.skip-link:focus-visible { transform: none; }
[hidden] { display: none !important; }
:root:not([data-theme="dark"]) .only-dark, :root[data-theme="dark"] .only-light { display: none !important; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sel-text); }
.small { font-size: 14px; }

/* ===================================================================================== brand (the game's logo) */
.brand { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--title); font-weight: 800; font-size: 20px; letter-spacing: 0.6px; color: var(--text-title); white-space: nowrap; text-decoration: none; }
.brand:hover { color: var(--text-title); }
.brand-name, .logo-name { background: linear-gradient(180deg, var(--brand-1), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { color: var(--accent); text-shadow: 0 0 12px var(--accent-line); }
.brand small, .logo-tag { font-family: var(--font); font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2.4px; }

/* ===================================================================================== controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--btn-line); border-radius: var(--radius-sm); background: var(--btn-bg); color: var(--text-soft);
  font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 0 var(--gloss) inset, 0 1px 2px var(--shade);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { border-color: var(--border-strong); background: var(--btn-bg-hover); color: var(--text-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn.primary {
  background: var(--btn-primary-bg); border-color: var(--primary-line); color: var(--text-on-primary); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 16px var(--primary-glow);
}
.btn.primary:hover { background: var(--btn-primary-bg-hover); border-color: var(--primary-line-hover); color: var(--text-on-primary); }
.btn.glass { background: var(--glass-clear); border-color: var(--border-accent); color: var(--text-strong); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn.glass:hover { background: var(--glass-top); border-color: var(--sel-line); }
.btn.play {
  position: relative; overflow: hidden; min-height: 60px; padding: 0 46px; border-radius: 14px; font-size: 21px; letter-spacing: 0.4px;
  font-family: var(--title); font-weight: 800; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 8px 28px var(--primary-glow), 0 0 0 4px var(--sel-soft);
}
.btn.play::after { /* a slow shine across the button */
  content: ''; position: absolute; inset: -40% auto -40% -30%; width: 22%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); animation: shine 5s var(--ease) 1.2s infinite;
}
@keyframes shine { 0% { left: -30%; } 22%, 100% { left: 130%; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--glass-clear); color: var(--text-soft); backdrop-filter: blur(6px);
}
.icon-btn:hover { border-color: var(--sel-line); color: var(--sel-text); }
.i-sun, .i-moon { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.i-sun { --i: url(../assets/ui/picto/sun.png); }
.i-moon { --i: url(../assets/ui/picto/moon.png); }
:root[data-theme="dark"] .theme-toggle .i-moon, :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; padding: 3px; gap: 3px; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 1px solid var(--border); }
.seg-btn {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; color: var(--text-muted); font-weight: 800; font-size: 14px; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.seg-btn:hover { color: var(--text-strong); }
.seg-btn.on, .seg-btn[aria-selected="true"] { background: var(--btn-primary-bg); color: var(--text-on-primary); box-shadow: 0 1px 4px var(--primary-glow); }

/* the game's light-frame glass: double line, highlight, corner ornaments */
.frame {
  position: relative; border-radius: 18px; background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--border-accent); box-shadow: inset 0 0 0 1px var(--frame-hi), var(--shadow-2);
  outline: 1px solid var(--frame-inner); outline-offset: -7px;
}
.frame::after, .dlg::after {
  --corner: 30px; content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: var(--corner-opacity); filter: var(--frame-corner-filter);
  background:
    url(../assets/ui/corner_tl.png) top left / var(--corner) no-repeat, url(../assets/ui/corner_tr.png) top right / var(--corner) no-repeat,
    url(../assets/ui/corner_bl.png) bottom left / var(--corner) no-repeat, url(../assets/ui/corner_br.png) bottom right / var(--corner) no-repeat;
}

/* ===================================================================================== top bar */
.top { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--top-h); transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); border-bottom: 1px solid transparent; }
.top.solid { background: var(--glass-top); border-bottom-color: var(--border-soft); box-shadow: 0 6px 20px var(--shade); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top-in { display: flex; align-items: center; gap: 20px; height: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.top-nav { display: flex; gap: 2px; margin: 0 auto; }
.top-nav a { padding: 6px 12px; border-radius: var(--radius-pill); color: var(--text-soft); font-weight: 700; font-size: 15px; text-decoration: none; }
.top-nav a:hover { color: var(--text-strong); background: var(--accent-soft); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top:not(.solid) .brand, .top:not(.solid) .top-nav a { text-shadow: var(--hero-text-halo); }

/* ===================================================================================== hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  height: clamp(600px, 100svh, 1040px); padding: calc(var(--top-h) + 24px) var(--gutter) 120px;
}
/* the scene covers the hero, ground at the bottom; --fx = which part of the stage is centred (0..1) */
.scene { position: absolute; inset: 0; z-index: -2; container-type: size; overflow: hidden; background: var(--scene-fallback); }
.stage {
  --sw: max(100cqw, 100cqh * 960 / 440);
  --fx: 0.62;
  --k: 0.85;   /* = ACTOR_K of the live banner (src/landing/playlist.js) */
  position: absolute; bottom: 0; width: var(--sw); aspect-ratio: 960 / 440;
  left: clamp(100cqw - var(--sw), 50cqw - var(--fx) * var(--sw), 0px);
  background: var(--scene) center / 100% 100% no-repeat;
}
.hero::before { /* veil behind the copy so text stays readable on any part of the art */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--veil) 0%, var(--veil-soft) 34%, transparent 58%), linear-gradient(0deg, var(--bg) 0, transparent 90px);
}
/* --k: actor size on the stage (1 = the battle view's scale) */
.actor {
  position: absolute; left: calc(var(--x) / 960 * 100%); top: calc(var(--y) / 440 * 100%); width: calc(var(--w) * var(--k) / 960 * 100%);
  aspect-ratio: var(--w) / var(--h); margin-left: calc(var(--ax) * var(--k) / 960 * -100%); transform: translateY(calc(var(--ay) / var(--h) * -100%));
}
.actor img { display: block; width: 100%; height: auto; transform-origin: 50% 94%; animation: breathe 2.4s ease-in-out infinite; }
.a-archmage img { animation-delay: -0.8s; }
.a-nightblade img { animation-delay: -1.5s; animation-duration: 2.7s; }
.a-paragon img { animation: breathe 2.4s ease-in-out -0.3s infinite, lunge 4.8s var(--ease) infinite; }
.a-whelp img { animation: breathe 1.8s ease-in-out infinite, flinch 4.8s var(--ease) infinite; }
.a-dragon img { animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 96%; }
@keyframes breathe { 0%, 100% { scale: 1 1; translate: 0 0; } 50% { scale: 1.012 0.982; translate: 0 0.6%; } }
@keyframes lunge { 0%, 60%, 76%, 100% { translate: 0 0; } 66% { translate: 7% -1%; } 70% { translate: 8% 0; } }
@keyframes flinch { 0%, 69%, 84%, 100% { translate: 0 0; filter: none; } 71% { translate: 6% 0; filter: brightness(1.8); } 76% { translate: 3% 0; filter: none; } }
/* a bolt from the archmage's staff to the whelp; the hit flashes there */
.bolt, .hit { position: absolute; border-radius: 50%; pointer-events: none; opacity: 0; }
.bolt {
  left: calc(628 / 960 * 100%); top: calc(292 / 440 * 100%); width: calc(14 / 960 * 100%); aspect-ratio: 1;
  background: radial-gradient(circle, #fff 0 30%, var(--bolt) 55%, transparent 72%); box-shadow: 0 0 18px 6px var(--bolt);
  animation: bolt 4.8s cubic-bezier(0.5, 0, 0.9, 0.6) infinite;
}
.hit {
  left: calc(718 / 960 * 100%); top: calc(290 / 440 * 100%); width: calc(60 / 960 * 100%); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 18%, var(--bolt) 40%, transparent 70%); animation: hit 4.8s ease-out infinite;
}
@keyframes bolt { 0%, 52% { opacity: 0; transform: translate(0, 0) scale(0.5); } 55% { opacity: 1; transform: translate(0, 0) scale(1); } 70% { opacity: 1; transform: translate(836%, 170%) scale(1.1); } 71%, 100% { opacity: 0; transform: translate(850%, 172%) scale(0.6); } }
@keyframes hit { 0%, 69% { opacity: 0; transform: scale(0.3); } 72% { opacity: 1; transform: scale(1); } 84%, 100% { opacity: 0; transform: scale(1.5); } }
.mote { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--mote); box-shadow: 0 0 8px 2px var(--mote); opacity: 0; animation: mote 9s linear infinite; }
.m1 { left: 18%; top: 70%; } .m2 { left: 36%; top: 78%; animation-delay: -3s; animation-duration: 11s; } .m3 { left: 52%; top: 66%; animation-delay: -6s; }
.m4 { left: 67%; top: 74%; animation-delay: -1.5s; animation-duration: 12s; } .m5 { left: 82%; top: 70%; animation-delay: -7.5s; } .m6 { left: 92%; top: 80%; animation-delay: -4.5s; animation-duration: 10s; }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 0.9; } 80% { opacity: 0.6; } 100% { opacity: 0; transform: translate(-30px, -260px); } }

/* ------------------------------------------------------------------ live banner (src/landing/scene.js, live.js)
   A canvas over the poster, the same box as the stage. It fades in once the first field is ready (.hero.live-on), then
   the poster's CSS actors stop (.live-done). Over the moving canvas nothing blurs or masks: the glass buttons on it drop
   their backdrop blur, and on phones the fades at the scene's edges are plain gradients instead of a mask. */
.stage > canvas.live { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none; transition: opacity 0.9s var(--ease); }
.hero.live-on .stage > canvas.live { opacity: 1; }
.hero.live-done .actor, .hero.live-done .bolt, .hero.live-done .hit, .hero.live-done .mote { display: none; }
/* the scrim behind the copy: a little stronger over the moving scene */
.hero.live-on::before {
  background: linear-gradient(90deg, var(--veil) 0%, var(--veil) 18%, var(--veil-soft) 40%, transparent 60%), linear-gradient(0deg, var(--bg) 0, transparent 90px);
}
:root.banner-live .theme-toggle, :root.banner-live .hero .btn.glass { backdrop-filter: none; -webkit-backdrop-filter: none; }
:root.banner-live .theme-toggle { background: var(--glass-top); }
:root.banner-live .hero .btn.glass { background: var(--glass-top); }
@media (max-width: 720px), (orientation: portrait) and (max-width: 1100px) {
  .hero.live-on .scene { -webkit-mask-image: none; mask-image: none; }
  .hero.live-on .scene::after {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, var(--bg) 0, transparent 26%, transparent 86%, var(--bg));
  }
  .hero.live-on::before { background: linear-gradient(0deg, var(--bg) 0, transparent 70px); }
}

.hero-copy { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; }
.hero-copy > * { max-width: 600px; }
.hero-copy > .logo { max-width: none; }
.hero-copy .eyebrow { text-shadow: var(--hero-text-halo); }
.logo { font-family: var(--title); font-weight: 800; line-height: 1.08; letter-spacing: 0.5px; font-size: clamp(40px, 4.8vw, 68px); color: var(--text-title); }
.logo .logo-name { filter: drop-shadow(0 2px 10px var(--veil-soft)); }
.logo .logo-mark { font-size: 0.66em; margin-right: 0.18em; vertical-align: 0.08em; }
.logo .logo-tag { margin-left: 0.5em; white-space: nowrap; }
.logo .logo-tag { font-size: clamp(13px, 1.3vw, 17px); letter-spacing: 4px; color: var(--accent-text); }
.pitch { margin: 18px 0 28px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--text-strong); font-weight: 600; text-shadow: var(--hero-text-halo); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.continue { min-height: 60px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 6px 22px; border-radius: 14px; font-size: 16px; line-height: 1.25; }
.continue b { color: var(--sel-text); }
.continue small { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.continue small:empty { display: none; }
.cta-sub { margin: 18px 0 0; font-size: 15px; font-weight: 700; color: var(--text-soft); text-shadow: var(--hero-text-halo); }

/* ===================================================================================== facts */
.facts { position: relative; z-index: 2; margin-top: -64px; padding: 0 var(--gutter); }
.facts-in {
  display: grid; grid-template-columns: repeat(6, 1fr); max-width: var(--wrap); margin: 0 auto; padding: 18px 10px; list-style: none;
  border-radius: 18px; background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)); border: 1px solid var(--border-accent);
  box-shadow: inset 0 0 0 1px var(--frame-hi), var(--shadow-3); outline: 1px solid var(--frame-inner); outline-offset: -7px;
}
.facts li { display: flex; flex-direction: column; align-items: center; padding: 4px 8px; text-align: center; }
.facts li + li { border-left: 1px solid var(--border-soft); }
.facts b { font-family: var(--title); font-weight: 800; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; color: var(--text-title); }
.facts span { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }

/* ===================================================================================== sections */
.sec { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 96px var(--gutter) 24px; }
.sec h2 { font-family: var(--title); font-weight: 800; font-size: clamp(26px, 2.7vw, 34px); line-height: 1.2; letter-spacing: 0.3px; color: var(--text-title); margin-bottom: 16px; }
.sec h3 { font-family: var(--title); font-weight: 800; font-size: 20px; color: var(--text-title); margin-bottom: 12px; }
.sec p, .sec dd, .sec li { color: var(--text-soft); }
.sec b { color: var(--text-strong); }
.sec-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .copy { order: 2; }
.visual { margin: 0; }
.shot { display: block; position: relative; border-radius: 16px; padding: 7px; background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom)); border: 1px solid var(--border-accent); box-shadow: inset 0 0 0 1px var(--frame-hi), var(--shadow-3); cursor: zoom-in; }
.shot img { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--border-soft); }
.shot:hover { border-color: var(--sel-line); }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 600; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--sel-soft); border: 1px solid var(--sel-line); }
.ticks li::after { content: ''; position: absolute; left: 6px; top: 8px; width: 5px; height: 9px; border: solid var(--sel-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.perks { display: grid; gap: 14px; margin: 22px 0 0; }
.perks > div { padding: 14px 16px; border-radius: var(--radius-lg); background: var(--accent-softer); border: 1px solid var(--border-soft); }
.perks dt { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text-title); }
.perks dt img { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 1px 2px var(--shade)); }
.perks dd { margin: 6px 0 0; font-size: 15px; }

/* ===================================================================================== classes */
.path { display: flex; justify-content: center; align-items: flex-end; gap: 0; list-style: none; margin: 0 auto 28px; padding: 0; max-width: 900px; }
.path li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.path li + li::before { content: ''; position: absolute; left: -22%; right: 78%; bottom: 44px; height: 2px; background: linear-gradient(90deg, transparent, var(--tree-line)); }
.path img { width: 64px; height: auto; }
.path b { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 9px; border-radius: 50%; font-family: var(--title); font-size: 15px; color: var(--accent-text); background: var(--surface-2); border: 1px solid var(--border-accent); box-shadow: 0 0 0 4px var(--accent-softer); }
.path .trans b { color: var(--text-on-primary); background: var(--btn-primary-bg); border-color: var(--primary-line); box-shadow: 0 0 0 4px var(--sel-soft), 0 0 16px var(--primary-glow); }
.path span { font-size: 13px; font-weight: 800; color: var(--text-muted); }
.path .rebirth span { color: var(--sel-text); }
.tree-box { max-width: 900px; margin: 0 auto; padding: 22px 22px 16px; }
.tree-tabs { display: flex; width: max-content; max-width: 100%; margin: 0 auto 8px; }
.tree { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; padding: 6px 0; }
.tree::before { /* elbow connectors: first -> two seconds -> their transcendent forms */
  content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--tree-line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 200' preserveAspectRatio='none'%3E%3Cpath d='M76 100H100M100 50V150M100 50H122M100 150H122M178 50H222M178 150H222' fill='none' stroke='%23000' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 200' preserveAspectRatio='none'%3E%3Cpath d='M76 100H100M100 50V150M100 50H122M100 150H122M178 50H222M178 150H222' fill='none' stroke='%23000' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.tree::after { content: 'Rebirth'; position: absolute; left: 66.67%; top: 50%; transform: translate(-50%, -50%); padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--sel-text); background: var(--surface-2); border: 1px solid var(--sel-line); }
.node { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; }
.node img { width: min(130px, 100%); height: auto; }
.node figcaption { margin-top: -4px; padding: 2px 12px; border-radius: var(--radius-pill); font-weight: 800; font-size: 15px; color: var(--text-strong); background: var(--surface-2); border: 1px solid var(--border); }
.n1 { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.n2a { grid-column: 2; grid-row: 1; } .n2b { grid-column: 2; grid-row: 2; }
.n3a { grid-column: 3; grid-row: 1; } .n3b { grid-column: 3; grid-row: 2; }
.node.trans figcaption { color: var(--text-on-primary); background: var(--btn-primary-bg); border-color: var(--primary-line); }
.node.trans img { filter: drop-shadow(0 0 10px var(--sel-soft)); }
.tree-desc { margin: 10px auto 0; max-width: 560px; text-align: center; font-size: 15px; }
.tree-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.lg::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); vertical-align: -1px; }
.lg-3::before { background: var(--primary); border-color: var(--primary-line); }

/* ===================================================================================== world */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { margin: 0; padding: 7px; overflow: hidden; }
.field img { display: block; width: 100%; border-radius: 11px; }
.field figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 10px 10px 4px; }
.field figcaption b { font-family: var(--title); font-size: 18px; color: var(--text-title); }
.field figcaption > span { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.world-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.card { padding: 22px 24px; }
.card p { margin: 14px 0 0; font-size: 15px; }
.bosses { display: flex; justify-content: center; align-items: flex-end; }
.bosses img { width: 33%; max-width: 180px; height: auto; }
.portraits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.portraits li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-muted); line-height: 1.25; }
.portraits img { width: 64px; height: 64px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #2a2a44, #16162a 75%); border: 1px solid var(--accent-line); box-shadow: 0 0 0 3px var(--accent-softer); }

/* ===================================================================================== dungeons */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 18px 0; padding: 0; }
.role { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: var(--radius-lg); text-align: center; background: var(--accent-softer); border: 1px solid var(--border-soft); }
.role img { width: 32px; height: 32px; }
.role b { font-size: 15px; }
.role span { font-size: 12.5px; font-weight: 700; color: var(--text-muted); line-height: 1.3; }
.role.tank b { color: var(--role-tank); } .role.healer b { color: var(--role-healer); } .role.dps b { color: var(--role-dps); }
.dungeon-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.dungeon-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-soft); font-weight: 800; font-size: 14px; color: var(--text); }
.dungeon-list small { font-weight: 700; color: var(--text-muted); white-space: nowrap; }

/* ===================================================================================== pets, costumes */
.lineup { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 4px; list-style: none; margin: 0; padding: 0; }
.lineup li { position: relative; display: flex; flex-direction: column; align-items: center; width: 160px; }
.lineup img { width: 150px; height: auto; transition: transform var(--dur) var(--ease); }
.lineup li:hover img { transform: translateY(-4px); }
.lineup span { padding: 3px 12px; border-radius: var(--radius-pill); font-weight: 800; font-size: 14px; color: var(--text-strong); background: var(--glass-top); border: 1px solid var(--border-accent); }
.pets-row img { width: 140px; }

/* ===================================================================================== final call, footer */
.final { padding: 110px var(--gutter) 90px; }
.final-in { max-width: 760px; margin: 0 auto; padding: 40px 28px; text-align: center; }
.final h2 { font-family: var(--title); font-weight: 800; font-size: clamp(26px, 3vw, 36px); color: var(--text-title); margin-bottom: 12px; }
.final p { color: var(--text-soft); }
.final .cta { justify-content: center; margin-top: 22px; }
.final .btn.glass { min-height: 60px; padding: 0 30px; border-radius: 14px; font-size: 17px; }
.foot { border-top: 1px solid var(--border-soft); background: var(--glass-clear); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 28px var(--gutter) 36px; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { font-weight: 800; text-decoration: none; }
.foot p { flex: 1 1 280px; margin: 0; text-align: right; font-size: 14px; color: var(--text-muted); }

/* ===================================================================================== dialogs */
.dlg {
  position: fixed; width: min(460px, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 32px); overflow: visible; padding: 0; margin: auto;
  color: var(--text); border: 1px solid var(--border-accent); border-radius: 20px; background: var(--modal-bg);
  box-shadow: inset 0 0 0 1px var(--frame-hi), var(--shadow-3); outline: 1px solid var(--frame-inner); outline-offset: -7px;
}
.dlg[open] { animation: dlg-in var(--dur) var(--ease); }
.dlg::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dlg::after { --corner: 42px; }
.dlg-x { position: absolute; right: 12px; top: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.dlg-x:hover { color: var(--text-strong); background: var(--accent-soft); }
.auth-form { display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 34px); overflow-y: auto; padding: 26px 28px 22px; }
.dlg-brand { justify-content: center; font-size: 24px; margin: 2px 0 4px; }
.auth-tabs { display: flex; justify-content: center; }
.auth-lead { margin: 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-held { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; background: var(--sel-soft); border: 1px solid var(--sel-line); color: var(--text); }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld label { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.fld label small { font-size: 12px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.fld input {
  width: 100%; min-height: 46px; padding: 0 14px; font: inherit; font-size: 16px; font-weight: 700; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color var(--dur-fast) var(--ease);
}
.fld input::placeholder { color: var(--text-faint); font-weight: 600; }
.fld input:hover { border-color: var(--border-strong); }
.fld input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--sel-line); }
.fld input[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
.fld .hint { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.fld .err { margin: 0; font-size: 13px; font-weight: 700; color: var(--bad); line-height: 1.4; }
.fld .err + .hint, .fld .hint:has(+ .err:not([hidden])) { display: none; }
.pw { position: relative; display: block; }
.pw input { padding-right: 72px; }
.pw-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--surface-sunken); color: var(--text-soft); font-size: 12.5px; font-weight: 800; cursor: pointer; }
.pw-toggle:hover { color: var(--text-strong); border-color: var(--border-strong); }
.pw-toggle[aria-pressed="true"] { color: var(--sel-text); border-color: var(--sel-line); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--sel); }
.form-err { padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad-strong); font-size: 14px; font-weight: 700; line-height: 1.45; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--link-hover); }
.submit { min-height: 50px; font-size: 17px; border-radius: 12px; }
.auth-switch { margin: 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth:not(.reg) .reg-only { display: none; }
/* ---- account dialog views (src/landing/dialog.js): one scroll area, one view at a time */
.auth-body { max-height: calc(100dvh - 34px); overflow-y: auto; padding: 26px 28px 22px; }
.auth-body .auth-form { padding: 0; max-height: none; overflow: visible; }
.auth-body .dlg-brand { margin-bottom: 12px; }
.auth-view[hidden], .auth-body [hidden] { display: none !important; }
.auth.reg .login-only { display: none; }
.auth-h { margin: 0; text-align: center; font-family: var(--title); font-size: 21px; color: var(--text-title); }
.auth-badge { align-self: center; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-size: 26px; color: var(--primary-text); background: var(--sel-soft); border: 1px solid var(--sel-line); }
.auth-badge:empty { display: none; }
.auth-badge.good { color: var(--good); background: var(--accent-softer); border-color: var(--good); }
.auth-badge.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.auth-alt { display: flex; flex-direction: column; gap: 10px; }
.google-btn { width: 100%; gap: 10px; min-height: 48px; font-weight: 800; color: var(--text-strong); background: var(--surface-2); border-color: var(--border-strong); }
.google-btn svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: -2px 0 0; font-size: 14px; }
.auth-row { display: flex; gap: 10px; }
.auth-row .btn { flex: 1 1 0; min-height: 44px; padding: 0 12px; font-size: 15px; }
.auth-sub { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-3); }
.auth-done { padding: 9px 12px; border-radius: var(--radius-sm); background: var(--sel-soft); border: 1px solid var(--sel-line); color: var(--text); font-size: 14px; line-height: 1.45; }
.auth-done b { color: var(--good); }
.hint.center { text-align: center; margin: 0; font-size: 13px; color: var(--text-muted); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.captcha-slot { display: flex; justify-content: center; min-height: 65px; }
.reset-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-account { margin: 0; padding: 8px 12px; text-align: center; font-family: var(--title); font-size: 21px; font-weight: 800; color: var(--text-strong); border-radius: var(--radius); background: var(--sel-soft); border: 1px solid var(--sel-line); overflow-wrap: anywhere; }
.fld .chk { font-size: 14px; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--text-soft); }
.fld .chk span { line-height: 1.4; }
.rules-text { max-height: min(56dvh, 460px); overflow-y: auto; padding: 4px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-3); font-size: 14px; line-height: 1.55; color: var(--text-soft); }
@media (max-width: 520px) { .auth-body { padding: 22px 18px 18px; } }
@media (max-width: 420px) { .auth-row { flex-direction: column; } .auth-links { justify-content: center; } }
.lightbox { width: min(1400px, calc(100vw - 2 * var(--gutter))); padding: 8px; }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 60px); object-fit: contain; border-radius: 12px; }
.lightbox .dlg-x { right: -6px; top: -42px; color: #fff; background: rgba(0, 0, 0, 0.45); }
.lightbox::after { display: none; }

/* ===================================================================================== responsive */
@media (max-width: 1080px) {
  .top-nav { display: none; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .copy { order: 0; }
  .feature .copy { max-width: 720px; }
}
@media (max-width: 860px) {
  .facts-in { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .facts li:nth-child(4) { border-left: 0; }
  .world-more { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px), (orientation: portrait) and (max-width: 1100px) {
  /* phones and portrait tablets: copy centred at the top, the fight below it; the stage centres on the party */
  .hero { justify-content: flex-start; height: auto; padding-top: calc(var(--top-h) + 24px); padding-bottom: 72px; text-align: center; }
  /* the scene follows the copy (never under it) and fades in at its top */
  .scene {
    position: relative; inset: auto; order: 2; flex: none; height: clamp(280px, 78vw, 560px); margin: -36px calc(-1 * var(--gutter)) 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 88%, transparent); mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 88%, transparent);
  }
  .stage { --fx: 0.68; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0, transparent 70px); }
  .top:not(.solid) .brand, .hero-copy .eyebrow, .pitch, .cta-sub { text-shadow: none; }
  .hero-copy > * { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
}
@media (max-width: 720px) {
  .btn.play { width: 100%; max-width: 360px; }
  .continue { width: 100%; max-width: 360px; align-items: center; }
  .sec { padding-top: 72px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .path { flex-wrap: wrap; row-gap: 14px; }
  .path li { flex: 0 0 33.33%; }
  .path li:nth-child(4)::before { display: none; }
  .tree-box { padding: 16px 8px 12px; }
  .tree-tabs .seg-btn { padding: 0 12px; }
  .node figcaption { font-size: 13px; padding: 2px 8px; }
  .tree::after { display: none; }
  .lineup li { width: 31%; }
  .lineup img, .pets-row img { width: 100%; max-width: 140px; }
  .foot p { text-align: left; }
}
@media (max-width: 520px) {
  .top .btn.sm { padding: 0 12px; }
  .brand { font-size: 17px; }
  .top .brand small { display: none; }
  .facts-in { padding: 12px 4px; }
  .facts span { font-size: 11px; letter-spacing: 0.6px; }
  .portraits { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .portraits img { width: 54px; height: 54px; }
  .dungeon-list { grid-template-columns: minmax(0, 1fr); }
  .roles { gap: 6px; }
  .card { padding: 18px 14px; }
  .auth-form { padding: 22px 18px 18px; }
}
@media (max-width: 380px) {
  .top-in { gap: 8px; }
  .top-actions { gap: 6px; }
  .top .brand { font-size: 15px; gap: 5px; }
  .top .btn.sm { padding: 0 10px; }
  .facts span { font-size: 10px; letter-spacing: 0.3px; }
  .lineup li { width: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
