/* ═══════════════════════════════════════════════════════════════
   СЭМИАМ НЭПСЭК · АРХИВ 003
   Occult terminal / dossier interface
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ink: #0b0705;
  --ink-2: #120a06;
  --ink-3: #1b0f09;
  --paper: #f3e6d8;
  --text: #f3e6d8;
  --body: #d8c4b3;
  --muted: #b39883;
  --dim: #82685a;
  --ember: #f0a16d;
  --ember-soft: #ffc59a;
  --rust: #a84f26;
  --blood: #e20101;
  --glass: #8fe3d0;
  --glass-deep: #2f7a6c;
  --line: rgba(243, 230, 216, 0.14);
  --line-soft: rgba(243, 230, 216, 0.07);
  --panel: rgba(27, 15, 9, 0.62);
  --panel-2: rgba(18, 10, 6, 0.82);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --maxw: 1480px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.7s;
}

/* ── RESET ──────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
em, i { font-style: normal; }
b, strong { font-weight: 700; }
::selection { background: var(--ember); color: #160a04; }

:focus-visible {
  outline: 1px solid var(--ember);
  outline-offset: 4px;
  border-radius: 1px;
}

html { scrollbar-color: var(--rust) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #3b2418; border: 2px solid var(--ink); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rust); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.mono-xs {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── ATMOSPHERE ─────────────────────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(243, 230, 216, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243, 230, 216, 0.035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 0%, transparent 78%);
  opacity: 0.5;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 92;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.7s steps(3) infinite;
  will-change: transform;
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(-2%, 1%, 0); }
  66% { transform: translate3d(1%, -2%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 93;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0px,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.7;
}

.scanlines::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(240, 161, 109, 0.05), transparent);
  animation: scanSweep 9s linear infinite;
}

@keyframes scanSweep {
  0% { top: -20%; }
  100% { top: 110%; }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(5, 3, 2, 0.42) 100%),
    linear-gradient(to bottom, rgba(5, 3, 2, 0.4), transparent 12%, transparent 90%, rgba(5, 3, 2, 0.55));
}

/* ── CUSTOM CURSOR ──────────────────────────────────────────── */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  html.has-cursor { cursor: none; }
  html.has-cursor a,
  html.has-cursor button,
  html.has-cursor [role="button"] { cursor: none; }

  .cursor {
    display: block;
    position: fixed;
    top: 0; left: 0;
    z-index: 400;
    pointer-events: none;
    mix-blend-mode: normal;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .cursor.is-ready { opacity: 1; }
  .cursor__dot {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--ember);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(240, 161, 109, 0.9);
  }
  .cursor__ring {
    position: absolute;
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border: 1px solid rgba(240, 161, 109, 0.55);
    border-radius: 50%;
    transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), border-color 0.25s, background 0.25s;
  }
  .cursor.is-hot .cursor__ring {
    width: 58px; height: 58px;
    margin: -29px 0 0 -29px;
    border-color: rgba(226, 1, 1, 0.85);
    background: rgba(226, 1, 1, 0.06);
  }
  .cursor__label {
    position: absolute;
    left: 26px; top: 22px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--ember);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
  }
  .cursor.is-hot .cursor__label { opacity: 1; transform: none; }
}

/* ── REVEAL ─────────────────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── BOOT ───────────────────────────────────────────────────── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(168, 79, 38, 0.18), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(226, 1, 1, 0.08), transparent 55%),
    #070403;
  overflow: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}

.boot--done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(240, 161, 109, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(240, 161, 109, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, transparent 75%);
  animation: bootGrid 8s linear infinite;
}

@keyframes bootGrid {
  to { background-position: 60px 60px; }
}

.boot__inner {
  position: relative;
  width: min(920px, 88vw);
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border: 1px solid rgba(240, 161, 109, 0.2);
  background: rgba(9, 5, 3, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(240, 161, 109, 0.03);
}

.boot__inner::before,
.boot__inner::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ember);
}
.boot__inner::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.boot__inner::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.boot__top,
.boot__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.boot__top { border-bottom: 1px solid var(--line-soft); padding-bottom: 0.9rem; }
.boot__stage { padding: clamp(1.6rem, 5vw, 3.4rem) 0; }

.boot__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--rust);
  margin-bottom: 1rem;
}

.boot__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  text-shadow: 0 0 40px rgba(240, 161, 109, 0.18);
}
.boot__name span:last-child {
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 161, 109, 0.75);
  animation: bootFlicker 3.2s steps(1) infinite;
}

@keyframes bootFlicker {
  0%, 92%, 94%, 100% { opacity: 1; }
  93% { opacity: 0.28; }
  95% { opacity: 0.7; }
}

.boot__log {
  margin-top: clamp(1.2rem, 3vw, 2.2rem);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  max-height: 190px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.boot__log p { opacity: 0; animation: logIn 0.4s var(--ease) forwards; }
.boot__log p:nth-child(1) { animation-delay: 0.15s; }
.boot__log p:nth-child(2) { animation-delay: 0.38s; }
.boot__log p:nth-child(3) { animation-delay: 0.6s; }
.boot__log p:nth-child(4) { animation-delay: 0.82s; }
.boot__log p:nth-child(5) { animation-delay: 1.02s; }
.boot__log p:nth-child(6) { animation-delay: 1.24s; }
.boot__log p:nth-child(7) { animation-delay: 1.46s; }
.boot__log b { color: var(--rust); font-weight: 400; margin-right: 0.8em; }
.boot__log i { color: var(--paper); font-style: normal; }
.boot__log i.ok { color: var(--glass); }
.boot__log p::after { content: ""; }

@keyframes logIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

.boot__meter { flex: 1; max-width: 420px; }
.boot__meter-head { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.boot__meter-head .mono-xs:last-child { color: var(--ember); }

.boot__bar {
  height: 2px;
  background: rgba(243, 230, 216, 0.12);
  overflow: hidden;
}
.boot__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rust), var(--ember), var(--blood));
  box-shadow: 0 0 18px rgba(240, 161, 109, 0.7);
  transition: width 0.2s linear;
}

.boot__skip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.boot__skip:hover { color: var(--paper); border-color: var(--ember); background: rgba(240, 161, 109, 0.07); }
.boot__skip .ico { width: 14px; height: 14px; }

/* ── HUD ────────────────────────────────────────────────────── */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: 62px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  background: rgba(11, 7, 5, 0.55);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
  transform: translateY(-100%);
  transition: transform 0.8s var(--ease) 0.2s, background 0.4s;
}
.is-booted .hud { transform: none; }
.hud.is-scrolled { background: rgba(11, 7, 5, 0.82); }

.hud__brand { display: flex; align-items: center; gap: 12px; }
.hud__glyph { width: 30px; height: 30px; color: var(--ember); }
.hud__glyph svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; }
.hud__glyph .glint { fill: var(--paper); stroke: none; }
.hud__id { display: flex; flex-direction: column; line-height: 1.15; }
.hud__id b { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.hud__id em { font-style: normal; font-size: 8px; letter-spacing: 0.3em; color: var(--muted); }

.hud__status { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.hud__status .sep { color: var(--dim); }
.hud__status .dot { width: 5px; height: 5px; }

.hud__actions { display: flex; align-items: center; gap: 8px; }
.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.25s var(--ease);
}
.hud-btn:hover { color: var(--paper); border-color: var(--ember); background: rgba(240, 161, 109, 0.06); }
.hud-btn__key { font-size: 8px; padding: 2px 4px; border: 1px solid var(--line); color: var(--dim); }
.hud-btn--icon { width: 34px; padding: 0; justify-content: center; }
.hud-btn--accent { background: var(--paper); color: #170c06; border-color: var(--paper); font-weight: 700; }
.hud-btn--accent:hover { background: var(--ember); border-color: var(--ember); color: #170c06; }

.hud__progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: transparent; }
.hud__progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rust), var(--ember));
  box-shadow: 0 0 10px var(--ember);
}

/* ── RAIL ───────────────────────────────────────────────────── */
.rail {
  position: fixed;
  right: clamp(1rem, 2.2vw, 2.2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
  mix-blend-mode: normal;
}
.rail__caption { font-size: 8px; letter-spacing: 0.3em; color: var(--dim); }
.rail__list { display: flex; flex-direction: column; gap: 2px; }
.rail__list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 24px;
  color: var(--dim);
  transition: color 0.3s;
}
.rail__num { font-size: 9px; letter-spacing: 0.1em; }
.rail__label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s, transform 0.3s;
}
.rail__list a::after {
  content: "";
  width: 14px; height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease), background 0.3s;
}
.rail__list a:hover,
.rail__list a.is-active { color: var(--ember); }
.rail__list a:hover .rail__label,
.rail__list a.is-active .rail__label { opacity: 1; transform: none; }
.rail__list a.is-active::after { width: 30px; background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.rail__line { width: 1px; height: 60px; background: var(--line); position: relative; }
.rail__line span { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: var(--ember); transition: height 0.3s; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding: clamp(6.4rem, 12vh, 8.5rem) var(--gutter) 4rem;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero__ghost {
  position: absolute;
  top: 8%;
  right: -2%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16rem, 34vw, 34rem);
  line-height: 0.75;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 161, 109, 0.13);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.hero__content { position: relative; z-index: 3; }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(240, 161, 109, 0.35);
  color: var(--ember);
  font-size: 9px;
  letter-spacing: 0.2em;
  background: rgba(240, 161, 109, 0.05);
}
.tag__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.hero__eyebrow-txt { color: var(--dim); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 8.4vw, 7.2rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  margin-left: -0.05em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line .char {
  display: inline-block;
  transition: transform 0.5s var(--ease), color 0.3s;
  will-change: transform;
}
.hero__line:hover .char { color: var(--ember); }
.hero__line .char:nth-child(odd):hover { transform: translateY(-0.08em) rotate(-3deg); }
.hero__line .char:nth-child(even):hover { transform: translateY(0.08em) rotate(3deg); }

.hero__line--ember {
  color: transparent;
  background: linear-gradient(100deg, #ffe6d2 0%, var(--ember) 30%, #df7439 58%, #ffd9bd 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: emberFlow 9s ease-in-out infinite;
}
@keyframes emberFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: clamp(1.3rem, 2.6vw, 2rem);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text);
}
.hero__meta i { color: var(--blood); font-style: normal; }

.hero__lead {
  max-width: 52ch;
  margin-top: clamp(1.4rem, 2.4vw, 1.9rem);
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  line-height: 1.75;
  color: var(--body);
  font-weight: 300;
}
.hero__lead em { color: var(--ember); font-style: italic; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(1.8rem, 3vw, 2.6rem); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  margin-top: clamp(1.8rem, 3.4vw, 2.8rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}
.hero__stats div { display: flex; flex-direction: column; gap: 2px; }
.hero__stats dt { font-size: 8px; letter-spacing: 0.24em; color: var(--dim); }
.hero__stats dd {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.hero__stats dd span { font-family: var(--font-mono); font-size: 8px; color: var(--muted); letter-spacing: 0.1em; }

.hero__art {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 560px);
  justify-self: center;
  z-index: 1;
}

.sigil { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sigil__ring { fill: none; stroke: rgba(240, 161, 109, 0.32); stroke-width: 1; }
.sigil__ring--dash { stroke-dasharray: 2 10; stroke: rgba(240, 161, 109, 0.5); animation: spinSlow 90s linear infinite; }
.sigil__ring--inner { stroke: rgba(143, 227, 208, 0.22); stroke-dasharray: 1 6; }
.sigil__ticks line { stroke: rgba(243, 230, 216, 0.32); stroke-width: 1; }
.sigil__text {
  fill: rgba(240, 161, 109, 0.62);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.34em;
}
.sigil__runes { animation: spinSlow 140s linear infinite reverse; transform-origin: 220px 220px; }
.sigil__spin { transform-origin: 220px 220px; animation: spinSlow 60s linear infinite; }

@keyframes spinSlow { to { transform: rotate(360deg); } }

.lens {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(210px, 26vw, 330px);
  aspect-ratio: 1.34;
  transform: translate(-50%, -50%);
  z-index: 3;
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 60px rgba(143, 227, 208, 0.12));
  animation: lensFloat 7s ease-in-out infinite;
}
@keyframes lensFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.lens__eye {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: lensBlink 9s ease-in-out infinite;
  transform-origin: center;
}

.lens__sclera {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 36% 28%, #f4fbf8 0%, #dcece6 16%, #abc8c0 38%, #67877f 64%, #29443e 88%, #162a26 100%);
  border: 1px solid rgba(240, 161, 109, 0.45);
  box-shadow:
    inset 0 -20px 45px rgba(4, 18, 15, 0.75),
    inset 0 14px 30px rgba(255, 255, 255, 0.28),
    inset 0 0 0 6px rgba(8, 5, 3, 0.22),
    0 0 0 1px rgba(240, 161, 109, 0.25),
    0 0 80px rgba(143, 227, 208, 0.16);
}
.lens__sclera::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(5, 3, 2, 0.74), transparent 30%, transparent 66%, rgba(5, 3, 2, 0.58));
}

.lens__iris {
  position: absolute;
  left: 50%; top: 50%;
  width: 44%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translate(var(--ix, 0px), var(--iy, 0px));
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #f0fffb 0%, #a9f0e4 12%, #5fc8b6 30%, #2b7568 52%, #0d312b 74%, #04120f 100%);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.7), 0 0 40px rgba(143, 227, 208, 0.25);
  overflow: hidden;
  z-index: 2;
}
.lens__iris::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: repeating-conic-gradient(from 0deg, rgba(4, 25, 21, 0.55) 0deg 1.6deg, transparent 1.6deg 8deg);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 25% 88%, transparent 92%);
  mask: radial-gradient(circle, transparent 0 22%, #000 25% 88%, transparent 92%);
  animation: spinSlow 46s linear infinite;
}
.lens__iris::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 161, 109, 0.55);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8);
}

.lens__pupil {
  position: absolute;
  left: 50%; top: 50%;
  width: 38%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 44% 40%, #0c1a16 0%, #010504 55%, #000 100%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

.lens__glint {
  position: absolute;
  width: 24%; height: 14%;
  left: 24%; top: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fff, rgba(255, 255, 255, 0.15) 62%, transparent 74%);
  filter: blur(0.4px);
  transform: rotate(-24deg);
  z-index: 3;
}
.lens__glint::after {
  content: "";
  position: absolute;
  width: 34%; height: 50%;
  right: -38%; top: 190%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  filter: blur(0.5px);
}

.lens__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 4;
  background: linear-gradient(115deg, transparent 26%, rgba(255, 255, 255, 0.2) 40%, transparent 48%, rgba(255, 255, 255, 0.1) 62%, transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.lens__rim {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid rgba(240, 161, 109, 0.3);
  border-top-color: rgba(240, 161, 109, 0.72);
  border-bottom-color: rgba(226, 1, 1, 0.38);
  animation: spinSlow 26s linear infinite;
  z-index: 5;
}
.lens__rim::before {
  content: "";
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1px dashed rgba(243, 230, 216, 0.16);
}

@keyframes lensBlink {
  0%, 93%, 100% { transform: scaleY(1); }
  94.2% { transform: scaleY(0.05); }
  95.6% { transform: scaleY(1); }
}

.hero__tag {
  position: absolute;
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted);
  padding: 5px 8px;
  border-left: 1px solid var(--rust);
  background: rgba(11, 7, 5, 0.5);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.hero__tag--a { top: 8%; right: 2%; }
.hero__tag--b { bottom: 14%; left: 2%; }
.hero__tag--c { bottom: 3%; right: 16%; color: var(--glass); border-color: var(--glass-deep); }

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--dim);
  z-index: 4;
}
.hero__scroll-line {
  display: block;
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--rust), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 20px;
  background: var(--ember);
  animation: scrollLine 2.4s var(--ease-io) infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(320%); }
}

/* ── TICKER ─────────────────────────────────────────────────── */
.ticker {
  position: relative;
  z-index: 2;
  border-block: 1px solid var(--line-soft);
  padding: 0.9rem 0;
  overflow: hidden;
  background: rgba(11, 7, 5, 0.4);
}
.ticker__track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 0.5rem;
}
.ticker__track b { color: var(--rust); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── SECTIONS ───────────────────────────────────────────────── */
.sec {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 9.5rem) var(--gutter);
  border-top: 1px solid var(--line-soft);
}

.sec-head {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 340px);
  align-items: start;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2.6rem, 5vw, 4.4rem);
}

.sec-index {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.sec-index span:first-child {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ember);
  letter-spacing: -0.03em;
}
.sec-total { color: var(--dim); }

.sec-kicker {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--rust);
  margin-bottom: 0.6rem;
}

.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.6vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--paper);
}

.sec-note {
  padding-top: 0.7rem;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 1.1rem;
  max-width: 38ch;
}

/* ── BUTTONS / CHIPS ────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.4s;
  will-change: transform;
}
.btn .ico { width: 15px; height: 15px; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.18) 48%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { border-color: var(--ember); color: var(--paper); }
.btn--primary { background: var(--ember); color: #1a0c04; border-color: var(--ember); font-weight: 700; }
.btn--primary:hover { background: var(--ember-soft); color: #1a0c04; box-shadow: 0 0 50px rgba(240, 161, 109, 0.3); }
.btn--ghost { background: transparent; }
.btn--small { padding: 11px 15px; font-size: 8px; }
.btn:active { transform: translateY(1px) scale(0.995); }

.chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted);
  transition: all 0.25s var(--ease);
}
.chip:hover { border-color: var(--ember); color: var(--paper); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all 0.25s;
}
.icon-btn:hover { color: var(--paper); border-color: var(--ember); background: rgba(240, 161, 109, 0.08); }
.icon-btn .ico { width: 16px; height: 16px; }

/* ── 01 DOSSIER ─────────────────────────────────────────────── */
.dossier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.dossier__card {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(240, 161, 109, 0.045), transparent 45%),
    rgba(18, 10, 6, 0.5);
  padding: clamp(1.2rem, 2.4vw, 2.2rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
.dossier__card::before,
.dossier__card::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid rgba(240, 161, 109, 0.5);
}
.dossier__card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.dossier__card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.dossier__card-top,
.dossier__card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dossier__card-top { padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.dossier__stamp-mini {
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--blood);
  border: 1px solid rgba(226, 1, 1, 0.4);
  padding: 4px 7px;
  transform: rotate(-2deg);
}

.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 0.6rem;
}
.field {
  padding: 1.1rem 1rem 1.1rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.field--wide { grid-column: 1 / -1; }
.field dt {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.4rem;
}
.field dt span {
  display: block;
  color: rgba(109, 85, 70, 0.6);
  font-size: 7px;
  letter-spacing: 0.18em;
  margin-top: 1px;
}
.field dd {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1.3;
}
.field--wide dd { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; }

.dossier__card-bottom { padding-top: 1.1rem; align-items: flex-end; }
.barcode {
  width: 180px; height: 34px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 4px, var(--muted) 4px 5px, transparent 5px 9px, var(--muted) 9px 12px, transparent 12px 15px);
  opacity: 0.5;
  mask-image: linear-gradient(90deg, #000 60%, rgba(0, 0, 0, 0.2));
}
.dossier__card-bottom .mono-xs { text-align: right; color: var(--dim); font-size: 8px; }

.dossier__side { display: flex; flex-direction: column; gap: clamp(1.6rem, 3vw, 2.4rem); }

.stamp { width: 200px; align-self: center; color: var(--blood); opacity: 0.85; transform: rotate(-9deg); filter: drop-shadow(0 0 14px rgba(226, 1, 1, 0.15)); }
.stamp svg { width: 100%; height: 100%; }
.stamp__ring { fill: none; stroke: currentColor; stroke-width: 1.2; }
.stamp__ring--thin { stroke-width: 0.6; stroke-dasharray: 2 5; }
.stamp__text { fill: currentColor; font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.24em; }
.stamp__big { fill: currentColor; font-family: var(--font-display); font-size: 40px; font-weight: 700; text-anchor: middle; }
.stamp__small { fill: currentColor; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em; text-anchor: middle; }

.dossier__quote { border-left: 1px solid var(--rust); padding-left: 1.2rem; }
.dossier__quote p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--body);
  letter-spacing: -0.01em;
}
.dossier__quote cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.sig { color: var(--ember); display: flex; flex-direction: column; gap: 0.5rem; }
.sig svg { width: 190px; height: auto; opacity: 0.8; }
.sig .mono-xs { color: var(--dim); font-size: 8px; }

.dossier__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2.4rem, 5vw, 4rem);
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.fact {
  background: var(--ink);
  padding: clamp(1.2rem, 2.4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background 0.4s;
}
.fact:hover { background: rgba(240, 161, 109, 0.04); }
.fact__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.fact__label { font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }

/* ── 02 CORE ────────────────────────────────────────────────── */
.core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}

.ability {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line-soft);
  transition: padding 0.4s var(--ease), background 0.4s;
}
.ability:last-child { border-bottom: 1px solid var(--line-soft); }
.ability::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--ember);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.ability:hover { background: linear-gradient(90deg, rgba(240, 161, 109, 0.045), transparent 70%); padding-left: 0.9rem; }
.ability:hover::before { transform: scaleY(1); }

.ability__code { font-size: 9px; letter-spacing: 0.2em; color: var(--dim); }
.ability__name { font-family: var(--font-display); font-size: clamp(0.9rem, 1.4vw, 1.08rem); font-weight: 500; letter-spacing: -0.01em; }
.ability__score {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ability__mod {
  min-width: 42px;
  text-align: center;
  padding: 4px 6px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--body);
  font-variant-numeric: tabular-nums;
}
.ability--high .ability__mod { color: var(--ember); border-color: rgba(240, 161, 109, 0.45); background: rgba(240, 161, 109, 0.07); }
.ability--low .ability__score { color: var(--muted); }
.ability--low .ability__mod { color: var(--blood); border-color: rgba(226, 1, 1, 0.3); }

.ability__bar { grid-column: 2 / -1; height: 2px; background: rgba(243, 230, 216, 0.08); overflow: hidden; }
.ability__bar i {
  display: block;
  height: 100%;
  width: calc(var(--v) / 20 * 100%);
  background: linear-gradient(90deg, var(--rust), var(--ember));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease) 0.15s;
}
.is-in .ability__bar i { transform: scaleX(1); }
.ability--low .ability__bar i { background: linear-gradient(90deg, #5b1b12, var(--blood)); }

.ability__flavor {
  grid-column: 2 / -1;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), opacity 0.4s, margin 0.4s;
}
.ability:hover .ability__flavor,
.ability:focus-visible .ability__flavor { max-height: 50px; opacity: 1; margin-top: 0.4rem; }

.radar-wrap { display: flex; flex-direction: column; gap: 1.6rem; }
.radar { position: relative; padding: 0.5rem; }
.radar svg { width: 100%; height: auto; overflow: visible; }
.radar__grid polygon { fill: none; stroke: rgba(243, 230, 216, 0.09); stroke-width: 1; }
.radar__grid line { stroke: rgba(243, 230, 216, 0.06); stroke-width: 1; }
.radar__shape {
  fill: rgba(240, 161, 109, 0.1);
  stroke: var(--ember);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 12px rgba(240, 161, 109, 0.4));
  opacity: 0;
  transform-origin: 180px 180px;
  transform: scale(0.6);
  transition: opacity 0.8s var(--ease), transform 1s var(--ease);
}
.is-in .radar__shape { opacity: 1; transform: scale(1); }
.radar__dots circle { fill: var(--ink); stroke: var(--ember); stroke-width: 1.5; }
.radar__dots circle:nth-child(4) { stroke: var(--glass); fill: rgba(143, 227, 208, 0.18); }
.radar__labels text {
  fill: var(--dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}
.radar__values text {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
}
.radar__caption { text-align: center; color: var(--dim); font-size: 8px; }

.combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-soft);
}
.combat {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background 0.3s;
}
.combat:hover { background: rgba(240, 161, 109, 0.04); }
.combat:nth-child(2n) { border-right: 0; }
.combat:nth-child(n + 3) { border-bottom: 0; }
.combat__label { font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.combat__label em { font-style: normal; color: rgba(109, 85, 70, 0.55); }
.combat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.combat__value span { font-family: var(--font-mono); font-size: 8px; color: var(--muted); letter-spacing: 0.1em; }
.combat__sub { font-size: 8px; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; }

.hp-panel {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(240, 161, 109, 0.035), rgba(18, 10, 6, 0.5) 55%);
  padding: clamp(1.2rem, 2.6vw, 2.2rem);
  position: relative;
  overflow: hidden;
}
.hp-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 10% 0%, rgba(226, 1, 1, 0.09), transparent 60%);
  pointer-events: none;
}
.hp-panel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hp-panel__nums {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-top: 0.3rem;
}
.hp-panel__nums b { font-size: clamp(2.6rem, 5.5vw, 4.4rem); color: var(--paper); font-variant-numeric: tabular-nums; }
.hp-panel__nums span { font-size: clamp(1rem, 2vw, 1.5rem); color: var(--dim); font-weight: 300; }

.hp-panel__state { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.status-pill {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--glass);
  border: 1px solid rgba(143, 227, 208, 0.3);
  padding: 5px 9px;
  background: rgba(143, 227, 208, 0.05);
}
.status-pill.is-hurt { color: var(--ember); border-color: rgba(240, 161, 109, 0.4); background: rgba(240, 161, 109, 0.06); }
.status-pill.is-critical { color: #ff6b5e; border-color: rgba(226, 1, 1, 0.5); background: rgba(226, 1, 1, 0.08); animation: pulseDot 1.4s infinite; }
.status-pill.is-down { color: var(--blood); border-color: var(--blood); background: rgba(226, 1, 1, 0.12); }
.hp-panel__dice { font-size: 8px; letter-spacing: 0.16em; color: var(--dim); }

.hp-bar {
  position: relative;
  height: 26px;
  margin-top: 1.4rem;
  background: rgba(243, 230, 216, 0.06);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.hp-bar__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--rust), var(--ember) 70%, var(--ember-soft));
  box-shadow: 0 0 30px rgba(240, 161, 109, 0.35);
  transition: width 0.8s var(--ease), background 0.5s;
}
.hp-bar.is-low .hp-bar__fill { background: linear-gradient(90deg, #6d1408, var(--blood)); box-shadow: 0 0 30px rgba(226, 1, 1, 0.5); }
.hp-bar__ticks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 15 - 1px), rgba(11, 7, 5, 0.35) calc(100% / 15 - 1px) calc(100% / 15));
  mix-blend-mode: multiply;
}
.hp-bar__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px);
  opacity: 0.5;
}
.hp-panel.is-critical { animation: panelShake 0.4s 1; }
@keyframes panelShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.hp-panel__controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.hp-buttons { display: flex; gap: 6px; }
.hp-buttons .chip { min-width: 46px; padding: 9px 10px; font-size: 10px; letter-spacing: 0.08em; }
.hp-buttons .chip[data-hp^="-"]:hover { border-color: var(--blood); color: #ff8a7e; background: rgba(226, 1, 1, 0.06); }

.death {
  display: flex;
  gap: clamp(1.4rem, 3vw, 3rem);
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}
.death__col { display: flex; flex-direction: column; gap: 0.6rem; }
.death__label { font-size: 8px; letter-spacing: 0.18em; color: var(--dim); }
.death__label em { font-style: normal; color: rgba(109, 85, 70, 0.55); }
.death__pips { display: flex; gap: 8px; }
.death__pips button {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: all 0.25s var(--ease);
  position: relative;
}
.death__pips button::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--glass);
  transform: scale(0);
  transition: transform 0.25s var(--ease);
}
.death__pips button:hover { border-color: var(--ember); }
.death__pips button.is-on { border-color: var(--glass); box-shadow: 0 0 14px rgba(143, 227, 208, 0.3); }
.death__pips button.is-on::after { transform: scale(1); }
.death__pips--fail button::after { background: var(--blood); }
.death__pips--fail button.is-on { border-color: var(--blood); box-shadow: 0 0 14px rgba(226, 1, 1, 0.4); }

/* ── 03 SKILLS ──────────────────────────────────────────────── */
.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: start;
}

.skills-tools { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-bottom: 1.4rem; }
.search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  padding: 0 0.9rem;
  height: 42px;
  background: rgba(18, 10, 6, 0.5);
  transition: border-color 0.3s, background 0.3s;
}
.search:focus-within { border-color: var(--ember); background: rgba(240, 161, 109, 0.04); }
.search .ico { color: var(--dim); width: 16px; height: 16px; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper);
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: invert(0.6); }
.search__hint {
  font-size: 9px;
  color: var(--dim);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
}

.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filter {
  padding: 8px 9px;
  border: 1px solid transparent;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--dim);
  transition: all 0.25s;
}
.filter:hover { color: var(--paper); }
.filter.is-active { color: var(--ember); border-color: rgba(240, 161, 109, 0.35); background: rgba(240, 161, 109, 0.06); }

.skills-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 68px;
  gap: 0.6rem;
  padding: 0 0.8rem 0.6rem;
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.skills-head span:nth-child(2),
.skills-head span:nth-child(3) { text-align: center; }

.skill-list { position: relative; }
.skill {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 68px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 0.8rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  position: relative;
  transition: background 0.25s, padding 0.25s, opacity 0.3s;
}
.skill::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 0;
  background: var(--ember);
  transform: translateY(-50%);
  transition: height 0.25s var(--ease);
}
.skill:hover { background: rgba(240, 161, 109, 0.05); padding-left: 1.1rem; }
.skill:hover::before { height: 60%; }
.skill.is-hidden { display: none; }

.skill__name { display: flex; align-items: baseline; gap: 0.55rem; min-width: 0; }
.skill__prof {
  width: 6px; height: 6px;
  border: 1px solid var(--dim);
  border-radius: 50%;
  flex: none;
  transition: all 0.3s;
}
.skill.is-prof .skill__prof { background: var(--ember); border-color: var(--ember); box-shadow: 0 0 10px rgba(240, 161, 109, 0.7); }
.skill__ru { font-size: 12.5px; letter-spacing: 0.01em; color: var(--body); transition: color 0.25s; }
.skill:hover .skill__ru { color: var(--paper); }
.skill__en { font-size: 8px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill__ability {
  justify-self: center;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--dim);
  border: 1px solid var(--line-soft);
  padding: 2px 4px;
  min-width: 30px;
  text-align: center;
}
.skill.is-prof .skill__ability { color: var(--muted); }
.skill__bonus {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--body);
  font-variant-numeric: tabular-nums;
}
.skill.is-prof .skill__bonus { color: var(--ember); }
.skill__d20 {
  font-size: 8px;
  color: var(--dim);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.25s;
}
.skill:hover .skill__d20 { opacity: 1; transform: none; }

.skills-empty { padding: 2rem 0.8rem; color: var(--dim); font-size: 12px; }

.saves {
  margin-top: 1.6rem;
  border: 1px solid var(--line-soft);
  background: rgba(18, 10, 6, 0.4);
  padding: clamp(1rem, 2vw, 1.4rem);
}
.saves__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.saves__head h3,
.prof-list h3,
.equipment__head h3,
.features__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.saves__head h3 span,
.prof-list h3 span,
.equipment__head h3 span,
.features__title span { display: block; font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.2em; color: var(--dim); margin-top: 3px; }
.save-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
.save {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  transition: color 0.25s;
}
.save:hover .save__name { color: var(--paper); }
.save__dot { width: 5px; height: 5px; border: 1px solid var(--dim); border-radius: 50%; flex: none; }
.save.is-prof .save__dot { background: var(--ember); border-color: var(--ember); box-shadow: 0 0 8px rgba(240, 161, 109, 0.6); }
.save__name { flex: 1; font-size: 11px; color: var(--muted); transition: color 0.25s; }
.save__bonus { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.save.is-prof .save__bonus { color: var(--ember); }

.skills-side { display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 86px; }

.passive {
  position: relative;
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(143, 227, 208, 0.09), transparent 60%),
    rgba(18, 10, 6, 0.6);
  overflow: hidden;
}
.passive__eyebrow { font-size: 8px; letter-spacing: 0.2em; color: var(--muted); }
.passive__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 7vw, 6.4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--glass);
  text-shadow: 0 0 50px rgba(143, 227, 208, 0.25);
  margin: 0.4rem 0 0.6rem;
}
.passive p { font-size: 10.5px; line-height: 1.65; color: var(--muted); }

.prof-list {
  border: 1px solid var(--line-soft);
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: rgba(18, 10, 6, 0.4);
}
.prof-list h3 { margin-bottom: 1rem; }
.prof-group { padding: 0.55rem 0; border-top: 1px solid var(--line-soft); }
.prof-group__label { font-size: 7px; letter-spacing: 0.22em; color: var(--rust); }
.prof-group p { font-size: 10.5px; line-height: 1.6; color: var(--body); margin-top: 0.2rem; }

.featured-roll {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.2rem 1rem;
  text-align: left;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--ember);
  background: linear-gradient(120deg, rgba(240, 161, 109, 0.13), rgba(226, 1, 1, 0.04));
  overflow: hidden;
  transition: background 0.3s, box-shadow 0.3s;
}
.featured-roll:hover { background: linear-gradient(120deg, rgba(240, 161, 109, 0.2), rgba(226, 1, 1, 0.06)); box-shadow: 0 0 40px rgba(240, 161, 109, 0.12); }
.featured-roll__eyebrow { grid-column: 1 / -1; font-size: 7px; letter-spacing: 0.24em; color: var(--rust); }
.featured-roll__title { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.featured-roll__bonus { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ember); }
.featured-roll__hint { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 8px; letter-spacing: 0.15em; color: var(--muted); margin-top: 0.5rem; }
.featured-roll__hint .ico { width: 12px; height: 12px; color: var(--ember); }

/* ── 04 ARSENAL ─────────────────────────────────────────────── */
.weapons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.weapon {
  position: relative;
  background: rgba(18, 10, 6, 0.55);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
  transition: background 0.4s, transform 0.4s var(--ease);
  transform-style: preserve-3d;
  min-height: 220px;
}
.weapon:hover { background: rgba(240, 161, 109, 0.055); }
.weapon__glyph {
  position: absolute;
  right: -10px; bottom: -12px;
  width: 110px; height: 110px;
  stroke: rgba(240, 161, 109, 0.16);
  fill: none;
  transform: rotate(-8deg);
  transition: transform 0.6s var(--ease), stroke 0.4s;
}
.weapon:hover .weapon__glyph { transform: rotate(0deg) scale(1.05); stroke: rgba(240, 161, 109, 0.3); }
.weapon__type { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; }
.weapon__hand { font-size: 7px; letter-spacing: 0.18em; color: var(--dim); }
.weapon__dmg {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: auto;
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: -0.04em;
}
.weapon__dmg span { font-size: 16px; color: var(--muted); font-weight: 300; }
.weapon__dmg i { font-size: clamp(2.4rem, 4vw, 3.4rem); font-style: normal; font-weight: 700; color: var(--paper); }
.weapon__kind { font-size: 8px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.weapon__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line-soft); }
.weapon__atk { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ember); }
.weapon__atk em { font-family: var(--font-mono); font-style: normal; font-size: 7px; letter-spacing: 0.16em; color: var(--dim); }
.weapon .icon-btn { width: 28px; height: 28px; }

.sneak {
  position: relative;
  margin-top: 1.2rem;
  border: 1px solid rgba(226, 1, 1, 0.22);
  background:
    linear-gradient(100deg, rgba(226, 1, 1, 0.09), transparent 55%),
    rgba(18, 10, 6, 0.55);
  padding: clamp(1.3rem, 2.6vw, 2.2rem);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  overflow: hidden;
}
.sneak__deco {
  position: absolute;
  right: 12%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(226, 1, 1, 0.15);
  pointer-events: none;
}
.sneak__body { flex: 1; position: relative; z-index: 1; }
.sneak__eyebrow { font-size: 7px; letter-spacing: 0.24em; color: var(--blood); }
.sneak__title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.2rem 0 0.4rem; }
.sneak__text { max-width: 60ch; font-size: 11px; line-height: 1.7; color: var(--muted); }
.sneak__text em { color: var(--ember); font-style: italic; }
.sneak__actions { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1; }
.sneak__dice { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--blood); letter-spacing: -0.03em; }

.equipment {
  margin-top: 1.2rem;
  border: 1px solid var(--line-soft);
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  background: rgba(18, 10, 6, 0.35);
}
.equipment__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.coins { display: flex; gap: 6px; flex-wrap: wrap; }
.coin {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  font-size: 9px;
  color: var(--muted);
  min-width: 58px;
  justify-content: space-between;
}
.coin__c { font-size: 7px; letter-spacing: 0.14em; color: var(--dim); }
.coin b { font-weight: 500; color: var(--body); font-variant-numeric: tabular-nums; }
.coin--gp { border-color: rgba(240, 161, 109, 0.4); }
.coin--gp b { color: var(--ember); }

.items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.items li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  background: var(--ink);
  font-size: 10.5px;
  color: var(--body);
  transition: background 0.25s, color 0.25s;
  min-width: 0;
}
.items li:hover { background: rgba(240, 161, 109, 0.055); color: var(--paper); }
.items .ico { width: 15px; height: 15px; color: var(--dim); flex: none; }
.items li:hover .ico { color: var(--ember); }
.items li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items li em { font-style: normal; font-size: 7.5px; letter-spacing: 0.1em; color: var(--dim); margin-left: auto; white-space: nowrap; }
.items__note { grid-column: 1 / -1; justify-content: space-between; gap: 1rem; color: var(--dim); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; }
.items__note:hover { background: var(--ink); color: var(--dim); }

/* ── 05 ARCANE ──────────────────────────────────────────────── */
.arcane-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
}

.spell-meta { display: flex; flex-direction: column; gap: 1.6rem; position: sticky; top: 86px; }

.spell-circle { width: min(100%, 320px); margin: 0 auto; }
.spell-circle svg { width: 100%; height: auto; overflow: visible; }
.sc-ring { fill: none; stroke: rgba(143, 227, 208, 0.25); stroke-width: 1; }
.sc-ring--dash { stroke-dasharray: 2 8; animation: spinSlow 60s linear infinite; transform-origin: 150px 150px; }
.sc-rotate { transform-origin: 150px 150px; animation: spinSlow 40s linear infinite; }
.sc-tri { fill: none; stroke: rgba(240, 161, 109, 0.3); stroke-width: 1; }
.sc-tri--alt { stroke: rgba(143, 227, 208, 0.2); }
.sc-big { fill: var(--glass); font-family: var(--font-display); font-size: 44px; font-weight: 700; }
.sc-small { fill: var(--muted); font-family: var(--font-mono); font-size: 6.5px; letter-spacing: 0.24em; }

.spell-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-soft); }
.spell-stat { padding: 0.8rem 0.7rem; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; }
.spell-stat:last-child { border-right: 0; }
.spell-stat span { font-size: 6.5px; letter-spacing: 0.14em; color: var(--dim); }
.spell-stat b { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--paper); }

.slots { border: 1px solid var(--line); padding: 1.1rem; background: rgba(18, 10, 6, 0.45); }
.slots__head { display: flex; justify-content: space-between; margin-bottom: 0.8rem; }
.slots__head .mono-xs:last-child { color: var(--glass); }
.slots__pips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.slot-pip {
  position: relative;
  height: 78px;
  border: 1px dashed rgba(243, 230, 216, 0.18);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dim);
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.slot-pip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(143, 227, 208, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.slot-pip.is-full {
  border-style: solid;
  border-color: rgba(143, 227, 208, 0.5);
  color: var(--glass);
  background: rgba(143, 227, 208, 0.07);
  box-shadow: inset 0 0 30px rgba(143, 227, 208, 0.08), 0 0 20px rgba(143, 227, 208, 0.08);
}
.slot-pip.is-full::before { opacity: 1; }
.slot-pip:hover { border-color: var(--ember); color: var(--ember); }
.slot-pip span { position: relative; z-index: 1; }
.slots__hint { margin-top: 0.7rem; font-size: 8.5px; line-height: 1.6; color: var(--dim); }
.slots .btn { width: 100%; margin-top: 0.8rem; }

.spell-list { display: flex; flex-direction: column; gap: 2rem; }
.spell-group__label {
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--rust);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.2rem;
}
.spell-group__label span { color: var(--dim); margin-left: 0.5rem; }

.spell { border-bottom: 1px solid var(--line-soft); }
.spell__head {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0.4rem;
  text-align: left;
  transition: background 0.25s, padding 0.3s;
}
.spell__head:hover { background: rgba(240, 161, 109, 0.04); padding-left: 0.8rem; }
.spell__lvl {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--muted);
}
.spell[data-level="1"] .spell__lvl { border-color: rgba(143, 227, 208, 0.35); color: var(--glass); }
.spell__name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.spell__name em { font-style: normal; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
.spell__tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.spell__tags i { font-style: normal; font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-soft); padding: 3px 5px; white-space: nowrap; }
.spell__plus { position: relative; width: 14px; height: 14px; justify-self: end; }
.spell__plus::before,
.spell__plus::after { content: ""; position: absolute; background: var(--muted); transition: transform 0.35s var(--ease), background 0.3s; }
.spell__plus::before { left: 0; top: 6px; width: 14px; height: 1px; }
.spell__plus::after { top: 0; left: 6px; height: 14px; width: 1px; }
.spell.is-open .spell__plus::after { transform: rotate(90deg); }
.spell.is-open .spell__plus::before { background: var(--ember); }
.spell.is-open .spell__plus::after { background: var(--ember); }

.spell__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.spell__body > * { overflow: hidden; }
.spell__body p {
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
  padding: 0 0.4rem;
  max-width: 68ch;
}
.spell__body p b { color: var(--ember); font-weight: 500; }
.spell__body p em { color: var(--glass); font-style: italic; }
.spell__cast {
  margin: 0.9rem 0.4rem 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 8px 12px;
  border: 1px solid rgba(143, 227, 208, 0.35);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--glass);
  transition: all 0.25s;
}
.spell__cast span { font-size: 7px; letter-spacing: 0.1em; color: var(--dim); }
.spell__cast:hover { background: rgba(143, 227, 208, 0.08); border-color: var(--glass); box-shadow: 0 0 24px rgba(143, 227, 208, 0.1); }
.spell.is-open .spell__body { grid-template-rows: 1fr; }

.spell.is-casting { animation: castFlash 0.7s var(--ease); }
@keyframes castFlash {
  0% { background: rgba(143, 227, 208, 0.18); }
  100% { background: transparent; }
}

/* ── 06 RELICS ──────────────────────────────────────────────── */
.relic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
}

.eye-card {
  border: 1px solid var(--line);
  background: rgba(18, 10, 6, 0.5);
  padding: clamp(1rem, 2vw, 1.4rem);
  position: relative;
}
.eye-card__head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.8rem; }
.eye-card__signal { display: flex; align-items: center; gap: 6px; color: var(--glass); }
.eye-card__signal .dot { background: var(--glass); box-shadow: 0 0 10px var(--glass); }

.eye-stage {
  position: relative;
  border: 1px solid var(--line-soft);
  background: #070403;
  overflow: hidden;
  aspect-ratio: 720 / 460;
}
.eye-stage canvas { width: 100%; height: 100%; }
.eye-stage__scan {
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(143, 227, 208, 0.06), transparent);
  animation: eyeScan 5s linear infinite;
  pointer-events: none;
}
@keyframes eyeScan {
  0% { top: -30%; }
  100% { top: 100%; }
}
.eye-stage__corner {
  position: absolute;
  width: 16px; height: 16px;
  border-color: rgba(143, 227, 208, 0.55);
  border-style: solid;
  border-width: 0;
}
.eye-stage__corner--tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.eye-stage__corner--tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.eye-stage__corner--bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.eye-stage__corner--br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }
.eye-hint {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: rgba(143, 227, 208, 0.55);
  letter-spacing: 0.22em;
  pointer-events: none;
  transition: opacity 0.6s;
  white-space: nowrap;
}
.eye-card.is-touched .eye-hint { opacity: 0; }

.eye-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  padding-top: 1.1rem;
  flex-wrap: wrap;
}
.eye-card__foot h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 0.06em; }
.eye-card__foot p { font-size: 10.5px; line-height: 1.65; color: var(--muted); max-width: 46ch; margin-top: 0.35rem; }
.eye-card__specs { display: flex; flex-direction: column; gap: 0.35rem; font-size: 7px; letter-spacing: 0.18em; color: var(--dim); text-align: right; }
.eye-card__specs b { color: var(--muted); font-weight: 500; }

.relic-side { display: flex; flex-direction: column; gap: 1rem; }
.relic {
  position: relative;
  border: 1px solid var(--line-soft);
  background: rgba(18, 10, 6, 0.45);
  padding: 1.3rem;
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
  transform-style: preserve-3d;
}
.relic:hover { border-color: rgba(240, 161, 109, 0.35); background: rgba(240, 161, 109, 0.04); }
.relic__tag { font-size: 7px; letter-spacing: 0.2em; color: var(--rust); }
.relic h3 { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin: 0.35rem 0 0.5rem; }
.relic p { font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.relic p b { color: var(--ember); font-weight: 500; }
.relic__meta { display: block; margin-top: 0.8rem; font-size: 7px; letter-spacing: 0.18em; color: var(--dim); }
.relic--heal .relic__tag { color: var(--glass); }
.relic--heal:hover { border-color: rgba(143, 227, 208, 0.35); background: rgba(143, 227, 208, 0.035); }
.relic__use { margin-top: 0.9rem; width: 100%; }
.relic__use.is-used { opacity: 0.45; border-color: var(--line-soft); }

.ring-visual {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0.2rem auto 0.9rem;
  perspective: 600px;
}
.ring-visual__band {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #4d2614, #f0a16d 18%, #fff0e0 28%, #f0a16d 38%, #7a3a1e 58%, #c93216 76%, #f0a16d 92%, #4d2614 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  transform: rotateX(58deg) rotateZ(-10deg);
  box-shadow: 0 0 30px rgba(240, 161, 109, 0.25);
  animation: ringTurn 14s linear infinite;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
}
@keyframes ringTurn {
  from { transform: rotateX(58deg) rotateZ(0deg); }
  to { transform: rotateX(58deg) rotateZ(360deg); }
}
.ring-visual__orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(240, 161, 109, 0.18);
  border-radius: 50%;
  transform: rotateX(64deg);
}
.ring-visual__gem {
  position: absolute;
  left: 50%; top: 22%;
  width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: radial-gradient(circle at 35% 35%, #ffe8d2, var(--blood));
  box-shadow: 0 0 16px rgba(226, 1, 1, 0.8);
}
.ring-visual--heal .ring-visual__band {
  background: conic-gradient(from 210deg, #1e4f46, #8fe3d0 18%, #f2fffb 30%, #8fe3d0 40%, #2f7a6c 60%, #b7f5e7 78%, #8fe3d0 92%, #1e4f46 100%);
  box-shadow: 0 0 30px rgba(143, 227, 208, 0.25);
}
.ring-visual--heal .ring-visual__orbit { border-color: rgba(143, 227, 208, 0.2); }
.ring-visual--heal .ring-visual__gem { background: radial-gradient(circle at 35% 35%, #eafffa, var(--glass)); box-shadow: 0 0 16px rgba(143, 227, 208, 0.8); }

.trinkets { border: 1px solid var(--line-soft); padding: 1.1rem 1.3rem; background: rgba(18, 10, 6, 0.3); }
.trinkets__label { color: var(--rust); font-size: 7px; }
.trinkets ul { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.trinkets li { font-size: 9.5px; color: var(--dim); position: relative; padding-left: 10px; }
.trinkets li::before { content: "·"; position: absolute; left: 0; color: var(--rust); }

/* ── 07 PSYCHE ──────────────────────────────────────────────── */
.psyche-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}

.paper-wrap { position: sticky; top: 92px; }
.paper {
  position: relative;
  background:
    radial-gradient(ellipse at 85% 8%, rgba(120, 72, 30, 0.16), transparent 45%),
    radial-gradient(ellipse at 12% 88%, rgba(120, 72, 30, 0.13), transparent 50%),
    linear-gradient(160deg, #f0dfc8, #e2ccb1 55%, #dcc4a6);
  color: #241a12;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  transform: rotate(-1.1deg);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.paper::after {
  content: "";
  position: absolute;
  right: -20px; bottom: -20px;
  width: 90px; height: 90px;
  background: linear-gradient(135deg, transparent 50%, rgba(120, 72, 30, 0.15) 50%);
  transform: rotate(45deg);
}
.paper__stains {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 62%, rgba(112, 68, 28, 0.13) 0 4%, transparent 4.3%),
    radial-gradient(circle at 80% 64%, rgba(112, 68, 28, 0.07) 0 7%, transparent 7.3%),
    radial-gradient(circle at 14% 24%, rgba(112, 68, 28, 0.09) 0 3%, transparent 3.4%);
  pointer-events: none;
}
.paper__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: #6d5138;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(60, 40, 24, 0.25);
  position: relative;
  z-index: 1;
}
.paper__entry { padding: 1rem 0 0.9rem; border-bottom: 1px dashed rgba(60, 40, 24, 0.25); position: relative; z-index: 1; }
.paper__label { font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a5a33; }
.paper__entry .hand {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.2;
  color: #2b1c10;
  margin-top: 0.35rem;
  letter-spacing: 0.01em;
}
.paper__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-top: 1rem; position: relative; z-index: 1; }
.paper__foot .mono-xs { color: #7a5a3d; font-size: 7px; }
.wax { width: 64px; height: 64px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); transform: rotate(8deg); }
.wax__base { fill: #8d120c; }
.wax__ring { fill: none; stroke: rgba(255, 220, 200, 0.35); stroke-width: 1; }
.wax__mark { fill: rgba(255, 220, 200, 0.5); }
.paper-caption { margin-top: 1rem; text-align: center; color: var(--dim); font-size: 7px; }

.features__title { margin-bottom: 0.8rem; }
.feature { border-top: 1px solid var(--line-soft); transition: background 0.3s; }
.feature:last-child { border-bottom: 1px solid var(--line-soft); }
.feature[open] { background: rgba(240, 161, 109, 0.03); }
.feature summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 0.6rem;
  cursor: pointer;
  list-style: none;
  transition: padding 0.3s;
}
.feature summary::-webkit-details-marker { display: none; }
.feature summary:hover { padding-left: 1rem; background: rgba(240, 161, 109, 0.03); }
.feature__num { font-size: 8px; letter-spacing: 0.1em; color: var(--dim); }
.feature__name { font-family: var(--font-display); font-size: 12px; font-weight: 500; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.feature__name em { font-style: normal; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
.feature__badge { font-size: 6.5px; letter-spacing: 0.16em; color: var(--rust); border: 1px solid rgba(168, 79, 38, 0.35); padding: 3px 5px; }
.feature p { padding: 0 0.6rem 1rem 3.4rem; font-size: 10.5px; line-height: 1.7; color: var(--muted); max-width: 64ch; }

/* ── 08 END ─────────────────────────────────────────────────── */
.sec--end { text-align: center; padding-bottom: 3rem; }
.sec--end .sec-kicker { color: var(--dim); }
.end__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 11.5vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}
.end__title-alt {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ember);
  text-shadow: 0 0 60px rgba(240, 161, 109, 0.18);
}
.end__lead { max-width: 44ch; margin: 1.8rem auto 0; color: var(--body); font-size: 13px; line-height: 1.7; position: relative; z-index: 2; }
.end__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 2.2rem; position: relative; z-index: 2; }

.end__seal {
  width: min(300px, 60vw);
  margin: 3rem auto 0;
  opacity: 0.35;
  transform: rotate(-7deg);
  color: var(--ember);
}
.end__seal svg { width: 100%; height: auto; }
.seal__ring { fill: none; stroke: currentColor; stroke-width: 1.2; }
.seal__ring--thin { stroke-width: 0.6; stroke-dasharray: 2 6; }
.seal__big { fill: currentColor; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: 0.08em; text-anchor: middle; }
.seal__small { fill: currentColor; font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.24em; text-anchor: middle; }
.seal__line { stroke: currentColor; stroke-width: 0.6; opacity: 0.5; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  text-align: left;
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  position: relative;
  z-index: 2;
}
.footer__col { display: flex; flex-direction: column; gap: 4px; }
.footer__col--right { text-align: right; align-items: flex-end; }
.footer__brand { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }
.footer .mono-xs { color: var(--dim); font-size: 8px; }
.link-btn { font-size: 8px; letter-spacing: 0.16em; color: var(--muted); border-bottom: 1px solid var(--line); transition: color 0.25s, border-color 0.25s; }
.link-btn:hover { color: var(--ember); border-color: var(--ember); }

/* ── DIALOGS ────────────────────────────────────────────────── */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  max-width: none;
  max-height: none;
  overflow: visible;
}
dialog::backdrop {
  background: rgba(4, 2, 1, 0.72);
  backdrop-filter: blur(10px) saturate(0.8);
}
dialog[open] { animation: dialogIn 0.5s var(--ease); }
dialog[open]::backdrop { animation: backdropIn 0.5s var(--ease); }
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.dice-dialog { width: min(600px, 92vw); margin: auto; }
.dice-dialog__inner {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(168, 79, 38, 0.18), transparent 55%),
    #0b0705;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
}
.dice-dialog__inner::before,
.dice-dialog__inner::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--ember);
}
.dice-dialog__inner::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.dice-dialog__inner::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.dice-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dice-dialog__head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}
.icon-btn--close { width: 32px; height: 32px; }

.dice-stage {
  position: relative;
  margin-top: 0.8rem;
  border: 1px solid var(--line-soft);
  background: radial-gradient(ellipse at 50% 45%, rgba(240, 161, 109, 0.07), transparent 65%), #070403;
  overflow: hidden;
}
#dice-canvas { width: 100%; height: auto; aspect-ratio: 640 / 500; }
.dice-stage__target {
  position: absolute;
  top: 10px; left: 12px;
  font-size: 7px;
  letter-spacing: 0.2em;
  color: var(--dim);
  text-transform: uppercase;
  max-width: 60%;
}
.dice-stage__result {
  position: absolute;
  right: 14px; bottom: 10px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 0.9;
}
.dice-stage__nat {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.dice-stage__nat.is-crit { color: var(--ember-soft); text-shadow: 0 0 40px rgba(240, 161, 109, 0.6); }
.dice-stage__nat.is-fail { color: var(--blood); text-shadow: 0 0 40px rgba(226, 1, 1, 0.5); }
.dice-stage__total { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-top: 6px; }

.dice-breakdown {
  min-height: 44px;
  margin-top: 0.8rem;
  padding: 0.7rem 0.9rem;
  border-left: 1px solid var(--rust);
  background: rgba(240, 161, 109, 0.03);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.6;
}
.dice-breakdown b { color: var(--ember); font-weight: 500; }

.dice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.9rem; }
.dice-actions .btn { flex: 1 1 auto; }
.dice-log { margin-top: 1rem; border-top: 1px solid var(--line-soft); padding-top: 0.8rem; }
#dice-log-list { display: flex; flex-direction: column; gap: 2px; margin-top: 0.4rem; max-height: 84px; overflow-y: auto; }
#dice-log-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 9px; color: var(--dim); padding: 2px 0; border-bottom: 1px dotted rgba(243, 230, 216, 0.06); }
#dice-log-list li b { color: var(--muted); font-weight: 500; }
#dice-log-list li span { color: var(--ember); }

/* palette */
.palette { width: min(640px, 92vw); margin: 12vh auto auto; }
.palette__inner {
  border: 1px solid var(--line);
  background: #0b0705;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.palette__search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(240, 161, 109, 0.03);
}
.palette__search .ico { color: var(--ember); }
.palette__search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; letter-spacing: 0.03em; color: var(--paper); min-width: 0; }
.palette__search input::placeholder { color: var(--dim); }
.palette__search kbd { font-size: 8px; color: var(--dim); border: 1px solid var(--line); padding: 3px 5px; font-family: var(--font-mono); }
.palette h4 { padding: 0.9rem 1.2rem 0.5rem; font-size: 8px; color: var(--rust); }
.palette__list { max-height: 45vh; overflow-y: auto; padding-bottom: 0.4rem; }
.palette__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.62rem 1.2rem;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.palette__item .palette__kind { font-size: 7px; letter-spacing: 0.16em; color: var(--dim); border: 1px solid var(--line-soft); padding: 2px 4px; margin-left: auto; white-space: nowrap; }
.palette__item.is-sel, .palette__item:hover { background: rgba(240, 161, 109, 0.08); color: var(--paper); border-left-color: var(--ember); }
.palette__item.is-sel .palette__kind { color: var(--rust); }
.palette__hint { padding: 0.7rem 1.2rem; border-top: 1px solid var(--line-soft); font-size: 7px; color: var(--dim); }
.palette__empty { padding: 2rem 1.2rem; font-size: 11px; color: var(--dim); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(240, 161, 109, 0.4);
  background: rgba(11, 7, 5, 0.92);
  backdrop-filter: blur(10px);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  transform: translate(-50%, 160%);
  transition: transform 0.5s var(--ease);
  pointer-events: none;
  max-width: 90vw;
  white-space: nowrap;
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); flex: none; }
.toast.is-glass { border-color: rgba(143, 227, 208, 0.4); }
.toast.is-glass .toast__dot { background: var(--glass); box-shadow: 0 0 10px var(--glass); }
.toast.is-blood { border-color: rgba(226, 1, 1, 0.45); }
.toast.is-blood .toast__dot { background: var(--blood); box-shadow: 0 0 10px var(--blood); }

.noscript {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  padding: 10px;
  text-align: center;
  background: var(--rust);
  color: #160a04;
  font-size: 11px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .rail { display: none; }
  .hud__status { display: none; }
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
}

@media (max-width: 1080px) {
  .sec-head { grid-template-columns: 64px minmax(0, 1fr); }
  .sec-note { grid-column: 2; max-width: 52ch; margin-top: 0.4rem; }
  .dossier { grid-template-columns: 1fr; }
  .dossier__side { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.4rem; }
  .stamp { width: 160px; }
  .dossier__side .sig { grid-column: 1 / -1; }
  .core-grid { grid-template-columns: 1fr; }
  .radar-wrap { flex-direction: row; align-items: center; }
  .radar { flex: 1; max-width: 420px; }
  .combat-grid { flex: 1; }
  .skills-layout { grid-template-columns: 1fr; }
  .skills-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .featured-roll { grid-column: 1 / -1; }
  .arcane-grid { grid-template-columns: 1fr; }
  .spell-meta { position: static; display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 1.2rem; align-items: center; }
  .spell-circle { grid-row: span 2; }
  .relic-grid { grid-template-columns: 1fr; }
  .relic-side { display: grid; grid-template-columns: 1fr 1fr; }
  .trinkets { grid-column: 1 / -1; }
  .psyche-grid { grid-template-columns: 1fr; }
  .paper-wrap { position: static; max-width: 620px; }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
    min-height: auto;
  }
  .hero__art { width: min(78vw, 440px); margin: 2rem auto 0; order: 2; }
  .hero__ghost { font-size: 52vw; top: 22%; right: -14%; opacity: 0.7; }
  .hero__scroll { display: none; }
  .hero__title { font-size: clamp(2.9rem, 13.5vw, 5.4rem); }
  .dossier__facts { grid-template-columns: 1fr 1fr; }
  .weapons { grid-template-columns: 1fr 1fr; }
  .items { grid-template-columns: 1fr 1fr; }
  .sneak { flex-direction: column; align-items: flex-start; }
  .sneak__actions { width: 100%; justify-content: space-between; }
  .spell-meta { grid-template-columns: 1fr; }
  .spell-circle { grid-row: auto; max-width: 260px; }
  .relic-side { grid-template-columns: 1fr; }
  .skills-side { grid-template-columns: 1fr; }
  .radar-wrap { flex-direction: column; }
  .hud__id em { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .hud { height: 56px; gap: 0.6rem; }
  .hud__id b { font-size: 10px; }
  .hud-btn { height: 30px; padding: 0 9px; }
  .hud-btn__txt { display: none; }
  .hud-btn--accent .hud-btn__txt { display: inline; }
  .hud-btn__key { display: none; }
  .sec-head { grid-template-columns: 1fr; gap: 0.6rem; }
  .sec-index { padding-top: 0; }
  .sec-note { grid-column: 1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 0.8rem; }
  .dossier__side { grid-template-columns: 1fr; justify-items: start; }
  .stamp { width: 140px; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .barcode { width: 120px; }
  .dossier__card-bottom { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .hero__stats { gap: 1.2rem; }
  .hero__stats div:nth-child(5) { display: none; }
  .weapons { grid-template-columns: 1fr; }
  .items { grid-template-columns: 1fr; }
  .save-list { grid-template-columns: 1fr; }
  .skill { grid-template-columns: minmax(0, 1fr) 38px 56px; padding-inline: 0.5rem; }
  .skill__en { display: none; }
  .skills-head { grid-template-columns: minmax(0, 1fr) 38px 56px; padding-inline: 0.5rem; }
  .end__actions .btn { width: 100%; }
  .eyebrow { font-size: 8px; }
  .spell__head { grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 0.6rem; }
  .spell__tags { display: none; }
  .dice-stage__result { right: 10px; bottom: 8px; }
  .dice-dialog__inner { padding: 0.9rem; }
  .dice-actions .btn { flex: 1 1 45%; }
  .paper { transform: rotate(-0.6deg); }
  .feature p { padding-left: 0.6rem; }
  .feature__badge { display: none; }
  .footer { flex-direction: column; }
  .footer__col--right { text-align: left; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero__stats div:nth-child(4) { display: none; }
  .dossier__facts { grid-template-columns: 1fr; }
}

/* ── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .boot { display: none; }
  .ticker__track { animation: none; }
  .cursor { display: none !important; }
  html.has-cursor { cursor: auto; }
}

/* ── PRINT ──────────────────────────────────────────────────── */
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #111 !important; }
  .bg-canvas, .grain, .scanlines, .vignette, .cursor, .boot, .hud, .rail, .ticker,
  .hero__art, .hero__ghost, .hero__scroll, .dice-dialog, .palette, .toast, .end__seal,
  .featured-roll, .hp-panel__controls, .spell__cast, .relic__use, #replay-boot, .link-btn { display: none !important; }
  .sec, .hero { padding: 12mm 0 !important; border-color: #ccc !important; page-break-inside: avoid; }
  .hero { min-height: auto; display: block; }
  .hero__title { font-size: 40pt; color: #111 !important; -webkit-text-fill-color: #111; background: none; }
  .hero__line--ember { color: #111 !important; background: none; -webkit-text-fill-color: #111; }
  .hero__lead, .sec-note, p, .ability__flavor, .skill__ru, .field dd, .paper__entry .hand { color: #222 !important; }
  .sec-title, .field dd, .combat__value, .weapon__dmg i, .passive__num, .fact__num { color: #111 !important; }
  .paper { box-shadow: none !important; transform: none !important; background: #f7f0e4 !important; }
  .paper__entry .hand { font-size: 18pt; }
  .sec-head { margin-bottom: 8mm; }
  .sec-title { font-size: 26pt; }
  .sec-index span:first-child { color: #9a4a1f !important; }
  .weapon, .items li, .skill, .spell, .feature { break-inside: avoid; border-color: #ddd !important; background: #fff !important; }
  .spell__body { grid-template-rows: 1fr !important; }
  .feature:not([open]) p { display: block; }
  .end__title-alt { -webkit-text-stroke: 1px #111; }
  .relic, .eye-card, .paper, .dossier__card, .hp-panel, .equipment, .saves, .prof-list { border-color: #ccc !important; background: #fff !important; }
  #eye-canvas { display: none; }
  .eye-stage::after { content: "[ интерактивный глаз доступен в веб-версии ]"; display: grid; place-items: center; aspect-ratio: 2/1; font-size: 9pt; color: #777; }
}

/* ═══════════════════════════════════════════════════════════════
   PASS 2 · REFINEMENTS
   ═══════════════════════════════════════════════════════════════ */
html { scroll-padding-top: 80px; }
section[id] { scroll-margin-top: 76px; }

@media (min-width: 1360px) {
  .sec, .hero { padding-right: calc(var(--gutter) + 92px); }
}
@media (max-width: 1359px) {
  .rail { display: none; }
}

body.no-gl {
  background:
    radial-gradient(ellipse at 75% 20%, rgba(168, 79, 38, 0.18), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(226, 1, 1, 0.07), transparent 50%),
    var(--ink);
}
body.no-gl .bg-canvas { display: none; }

.radar { max-width: 440px; margin-inline: auto; width: 100%; }
.radar__values { display: none; }

.spell__body {
  display: block;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: max-height 0.55s var(--ease), opacity 0.4s, visibility 0.55s;
}
.spell.is-open .spell__body {
  max-height: 600px;
  opacity: 1;
  visibility: visible;
}
.spell__body p { padding-top: 0.15rem; }

.weapon__dmg { align-items: flex-start; }
.weapon__dmg span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ember);
  margin-top: 0.5rem;
  letter-spacing: 0;
}
.weapon__dmg i { line-height: 0.95; }

.toast {
  white-space: normal;
  text-align: center;
  line-height: 1.5;
  max-width: min(92vw, 540px);
}

.saves, .prof-list { background: rgba(14, 8, 5, 0.62); }
.weapon { background: rgba(14, 8, 5, 0.72); }
.equipment { background: rgba(14, 8, 5, 0.55); }
.slots { background: rgba(14, 8, 5, 0.62); }
.eye-card { background: rgba(14, 8, 5, 0.7); }
.relic { background: rgba(14, 8, 5, 0.62); }
.trinkets { background: rgba(14, 8, 5, 0.5); }
.dossier__card {
  background:
    linear-gradient(135deg, rgba(240, 161, 109, 0.05), transparent 45%),
    rgba(16, 9, 5, 0.62);
}

.items li { font-size: 11px; }
.coin { font-size: 10px; min-width: 62px; }
.prof-group p { font-size: 11px; color: var(--body); }
.relic p { font-size: 11px; }
.eye-card__foot p { font-size: 11px; }

.skill__ru { font-size: 13px; }
.skill__en { font-size: 8.5px; }
.sec-note { color: var(--muted); }

@media (max-width: 860px) {
  .hero__title { font-size: clamp(2.7rem, 12.6vw, 4.6rem); }
  .lens { width: clamp(170px, 46vw, 240px); }
  .hero__tag { display: none; }
}

/* hidden attribute must always win over component display rules */
[hidden] { display: none !important; }

.dice-stage__result {
  padding: 6px 14px 8px 26px;
  background: radial-gradient(ellipse at 100% 100%, rgba(7, 4, 3, 0.9), rgba(7, 4, 3, 0.55) 55%, transparent 78%);
}
.dice-stage__nat { font-size: clamp(2.2rem, 5.5vw, 3.5rem); }

.lens__iris::before { opacity: 0.5; }
.lens__pupil { width: 42%; }
.lens__glint { width: 26%; height: 15%; }

/* ── PASS 3 · TOUCH, TYPE & CONTRAST ────────────────────────── */
.hud-btn__ico { display: none; }
.field dt { color: var(--muted); }
.field dt span { color: rgba(130, 104, 90, 0.8); }
.skill__en { color: var(--dim); }
.spell-group__label { color: #b5693c; }
.spell-group__label span { color: var(--muted); }
.dossier__card-bottom .mono-xs { color: var(--muted); }
.dc-note { color: var(--muted); }

@media (max-width: 620px) {
  .hud-btn__ico { display: block; width: 16px; height: 16px; }
  .hud-btn__key { display: none; }
  .hero__stats div:nth-child(5) { display: flex; }
  .hero__stats { gap: 1rem 1.4rem; }
  .hero__stats dd { font-size: 1.15rem; }
  .spell-circle { max-width: 230px; }
  .weapon__glyph { width: 80px; height: 80px; }
}
@media (max-width: 400px) {
  .hero__stats div:nth-child(4) { display: flex; }
}

@media (max-width: 860px) {
  .hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 6.2rem;
    padding-bottom: 3rem;
  }
  .hero__content { display: contents; }
  .hero__eyebrow { order: 1; }
  .hero__title { order: 2; }
  .hero__art {
    order: 3;
    width: min(64vw, 290px);
    margin: 1.2rem auto 0.2rem;
  }
  .hero__meta { order: 4; }
  .hero__lead { order: 5; }
  .hero__cta { order: 6; }
  .hero__stats { order: 7; }
  .hero__scroll { order: 8; }
  .hero__lead { margin-top: 1.2rem; }
  .hero__cta { margin-top: 1.4rem; }
}

/* ── PASS 4 · OVERFLOW & FINAL POLISH ───────────────────────── */
html, body { overflow-x: clip; }
.hero { overflow-x: clip; }
.ticker { contain: paint; }

.vignette {
  background:
    radial-gradient(ellipse at 50% 42%, transparent 64%, rgba(5, 3, 2, 0.24) 100%),
    linear-gradient(to bottom, rgba(5, 3, 2, 0.28), transparent 10%, transparent 94%, rgba(5, 3, 2, 0.36));
}

@media (max-width: 620px) {
  .hero__meta { font-size: 9px; letter-spacing: 0.14em; gap: 0.55rem; }
  .hud { padding-inline: 0.9rem; }
  .hud__actions { gap: 6px; }
  .hud-btn--accent { padding: 0 8px; }
  .dice-dialog { width: min(600px, calc(100vw - 20px)); }
  .dice-dialog__inner { padding: 0.8rem; }
}

@media (max-width: 620px) {
  .palette__search { padding: 0.85rem 0.9rem; }
  .palette__search kbd { display: none; }
  .palette__search input { font-size: 12px; }
  .palette { margin-top: 8vh; }
}

.sec-index { white-space: nowrap; }
.sec-index span { flex: none; }

/* ── PASS 5 · RHYTHM ────────────────────────────────────────── */
.sec { padding-block: clamp(4.2rem, 8vw, 7.5rem); }
.sec--end { padding-bottom: 3rem; }

/* ── PASS 6 · PRINT DOSSIER ─────────────────────────────────── */
@media print {
  @page { margin: 12mm; }
  * { box-shadow: none !important; text-shadow: none !important; }
  html, body { background: #fff !important; color: #111 !important; font-size: 9pt; }
  .bg-canvas, .grain, .scanlines, .vignette, .cursor, .boot, .hud, .rail, .ticker,
  .hero__art, .hero__ghost, .hero__scroll, .end__seal, .footer .link-btn,
  .hp-panel__controls, .spell__cast, .relic__use, .featured-roll,
  .dice-dialog, .palette, .toast, .hero__cta, .dossier__side, .skills-side,
  .weapon__glyph, .eye-stage, .sneak__actions, .spell__plus, .btn { display: none !important; }

  .sec, .hero { padding: 6mm 0 !important; border-color: #ddd !important; min-height: 0 !important; }
  .hero { display: block !important; }
  .hero__title { font-size: 34pt !important; line-height: 1.02 !important; color: #111 !important; -webkit-text-fill-color: #111 !important; background: none !important; }
  .hero__line--ember { color: #111 !important; background: none !important; -webkit-text-fill-color: #111 !important; }
  .hero__meta { margin-top: 3mm !important; }
  .hero__meta, .hero__lead, .sec-note, p, .ability__flavor, .skill__ru,
  .field dd, .paper__entry .hand, .feature p, .spell__body p, .relic p,
  .eye-card__foot p, .items li, .save__name, .combat__sub, .weapon__kind { color: #222 !important; }
  .sec-title { font-size: 22pt !important; line-height: 1 !important; color: #111 !important; }
  .sec-index span:first-child { color: #9a4a1f !important; }
  .sec-index { color: #777 !important; }
  .sec-head { grid-template-columns: 16mm 1fr !important; gap: 4mm !important; margin-bottom: 5mm !important; }
  .sec-note { grid-column: 2 !important; border: 0 !important; padding: 0 !important; }
  .sec-kicker { color: #9a4a1f !important; }

  .dossier, .core-grid, .skills-layout, .arcane-grid, .relic-grid, .psyche-grid { display: block !important; }
  .dossier__card { background: #fff !important; }
  .fields { grid-template-columns: repeat(3, 1fr) !important; }
  .field { padding: 2mm 2mm 2mm 0 !important; border-color: #ddd !important; }
  .field dt { color: #777 !important; }
  .field dd { font-size: 10pt !important; }
  .dossier__facts { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; margin-top: 4mm !important; background: #fff !important; border-color: #ddd !important; }
  .fact { padding: 2mm !important; background: #fff !important; }
  .fact__num { font-size: 20pt !important; color: #111 !important; }
  .fact__label { color: #777 !important; }

  .ability { padding: 2mm 0 !important; border-color: #ddd !important; }
  .ability__score, .ability__name { color: #111 !important; }
  .ability__code, .ability__mod { color: #555 !important; border-color: #ccc !important; }
  .ability__bar { display: none !important; }
  .ability__flavor { display: none !important; }
  .radar-wrap { margin-top: 3mm !important; }
  .radar { max-width: 70mm !important; margin: 0 auto !important; }
  .combat-grid { margin-top: 3mm !important; border-color: #ddd !important; }
  .combat { border-color: #ddd !important; padding: 2mm !important; }
  .combat__value { font-size: 16pt !important; color: #111 !important; }

  .hp-panel, .saves, .slots, .spell, .equipment, .relic, .eye-card, .paper, .features { background: #fff !important; border-color: #ddd !important; }
  .hp-panel { margin-top: 4mm !important; padding: 3mm !important; }
  .hp-panel__nums b { font-size: 22pt !important; color: #111 !important; }
  .hp-bar { height: 4mm !important; background: #eee !important; }
  .hp-bar__fill { background: #b4602f !important; }
  .death { margin-top: 3mm !important; border-color: #ddd !important; }
  .death__pips button { border-color: #999 !important; }

  .skills-head, .skill { grid-template-columns: 1fr 12mm 16mm !important; padding: 1.2mm 0 !important; border-color: #ddd !important; }
  .skill-list { columns: 2; column-gap: 8mm; }
  .skill { break-inside: avoid; background: #fff !important; }
  .skill__bonus, .skill.is-prof .skill__ru { color: #111 !important; }
  .skills-empty, .skills-tools { display: none !important; }
  .save-list { grid-template-columns: 1fr 1fr !important; }
  .save { border-color: #ddd !important; }

  .weapons { grid-template-columns: repeat(4, 1fr) !important; background: #fff !important; }
  .weapon { background: #fff !important; border-color: #ddd !important; min-height: 0 !important; padding: 2.5mm !important; }
  .weapon__dmg i { font-size: 20pt !important; color: #111 !important; }
  .weapon__atk { color: #9a4a1f !important; }
  .sneak { background: #fff !important; border-color: #ddd !important; margin-top: 3mm !important; padding: 3mm !important; }
  .sneak__deco { display: none !important; }
  .sneak__dice { color: #9a1a12 !important; }
  .items { grid-template-columns: repeat(3, 1fr) !important; background: #fff !important; }
  .items li { background: #fff !important; border-color: #ddd !important; padding: 1.2mm !important; }
  .coin { border-color: #ccc !important; color: #333 !important; }
  .coin b { color: #111 !important; }

  .spell-meta { margin-bottom: 3mm !important; display: block !important; }
  .spell-circle { display: none !important; }
  .spell-stats { display: flex !important; gap: 6mm; border-color: #ddd !important; }
  .spell-stat { border: 0 !important; padding: 0 !important; }
  .slots { border: 0 !important; padding: 0 !important; margin-top: 2mm !important; }
  .slots__pips { display: flex !important; gap: 2mm; }
  .slot-pip { width: 18mm !important; height: 10mm !important; border-color: #999 !important; color: #111 !important; background: #fff !important; }
  .slots__hint { display: none !important; }
  .spell { border-color: #ddd !important; break-inside: avoid; }
  .spell__body { display: block !important; max-height: none !important; opacity: 1 !important; visibility: visible !important; }
  .spell__head { padding: 1.5mm 0 !important; }
  .spell__tags i { border-color: #ccc !important; color: #555 !important; }
  .spell__name em, .spell__lvl { color: #777 !important; }

  .eye-card { border: 0 !important; padding: 0 !important; }
  .eye-card__head { display: none !important; }
  .eye-card__foot { padding-top: 0 !important; }
  .eye-card__specs { display: none !important; }
  .relic-side { display: block !important; }
  .relic { margin-bottom: 3mm !important; padding: 3mm !important; }
  .ring-visual { display: none !important; }
  .trinkets { margin-top: 3mm !important; border-color: #ddd !important; }

  .paper { transform: none !important; padding: 4mm !important; box-shadow: none !important; }
  .paper__stains, .paper::before, .paper::after { display: none !important; }
  .paper__entry .hand { font-size: 13pt !important; color: #111 !important; }
  .paper__foot .wax { display: none !important; }
  .features { margin-top: 4mm !important; padding: 0 !important; }
  .feature { border-color: #ddd !important; break-inside: avoid; }
  .feature summary { padding: 1.5mm 0 !important; }
  .feature p { padding: 0 0 2mm 0 !important; font-size: 8pt !important; }
  .feature__badge { border-color: #ccc !important; color: #555 !important; }

  .end__title { font-size: 30pt !important; color: #111 !important; }
  .end__title-alt { color: #111 !important; -webkit-text-stroke: 0 !important; }
  .end__lead { margin-top: 3mm !important; }
  .footer { margin-top: 6mm !important; border-top: 1px solid #ccc !important; padding-top: 3mm !important; }
  .footer .mono-xs { color: #777 !important; }
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #111 !important; text-decoration: none !important; }
  .spell__body, .feature p { orphans: 2; widows: 2; }
}

@media print {
  .skip-link { display: none !important; }
  .hero__lead { max-width: none !important; font-size: 10pt !important; }
  .hero__lead em { color: #8a3f16 !important; }
  .hero__stats { gap: 8mm !important; }
  .hero__stats dd { font-size: 13pt !important; }
  .hero__title { letter-spacing: -0.04em !important; }
}

.hero__scroll { bottom: 2.1rem; color: var(--muted); }
.hero__scroll-line { width: 46px; }
.btn--primary { box-shadow: 0 0 30px rgba(240, 161, 109, 0.12); }

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 600;
  padding: 10px 14px;
  background: var(--paper);
  color: #160a04;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

/* ═══════════════════════════════════════════════════════════════
   SCENE HERO · scroll-driven 3D dice chamber
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 2;
  height: 320svh;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  overflow: visible;
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #070403;
  isolation: isolate;
}

.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  opacity: 0;
  background: #070403;
  transition: opacity 1.4s var(--ease);
}
.hero.is-scene-ready .scene-canvas { opacity: 1; }

.hero__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 68% 44%, rgba(240, 161, 109, 0.11), transparent 55%),
    radial-gradient(ellipse at 20% 20%, rgba(168, 79, 38, 0.08), transparent 50%),
    #070403;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.hero__fallback .hero__art {
  width: min(48vw, 600px);
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}
.hero.is-scene-ready .hero__fallback { opacity: 0; visibility: hidden; }
.hero.no-scene { height: 100svh; }
.hero.no-scene .hero__stage { position: relative; }
.hero.no-scene .hero__fallback { opacity: 1; visibility: visible; }

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 3, 2, 0.95) 0%, rgba(5, 3, 2, 0.82) 22%, rgba(5, 3, 2, 0.38) 46%, rgba(5, 3, 2, 0) 64%),
    linear-gradient(to top, rgba(5, 3, 2, 0.94) 0%, rgba(5, 3, 2, 0.5) 16%, transparent 38%),
    linear-gradient(to bottom, rgba(5, 3, 2, 0.72) 0%, transparent 16%);
  transition: opacity 0.8s;
}

.hero__content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: none;
  padding: clamp(6.4rem, 11vh, 8.4rem) var(--gutter) clamp(1.2rem, 2.6vh, 2rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__eyebrow { margin-bottom: clamp(1rem, 2.4vh, 1.8rem); }
.hero__title { font-size: clamp(2.9rem, 7.6vw, 6.8rem); }
.hero__meta { margin-top: clamp(1rem, 2.2vh, 1.6rem); }

.hero__bottom {
  margin-top: auto;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__scene-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scene-label-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ember);
}
.hero__scene-label-name { color: var(--text); letter-spacing: 0.22em; }
.hero__scene-label-line {
  flex: 1;
  max-width: 110px;
  height: 1px;
  background: rgba(243, 230, 216, 0.16);
  position: relative;
  overflow: hidden;
}
.hero__scene-label-line i {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--rust), var(--ember), var(--glass));
  box-shadow: 0 0 10px var(--ember);
}
.hero__scene-label-pct {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  font-size: 8px;
}

.hero__lead {
  margin-top: 0;
  max-width: 500px;
  color: var(--body);
}
.hero__cta { margin-top: 1.2rem; }
.hero__stats {
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.scene-hud {
  position: absolute;
  z-index: 4;
  top: clamp(6.4rem, 11vh, 8.4rem);
  right: calc(var(--gutter) + 88px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: right;
}
.scene-hud__live { display: flex; align-items: center; gap: 7px; color: var(--glass); }
.scene-hud__live i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--glass);
  box-shadow: 0 0 10px var(--glass);
  animation: pulseDot 2.2s ease-in-out infinite;
}
.scene-hud__dice { color: var(--ember); letter-spacing: 0.24em; }
.scene-hud__note { color: var(--dim); font-size: 7px; }

.hero__scroll {
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 4;
}
.hero__skip {
  position: absolute;
  z-index: 4;
  right: calc(var(--gutter) + 88px);
  bottom: 1.55rem;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.25s, border-color 0.25s;
}
.hero__skip:hover { color: var(--ember); border-color: var(--ember); }

@media (max-width: 1359px) {
  .scene-hud, .hero__skip { right: var(--gutter); }
}

@media (max-width: 860px) {
  .hero {
    display: block;
    height: 280svh;
    padding: 0;
    min-height: 0;
  }
  .hero__stage { height: 100svh; }
  .hero__content {
    padding: 5.2rem 1.15rem 1.15rem;
  }
  .hero__title { font-size: clamp(2.7rem, 12.4vw, 4.4rem); }
  .hero__eyebrow { margin-bottom: 0.8rem; }
  .hero__bottom { width: 100%; }
  .hero__lead { max-width: 100%; font-size: 0.83rem; line-height: 1.6; }
  .hero__cta { width: 100%; gap: 8px; margin-top: 1rem; }
  .hero__cta .btn { flex: 1 1 auto; padding: 13px 10px; font-size: 8px; letter-spacing: 0.14em; }
  .hero__stats { display: none; }
  .hero__scene-label { margin-bottom: 0.55rem; }
  .hero__scene-label-line { max-width: 70px; }
  .hero__shade {
    background:
      linear-gradient(to bottom, rgba(5, 3, 2, 0.95) 0%, rgba(5, 3, 2, 0.72) 27%, transparent 48%, transparent 64%, rgba(5, 3, 2, 0.93) 100%);
  }
  .scene-hud, .hero__skip, .hero__scroll { display: none; }
  .hero__fallback .hero__art { width: min(78vw, 380px); }
}

@media (max-width: 620px) {
  .hero { height: 260svh; }
  .hero__content { padding-top: 4.9rem; }
  .hero__meta { font-size: 9px; letter-spacing: 0.14em; gap: 0.55rem; }
  .hero__lead .hero__lead-em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: 100svh; }
  .hero__stage { position: relative; }
}

.hero__lead, .hero__stats { opacity: var(--intro, 1); }

html:not(.js) .hero { height: 100svh; }

@media (max-width: 860px) {
  .hero__content {
    display: flex !important;
    flex-direction: column !important;
  }
  .hero__eyebrow,
  .hero__title,
  .hero__meta,
  .hero__bottom { order: 0 !important; }
  .hero__bottom { margin-top: auto; }
}

@media (max-width: 860px) {
  .hero__lead {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.55;
  }
  .hero__cta { margin-top: 0.8rem; }
  .hero .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
