/* Ночь в Биомузее: ночное небо из картинки дома, тёплый свет залов,
   кремовые карточки и эмаль значков. У зала свой цвет (--hc), у
   проводника свой (--rc).
   Раскладка: телефон — одна колонка, карта показывается на первом экране
   и на экране карты. От 980 px дом стоит слева и не уезжает при прокрутке,
   панель справа; зал открывается во всю ширину в две колонки. */

:root {
  --bg: #0e1328;
  --bg-2: #fbf4e4;
  --ink: #f6efe0;
  --ink-2: #c9c3b4;
  --ink-3: #8e97a8;
  --line: rgba(246, 239, 224, .14);
  --accent: #f0c36a;
  --accent-ink: #2a1d05;
  --card: #fbf4e4;
  --card-ink: #2b2418;
  --card-ink-2: #6a604c;
  --rc: #f0c36a;
  --hc: #f0c36a;
  --shadow: 0 24px 50px -22px rgba(0, 0, 0, .8);
}
html { background: #0b0f22; }
body { background: radial-gradient(120% 60% at 50% 0%, #26345a 0%, #0e1328 55%, #0a0d1f 100%) fixed; color: var(--ink); }
.center { text-align: center; }
.note { color: var(--ink-3); }
.count { font-weight: 700; color: var(--ink-2); }
.card { background: var(--card); color: var(--card-ink); }
.card .eyebrow { color: #8a7a55; }
.btn--soft { background: rgba(255, 255, 255, .08); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost { color: var(--ink); }
.btn svg { flex: none; }
.sheet__in { background: var(--card); color: var(--card-ink); }
.sheet .btn--soft { background: #efe4cc; color: var(--card-ink); border-color: rgba(43, 36, 24, .12); }
.sheet .note { color: var(--card-ink-2); }
.eyebrow svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }

/* ---------- шапка и каркас */
#bar { position: sticky; top: 0; z-index: 30; padding: calc(8px + var(--sat)) 16px 8px; background: linear-gradient(to bottom, rgba(10, 13, 31, .96) 60%, rgba(10, 13, 31, 0)); }
#bar .top { max-width: 520px; margin: 0 auto; }
.top__name { color: var(--ink); }
.top__name small { color: var(--ink-3); }
.top__link { color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.top__link svg { width: 16px; height: 16px; }
.shell { display: flex; flex-direction: column; }
.app { min-height: auto; padding-top: 6px; }
.stage { display: none; width: 100%; max-width: 520px; margin: 0 auto; padding: 6px 16px 0; }
body[data-view="intro"] .stage, body[data-view="map"] .stage { display: block; }

/* ---------- дом и камера */
.map { position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: #151c38; isolation: isolate; }
.map__cam { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 2 / 3; transform-origin: 0 0; transition: transform .8s cubic-bezier(.65, 0, .25, 1); will-change: transform; }
.map__cam > picture img { width: 100%; height: auto; }
body[data-view="intro"] .map { aspect-ratio: 1 / 1.08; }
body[data-view="intro"] .map__cam { animation: pan 22s ease-in-out infinite alternate; }
@keyframes pan { from { transform: translateY(0); } to { transform: translateY(-9%); } }
.pins { position: absolute; inset: 0; transition: opacity .25s; }
body:not([data-view="map"]):not([data-view="final"]) .pins, body.is-flying .pins { opacity: 0; pointer-events: none; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; z-index: 1; }
.pin b { font-weight: 800; }
.pin.is-open { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(240, 195, 106, .5), 0 10px 22px rgba(0, 0, 0, .5); animation: pulse 2.2s var(--ease) infinite; }
.pin.is-done { background: #fff4d8; padding: 3px; box-shadow: 0 0 0 3px #fff4d8, 0 10px 22px rgba(0, 0, 0, .55); width: 56px; height: 56px; }
.pin.is-done img { width: 100%; height: 100%; }
.pin.is-lock { width: 38px; height: 38px; background: rgba(10, 16, 34, .78); color: #fff4d8; box-shadow: 0 0 0 2px rgba(255, 244, 216, .35); backdrop-filter: blur(3px); }
.pin.is-lock svg { width: 18px; height: 18px; }
.pin--home { width: auto; height: auto; display: grid; justify-items: center; gap: 2px; z-index: 2; }
.pin__ava { width: 50px; height: 50px; border-radius: 50%; object-fit: contain; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 55%, #fff), var(--rc)); box-shadow: 0 0 0 3px #fff4d8, 0 10px 20px rgba(0, 0, 0, .5); padding: 2px; }
.pin--home span { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #fff4d8; color: #2b2418; letter-spacing: .04em; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(240, 195, 106, .5), 0 10px 22px rgba(0, 0, 0, .5); } 50% { box-shadow: 0 0 0 12px rgba(240, 195, 106, .1), 0 10px 22px rgba(0, 0, 0, .5); } }

/* ---------- голос проводника */
.ava { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: contain; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 50%, #fff), var(--rc)); box-shadow: 0 0 0 2px rgba(255, 244, 216, .8); padding: 2px; }
.voice { display: flex; gap: 12px; align-items: flex-start; }
.voice p { position: relative; flex: 1; padding: 12px 14px; border-radius: 4px 18px 18px 18px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: #efe7d4; font-size: 15px; line-height: 1.45; }
.voice b { display: block; color: color-mix(in srgb, var(--rc) 45%, #fff4d8); font-size: 13px; margin-bottom: 2px; }
.voice--big p { font-size: 16px; }
.voice[hidden] { display: none; }
.voice__col { flex: 1; display: grid; gap: 8px; justify-items: start; }
.voice__col p { justify-self: stretch; }
.guide { animation: rise .4s var(--ease); }
.guide__more { font-size: 14px; font-weight: 700; color: var(--accent); padding: 6px 12px; border-radius: 999px; background: rgba(240, 195, 106, .14); border: 1px solid rgba(240, 195, 106, .35); }

/* ---------- первый экран */
.intro { display: grid; gap: 12px; }
.intro .eyebrow { color: var(--accent); }
.intro h1 { font-size: clamp(40px, 11.5vw, 56px); color: #fff6df; }
.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { position: relative; padding: 11px 14px 11px 40px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 15px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(240, 195, 106, .18); }
.plan b { color: var(--ink); }
.invite { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-left: 6px solid var(--rc); }
.invite__ava { width: 64px; height: 64px; object-fit: contain; }
.invite b { display: block; font-family: var(--serif); font-size: 20px; }
.invite p { color: var(--ink-2); font-size: 14px; }

/* ---------- тест */
.dna { display: block; width: 100%; height: 44px; }
.dna .rung { stroke: rgba(246, 239, 224, .14); stroke-width: 5; stroke-linecap: round; transition: stroke .4s; }
.dna .strand { fill: none; stroke: rgba(246, 239, 224, .35); stroke-width: 2.5; }
.dna .rung.is-on { stroke: var(--c); }
.dna .rung.is-now { stroke: rgba(240, 195, 106, .6); stroke-dasharray: 2 5; }
.qhead { display: flex; align-items: center; gap: 10px; }
.qback { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); flex: none; }
.qback svg { width: 20px; height: 20px; }
.qnum { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.q { display: grid; gap: 14px; animation: slide .35s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.q h2 { font-size: 30px; color: #fff6df; }
.q .opts { display: grid; gap: 10px; }
.q .opt { display: grid; grid-template-columns: 14px 1fr; gap: 14px; align-items: center; text-align: left; padding: 16px 18px; min-height: 60px; border-radius: 18px; background: var(--card); color: var(--card-ink); font-weight: 600; font-size: 17px; line-height: 1.3; border: 2px solid transparent; transition: transform .15s var(--ease), border-color .15s; }
.q .opt i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.q .opt:active { transform: scale(.98); }
.q .opt.is-pick { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.slider { display: grid; gap: 14px; padding: 22px 18px 18px; border-radius: 22px; background: var(--card); color: var(--card-ink); }
.slider__face { font-family: var(--serif); font-size: 22px; font-weight: 700; text-align: center; min-height: 58px; display: grid; place-items: center; line-height: 1.2; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; touch-action: pan-y; }
.slider input::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--l), var(--r)); }
.slider input::-moz-range-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--l), var(--r)); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -13px; border-radius: 50%; background: #fff; border: 4px solid var(--card-ink); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); cursor: grab; }
.slider input::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--card-ink); cursor: grab; }
.slider__ends { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 600; color: var(--card-ink-2); }
.slider__ends span:last-child { text-align: right; }
.lab { min-height: 64vh; display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; }
.lab__ring { position: relative; width: 240px; height: 240px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #fff8e8 0%, #efe2c4 70%); box-shadow: var(--shadow), 0 0 60px rgba(240, 195, 106, .25); }
.lab__ring::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px dashed rgba(240, 195, 106, .6); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lab__ring img { width: 78%; height: 78%; object-fit: contain; }
.lab h2 { color: #fff6df; font-size: 28px; }
.lab p { color: var(--ink-2); font-weight: 600; }

/* ---------- результат теста */
.res { position: relative; border-radius: 28px; overflow: hidden; color: #fff; background: radial-gradient(90% 60% at 50% 30%, color-mix(in srgb, var(--rc) 70%, #fff) 0%, var(--rc) 55%, color-mix(in srgb, var(--rc) 70%, #000) 100%); box-shadow: 0 30px 60px -26px color-mix(in srgb, var(--rc) 70%, #000); padding: 18px 20px 22px; display: grid; gap: 6px; text-align: center; animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.res__img { width: 80%; aspect-ratio: 1; object-fit: contain; margin: -6px auto -10px; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .35)); }
.res .eyebrow { color: rgba(255, 255, 255, .85); }
.res h1 { font-size: 42px; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, .25); }
.res__title { font-weight: 700; font-size: 18px; }
.res__about { color: rgba(255, 255, 255, .92); font-size: 16px; max-width: 420px; margin: 4px auto 0; }
.traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.traits span { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.code { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.code i { width: 16px; height: 26px; border-radius: 5px; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.code-note { font-size: 12px; color: rgba(255, 255, 255, .78); }
.act { display: grid; gap: 10px; }
.match { display: grid; gap: 10px; text-align: center; }
.match__pair { display: flex; align-items: center; justify-content: center; gap: 8px; }
.match__pair img { width: 92px; height: 92px; object-fit: contain; }
.match__pct { font-family: var(--serif); font-size: 44px; font-weight: 800; color: var(--rc); line-height: 1; }
.fact { display: grid; gap: 6px; }
.fact p:not(.eyebrow) { color: var(--card-ink-2); }

/* ---------- экран карты */
.panel { display: grid; gap: 14px; }
.passport { display: grid; gap: 8px; }
.passport .eyebrow { color: var(--accent); }
.bslots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.bslot { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1.5px rgba(255, 244, 216, .18); }
.bslot img { width: 100%; height: 100%; filter: grayscale(1) brightness(.5); opacity: .55; transition: filter .4s, opacity .4s; }
.bslot.is-on img { filter: none; opacity: 1; }
.bslot.is-lock { color: var(--ink-3); box-shadow: inset 0 0 0 1.5px rgba(255, 244, 216, .12); border: 1.5px dashed rgba(255, 244, 216, .2); }
.bslot.is-lock svg { width: 40%; height: 40%; }
.hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hud__cell { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: grid; gap: 2px; align-content: center; justify-items: center; }
.hud__cell b { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: #fff4d8; }
.hud__cell b small { font-size: 15px; color: var(--ink-3); }
.hud__cell span { font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.hud__ava { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 50%, #fff), var(--rc)); }
.map__hint { text-align: center; color: var(--ink-2); font-size: 14px; }
.hlist { display: grid; gap: 6px; }
.hrow { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: background .2s; }
.hrow:hover { background: rgba(255, 255, 255, .09); }
.hrow__b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.hrow__b img { width: 100%; height: 100%; filter: grayscale(.85) brightness(.75); }
.hrow.is-done .hrow__b img { filter: none; }
.hrow__b svg { width: 18px; height: 18px; }
.hrow.is-lock .hrow__b { border: 1.5px dashed rgba(255, 244, 216, .22); }
.hrow__t { font-size: 14px; line-height: 1.25; color: var(--ink-2); }
.hrow__t b { display: block; color: var(--ink); font-size: 15px; }
.hrow__s { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(240, 195, 106, .16); color: var(--accent); white-space: nowrap; }
.hrow.is-done .hrow__s { background: rgba(88, 201, 139, .16); color: #7fdcaa; }
.hrow.is-lock .hrow__s { background: rgba(255, 255, 255, .06); color: var(--ink-3); }

/* ---------- зал */
.hall { display: grid; gap: 16px; }
.hall__side, .hall__main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.hall__art { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 2; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: #151c38; }
.hall__art img { width: 100%; height: 100%; object-fit: cover; animation: arrive .9s var(--ease); }
@keyframes arrive { from { transform: scale(1.12); opacity: .2; filter: blur(4px); } }
.hall__tag { position: absolute; left: 12px; top: 12px; font-size: 13px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--hc) 85%, #000); color: #fff6df; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.hall__badge { position: absolute; right: 10px; top: 10px; width: 64px !important; height: 64px !important; animation: none !important; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.hall h1 { font-size: clamp(28px, 7.5vw, 36px); color: #fff6df; }
.hall__story { color: var(--ink-2); }
.hall__act { font-weight: 600; color: var(--accent); font-size: 15px; }
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--ink-2); }

/* ---------- мифы */
.myth { display: grid; gap: 14px; border-top: 6px solid var(--hc); animation: rise .35s var(--ease); }
.myth__q { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1.2; color: var(--card-ink); }
.myth .row .btn { box-shadow: none; min-height: 56px; }
.btn--yes { background: #3f8f63; color: #fff; }
.btn--no { background: #b8573f; color: #fff; }
.myth.is-true { border-top-color: #3f8f63; }
.myth.is-false { border-top-color: #b8573f; }
.myth__v { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.myth__v b { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; color: #fff; background: #b8573f; }
.myth.is-true .myth__v b { background: #3f8f63; }
.myth__v span { font-weight: 700; color: var(--card-ink-2); }
.myth__a { color: #4d4536; }
.myth__rx { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--rc) 14%, #f6eedc); }
.myth__rx .ava { width: 40px; height: 40px; }
.myth__rx p { font-weight: 600; color: #3d3528; font-size: 15px; line-height: 1.35; }

/* ---------- значок */
.award { display: grid; gap: 10px; text-align: center; justify-items: center; }
.award__b { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--hc) 40%, #fff) 0%, rgba(255, 255, 255, 0) 70%); animation: coin 1s cubic-bezier(.3, 1.4, .5, 1) both; }
.award__b img { width: 170px; height: 170px; filter: drop-shadow(0 16px 20px rgba(40, 20, 0, .45)); }
@keyframes coin { from { transform: scale(.2) rotateY(540deg); opacity: 0; } }
.award .eyebrow { color: #8a7a55; }
.award h2 { font-size: 28px; }
.award p:not(.eyebrow) { color: var(--card-ink-2); }
.hdone { display: grid; gap: 12px; }
.hdone__head { display: flex; gap: 12px; align-items: center; }
.hdone__head img { width: 64px; height: 64px; }
.hdone__m { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #efe5cf; font-size: 14px; border-left: 4px solid #3f8f63; }
.hdone__m.is-miss { border-left-color: #b8573f; }
.hdone__m span { color: #5d5341; }

/* ---------- закрытый зал, дом проводника */
.locked, .home { display: grid; gap: 10px; }
.locked .eyebrow { color: #8a7a55; display: flex; align-items: center; }
.locked h2, .home h2 { font-size: 28px; }
.locked > p:not(.eyebrow) { color: var(--card-ink-2); }
.room { position: relative; border-radius: 18px; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; background: #0f1829; }
.room__img { position: absolute; left: 0; top: 50%; max-width: none; height: auto; }
.room__tag { position: absolute; z-index: 1; left: 10px; top: 10px; background: rgba(10, 16, 30, .8); color: #fff4d8; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.locked__plan { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--hc) 14%, #fff8e8); border-left: 4px solid var(--hc); }
.locked__plan span { color: #4d4536; }
.locked__myth { border-radius: 14px; background: #efe5cf; padding: 12px 14px; }
.locked__myth summary { cursor: pointer; font-weight: 700; }
.locked__myth p { margin-top: 8px; color: #4d4536; }
.home__art { width: 180px; height: 180px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 45%, #fff), var(--rc)); box-shadow: 0 20px 40px -18px var(--rc); }
.home__art img { width: 92%; height: 92%; object-fit: contain; }
.home .eyebrow { text-align: center; color: #8a7a55; }
.home h2 { text-align: center; }
.where { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
.where svg { width: 36px; height: 36px; color: var(--rc); }
.where p { color: var(--card-ink-2); font-size: 14px; }
.home__myth { padding: 12px 14px; border-radius: 14px; background: #efe5cf; }
.home__myth p:not(.eyebrow) { color: #4d4536; }
.home__facts { padding: 12px 14px; border-radius: 14px; background: #efe5cf; }
.home__facts ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.home__facts li { position: relative; padding-left: 16px; color: #4d4536; font-size: 14px; line-height: 1.4; }
.home__facts li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--rc); }

/* ---------- раскопки (зал 17) */
.dig { display: grid; gap: 12px; }
.strata { display: grid; gap: 3px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.strata__cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; margin-bottom: 4px; font-size: 13px; }
.strata__cap b { color: var(--ink); }
.strata__cap span { color: var(--ink-3); }
.stratum { display: grid; grid-template-columns: 30px 1fr auto 26px; gap: 10px; align-items: center; min-height: 30px; padding: 2px 6px 2px 2px; border-radius: 10px; font-size: 13px; line-height: 1.25; color: var(--ink-3); transition: background .3s; }
.stratum i { align-self: stretch; min-height: 22px; border-radius: 6px; background: radial-gradient(rgba(0, 0, 0, .2) 1px, transparent 1.6px) 0 0 / 6px 6px, var(--sc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.stratum b { font-weight: 600; color: var(--ink-2); }
.stratum span { white-space: nowrap; }
.stratum img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 244, 216, .5); }
.stratum.is-now { background: rgba(240, 195, 106, .14); box-shadow: inset 0 0 0 1.5px var(--accent); }
.stratum.is-now b { color: var(--ink); }
.stratum.is-now span { color: var(--accent); font-weight: 700; }
.stratum.is-top { opacity: .6; }
.pres { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-3); }
.pres i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pres em { display: block; height: 100%; background: #7fc48a; transition: width .25s var(--ease), background .25s; }
.pres b { font-family: var(--serif); font-size: 18px; color: var(--ink); min-width: 3.1em; text-align: right; }
.pres.is-low em { background: #e2a05b; }
.pres.is-hit { animation: hit .5s; }
.pres.is-hit em { animation: hitc .9s; }
@keyframes hitc { 0%, 55% { background: #e2725b; } }
@keyframes hit { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
.slab { position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 6px #3d2c1e, 0 0 0 7px rgba(255, 255, 255, .08), var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%23fff' stroke-width='2' stroke-dasharray='4 3'/%3E%3C/svg%3E") 16 16, pointer; }
.slab.is-hammer { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='11' fill='rgba(255,255,255,.22)' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 16 16, pointer; }
.slab.is-shake { animation: shake .4s; }
.slab img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.slab canvas, .slab__line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.slab__line polygon { fill: none; stroke: rgba(255, 248, 230, .9); stroke-width: 2; stroke-dasharray: 7 6; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)); }
#sed, #dst, .slab__line { transition: opacity .6s var(--ease); }
.slab.is-open #sed, .slab.is-open #dst, .slab.is-open .slab__line { opacity: 0; }
.coach { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 2; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(12, 16, 36, .9); box-shadow: 0 10px 24px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 244, 216, .14); pointer-events: none; }
.coach[hidden] { display: none; }
.coach.is-in { animation: rise .3s var(--ease); }
.coach .ava { width: 36px; height: 36px; }
.coach p { font-size: 14px; line-height: 1.4; color: #f1e9d6; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools.is-off { opacity: .35; pointer-events: none; }
.tool { display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; align-items: center; text-align: left; padding: 10px 12px 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line); color: var(--ink-2); transition: background .2s, border-color .2s, transform .15s; }
.tool svg { width: 28px; height: 28px; color: var(--ink-3); }
.tool b { display: block; color: var(--ink); font-size: 16px; }
.tool small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.tool i { grid-column: 1 / -1; height: 5px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tool em { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }
.tool.is-on { background: rgba(240, 195, 106, .16); border-color: var(--accent); }
.tool.is-on svg { color: var(--accent); }
.tool:active { transform: scale(.98); }
.tool.is-call { animation: call 1.2s var(--ease) infinite; }
@keyframes call { 50% { box-shadow: 0 0 0 6px rgba(240, 195, 106, .35); } }
.digq .btn--pick { background: #efe5cf; color: var(--card-ink); }
.digq .myth__v b { text-transform: none; letter-spacing: 0; font-size: 15px; }
.journal { display: grid; gap: 10px; animation: rise .35s var(--ease); }
.journal h3 { font-size: 24px; }
.journal__rows { display: grid; gap: 6px; }
.jrow { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 12px; background: #efe5cf; border-left: 6px solid var(--sc); }
.jrow img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.jrow b { display: block; font-size: 15px; }
.jrow span { font-size: 13px; color: #6d604a; }
.jrow em { font-style: normal; font-weight: 800; color: #3f8f63; }
.jrow em.is-low { color: #b8573f; }
.journal > p:not(.eyebrow) { color: #5a4630; }
.journal .journal__sum { font-weight: 700; color: var(--card-ink); }
.hint { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--ink-2); }
.hint svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.hint span { text-align: center; }
.idq { display: grid; gap: 10px; animation: rise .35s var(--ease); }
.idq__q { font-weight: 700; font-size: 18px; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--card); color: var(--card-ink); font-weight: 700; font-size: 16px; border: 1.5px solid transparent; }
.opt:active { transform: scale(.98); }
.find { display: grid; gap: 8px; animation: rise .35s var(--ease); }
.find h3 { font-size: 26px; }
.find__age { color: #8a6a44; font-weight: 600; font-size: 14px; }
.find > p:not(.eyebrow):not(.find__age) { color: #5a4630; }

/* ---------- лента времени (зал 12) */
.tlwrap { display: grid; gap: 10px; }
.tl__how { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.tl__how svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.tl { display: grid; }
.tl__end { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; text-align: center; padding: 4px 0; }
.slot { position: relative; height: 34px; display: grid; place-items: center; border-radius: 12px; transition: height .18s var(--ease), background .18s; }
.slot::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed rgba(240, 195, 106, .28); }
.slot span { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1d2340; border: 1.5px solid rgba(240, 195, 106, .55); color: var(--accent); font-weight: 800; font-size: 18px; line-height: 1; transition: transform .18s var(--ease); }
.slot:hover span, .slot:focus-visible span { transform: scale(1.15); }
.slot.is-hot { height: 76px; background: rgba(240, 195, 106, .12); box-shadow: inset 0 0 0 2px var(--accent); }
.slot.is-hot::before { opacity: 0; }
.slot.is-hot span { width: auto; height: auto; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.slot.is-hot span::after { content: " сюда"; }
.tl.is-busy .slot, .tl--done .slot { pointer-events: none; opacity: .2; }
.tl--done .slot { height: 10px; }
.tl--done .slot span { display: none; }
.it { position: relative; display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 6px 12px 6px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-left: 6px solid var(--hc); }
.it img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.it b { display: block; font-size: 16px; line-height: 1.2; }
.it small { display: block; color: var(--accent); font-weight: 700; font-size: 13px; margin-top: 2px; }
.it__mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.it.ok .it__mark { background: #58c98b; color: #06200f; }
.it.bad .it__mark { background: #ef6f5e; color: #2b0906; }
.it.is-new { animation: land .5s var(--ease); }
.it.is-new.ok { box-shadow: 0 0 0 2px #58c98b, 0 0 26px -4px #58c98b; }
.it.is-new.bad { box-shadow: 0 0 0 2px #ef6f5e, 0 0 26px -4px #ef6f5e; animation: land .5s var(--ease), shake .45s .45s; }
@keyframes land { from { transform: scale(.85); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.dock { position: sticky; bottom: 0; z-index: 5; padding: 14px 0 calc(12px + var(--sab)); background: linear-gradient(to bottom, rgba(14, 19, 40, 0), rgba(11, 15, 34, .97) 22px); }
.hand { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 20px; background: var(--card); color: var(--card-ink); box-shadow: var(--shadow), 0 0 0 2px rgba(240, 195, 106, .6); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.hand img { width: 96px; height: 96px; object-fit: contain; pointer-events: none; }
.hand h3 { font-size: 22px; }
.hand__hint { font-size: 12px; color: #a0936f; margin-top: 4px; font-weight: 600; }
.hand.is-lift { opacity: .35; }
.ghost { position: fixed; z-index: 80; pointer-events: none; width: min(380px, calc(100vw - 48px)); transform: translate(-50%, -60%) rotate(-3deg) scale(.92); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 2px var(--accent); }
.fb { display: grid; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); border-top: 6px solid #3f8f63; animation: rise .3s var(--ease); }
.fb.bad { border-top-color: #b8573f; }
.fb__head { display: flex; gap: 12px; align-items: center; }
.fb__head img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.fb .eyebrow { color: #23884f; font-weight: 800; }
.fb.bad .eyebrow { color: #c64330; }
.fb h3 { font-size: 20px; line-height: 1.15; }
.fb__when { font-weight: 700; color: #7a6a45; font-size: 14px; }
.fb__fact { color: #4d4536; font-size: 15px; }
.bush { display: grid; gap: 10px; }
.bush p:not(.eyebrow) { color: #4d4536; }

/* ---------- глазами животного (зал 11) */
.eyes { display: grid; gap: 12px; }
.eyes__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.etab { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 12px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink-2); min-width: 0; }
.etab i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.etab.is-seen { color: var(--ink); }
.etab.is-on { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); color: #fff; }
.scene { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 2px var(--c), var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.scene img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene__load { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13, 10, 23, .55); font-weight: 600; }
.eyes__bar { display: flex; gap: 12px; align-items: center; }
.eyes__bar .btn { min-height: 44px; padding: 8px 14px; font-size: 15px; flex: none; }
.eyes__bar .note { font-size: 13px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notes li { position: relative; padding: 10px 12px 10px 32px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--ink-2); font-size: 15px; }
.notes li::before { content: ""; position: absolute; left: 13px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- живое или нет (зал 3) */
.alive { display: grid; gap: 12px; }
.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; background: #3fbf7f; transition: width .4s var(--ease); }
.stack { position: relative; min-height: 420px; }
.card-x { position: relative; z-index: 2; background: var(--card); color: var(--card-ink); border-radius: 26px; padding: 16px 16px 20px; box-shadow: var(--shadow); display: grid; gap: 8px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .28s var(--ease); }
.card-x.is-drag { transition: none; cursor: grabbing; }
.card-x.is-fly { transition: transform .32s ease-in; }
.card-x--back { position: absolute; inset: 14px 14px auto; z-index: 1; transform: scale(.94) translateY(14px); opacity: .35; height: 300px; overflow: hidden; }
.card-x--back img { width: 70%; margin: 30px auto 0; }
.card-x__art { aspect-ratio: 1.3; display: grid; place-items: center; border-radius: 20px; background: radial-gradient(60% 60% at 50% 45%, #fffaf0, #e9e0cb); }
.card-x__art img { width: 76%; height: 90%; object-fit: contain; pointer-events: none; }
.card-x h3 { font-size: 26px; }
.card-x p { color: #4d5a55; font-size: 16px; }
.tag { position: absolute; top: 26px; z-index: 3; padding: 6px 14px; border-radius: 10px; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .06em; border: 3px solid; opacity: 0; pointer-events: none; background: rgba(255, 255, 255, .88); }
.tag--alive { left: 24px; color: #2c9d64; transform: rotate(-12deg); }
.tag--not { right: 24px; color: #d0603f; transform: rotate(12deg); }
.choose .btn { min-height: 56px; box-shadow: none; }
.btn--alive { background: #3fbf7f; color: #062016; }
.btn--not { background: #e2725b; color: #2b0d06; }
.verdict { background: var(--card); color: var(--card-ink); border-radius: 24px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); border-top: 8px solid var(--c, #3fbf7f); animation: rise .35s var(--ease); }
.verdict--alive { --c: #3fbf7f; }
.verdict--not { --c: #e2725b; }
.verdict--both { --c: #e6b54a; }
.verdict__head { display: flex; gap: 12px; align-items: center; }
.verdict__head img { width: 84px; height: 84px; object-fit: contain; flex: none; border-radius: 18px; background: radial-gradient(#fffaf0, #e9e0cb); padding: 6px; }
.verdict__head h3 { font-size: 22px; }
.verdict__head .eyebrow { color: #1d7a4c; font-size: 13px; }
.verdict__head .eyebrow.is-miss { color: #c4452d; }
.verdict p { color: #4d5a55; }
.signs { display: flex; flex-wrap: wrap; gap: 6px; }
.sign { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; }
.sign--y { background: rgba(63, 191, 127, .18); color: #1d7a4c; }
.sign--p { background: rgba(230, 181, 74, .22); color: #8a6412; }
.sign--n { background: rgba(35, 48, 44, .08); color: #8a958f; text-decoration: line-through; }

/* ---------- итог ночи */
.final { display: grid; gap: 12px; text-align: center; justify-items: center; }
.final .eyebrow { color: var(--accent); }
.final h1 { font-size: clamp(34px, 9vw, 44px); color: #fff6df; }
.final__ava { width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 45%, #fff), var(--rc)); box-shadow: 0 0 80px -10px var(--rc); }
.final__ava img { width: 94%; height: 94%; object-fit: contain; }
.final .voice { text-align: left; width: 100%; }
.final__badges { display: flex; gap: 10px; justify-content: center; }
.final__badges img { width: 72px; height: 72px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); animation: coin .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.final__badges img:nth-child(2) { animation-delay: .12s; }
.final__badges img:nth-child(3) { animation-delay: .24s; }
.final__badges img:nth-child(4) { animation-delay: .36s; }
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; width: 100%; color: var(--ink-2); font-size: 13px; }
.stats span { display: grid; justify-items: center; align-content: start; line-height: 1.25; padding: 10px 6px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-size: 30px; color: #fff4d8; }
.museum { display: grid; gap: 6px; }
.museum p:not(.eyebrow) { color: #4d4536; }

/* ---------- широкий экран: дом слева, панель справа */
@media (min-width: 980px) {
  #bar { padding-left: 28px; padding-right: 28px; }
  #bar .top { max-width: 1200px; }
  .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 44px; max-width: 1200px; margin: 0 auto; padding: 0 28px; align-items: start; }
  .stage { display: block; position: sticky; top: 62px; max-width: none; padding: 6px 0 24px; }
  .map, body[data-view="intro"] .map { width: min(100%, calc((100vh - 96px) * .6667)); aspect-ratio: 2 / 3; margin: 0 auto; }
  body[data-view="intro"] .map__cam { animation: none; }
  .app { max-width: none; padding: 6px 0 40px; margin: 0; }
  body[data-view="hall"] .shell { grid-template-columns: minmax(0, 1fr); max-width: 1180px; }
  body[data-view="hall"] .stage { display: none; }
  .hall { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .hall__side { position: sticky; top: 62px; }
  /* раскопки: разрез в строку, плита по высоте окна, чтобы инструменты
     были видны без прокрутки */
  .strata { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .strata__cap { grid-column: 1 / -1; margin-bottom: 0; }
  .stratum { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 8px auto auto; gap: 4px 6px; padding: 6px 8px; align-items: start; }
  .stratum i { grid-column: 1 / -1; align-self: auto; min-height: 8px; height: 8px; }
  .stratum b, .stratum span { grid-column: 1; font-size: 12px; }
  .stratum img { grid-column: 2; grid-row: 2 / span 2; width: 24px; height: 24px; }
  .slab { width: min(100%, calc(100vh - 392px), 560px); min-width: 320px; justify-self: center; }
  .dock { padding-bottom: 16px; }
  .lab { min-height: 70vh; }
}
@media (min-width: 980px) and (max-height: 700px) {
  .map, body[data-view="intro"] .map { width: min(100%, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-view="intro"] .map__cam { animation: none; }
}
