/* Раскладка: онлайн-выставка идёт тем же путём, что и экспозиция —
   вход, объяснение почтового быта, хронология 1941→1945, и только потом
   отдельные письма. Светлая полоса — контекст, тёмная — сам документ.
   Палитра, типографика и знаки сняты с печатной афиши. Тема одна. */
:root {
  --paper:    #ecede9;
  --paper-hi: #f7f7f5;
  --sunk:     #e1e3de;
  --ink:      #26292a;
  --ink-mid:  #5a615f;
  --ink-low:  #8a918e;
  --rule:     #cbd0cb;
  --rule-soft:#dce0db;
  --bronze:   #614b32;
  --red:      #e70407;
  --vitrine:  #17191a;
  --vit-2:    #202424;
  --vit-rule: #363c3b;
  --vit-ink:  #e8ebe8;
  --vit-mid:  #99a29e;

  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --gut: clamp(16px, 4.2vw, 60px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.wrap { max-width: 1260px; margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 860px; }
.flag { display: inline-block; width: 24px; height: 16px; background: var(--red); clip-path: polygon(0 0, 100% 0, 0 100%); flex: none; }
.flag.sm { width: 14px; height: 9px; }
.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--bronze); margin: 0 0 16px;
  display: flex; align-items: center; gap: 9px;
}
/* ======================================================== шапка === */

/* Высота шапки: от неё отсчитываются прилипающие блоки ниже. */
:root { --navh: 64px; }

/* Переход по ссылке из шапки не должен прятать заголовок под ней. */
[id] { scroll-margin-top: calc(var(--navh) + 10px + env(safe-area-inset-top, 0px)); }

.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgba(236, 237, 233, .93);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
/* Шапка всегда в одну строку: при переносе она прилипала к экрану
   высотой в треть страницы и накрывала текст. Если ссылки не влезают,
   строка листается вбок — ни одна не прячется. */
.nav .in { display: flex; align-items: center; gap: 22px; padding: 11px 0; flex-wrap: nowrap; }
.nav .mark { display: flex; align-items: center; flex: none; }
.nav .mark img { height: 30px; width: auto; }
.nav .links { display: flex; gap: 18px; margin-left: auto; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav .links::-webkit-scrollbar { display: none; }
.nav .links a { white-space: nowrap; }
/* На ноутбуке семь ссылок и звание впритык — ужимаем промежутки,
   чтобы строка не начинала листаться там, где этого не ждут. */
@media (max-width: 1240px) {
  .nav .in { gap: 14px; }
  .nav .links { gap: 14px; }
}
.nav .links a { font-size: 13.5px; color: var(--ink-mid); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav .links a:hover { color: var(--ink); border-bottom-color: var(--rule); }

/* На телефоне семь ссылок переносились на три строки, шапка вырастала
   на треть экрана и, прилипнув, накрывала текст. Поэтому здесь она
   в одну строку, а ссылки листаются вбок — ни одна не прячется. */
@media (max-width: 1100px) {
  :root { --navh: 48px; }
  .nav .in { flex-wrap: nowrap; gap: 10px; padding: 8px 0; }
  .nav .mark img { height: 24px; }
  .nav .links {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: 16px; margin-left: 10px; min-width: 0;
    /* край строки растворяется — видно, что её можно листать */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { white-space: nowrap; }
  .rankchip { flex: none; margin-left: 6px; }
}
/* ========================================================== вход === */

.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.hero .birds { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.hero .in { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero .in > div { min-width: 0; }
.hero .logo { width: min(100%, 500px); margin-bottom: clamp(22px, 3vw, 34px); }
.hero h1 { font-size: clamp(27px, 3.4vw, 44px); max-width: 100%; }
.hero .sub { margin-top: 16px; font-size: clamp(16px, 1.5vw, 18.5px); color: var(--ink-mid); max-width: 44ch; }
.hero .tag { margin-top: 24px; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.8vw, 21px); color: var(--bronze); line-height: 1.45; border-left: 2px solid var(--red); padding-left: 18px; }
.hero .meta { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 30px; font-size: 13.5px; color: var(--ink-mid); }
.hero .meta b { color: var(--ink); font-weight: 600; }
.hero .stack { position: relative; aspect-ratio: 4/5; max-width: 460px; width: 100%; }
.hero .stack img { position: absolute; box-shadow: 0 18px 46px rgba(20,24,22,.22); border: 1px solid rgba(255,255,255,.6); }
.hero .stack img:nth-child(1) { width: 60%; top: 0;   left: 2%;  transform: rotate(-5deg); }
.hero .stack img:nth-child(2) { width: 56%; top: 24%; left: 40%; transform: rotate(4deg); }
.hero .stack img:nth-child(3) { width: 48%; top: 56%; left: 10%; transform: rotate(-2deg); }
.scrollcue { display: flex; align-items: center; gap: 10px; margin-top: 30px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); }
.scrollcue .line { width: 46px; height: 1px; background: var(--rule); }
/* =================================================== почтовый быт === */

.section { padding: clamp(46px, 6.5vw, 92px) 0; }
.section.alt { background: var(--paper-hi); border-block: 1px solid var(--rule-soft); }
.shead { margin-bottom: clamp(26px, 3.4vw, 44px); }
.shead h2 { font-size: clamp(27px, 3.7vw, 42px); max-width: 20ch; }
.shead p { margin-top: 14px; max-width: 58ch; color: var(--ink-mid); }
.facts3 { display: grid; gap: clamp(16px, 2vw, 26px); grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.fact {
  border: 1px solid var(--rule); background: var(--paper);
  padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.fact .t { font-family: var(--serif); font-size: 21px; line-height: 1.1; display: block; }
.fact .p { font-size: 14.5px; color: var(--ink-mid); display: block; }
.fact .stage { height: 168px; display: flex; align-items: center; justify-content: center; position: relative; perspective: 900px; }
.factbtn {
  margin-top: auto; align-self: flex-start;
  font-size: 12.5px; letter-spacing: .04em;
  padding: 8px 14px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--rule);
  transition: border-color .2s, background .2s;
}
.factbtn:hover { border-color: var(--ink); }
.factbtn[disabled] { opacity: .45; cursor: default; }
/* --- складывание треугольника: три состояния, плавный переход --- */
.sheetfold { position: relative; width: 150px; height: 112px; }
.s-paper {
  position: absolute; inset: 0; background: #fffefb;
  box-shadow: 0 6px 18px rgba(20,24,22,.2), inset 0 0 0 1px rgba(20,24,22,.1);
  clip-path: polygon(0% 0%, 50% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path .62s cubic-bezier(.45,.05,.2,1), transform .62s cubic-bezier(.45,.05,.2,1);
}
.s-lines {
  position: absolute; inset: 13% 11%;
  background: repeating-linear-gradient(180deg, transparent 0 7px, rgba(60,70,66,.26) 7px 8px);
  transition: opacity .4s;
}
.s-addr {
  position: absolute; left: 24%; bottom: 9%; right: 24%; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: 10px;
  line-height: 1.8; color: var(--ink-low);
  opacity: 0; transition: opacity .4s .25s;
}
/* Сгибы проявляются по мере складывания. */
.s-flap {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .45s;
  background: linear-gradient(135deg, transparent calc(50% - .5px), rgba(20,24,22,.22) calc(50% - .5px), rgba(20,24,22,.22) calc(50% + .5px), transparent calc(50% + .5px));
}
.s-flap.b { background: linear-gradient(225deg, transparent calc(50% - .5px), rgba(20,24,22,.22) calc(50% - .5px), rgba(20,24,22,.22) calc(50% + .5px), transparent calc(50% + .5px)); }
.sheetfold[data-step="1"] .s-paper { clip-path: polygon(16% 0%, 50% 0%, 84% 0%, 100% 100%, 0% 100%); }
.sheetfold[data-step="1"] .s-flap { opacity: 1; }
.sheetfold[data-step="2"] .s-paper { clip-path: polygon(50% 14%, 50% 14%, 50% 14%, 100% 100%, 0% 100%); transform: rotate(-3deg); }
.sheetfold[data-step="2"] .s-lines { opacity: .18; }
.sheetfold[data-step="2"] .s-addr { opacity: 1; }
.sheetfold[data-step="2"] .s-flap { opacity: 0; }
/* --- штамп цензуры: оттиск прижимается, текст уходит под краску --- */
.censordemo { position: relative; width: 196px; }
.c-paper { background: #fffefb; height: 118px; position: relative; box-shadow: 0 6px 18px rgba(20,24,22,.2), inset 0 0 0 1px rgba(20,24,22,.1); }
.c-lines {
  position: absolute; inset: 14px 16px;
  background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(60,70,66,.28) 6px 7px);
}
.c-stamp {
  position: absolute; left: 16px; top: 28px; width: 126px; height: auto;
  opacity: 0; transform: translateY(-16px) rotate(-12deg) scale(1.16);
  transition: opacity .16s linear, transform .3s cubic-bezier(.25,.9,.25,1);
}
.fact.on .c-stamp { opacity: .92; transform: translateY(0) rotate(-7deg) scale(1); }
.fact.on .c-paper { animation: press .22s ease-out .26s; }
@keyframes press { 0% { transform: none } 40% { transform: translateY(2px) } 100% { transform: none } }
.censored { position: relative; }
.censored::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: -1px; bottom: -1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
  animation: ink .26s cubic-bezier(.4,0,.3,1) both;
  animation-delay: calc(var(--i) * 70ms + 420ms);
}
@keyframes ink { to { transform: scaleX(1) } }
/* --- полевая почта --- */
.ppdemo { text-align: center; position: relative; }
.pp-label { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-low); }
.pp-num {
  display: block; font-family: var(--serif); font-size: 40px; letter-spacing: .06em;
  margin-top: 2px; transition: filter .35s, opacity .35s;
}
.pp-num.blur { filter: blur(5px); opacity: .35; }
.pp-stamp {
  width: 92px; height: auto; margin: 10px auto 0;
  opacity: 0; transform: rotate(-14deg) scale(1.1);
  transition: opacity .45s, transform .55s cubic-bezier(.25,.9,.25,1);
}
.fact.on .pp-stamp { opacity: .85; transform: rotate(-4deg) scale(1); }
/* ======================================================= хроника === */

/* Шкала лет. Каждое деление — письмо; закрашенные уже расшифрованы,
   пустые ждут читателя. Видно сразу, где в собрании дыры. */
.tl-axis {
  position: relative; display: flex; gap: clamp(10px, 2.2vw, 30px);
  align-items: flex-end; padding: 0 2px 20px; margin-bottom: 26px;
  overflow-x: auto; scrollbar-width: none;
}
.tl-axis::-webkit-scrollbar { display: none; }
.tl-rule { position: absolute; left: 0; right: 0; bottom: 19px; height: 1px; background: var(--rule); }
.tl-y {
  position: relative; z-index: 1; flex: 0 0 auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 0 0 14px; background: none; border: 0; text-align: left;
  border-bottom: 2px solid transparent; transition: border-color .3s;
}
.tl-dots { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.tl-dots i {
  width: 5px; height: 11px; background: var(--rule);
  transition: height .4s cubic-bezier(.25,.9,.25,1), background .3s;
}
.tl-dots i.d { background: var(--ink-low); height: 17px; }
.tl-y:hover .tl-dots i { height: 20px; }
.tl-y:hover .tl-dots i.d { height: 26px; }
.tl-y b {
  font-family: var(--serif); font-size: clamp(22px, 2.7vw, 34px); line-height: 1;
  color: var(--ink-low); transition: color .3s;
}
.tl-nn { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-low); opacity: .75; }
.tl-y:hover b { color: var(--ink-mid); }
.tl-y[aria-selected="true"] { border-bottom-color: var(--red); }
.tl-y[aria-selected="true"] b { color: var(--ink); }
.tl-y[aria-selected="true"] .tl-dots i { background: var(--ink-mid); height: 22px; }
.tl-y[aria-selected="true"] .tl-dots i.d { background: var(--red); height: 28px; }
/* Шапка года */
.tl-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 4px; }
.tl-title { margin: 0; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; flex: 1; }
.tl-title b {
  position: relative; font-family: var(--serif); font-size: clamp(36px, 5vw, 60px); line-height: 1;
}
/* Штемпель проступает на годе, если на нём задержаться. */
.tl-title b::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  background: url(../brand/stamp-post.png) center/contain no-repeat;
  opacity: 0; transform: rotate(-16deg) scale(1.2);
  transition: opacity .5s, transform .6s cubic-bezier(.25,.9,.25,1);
  pointer-events: none; mix-blend-mode: multiply;
}
.tl-title:hover b::after { opacity: .45; transform: rotate(-6deg) scale(1); }
.tl-title i {
  font-style: normal; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-low);
}
.tl-step {
  flex: 0 0 auto; width: 38px; height: 38px; cursor: pointer;
  background: none; border: 1px solid var(--rule); color: var(--ink-mid);
  font-size: 15px; transition: border-color .25s, color .25s, background .25s;
}
.tl-step:hover { border-color: var(--ink); color: var(--ink); background: rgba(20,24,22,.04); }
.tl-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin: 22px 0 0;
  padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-low);
}
.tl-cnt b { color: var(--red); font-weight: 600; }
.tl-all {
  font-size: 12.5px; cursor: pointer; background: none; border: 0;
  color: var(--ink-mid); border-bottom: 1px solid var(--rule); padding: 0 0 2px;
  transition: color .25s, border-color .25s;
}
.tl-all:hover { color: var(--ink); border-bottom-color: var(--red); }
.tl-all[aria-pressed="true"] { color: var(--red); border-bottom-color: var(--red); }
/* --- сетка карточек --- */
.tl-grid {
  margin-top: 22px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}
.exhibit {
  display: flex; flex-direction: column; min-width: 0;
  border-top: 1px solid var(--rule); padding-top: 14px;
}
.exhibit.off { display: none; }
/* Карточки выкладываются одна за другой, как листы на стол. */
.tl-grid.lay .exhibit { animation: lay .5s cubic-bezier(.25,.9,.25,1) both; animation-delay: var(--d, 0ms); }
@keyframes lay { from { opacity: 0; transform: translateY(14px) rotate(-.4deg); } }
@media (prefers-reduced-motion: reduce) { .tl-grid.lay .exhibit { animation: none; } }
.ex-scan {
  position: relative; display: block; background: var(--sunk);
  border: 1px solid var(--rule-soft); overflow: hidden; aspect-ratio: 4/3;
  cursor: zoom-in;
}
.ex-scan img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 1.1s cubic-bezier(.2,.7,.3,1), filter .5s;
  filter: saturate(.92);
}
.exhibit:hover .ex-scan img { transform: scale(1.05); filter: saturate(1); }
.ex-n {
  position: absolute; left: 0; top: 0; padding: 3px 7px;
  font-family: var(--serif); font-size: 12px; letter-spacing: .06em;
  background: rgba(236,237,233,.9); color: var(--ink-mid);
}
.ex-body { min-width: 0; display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.ex-meta {
  margin: 0; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-low);
}
.ex-meta i { font-style: normal; opacity: .72; font-weight: 400; }
.exhibit h3 { margin: 7px 0 0; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25; }
.exhibit h3 a {
  text-decoration: none; background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .45s cubic-bezier(.2,.7,.3,1);
}
.exhibit:hover h3 a { background-size: 100% 1px; }
.ex-sub {
  margin: 8px 0 0; font-family: var(--serif); font-style: italic;
  font-size: 15px; line-height: 1.45; color: var(--ink-mid);
}
.ex-foot {
  margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--rule-soft);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 13px;
}
.ex-state { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.ex-state.done { color: var(--ink-low); }
.ex-state.open { color: var(--red); }
.ex-go { white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.ex-go:hover { border-bottom-color: var(--red); }
/* ===================================================== расшифровка === */

.deshifr { background: var(--vitrine); color: var(--vit-ink); }
.deshifr .shead h2, .deshifr h3 { color: var(--vit-ink); }
.deshifr .shead p { color: var(--vit-mid); }
.deshifr .eyebrow { color: var(--vit-mid); }
/* --- звание и счёт ---------------------------------------------- */

.progress {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: 18px clamp(24px, 4vw, 54px); align-items: center;
  padding: 20px clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--vit-rule); background: var(--vit-2);
  margin-bottom: clamp(26px, 3.4vw, 40px);
}
.pr-rank { display: flex; align-items: center; gap: 15px; min-width: 0; }
.pr-badge {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 17px; letter-spacing: .04em;
  color: var(--paper-hi); border: 1px solid var(--vit-mid); border-radius: 50%;
  position: relative;
}
.pr-badge::after {
  content: ''; position: absolute; inset: -5px; border: 1px solid var(--vit-rule);
  border-radius: 50%;
}
.pr-who { min-width: 0; }
.pr-who b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.pr-who i { display: block; font-style: normal; font-size: 12.5px; color: var(--vit-mid); margin-top: 2px; }
.pr-bar { grid-column: 1 / -1; height: 2px; background: var(--vit-rule); position: relative; }
.pr-bar span { position: absolute; inset: 0 auto 0 0; background: var(--red); transition: width .7s cubic-bezier(.3,.7,.2,1); }
.pr-nums { display: flex; gap: clamp(18px, 3vw, 40px); margin: 0; grid-row: 1; grid-column: 2; }
.pr-nums dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--vit-mid); }
.pr-nums dd { margin: 3px 0 0; font-family: var(--serif); font-size: 26px; line-height: 1; }
.pr-badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.bdg {
  display: inline-flex; align-items: center; gap: 7px; cursor: default;
  padding: 5px 10px 5px 6px; border: 1px dashed var(--vit-rule);
  font-size: 11.5px; color: var(--vit-mid);
}
.bdg i {
  width: 16px; height: 11px; background: var(--vit-rule); flex: none;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.bdg em { font-style: normal; }
.bdg.on { border-style: solid; border-color: var(--vit-mid); color: var(--vit-ink); }
.bdg.on i { background: var(--red); }
/* --- уровни ------------------------------------------------------ */

.lv-tabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--vit-rule); }
.lv-tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 0 clamp(14px, 2vw, 24px) 14px 0; margin-right: clamp(14px, 2vw, 24px);
  text-align: left; cursor: pointer; color: var(--vit-mid);
}
.lv-tab b { display: block; font-weight: 500; font-size: 15px; }
.lv-tab span { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; opacity: .8; }
.lv-tab:hover { color: var(--vit-ink); }
.lv-tab[aria-selected="true"] { color: var(--vit-ink); border-bottom-color: var(--red); }
.lv-pane { padding-top: clamp(22px, 3vw, 34px); }
/* --- выбор прочтения --------------------------------------------- */

.quick { max-width: 1000px; }
.ht-q { margin: 20px 0 12px; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 24px); }
.ht-opts { display: grid; gap: 8px; }
.opt {
  text-align: left; font-size: 15.5px; line-height: 1.45; cursor: pointer;
  padding: 12px 15px; background: var(--vit-2); color: var(--vit-ink);
  border: 1px solid var(--vit-rule);
  transition: border-color .2s, background .2s, transform .2s;
}
.opt:hover:not(:disabled) { border-color: var(--vit-mid); transform: translateX(3px); }
.opt:disabled { cursor: default; }
.opt.right { border-color: #4e7a5e; background: #22302a; }
.opt.wrong { opacity: .5; }
.opt.wrong.right { opacity: 1; }
.opt-wait { color: var(--vit-mid); font-size: 13px; }
.ht-after { margin-top: 14px; font-size: 13.5px; color: var(--vit-mid); }
.ht-after .y { color: #86c79a; font-weight: 500; }
.ht-after .n { color: var(--red); font-weight: 500; }
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit;
  color: var(--vit-ink); text-decoration: underline; text-underline-offset: 3px;
}
/* --- подсказки ---------------------------------------------------- */

.hints { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.hintbtn {
  background: none; border: 1px dashed var(--vit-rule); color: var(--vit-mid);
  font-size: 12px; padding: 6px 11px; cursor: pointer;
}
.hintbtn:hover:not(:disabled) { color: var(--vit-ink); border-color: var(--vit-mid); }
.hintbtn:disabled { opacity: .35; cursor: default; }
.hintout { font-family: var(--mono, "Roboto Mono", monospace); font-size: 12.5px; color: #c7a76a; }
/* --- целое письмо ------------------------------------------------- */

.free-lead { max-width: 60ch; color: var(--vit-mid); font-size: 15px; }
.free-pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-top: 16px; scrollbar-color: var(--vit-rule) transparent; }
.fp {
  flex: none; max-width: 230px; text-align: left; cursor: pointer;
  background: var(--vit-2); border: 1px solid var(--vit-rule); color: var(--vit-mid);
  padding: 9px 13px;
}
.fp b { display: block; font-weight: 500; font-size: 13.5px; color: var(--vit-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp span { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }
.fp:hover { border-color: var(--vit-mid); }
.fp[aria-pressed="true"] { border-color: var(--red); color: var(--vit-ink); }
.free-work { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1fr); gap: clamp(20px, 3vw, 44px); margin-top: clamp(20px, 3vw, 32px); align-items: start; }
.fs-stage { border: 1px solid var(--vit-rule); background: #0e1110; overflow: hidden; }
.fs-stage img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.fs-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.fs-sheets { display: flex; gap: 6px; flex-wrap: wrap; }
.fs-sheets button {
  background: none; border: 1px solid var(--vit-rule); color: var(--vit-mid);
  font-size: 11.5px; padding: 4px 10px; cursor: pointer;
}
.fs-sheets button[aria-pressed="true"] { border-color: var(--red); color: var(--vit-ink); }
.fs-hint { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--vit-mid); }
.free-form label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--vit-mid); margin-bottom: 8px; }
.free-form textarea {
  font: inherit; width: 100%; padding: 13px 15px; resize: vertical;
  background: var(--vit-2); border: 1px solid var(--vit-rule); color: var(--vit-ink);
}
.free-form textarea:focus { border-color: var(--vit-mid); outline: none; }
/* --- вход: та же строка, только сразу ----------------------------- */

.herotry {
  border: 1px solid var(--vit-rule); background: var(--vitrine); color: var(--vit-ink);
  padding: clamp(16px, 2vw, 24px); box-shadow: 0 24px 60px rgba(20,24,22,.2);
}
.ht-top { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--vit-mid); }
.herotry .ht-q { margin: 16px 0 10px; font-size: clamp(17px, 1.9vw, 20px); }
.herotry .opt { font-size: 14px; padding: 10px 13px; }
.herotry .croplabel { font-size: 10.5px; }
.game { display: block; max-width: 1000px; }
.cropwrap { position: relative; }
/* Читаемая «щель»: соседние строки притемнены, видно, какую читать. */
.slit { position: absolute; left: 0; right: 0; pointer-events: none; }
.slit.top, .slit.bot { background: rgba(14,17,16,.72); }
.slit.line { box-shadow: inset 0 1px 0 rgba(231,4,7,.55), inset 0 -1px 0 rgba(231,4,7,.55); }
.croplabel { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--vit-mid); }
.gform { margin-top: 24px; max-width: 760px; }
.cropbox { border: 1px solid var(--vit-rule); background: #0e1110; overflow-x: auto; overflow-y: hidden; position: relative; min-width: 0; scrollbar-color: var(--vit-rule) #0e1110; }
.cropinner { position: relative; }
.cropimg { background-repeat: no-repeat; background-color: #0e1110; min-height: 90px; }
.gform { min-width: 0; }
.gform label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--vit-mid); margin-bottom: 8px; }
.gform input { font: inherit; width: 100%; padding: 12px 14px; background: var(--vit-2); border: 1px solid var(--vit-rule); color: var(--vit-ink); }
.gform input:focus { border-color: var(--vit-mid); outline: none; }
.grow { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.gbtn { font-size: 14px; padding: 11px 18px; cursor: pointer; background: var(--vit-ink); color: var(--vitrine); border: 1px solid var(--vit-ink); }
.gbtn.ghost { background: transparent; color: var(--vit-ink); border-color: var(--vit-rule); }
.gbtn.ghost:hover { border-color: var(--vit-mid); }
.verdict { margin-top: 22px; border-top: 1px solid var(--vit-rule); padding-top: 20px; }
.verdict .score { font-family: var(--serif); font-size: clamp(19px, 1.9vw, 23px); line-height: 1.3; }
.verdict .score b { color: var(--red); font-weight: 400; }
.verdict .real { margin-top: 16px; font-size: 18px; line-height: 1.7; }
.verdict .real .w { padding: 1px 3px; }
.verdict .real .w.hit { background: #2d3a34; }
.verdict .real .w.miss { background: rgba(231,4,7,.22); box-shadow: inset 0 -1px 0 var(--red); }
.verdict .mine { margin-top: 10px; font-size: 14px; color: var(--vit-mid); }
.verdict .src { margin-top: 14px; font-size: 13px; color: var(--vit-mid); }
.verdict .src button { background: none; border: 0; padding: 0; color: var(--vit-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
.closing { margin-top: clamp(28px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--vit-rule); max-width: 66ch; color: var(--vit-mid); font-size: 15px; }
.closing b { color: var(--vit-ink); font-weight: 500; }
/* ======================================================== ящик === */

.mailbox { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .05em; margin-bottom: 6px; }
.field input, .field textarea { font: inherit; width: 100%; padding: 11px 13px; border: 1px solid var(--rule); background: #fff; color: var(--ink); }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-mid); font-weight: 400; }
.check input { margin-top: 5px; flex: none; width: auto; }
.btn { font-size: 15px; padding: 12px 24px; cursor: pointer; background: var(--ink); color: var(--paper-hi); border: 1px solid var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
/* ===================================================== собрание === */

.partners { display: flex; flex-wrap: wrap; gap: clamp(22px, 3vw, 46px); align-items: center; margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--rule-soft); }
.partners img { height: 48px; width: auto; opacity: .9; }
.partners img.nas { height: 30px; }
/* ================================================= чтение письма === */

.reader-page { display: none; }
body.reading .exhibition { display: none; }
body.reading .reader-page { display: block; }
.back { background: none; border: 0; padding: 0; font-size: 13.5px; color: var(--ink-mid); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.back:hover { color: var(--ink); }
.lhead { padding: 22px 0 42px; }
.lhead .kicker { display: flex; align-items: center; gap: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); margin: 22px 0 16px; min-height: 13px; }
.lhead h1 { font-size: clamp(32px, 5.4vw, 62px); max-width: 17ch; }
.lhead .sub { font-family: var(--serif); font-size: clamp(18px, 2vw, 24px); color: var(--ink-mid); margin-top: 14px; max-width: 40ch; line-height: 1.32; }
.who { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--rule-soft); display: grid; gap: 4px 34px; font-size: 13.5px; color: var(--ink-mid); grid-template-columns: repeat(auto-fit, minmax(180px, max-content)); }
.who b { font-weight: 600; color: var(--ink); }
.who i { font-style: normal; color: var(--ink-low); }
.pull { margin: 30px 0 0; padding-left: 20px; border-left: 2px solid var(--red); font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.5vw, 29px); line-height: 1.3; max-width: 30ch; }
.context { margin-top: 28px; max-width: 62ch; color: var(--ink-mid); }
.context em { color: var(--ink-low); }
.reader { background: var(--vitrine); color: var(--vit-ink); }
.reader .in { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.08fr); gap: clamp(22px, 3.2vw, 52px); padding: clamp(26px, 4vw, 52px) 0 clamp(32px, 5vw, 68px); align-items: start; }
.plabel { display: flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--vit-mid); padding-bottom: 11px; margin: 0 0 18px; border-bottom: 1px solid var(--vit-rule); }
.plabel .right { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.transcript { font-size: 16.5px; line-height: 1.74; }
.blk { margin-bottom: 1.25em; }
.blk:last-child { margin-bottom: 0; }
.blk-meta { font-size: 13px; line-height: 1.5; color: var(--vit-mid); border: 1px solid var(--vit-rule); padding: 12px 14px; margin-bottom: 1.6em; }
.blk-sign { text-align: right; color: var(--vit-mid); font-style: italic; }
.blk-note { font-size: 13.5px; color: var(--vit-mid); font-style: italic; }
.ln { display: block; padding: 1px 6px; margin-inline: -6px; transition: background-color .14s, color .14s; }
.ln[data-has-region] { cursor: zoom-in; }
.ln[data-has-region]:hover, .ln.is-active { background: #35403c; color: #fff; }
.ln.is-active { box-shadow: inset 2px 0 0 var(--red); }
.orth { margin-top: 24px; padding-top: 13px; border-top: 1px solid var(--vit-rule); font-size: 12.5px; font-style: italic; color: var(--vit-mid); }
.report { margin-top: 16px; font-size: 12.5px; color: var(--vit-mid); display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.report button { font-size: 12.5px; cursor: pointer; background: transparent; color: var(--vit-ink); border: 1px solid var(--vit-rule); padding: 5px 10px; }
.report button:hover { border-color: var(--vit-mid); }
.scan { position: sticky; top: calc(var(--navh) + env(safe-area-inset-top, 0px)); min-width: 0; }
.viewer { position: relative; width: 100%; max-width: 100%; aspect-ratio: 3/4; background: #0f1312; border: 1px solid var(--vit-rule); }
.viewer .osd { position: absolute; inset: 0; }
.viewer .hint { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 12px; font-size: 12px; color: var(--vit-ink); background: rgba(12,15,14,.88); border-top: 1px solid var(--vit-rule); pointer-events: none; transition: opacity .4s; }
.viewer.touched .hint { opacity: 0; }
.viewer .navigator { opacity: 0; transition: opacity .3s; }
.viewer.zoomed .navigator { opacity: 1; }
.rgn { position: absolute; pointer-events: none; border: 1px solid rgba(231,4,7,.9); background: rgba(231,4,7,.13); opacity: 0; transition: opacity .16s; }
.rgn.on { opacity: 1; }
.tools { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; align-items: center; }
.tools button { font-size: 12.5px; line-height: 1; padding: 8px 11px; cursor: pointer; background: transparent; color: var(--vit-mid); border: 1px solid var(--vit-rule); }
.tools button:hover { color: var(--vit-ink); border-color: var(--vit-mid); }
.sheets { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.sheets button { padding: 0; cursor: pointer; background: none; border: 1px solid var(--vit-rule); width: 50px; height: 64px; overflow: hidden; }
.sheets button img { width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: .6; }
.sheets button[aria-pressed="true"] { border-color: var(--red); }
.sheets button[aria-pressed="true"] img { opacity: 1; }
.pager { display: flex; justify-content: space-between; gap: 18px; padding: 30px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pager a { text-decoration: none; color: inherit; max-width: 46%; }
.pager .dir { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); display: block; }
.pager .t { font-family: var(--serif); font-size: 19px; margin-top: 3px; display: block; }
.pager .next { text-align: right; margin-left: auto; }
/* ======================================================== подвал === */

.foot { border-top: 1px solid var(--rule); padding: 34px 0 48px; font-size: 13px; color: var(--ink-mid); }
.foot .cols { display: grid; gap: 22px 36px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot .credit { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; color: var(--ink-low); }
dialog { border: 1px solid var(--rule); background: var(--paper-hi); color: var(--ink); padding: 0; max-width: 520px; width: 92vw; }
dialog::backdrop { background: rgba(23,25,26,.55); }
dialog .pad { padding: 24px; }
dialog h3 { font-size: 22px; margin-bottom: 12px; }
dialog p { font-size: 14px; color: var(--ink-mid); }
dialog label { display: block; font-size: 12px; font-weight: 600; margin: 14px 0 5px; }
dialog textarea, dialog input { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--rule); background: #fff; color: var(--ink); }
dialog textarea { min-height: 62px; resize: vertical; }
/* ===================================================== адаптация === */

@media (max-width: 980px) {
  .hero .in { grid-template-columns: 1fr; }
  .hero .stack { order: -1; max-width: 400px; }
  .game { grid-template-columns: 1fr; }
  .mailbox { grid-template-columns: 1fr; }
  .reader .in { grid-template-columns: 1fr; }
  .scan { position: static; }
  .reader .in > .scan { order: -1; }
  .viewer { aspect-ratio: 4/5; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav .links { gap: 14px; width: 100%; margin-left: 0; }
  .stops { grid-template-columns: 1fr; }
  .pager a { max-width: 100%; }
  .two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* ------------------------------------------------ мелкие блоки --- */

.h-about { font-size: clamp(26px, 3.4vw, 38px); }
.about-text { margin-top: 20px; color: var(--ink-mid); max-width: 62ch; }
.mailbox h3 { font-size: 21px; margin-bottom: 14px; }
.foldnote { margin-top: 18px; font-size: 14px; color: var(--ink-mid); }
#mailnote { margin-top: 14px; font-size: 13.5px; color: var(--ink-mid); min-height: 1.4em; }
.dialog-row { margin-top: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#rstatus { font-size: 13px; color: var(--ink-mid); }
.verdict .src a { color: var(--vit-ink); text-underline-offset: 3px; }
.game .empty { color: var(--vit-mid); }
.letter { display: block; }
/* ================================================= живое письмо === */

.preview { position: sticky; top: calc(var(--navh) + 6px + env(safe-area-inset-top, 0px)); min-width: 0; }
.pv-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pv-switch { display: inline-flex; border: 1px solid var(--rule); }
.pv-switch button {
  font-size: 13px; padding: 7px 13px; cursor: pointer;
  background: transparent; color: var(--ink-mid); border: 0;
}
.pv-switch button + button { border-left: 1px solid var(--rule); }
.pv-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); }
.pv-fold {
  font-size: 13px; padding: 8px 14px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--rule);
}
.pv-fold:hover { border-color: var(--ink); }
.pv-fold[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.pv-stage { position: relative; }
.pv-sheet {
  position: relative; aspect-ratio: 5 / 7; width: 100%; max-width: 420px;
  background:
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(60,70,66,.13) 25px 26px),
    linear-gradient(180deg, #fdfcf8, #f7f4ec);
  box-shadow: 0 14px 34px rgba(20,24,22,.18);
  clip-path: polygon(0% 0%, 50% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path .7s cubic-bezier(.45,.05,.2,1), transform .7s cubic-bezier(.45,.05,.2,1);
  overflow: hidden;
}
.pv-inner { position: absolute; inset: 26px 24px; display: flex; flex-direction: column; gap: 10px; transition: opacity .35s; }
.pv-to { margin: 0; font-size: 15px; color: var(--ink-mid); }
.pv-body { margin: 0; flex: 1; white-space: pre-wrap; overflow: hidden; word-break: break-word; }
.pv-sign { margin: 0; text-align: right; color: var(--ink-mid); }
.pv-sheet[data-pen="hand"] .pv-inner { font-family: "Caveat", var(--serif); font-size: 25px; line-height: 26px; color: #22304a; }
.pv-sheet[data-pen="hand"] .pv-to { font-size: 21px; }
.pv-sheet[data-pen="hand"] .pv-sign { font-size: 21px; }
.pv-sheet[data-pen="type"] .pv-inner { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; line-height: 26px; color: #2b2b2b; }
.pv-sheet[data-pen="type"] .pv-to, .pv-sheet[data-pen="type"] .pv-sign { font-size: 12.5px; }
.pv-body.empty { color: var(--ink-low); }
.pv-flap {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity .5s;
  background: linear-gradient(135deg, transparent calc(50% - .5px), rgba(20,24,22,.22) calc(50% - .5px), rgba(20,24,22,.22) calc(50% + .5px), transparent calc(50% + .5px));
}
.pv-flap.b { background: linear-gradient(225deg, transparent calc(50% - .5px), rgba(20,24,22,.22) calc(50% - .5px), rgba(20,24,22,.22) calc(50% + .5px), transparent calc(50% + .5px)); }
.pv-outside {
  position: absolute; left: 14%; right: 14%; bottom: 13%;
  margin: 0; text-align: center;
  font-family: "Caveat", var(--serif); font-size: 19px; line-height: 1.35; color: #22304a;
  opacity: 0; transition: opacity .4s .3s;
}
.pv-sheet.folded { clip-path: polygon(50% 30%, 50% 30%, 50% 30%, 100% 100%, 0% 100%); transform: rotate(-2deg); }
.pv-sheet.folded .pv-inner { opacity: .1; }
.pv-sheet.folded .pv-flap { opacity: 1; }
.pv-sheet.folded .pv-outside { opacity: 1; }
.pv-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-mid); max-width: 42ch; }
/* =========================================== письмо без расшифровки === */

.nottext { color: var(--vit-mid); font-size: 15.5px; line-height: 1.7; max-width: 60ch; }
.nottext .big { font-family: var(--serif); font-size: clamp(21px, 2.4vw, 27px); line-height: 1.25; color: var(--vit-ink); margin-bottom: 16px; }
.topics-label { margin-top: 26px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--vit-mid); }
.topics { margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--vit-rule); }
.topics li { padding: 9px 0; border-bottom: 1px solid var(--vit-rule); color: var(--vit-ink); font-size: 15px; }
.datenote { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--bronze); font-size: 13.5px; color: var(--bronze); max-width: 56ch; }
.croploading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; font-size: 13px; color: var(--vit-mid); }
.croploading[hidden] { display: none; }
.field .tip { margin-top: 6px; font-size: 12.5px; color: var(--ink-low); }
@media (max-width: 980px) {
  .preview { position: static; }
  .pv-sheet { max-width: 360px; }
}
/* ============================================ архивная среда === */

/* Зерно бумаги и виньетка: одна тонкая плёнка поверх всей страницы —
   она и даёт ощущение не экрана, а вещи. */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(38,41,42,.1) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  background-size: cover, 180px 180px;
}
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .85s cubic-bezier(.2,.7,.3,1), transform .85s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
}
.yr.reveal.in .rule { animation: draw .9s cubic-bezier(.2,.7,.3,1) .15s both; }
@keyframes draw { from { transform: scaleX(0) } to { transform: scaleX(1) } }
/* Логотип проступает слева направо — будто его дописывают. */
.hero .logo { clip-path: inset(0 100% 0 0); }
.hero .logo.in { animation: write 1.5s cubic-bezier(.3,.7,.2,1) .2s both; }
@keyframes write { to { clip-path: inset(0 0 0 0) } }
/* ================================================== лупа === */

.loupe {
  position: fixed; z-index: 70; pointer-events: none;
  width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(20,24,22,.35);
  box-shadow: 0 10px 40px rgba(20,24,22,.35), inset 0 0 0 6px rgba(255,255,255,.5);
  background-repeat: no-repeat; background-color: #f3f1ea;
  opacity: 0; transform: scale(.75); transform-origin: center;
  transition: opacity .18s, transform .22s cubic-bezier(.25,.9,.25,1);
}
.loupe.on { opacity: 1; transform: scale(1); }
.ex-hint {
  position: absolute; right: 0; bottom: 0; padding: 3px 7px;
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(236,237,233,.92); color: var(--ink-low);
  opacity: 0; transition: opacity .25s;
}
.ex-scan:hover .ex-hint { opacity: 1; }

/* ============================================ режим цензуры === */

body.censored-mode .censor-word { position: relative; }
body.censored-mode .censor-word::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: -1px; bottom: -1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left center;
  animation: ink .22s cubic-bezier(.4,0,.3,1) both;
  animation-delay: calc(var(--i) * 16ms);
}
.censor-badge {
  position: fixed; right: clamp(16px, 4vw, 48px); top: calc(var(--navh) + 12px + env(safe-area-inset-top, 0px));
  z-index: 75; width: 180px; pointer-events: none;
  opacity: 0; transform: rotate(-12deg) scale(1.25);
  transition: opacity .2s, transform .35s cubic-bezier(.25,.9,.25,1);
}
.censor-badge.on { opacity: .92; transform: rotate(-7deg) scale(1); }
/* ============================================ звание в шапке === */

.rankchip {
  display: flex; align-items: baseline; gap: 7px; cursor: pointer;
  background: none; border: 1px solid var(--rule); padding: 4px 10px;
  font-size: 11.5px; color: var(--ink-mid); margin-left: 14px;
}
.rankchip[hidden] { display: none; }
.rankchip:hover { border-color: var(--ink-low); color: var(--ink); }
.rankchip-n { color: var(--red); font-weight: 600; }
/* Сообщение о значке: короткая карточка в углу, сама уходит. */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 90;
  transform: translate(-50%, 24px); opacity: 0;
  transition: opacity .35s, transform .45s cubic-bezier(.25,.9,.25,1);
  background: var(--vitrine); color: var(--vit-ink);
  border: 1px solid var(--vit-rule); border-left: 3px solid var(--red);
  padding: 12px 20px; max-width: min(420px, 88vw);
  box-shadow: 0 20px 50px rgba(20,24,22,.35);
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast b { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--vit-mid); font-weight: 600; }
.toast span { display: block; font-family: var(--serif); font-size: 19px; margin-top: 3px; }
/* ============================================ лента: мелочи === */

.ex-try {
  background: none; border: 1px solid var(--rule); color: var(--ink-mid);
  font-size: 11.5px; padding: 3px 9px; cursor: pointer; margin-left: 4px;
}
.ex-try:hover { border-color: var(--red); color: var(--ink); }
.ex-flag.soon { color: var(--ink-low); }
.exhibit.flash { animation: flash 1.2s ease-out; }
@keyframes flash {
  0%   { background: rgba(231,4,7,.12) }
  100% { background: transparent }
}
.nav .links a.hot { color: var(--ink); font-weight: 500; }
.nav .links a.hot::before {
  content: ''; display: inline-block; width: 11px; height: 7px;
  background: var(--red); clip-path: polygon(0 0, 100% 0, 0 100%);
  margin-right: 6px;
}
@media (max-width: 1080px) {
  .hero .in { grid-template-columns: 1fr; }
  .herotry { max-width: 640px; }
  .free-work { grid-template-columns: 1fr; }
  .fs-stage { max-width: 520px; }
}
@media (max-width: 980px) {
  .loupe { display: none; }
  .tl-axis { gap: 18px; }
  .tl-y b { font-size: 24px; }
}
@media (max-width: 760px) {
  .progress { grid-template-columns: 1fr; }
  .pr-nums { grid-row: auto; grid-column: 1; gap: 24px; }
  .pr-nums dd { font-size: 22px; }
  .lv-tab b { font-size: 13.5px; }
  .lv-tab span { display: none; }
  .opt { font-size: 14px; }
  .tl-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
  .tl-head { gap: 10px; }
  .tl-title { gap: 8px; }
  .tl-title i { font-size: 10.5px; }
  .tl-step { width: 34px; height: 34px; }
}
@media (max-width: 460px) {
  .tl-grid { grid-template-columns: 1fr 1fr; }
  .exhibit h3 { font-size: 16px; }
  .ex-sub { display: none; }
  .ex-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* ================================== прочесть самому (страница письма) === */

.sr {
  margin: 0 0 22px; padding: 16px 18px;
  background: rgba(255,255,255,.04); border-left: 2px solid var(--red);
}
.sr p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--vit-mid); }
.sr p b { color: var(--vit-ink); }
.sr-ask { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sr-ask p { flex: 1; min-width: 220px; }
.sr label {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--vit-mid); margin-bottom: 7px;
}
.sr textarea {
  width: 100%; font: inherit; font-size: 15px; line-height: 1.5;
  padding: 10px 12px; background: rgba(0,0,0,.28); color: var(--vit-ink);
  border: 1px solid var(--vit-rule); resize: vertical;
}
.sr textarea:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.sr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px !important; }
.sr-score { font-size: 13px; color: var(--vit-mid); }
.sr-score b { color: var(--red); font-variant-numeric: tabular-nums; }
.sr-small { margin-top: 10px !important; font-size: 12px; color: var(--vit-mid); opacity: .8; }
.btn.sm { font-size: 13px; padding: 8px 14px; }
.sr.blank { margin-top: 26px; }
/* Закрытая расшифровка: слова стоят на местах, но не читаются.
   Разобранное проступает — как проявляется плёнка. */
.transcript.veiled .w[data-n] {
  color: transparent; background: var(--vit-rule);
  border-radius: 1px; user-select: none;
}
.transcript.veiled .w.skip { color: var(--vit-mid); }
.transcript .w.on {
  color: inherit; background: none; box-shadow: none;
  animation: surface .7s cubic-bezier(.25,.9,.25,1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes surface {
  from { color: transparent; background: rgba(231,4,7,.3); }
  60%  { color: inherit; background: rgba(231,4,7,.16); }
  to   { color: inherit; background: transparent; }
}
@media (prefers-reduced-motion: reduce) { .transcript .w.on { animation: none; } }
.ex-sub i { font-style: normal; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-low); }
/* --- четвёртая ступень: письмо, которого никто не читал --- */
.openwork .free-lead b { color: var(--red); }
.ow-meta {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--vit-rule);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.ow-meta span { font-family: var(--serif); font-size: 21px; color: var(--vit-ink); }
.ow-meta i { font-style: normal; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--vit-mid); }
.ow-small { margin-top: 14px; font-size: 12.5px; line-height: 1.55; color: var(--vit-mid); opacity: .85; }
.lv-tab.last b { color: inherit; }
.lv-tab.last[aria-selected="true"] b { color: var(--red); }
@media (max-width: 760px) {
  /* Четыре ступени в столбик не влезают — пусть едут вбок одной лентой. */
  .lv-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .lv-tabs::-webkit-scrollbar { display: none; }
  .lv-tab { flex: 0 0 auto; white-space: nowrap; }
  .ow-meta span { font-size: 18px; }
}
/* ============================================= доставка ========== */

/* Счётчик на входе. Смысл сайта в одной строке: письма дошли тогда,
   до нас — не все. */
.delivery { margin: 26px 0 0; max-width: 460px; }
.dl-bar {
  height: 6px; background: var(--rule); position: relative; overflow: hidden;
}
.dl-bar span {
  position: absolute; inset: 0 auto 0 0; background: var(--red);
  transform-origin: left; animation: dlfill 1.6s cubic-bezier(.25,.9,.25,1) .4s both;
}
@keyframes dlfill { from { transform: scaleX(0) } }
@media (prefers-reduced-motion: reduce) { .dl-bar span { animation: none } }
.dl-t {
  margin: 10px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-mid);
}
.dl-t b {
  font-family: var(--serif); font-size: 26px; color: var(--ink);
  line-height: 1; margin-right: -4px; font-variant-numeric: tabular-nums;
}
.dl-t i {
  font-style: normal; font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-low);
}
/* Связка на четвёртой ступени */
.ow-thread {
  margin: 10px 0 0; font-size: 12.5px; color: var(--vit-mid);
  padding: 8px 12px; background: rgba(231,4,7,.1); border-left: 2px solid var(--red);
}
.ow-thread b { color: var(--vit-ink); font-weight: 400; }
.ow-thread a { color: var(--vit-ink); text-underline-offset: 3px; }
/* ======================================= схема треугольника ====== */

/* Складывание показано схемой, а не анимацией: сгиб идёт по диагонали,
   и всякая попытка проиграть его «живьём» в браузере давала квадрат.
   Схема честнее — и это ровно тот язык, которым такие вещи объясняют
   на выставочных панелях. */
.fact.wide {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 262px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px); align-items: start;
}
.fact.wide .f-text { display: flex; flex-direction: column; gap: 10px; }
.folddia { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 24px); }
/* Стрелка-наконечник живёт в отдельном svg; в сетку он попадать не должен. */
.fd-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fd-step { margin: 0; }
.fd-step svg { display: block; width: 100%; height: auto; }
.fd-step figcaption { display: block; margin-top: 10px; }
.fd-step figcaption b { display: block; font-size: 13px; font-weight: 600; }
.fd-step figcaption span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--ink-mid); }
.d-paper { fill: #fffefb; stroke: rgba(20,24,22,.26); stroke-width: .8; }
.d-flap  { fill: #efece4; stroke: rgba(20,24,22,.22); stroke-width: .8; }
.d-rule line { stroke: rgba(60,70,66,.26); stroke-width: .9; }
.d-fold  { stroke: rgba(20,24,22,.42); stroke-width: 1.1; fill: none; }
.d-fold.soft { stroke: rgba(20,24,22,.2); }
.d-line  { stroke: rgba(20,24,22,.3); stroke-width: .7; }
.d-addr  { font-family: var(--serif); font-style: italic; font-size: 7px; fill: var(--ink-low); }
/* Линия сгиба прочерчивается, стрелка идёт следом — по одному шагу,
   по кругу. Движение есть, а врать геометрией не приходится. */
.d-crease {
  stroke: var(--red); stroke-width: 1; fill: none;
  stroke-dasharray: 3 3; opacity: .55;
}
.d-arrow { stroke: var(--red); stroke-width: 1.2; fill: none; color: var(--red); opacity: 0; }
.fd-step.on .d-crease { animation: creasein .5s ease-out both; }
.fd-step.on .d-arrow  { animation: arrowin .8s cubic-bezier(.3,.7,.2,1) .25s both; }
@keyframes creasein { from { opacity: 0; stroke-dashoffset: 24 } to { opacity: .55; stroke-dashoffset: 0 } }
@keyframes arrowin {
  0%   { opacity: 0; stroke-dasharray: 0 90 }
  40%  { opacity: 1 }
  100% { opacity: .95; stroke-dasharray: 90 0 }
}
.fd-step.on .d-paper, .fd-step.on .d-flap { filter: drop-shadow(0 3px 7px rgba(20,24,22,.14)); }
/* Гаснет только рисунок: подписи должны читаться все четыре сразу. */
.fd-step svg { transition: opacity .45s; }
.folddia.walking .fd-step:not(.on) svg { opacity: .42; }
.folddia.walking .fd-step:not(.on) figcaption b { color: var(--ink-low); font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .folddia.walking .fd-step svg { opacity: 1 }
  .fd-step .d-arrow { opacity: .95; }
}
@media (max-width: 900px) {
  .fact.wide { grid-template-columns: 1fr; }
  .folddia { grid-template-columns: 1fr 1fr; gap: 18px; }
}
/* ================================ выставка в зале ================ */

/* Слова куратора — то, ради чего письма отбирались именно так.
   Стоят перед рассказом о собрании: сначала зачем, потом откуда. */
.bigq { margin: 0 0 clamp(34px, 4vw, 54px); }
.bigq-lead { margin: 0 0 18px; font-size: 15px; line-height: 1.65; color: var(--ink-mid); }
.bigq blockquote {
  margin: 0; padding-left: clamp(16px, 2vw, 24px); border-left: 2px solid var(--red);
  font-family: var(--serif); font-size: clamp(22px, 2.8vw, 31px); line-height: 1.3;
}
.bigq figcaption {
  margin-top: 14px; padding-left: clamp(18px, 2vw, 26px);
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-low);
}
.expo {
  margin: 0 0 clamp(34px, 4vw, 54px); padding: 22px clamp(18px, 2.2vw, 26px);
  background: var(--sunk);
}
.expo h3 { margin: 0 0 10px; font-size: clamp(19px, 1.8vw, 23px); }
.expo p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-mid); }
.expo-credit { margin-top: 12px !important; font-size: 13px !important; color: var(--ink) !important; }
.expo-visit {
  margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: 12.5px !important; color: var(--ink-low) !important;
}
/* Предмет, который в зале лежит рядом с письмом. */
.relic {
  margin: 22px 0 0; padding: 16px 18px;
  border: 1px solid var(--vit-rule); background: rgba(255,255,255,.04);
}
.relic-t {
  margin: 0 0 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
}
.relic p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--vit-mid); }
.relic-s { margin-top: 9px !important; font-size: 11.5px !important; opacity: .7; }
.relic-q {
  margin: 14px 0 0; padding-left: 14px; border-left: 2px solid var(--red);
  font-family: var(--serif); font-size: 15.5px; line-height: 1.55; color: var(--vit-ink);
}
.relic-q cite {
  display: block; margin-top: 9px; font-family: var(--sans); font-style: normal;
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--vit-mid);
}
/* Почтовый быт: широкая схема сгиба наверху, две карточки под ней —
   ровно пополам, без дырки справа. */
.facts3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .facts3 { grid-template-columns: 1fr; } }
/* ============================ музейная страница письма =========== */

/* Без расшифровки колонка одна: лист во всю ширину, чтобы его правда
   можно было рассмотреть, а не разглядывать в щёлочку. */
.reader.solo .in { grid-template-columns: minmax(0, 1fr); max-width: 1000px; }
.reader.solo .viewer { max-height: 78vh; }
.opis { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--vit-rule); }
.opis .topics { margin: 10px 0 0; }
.opis-none { margin: 10px 0 0; font-size: 14px; color: var(--vit-mid); }
.ht-how {
  margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--vit-mid);
}
.lv-pane .ht-how { margin: 0 0 18px; max-width: 76ch; }
.free-lead b { color: var(--vit-ink); }
/* Если скан не доехал, страница говорит об этом словами, а не дырой:
   чаще всего распакован только архив с кодом, без папки img. */
.noimg {
  position: relative; display: grid; place-items: center; min-height: 90px;
  background: repeating-linear-gradient(45deg, rgba(20,24,22,.04) 0 8px, transparent 8px 16px);
  outline: 1px dashed var(--rule);
}
.noimg::after {
  content: 'скан не найден'; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-low); padding: 4px 8px;
  background: var(--paper);
}
.reader .noimg::after, .deshifr .noimg::after { background: var(--vitrine); color: var(--vit-mid); }
.imgwarn {
  position: fixed; left: 12px; bottom: 12px; z-index: 90; max-width: 340px;
  padding: 12px 14px; background: var(--ink); color: var(--paper);
  font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(20,24,22,.3);
}
.imgwarn b { display: block; margin-bottom: 4px; }
.imgwarn code { font-family: var(--mono, monospace); font-size: 11.5px; opacity: .85; }
/* ===================================== сравнение почерков ======== */

.svz { background: var(--vitrine); color: var(--vit-ink); }
.svz .shead h2 { color: var(--vit-ink); }
.svz .shead p, .svz .eyebrow { color: var(--vit-mid); }
.pch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.pch-pair { display: grid; gap: 18px; }
.fr { margin: 0; }
.fr-n {
  display: block; margin-bottom: 7px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--vit-mid);
}
.fr-img {
  background-repeat: no-repeat; background-color: #efe7d4;
  border: 1px solid var(--vit-rule); min-height: 90px;
  transition: box-shadow .4s;
}
.fr.told .fr-img { box-shadow: 0 0 0 1px var(--red); }
.fr figcaption {
  margin-top: 8px; min-height: 1.2em; font-size: 12px; color: var(--vit-mid);
  opacity: 0; transition: opacity .4s;
}
.fr.told figcaption { opacity: 1; }
.pch-q { margin: 0 0 16px; font-family: var(--serif); font-size: clamp(19px, 2vw, 24px); line-height: 1.3; }
.pch-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.pch-btns .gbtn.picked { outline: 2px solid var(--red); outline-offset: 2px; }
.pch-btns .gbtn:disabled { opacity: .55; cursor: default; }
.pch-out { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--vit-rule); }
.pch-v { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.4; color: var(--red); }
.pch-v.ok { color: var(--vit-ink); }
.pch-h { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--vit-mid); }
.pch-out .src { margin-top: 12px; font-size: 13px; }
.pch-out .src a { color: var(--vit-ink); text-underline-offset: 3px; }
.pch-tip {
  margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--vit-rule);
  font-size: 12.5px; line-height: 1.6; color: var(--vit-mid); opacity: .8;
}
@media (max-width: 900px) {
  .pch { grid-template-columns: 1fr; }
}
.fr-img { overflow: hidden; }
/* ======================================== зачем это всё ========== */

.why { background: var(--sunk); }
.why-list { list-style: none; counter-reset: w; margin: 0; padding: 0; display: grid; gap: 22px; }
.why-list li {
  counter-increment: w; position: relative; padding-left: 46px;
  font-size: 15px; line-height: 1.65; color: var(--ink-mid);
}
.why-list li::before {
  content: counter(w); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px; color: var(--ink);
  border: 1px solid var(--rule);
}
.why-list b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 3px; }
.why-foot {
  margin: clamp(24px, 3vw, 34px) 0 0; padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-low);
}
.love {
  margin: 10px 0 0; font-family: var(--serif); font-style: italic;
  font-size: 14px; color: var(--ink-low); line-height: 1.45;
}
.love a { color: var(--ink-mid); text-decoration: none; border-bottom: 1px solid var(--rule); }
.love a:hover { color: var(--ink); border-bottom-color: var(--ink-low); }
.dl-sep { display: inline-block; width: 18px; }
