/* Silent Suns — «Опись гаснущего неба». Токены и шрифты — DESIGN-BRIEF.md §6. */
@font-face { font-family: 'Old Standard TT'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/old-standard-tt-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Old Standard TT'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/old-standard-tt-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Old Standard TT'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/old-standard-tt-cyrillic-400-italic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Old Standard TT'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/old-standard-tt-latin-400-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Old Standard TT'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/old-standard-tt-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Old Standard TT'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/old-standard-tt-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/alegreya-sans-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/alegreya-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/alegreya-sans-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/alegreya-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/alegreya-sans-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/alegreya-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/jetbrains-mono-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #07080c;
  --hull: #10131a;
  --hull-2: #171b25;
  --paper: #ede6d8;
  --dim: #a39d90;
  --ember: #ff8a4c;
  --ember-deep: #c9561f;
  --frost: #93c9ea;
  --alert: #ff6b6b;
  --line: rgba(237, 230, 216, 0.14);
  --line-2: rgba(237, 230, 216, 0.26);
  --serif: 'Old Standard TT', 'Times New Roman', serif;
  --sans: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --gut: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--paper); font: 400 17px/1.55 var(--sans); font-kerning: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--frost); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ico { width: 20px; height: 20px; flex: none; }
kbd { font: 500 12px/1 var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--dim); background: rgba(0, 0, 0, 0.25); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--night); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--paper); font: 500 16px/1.1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--paper); color: var(--paper); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--ember { background: var(--ember); border-color: var(--ember); color: #1a0d05; }
.btn--ember:hover { background: #ffa06c; border-color: #ffa06c; color: #1a0d05; }
.btn--ghost { border-color: transparent; color: var(--dim); }
.btn--xl { min-height: 60px; padding: 16px 38px; font-size: 21px; }
.btn--small { min-height: 36px; padding: 6px 14px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn kbd { margin-left: 2px; }
.btn--ember kbd { color: #3a1d0b; border-color: rgba(26, 13, 5, 0.35); background: transparent; }
.link-btn { background: none; border: 0; padding: 0; color: var(--frost); font: inherit; text-decoration: underline; cursor: pointer; }

/* шапка сайта */
.site-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; padding: 14px var(--gut); background: rgba(7, 8, 12, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.page-home .site-head { position: absolute; left: 0; right: 0; background: linear-gradient(rgba(7, 8, 12, 0.7), rgba(7, 8, 12, 0)); border-bottom: 0; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
.brand__word { font: 400 22px/1 var(--serif); letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--paper); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; font-size: 16px; }
.site-nav a:hover { border-bottom-color: var(--line-2); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ember); }
.site-head__act { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.head-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--dim); font: 500 15px var(--sans); cursor: pointer; padding: 8px 4px; min-height: 44px; }
.head-link:hover { color: var(--paper); }
.head-link .ico { width: 18px; height: 18px; }
.menu-btn { display: none; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--paper); font: 500 15px var(--sans); }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(7, 8, 12, 0.98); padding: 20px var(--gut) 40px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.sheet__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet a, .sheet button.sheet__link { display: block; padding: 14px 0; min-height: 48px; font: 400 28px/1.2 var(--serif); color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.sheet .btn { margin-top: 18px; }

/* первый экран: живая сцена */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #020305; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(rgba(7, 8, 12, 0), rgba(7, 8, 12, 0.72) 70%, var(--night)); pointer-events: none; }
.hero__copy { position: absolute; left: var(--gut); bottom: clamp(36px, 8vh, 84px); z-index: 2; max-width: 640px; }
.wordmark { font: 400 clamp(56px, 9vw, 128px)/0.92 var(--serif); margin: 0 0 14px; letter-spacing: -0.02em; }
.wordmark i { font-style: italic; color: var(--ember); }
.hero__sub { font-size: clamp(19px, 1.8vw, 24px); color: var(--paper); margin: 0 0 26px; max-width: 30ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__note { margin: 16px 0 0; color: var(--dim); font-size: 15px; }
.hero__facts { position: absolute; right: var(--gut); bottom: clamp(36px, 8vh, 84px); z-index: 2; margin: 0; display: grid; gap: 14px; width: min(320px, 30vw); padding-left: 18px; border-left: 1px solid var(--line-2); }
.hero__facts dt { color: var(--dim); font-size: 14px; }
.hero__facts dd { margin: 2px 0 0; font-size: 18px; }
.hero__facts dd .serif { font: italic 400 22px var(--serif); }
.hero__fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--gut); text-align: center; color: var(--dim); background: radial-gradient(circle at 70% 40%, #2a1a12, #07080c 60%); }
.game-root { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.game-root > * { pointer-events: auto; }

/* полёт на главной: сцена на весь экран, сайт уходит */
body.is-flying { overflow: hidden; }
body.is-flying .hero { position: fixed; inset: 0; height: 100%; z-index: 40; }
body.is-flying .hero::after, body.is-flying .hero__copy, body.is-flying .hero__facts, body.is-flying .site-head { display: none; }

/* секции главной */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding: clamp(56px, 9vw, 112px) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec__lead { color: var(--dim); max-width: 62ch; font-size: 18px; }

.atlas-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.atlas-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.ledger li { display: grid; grid-template-columns: 92px minmax(0, 1.4fr) minmax(0, 1fr) 110px; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ledger__time { color: var(--dim); font-size: 14px; }
.ledger__name { font: italic 400 24px/1.15 var(--serif); color: var(--paper); overflow-wrap: anywhere; }
.ledger__code { display: block; font: 400 13px var(--mono); color: var(--dim); font-style: normal; margin-top: 3px; }
.ledger__who { font-size: 16px; overflow-wrap: anywhere; }
.ledger__who small { display: block; color: var(--dim); font-size: 14px; }
.ledger__empty { color: var(--dim); padding: 18px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--paper); white-space: nowrap; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--frost); }
.chip[data-status="dying"]::before { background: var(--ember); }
.chip[data-status="dead"] { color: var(--dim); }
.chip[data-status="dead"]::before { background: transparent; border: 1px solid var(--dim); }

.ranks h3 { font-size: 26px; }
.ranks ol { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: r; }
.ranks li { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ranks li::before { counter-increment: r; content: counter(r); font: 400 26px/1 var(--serif); color: var(--dim); }
.ranks li:first-child::before { color: var(--ember); }
.ranks b { font-weight: 500; overflow-wrap: anywhere; }
.ranks .mono { color: var(--dim); }
.ranks__note { color: var(--dim); font-size: 14px; }

.front { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.front-map { width: 100%; aspect-ratio: 1; display: block; }
.front-copy p { font-size: 18px; max-width: 56ch; }
.front-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 28px 0 0; }
.front-numbers dt { color: var(--dim); font-size: 14px; }
.front-numbers dd { margin: 4px 0 0; font: 400 34px/1.05 var(--serif); }
.front-numbers dd small { font: 400 15px var(--sans); color: var(--dim); }

.shots { display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: auto auto; gap: 14px; margin-top: 28px; }
.shot { margin: 0; position: relative; }
.shot:first-child { grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; background: var(--hull); }
.shot figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px 0; font-size: 15px; color: var(--dim); flex-wrap: wrap; }
.shot figcaption i { font-family: var(--serif); color: var(--paper); font-size: 18px; }
.shot a { color: var(--paper); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.shot a:hover { color: var(--ember); }

.wing-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.wing-block .wing-code-demo { max-width: none; font-family: var(--mono); font-weight: 500; font-size: clamp(56px, 10vw, 136px); line-height: 1; letter-spacing: 0.06em; color: var(--paper); margin: 0; }
.wing-block .wing-code-demo span { color: var(--ember); }
.wing-block p { max-width: 58ch; font-size: 18px; }
.steps-inline { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--dim); padding: 0; margin: 0 0 22px; list-style: none; font-size: 16px; }
.steps-inline li::before { content: counter(s) ' '; counter-increment: s; font-family: var(--mono); color: var(--ember); }
.steps-inline { counter-reset: s; }

.news { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.news time { font: 400 14px var(--mono); color: var(--dim); }
.news h3 { font-size: 28px; }
.news ul { margin: 0 0 14px; padding-left: 20px; color: var(--paper); }
.news li { margin-bottom: 6px; }

/* подвал */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--dim); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot-grid h2 { font: 500 15px var(--sans); color: var(--paper); margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--dim); text-decoration: none; }
.foot-grid a:hover, .foot-grid button:hover { color: var(--paper); }
.foot-grid button { background: none; border: 0; padding: 0; color: var(--dim); font: inherit; cursor: pointer; }
.foot-note { margin-top: 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* внутренние страницы */
.page-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(20px, 3vw, 36px); }
.page-hero h1 { font-size: clamp(40px, 6vw, 76px); margin-bottom: 14px; }
.page-hero p { color: var(--dim); font-size: 19px; max-width: 64ch; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 32px; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }
.toc { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 80px; }
.legal-grid nav { position: sticky; top: 90px; }
.legal-grid nav ol { padding-left: 18px; color: var(--dim); }
.legal-grid nav a { color: var(--dim); text-decoration: none; }

/* Атлас */
.atlas-tools { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.seg button { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: var(--dim); font: 500 15px var(--sans); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--night); }
.search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-2); min-width: min(320px, 100%); }
.search input { background: none; border: 0; color: var(--paper); font: 400 17px var(--sans); padding: 10px 0; width: 100%; min-height: 44px; }
.search input:focus { outline: none; }
.search:focus-within { border-bottom-color: var(--ember); }
.atlas-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 64px); padding-bottom: 80px; align-items: start; }
.ledger--page li { cursor: pointer; }
.ledger--page li:hover .ledger__name, .ledger--page li.is-open .ledger__name { color: var(--ember); }
.ledger__btn { all: unset; display: contents; cursor: pointer; }
.orrery { border-top: 1px solid var(--line-2); padding-top: 18px; position: sticky; top: 90px; }
.orrery canvas { width: 100%; aspect-ratio: 1; display: block; }
.orrery h2 { font-style: italic; font-size: 34px; margin-bottom: 4px; }
.orrery dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: 15px; }
.orrery dt { color: var(--dim); }
.orrery dd { margin: 0; }
.planet-list { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.planet-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.planet-list span:last-child { color: var(--dim); }
.more { margin-top: 18px; }

/* Как играть */
.loop { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 28px 0 8px; border-top: 1px solid var(--line-2); }
.loop li { list-style: none; padding: 16px 16px 0 0; position: relative; }
.loop li b { display: block; font: 400 24px var(--serif); margin-bottom: 6px; }
.loop li span { color: var(--dim); font-size: 16px; }
.loop li::before { content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--frost); }
.loop li:nth-child(5)::before { background: var(--ember); }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; margin: 18px 0; padding: 0; list-style: none; }
.keys li { display: flex; gap: 14px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 8px 0; }
.keys kbd { font-size: 14px; padding: 4px 8px; color: var(--paper); min-width: 34px; text-align: center; }
.keys .kk { display: inline-flex; gap: 4px; min-width: 120px; }
.statuses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 18px 0; }
.statuses div { border-top: 2px solid var(--frost); padding-top: 12px; }
.statuses div:nth-child(2) { border-top-color: var(--ember); }
.statuses div:nth-child(3) { border-top-color: var(--dim); }
.faq dt { font: 400 22px var(--serif); margin-top: 22px; }
.faq dd { margin: 6px 0 0; color: var(--paper); max-width: 70ch; }
.touch-figure { margin: 18px 0; max-width: 460px; }

/* Обои */
.walls { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; padding-bottom: 80px; }
.wall { margin: 0; grid-column: span 6; }
.wall--tall { grid-column: span 3; }
.wall--wide { grid-column: span 12; }
.wall img { width: 100%; border-radius: 3px; background: var(--hull); }
.wall figcaption { padding: 10px 0 0; display: grid; gap: 4px; }
.wall figcaption i { font: italic 400 22px var(--serif); }
.wall figcaption span { color: var(--dim); font-size: 15px; }
.wall .dl { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.wall .dl a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--paper); text-decoration: none; }
.wall .dl a:hover { color: var(--ember); }

/* журнал версий */
.versions { list-style: none; margin: 0; padding: 0 0 80px; }
.versions > li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line-2); }
.versions h2 { font-size: 34px; }
.versions .tag-plan { display: inline-block; font-size: 14px; color: var(--ember); border: 1px solid var(--ember); border-radius: 999px; padding: 1px 10px; margin-left: 8px; vertical-align: middle; font-family: var(--sans); }

/* 404 */
.lost { min-height: 78vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.lost__disc { width: min(420px, 80vw); aspect-ratio: 1; border-radius: 50%; margin: 0 auto; background: radial-gradient(circle at 62% 38%, #1a0f0c 0 46%, transparent 47%), radial-gradient(circle, rgba(255, 110, 50, 0.22) 0 47%, rgba(255, 110, 50, 0.06) 52%, transparent 66%); box-shadow: inset -30px -20px 60px rgba(0, 0, 0, 0.7); }
.lost h1 { font-size: clamp(44px, 6vw, 80px); }
.lost__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* диалоги */
.dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--hull); color: var(--paper); }
.dlg::backdrop { background: rgba(2, 3, 5, 0.72); }
.dlg__body { position: relative; padding: 28px 28px 24px; margin: 0; }
.dlg__body h2 { font-size: 30px; padding-right: 40px; }
.dlg__body p { color: var(--paper); }
.dlg__x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.dlg__x:hover { color: var(--paper); }
.dlg__row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.dlg__msg { border-left: 3px solid var(--ember); padding: 10px 14px; background: rgba(255, 138, 76, 0.08); margin: 14px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin: 0 0 18px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--dim); font: 500 16px var(--sans); padding: 10px 14px; min-height: 44px; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--paper); border-bottom-color: var(--ember); }
.field { display: grid; gap: 6px; margin: 14px 0; font-size: 15px; color: var(--dim); }
.field input, .field select { background: var(--hull-2); border: 1px solid var(--line-2); border-radius: 4px; color: var(--paper); font: 400 17px var(--sans); padding: 10px 12px; min-height: 44px; }
.field input:focus, .field select:focus { border-color: var(--ember); outline: none; }
.field input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--ember); }
.field-err { color: var(--alert); min-height: 1.2em; margin: 0; font-size: 15px; }
.field-note { color: var(--dim); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 16px; }
.check input { width: 20px; height: 20px; accent-color: var(--ember); }

/* ---------------------------------------------------------------- игра */
.page-play { overflow: hidden; height: 100svh; background: #000; }
.play-stage { position: fixed; inset: 0; }
.play-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.play-intro { position: fixed; inset: 0; display: grid; place-items: center; z-index: 5; background: #000; transition: opacity .8s ease; pointer-events: none; }
.play-intro.is-gone { opacity: 0; }
.play-intro p { font: italic 400 28px var(--serif); color: var(--dim); }

.hud { position: absolute; inset: 0; pointer-events: none; font-size: 15px; color: var(--paper); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.hud button, .hud a, .hud input, .hud .touch > * { pointer-events: auto; }
.hud.is-hidden > :not(.hud-toasts) { visibility: hidden; }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 20px; padding: 18px 22px; }
.hud-sys__name { font: italic 400 34px/1.05 var(--serif); margin: 0 0 4px; }
.hud-sys__meta { margin: 0; color: var(--dim); font-size: 14px; }
.hud-sys__meta .mono { font-size: 13px; }
.hud-sys__status { margin: 6px 0 0; display: inline-flex; gap: 8px; align-items: center; }
.hud-sys__status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--frost); }
.hud-sys__status[data-status="dying"] { color: #ffc29e; }
.hud-sys__status[data-status="dying"]::before { background: var(--ember); }
.hud-sys__status[data-status="dead"] { color: var(--dim); }
.hud-sys__status[data-status="dead"]::before { background: none; border: 1px solid var(--dim); }
.hud-sys__atlas { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.hud-net { display: flex; align-items: flex-start; gap: 10px; }
.hud-online { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--dim); }
.hud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.hud-dot[data-state="online"] { background: #7fd39b; }
.hud-dot[data-state="connecting"] { background: var(--ember); }
.hud-chip, .hud-icon { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(7, 8, 12, 0.55); color: var(--paper); font: 500 15px var(--sans); cursor: pointer; }
.hud-icon { width: 44px; padding: 0; justify-content: center; }
.hud-chip.is-on { border-color: var(--ember); color: #ffd2b8; }
.hud-chip:hover, .hud-icon:hover { border-color: var(--paper); }
.hud-targets { position: absolute; right: 22px; top: 96px; display: flex; flex-direction: column; gap: 4px; width: 250px; }
.tgt { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: rgba(7, 8, 12, 0.42); color: var(--paper); font: 400 15px var(--sans); text-align: left; cursor: pointer; }
.tgt:hover { border-color: var(--line-2); }
.tgt.is-on { border-color: var(--ember); }
.tgt .ico { width: 18px; height: 18px; color: var(--dim); }
.tgt__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgt__s { color: var(--dim); font-size: 12px; }
.hud-pilots { position: absolute; left: 22px; top: 170px; width: 230px; }
.hud-pilots__title { margin: 0 0 4px; color: var(--dim); font-size: 13px; }
.hud-pilots ul { list-style: none; margin: 0; padding: 0; }
.hud-pilots li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.hud-pilots li small { color: var(--dim); }
.hud-pilots li.is-wing span { color: #ffd2b8; }
.hud-center { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; width: min(560px, 90vw); text-align: center; }
.hud-prompt { font-size: 16px; min-height: 1.4em; }
.hud-prompt kbd { color: var(--paper); }
.hud-scan { display: inline-flex; gap: 10px; align-items: center; color: var(--dim); font-size: 14px; }
.hud-scan__bar { width: 140px; height: 3px; background: var(--line-2); position: relative; }
.hud-scan__bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v, 0) * 100%); background: var(--frost); }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 18px 22px; }
.hud-gauges { display: flex; gap: 26px; align-items: flex-end; }
.hud-gauge { display: grid; line-height: 1; }
.hud-gauge b { font-size: 30px; font-weight: 400; }
.hud-gauge small { color: var(--dim); font-size: 13px; margin-top: 4px; }
.hud-light { display: flex; gap: 12px; align-items: flex-end; }
.hud-light__ring { width: 6px; height: 54px; background: var(--line); position: relative; border-radius: 3px; overflow: hidden; }
.hud-light__ring i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v, 0) * 100%); background: linear-gradient(var(--ember), #ffd19a); }
.hud-light__ring.is-charging i { background: linear-gradient(#ffd19a, #fff4dc); }
.hud-speed { display: flex; gap: 12px; align-items: flex-end; }
.hud-throttle { width: 6px; height: 54px; background: var(--line); position: relative; border-radius: 3px; overflow: hidden; order: -1; }
.hud-throttle i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v, 0) * 100%); background: var(--paper); }
.hud-actions { display: flex; gap: 6px; }
.hud-actions button { display: grid; justify-items: center; gap: 3px; min-width: 76px; min-height: 64px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(7, 8, 12, 0.5); color: var(--paper); font: 500 14px var(--sans); cursor: pointer; }
.hud-actions button:hover { border-color: var(--line-2); }
.hud-actions button:disabled { opacity: 0.4; cursor: default; }
.hud-actions button kbd { font-size: 10px; padding: 1px 4px; }
.hud-actions button.is-ready { border-color: var(--ember); background: rgba(255, 138, 76, 0.16); }
.hud-toasts { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, 92vw); justify-items: center; }
.toast { pointer-events: auto; background: rgba(10, 12, 18, 0.86); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 16px; font-size: 15px; text-align: center; text-shadow: none; transition: opacity .4s, transform .4s; }
.toast--ok { border-color: rgba(147, 201, 234, 0.6); }
.toast--warn { border-color: rgba(255, 138, 76, 0.7); }
.toast.is-out { opacity: 0; transform: translateY(-6px); }
.toast b { font-weight: 500; }
.hud-tags { position: absolute; inset: 0; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; display: grid; justify-items: start; gap: 2px; margin: -26px 0 0 -4px; font: 500 13px var(--mono); color: var(--paper); white-space: nowrap; }
.tag::before { content: ''; position: absolute; left: 0; top: 18px; width: 1px; height: 10px; background: var(--line-2); }
.tag.is-wing .tag__cs { color: #ffd2b8; }
.tag.is-far { opacity: 0.6; }
.tag__sig { display: none; font: 400 14px var(--sans); background: rgba(10, 12, 18, 0.85); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px 10px; margin-top: -42px; }
.tag.has-sig .tag__sig { display: block; }

.touch { display: none; }
.hud.is-touch .touch { display: block; }
.touch-stick { position: absolute; left: 0; bottom: 150px; width: 50%; height: 40%; touch-action: none; }
.touch-stick__base { position: absolute; left: 70px; bottom: 120px; width: 120px; height: 120px; margin: -60px; border: 1px solid var(--line-2); border-radius: 50%; }
.touch-stick__knob { position: absolute; left: 70px; bottom: 120px; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(237, 230, 216, 0.22); border: 1px solid var(--paper); }
.touch-throttle { position: absolute; right: 22px; bottom: 150px; width: 56px; height: 170px; border: 1px solid var(--line-2); border-radius: 28px; touch-action: none; overflow: hidden; background: rgba(7, 8, 12, 0.4); }
.touch-throttle__fill { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v, 0) * 100%); background: rgba(237, 230, 216, 0.25); }
.touch-throttle__label { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; color: var(--dim); }
.touch-boost { position: absolute; right: 90px; bottom: 150px; min-width: 64px; min-height: 48px; border-radius: 24px; border: 1px solid var(--line-2); background: rgba(7, 8, 12, 0.5); color: var(--paper); font: 500 14px var(--sans); touch-action: none; }

.overlay { position: absolute; inset: 0; z-index: 5; }
.map-ui { pointer-events: none; }
.map-labels { position: absolute; inset: 0; overflow: hidden; }
.map-label { position: absolute; left: 0; top: 0; font: italic 400 15px var(--serif); color: var(--dim); white-space: nowrap; }
.map-label.is-sel { color: var(--paper); font-size: 18px; }
.map-label.is-dead { opacity: 0.55; }
.map-panel { pointer-events: auto; position: absolute; right: 18px; top: 18px; bottom: 18px; width: 360px; overflow-y: auto; padding: 22px; background: rgba(10, 12, 18, 0.86); border: 1px solid var(--line-2); border-radius: 8px; }
.map-panel__head { display: flex; justify-content: space-between; align-items: center; }
.map-panel h2 { font-size: 28px; margin: 0; }
.map-hint { color: var(--dim); font-size: 14px; margin: 8px 0 14px; }
.map-sel { border-top: 1px solid var(--line-2); padding: 14px 0; }
.map-sel__name { font: italic 400 30px/1.1 var(--serif); margin: 0 0 4px; }
.map-sel__meta, .map-sel__atlas, .map-sel__pilots { color: var(--dim); font-size: 14px; margin: 0 0 6px; }
.map-sel__status { margin: 0 0 6px; }
.map-sel__status[data-status="dying"] { color: #ffc29e; }
.map-sel__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.map-sel__why { color: #ffc29e; font-size: 14px; margin: 0; min-height: 1.2em; }
.map-list__title { font: 500 14px var(--sans); color: var(--dim); margin: 12px 0 6px; }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-pick { display: grid; width: 100%; text-align: left; gap: 2px; min-height: 48px; padding: 6px 10px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--paper); cursor: pointer; }
.map-pick:hover { border-color: var(--line-2); }
.map-pick.is-sel { border-color: var(--ember); }
.map-pick__name { font: italic 400 19px var(--serif); }
.map-pick__meta { font-size: 12px; color: var(--dim); }
.map-pick.st-dead .map-pick__name { color: var(--dim); }
.map-pick.st-dying .map-pick__name { color: #ffc29e; }
.hud.is-map > :not(.hud-toasts):not(.hud-top) { display: none; }
.hud.is-map .hud-targets { display: none; }

.photo-ui { pointer-events: none; }
.photo-panel { pointer-events: auto; position: absolute; left: 18px; top: 18px; width: 300px; max-height: calc(100% - 36px); overflow-y: auto; padding: 18px 20px; background: rgba(10, 12, 18, 0.82); border: 1px solid var(--line-2); border-radius: 8px; display: grid; gap: 10px; }
.photo-panel.is-hidden, .photo-panel.is-capturing { visibility: hidden; }
.photo-panel header { display: flex; justify-content: space-between; align-items: center; }
.photo-panel h2 { font-size: 24px; margin: 0; }
.photo-panel label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; color: var(--dim); }
.photo-panel label input[type="range"] { grid-column: span 2; accent-color: var(--ember); min-height: 28px; }
.photo-panel output { color: var(--paper); font: 400 13px var(--mono); }
.photo-filters { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.photo-filters legend { color: var(--dim); font-size: 14px; margin-bottom: 4px; }
.photo-filters label { display: flex; gap: 6px; align-items: center; color: var(--paper); min-height: 32px; }
.photo-filters input { accent-color: var(--ember); }
.photo-panel .check { grid-template-columns: none; color: var(--paper); }
.photo-hint { color: var(--dim); font-size: 13px; margin: 0; }
.hud.is-photo > :not(.hud-toasts) { display: none; }

.menu-ui { display: grid; place-items: center; background: rgba(2, 3, 5, 0.6); }
.game-menu { display: grid; gap: 2px; width: min(340px, 88vw); }
.game-menu__title { font: italic 400 40px var(--serif); margin: 0 0 12px; }
.game-menu button, .game-menu a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--paper); font: 400 22px var(--serif); text-align: left; text-decoration: none; cursor: pointer; }
.game-menu button:hover, .game-menu a:hover { color: var(--ember); }
.signals-ui { display: grid; place-items: end center; padding-bottom: 150px; pointer-events: none; }
.signals { pointer-events: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: min(720px, 94vw); padding: 10px; background: rgba(10, 12, 18, 0.88); border: 1px solid var(--line-2); border-radius: 10px; }
.signals button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--paper); font: 500 15px var(--sans); cursor: pointer; text-align: left; }
.signals button:hover { border-color: var(--ember); }
.wing-code { display: flex; align-items: baseline; gap: 14px; margin: 6px 0 4px; }
.wing-code span { color: var(--dim); }
.wing-code b { font-size: 46px; letter-spacing: 0.08em; font-weight: 500; color: var(--ember); }
.wing-link { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.wing-members { list-style: none; margin: 10px 0 14px; padding: 0; }
.wing-members li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wing-members li span { color: var(--dim); font-size: 14px; }
.wing-members li .btn { grid-column: span 2; justify-self: start; }

/* ---------------------------------------------------------------- адаптив */
@media (max-width: 1100px) {
  .site-nav { gap: 16px; }
  .atlas-grid, .atlas-page { grid-template-columns: minmax(0, 1fr); }
  .orrery { position: static; }
}
@media (max-width: 920px) {
  .site-nav, .head-link { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .hero__facts { left: var(--gut); right: auto; top: 86px; bottom: auto; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; border: 0; gap: 10px 18px; }
  .hero__facts > div:nth-child(n+3) { display: none; }
  .front, .wing-block, .news, .lost, .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-grid nav { position: static; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot:first-child { grid-row: auto; }
  .loop { grid-template-columns: minmax(0, 1fr); }
  .loop li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line); }
  .loop li::before { top: 22px; }
  .keys, .statuses { grid-template-columns: minmax(0, 1fr); }
  .wall, .wall--tall { grid-column: span 12; }
  .versions > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-head { gap: 12px; padding: 10px 16px; }
  .brand__word { font-size: 19px; }
  .site-head__act .btn--small { padding: 6px 12px; }
  .hero__copy { right: 16px; bottom: 28px; }
  .wordmark { font-size: 58px; }
  .hero__sub { font-size: 19px; margin-bottom: 18px; }
  .btn--xl { min-height: 54px; padding: 12px 28px; font-size: 19px; }
  .ledger li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ledger__time { grid-column: 1 / -1; order: -1; }
  .ledger__who { grid-column: 1; }
  .ledger li .chip { grid-row: 2; grid-column: 2; }
  .front-numbers dd { font-size: 28px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .hud-top { padding: 12px 14px; flex-wrap: wrap; }
  .hud-sys__name { font-size: 26px; }
  .hud-sys__meta, .hud-sys__atlas { display: none; }
  .hud-online { font-size: 13px; padding: 0; }
  .hud-net { position: absolute; top: 12px; right: 12px; flex-direction: column; align-items: flex-end; gap: 6px; }
  .hud-net .hud-chip span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hud-targets { top: 112px; left: 12px; right: 12px; width: auto; flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .tgt { flex: none; min-height: 40px; padding: 4px 10px; font-size: 13px; grid-template-columns: 16px auto; }
  .tgt__s { display: none; }
  .hud-pilots { display: none; }
  .hud-center { bottom: 150px; }
  .hud-bottom { padding: 10px 10px 12px; flex-direction: column; align-items: stretch; gap: 10px; }
  .hud-gauges { gap: 16px; padding-left: 4px; }
  .hud-gauge b { font-size: 22px; }
  .hud-light__ring, .hud-throttle { height: 40px; }
  .hud-actions { justify-content: space-between; }
  .hud-actions button { min-width: 0; flex: 1; min-height: 56px; padding: 6px 2px; font-size: 12px; }
  .hud-actions button kbd { display: none; }
  .hud-toasts { top: 168px; }
  .toast { font-size: 14px; padding: 8px 12px; }
  .hud-center .hud-prompt { font-size: 14px; }
  .touch-throttle { bottom: 170px; right: 12px; height: 140px; width: 52px; }
  .touch-boost { bottom: 170px; right: 74px; }
  .touch-stick__base, .touch-stick__knob { left: 84px; bottom: 84px; }
  .map-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 52%; padding: 16px; }
  .photo-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 48%; }
  .signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wing-code b { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
