/* книжка: палитра, шрифты и картонки из простого варианта */
@font-face { font-family: Inter; src: url(/static/2c94bcb761/fonts/inter-Regular.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: Inter; src: url(/static/2c94bcb761/fonts/inter-Medium.woff2) format("woff2"); font-weight: 500; }
@font-face { font-family: Inter; src: url(/static/2c94bcb761/fonts/inter-SemiBold.woff2) format("woff2"); font-weight: 600; }
@font-face { font-family: Inter; src: url(/static/2c94bcb761/fonts/inter-ExtraBold.woff2) format("woff2"); font-weight: 800; }
@font-face { font-family: Neucha; src: url(/static/2c94bcb761/fonts/neucha.woff2) format("woff2"); }

:root { --bg: #96A6BA; --deep: #5C6C84; --haze: #C9D3DF; --kraft: #C8A27A; --lamp: #EBC48E; --paper: #F4EEE4; --ink: #2F3A4C; --edge: #6b4f35; }
* { box-sizing: border-box; }
html, body { margin: 0; }
/* первый экран = книжка, ниже текст со всеми ссылками (для людей и поисковиков). колесо листает книжку, после последнего разворота прокручивает к тексту */
body { background: #0f131b; color: var(--paper); font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-x: hidden; }
.hand { font-family: Neucha, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }

.stage { position: relative; height: 100vh; height: 100svh; }
.stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.stage.hover canvas { cursor: pointer; }
/* в саду взял метлу: курсор метлой, остриё в нижнем левом углу */
.stage.broom canvas, .stage.broom.hover canvas { cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><path d='M27 3 L14 18' stroke='%235a4030' stroke-width='3' stroke-linecap='round'/><path d='M14 18 l-3.5 -2 -8.5 10 4 4 10 -8.5 z' fill='%23c9a052' stroke='%236b4a26' stroke-width='1.4' stroke-linejoin='round'/><path d='M11 17.5 l3 3' stroke='%238a4a26' stroke-width='2'/><path d='M4 26 l3 3 M6.5 23.5 l3 3 M9 21 l3 3' stroke='%238a6a3a' stroke-width='.8'/></svg>") 3 29, pointer; }

/* картонка с неровным краем и торцом */
.cut-k { position: absolute; inset: 0; z-index: -1; background: var(--kraft) url(/static/2c94bcb761/img/kraft.webp) 0 0 / 512px; border-radius: 2px;
  filter: url(#rough) drop-shadow(0 3px 0 var(--edge)) drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }

.brand { position: absolute; left: clamp(16px, 3vw, 44px); top: 22px; z-index: 5; display: flex; align-items: baseline; gap: 12px; color: var(--haze); pointer-events: none; }
.brand .hand { font-size: 34px; color: var(--paper); }
.brand small { font-size: 14px; opacity: .7; }

/* закладки: картонные ярлыки торчат снизу, открытый раздел выдвинут и светлее */
.marks { position: absolute; left: 50%; bottom: 0; z-index: 5; display: flex; align-items: flex-end; gap: 6px; translate: -50% 0; }
.marks button { position: relative; isolation: isolate; padding: 11px 18px 20px; font: 400 19px/1 Neucha, sans-serif; color: var(--ink); translate: 0 8px; transition: translate .2s; }
.marks button .cut-k { border-radius: 12px 12px 0 0; }
.marks button::after { content: ""; position: absolute; left: 10px; right: 10px; top: 5px; border-top: 1.5px dashed rgba(47, 58, 76, .3); }
.marks button:hover { translate: 0 3px; }
.marks button.on { translate: 0 -5px; }
.marks button.on .cut-k { background-color: var(--haze); background-blend-mode: multiply; }

/* стрелки: багажные бирки остриём по направлению, с дыркой у острия */
.arrow { position: absolute; top: 50%; z-index: 5; width: 70px; height: 46px; translate: 0 -50%; isolation: isolate; color: var(--ink); font-size: 24px; font-weight: 800; }
.arrow .cut-k { background: none; }
.arrow .cut-k::before { content: ""; position: absolute; inset: 0; background: var(--kraft) url(/static/2c94bcb761/img/kraft.webp) 0 0 / 512px; }
.arrow--next .cut-k::before { clip-path: polygon(0 0, 74% 0, 100% 50%, 74% 100%, 0 100%); }
.arrow--prev .cut-k::before { clip-path: polygon(26% 0, 100% 0, 100% 100%, 26% 100%, 0 50%); }
.arrow::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #0f131b; box-shadow: 0 0 0 2.5px rgba(244, 238, 228, .55); }
.arrow--next { right: clamp(12px, 2.4vw, 40px); padding-right: 22px; }
.arrow--next::after { right: 12px; }
.arrow--prev { left: clamp(12px, 2.4vw, 40px); padding-left: 22px; }
.arrow--prev::after { left: 12px; }
.arrow:disabled { opacity: .25; cursor: default; }

/* подсказка: бумажная бирка на нитке, тихо качается */
.hint { position: absolute; right: clamp(16px, 3vw, 44px); top: 40px; z-index: 5; margin: 0; max-width: 250px; padding: 28px 18px 14px; font-size: 18px; line-height: 1.25; color: var(--ink);
  isolation: isolate; pointer-events: none; transform-origin: 50% -40px; animation: sway 6s ease-in-out infinite; }
.hint .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
.hint::before { content: ""; position: absolute; left: 50%; top: -40px; width: 1.5px; height: 54px; background: rgba(201, 211, 223, .75); }
.hint::after { content: ""; position: absolute; left: calc(50% - 5px); top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #0f131b; box-shadow: 0 0 0 3px var(--kraft); }
/* большой ключ: у скважины и в шкатулке записка уходит */
.hint { transition: opacity .3s; }
.hint.gone { opacity: 0; pointer-events: none; transition: opacity 1.2s; }
html.bk-zoom .hint { opacity: 0; }
@keyframes sway { 0%, 100% { rotate: 1.2deg; } 50% { rotate: 3deg; } }

/* звук: на виду, слева снизу */
.snd { position: absolute; left: clamp(16px, 3vw, 44px); bottom: 22px; z-index: 5; isolation: isolate; padding: 8px 14px 9px; font-size: 18px; color: var(--ink); rotate: -2deg; }
.snd i { font-style: normal; }
.snd b { font-weight: 400; border-bottom: 1.5px solid rgba(47, 58, 76, .5); }
.snd.off { opacity: .6; }
.snd.off b { border-bottom-style: dashed; }
/* лупа (матвей 20.10): кнопка только где палец. рамка картонным кольцом с ручкой поверх канваса, стекло рисует сам канвас (loupe.js) */
.lupa { display: none; position: absolute; left: clamp(16px, 3vw, 44px); bottom: 70px; z-index: 5; isolation: isolate; align-items: center; gap: 5px; padding: 6px 12px 7px 9px; font-size: 17px; color: var(--ink); rotate: 2deg; }
.lupa svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.lupa b { font-weight: 400; }
.lupa.on .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
@media (max-width: 760px), (pointer: coarse) { .lupa { display: inline-flex; } }
.stage.looking canvas { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.loupe { position: absolute; left: 0; top: 0; z-index: 4; width: var(--d, 200px); height: var(--d, 200px); pointer-events: none; visibility: hidden; }
.loupe.on { visibility: visible; }
.loupe__k { position: absolute; inset: 0; filter: url(#rough) drop-shadow(0 3px 0 var(--edge)) drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
/* кольцо шире стекла внутрь на 7 px: край круга из канваса всегда под картоном */
.loupe__k b { position: absolute; inset: -10px; border-radius: 50%; background: var(--kraft) url(/static/2c94bcb761/img/kraft.webp) 0 0 / 512px;
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 17px), #000 calc(100% - 16px)); mask: radial-gradient(closest-side, transparent calc(100% - 17px), #000 calc(100% - 16px)); }
/* ручка вниз-вправо под 15 градусов, палец держит её конец (loupe.js: HL, TILT) */
.loupe__k s { position: absolute; left: calc(50% - 12px); top: 50%; width: 24px; height: 74px; border-radius: 3px 3px 10px 10px; transform-origin: 50% 0;
  transform: rotate(-15deg) translateY(calc(var(--d, 200px) / 2 + 2px)); background: linear-gradient(rgba(70, 45, 20, .28), rgba(70, 45, 20, .28)), var(--kraft) url(/static/2c94bcb761/img/kraft.webp) 0 0 / 512px; }
.loupe__glint { position: absolute; inset: 7px; border-radius: 50%; box-shadow: inset 0 0 10px rgba(0, 0, 0, .45); background: radial-gradient(circle at 27% 22%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 11%); }

/* внизу только две мелкие ссылки: текстовая версия и версия для нейронок (матвей 19.10, закладки и текст под книжкой убраны) */
.links { position: absolute; left: 50%; bottom: 26px; z-index: 5; display: flex; gap: 22px; margin: 0; translate: -50% 0; white-space: nowrap; }
.links a { font-size: 17px; color: var(--haze); text-decoration: none; border-bottom: 1.5px dashed rgba(201, 211, 223, .55); }
.links a:hover { color: var(--paper); }
/* 20.10 как r10: на заставке ссылки поверх неё (на медленном телефоне можно не ждать 3D) */
body:has(#loading:not(.off)) .links { z-index: 10; }

.tip { position: fixed; left: 0; top: 0; z-index: 7; padding: 4px 10px 5px; font-size: 20px; color: var(--ink); background: var(--paper); border-radius: 2px;
  box-shadow: 0 3px 0 #b9ab94, 0 8px 12px rgba(0, 0, 0, .35); pointer-events: none; opacity: 0; transition: opacity .15s; transform: rotate(-2deg); white-space: nowrap; }
.tip.on { opacity: 1; }
/* длинные подписи большого ключа на телефоне переносятся, а не уезжают за край */
@media (max-width: 760px) { .tip { white-space: normal; max-width: calc(100vw - 24px); text-align: center; } }
/* вспышка молнии поверх книжки, под надписями */
.flash { position: fixed; inset: 0; z-index: 4; pointer-events: none; background: #dfe8ff; opacity: 0; mix-blend-mode: screen; }

.note { position: absolute; right: clamp(20px, 9.5vw, 160px); top: 50%; z-index: 8; width: 340px; padding: 30px 28px 26px; color: var(--ink); isolation: isolate;
  translate: 0 -50%; rotate: 1.2deg; opacity: 0; pointer-events: none; transform: translateY(14px) scale(.96); transition: opacity .25s, transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.note--l { right: auto; left: clamp(20px, 9.5vw, 160px); rotate: -1.4deg; }
.note.on { opacity: 1; pointer-events: auto; transform: none; }
.note::before { content: ""; position: absolute; left: calc(50% - 46px); top: -12px; width: 92px; height: 26px; rotate: -3deg; background: rgba(214, 196, 160, .75); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.note__t { margin: 0 0 8px; font: 800 24px/1.15 Inter, sans-serif; }
.note__b p { margin: 0 0 8px; font-size: 16px; line-height: 1.45; }
.note__b .stub { font-family: Neucha, sans-serif; font-size: 18px; opacity: .75; }
.note__x { position: absolute; right: 10px; top: 4px; font-size: 26px; line-height: 1; color: var(--ink); opacity: .7; }
.go { display: inline-block; margin-top: 6px; padding: 9px 16px 10px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--paper); background: var(--ink);
  border-radius: 4px; box-shadow: 0 3px 0 #1a212d, 0 8px 12px rgba(0, 0, 0, .3); }
.go--off { color: var(--ink); background: transparent; box-shadow: none; padding: 0; border-bottom: 2px dashed rgba(47, 58, 76, .5); border-radius: 0; font-weight: 600; }

/* картинка в записке: кадр или скрин, у логотипа без обрезки */
.note__img { display: block; width: 100%; max-height: 180px; margin: 4px 0 12px; object-fit: cover; object-position: center 30%; border-radius: 3px; box-shadow: 0 2px 0 rgba(47, 58, 76, .25), 0 6px 12px rgba(0, 0, 0, .18); }
.note__img--phone { width: 52%; max-height: 230px; object-position: top; }
.note__img--logo { width: auto; max-width: 40%; max-height: 120px; object-fit: contain; box-shadow: none; }
.note__b .nick { margin-bottom: 4px; font: 700 18px/1.2 Inter, sans-serif; }
/* сноска про meta: мелко, но читается */
.meta, .note__b .meta { margin: 12px 0 0; font: 400 12px/1.35 Inter, sans-serif; opacity: .72; }
.sheet .meta { font-size: 13px; }

.loading { position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; color: var(--haze); background: #0f131b; transition: opacity .6s; }
.loading.off { opacity: 0; pointer-events: none; }
/* заставка: картонка с процентами и полоской, как бирки вокруг книжки */
.loading__box { position: relative; isolation: isolate; width: 260px; padding: 18px 24px 22px; color: var(--ink); rotate: -1.5deg; }
.loading__t { margin: 0 0 12px; font-size: 28px; line-height: 1; text-align: center; }
.loading__t i { font-style: normal; }
.loading__t b { font-weight: 400; display: inline-block; min-width: 1.1em; text-align: right; }
.loading__bar { height: 12px; border-radius: 6px; background: rgba(47, 58, 76, .18); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); overflow: hidden; }
.loading__bar i { display: block; height: 100%; border-radius: 6px; background: var(--ink); transform: translateX(-100%); transition: transform .25s; }
.loading__pc { display: none; margin: 0; max-width: 280px; font-size: 19px; line-height: 1.3; text-align: center; color: var(--haze); }

/* плашка «лучше с компа»: только на телефоне, между стрелками */
.pc { display: none; }

.panel { display: none; }
.nogl { position: relative; z-index: 6; max-width: 640px; margin: 0 auto; padding: 90px 20px 60px; }
body.nogl-on { overflow: auto; }
.nogl__why { margin: 0 0 18px; color: #c9d2e0; font-size: 19px; line-height: 1.35; }
body.nogl-on .marks, body.nogl-on .arrow, body.nogl-on .hint, body.nogl-on .snd, body.nogl-on .lupa { display: none; }

/* текст всей книжки под первым экраном: видно и людям, и поисковикам */
.plain { position: relative; max-width: 720px; margin: 0 auto; padding: 70px 20px 40px; }
.plain__t { margin: 0 0 6px; font: 400 36px/1.1 Neucha, sans-serif; color: var(--paper); }
.plain__lead { margin: 0 0 30px; color: #c9d2e0; font-size: 17px; }
.plain__lead a { color: var(--lamp); }
.sheet .arts a, .note__b .arts a { color: var(--ink); font-weight: 600; }
.note__b .arts { margin: 0 0 8px; padding-left: 18px; font-size: 16px; line-height: 1.5; }

/* текст разворота картонкой (телефон и 2D) */
.sheet { position: relative; isolation: isolate; margin: 0 0 40px; padding: 26px 22px 22px; color: var(--ink); }
.sheet h2 { margin: 0 0 10px; font: 400 34px/1.1 Neucha, sans-serif; }
.sheet ul { margin: 0; padding: 0; list-style: none; }
.sheet li { margin: 0 0 10px; padding-left: 16px; text-indent: -16px; font: 19px/1.35 Neucha, sans-serif; }
.sheet li::before { content: "- "; }
.sheet p { margin: 0 0 10px; }
.sheet .big { font: 800 44px/1 Inter, sans-serif; letter-spacing: -.02em; margin: 2px 0 10px; }
.sheet a { color: var(--ink); font-weight: 600; }

@media (max-width: 760px) {
  body { overflow: auto; }
  /* под книжкой больше ничего нет: стол на весь экран, внизу стрелки и две ссылки */
  .stage { position: relative; height: calc(100svh - 64px); min-height: 420px; }
  .brand { position: absolute; top: 14px; }
  .brand .hand { font-size: 26px; }
  /* подсказка и на телефоне: бирка по центру над книжкой, там пусто (матвей 20.10: «на телефоне неинтуитивно, что можно кликать») */
  .hint { left: 50%; right: auto; top: 84px; translate: -50% 0; width: max-content; max-width: min(300px, calc(100vw - 48px)); padding: 24px 16px 12px; font-size: 17px; text-align: center; }
  .links { position: relative; left: auto; bottom: auto; translate: none; justify-content: center; height: 64px; align-items: center; padding: 0 12px; }
  .links a { font-size: 16px; }
  .plain { padding-top: 10px; }
  .arrow { position: absolute; top: max(362px, calc(100svh - 64px - 58px)); width: 58px; height: 38px; font-size: 19px; }
  /* семь закладок в две строки, без прокрутки вбок */
  .marks { position: sticky; left: auto; bottom: auto; top: 0; translate: none; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2px 4px; padding: 0 6px 6px; background: #0f131b; }
  .marks button { padding: 14px 9px 8px; font-size: 16px; translate: 0 -6px; }
  .marks button .cut-k { border-radius: 0 0 10px 10px; }
  .marks button::after { top: auto; bottom: 5px; }
  .marks button:hover { translate: 0 -6px; }
  .marks button.on { translate: 0 0; }
  .snd { position: absolute; left: auto; right: 14px; bottom: auto; top: 14px; font-size: 16px; padding: 6px 11px 7px; }
  .lupa { left: auto; right: 14px; bottom: auto; top: 54px; font-size: 16px; }
  .note { left: 16px; right: 16px; width: auto; top: auto; bottom: 16px; translate: none; }
  .loading__pc { display: block; }
  /* по высоте как стрелки, по ширине между ними */
  .pc { display: block; position: absolute; left: 50%; top: calc(max(362px, calc(100svh - 64px - 58px)) + 19px); z-index: 5; width: min(230px, calc(100vw - 172px)); padding: 9px 22px 10px 12px;
    translate: -50% -50%; rotate: 1deg; isolation: isolate; font-size: 15px; line-height: 1.2; text-align: center; color: var(--ink); transition: translate .2s cubic-bezier(.6, 0, 1, .5), rotate .2s cubic-bezier(.6, 0, 1, .5); }
  .pc .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
  .pc i { position: absolute; right: 7px; top: 3px; font-style: normal; font-size: 17px; opacity: .6; }
  /* уходит одним резким рывком вниз за край экрана, без затухания */
  .pc.off { translate: -50% 340%; rotate: 10deg; visibility: hidden; pointer-events: none;
    transition: translate .2s cubic-bezier(.6, 0, 1, .5), rotate .2s cubic-bezier(.6, 0, 1, .5), visibility 0s .2s; }
}

/* загадка: карман из крафта справа снизу, появляется с первой находкой (ультра). ячейки = прострочённые гнёзда */
.pocket { position: absolute; right: clamp(16px, 3vw, 44px); bottom: 22px; z-index: 6; isolation: isolate; padding: 26px 14px 12px; color: var(--ink); rotate: 1.5deg;
  translate: 0 calc(100% + 40px); transition: translate .35s cubic-bezier(.3, 1.4, .5, 1); }
.pocket.on { translate: 0 0; }
.pocket::after { content: ""; position: absolute; inset: 6px; border: 1.5px dashed rgba(47, 58, 76, .38); border-radius: 3px; pointer-events: none; }
.pocket__t { position: absolute; left: 14px; top: 6px; margin: 0; font-size: 16px; line-height: 1; opacity: .75; }
.pocket__s { display: flex; gap: 10px; }
.pocket__c { position: relative; width: 60px; height: 60px; border-radius: 50%; background: rgba(74, 52, 34, .22); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 240, 215, .35);
  transition: translate .18s, background-color .18s; }
.pocket__c:disabled { cursor: default; }
.pocket__c canvas { position: absolute; inset: 2px; width: 56px; height: 56px; transition: opacity .2s; }
.pocket__c:not(:disabled):hover { translate: 0 -3px; }
.pocket__c.sel { translate: 0 -9px; background-color: rgba(235, 196, 142, .6); }
.pocket__c.used canvas { opacity: .3; filter: grayscale(1); }
.pocket__c.wait canvas { opacity: 0; }
.pocket__c.in canvas { animation: pz-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.pocket__c.nope canvas, .pz-hand.nope { animation: pz-nope .55s; }
.pocket__done { display: none; position: absolute; right: 8px; bottom: calc(100% + 6px); margin: 0; padding: 5px 10px 6px; font-size: 17px; white-space: nowrap; color: var(--ink);
  background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; border-radius: 2px; rotate: -2deg; box-shadow: 0 3px 0 var(--edge), 0 8px 10px rgba(0, 0, 0, .35); }
.pocket.say .pocket__done { display: block; }
/* большой ключ: длинная 4-я ячейка, скетч из шкатулки 5-й. появляются, когда есть что положить; пустые гнёзда находок после сборки уходят */
.pocket__c--big, .pocket__c--scrap { display: none; }
.pocket__c--big.on, .pocket__c--scrap.on { display: block; }
.pocket__c--big { width: 124px; border-radius: 30px; }
.pocket__c--big canvas { width: 120px; }
.pocket.big .pocket__c:not(.pocket__c--big):not(.pocket__c--scrap) { display: none; }
.pocket__c.out canvas { opacity: .3; }
.pocket__c.part { background-color: rgba(201, 163, 92, .28); }
@keyframes pz-in { 0% { scale: .5; } 100% { scale: 1; } }
@keyframes pz-nope { 0%, 100% { rotate: 0deg; } 20% { rotate: -16deg; } 45% { rotate: 13deg; } 70% { rotate: -7deg; } }
.pz-fly { position: fixed; left: 0; top: 0; z-index: 8; width: 80px; height: 80px; pointer-events: none; opacity: 0; }
.pz-hand { position: fixed; left: 0; top: 0; z-index: 8; width: 46px; height: 46px; pointer-events: none; display: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
html.pz-hold .pz-hand { display: block; }
@media (pointer: coarse) { html.pz-hold .pz-hand { display: none; } }
@media (max-width: 760px) {
  /* на телефоне между стрелками, где была плашка «лучше с компа» (она уходит раньше, чем найдётся первая вещь) */
  .pocket { right: auto; bottom: auto; left: 50%; top: calc(max(362px, calc(100svh - 64px - 58px)) + 19px); padding: 9px 12px; rotate: 0deg;
    translate: -50% 120px; opacity: 0; transition: translate .35s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; }
  .pocket.on { translate: -50% -50%; opacity: 1; }
  .pocket__t { display: none; }
  .pocket__s { gap: 8px; }
  .pocket__c { width: 46px; height: 46px; }
  .pocket__c canvas { width: 42px; height: 42px; }
  .pocket__done { right: 50%; translate: 50% 0; font-size: 15px; width: max-content; max-width: min(300px, 80vw); white-space: normal; text-align: center; }
  .pocket__c--big { width: 98px; }
  .pocket__c--big canvas { width: 94px; }
}

/* просмотр скетчей поверх книжки (из v6): тёмный стол, фото на бумаге со скотчем, бирки-стрелки как у книжки */
html.lb-on, html.lb-on body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 20; background: rgba(10, 13, 19, .9); }
.lb[hidden], .lb [hidden] { display: none !important; }
.lb__view { position: absolute; inset: 0; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; translate: 0 -10px; }
.lb__frame { position: relative; padding: 12px; background: #fbf6ec url(/static/2c94bcb761/img/paper.webp) 0 0 / 420px; border-radius: 2px; cursor: zoom-in; will-change: transform;
  box-shadow: 0 3px 0 #c8a27a, 0 5px 0 #6b4f35, 0 26px 50px rgba(0, 0, 0, .6); transition: transform .12s; }
.lb--zoom .lb__frame { cursor: grab; transition: none; }
.lb__frame::before { content: ""; position: absolute; left: calc(50% - 50px); top: -13px; width: 100px; height: 28px; rotate: -2deg; background: rgba(214, 196, 160, .78); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.lb__img { display: block; background: #e9e1d2; }
.lb__cap { max-width: min(640px, 88vw); margin: 0; color: var(--paper); font-size: 23px; line-height: 1.3; text-align: center; }
.lb__n { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; margin: 0; color: var(--haze); font-size: 18px; white-space: nowrap; opacity: .85; }
.lb .arrow { z-index: 2; }
.lb__n small { display: block; font-size: .8em; opacity: .75; }
.lb__x { position: absolute; right: clamp(12px, 2.4vw, 40px); top: 18px; z-index: 3; width: 52px; height: 48px; isolation: isolate; color: var(--ink); font-size: 32px; line-height: 1; }
@media (max-width: 760px) {
  .lb__fig { translate: 0 -34px; }
  .lb .arrow { top: auto; bottom: 14px; translate: none; width: 62px; height: 42px; }
  .lb__n { bottom: 16px; font-size: 16px; line-height: 1.2; white-space: normal; width: calc(100% - 180px); text-align: center; }
  .lb__x { top: 12px; right: 12px; }
  .lb__cap { font-size: 20px; }
}

/* плашка графики: «видеокарта не вытянула» (gfx.js) */
.gfx-note { position: fixed; left: 50%; top: 18px; z-index: 11; translate: -50% 0; max-width: calc(100vw - 32px); padding: 10px 40px 11px 16px; color: var(--ink); isolation: isolate; rotate: -1deg; font-size: 19px; line-height: 1.25; }
.gfx-note .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
.gfx-note p { margin: 0; }
.gfx-note p + p { margin-top: 8px; }
.gfx-note.lost { padding-right: 16px; text-align: center; }
.gfx-note__go { border-bottom: 1.5px solid rgba(47, 58, 76, .6); }
.gfx-note__a { margin-left: 12px; color: var(--ink); }
@media (max-width: 760px) {
  .gfx-note { top: 60px; font-size: 17px; }
}

/* счётчик секретов (secrets.js): картонная бирка под надписью Iron0re, до первого секрета её нет. новый секрет = прыжок и цифра переворачивается */
.sec { position: absolute; left: clamp(16px, 3vw, 44px); top: 76px; z-index: 5; isolation: isolate; padding: 6px 13px 7px; font-size: 18px; color: var(--ink); rotate: -1.5deg; pointer-events: none; transform-origin: 20% 0; }
.sec[hidden] { display: none; }
.sec b { display: inline-block; min-width: .6em; font-weight: 400; text-align: center; }
.sec--all .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
.sec--in { animation: sec-in .55s cubic-bezier(.3, 1.5, .5, 1); }
.sec--bump { animation: sec-bump .5s cubic-bezier(.3, 1.6, .5, 1); }
.sec--bump b { animation: sec-flip .45s ease-out; }
@keyframes sec-in { 0% { translate: 0 -90px; rotate: -12deg; } 100% { translate: 0 0; rotate: -1.5deg; } }
@keyframes sec-bump { 0% { scale: 1; } 35% { scale: 1.22; rotate: 3deg; } 100% { scale: 1; rotate: -1.5deg; } }
@keyframes sec-flip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0deg); } }
/* все нашлись: бумажный салют как в финале и «молодец» посередине, мимо кликов */
.sec-fw { position: fixed; inset: 0; z-index: 6; pointer-events: none; visibility: hidden; }
.sec-fw.on { visibility: visible; }
.sec-fw__b { position: absolute; opacity: 0; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.sec-fw.on .sec-fw__b { animation: sec-burst 2.6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes sec-burst { 0% { opacity: 0; scale: .15; rotate: -25deg; } 22% { opacity: 1; scale: 1.12; } 34% { scale: 1; } 78% { opacity: 1; scale: 1; rotate: 6deg; } 100% { opacity: 0; scale: .55; rotate: 12deg; } }
.sec-fw__say { position: absolute; left: 50%; top: 38%; margin: 0; width: max-content; max-width: calc(100vw - 48px); padding: 12px 20px 13px; isolation: isolate; font-size: 26px; line-height: 1.2; text-align: center; color: var(--ink);
  translate: -50% -50%; rotate: -2deg; opacity: 0; }
.sec-fw__say .cut-k { background: var(--paper) url(/static/2c94bcb761/img/paper.webp) 0 0 / 512px; }
.sec-fw.on .sec-fw__say { animation: sec-say 6s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes sec-say { 0% { opacity: 0; scale: .6; } 7% { opacity: 1; scale: 1; } 90% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: .95; } }
body.nogl-on .sec { display: none; }
@media (max-width: 760px) {
  /* слева под надписью: записка по центру ниже (с 84px), звук и лупа справа */
  .sec { left: 14px; top: 50px; padding: 4px 10px 5px; font-size: 15px; }
  /* записка первые 30 с ещё висит: с биркой спускается ниже, чтобы не наезжать на её угол */
  .sec:not([hidden]) ~ .hint { top: 100px; transition: opacity .3s, top .4s; }
  .sec-fw__say { top: 42%; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .sec--in, .sec--bump, .sec--bump b { animation: none; } }

/* подписка на уведомления (push.js): записка в книжке, панель, текстовый блок, text/ */
.push__t { margin: 0 0 8px; }
.push__hint { font-family: Neucha, sans-serif; font-size: 18px; line-height: 1.3; }
button.push__btn { margin-top: 4px; border: 0; cursor: pointer; font: 700 15px/1.3 Inter, sans-serif; color: #f4eee4; background: #2f3a4c; }
button.push__off { margin-top: 2px; padding: 0; border: 0; border-bottom: 2px dashed rgba(47, 58, 76, .5); background: none; cursor: pointer; font: 600 15px/1.4 Inter, sans-serif; color: #2f3a4c; }
.push__meta { margin: 10px 0 0; font-size: 12px; opacity: .72; }
.push__meta a { color: inherit; font-weight: 400; }
.push-toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; translate: -50% 0; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; color: #2f3a4c; background: #f4eee4; border-radius: 4px;
  box-shadow: 0 3px 0 #c8a27a, 0 5px 0 #6b4f35, 0 14px 26px rgba(0, 0, 0, .45); font: 400 19px/1.3 Neucha, sans-serif; }
/* правка макета: на телефоне .sheet a перебивал цвет у кнопок-ссылок («в телеграм», «открыть» у проектов), текст сливался с фоном */
.sheet a.go { color: var(--paper); }

/* сборка (site/build.py): внизу три ссылки вместо двух (текстовая версия, статьи, версия для нейронок), на телефоне ужимаем, чтобы влезло в 360 */
@media (max-width: 760px) {
  .links { gap: 14px; padding: 0 8px; }
  .links a { font-size: 15px; }
}
@media (max-width: 360px) {
  .links { gap: 10px; }
  .links a { font-size: 14px; }
}
