/* ==========================================================================
   Earth Simulator — «Атлас Земли и звёзд»
   Ночное поле, пергамент текста, латунь — только как акцент.
   Фоны разделов — размытые кадры из игры.
   ========================================================================== */

:root {
  --sky: #050A12;
  --night: #0A1320;
  --night-2: #0F1B2C;
  --night-3: #15243A;
  --brass: #C9A35B;
  --brass-hi: #E5C98D;
  --parch: #E8DFC9;
  --parch-2: #BDB6A6;
  --mute: #8F9AAD;
  --hair: rgba(232, 223, 201, .13);
  --verd: #7CC0AC;
  --map-ink: #1D252C;
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sc: "Alegreya SC", "Alegreya", Georgia, serif;
  --label: "Alegreya Sans SC", "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(18px, 4vw, 48px);
  --maxw: 1200px;
  color-scheme: dark;
}

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--night); color: var(--parch);
  font: 400 1.25rem/1.6 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--brass-hi); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--parch); }
::selection { background: rgba(201, 163, 91, .38); color: var(--parch); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
[id] { scroll-margin-top: 64px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.label { font-family: var(--label); font-weight: 500; letter-spacing: .1em; text-transform: lowercase; }
.mono { font-family: var(--mono); font-size: .85em; }
.ext { font-family: var(--mono); font-size: .85em; margin-left: .3em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brass); color: var(--night); padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 8px; color: var(--night); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: baseline; gap: .1em;
  padding: .62em 1.15em .56em; border: 0;
  background: var(--brass); color: var(--night);
  font: 700 1.02rem/1.1 var(--label); letter-spacing: .08em; text-transform: lowercase;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--brass-hi); color: var(--night); }
.btn--solid { background: var(--brass); }
.btn--ghost { background: transparent; color: var(--parch); padding-left: .2em; padding-right: .2em; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: .3em; }
.btn--ghost:hover { background: transparent; color: var(--brass-hi); text-decoration-color: var(--brass); }

/* ==========================================================================
   Колонтитул
   ========================================================================== */
.runhead { position: sticky; top: 0; z-index: 40; background: rgba(10, 19, 32, .94); border-bottom: 1px solid var(--hair); backdrop-filter: none; }
.runhead__in { display: flex; align-items: center; gap: 30px; height: 52px; padding: 0 var(--gutter); }
.runhead__brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.05rem/1 var(--sc); letter-spacing: .1em; text-transform: uppercase; color: var(--parch); text-decoration: none; white-space: nowrap; }
.runhead__mark { position: relative; width: 18px; height: 18px; border: 1.5px solid var(--brass); border-radius: 50%; }
.runhead__mark::before, .runhead__mark::after { content: ""; position: absolute; border: 1px solid var(--brass); }
.runhead__mark::before { left: 4px; right: 4px; top: -1px; bottom: -1px; border-radius: 50%; }
.runhead__mark::after { left: -1px; right: -1px; top: 7px; height: 0; border-width: 1px 0 0; }
.runhead__nav { display: flex; gap: 26px; margin-right: auto; }
.runhead__nav a, .runhead__ext a { font: 500 1.02rem/1 var(--label); letter-spacing: .06em; text-transform: lowercase; color: var(--parch-2); text-decoration: none; white-space: nowrap; padding: 6px 0; }
.runhead__nav a:hover, .runhead__ext a:hover, .runhead__nav a[aria-current] { color: var(--brass-hi); }
.runhead__ext { display: flex; gap: 20px; align-items: center; }
.runhead__lang span[aria-current] { color: var(--brass-hi); font-weight: 700; }
.runhead__sep { margin: 0 .3em; color: var(--mute); }
@media (max-width: 980px) { .runhead__nav { display: none; } .runhead__ext { margin-left: auto; } }
@media (max-width: 540px) { .runhead__in { gap: 12px; } .runhead__ext a:not(.runhead__lang) { display: none; } }

/* ==========================================================================
   Титульный лист: физическая карта
   ========================================================================== */
.hero { padding: 16px var(--gutter) 0; }
.hero__sheet { position: relative; height: min(86vh, 880px); min-height: 640px; background: var(--night-2); overflow: hidden; }
.hero__map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; }
.hero__sheet:not(.is-live) .hero__map { visibility: hidden; }
@media (pointer: coarse) { .hero__map { cursor: default; } }
.hero__north { position: absolute; top: 30px; right: 34px; width: 28px; height: 46px; color: var(--map-ink); pointer-events: none; }
.hero__north text { font: 700 13px var(--sc); fill: currentColor; }

.cartouche {
  position: absolute; left: 44px; bottom: 44px; z-index: 2; width: min(560px, 46%);
  padding: 34px 38px 32px; background: rgba(10, 19, 32, .93);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.cartouche__kicker { margin: 0 0 14px; color: var(--brass); font: 700 1rem/1.2 var(--label); letter-spacing: .2em; text-transform: lowercase; }
.cartouche__title { margin: 0; font-family: var(--sc); font-weight: 700; text-transform: uppercase; line-height: .84; display: grid; justify-items: start; color: var(--parch); }
.cartouche__title span:first-child { font-size: clamp(3.4rem, 7.4vw, 6.6rem); letter-spacing: .035em; }
.cartouche__title span:last-child { font-size: clamp(1.25rem, 2.72vw, 2.42rem); letter-spacing: .5em; margin-top: .25em; margin-right: -.5em; color: var(--brass-hi); }
.cartouche__native { margin: 16px 0 0; font-style: italic; font-size: 1.35rem; color: var(--parch-2); }
.cartouche__lead { margin: 12px 0 22px; font-size: 1.15rem; line-height: 1.5; }
.cartouche__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.hero__tools { position: absolute; left: 40px; top: 36px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 520px; pointer-events: none; }
.hero__readout { order: 3; flex-basis: 100%; margin: 0; padding: 5px 10px; width: max-content; background: rgba(10, 19, 32, .88); color: var(--parch); font: 400 .95rem/1.3 var(--mono); white-space: nowrap; visibility: hidden; }
.hero__readout.is-on { visibility: visible; }
.hero__hint { order: 2; margin: 0; font-style: italic; font-size: 1rem; color: var(--map-ink); text-shadow: 0 0 4px #F5F0E3, 0 0 8px #F5F0E3; }
.hero__new { order: 1; pointer-events: auto; cursor: pointer; background: rgba(10, 19, 32, .9); border: 0; color: var(--brass-hi); font: 700 1rem/1 var(--label); letter-spacing: .08em; text-transform: lowercase; padding: 8px 12px 7px; }
.hero__new:hover { background: var(--brass); color: var(--night); }
.hero__sheet:not(.is-live) .hero__tools { display: none; }
@media (pointer: coarse) { .hero__hint { display: none; } }
@media (max-width: 1180px) { .cartouche { width: min(560px, 60%); } }
@media (max-width: 760px) {
  .hero { padding: 0; }
  .hero__sheet { height: auto; min-height: 0; overflow: visible; background: var(--night); }
  .hero__map { position: relative; height: 62vh; min-height: 380px; max-height: 560px; }
  .hero__north { top: 24px; right: 24px; width: 24px; }
  .hero__tools { left: 24px; top: 24px; }
  .hero__readout { display: none; }
  .cartouche { position: relative; left: auto; bottom: auto; width: auto; margin: -70px 16px 0; padding: 26px 22px 24px; }
  .cartouche__title span:first-child { font-size: clamp(3rem, 17vw, 4.6rem); }
  .cartouche__title span:last-child { font-size: clamp(1.1rem, 6.3vw, 1.7rem); }
}

/* ==========================================================================
   Разделы и фоны из игры
   ========================================================================== */
.band { background-color: var(--night); background-repeat: no-repeat; background-position: top center; background-size: 100% auto; }
.band--world { background-image: url("../img/bg/world.jpg"); }
.band--versions { background-image: url("../img/bg/versions.jpg"); }
.band--journal { background-image: url("../img/bg/journal.jpg"); }
@media (max-width: 900px) { .band { background-size: 180% auto; } }

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.part { padding: clamp(80px, 11vw, 150px) 0 clamp(40px, 5vw, 70px); }
.part__head { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 24px); margin-bottom: 26px; }
.part__num { font: 700 clamp(2.4rem, 5.4vw, 4.2rem)/.8 var(--sc); color: var(--brass); }
.part__title { margin: 0; font: 700 clamp(2.3rem, 5.2vw, 4.2rem)/.95 var(--sc); color: var(--parch); }
.part__lead { max-width: 44em; margin: 0 0 40px; font-size: 1.3rem; line-height: 1.55; color: var(--parch-2); }

/* ---------- I. Мир сегодня ---------- */
.world__intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.world__lead { margin: 0; font-size: 1.4rem; line-height: 1.55; }
.steam-embed { position: relative; margin-top: 34px; width: 100%; max-width: 646px; aspect-ratio: 646 / 182; background: #1b2838; overflow: hidden; }
.steam-embed iframe { position: absolute; left: 0; top: 0; width: 646px; height: 190px; border: 0; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.passport { margin: 0; font-size: 1.08rem; }
.passport > div { display: flex; justify-content: space-between; gap: 1em; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.passport > div:first-child { padding-top: 0; }
.passport dt { color: var(--parch-2); }
.passport dd { margin: 0; text-align: right; }
.world__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); margin-top: 80px; }
.world__col-title { margin: 22px 0 8px; font: 700 1.7rem/1.1 var(--sc); color: var(--parch); }
.world__col p { margin: 0; font-size: 1.12rem; color: var(--parch-2); }
.plate-fig { margin: 0; }
.plate-fig__btn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: var(--night-2); cursor: zoom-in; overflow: hidden; }
.plate-fig__btn img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease, filter .25s; }
.plate-fig__btn:hover img { transform: scale(1.03); filter: brightness(1.08); }
.shots { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) {
  .world__intro { grid-template-columns: 1fr; }
  .world__cols { grid-template-columns: 1fr 1fr; }
  .world__cols .world__col:last-child { grid-column: 1 / -1; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .world__cols { grid-template-columns: 1fr; } }

/* ==========================================================================
   II. Дорожная карта — звёздная карта
   ========================================================================== */
.sky { position: relative; background: var(--sky); overflow: hidden; }
.sky__stars { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sky__in { position: relative; max-width: 1460px; margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(70px, 8vw, 110px); }
.sky .part__head, .sky .part__lead, .sky .sm-bar, .sky .upds, .sky .upds__toggle { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.sky .part__lead { margin-bottom: 18px; }
.sm-bar { margin-top: 0; margin-bottom: 8px; }
.sm-toggle { font: 700 1rem/1 var(--label); letter-spacing: .06em; text-transform: lowercase; color: var(--verd); background: transparent; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(124, 192, 172, .35); text-underline-offset: .3em; }
.sm-toggle[aria-pressed="true"] { color: var(--sky); background: var(--verd); padding: 8px 12px; text-decoration: none; }
html:not(.js) .sm-chart, html:not(.js) .sm-bar, html:not(.js) .upds__toggle { display: none; }

.sm-chart { position: relative; margin: 0 auto 40px; max-width: 1400px; }
.sm-svg { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.sm-axis text { font: 500 15px var(--mono); fill: var(--parch-2); }
.sm-axis line { stroke: var(--hair); stroke-width: 1; }
.sm-eon { font: 700 32px var(--sc); letter-spacing: .3em; fill: var(--parch); opacity: .07; text-transform: uppercase; }
.sm-eon-line { stroke: var(--hair); stroke-width: 1; stroke-dasharray: 2 6; }
.sm-eon-t { font: 700 14px var(--label); letter-spacing: .14em; text-transform: uppercase; fill: var(--parch-2); opacity: .7; }
.sm-route { fill: none; stroke: var(--parch); stroke-opacity: .2; stroke-width: 1.2; }
.sm-route--future { stroke-dasharray: 2 7; }
.sm-link { fill: none; stroke: var(--brass); stroke-width: 1.4; opacity: 0; transition: opacity .2s; }
.sm-link.is-hl { opacity: .9; }

.sm-sys { cursor: pointer; outline: none; }
.sm-sys__in { transition: opacity .3s, transform .6s cubic-bezier(.2, .8, .2, 1); transform-origin: 0 0; }
.sm-svg.has-hl .sm-sys:not(.is-hl):not(.is-linked) .sm-sys__in { opacity: .35; }
.sm-hit { fill: transparent; }
.sm-orbit { fill: none; stroke: var(--parch); stroke-opacity: .14; stroke-width: 1; }
.sm-sys.is-sel .sm-orbit, .sm-sys:hover .sm-orbit, .sm-sys:focus-visible .sm-orbit { stroke: var(--brass-hi); stroke-opacity: .7; }
.sm-star { stroke: var(--sky); stroke-width: 1.5; }
.sm-spike { stroke: var(--parch); stroke-width: 1; opacity: .7; }
.sm-sel { fill: none; stroke: var(--brass-hi); stroke-width: 1; opacity: 0; }
.sm-sys.is-sel .sm-sel { opacity: .45; }
.sm-ring-now { fill: none; stroke: var(--verd); stroke-width: 1.4; }
.sm-pl { stroke-width: 1.3; transition: opacity .25s; }
.sm-pl--done { fill: var(--parch); stroke: var(--parch); }
.sm-pl--wip { fill: var(--verd); stroke: var(--verd); }
.sm-pl--plan { fill: var(--sky); stroke: rgba(232, 223, 201, .55); }
.sm-pl--idea { fill: var(--sky); stroke: rgba(143, 154, 173, .6); stroke-dasharray: 1.6 1.6; }
.sm-svg.is-req .sm-pl:not(.is-match) { opacity: .15; }
.sm-svg.is-req .sm-pl.is-match { fill: var(--verd); stroke: var(--verd); r: 5.6px; }
.sm-name { font: 700 19px var(--sc); fill: var(--parch); letter-spacing: .01em; }
.sm-ver { fill: var(--brass); }
.sm-sys.is-sel .sm-name, .sm-sys:hover .sm-name { fill: var(--brass-hi); }
.sm-here { font: 700 14px var(--label); letter-spacing: .12em; fill: var(--verd); text-transform: lowercase; }
.sm-name, .sm-here, .sm-axis text, .sm-eon-t { paint-order: stroke; stroke: var(--sky); stroke-width: 5px; stroke-linejoin: round; }

/* появление */
.sm-svg .sm-sys__in { opacity: 0; transform: scale(.4); }
.sm-svg.is-on .sm-sys__in { opacity: 1; transform: none; transition-delay: var(--d, 0s); }
.sm-svg.is-on.has-hl .sm-sys:not(.is-hl):not(.is-linked) .sm-sys__in { opacity: .35; transition-delay: 0s; }
.sm-svg .sm-route { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 2.2s ease .2s; }
.sm-svg .sm-route--future { stroke-dasharray: 2 7; stroke-dashoffset: 0; opacity: 0; transition: opacity 1.2s ease 1.2s; }
.sm-svg.is-on .sm-route { stroke-dashoffset: 0; }
.sm-svg.is-on .sm-route--future { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sm-svg .sm-sys__in { opacity: 1; transform: none; transition: none; }
  .sm-svg .sm-route { stroke-dasharray: none; transition: none; }
  .sm-svg .sm-route--future { opacity: 1; stroke-dasharray: 2 7; }
}

.sm-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 320px; padding: 11px 14px 10px; background: rgba(10, 19, 32, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 1.02rem; line-height: 1.4; color: var(--parch); }
.sm-tip b { display: block; font-weight: 700; }
.sm-tip small { display: block; margin-top: 3px; color: var(--parch-2); font-size: .95rem; }
.sm-tip .sm-tip__req { color: var(--verd); }

/* ---------- карточка обновления ---------- */
.upds { display: grid; gap: 40px; }
.js .upds:not(.is-all) .upd:not(.is-active) { display: none; }
.upd { background: rgba(15, 27, 44, .9); padding: clamp(26px, 3.4vw, 44px) clamp(20px, 3.4vw, 48px) 28px; }
.upd.is-flash { animation: upd-flash 1s ease; }
@keyframes upd-flash { from { background: rgba(40, 52, 72, .95); } to { background: rgba(15, 27, 44, .9); } }
.upd__title { margin: 0 0 10px; font: 700 clamp(2.1rem, 4.4vw, 3.3rem)/1.02 var(--sc); color: var(--parch); }
.upd__ver { color: var(--pc); }
.upd__meta { margin: 0 0 16px; font-size: 1.1rem; color: var(--parch-2); }
.upd__status--wip, .upd__here { color: var(--verd); }
.upd__goal { margin: 0; max-width: 44em; font-size: 1.32rem; line-height: 1.5; font-style: italic; color: var(--parch); }
.upd__body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: clamp(26px, 4vw, 56px); margin-top: 30px; }
.upd__main { display: grid; gap: 34px; align-content: start; }
.upd__grows { padding-top: 24px; border-top: 1px solid var(--hair); }
.upd__grows h4 { margin: 0 0 12px; font: 700 1.15rem/1.3 var(--serif); color: var(--brass-hi); }
.upd__grows p { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.5; color: var(--parch-2); max-width: 46em; }
.upd__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 34px; align-content: start; }
.upd__item { transition: opacity .2s; }
.upd__it { margin: 0 0 4px; font: 700 1.15rem/1.3 var(--serif); color: var(--parch); }
.upd__id { margin: 0; font-size: 1.06rem; line-height: 1.5; color: var(--parch-2); }
.upd__req { color: var(--verd); font-style: italic; }
.upds.is-req .upd__item:not(.is-match) { opacity: .35; }
.upds.is-req .upd__item.is-match .upd__it { color: var(--verd); }
.upd__item.is-ping .upd__it { color: var(--brass-hi); }
.upd__side { font-size: 1.06rem; line-height: 1.55; color: var(--parch-2); }
.upd__fig { margin: 0 0 22px; }
.upd__side h4 { margin: 0 0 6px; font: 700 1.12rem/1.3 var(--serif); color: var(--parch); }
.upd__side > p { margin: 0 0 18px; }
.upd__hood { margin: 0 0 18px; }
.upd__hood summary { cursor: pointer; font: 700 1.12rem/1.3 var(--serif); color: var(--brass-hi); list-style: none; }
.upd__hood summary::-webkit-details-marker { display: none; }
.upd__hood summary::after { content: " +"; }
.upd__hood[open] summary::after { content: " −"; }
.upd__hood p { margin: 8px 0 0; font-size: 1.02rem; }
.upd__rel { margin: 0; display: grid; gap: 6px; }
.upd__rel a { color: var(--brass-hi); text-decoration: none; }
.upd__rel a:hover { color: var(--parch); }
.upd__rel a + a::before { content: ", "; color: var(--parch-2); }
.upd__nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 1.08rem; }
.upd__nav a { color: var(--parch-2); text-decoration: none; }
.upd__nav a:hover { color: var(--brass-hi); }
.upd__next { margin-left: auto; text-align: right; }
.upds.is-all .upd__nav { display: none; }
.upds__toggle { margin-top: 18px; }
@media (max-width: 1000px) { .upd__body { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .upd__items { grid-template-columns: 1fr; } .sm-name { font-size: 17px; } }

/* ---------- III. Летопись версий ---------- */
.ledger { display: grid; gap: 0; }
.ledger__row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); padding: 34px 0; border-top: 1px solid var(--hair); }
.ledger__row:first-child { border-top: 0; padding-top: 0; }
.ledger__num { display: block; font: 700 2.4rem/1 var(--sc); color: var(--parch); }
.ledger__row--update .ledger__num, .ledger__row--patch .ledger__num, .ledger__row--release .ledger__num { font-size: 1.6rem; text-transform: lowercase; color: var(--parch-2); }
.ledger__row--upcoming .ledger__num { color: var(--verd); }
.ledger__row--major .ledger__num { color: var(--brass-hi); }
.ledger__when { display: block; margin-top: 8px; font-size: 1.05rem; color: var(--parch-2); }
.ledger__title { margin: 0 0 12px; font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--sc); color: var(--parch); }
.ledger__soon { font: italic 400 1.1rem var(--serif); color: var(--verd); }
.ledger__item { margin: 0 0 8px; font-size: 1.12rem; line-height: 1.5; color: var(--parch-2); }
.ledger__more summary { cursor: pointer; color: var(--brass-hi); font-size: 1.05rem; list-style: none; margin: 4px 0 8px; }
.ledger__more summary::-webkit-details-marker { display: none; }
.ledger__more summary::after { content: " +"; }
.ledger__more[open] summary::after { content: " −"; }
.ledger__links { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 12px 0 0; font-size: 1.05rem; }
.ledger__links a { text-decoration: none; }
@media (max-width: 700px) { .ledger__row { grid-template-columns: 1fr; gap: 10px; } .ledger__when { display: inline; margin: 0 0 0 12px; } .ledger__num { display: inline; } }

/* ---------- IV. Дневник ---------- */
.journal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(30px, 4vw, 64px); align-items: start; }
.entries { display: grid; gap: 34px; }
.entry { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 26px; align-items: start; }
.entry__cover { display: block; overflow: hidden; background: var(--night-2); }
.entry__cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.entry__cover:hover img { transform: scale(1.03); }
.entry__date { margin: 0 0 6px; font-size: 1.02rem; color: var(--parch-2); }
.entry__title { margin: 0 0 8px; font: 700 clamp(1.45rem, 2.4vw, 1.85rem)/1.2 var(--serif); }
.entry__title a { color: var(--parch); text-decoration: none; }
.entry__title a:hover { color: var(--brass-hi); }
.entry__sum { margin: 0; font-size: 1.12rem; color: var(--parch-2); }
.entries__empty { font-style: italic; color: var(--parch-2); }
.subscribe { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.tg { padding: 22px 20px 20px; background: rgba(15, 27, 44, .88); }
.tg__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; font-size: 1.1rem; }
.tg__head span { font-weight: 700; color: var(--parch); }
.tg__head a { color: var(--parch-2); text-decoration: none; font-size: 1rem; }
.tg__post { margin-bottom: 16px; min-height: 120px; }
.tg__card { display: grid; gap: 8px; text-decoration: none; color: var(--parch-2); }
.tg__card img { display: block; width: 100%; height: auto; margin-bottom: 6px; }
.tg__date { font-size: 1rem; color: var(--parch-2); }
.tg__title { font: 700 1.3rem/1.2 var(--serif); color: var(--parch); }
.tg__text { font-size: 1.08rem; line-height: 1.5; }
.tg__go { color: var(--brass-hi); font-size: 1.05rem; }
.tg__card:hover .tg__title, .tg__card:focus-visible .tg__title { color: var(--brass-hi); }
.tg__post iframe { display: block; max-width: 100% !important; min-width: 0 !important; }
.page--devlog .part { padding-top: clamp(56px, 7vw, 100px); }
@media (max-width: 1000px) { .journal { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .entry { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Запись дневника ---------- */
.post { max-width: 860px; margin: 0 auto; padding: clamp(44px, 6vw, 80px) var(--gutter) 0; }
.post__back { font-size: 1.05rem; text-decoration: none; color: var(--brass-hi); }
.post__meta { margin: 26px 0 0; font-size: 1.05rem; color: var(--parch-2); }
.post__title { margin: 10px 0 16px; font: 700 clamp(2.2rem, 5.4vw, 3.9rem)/1.02 var(--sc); color: var(--parch); }
.post__lead { margin: 0; font-size: 1.4rem; line-height: 1.45; font-style: italic; color: var(--parch-2); }
.post__langs { display: inline-flex; gap: 4px; margin: 18px 0 4px; }
.post__langs button { font: 700 1rem/1 var(--label); letter-spacing: .06em; text-transform: lowercase; padding: 8px 12px 7px; background: transparent; color: var(--parch-2); border: 0; cursor: pointer; }
.post__langs button[aria-pressed="true"] { background: var(--brass); color: var(--night); }
.post__cover { margin: 36px 0 10px; }
.prose { font-size: 1.25rem; line-height: 1.68; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { margin: 1.9em 0 .55em; font: 700 2rem/1.1 var(--sc); color: var(--parch); }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.1em; border-left: 2px solid var(--brass); font-style: italic; color: var(--parch-2); }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--night-3); padding: .08em .3em; }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2.4em 0; }
.prose img { display: block; max-width: 100%; height: auto; margin: 1.6em 0; }
.prose .plate-fig__btn img, .prose .fig img { margin: 0; }
.fig { margin: 2.2em 0; }
.fig .plate-fig__btn img { aspect-ratio: auto; object-fit: contain; }
.fig figcaption { margin-top: 10px; font-size: 1.02rem; font-style: italic; color: var(--parch-2); }
.fig--wide { margin-left: -80px; margin-right: -80px; }
@media (max-width: 1060px) { .fig--wide { margin-left: 0; margin-right: 0; } }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { display: block; width: 100%; height: 100%; border: 0; }
.fig--video video { display: block; width: 100%; background: #000; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 2em 0; }
.gallery .fig { margin: 0; }
.gallery .plate-fig__btn img { aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { font-size: .98rem; }
.post__foot { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--hair); }
.post__nav { display: flex; justify-content: space-between; gap: 20px; }
.post__nav a { display: grid; gap: 4px; max-width: 48%; text-decoration: none; font-weight: 700; color: var(--parch); font-size: 1.1rem; }
.post__nav a:hover { color: var(--brass-hi); }
.post__nav-k { font-weight: 400; color: var(--parch-2); font-size: 1rem; }
.post__nav-older { text-align: right; margin-left: auto; }

/* ---------- Увеличение ---------- */
.lightbox { width: min(96vw, 1520px); max-width: none; max-height: 96vh; padding: 14px; border: 0; background: var(--night); color: var(--parch); }
.lightbox::backdrop { background: rgba(3, 6, 11, .88); }
.lightbox__fig { margin: 0; }
.lightbox__fig img { display: block; max-width: 100%; max-height: calc(96vh - 130px); margin: 0 auto; }
.lightbox__cap { margin: 12px 0 0; font-style: italic; color: var(--parch-2); text-align: center; font-size: 1.05rem; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.lightbox__bar button { font: 700 1rem/1 var(--label); letter-spacing: .06em; text-transform: lowercase; background: transparent; border: 0; color: var(--parch-2); padding: 8px 10px; cursor: pointer; }
.lightbox__bar button:hover { color: var(--brass-hi); }
.lightbox__bar .mono { color: var(--parch-2); }
.lightbox__close { margin-left: auto; }
.lightbox.is-single [data-lb-prev], .lightbox.is-single [data-lb-next] { visibility: hidden; }

/* ---------- Подвал ---------- */
.colophon { margin-top: clamp(60px, 8vw, 110px); background: var(--night-2); }
.colophon__in { max-width: var(--maxw); margin: 0 auto; padding: 48px var(--gutter) 30px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; }
.colophon .label { margin: 0 0 8px; font-size: 1rem; color: var(--parch-2); }
.colophon__title { margin: 0 0 10px; font: 700 1.7rem/1 var(--sc); letter-spacing: .04em; text-transform: uppercase; color: var(--parch); }
.colophon__about p:last-child { margin: 0; font-size: 1.05rem; color: var(--parch-2); max-width: 32em; }
.colophon__credits { margin: 0; }
.colophon__credits dd { margin: 0 0 16px; font-size: 1.12rem; }
.colophon__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 1.08rem; }
.colophon__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0; padding-top: 18px; border-top: 1px solid var(--hair); color: var(--parch-2); font: 400 .95rem var(--serif); }
@media (max-width: 760px) { .colophon__in { grid-template-columns: 1fr; gap: 24px; } }

@media print { .runhead, .hero, .colophon, .subscribe, .sky__stars { display: none; } body { background: #fff; color: #000; } }
