/* Тихий режим. Стиль «Ночь в доме»: интерфейс Наты поверх живого кадра дома. */
:root {
  --ink: #0a0f12;
  --night: #10171b;
  --panel: rgba(15, 22, 26, .74);
  --panel-2: rgba(24, 33, 38, .78);
  --edge: rgba(200, 228, 232, .09);
  --edge-2: rgba(200, 228, 232, .18);
  --frost: #dfe5e2;
  --dim: #92a0a2;
  --faint: #5d6b6e;
  --nata: #3fc1a8;
  --nata-2: #7fe0cc;
  --nata-glow: rgba(63, 193, 168, .32);
  --lamp: #e6a24a;
  --lamp-soft: rgba(230, 162, 74, .16);
  --rec: #e0574b;
  --sans: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --mono: "PT Mono", "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink); color: var(--frost);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--nata); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--nata); outline-offset: 3px; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--nata); background: var(--nata); color: #062720;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 0 var(--nata-glow), 0 10px 30px -12px rgba(63,193,168,.6);
  transition: background .15s, box-shadow .25s, transform .1s;
}
.btn:hover { background: var(--nata-2); box-shadow: 0 0 0 6px rgba(63,193,168,.12), 0 10px 30px -10px rgba(63,193,168,.7); }
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--frost); border-color: var(--edge-2); box-shadow: none; }
.btn--ghost:hover { background: rgba(255,255,255,.05); box-shadow: none; }
.btn--small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--nata); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; white-space: nowrap; }
.chipbtn { border: 1px solid var(--edge-2); background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--dim); }
.chipbtn:disabled { opacity: .5; }

/* ---------- backdrop ---------- */
.backdrop { position: fixed; inset: -40px; background-size: cover; background-position: 50% 45%; filter: blur(26px) brightness(.32) saturate(.8); transform: scale(1.05); z-index: -3; }
.rain { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(5,8,10,.75) 100%); }

/* ---------- game shell ---------- */
.game { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 18px; font-size: 14px; color: var(--dim);
  background: linear-gradient(180deg, rgba(8,12,14,.85), rgba(8,12,14,.4));
  border-bottom: 1px solid var(--edge);
}
.bar__house { display: flex; align-items: center; gap: 10px; color: var(--frost); text-decoration: none; font-weight: 700; }
.bar__rec { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 8px var(--rec); animation: blink 1.4s steps(2) infinite; }
.bar__step { font-family: var(--mono); font-size: 13px; color: var(--frost); padding: 4px 10px; border: 1px solid var(--edge); border-radius: 999px; }
.bar__spacer { flex: 1; }
.meter { display: flex; align-items: center; gap: 8px; }
.meter__track { width: 84px; height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--nata); box-shadow: 0 0 10px var(--nata); transition: width .6s; }
.bar__btn { background: none; border: 1px solid transparent; border-radius: 999px; color: var(--dim); cursor: pointer; padding: 4px 10px; font-size: 14px; }
.bar__btn:hover { border-color: var(--edge-2); color: var(--frost); }
.bar__btn[aria-pressed="true"] { color: var(--nata); }
.bar__console { display: none; }

.main {
  display: grid; grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "console stage" "console side";
  column-gap: 14px; row-gap: 0; padding: 14px; min-height: 0;
}
.console { grid-area: console; }
.glass {
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -30px rgba(0,0,0,.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.stage { grid-area: stage; position: relative; min-height: 0; display: flex; flex-direction: column; overflow: auto; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }

/* ---------- console ---------- */
.console { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 14px; gap: 12px; }
.console__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.console__title { font-weight: 700; font-size: 15px; }
.floors { display: flex; gap: 2px; background: rgba(0,0,0,.3); border-radius: 999px; padding: 3px; }
.floors__tab { border: 0; background: none; border-radius: 999px; padding: 3px 9px; font-size: 12px; color: var(--dim); cursor: pointer; }
.floors__tab.is-on { background: rgba(63,193,168,.16); color: var(--nata-2); }
.console__plan { border-radius: 8px; background: rgba(4,8,10,.55); border: 1px solid var(--edge); padding: 6px; }
.plan { width: 100%; height: auto; display: block; }
.plan__room rect { fill: rgba(140,170,175,.05); stroke: rgba(200,228,232,.32); stroke-width: 2; }
.plan__room.is-blank rect { fill: rgba(140,170,175,.015); stroke-dasharray: 3 3; stroke-opacity: .5; }
.plan__room.is-ghost rect { fill: none; stroke-dasharray: 5 5; stroke-opacity: .35; }
.plan__room.is-roof rect { fill: none; stroke-dasharray: 2 4; stroke-opacity: .4; }
.plan__room.is-out rect { fill: rgba(230,162,74,.03); }
.plan__room.is-hot { cursor: pointer; }
.plan__room.is-hot:hover rect, .plan__room.is-hot:focus rect { fill: rgba(63,193,168,.10); stroke: var(--nata); }
.plan__room:focus { outline: none; }
.plan__label { fill: #aab6b8; font-family: var(--sans); font-size: 21px; text-anchor: middle; pointer-events: none; }
.plan__label.is-small { font-size: 16px; }
.plan__label.is-dim { fill: var(--faint); }
.plan__step { stroke: rgba(200,228,232,.16); stroke-width: 1.5; }
.plan__fence { stroke: rgba(200,228,232,.3); stroke-width: 3; stroke-dasharray: 1 5; stroke-linecap: round; }
.plan__lock { stroke-width: 2; transform-box: fill-box; transform-origin: center; }   /* увеличение при подсветке — от центра замка, без скачка */
.plan__lock.is-open { fill: rgba(63,193,168,.35); stroke: var(--nata); }
.plan__lock.is-closed { fill: rgba(230,162,74,.35); stroke: var(--lamp); }
.plan__nata { fill: var(--nata); filter: drop-shadow(0 0 3px var(--nata)); }
.plan__cam { cursor: pointer; }
.plan__cam circle { fill: rgba(224,87,75,.2); stroke: var(--rec); stroke-width: 2; }
.plan__cam .plan__lens { fill: var(--rec); stroke: none; }
.plan__cam:hover circle, .plan__cam:focus circle { fill: rgba(224,87,75,.4); }
.plan__cam:focus { outline: none; }
.plan__person circle { fill: rgba(223,229,226,.9); }
.plan__person text { fill: var(--ink); font-size: 19px; font-weight: 700; text-anchor: middle; font-family: var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--faint); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend__cam { background: var(--rec); }
.legend__nata { background: var(--nata); }
.legend__open { border-radius: 2px !important; background: rgba(63,193,168,.5); border: 1px solid var(--nata); }
.legend__closed { border-radius: 2px !important; background: rgba(230,162,74,.5); border: 1px solid var(--lamp); }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.apps__btn {
  text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--edge); color: var(--frost); font-size: 14px;
  transition: border-color .15s, background .15s;
}
.apps__btn:hover { border-color: var(--edge-2); background: rgba(255,255,255,.06); }
.apps__btn.is-on { border-color: var(--nata); background: rgba(63,193,168,.12); color: var(--nata-2); }
.apps__btn:disabled { opacity: .4; cursor: default; }
.toast { min-height: 0; font-size: 13px; color: var(--frost); background: rgba(63,193,168,.12); border: 1px solid rgba(63,193,168,.35); border-radius: 8px; padding: 0 10px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s, opacity .3s, padding .3s; }
.toast.is-on { max-height: 120px; opacity: 1; padding: 8px 10px; }
.console.is-locked .console__plan, .console.is-locked .legend, .console.is-locked .apps { filter: grayscale(1) brightness(.5); }
.console__lock { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%); text-align: center; font-family: var(--mono); font-size: 13px; padding: 14px; border: 1px dashed var(--edge-2); border-radius: 8px; background: rgba(8,12,14,.85); color: var(--dim); }

/* ---------- camera feed ---------- */
.feed { position: relative; flex: 1; overflow: hidden; background: #000; min-height: 260px; border-radius: inherit; }
.feed__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: breathe-img 18s ease-in-out infinite alternate; }
@keyframes breathe-img { from { transform: scale(1.02) } to { transform: scale(1.07) translate(-1%, -.5%) } }
.feed--bw .feed__img { filter: grayscale(1) contrast(1.08) brightness(.92); }
.feed--still .feed__img { filter: grayscale(1) contrast(1.1) brightness(.55) blur(1.5px); }
.feed--nosignal { background: #050708; }
.feed__scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.feed__noise { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .1; mix-blend-mode: screen; }
.feed--nosignal .feed__noise { opacity: .32; }
.feed__band { position: absolute; left: 0; right: 0; height: 14%; background: rgba(255,255,255,.035); animation: band 7s linear infinite; pointer-events: none; }
@keyframes band { from { top: -14% } to { top: 100% } }
.feed__msg { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: clamp(15px, 2vw, 22px); letter-spacing: .08em; color: #f0f3f1; text-shadow: 0 0 12px rgba(0,0,0,.9); text-align: center; padding: 0 20px; }
.osd { position: absolute; font-family: var(--mono); font-size: 13px; color: #e8ecea; text-shadow: 0 1px 2px #000; letter-spacing: .03em; }
.osd--tl { top: 14px; left: 16px; }
.osd--tr { top: 14px; right: 16px; }
.osd--br { bottom: 14px; right: 16px; }
.rec { color: var(--rec); animation: blink 1s steps(2) infinite; }
.rec--live { color: var(--rec); }
@keyframes blink { 50% { opacity: .15 } }
.osd__tag { background: rgba(224,87,75,.85); color: #fff; padding: 2px 8px; border-radius: 3px; text-shadow: none; }
.glitch { animation: glitch .45s steps(3) 1; }
@keyframes glitch { 0% { filter: brightness(3) contrast(4); clip-path: inset(40% 0 45% 0) } 40% { transform: translateX(-8px); clip-path: inset(10% 0 20% 0) } 70% { transform: translateX(4px) } 100% { filter: none; transform: none; clip-path: none } }

/* ---------- stage screens ---------- */
.stage > .feed { border-radius: var(--r); }
.letter { flex: 1; display: grid; place-items: center; padding: 6vh 5vw; }
.letter__card { max-width: 600px; display: grid; grid-template-columns: 76px 1fr; gap: 22px; padding: 30px 32px; background: rgba(236,232,222,.95); color: #1d2224; border-radius: 6px; box-shadow: 0 30px 80px -30px #000; transform: rotate(-.4deg); }
.letter__card--plain { grid-template-columns: 1fr; background: var(--panel-2); color: var(--frost); transform: none; }
.letter__ava { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.letter__from { color: #5b6467; font-size: 14px; margin: 0 0 10px; }
.letter__card--plain .letter__from { color: var(--dim); }
.letter__body { font-family: var(--serif); font-size: 19px; line-height: 1.65; margin: 0; }

.journal { flex: 1; padding: 24px 26px; font-family: var(--mono); font-size: 15px; overflow: auto; }
.journal__head { color: var(--dim); margin: 0 0 14px; font-size: 13px; }
.jrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 8px 10px; border-radius: 6px; opacity: 0; animation: rowin .35s forwards; }
.journal .jrow { grid-template-columns: 110px 1fr; }
.jrow + .jrow { border-top: 1px solid rgba(255,255,255,.04); }
.jrow__t { color: var(--dim); }
.jrow__body { display: flex; flex-direction: column; }
.jrow__src { color: var(--faint); font-size: 13px; }
.jrow__ev { font-size: 12px; color: var(--nata); }
.jrow--warn { background: var(--lamp-soft); }
.jrow--warn .jrow__t { color: var(--lamp); }
.jrow--void { border: 1px dashed var(--edge-2) !important; color: var(--dim); margin: 6px 0; }
@keyframes rowin { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }

/* app panel */
.app { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 18px 20px; gap: 12px; overflow: auto; }
.app:focus { outline: none; }
.app__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.app__empty { color: var(--dim); font-size: 15px; margin: 0; }
.cams { flex: 1; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; min-height: 0; }
.cams__list { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.cams__item { text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--edge); background: rgba(255,255,255,.03); cursor: pointer; }
.cams__item:hover { border-color: var(--edge-2); }
.cams__item.is-on { border-color: var(--rec); background: rgba(224,87,75,.09); }
.cams__item.is-locked .cams__name::after { content: " ⊘"; color: var(--faint); }
.cams__name { font-family: var(--mono); font-size: 13px; }
.cams__place { font-size: 13px; color: var(--dim); }
.cams__view { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cams__view > .feed { border-radius: 8px; aspect-ratio: 16 / 9; flex: none; min-height: 0; }
.cams__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cams__note { margin: 0; color: var(--dim); font-size: 14px; }
.archive { display: flex; flex-direction: column; gap: 8px; }
.archive__screen { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.archive__screen .feed { position: absolute; inset: 0; min-height: 0; }
.scrub { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.scrub__play { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--edge-2); background: rgba(255,255,255,.04); cursor: pointer; position: relative; }
.scrub__play::before { content: ""; position: absolute; left: 15px; top: 12px; border-left: 13px solid var(--frost); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.scrub__play.is-on::before { left: 13px; top: 13px; width: 4px; height: 14px; border: 0; background: var(--frost); box-shadow: 8px 0 0 var(--frost); }
.scrub__track { position: relative; height: 28px; }
.scrub__range { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; z-index: 2; }
.scrub__range::-webkit-slider-runnable-track { height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; }
.scrub__range::-moz-range-track { height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; }
.scrub__range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--frost); box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.scrub__range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--frost); }
.scrub__mark { position: absolute; top: 4px; width: 3px; height: 20px; background: var(--rec); border-radius: 2px; box-shadow: 0 0 8px var(--rec); transform: translateX(-1px); z-index: 1; }
.scrub__cut { position: absolute; top: 6px; bottom: 6px; right: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.12) 0 3px, transparent 3px 6px); z-index: 1; }
.scrub__scale { display: flex; justify-content: space-between; margin-left: 52px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.archive__info { min-height: 46px; display: flex; align-items: center; }
.search { display: flex; gap: 8px; }
.search__input { flex: 1; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--edge-2); background: rgba(0,0,0,.35); font-family: var(--mono); font-size: 15px; }
.search__input:focus { border-color: var(--nata); outline: none; box-shadow: 0 0 0 4px rgba(63,193,168,.15); }
.search__hint { margin: -4px 0 0 4px; font-size: 13px; color: var(--faint); }
.results { font-family: var(--mono); font-size: 14px; }
.results__head { color: var(--dim); font-size: 13px; margin: 6px 0 8px; }
.locks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.locks__row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--edge); }
.locks__dot { width: 10px; height: 10px; border-radius: 3px; }
.locks__row.is-open .locks__dot { background: var(--nata); box-shadow: 0 0 8px var(--nata); }
.locks__row.is-closed .locks__dot { background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
.locks__note { font-size: 13px; color: var(--dim); font-family: var(--mono); }
button.locks__row { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; grid-template-columns: 14px 34px 1fr auto; }
button.locks__row:hover, button.locks__row:focus-visible { border-color: var(--edge-2); background: rgba(255,255,255,.06); }
.locks__row.is-sel { border-color: var(--nata); background: rgba(63,193,168,.08); }
.locks__num { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.plan__lock.is-btn { cursor: pointer; }
.plan__lock.is-hl, .plan__lock.is-sel { stroke-width: 3.5; filter: drop-shadow(0 0 6px currentColor); }
.plan__lock.is-open { color: var(--nata); } .plan__lock.is-closed { color: var(--lamp); }
.contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contacts__row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--edge); opacity: .7; }
.contacts__ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-weight: 700; }
.contacts__who { display: flex; flex-direction: column; font-size: 14px; }
.contacts__who span { color: var(--dim); font-size: 13px; }
.contacts__who .contacts__src { font-size: 12px; opacity: .8; font-style: italic; }
.contacts__row.is-unknown .contacts__ava { background: rgba(255,255,255,.04); border: 1px dashed var(--edge-2); }
.ava--btn[role="button"] { cursor: zoom-in; }
.ava--btn[role="button"]:focus-visible { outline: 2px solid var(--nata); outline-offset: 2px; }
.photoview { position: fixed; inset: 0; z-index: 60; background: rgba(4,6,7,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; animation: fadein .2s ease; cursor: zoom-out; }
.photoview__top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: var(--frost); }
.photoview__x { background: none; border: 1px solid var(--edge-2); color: var(--frost); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; }
.photoview__img { width: min(86vw, 560px); height: auto; max-height: 80vh; border-radius: 10px; object-fit: contain; cursor: default; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.contacts__ways { display: flex; gap: 4px; flex-wrap: wrap; }

/* crumb task */
.task { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 34px; gap: 6px; }
.task__kicker { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--lamp); }
.task__title { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 36px); }
.task__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 560px; }
.task__item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--edge); background: rgba(255,255,255,.03); }
.task__box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--edge-2); }
.task__item.is-done { border-color: rgba(63,193,168,.4); background: rgba(63,193,168,.07); }
.task__item.is-done .task__box { border-color: var(--nata); background: var(--nata); box-shadow: inset 0 0 0 3px #10221e; }
.task__ev { font-family: var(--mono); font-size: 13px; color: var(--nata); }

/* timeline */
.tl { flex: 1; padding: 24px 22px; overflow: auto; }
.tl__axis { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.slot { min-height: 120px; border: 1px dashed var(--edge-2); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--dim); transition: background .2s, border-color .2s; }
.slot.is-over, .slot.is-target { border-color: var(--nata); background: rgba(63,193,168,.07); }
.chip { font-family: var(--sans); font-size: 13px; line-height: 1.3; color: var(--frost); background: var(--panel-2); border: 1px solid var(--edge-2); border-radius: 6px; padding: 7px 8px; cursor: grab; user-select: none; text-align: left; }
.chip.is-picked { outline: 2px solid var(--nata); }
.chip.is-placed { cursor: default; background: rgba(63,193,168,.14); border-color: rgba(63,193,168,.5); }
.chip.is-odd { background: rgba(230,162,74,.22); border-color: var(--lamp); }
.chip.is-wrong { animation: shake .35s; border-color: var(--rec); }
@keyframes shake { 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }
.chip__t { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.slot .chip { width: 100%; font-size: 12px; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; padding: 6px; }
.tl__pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; min-height: 40px; }
.tl__gap { margin-top: 16px; padding: 12px 14px; border: 1px solid rgba(230,162,74,.4); background: var(--lamp-soft); color: #f2c27d; border-radius: 8px; font-family: var(--serif); font-size: 18px; }

/* builder */
.build { flex: 1; padding: 30px 32px; overflow: auto; }
.build__text { font-family: var(--serif); font-size: 21px; line-height: 2.1; max-width: 34em; }
.build select { font-family: var(--sans); font-size: 16px; color: var(--frost); background: rgba(0,0,0,.4); border: 1px solid var(--edge-2); border-radius: 6px; padding: 2px 8px; margin: 0 2px; }
.build select.is-ok { border-color: var(--nata); }
.build select.is-bad { border-color: var(--rec); }
.build__msg { margin-top: 18px; color: var(--dim); min-height: 1.5em; }

/* end */
.end { flex: 1; position: relative; overflow: auto; display: grid; align-items: end; min-height: 380px; }
.end img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.65); }
.end__text { position: relative; padding: 30px 34px; background: linear-gradient(180deg, transparent, rgba(10,15,18,.94) 50%); }
.end__title { font-family: var(--serif); font-size: clamp(34px, 5vw, 58px); font-weight: 400; margin: 0; line-height: 1.05; }
.end__sub { color: var(--lamp); margin: 0 0 4px; font-family: var(--mono); font-size: 14px; }

/* ---------- Nata: голос внизу сцены, как субтитры ---------- */
.side { grid-area: side; position: relative; overflow: visible; display: grid; grid-template-columns: 170px minmax(0, 1fr); grid-template-areas: "nata dialog" "actions actions"; border-top-left-radius: 0; border-top-right-radius: 0;
  background: linear-gradient(180deg, rgba(10,16,18,.72), rgba(10,16,18,.92)); }
.nata { grid-area: nata; padding: 16px 14px 12px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border-right: 1px solid var(--edge); }
.nata__who { display: grid; gap: 2px; }
.nata__name { font-weight: 700; }
.nata__state { font-size: 13px; color: var(--nata); }
.nata__log { margin-top: 6px; justify-self: start; background: none; border: 0; padding: 0; color: var(--dim); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nata__log:hover { color: var(--frost); }

/* кольцо: дышит в покое, «говорит» в такт словам, теплеет от доверия, сбоит на запретах */
.ring { --amp: 0; position: relative; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.ring__core { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--nata);
  box-shadow: 0 0 calc(14px + var(--amp) * 26px) rgba(63,193,168,calc(.3 + var(--amp) * .45)), inset 0 0 calc(8px + var(--amp) * 14px) rgba(63,193,168,calc(.2 + var(--amp) * .4));
  transform: scale(calc(1 + var(--amp) * .09)); transition: transform .08s linear, box-shadow .08s linear, border-color .4s; animation: idle 4s ease-in-out infinite; }
.ring__wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--nata); opacity: 0; }
.ring.is-talking .ring__core { animation: none; }
.ring.is-talking .ring__wave { animation: ripple 1.1s ease-out infinite; }
@keyframes idle { 50% { box-shadow: 0 0 6px rgba(63,193,168,.15), inset 0 0 4px rgba(63,193,168,.12); } }
@keyframes ripple { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
.ring.is-warm .ring__core { border-color: #7fe0c4; box-shadow: 0 0 34px rgba(127,224,196,.7), inset 0 0 16px rgba(127,224,196,.5); }
.ring.is-cold .ring__core { border-color: #7d8f96; box-shadow: 0 0 6px rgba(125,143,150,.3); }
.ring.is-glitch .ring__core { animation: rglitch .9s steps(1) 1; }
@keyframes rglitch {
  0% { border-color: var(--rec); transform: translate(2px, -1px); box-shadow: 0 0 20px rgba(224,87,75,.7); }
  15% { border-color: var(--nata); transform: translate(-3px, 1px); }
  30% { border-color: var(--rec); transform: translate(1px, 2px) scale(.94); box-shadow: -4px 0 0 rgba(224,87,75,.6), 4px 0 0 rgba(63,193,168,.6); }
  45% { border-color: var(--nata); transform: none; }
  60% { border-color: var(--rec); transform: translate(-1px, 0) scale(1.04); }
  80%, 100% { border-color: var(--nata); transform: none; box-shadow: 0 0 14px rgba(63,193,168,.3); }
}

.dialog { grid-area: dialog; overflow: auto; max-height: 190px; padding: 16px 24px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.dialog .msg { display: none; }
.dialog .msg.is-cur { display: block; }
.msg--say { font-family: var(--serif); font-size: 21px; line-height: 1.45; color: #eef3f1; text-shadow: 0 1px 12px rgba(0,0,0,.6); max-width: 46em; }
.msg--say.is-glitch { animation: tglitch .9s steps(1) 1; }
@keyframes tglitch { 0% { text-shadow: -2px 0 rgba(224,87,75,.8), 2px 0 rgba(63,193,168,.8); transform: translateX(1px); } 25% { text-shadow: none; transform: none; } 40% { text-shadow: 2px 0 rgba(224,87,75,.7), -2px 0 rgba(63,193,168,.7); transform: translateX(-1px); } 60%, 100% { text-shadow: 0 1px 12px rgba(0,0,0,.6); transform: none; } }
.msg--ask { align-self: flex-start; font-size: 14px; color: var(--dim); }
.msg--ask::before { content: "Вы: "; color: var(--dim); }
.msg--note { font-size: 13px; color: var(--dim); border: 1px dashed var(--edge-2); padding: 8px 12px; border-radius: 8px; }
.caret::after { content: "▍"; color: var(--nata); animation: blink 1s steps(2) infinite; margin-left: 2px; }
/* история разговора: всплывает над Натой */
body.log-open .dialog { position: absolute; left: 0; right: 0; bottom: 100%; max-height: min(60vh, 520px); justify-content: flex-start; z-index: 8; background: rgba(10,15,17,.97); border: 1px solid var(--edge-2); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 18px 24px; box-shadow: 0 -30px 60px -20px rgba(0,0,0,.9); }
body.log-open .dialog .msg { display: block; }
body.log-open .dialog .msg--say { font-size: 17px; }
body.log-open .dialog .msg--ask { align-self: flex-end; color: var(--frost); background: rgba(255,255,255,.07); padding: 7px 12px; border-radius: 10px; }
body.log-open .dialog .msg--ask::before { content: ""; }

.actions { grid-area: actions; padding: 12px 18px 14px; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--edge); }
.actions:empty { display: none; }
.q { text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--edge-2); border-radius: 999px; padding: 8px 15px; cursor: pointer; font-size: 14.5px; transition: border-color .15s, background .15s; }
.q:hover { border-color: var(--nata); background: rgba(63,193,168,.08); }
.q--lamp { border-color: rgba(230,162,74,.45); color: #f2c27d; }
.q--lamp:hover { border-color: var(--lamp); background: var(--lamp-soft); }
.q--free { border-style: dashed; color: var(--dim); background: none; }
.q[disabled] { opacity: .38; cursor: default; }
.actions__row { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

/* дом откликается на слова Наты */
.plan .is-ping rect, .plan rect.is-ping { animation: pingRoom 2.6s ease-out 1; }
.plan .plan__cam.is-ping circle:first-child { animation: pingCam 2.6s ease-out 1; }
.plan .plan__person.is-ping circle { animation: pingPerson 2.6s ease-out 1; }
.plan .plan__lock.is-ping { animation: pingLock 2.6s ease-out 1; }
@keyframes pingRoom { 0%, 60% { fill: rgba(63,193,168,.22); stroke: var(--nata); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(63,193,168,.8)); } 100% { } }
@keyframes pingCam { 0% { r: 15; } 20% { r: 26; fill: rgba(224,87,75,.55); } 45% { r: 15; } 65% { r: 22; fill: rgba(224,87,75,.45); } 100% { r: 15; } }
@keyframes pingPerson { 0%, 60% { fill: #fff; filter: drop-shadow(0 0 10px rgba(255,255,255,.9)); } 100% { } }
@keyframes pingLock { 0%, 60% { stroke-width: 4; filter: drop-shadow(0 0 7px currentColor); transform: scale(1.5); } 100% { transform: none; } }
.jrow.is-ping { animation: pingRow 2.6s ease-out 1; }
@keyframes pingRow { 0%, 50% { background: rgba(63,193,168,.16); box-shadow: inset 3px 0 0 var(--nata); } 100% { } }

/* дом просыпается при первом подключении */
.console__plan.is-waking .plan__room rect, .console__plan.is-waking .plan__nata, .console__plan.is-waking .plan__lock, .console__plan.is-waking .plan__cam, .console__plan.is-waking .plan__person { opacity: 0; animation: wake .6s ease-out forwards; }
@keyframes wake { 0% { opacity: 0; filter: drop-shadow(0 0 0 rgba(63,193,168,0)); } 50% { opacity: 1; filter: drop-shadow(0 0 9px rgba(63,193,168,.9)); } 100% { opacity: 1; filter: none; } }
.hintline { font-size: 13px; color: var(--dim); }

/* ---------- tray ---------- */
.tray { padding: 10px 18px 14px; display: flex; gap: 14px; align-items: center; background: linear-gradient(0deg, rgba(8,12,14,.9), rgba(8,12,14,.5)); border-top: 1px solid var(--edge); }
.tray__label { font: inherit; font-size: 13px; color: var(--dim); white-space: nowrap; background: none; border: 0; padding: 6px 2px; cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.25); text-underline-offset: 4px; }
.tray__label:hover { color: var(--frost); text-decoration-color: var(--nata); }
.tray__row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px; min-width: 0; flex: 1; }
.ev { flex: none; width: 96px; height: 66px; border-radius: 6px; border: 1px solid var(--edge-2); background: var(--panel-2); position: relative; cursor: pointer; overflow: hidden; padding: 0; transition: transform .15s, border-color .15s; }
.ev:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--nata); }
.ev img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); }
.ev__num { position: absolute; left: 5px; top: 4px; font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,.65); padding: 0 5px; border-radius: 3px; }
.ev__txt { position: absolute; inset: 22px 6px 6px; font-family: var(--mono); font-size: 10.5px; line-height: 1.25; color: var(--dim); text-align: left; }
.ev--empty { cursor: default; border-style: dashed; background: transparent; }
.ev--empty .ev__num { background: none; color: var(--faint); }
.ev--new { animation: land .7s cubic-bezier(.2,.9,.3,1.3); border-color: var(--nata); box-shadow: 0 0 18px var(--nata-glow); }
@keyframes land { from { transform: translateY(-40px) rotate(-6deg); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(4,7,8,.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 4vw; z-index: 75; }
.modal[hidden] { display: none; }
.modal__box { background: var(--night); border: 1px solid var(--edge-2); border-radius: 12px; max-width: 900px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 40px 100px -30px #000; }
.modal__media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal__media .feed { position: absolute; inset: 0; min-height: 0; border-radius: 0; }
.modal__body { padding: 20px 24px 24px; }
.modal__title { font-family: var(--serif); font-size: 22px; font-weight: 400; margin: 0 0 8px; }
.modal__text { margin: 0 0 18px; color: var(--dim); }
.modal__log { font-family: var(--mono); font-size: 14px; background: rgba(0,0,0,.35); padding: 14px 16px; border-radius: 8px; margin: 0 0 18px; white-space: pre-wrap; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) {
  .main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "side"; }
  .console { position: fixed; z-index: 15; left: 10px; top: 58px; bottom: 10px; width: min(340px, calc(100vw - 20px)); transform: translateX(-110%); transition: transform .3s; }
  body.console-open .console { transform: none; }
  .bar__console { display: inline-block; color: var(--nata); border-color: rgba(63,193,168,.4); }
}
@media (max-width: 820px) {
  .game { height: auto; min-height: 100vh; }
  .main { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .bar__chapter { display: none; }
  .meter__track { width: 50px; }
  .stage { min-height: 320px; }
  .side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nata" "dialog" "actions"; }
  .nata { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--edge); padding: 12px 14px; }
  .nata__who { grid-template-columns: auto auto; column-gap: 12px; align-items: baseline; }
  .nata__log { grid-column: 1 / -1; margin-top: 2px; }
  .ring { width: 48px; height: 48px; }
  .dialog { max-height: 40vh; padding: 12px 16px; }
  .msg--say { font-size: 18px; }
  .actions { padding: 10px 12px 12px; }
  body.log-open .dialog { position: static; max-height: 60vh; border: 0; border-radius: 0; box-shadow: none; background: rgba(0,0,0,.25); padding: 14px 16px; }
  .tl__axis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cams { grid-template-columns: 1fr; }
  .cams__list { flex-direction: row; overflow-x: auto; }
  .cams__item { flex: none; }
  .letter__card { grid-template-columns: 1fr; padding: 22px; }
  .bar { gap: 10px; padding: 8px 12px; }
  .bar__step { order: 5; flex: 1 1 100%; text-align: center; }
  .letter { padding: 20px 12px; }
  .bar > span:not(.bar__step):not(.meter) { font-size: 13px; }
  .tray { position: sticky; bottom: 0; }
  .jrow { grid-template-columns: 76px minmax(0, 1fr); }
  .jrow__act { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .jrow { opacity: 1; }
}

/* ---------- landing ---------- */
.landing { background: var(--ink); }
.skip { position: fixed; top: 14px; right: 16px; z-index: 30; font-size: 14px; color: var(--frost); text-decoration: none; padding: 6px 14px; border: 1px solid var(--edge-2); border-radius: 999px; background: rgba(8,12,14,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.skip:hover { border-color: var(--nata); }
.night { position: relative; height: 640vh; }
.night__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.night__frame { position: absolute; left: 56%; top: 47%; width: max(100vw, 200vh); aspect-ratio: 2 / 1; transform: translate(-50%, -50%) scale(calc(1 + var(--p, 0) * .08)); transform-origin: 40% 50%; }
.night__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.night__img--alt { opacity: 0; }
.night__glow { position: absolute; width: 9%; aspect-ratio: 1; left: 34.8%; top: 49%; mix-blend-mode: screen; border-radius: 50%; background: radial-gradient(circle, rgba(230,162,74,.5), rgba(230,162,74,0) 70%); animation: flicker 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes flicker { 0%,100% { filter: brightness(.6) } 50% { filter: brightness(1.2) } 62% { filter: brightness(.8) } 66% { filter: brightness(1.2) } }
.night__dark { position: absolute; inset: 0; background: #020304; opacity: 0; }
.night__dawn { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(120,145,170,.35), rgba(60,75,90,.15)); mix-blend-mode: soft-light; opacity: 0; }
.night__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,9,11,.82) 0%, rgba(6,9,11,.35) 45%, rgba(6,9,11,0) 70%), linear-gradient(0deg, rgba(6,9,11,.7), rgba(6,9,11,0) 40%); }
.night__hud { position: absolute; top: 18px; left: 22px; display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; color: rgba(232,236,234,.8); text-shadow: 0 1px 2px #000; }
.night__rec { color: var(--rec); animation: blink 1.4s steps(2) infinite; }
.night__clock { position: absolute; right: 5vw; top: 12vh; font-family: var(--mono); font-size: clamp(64px, 11vw, 168px); line-height: 1; color: rgba(232,236,234,.92); letter-spacing: -.03em; text-shadow: 0 0 40px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.night__clocknote { position: absolute; right: 5.4vw; top: calc(12vh + clamp(70px, 11.8vw, 180px)); font-family: var(--mono); font-size: 14px; color: var(--nata); }
.night__intro { position: absolute; left: 6vw; bottom: 12vh; max-width: 640px; }
.night__title { font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 9vw, 132px); line-height: .92; letter-spacing: -.02em; margin: 0 0 .3em; }
.night__lead { font-family: var(--serif); font-size: clamp(18px, 1.9vw, 23px); line-height: 1.5; margin: 0 0 1.4em; max-width: 32em; }
.night__ctas { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.night__scroll { font-size: 14px; color: var(--dim); }
.night__scroll::after { content: ""; display: inline-block; width: 1px; height: 22px; margin-left: 10px; vertical-align: middle; background: linear-gradient(var(--dim), transparent); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { from { transform: scaleY(0); transform-origin: top } 50% { transform: scaleY(1); transform-origin: top } to { transform: scaleY(0); transform-origin: bottom } }
.night__log { position: absolute; left: 6vw; bottom: 10vh; margin: 0; padding: 0; list-style: none; pointer-events: none; font-family: var(--mono); font-size: clamp(14px, 1.3vw, 17px); display: grid; gap: 4px; opacity: 0; transition: opacity .4s; width: min(520px, 88vw); }
.night__log.is-on { opacity: 1; }
.nlog { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 7px 12px; border-radius: 6px; background: rgba(8,12,14,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--edge); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.nlog.is-on { opacity: 1; transform: none; }
.nlog__t { color: var(--dim); }
.nlog--void { border-style: dashed; border-color: rgba(224,87,75,.5); color: #f0b3ad; }
.night__void { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--mono); color: var(--dim); opacity: 0; pointer-events: none; }
.night__void p { margin: 0; font-size: 16px; }
.night__voidt { font-size: clamp(60px, 10vw, 140px) !important; color: var(--frost); animation: glitchtext 2.4s steps(2) infinite; }
@keyframes glitchtext { 0%, 92% { transform: none; text-shadow: none } 94% { transform: translateX(-4px); text-shadow: 3px 0 var(--rec), -3px 0 var(--nata) } 96% { transform: translateX(3px) } }
.night__final { position: absolute; left: 6vw; bottom: 12vh; max-width: 620px; opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; pointer-events: none; }
.night__final.is-on { opacity: 1; transform: none; pointer-events: auto; }
.night__finalk { font-family: var(--mono); color: var(--lamp); margin: 0 0 8px; }
.night__finalt { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.08; margin: 0 0 .4em; }
.night__finall { font-family: var(--serif); font-size: clamp(18px, 1.8vw, 22px); color: var(--frost); margin: 0 0 1.4em; max-width: 30em; }

.pitch { max-width: 1160px; margin: 0 auto; padding: 14vh 6vw 6vh; display: grid; gap: 12vh; }
.pitch__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 6vw; align-items: center; }
.pitch__row--flip .pitch__media { order: 2; }
.pitch__text h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; margin: 0 0 .5em; }
.pitch__text p { margin: 0; color: var(--dim); font-size: 18px; max-width: 30em; }
.pitch__media { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--edge); background: #05080a; box-shadow: 0 40px 90px -40px #000; }
.pitch__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.pitch__osd { position: absolute; top: 12px; left: 14px; font-family: var(--mono); font-size: 12px; color: #e8ecea; text-shadow: 0 1px 2px #000; }
.pitch__osd--r { left: auto; right: 14px; color: var(--rec); }
.pitch__media--ring { display: grid; place-items: center; background: radial-gradient(circle at 50% 55%, #142024, #05080a 70%); }
.pitch__ring { width: 34%; aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--nata); box-shadow: 0 0 60px var(--nata-glow), inset 0 0 30px var(--nata-glow); animation: talk 2.6s ease-in-out infinite; }
.pitch__media--plan { padding: 6%; background: radial-gradient(circle at 50% 40%, #0f181b, #05080a 75%); }
.facts { max-width: 1160px; margin: 0 auto; padding: 6vh 6vw 14vh; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.facts__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6vw; flex-wrap: wrap; }
.facts__list li { display: flex; flex-direction: column; }
.facts__list b { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.facts__list span { color: var(--dim); font-size: 14px; }


@media (max-width: 820px) {
  .night__clock { right: auto; left: 6vw; top: 9vh; }
  .night__clocknote { right: auto; left: 6.4vw; top: calc(9vh + clamp(70px, 11.8vw, 180px)); }
  .night__frame { left: 62%; }
  .pitch__row { grid-template-columns: 1fr; gap: 24px; }
  .pitch__row--flip .pitch__media { order: 0; }
}
.is-static .night { height: auto; }
.is-static .night__sticky { position: relative; height: auto; min-height: 100vh; }
.is-static .night__log { position: relative; left: auto; bottom: auto; margin: 0 6vw 40px; opacity: 1; padding-top: 70vh; }
.is-static .night__final { position: relative; left: auto; bottom: auto; margin: 0 6vw 60px; opacity: 1; transform: none; pointer-events: auto; }
.is-static .night__void, .is-static .night__clock, .is-static .night__clocknote { display: none; }

/* stage helpers */
.task--bg { position: relative; isolation: isolate; }
.task--bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--bg); background-size: cover; background-position: center; filter: grayscale(1) brightness(.28) blur(2px); border-radius: inherit; }
.task--bg::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,15,18,.85), rgba(10,15,18,.3)); }
.tl__hint { margin: 0 0 16px; color: var(--dim); font-size: 14px; }
.night__off { position: absolute; left: 36.3%; top: 53.8%; width: 6.4%; height: 11.2%; background: #0b0f10; mix-blend-mode: multiply; filter: blur(3px); opacity: 0; }

/* ---------- site footer ---------- */
.site-footer { border-top: 1px solid var(--edge); padding: 40px 6vw 34px; color: var(--dim); font-size: 14px; display: grid; gap: 18px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.25)); }
.site-footer a { color: var(--frost); text-decoration: none; }
.site-footer a:hover { color: var(--nata); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: baseline; justify-content: space-between; }
.site-footer__brand { font-family: var(--serif); font-size: 22px; color: var(--frost); display: inline-flex; align-items: center; gap: 12px; }
.age { font-family: var(--sans); font-size: 12px; font-weight: 700; border: 1.5px solid var(--dim); border-radius: 50%; width: 34px; height: 34px; display: inline-grid; place-items: center; color: var(--frost); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer__note { margin: 0; max-width: 60em; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 16px; border-top: 1px solid var(--edge); font-size: 13px; }
.site-footer__bottom span:last-child { margin-left: auto; }
.bar__docs { text-decoration: none; }

/* ---------- documents ---------- */
.doc-page { background: var(--night); }
.doc-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 6vw; border-bottom: 1px solid var(--edge); }
.doc-top__home { font-family: var(--serif); font-size: 20px; color: var(--frost); text-decoration: none; }
.doc-top__play { color: var(--nata); text-decoration: none; font-size: 15px; }
.doc-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 6vw 80px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 50px; }
.doc-nav { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.doc-nav__head { color: var(--faint); margin: 0 0 10px; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.doc-nav a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--dim); text-decoration: none; }
.doc-nav a:hover { color: var(--frost); background: rgba(255,255,255,.04); }
.doc-nav a[aria-current="page"] { color: var(--nata-2); background: rgba(63,193,168,.1); }
.doc { max-width: 42em; font-size: 16.5px; line-height: 1.65; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 0 0 24px; }
.doc h2 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 34px 0 10px; }
.doc p, .doc li { color: #c9d1cf; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc b { color: var(--frost); }
.doc__draft { font-family: var(--mono); font-size: 13px; color: var(--lamp); border: 1px dashed rgba(230,162,74,.5); border-radius: 8px; padding: 10px 14px; margin: 0 0 26px; }
.doc__q { display: block; background: rgba(230,162,74,.12); color: #f2c27d; border-left: 3px solid var(--lamp); padding: 6px 12px; margin: 8px 0; border-radius: 0 6px 6px 0; font-size: 14px; }
.doc-list { font-size: 18px; }
@media (max-width: 820px) {
  .doc-wrap { grid-template-columns: 1fr; gap: 24px; }
  .doc-nav { position: static; }
  .site-footer__bottom span:last-child { margin-left: 0; }
}

/* ---------- email form ---------- */
.mailform { margin-top: 22px; max-width: 560px; display: grid; gap: 10px; }
.mailform__lead { margin: 0; color: var(--frost); font-size: 15px; }
.mailform__row { display: flex; gap: 8px; flex-wrap: wrap; }
.mailform__input { flex: 1 1 220px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--edge-2); background: rgba(0,0,0,.45); font-size: 16px; }
.mailform__input:focus { border-color: var(--nata); outline: none; box-shadow: 0 0 0 4px rgba(63,193,168,.15); }
.mailform__check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--dim); cursor: pointer; }
.mailform__check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--nata); }
.mailform__check a { color: var(--frost); }
.mailform__check i { font-style: normal; color: var(--faint); }
.mailform__msg { margin: 0; min-height: 1.4em; font-size: 14px; }
.mailform__msg.is-bad { color: #f0a49c; }
.mailform__msg.is-ok { color: var(--nata-2); }

.accept { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.accept a { color: var(--frost); }
.facts__cta { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- intro: phone ---------- */
.is-intro .main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage"; }
.is-intro .console, .is-intro .side, .is-intro .tray, .is-intro .bar__console, .is-intro .meter, .is-intro .bar > span:not(.bar__step):not(.bar__chapter) { display: none; }
.is-intro .stage { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
.phonewrap { flex: 1; display: grid; place-items: center; padding: 10px 0; transition: transform .7s cubic-bezier(.6,0,.3,1), opacity .7s; }
.phonewrap.is-open { transform: scale(2.4); opacity: 0; }
.phone { position: relative; width: min(380px, 92vw); height: min(760px, calc(100dvh - 120px)); border-radius: 46px; padding: 12px; background: #050708; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 2px #1b2226, 0 50px 120px -40px #000, 0 0 80px -20px rgba(63,193,168,.25); }
.phone__notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 14px; background: #000; z-index: 3; }
.phone__screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; overflow: clip; display: flex; flex-direction: column; background: #0d1316; }
.phone__screen--lock { background: radial-gradient(ellipse at 50% 0%, rgba(63,193,168,.12), transparent 60%), linear-gradient(180deg, #10191d, #070a0c); padding: 70px 14px 22px; }
.lock__time { font-family: var(--sans); font-weight: 300; font-size: 76px; letter-spacing: -.02em; text-align: center; line-height: 1; color: #f1f4f2; }
.lock__notes { margin-top: 40px; display: grid; gap: 8px; }
.note { text-align: left; border: 0; border-radius: 18px; padding: 11px 13px; background: rgba(40,52,58,.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--frost); cursor: pointer; opacity: 0; transform: translateY(-12px); animation: notein .45s cubic-bezier(.2,.9,.3,1.2) forwards; display: grid; gap: 4px; }
.note:hover { background: rgba(52,66,73,.85); }
@keyframes notein { to { opacity: 1; transform: none; } }
.note__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.note__when { margin-left: auto; color: var(--dim); font-size: 12px; }
.note__text { font-size: 14.5px; line-height: 1.35; }
.lock__hint { margin: auto 0 4px; text-align: center; font-size: 13px; color: var(--dim); opacity: 0; transition: opacity .6s; }
.lock__hint.is-on { opacity: 1; }
.lock__accept { margin: 0; text-align: center; font-size: 11.5px; color: var(--faint); }
.lock__accept a { color: var(--dim); }
.ava { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #7b6a5c, #3e4a50); color: #fff; font-weight: 700; font-size: 16px; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava--s { width: 22px; height: 22px; font-size: 11px; }
.ava--nata { background: #0a1214; box-shadow: inset 0 0 0 3px var(--nata); }
.phone__screen--chat { background: #0b1013; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 52px 16px 12px; background: rgba(20,28,32,.95); border-bottom: 1px solid var(--edge); }
.chat__who { display: flex; flex-direction: column; line-height: 1.25; }
.chat__status { font-size: 12.5px; color: var(--nata); }
.chat__log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.bub { max-width: 80%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.38; animation: rowin .25s; }
.bub--in { align-self: flex-start; background: #1d2a30; border-bottom-left-radius: 5px; }
.bub--out { align-self: flex-end; background: #1f6f61; border-bottom-right-radius: 5px; }
.bub--sys { align-self: center; max-width: 92%; background: none; border: 1px dashed var(--edge-2); color: var(--dim); font-size: 12.5px; text-align: center; }
.bub--typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: dot 1s infinite; }
.bub--typing i:nth-child(2) { animation-delay: .15s } .bub--typing i:nth-child(3) { animation-delay: .3s }
@keyframes dot { 0%, 100% { opacity: .3; transform: none } 50% { opacity: 1; transform: translateY(-3px) } }
.chat__foot { padding: 8px 10px 16px; display: grid; gap: 6px; background: rgba(14,20,23,.95); }
.chat__foot:empty { display: none; }
.chat__card { text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(63,193,168,.45); background: rgba(63,193,168,.08); color: var(--frost); font-size: 14.5px; cursor: pointer; }
.chat__card:hover { background: rgba(63,193,168,.16); }
.chat__card--free { border-style: dashed; border-color: var(--edge-2); background: none; color: var(--dim); }
.chat__form { display: flex; gap: 6px; }
.chat__input { flex: 1; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge-2); background: #121a1e; font-size: 15px; }
.chat__input:focus { outline: none; border-color: var(--nata); }
.chat__send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--nata); color: #062720; font-size: 18px; cursor: pointer; }
.invite { align-self: flex-start; width: 86%; margin-top: 4px; padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #13242a, #0d1518); border: 1px solid rgba(63,193,168,.4); display: grid; gap: 6px; animation: rowin .35s; }
.invite__ring { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--nata); box-shadow: 0 0 14px var(--nata-glow); }
.invite__title { font-size: 15.5px; }
.invite__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--dim); }
.invite__row b { color: var(--frost); font-weight: 400; }
.invite__btn { margin-top: 6px; min-height: 40px; font-size: 15px; }
.phone__screen--app { background: radial-gradient(circle at 50% 30%, #10222a, #060a0b 70%); }
.napp { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; gap: 8px; text-align: center; }
.napp__ring { width: 96px; height: 96px; border-radius: 50%; border: 5px solid var(--nata); box-shadow: 0 0 40px var(--nata-glow), inset 0 0 20px var(--nata-glow); margin-bottom: 14px; animation: idle 3s ease-in-out infinite; }
.napp__ring.is-live { animation: talk 1s ease-in-out infinite; }
.napp__name { margin: 0; font-size: 22px; font-family: var(--serif); }
.napp__sub { margin: 0 0 16px; color: var(--dim); font-size: 14px; }
.napp__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; max-width: 240px; }
.napp__code { width: 100%; min-width: 0; box-sizing: border-box; text-align: center; font-family: var(--mono); font-size: 30px; letter-spacing: .5em; padding: 10px 0 10px .5em; border-radius: 14px; border: 1px solid var(--edge-2); background: rgba(0,0,0,.4); }
.napp__code:focus { outline: none; border-color: var(--nata); box-shadow: 0 0 0 4px rgba(63,193,168,.15); }
.napp__code.is-wrong { animation: shake .35s; border-color: var(--rec); }
.sms { position: absolute; top: 12px; left: 10px; right: 10px; z-index: 4; text-align: left; border: 0; border-radius: 18px; padding: 11px 13px; background: rgba(40,52,58,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--frost); cursor: pointer; display: grid; gap: 4px; transform: translateY(-140%); transition: transform .45s cubic-bezier(.2,.9,.3,1.2); }
.sms.is-on { transform: none; }
.boot { list-style: none; margin: 10px 0 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: left; font-size: 13.5px; }
.boot__row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); animation: rowin .3s; }
.boot__dot { width: 8px; height: 8px; border-radius: 50%; }
.boot__row.is-ok .boot__dot { background: var(--nata); box-shadow: 0 0 8px var(--nata); }
.boot__row.is-part .boot__dot { background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
.boot__row.is-no .boot__dot { background: var(--rec); box-shadow: 0 0 8px var(--rec); }
.boot__st { color: var(--dim); font-size: 12.5px; text-align: right; }
.console__plan.is-loading { min-height: 200px; display: grid; place-items: center; }
.console__wait { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--dim); animation: blink 1.6s steps(2) infinite; }
@media (max-width: 820px) {
  .is-intro .main { padding: 0; }
  .phone { width: 100vw; height: calc(100dvh - 56px); border-radius: 0; padding: 0; border: 0; box-shadow: none; }
  .is-intro .bar__step, .is-intro .bar__btn:not(#restart):not(#sound) { display: none; }
  .chat__head { padding-top: 14px; }
  .phone__screen--lock { padding-top: 40px; }
  .phone__notch { display: none; }
  .phone__screen { border-radius: 0; }
}
/* верхняя строка не переносится: задача сокращается многоточием, название главы прячется на средних экранах */
@media (min-width: 821px) {
  .bar__step { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(52ch, 38vw); }
}
@media (min-width: 821px) and (max-width: 1500px) {
  .bar__chapter { display: none; }
}
/* кадр камеры вписывается в свободную высоту сцены, а не только в ширину */
@media (min-width: 821px) {
  .cams__view { container-type: size; }
  .cams__view > .feed { width: min(100%, calc((100cqh - 56px) * 16 / 9)); }
  .cams__view .archive__screen { width: min(100%, calc((100cqh - 185px) * 16 / 9)); }
}
/* невысокие экраны: панель Наты компактнее, чтобы камере хватало места */
@media (min-width: 821px) and (max-height: 820px) {
  .nata { padding: 10px 12px; gap: 6px; }
  .ring { width: 44px; height: 44px; }
  .dialog { max-height: 120px; padding: 10px 20px 8px; }
  .msg--say { font-size: 18px; }
  .actions { padding: 8px 16px 10px; }
  .q { padding: 6px 13px; font-size: 14px; }
}
/* ---------- телефон игрока в кармане ---------- */
.pocket { --peek: 54px; position: fixed; right: 26px; bottom: 0; z-index: 25; width: 330px; transform: translateY(calc(100% - var(--peek))); transition: transform .5s cubic-bezier(.2,.85,.25,1); cursor: pointer; }
.pocket[hidden] { display: none; }
.pocket.is-open { transform: translateY(-14px); cursor: default; }
.pocket.is-bump:not(.is-open) { animation: pbump 1s ease-out 1; }
@keyframes pbump {
  0% { transform: translateY(calc(100% - var(--peek))); }
  18% { transform: translateY(calc(100% - var(--peek) - 34px)) rotate(-2deg); }
  28% { transform: translateY(calc(100% - var(--peek) - 34px)) rotate(2deg); }
  38% { transform: translateY(calc(100% - var(--peek) - 34px)) rotate(-1.5deg); }
  48% { transform: translateY(calc(100% - var(--peek) - 34px)) rotate(1deg); }
  70% { transform: translateY(calc(100% - var(--peek) - 34px)); }
  100% { transform: translateY(calc(100% - var(--peek))); }
}
.pocket__phone { height: min(620px, calc(100dvh - 96px)); border-radius: 40px; padding: 9px; background: #050708; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 2px #1b2226, 0 -10px 60px -10px rgba(0,0,0,.85); }
.pocket__screen { height: 100%; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; background: #0b1013; }
.pocket__top { flex: none; height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 22px; font-size: 13px; font-weight: 600; }
.pocket__notch { width: 86px; height: 24px; border-radius: 13px; background: #000; }
.pocket__badge { justify-self: end; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; display: grid; place-items: center; }
.pocket__badge.is-on { background: var(--nata); color: #062720; }
.pocket__hint { margin: 4px 0 0; text-align: center; font-size: 13px; color: var(--dim); }
.pocket__banner { position: absolute; left: 0; right: 0; top: -78px; display: flex; gap: 10px; align-items: center; text-align: left; border: 0; border-radius: 18px; padding: 11px 13px; background: rgba(40,52,58,.96); color: var(--frost); box-shadow: 0 16px 40px -14px rgba(0,0,0,.9); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; font: inherit; }
.pocket__banner.is-on { opacity: 1; transform: none; pointer-events: auto; }
.pocket.is-open .pocket__banner { display: none; }
.pocket__btext { display: grid; gap: 2px; min-width: 0; font-size: 13.5px; }
.pocket__btext span { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket__body { flex: 1; overflow-y: auto; padding: 4px 12px 10px; }
.pocket__title { margin: 6px 4px 10px; font-size: 26px; font-weight: 700; }
.pocket__row { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--edge); padding: 10px 4px; color: var(--frost); cursor: pointer; font: inherit; }
.pocket__row:hover { background: rgba(255,255,255,.03); }
.pocket__who { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.pocket__who span { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket__row.is-new .pocket__who span { color: var(--frost); }
.pocket__dot { min-width: 20px; height: 20px; border-radius: 10px; background: var(--nata); color: #062720; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.pocket__empty { color: var(--dim); font-size: 14px; margin: 8px 4px; }
.pocket__chead { flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 12px 10px; border-bottom: 1px solid var(--edge); }
.pocket__back { background: none; border: 0; color: var(--nata); font-size: 30px; line-height: 1; padding: 0 6px 4px 0; cursor: pointer; }
.pocket__log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.pocket__log .bub { font-size: 14px; animation: none; }
.pocket__card { display: flex; gap: 10px; align-items: center; cursor: pointer; border: 1px solid rgba(63,193,168,.35); }
@media (max-width: 820px) {
  .pocket { right: 8px; left: 8px; width: auto; --peek: 50px; }
  .pocket__phone { height: calc(100dvh - 70px); border-radius: 28px; }
  .pocket__screen { border-radius: 22px; }
  .tray { bottom: 50px; }
  body:not(.is-intro) .game { padding-bottom: 50px; }
  .pocket__banner { top: -74px; }
}
@media (prefers-reduced-motion: reduce) { .pocket { transition: none; } .pocket.is-bump { animation: none; } }
/* ---------- финал главы: дом засыпает + итоги ночи ---------- */
.fin { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: 18px; padding: 18px 22px; align-items: stretch; overflow: auto; }
.fin__dawn { text-align: center; display: grid; justify-items: center; align-content: center; gap: 4px; opacity: 0; transition: opacity 1.6s ease 0.4s; }
.fin.is-on .fin__dawn { opacity: 1; }
.fin__clock { font-family: var(--mono); font-size: clamp(44px, 5.6vw, 84px); letter-spacing: .04em; line-height: 1; color: #e9efed; text-shadow: 0 0 30px rgba(63,193,168,.25); }
.fin__sub { margin: 4px 0 0; font-family: var(--mono); font-size: 14px; color: var(--lamp); }
.fin__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 40px); }
.fin__people { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.fin__person { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--edge-2); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13.5px; color: var(--dim); }
.fin__person b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(223,229,226,.9); color: var(--ink); font-size: 12px; }
.fin__wait { margin: 8px 0 0; color: var(--dim); font-size: 15px; }
.fin__card { background: rgba(10,15,17,.86); border: 1px solid var(--edge-2); border-radius: 14px; padding: 18px 20px; display: grid; align-content: start; gap: 4px; min-height: 0; overflow: auto; opacity: 0; transform: translateY(14px); transition: opacity .8s ease 1.4s, transform .8s ease 1.4s; }
.fin.is-on .fin__card { opacity: 1; transform: none; }
.fin__head { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.fin__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--edge); font-size: 14.5px; }
.fin__row span { color: var(--dim); }
.fin__row b { font-weight: 600; text-align: right; }
.fin__label { margin: 12px 0 4px; font-size: 13px; color: var(--dim); }
.fin__qs { display: flex; flex-wrap: wrap; gap: 6px; }
.fin__q { border: 1px dashed var(--edge-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.fin__miss { margin: 10px 0 6px; font-size: 13.5px; color: var(--lamp); }
.fin__card .mailform { margin-top: 6px; }
@media (max-width: 1100px) { .fin { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fin__dawn, .fin__card { transition: none; opacity: 1; transform: none; } }
/* главный экран телефона: часы и иконки приложений */
.pocket__screen.is-home { background: radial-gradient(ellipse at 30% 10%, rgba(63,193,168,.20), transparent 55%), radial-gradient(ellipse at 80% 90%, rgba(230,162,74,.12), transparent 60%), linear-gradient(180deg, #13202a, #070b0d); }
.pocket__home { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 18px 18px 26px; }
.pocket__bigclock { font-size: 64px; font-weight: 300; letter-spacing: -.02em; line-height: 1; color: #f1f4f2; margin-top: 10px; }
.pocket__date { color: var(--dim); font-size: 14px; margin-top: 4px; }
.pocket__apps { margin-top: auto; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px 10px; border-radius: 26px; background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pocket__app { background: none; border: 0; color: var(--frost); font: inherit; display: grid; justify-items: center; gap: 6px; cursor: pointer; padding: 0; }
.pocket__icon { position: relative; width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); transition: transform .15s; }
.pocket__app:hover .pocket__icon { transform: scale(1.06); }
.pocket__icon svg { width: 30px; height: 30px; }
.pocket__icon--msgs { background: linear-gradient(180deg, #4fd1b4, #1f8f78); }
.pocket__icon--calls { background: linear-gradient(180deg, #5fd26a, #2a9437); }
.pocket__icon--notes { background: linear-gradient(180deg, #f2c27d, #c98a2e); }
.pocket__appbadge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rec); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #0b1013; }
.pocket__appname { font-size: 12px; color: #e3e9e7; }
.pocket__homebar { flex: none; align-self: center; width: 120px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.55); border: 0; margin: 6px 0 9px; cursor: pointer; padding: 0; }
.pocket__homebar:hover { background: #fff; }
.pocket__label { margin: 14px 4px 4px; font-size: 12.5px; color: var(--dim); }
.pocket__row--static { cursor: default; }
.pocket__callbtn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(95,210,106,.16); color: #5fd26a; display: grid; place-items: center; cursor: pointer; }
.pocket__callbtn svg { width: 18px; height: 18px; }
.pocket__compose { flex: none; display: flex; gap: 8px; align-items: center; padding: 8px 10px 2px; border-top: 1px solid var(--edge); }
.pocket__input { flex: 1; text-align: left; min-height: 36px; border-radius: 999px; border: 1px solid var(--edge-2); background: #121a1e; color: var(--faint); font: inherit; font-size: 14px; padding: 0 14px; cursor: text; }
/* телефон: строка статуса, списки, карточка номера, ответы, звонок */
.pocket__top { grid-template-columns: 1fr auto 1fr; }
.pocket__status { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.pocket__sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.pocket__sig i { width: 3px; background: #e9efed; border-radius: 1px; }
.pocket__sig i:nth-child(1) { height: 4px; } .pocket__sig i:nth-child(2) { height: 6px; } .pocket__sig i:nth-child(3) { height: 8px; } .pocket__sig i:nth-child(4) { height: 11px; opacity: .35; }
.pocket__bat { position: relative; width: 22px; height: 11px; border: 1.5px solid rgba(233,239,237,.7); border-radius: 3px; padding: 1px; }
.pocket__bat::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 1px; background: rgba(233,239,237,.7); }
.pocket__bat i { display: block; height: 100%; background: #e9efed; border-radius: 1px; }
.pocket__pct { color: #e9efed; }
.pocket__hint.is-new { color: var(--nata); }
.pocket__apps { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 6px; }
.pocket__icon { width: 52px; height: 52px; border-radius: 14px; }
.pocket__icon svg { width: 27px; height: 27px; }
.pocket__icon--people { background: linear-gradient(180deg, #9aa7ad, #5c6a70); }
.pocket__appname { font-size: 11px; }
.pocket__trow { display: flex; align-items: center; justify-content: space-between; }
.pocket__iconbtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(63,193,168,.12); color: var(--nata); display: grid; place-items: center; cursor: pointer; }
.pocket__iconbtn svg { width: 19px; height: 19px; }
.pocket__textbtn { background: none; border: 0; color: var(--nata); font: inherit; font-size: 15px; cursor: pointer; }
.pocket__callbtn--msg { background: rgba(63,193,168,.14); color: var(--nata); margin-right: 6px; }
.pocket__row.is-missed .pocket__who b { color: var(--rec); }
.pocket__day { align-self: center; font-size: 11.5px; color: var(--faint); margin: 6px 0 2px; }
.pocket__card { max-width: 88%; display: grid; gap: 8px; cursor: default; }
.pocket__cardtop { display: flex; gap: 10px; align-items: center; }
.pocket__cardacts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pocket__cardbtn { border: 1px solid rgba(63,193,168,.45); background: rgba(63,193,168,.10); color: var(--frost); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.pocket__cardbtn:hover { background: rgba(63,193,168,.2); }
.pocket__saved { font-size: 12px; color: var(--nata); padding: 0 4px; }
.bub__seen { display: block; text-align: right; font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.pocket__compose { flex-direction: column; align-items: stretch; padding: 8px 10px 0; }
.pocket__lines { display: grid; gap: 6px; margin-bottom: 8px; max-height: 210px; overflow-y: auto; }
.pocket__line { text-align: left; border: 1px solid rgba(63,193,168,.45); background: rgba(63,193,168,.08); color: var(--frost); border-radius: 14px; padding: 8px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.pocket__line:hover { background: rgba(63,193,168,.16); }
.pocket__line--free { border-style: dashed; border-color: var(--edge-2); background: none; color: var(--dim); }
.pocket__input.is-empty { color: var(--faint); cursor: default; }
.pocket__noreply { flex: none; margin: 0; padding: 10px 12px 4px; text-align: center; font-size: 12px; color: var(--faint); border-top: 1px solid var(--edge); }
.pocket__chead .pocket__callbtn { margin-left: auto; }
.pocket__screen.is-call { background: radial-gradient(ellipse at 50% 20%, rgba(63,193,168,.16), transparent 60%), linear-gradient(180deg, #121c22, #06090a); }
.pocket__call { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 20px 30px; gap: 10px; text-align: center; }
.ava--xl { width: 96px; height: 96px; font-size: 38px; }
.pocket__cname { font-size: 24px; font-weight: 600; margin-top: 6px; }
.pocket__cstate { color: var(--dim); font-size: 15px; animation: blink 1.6s steps(2) infinite; }
.pocket__cstate.is-talk { animation: none; color: var(--frost); font-family: var(--serif); font-size: 16px; line-height: 1.5; max-width: 260px; }
.pocket__cacts { margin-top: auto; display: flex; gap: 40px; }
.pocket__cbtn { width: 70px; height: 70px; border-radius: 50%; border: 0; color: #fff; font: inherit; font-size: 11.5px; cursor: pointer; }
.pocket__cbtn.is-red { background: #d9483b; }
.pocket__cbtn.is-green { background: #2fa84a; }
/* аватарки-буквы разного цвета, пока нет фото */
.ava--semyon { background: linear-gradient(135deg, #6f7f5c, #3c4a36); }
.ava--irina { background: linear-gradient(135deg, #8a6a7a, #4a3946); }
.ava--mom { background: linear-gradient(135deg, #c48a5e, #7c4f33); }
.ava--dima { background: linear-gradient(135deg, #4f7fb0, #2c4a6a); }
.ava--bank { background: linear-gradient(135deg, #2f6f8f, #163e52); }
.ava--shop { background: linear-gradient(135deg, #b0904f, #6a552c); }
.ava--spam { background: linear-gradient(135deg, #5a6066, #33383c); }
/* главная: переключатель камер в шапке */
.camsw { display: inline-flex; align-items: center; gap: 6px; }
.camsw__btn { width: 22px; height: 26px; border: 0; background: none; color: rgba(232,236,234,.7); font: inherit; font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0 0 3px; transition: color .2s, transform .2s; }
.camsw__btn:hover { color: var(--nata); transform: scale(1.15); }
.camsw__btn:focus-visible { outline: 2px solid var(--nata); outline-offset: 2px; }
.night__cam { min-width: 12.5ch; text-align: center; }
.night__feed { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none; background: #050708; }
.night__feed.is-on { opacity: 1; }
.night__feedimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.8); }
.night__feed.is-nosig .night__feedimg { opacity: 0; }
.night__noise { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; image-rendering: pixelated; mix-blend-mode: screen; }
.night__feed.is-nosig .night__noise { opacity: .34; }
.night__feed.is-switch .night__noise { animation: camflash .45s steps(3) 1; }
.night__feed.is-switch .night__feedimg { animation: camjolt .45s steps(3) 1; }
@keyframes camflash { 0% { opacity: .9; } 60% { opacity: .5; } 100% { opacity: 0; } }
.night__feed.is-nosig.is-switch .night__noise { animation: none; opacity: .34; }
@keyframes camjolt { 0% { transform: translateX(-1.5%) skewX(2deg); filter: grayscale(1) brightness(1.6); } 50% { transform: translateX(1%); } 100% { transform: none; } }
.night__nosig { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding-left: .2em; margin: 0; font-family: var(--mono); font-size: clamp(22px, 3vw, 40px); letter-spacing: .2em; color: rgba(232,236,234,.85); opacity: 0; transition: opacity .3s; }
.night__feed.is-nosig .night__nosig { opacity: 1; animation: glitchtext 2.4s steps(2) infinite; }
/* главная: оживление картинок при наведении */
.pitch__media { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s, border-color .5s; }
.pitch__media:hover { transform: translateY(-4px); border-color: rgba(63,193,168,.35); box-shadow: 0 50px 100px -40px #000, 0 0 0 1px rgba(63,193,168,.12); }
.pitch__media img { transition: transform 1.6s cubic-bezier(.2,.8,.2,1), filter .6s; }
.pitch__media:hover img { transform: scale(1.06); filter: grayscale(1) contrast(1.18) brightness(1.08); }
.pitch__media::after { content: ""; position: absolute; left: 0; right: 0; top: -35%; height: 35%; background: linear-gradient(180deg, transparent, rgba(63,193,168,.10), transparent); pointer-events: none; opacity: 0; }
.pitch__media:hover::after { opacity: 1; animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { top: -35%; } to { top: 100%; } }
.pitch__media:hover .pitch__osd--r { animation: blink 1s steps(2) infinite; }
.pitch__media--ring::before { content: ""; position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--nata); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.pitch__media--ring:hover::before { animation: ringwave 1.4s ease-out infinite; }
@keyframes ringwave { 0% { opacity: .6; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }
.pitch__media--ring:hover .pitch__ring { animation-duration: .9s; }
.pitch__media--plan.is-wake .plan__room rect, .pitch__media--plan.is-wake .plan__nata, .pitch__media--plan.is-wake .plan__lock, .pitch__media--plan.is-wake .plan__cam { opacity: 0; animation: wake .6s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .pitch__media, .pitch__media img { transition: none; } .pitch__media:hover { transform: none; } .pitch__media:hover::after, .pitch__media--ring:hover::before { animation: none; } }
.pocket__apps { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 12px 4px; }
.pocket__icon { width: 48px; height: 48px; border-radius: 13px; }
.pocket__icon svg { width: 25px; height: 25px; }
.pocket__icon--nata { background: radial-gradient(circle at 50% 45%, #10222a, #050809); color: var(--nata); box-shadow: inset 0 0 0 1px rgba(63,193,168,.35), 0 0 14px rgba(63,193,168,.25); }
.pocket__appname { font-size: 10.5px; }
.pocket__screen.is-nata { background: radial-gradient(circle at 50% 30%, #10222a, #060a0b 70%); }
.pocket__nnote { margin: 14px 6px 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; text-align: center; }
/* ===== телефон, версия 2: главный экран, «Телеграф», SMS, приложения ===== */
.pocket__home { padding: 8px 14px 14px; gap: 0; }
.pocket__widgets { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.pocket__widget { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 18px; border: 0; background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--frost); font: inherit; }
.pocket__widget span { font-size: 12px; color: var(--dim); }
.pocket__widget--weather { background: linear-gradient(160deg, rgba(70,110,150,.55), rgba(30,50,70,.55)); cursor: pointer; }
.pocket__wbig { font-size: 28px; font-weight: 300; line-height: 1.1; }
.pocket__grid { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; }
.pocket__home .pocket__apps { grid-template-columns: repeat(4, 1fr); margin-top: auto; padding: 10px 8px; }
.pocket__apps .pocket__icon { width: 50px; height: 50px; }
.pocket__icon--sms { background: linear-gradient(180deg, #5fd26a, #2a9437); }
.pocket__icon--tg { background: linear-gradient(180deg, #5bb5e8, #2a7fbf); }
.pocket__icon--tg svg { transform: translateX(-1px); }
.pocket__icon--weather { background: linear-gradient(180deg, #6aa7e6, #2f62a8); }
.pocket__icon--maps { background: linear-gradient(180deg, #f1f4f2, #c6d0cc); color: #d9483b; }
.pocket__icon--cal { background: #f4f6f5; color: #d9483b; }
.pocket__icon--mail { background: linear-gradient(180deg, #6ab0f3, #2f78c8); }
.pocket__icon--bank { background: linear-gradient(180deg, #2f8f9f, #155766); }
.pocket__icon--taxi { background: linear-gradient(180deg, #ffd35c, #e2a51f); color: #2a2205; }
.pocket__icon--news { background: linear-gradient(180deg, #e9634f, #b83a2a); }
.pocket__icon--player { background: linear-gradient(180deg, #c46ae0, #7a32a6); }
.pocket__icon--clock { background: #111; color: #f4f6f5; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.pocket__icon--settings { background: linear-gradient(180deg, #9aa3a8, #5d666b); }
.pocket__icon--calls { background: linear-gradient(180deg, #5fd26a, #2a9437); }
.pocket__toast { position: absolute; left: 50%; bottom: 46px; transform: translate(-50%, 10px); max-width: 82%; padding: 9px 14px; border-radius: 14px; background: rgba(40,52,58,.97); color: var(--frost); font-size: 13px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 5; }
.pocket__toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pocket__phone { position: relative; }
.pocket__bhead { display: flex; gap: 8px; align-items: baseline; }
.pocket__bhead em { font-style: normal; font-size: 11.5px; color: var(--faint); }
.pocket__bat.is-low i { background: #d9483b; }
.pocket__nosig { font-size: 11px; color: var(--dim); }
/* списки переписок */
.pocket__whotop, .pocket__whobot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pocket__whotop b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket__whobot > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 13px; }
.pocket__time { margin-left: auto; flex: none; font-size: 11.5px; color: var(--faint); font-weight: 400; }
.pocket__pin { width: 13px; height: 13px; color: var(--faint); flex: none; }
.pocket__pin svg { width: 13px; height: 13px; }
.pocket__dot.is-muted { background: #5d666b; color: #fff; }
.pocket__ticks { flex: none; font-size: 12px; color: var(--faint); letter-spacing: -2px; }
.pocket__ticks.is-read { color: #5bb5e8; }
.pocket__row .pocket__dot { flex: none; }
/* «Телеграф» */
.pocket__screen.is-tg, .pocket__screen.is-tgchat { background: #0e1621; }
.tg__head { flex: none; padding: 2px 14px 6px; background: #17212b; }
.tg__title { margin: 4px 0 8px; font-size: 20px; font-weight: 700; }
.tg__search { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px; background: #242f3d; color: #7d8b99; font-size: 14px; }
.tg__search svg { width: 16px; height: 16px; flex: none; }
.tg__search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #e6edf3; font: inherit; outline: none; padding: 0; }
.tg__search input::placeholder { color: #7d8b99; }
.tg__search input::-webkit-search-cancel-button { display: none; }
.tg__search:focus-within { box-shadow: 0 0 0 1.5px #5eb5f7; }
.tg__clear { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #7d8b99; color: #17212b; font-size: 14px; line-height: 18px; padding: 0; cursor: pointer; }
.tg__search--sms { background: #262e33; margin: 0 2px 10px; }
.tg__search--sms:focus-within { box-shadow: 0 0 0 1.5px #2fa84a; }
.tg__sect { margin: 10px 4px 4px; font-size: 12px; color: #7d8b99; }
.tg__hit { background: rgba(94, 181, 247, .28); color: inherit; border-radius: 3px; padding: 0 1px; }
.tg__none { margin: 24px 0; text-align: center; color: #7d8b99; font-size: 14px; }
.tg__folders { display: flex; gap: 4px; margin-top: 8px; }
.tg__folder { background: none; border: 0; border-bottom: 2px solid transparent; color: #7d8b99; font: inherit; font-size: 13.5px; padding: 6px 8px; cursor: pointer; }
.tg__folder.is-on { color: #5bb5e8; border-bottom-color: #5bb5e8; }
.pocket__body--tg { padding: 0 6px; }
.pocket__row--tg { border-bottom: 1px solid rgba(255,255,255,.05); }
.pocket__row--tg .pocket__dot { background: #5bb5e8; color: #0e1621; }
.pocket__screen.is-tgchat .pocket__chead { background: #17212b; border-bottom: 0; }
.pocket__screen.is-tgchat .chat__status { color: #7d8b99; }
.pocket__screen.is-tgchat .pocket__log { background-color: #0e1621; background-image: radial-gradient(rgba(91,181,232,.06) 1px, transparent 1px), radial-gradient(rgba(91,181,232,.04) 1px, transparent 1px); background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; }
.pocket__screen.is-tgchat .bub--in { background: #182533; }
.pocket__screen.is-tgchat .bub--out { background: #2b5278; }
.pocket__screen.is-tgchat .pocket__day { background: rgba(0,0,0,.35); color: #c9d4dd; padding: 2px 10px; border-radius: 10px; }
.bub { position: relative; }
.bub__t { white-space: pre-wrap; }
.bub__meta { float: right; margin: 6px -4px -4px 10px; font-size: 10.5px; color: rgba(255,255,255,.5); line-height: 1; white-space: nowrap; }
.bub__ticks { letter-spacing: -2px; margin-left: 2px; }
.bub__ticks.is-read { color: #7fd0ff; }
.bub__ticks.is-wait { letter-spacing: 0; }
.bub__fail { color: #ff8a7a; }
.pocket__compose--tg { background: #17212b; border-top: 0; }
.pocket__crow { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.pocket__crow .pocket__input { flex: 1; }
.pocket__cicon { width: 26px; height: 26px; color: #7d8b99; flex: none; display: grid; place-items: center; }
.pocket__cicon svg { width: 22px; height: 22px; }
.pocket__compose--tg .pocket__input { background: #242f3d; border-color: transparent; }
.pocket__mute { flex: none; margin: 0; padding: 12px; border: 0; border-top: 1px solid rgba(255,255,255,.06); background: #17212b; color: #5bb5e8; font: inherit; cursor: default; }
/* SMS */
.pocket__screen.is-smschat .bub--out { background: #2fa84a; }
.pocket__screen.is-smschat .bub--in { background: #262e33; }
.pocket__screen.is-smschat .pocket__chead { flex-direction: row; }
.pocket__iconbtn--sms { background: rgba(95,210,106,.14); color: #5fd26a; }
/* контакты и звонки */
.pocket__letter { margin: 12px 4px 2px; font-size: 12.5px; font-weight: 700; color: var(--faint); }
.pocket__row--call .ava { display: none; }
.pocket__arr { flex: none; width: 22px; height: 22px; color: var(--faint); display: grid; place-items: center; }
.pocket__arr svg { width: 16px; height: 16px; }
.pocket__arr.is-out { color: #5bb5e8; }
.pocket__arr.is-bad { color: #d9483b; }
.pocket__time--call { margin-left: 4px; margin-right: 6px; }
/* приложения */
.pocket__body--app { padding-bottom: 14px; }
.pocket__hero { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px 16px; margin: 4px 0 8px; border-radius: 18px; background: rgba(255,255,255,.05); }
.pocket__heroicon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 4px; }
.pocket__heroicon svg { width: 25px; height: 25px; }
.pocket__herobig { font-size: 34px; font-weight: 300; line-height: 1.1; }
.pocket__herosub { color: var(--frost); font-size: 14px; }
.pocket__heronote { color: var(--dim); font-size: 12.5px; }
.pocket__list { border-radius: 14px; background: rgba(255,255,255,.04); padding: 2px 12px; }
.pocket__lrow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--edge); font-size: 13.5px; }
.pocket__lrow:last-child { border-bottom: 0; }
.pocket__lrow span { color: var(--frost); min-width: 0; }
.pocket__lrow b { font-weight: 400; color: var(--dim); text-align: right; flex: none; max-width: 55%; }
.pocket__screen.is-app--weather { background: linear-gradient(180deg, #1d3550, #0b131c); }
.pocket__screen.is-app--weather .pocket__hero { background: none; }
.ava--vika { background: linear-gradient(135deg, #b0607e, #6a3048); }
.ava--oleg { background: linear-gradient(135deg, #7a7f86, #43474c); }
.ava--dad { background: linear-gradient(135deg, #7c9a6a, #45573a); }
.ava--gena { background: linear-gradient(135deg, #a07a5a, #5e4430); }
.ava--oper { background: linear-gradient(135deg, #5a6f86, #2f3e4f); }
.ava--natasms { background: #0a1214; box-shadow: inset 0 0 0 3px var(--nata); color: transparent; }
.ava--chan { background: linear-gradient(135deg, #3a7fa8, #1f4a66); }
.pocket__cwrap { display: grid; justify-items: center; gap: 8px; }
.pocket__cbtn { display: grid; place-items: center; font-size: 0; }
.pocket__cbtn svg { width: 30px; height: 30px; color: #fff; }
.pocket__cbtn.is-red svg { transform: rotate(135deg); }
.pocket__clabel { font-size: 12px; color: var(--dim); }
.pocket__cstate { max-width: 250px; }
.pocket__quick { display: flex; gap: 6px; }
.pocket__qbtn { flex: 1; border: 1px solid var(--edge-2); background: rgba(255,255,255,.05); color: var(--frost); border-radius: 999px; padding: 6px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.pocket__qbtn:hover { border-color: var(--nata); }
/* значок «i» с пояснением при наведении */
.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 2px; border-radius: 50%; border: 1px solid var(--edge-2); color: var(--dim); font-family: var(--serif); font-size: 11.5px; font-style: italic; cursor: help; }
.tip:hover, .tip:focus-visible { color: var(--nata); border-color: var(--nata); outline: none; }
.tip__box { position: absolute; top: calc(100% + 10px); right: -10px; width: 300px; padding: 12px 14px; border-radius: 12px; background: rgba(14,20,23,.98); border: 1px solid var(--edge-2); box-shadow: 0 20px 50px -20px #000; font-family: var(--sans); font-style: normal; font-size: 13px; line-height: 1.5; color: var(--frost); text-align: left; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; white-space: normal; }
.tip__box b { display: block; margin-bottom: 4px; color: var(--nata); font-weight: 600; }
.tip:hover .tip__box, .tip:focus .tip__box { opacity: 1; transform: none; }
/* новый вопрос выглядит как остальные, только вспыхивает при появлении */
.q--new { animation: qnew 2.4s ease-out 1; }
@keyframes qnew { 0%, 30% { border-color: var(--nata); box-shadow: 0 0 0 3px rgba(63,193,168,.18); } 100% { } }
/* отключённая CAM 02: тот же размер кадра 16:9, что у остальных камер */
.archive > .feed { aspect-ratio: 16 / 9; flex: none; min-height: 0; border-radius: 8px; }
@media (min-width: 821px) { .cams__view .archive > .feed { width: min(100%, calc((100cqh - 56px) * 16 / 9)); } }
.pocket__cstate.is-timer { animation: none; color: var(--frost); font-variant-numeric: tabular-nums; font-size: 17px; }

.bar__test { color: #e0a44b; border: 1px dashed rgba(224,164,75,.5); border-radius: 6px; padding: 4px 10px; }

/* --- телефон: виджеты-кнопки, фото в переписке --- */
button.pocket__widget { font: inherit; color: inherit; text-align: left; border: 0; cursor: pointer; }
.bub--photo { padding: 4px; max-width: 72%; position: relative; }
.bub--photo img { display: block; width: 100%; border-radius: 12px; cursor: zoom-in; }
.bub--photo .bub__meta { position: absolute; right: 10px; bottom: 8px; padding: 1px 6px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; }

/* --- календарь --- */
.cal { --cal-red: #ff453a; }
.cal__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 2px 6px; }
.cal__back, .cal__todaybtn, .cal__nav { font: inherit; background: none; border: 0; color: var(--cal-red); cursor: pointer; padding: 4px 2px; font-size: 15px; }
.cal__nav { font-size: 24px; line-height: 1; padding: 2px 8px; }
.cal__year { font-size: 30px; font-weight: 700; color: var(--cal-red); }
.cal__mrow { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
.cal__month { margin: 0; font-size: 26px; font-weight: 700; }
.cal__wd, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal__wd span { font-size: 11px; color: var(--dim); padding-bottom: 6px; }
.cal__wd .is-we { color: #6f7b7d; }
.cal__grid { row-gap: 2px; border-top: 1px solid var(--edge); padding-top: 4px; }
.cal__day { font: inherit; color: var(--frost); background: none; border: 0; cursor: pointer; display: grid; justify-items: center; gap: 2px; padding: 3px 0 5px; }
.cal__day.is-we { color: var(--dim); }
.cal__num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; }
.cal__day.is-today .cal__num { color: var(--cal-red); font-weight: 700; }
.cal__day.is-sel .cal__num { background: var(--frost); color: #0b0f10; font-weight: 700; }
.cal__day.is-today.is-sel .cal__num { background: var(--cal-red); color: #fff; }
.cal__dot { width: 5px; height: 5px; border-radius: 50%; background: #7d898b; }
.cal__seltitle { margin: 14px 4px 6px; font-size: 13px; color: var(--dim); }
.cal__events { display: grid; gap: 6px; }
.cal__none { margin: 4px; color: var(--dim); font-size: 14px; }
.cal__ev { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px 9px 14px; border-radius: 10px; background: rgba(255,255,255,.05); position: relative; font-size: 14px; }
.cal__ev::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--evc, #5ab17c); }
.cal__ev b { font-weight: 600; }
.cal__ev span { color: var(--dim); white-space: nowrap; }
.cal__ev--w { --evc: #4a9df0; } .cal__ev--p { --evc: #5ab17c; } .cal__ev--f { --evc: #f0a24a; } .cal__ev--b { --evc: #b07ae6; } .cal__ev--h { --evc: #ff453a; }
.cal__ygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; margin-top: 6px; }
.cal__mini { font: inherit; color: var(--frost); background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
.cal__mname { display: block; font-size: 14px; color: var(--cal-red); margin-bottom: 4px; }
.cal__mname.is-cur { text-decoration: underline; text-underline-offset: 3px; }
.cal__mdays { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 7.5px; line-height: 1.6; text-align: center; color: var(--dim); }
.cal__mdays .is-today { background: var(--cal-red); color: #fff; border-radius: 50%; }

/* --- почта --- */
.mail { --mail-blue: #3d8ef0; }
.mail__back { font: inherit; background: none; border: 0; color: var(--mail-blue); cursor: pointer; padding: 4px 2px; font-size: 15px; }
.mail__box { font: inherit; color: inherit; width: 100%; border: 0; background: none; cursor: pointer; text-align: left; }
.mail__box b { color: var(--dim); font-weight: 400; }
.mail__box b.is-new { color: var(--frost); font-weight: 700; }
.mail__list { display: grid; }
.mail__item { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--edge); cursor: pointer; text-align: left; display: grid; gap: 2px; padding: 9px 4px 10px 16px; position: relative; }
.mail__item.is-new::before { content: ""; position: absolute; left: 3px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--mail-blue); }
.mail__row1 { display: flex; justify-content: space-between; gap: 8px; }
.mail__row1 b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__at { color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.mail__s { font-size: 14px; }
.mail__pre { font-size: 13px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail__subj { margin: 8px 2px 12px; font-size: 21px; font-weight: 700; line-height: 1.25; }
.mail__head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.mail__ava { width: 36px; height: 36px; font-size: 15px; }
.mail__who { display: grid; min-width: 0; flex: 1; }
.mail__who b { font-size: 15px; }
.mail__who span { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__date { font-size: 12px; color: var(--dim); }
.mail__text { padding: 8px 2px; font-size: 15px; line-height: 1.5; }
.mail__text p { margin: 0 0 10px; }
.mail__att { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mail__att:hover { background: rgba(255,255,255,.1); }
.mail__attn { display: grid; gap: 2px; min-width: 0; }
.mail__attn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__attn span { font-size: 12px; color: #5b9cf5; }
.mail__ext { flex: none; width: 34px; height: 40px; border-radius: 5px; display: grid; place-items: end center; padding-bottom: 5px; font-size: 9px; font-weight: 700; color: #fff; background: #8a94a0; }
.mail__ext--pdf { background: #d9473b; }
.mail__ext--xlsx { background: #1f8a4c; }
.mail__ext--zip { background: #7a6a55; }
/* встроенный просмотр вложений */
.pocket__screen.is-app--qv { background: #1c1c1e; }
.qv__bar { display: flex; align-items: center; gap: 10px; padding: 46px 14px 10px; background: #1c1c1e; border-bottom: 1px solid rgba(255,255,255,.08); }
.qv__done { border: 0; background: none; color: #5b9cf5; font: inherit; font-size: 15px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.qv__name { display: grid; flex: 1; min-width: 0; text-align: center; margin-right: 50px; }
.qv__name b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv__name span { font-size: 11px; color: #8e8e93; }
.qv__body { padding: 14px 12px 20px; background: #2c2c2e; }
.qv__page { background: #fbfaf7; color: #1d1d1f; border-radius: 3px; padding: 18px 16px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.35); font-family: "Times New Roman", Georgia, serif; font-size: 12px; line-height: 1.45; }
.qv__h { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.qv__sub { margin: 0; color: #555; }
.qv__p { margin: 10px 0 0; }
.qv__table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 11px; }
.qv__table th, .qv__table td { border-bottom: 1px solid #d6d3cc; padding: 4px 3px; text-align: left; vertical-align: top; }
.qv__table th { font-weight: 700; border-bottom: 1.5px solid #1d1d1f; }
.qv__table td:last-child, .qv__table th:last-child { text-align: right; white-space: nowrap; }
.qv__foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #d6d3cc; }
.qv__foot p { margin: 2px 0; }
.qv__pages { margin: 10px 0 0; text-align: center; font-size: 11px; color: #8e8e93; }
.qv__sheet { overflow-x: auto; background: #fff; border-radius: 3px; }
.qv__grid { border-collapse: collapse; font: 12px/1.3 -apple-system, "Segoe UI", Arial, sans-serif; color: #1d1d1f; white-space: nowrap; }
.qv__grid th { background: #f0f0f0; color: #777; font-weight: 400; font-size: 10px; padding: 3px 6px; border: 1px solid #ddd; }
.qv__grid td { padding: 5px 8px; border: 1px solid #e3e3e3; }
.qv__grid tr.is-head td { font-weight: 700; background: #e8f3ec; }
.qv__tabs { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 6px; background: #1f8a4c; color: #fff; font-size: 12px; }
.qv__body--zip { background: #1c1c1e; }
.qv__files { display: grid; }
.qv__file { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.qv__fname { display: grid; gap: 2px; font-size: 14px; }
.qv__fname span { font-size: 12px; color: #8e8e93; }
.mail__warn { margin: 12px 2px; padding: 10px 12px; border-radius: 10px; background: rgba(240,162,74,.12); color: #f0c48a; font-size: 13px; }

/* --- задача в верхней строке открывает блокнот --- */
#step { cursor: pointer; }
#step:hover { border-color: var(--nata); }

/* --- снимок журнала в сообщении --- */
.bub__snap { display: grid; gap: 4px; margin: -2px -4px 6px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.28); }
.bub__snaphead { font-size: 11px; opacity: .75; }
.bub__snap pre { margin: 0; font-family: var(--mono); font-size: 11px; line-height: 1.45; white-space: pre-wrap; }

/* --- блокнот --- */
.nb { --nb-y: #f2c14e; }
.nb__date { margin: 6px 2px 0; font-size: 12px; color: var(--dim); text-align: center; }
.nb__title { margin: 4px 2px 10px; font-size: 24px; font-weight: 700; }
.nb__h { margin: 16px 2px 6px; font-size: 13px; font-weight: 700; color: var(--nb-y); }
.nb__plan { display: grid; gap: 6px; }
.nb__task { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.nb__task em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--dim); }
.nb__box { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid #6d7a7c; display: grid; place-items: center; font-style: normal; font-size: 12px; color: #0b0f10; }
.nb__task.is-done .nb__box { background: var(--nb-y); border-color: var(--nb-y); }
.nb__task.is-done span { color: var(--dim); text-decoration: line-through; }
.nb__found { display: grid; gap: 6px; }
.nb__note { margin: 0; font-size: 14px; line-height: 1.4; }
.nb__note b { color: var(--dim); font-weight: 600; }
.nb__link { font: inherit; color: inherit; text-align: left; cursor: pointer; display: grid; gap: 2px; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(242,193,78,.35); background: rgba(242,193,78,.07); }
.nb__link b { font-size: 15px; }
.nb__link span { font-size: 12.5px; color: var(--dim); }
.nb__link.is-done { border-color: var(--edge); background: rgba(255,255,255,.04); }
.nb__qs { display: grid; gap: 8px; }
.nb__q { display: grid; gap: 2px; font-size: 14px; }
.nb__q span { color: var(--nb-y); font-size: 13.5px; }
.nb__back { font: inherit; background: none; border: 0; color: var(--nb-y); cursor: pointer; padding: 4px 2px; font-size: 15px; }
.nb__hint { margin: 0 2px 10px; font-size: 13px; color: var(--dim); }
.nb__claim { border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 8px; overflow: hidden; }
.nb__chead { font: inherit; color: inherit; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; display: grid; gap: 3px; padding: 11px 13px; }
.nb__who { font-size: 12px; color: var(--dim); }
.nb__chead b { font-weight: 500; font-size: 14.5px; line-height: 1.35; }
.nb__claim.is-open { box-shadow: inset 0 0 0 1px var(--nb-y); }
.nb__claim.is-done { box-shadow: inset 3px 0 0 var(--nb-y); }
.nb__claim.is-done .nb__chead { cursor: default; }
.nb__claim > .nb__hint { margin: 0; padding: 0 13px 12px; }
.nb__res { margin: 0; padding: 0 13px 12px; font-size: 13.5px; line-height: 1.4; color: var(--nb-y); }
.nb > .nb__res { padding: 10px 2px; }
.nb__evs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 13px 12px; }
.nb__ev, .nb__word { font: inherit; font-size: 13px; color: var(--frost); cursor: pointer; padding: 6px 10px; border-radius: 999px; border: 1px solid #3a4649; background: rgba(255,255,255,.04); }
.nb__ev:hover, .nb__word:hover { border-color: var(--nb-y); }
.nb__wrong { margin: 0; padding: 0 13px 12px; font-size: 13px; color: #f0a24a; animation: nbshake .35s; }
.nb > .nb__wrong { padding: 8px 2px; }
@keyframes nbshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.nb__concl { margin: 0 2px 12px; font-size: 15.5px; line-height: 2.1; }
.nb__gap { font: inherit; font-size: 14px; line-height: 1.3; color: var(--nb-y); cursor: pointer; min-width: 54px; padding: 2px 8px; margin: 0 2px; border-radius: 7px; border: 1px dashed rgba(242,193,78,.55); background: rgba(242,193,78,.06); white-space: pre; }
.nb__gap.is-sel { border-style: solid; box-shadow: 0 0 0 2px rgba(242,193,78,.25); }
.nb__gap.is-full { border-style: solid; color: #0b0f10; background: var(--nb-y); }
.nb__gap.is-bad { background: #e0574b; border-color: #e0574b; color: #fff; animation: nbshake .35s; }
.nb__gap.is-ok { background: rgba(90,177,124,.9); border-color: transparent; color: #08130c; cursor: default; }
.nb__bank { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.nb__asis { display: block; margin: 10px auto 0; font: inherit; font-size: 14px; background: none; border: 0; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nb__check { font: inherit; font-weight: 600; width: 100%; padding: 11px; border-radius: 12px; border: 0; background: var(--nb-y); color: #1a1405; cursor: pointer; }
.nb__check:disabled { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .nb__wrong, .nb__gap.is-bad { animation: none; } }

/* --- итоги ночи: слой поверх всего, интерфейс под ним размыт --- */
.finlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; overflow: auto;
  background: rgba(5,9,11,.55); -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8);
  opacity: 0; transition: opacity 1.4s ease; }
.finlay.is-on { opacity: 1; }
.finlay__card { width: min(640px, 100%); display: grid; gap: 4px; padding: 30px 34px 26px; border-radius: 22px;
  background: rgba(10,16,18,.82); border: 1px solid var(--edge); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
  transform: translateY(14px); transition: transform 1.4s ease; }
.finlay.is-on .finlay__card { transform: none; }
.finlay__clock { font-family: var(--mono); font-size: clamp(52px, 8vw, 84px); line-height: 1; text-align: center; color: #e9efed; text-shadow: 0 0 30px rgba(63,193,168,.25); }
.finlay__morning { margin: 8px 0 14px; text-align: center; color: var(--dim); font-size: 15px; }
.finlay__title { margin: 0 0 6px; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 26px; }
.finlay__h { margin: 16px 0 8px; font-size: 13px; color: var(--lamp, #e0a44b); }
.finlay__evs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.finlay__ev { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge); background: rgba(255,255,255,.04); font-size: 12.5px; }
.finlay__ev b { font-family: var(--mono); font-size: 12px; color: var(--dim); font-weight: 400; }
.finlay__ev.is-miss { border-style: dashed; background: none; color: var(--dim); }
.finlay__note { margin: 6px 0 0; font-size: 13px; color: var(--dim); }
.finlay__ppl { display: grid; gap: 8px; }
.finlay__p { display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 14.5px; }
.finlay__p b { font-weight: 600; }
.finlay__p em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); }
.finlay__qs { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.finlay__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.finlay__test { margin: 10px 0 0; font-size: 12px; color: #e0a44b; }
@media (max-width: 560px) { .finlay__card { padding: 22px 18px; } .finlay__evs { grid-template-columns: repeat(2, 1fr); } .finlay__p { grid-template-columns: 1fr; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .finlay, .finlay__card { transition: none; } }

/* главная: пока не начали листать — кадр с камеры; в прокрутке «ночь в доме» камера уходит, видна обложка */
.night__feed { transition: opacity .6s; }
.night__hud { transition: opacity .6s; }
body.is-story .night__feed { opacity: 0; }
body.is-story .night__hud { opacity: 0; pointer-events: none; }

.nb__ppl { display: grid; gap: 6px; }
.nb__note b.nb__pname { color: var(--frost); }

/* --- журнал на экране: записи можно отметить --- */
.journal .jrow--pin { grid-template-columns: 110px 1fr auto; cursor: pointer; transition: background .15s; }
.jrow__pin { font-family: var(--mono); font-size: 12px; color: var(--dim); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.jrow--pin:hover, .jrow--pin:focus-visible { background: rgba(63,193,168,.08); }
.jrow--pin:hover .jrow__pin, .jrow--pin:focus-visible .jrow__pin { opacity: 1; color: var(--nata); }
.jrow--pin.is-pinned { cursor: default; }
.jrow--pin.is-pinned .jrow__pin { opacity: 1; color: var(--frost); padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); }
.jrow--pin.is-pinned:hover { background: none; }
.jrow--pin.is-noise .jrow__pin { opacity: 1; color: var(--dim); }
.jrow--pin.is-noise { animation: nbshake .3s; opacity: 1; }
@media (max-width: 760px) { .journal .jrow--pin { grid-template-columns: 70px 1fr auto; } .jrow__pin { opacity: 1; } }

/* --- задача мигает, когда меняется; подсказка, где блокнот --- */
#step.is-pulse { animation: steppulse 1.2s ease 3; }
@keyframes steppulse { 50% { border-color: var(--nata); box-shadow: 0 0 0 4px rgba(63,193,168,.18); } }
.stephint { position: fixed; z-index: 80; max-width: 300px; padding: 9px 12px; border-radius: 10px; background: #12201f; border: 1px solid var(--nata); color: var(--frost); font-size: 13px; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; pointer-events: none; }
.stephint.is-on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #step.is-pulse, .jrow--pin.is-noise { animation: none; } }

/* итоги ночи: телефон над слоем итогов, им можно пользоваться */
body.has-fin .pocket { z-index: 95; }
@media (max-width: 1100px) { body.has-fin .finlay { padding-bottom: 90px; } }

/* блокнот: «i» у заголовков и пояснение */
.nb__hrow { display: flex; align-items: center; gap: 8px; }
.nb__i { font: italic 600 12px/1 Georgia, serif; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid rgba(242,193,78,.5); background: none; color: var(--nb-y); cursor: pointer; display: grid; place-items: center; padding: 0; }
.nb__title .nb__i { width: 22px; height: 22px; font-size: 13px; }
.nb__i.is-on, .nb__i:hover { background: var(--nb-y); color: #1a1405; }
.nb__info { margin: 0 2px 10px; padding: 10px 12px; border-radius: 10px; background: rgba(242,193,78,.08); color: var(--frost); font-size: 13px; line-height: 1.45; }

/* ===== Глава 2: день в доме ===== */
.ch2hall { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; border-radius: var(--r); overflow: hidden; }
.ch2hall__img { background: center/cover no-repeat #0b1012; min-height: 220px; }
.ch2hall__text { padding: 24px 28px; display: grid; align-content: start; gap: 10px; overflow-y: auto; }
.ch2hall__text h2 { margin: 0; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 26px; }
.ch2hall__text p { margin: 0; color: var(--dim); line-height: 1.5; }
.ch2hall__who { display: grid; gap: 8px; margin-top: 6px; }
.ch2hall__go { font: inherit; text-align: left; color: var(--frost); background: rgba(255,255,255,.05); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.ch2hall__go:hover, .ch2hall__go:focus-visible { border-color: var(--nata); }
.ch2arrive { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; margin-top: 6px; }
.ch2arrive img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.ch2arrive p { margin: 4px 0 0; color: var(--frost); font-style: italic; }
.ch2place { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr minmax(200px, 250px); gap: 16px; }
.ch2place__view { min-width: 0; min-height: 0; container-type: size; display: grid; place-items: center; border-radius: var(--r); overflow: hidden; }
.ch2place__pic { position: relative; width: min(100cqw, 177.6cqh); height: min(100cqh, 56.3cqw); border-radius: var(--r); overflow: hidden; }
.ch2place__pic > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch2place__side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.ch2place__side h2 { margin: 0; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 24px; }
.ch2place__out { align-self: flex-start; margin-top: auto; }
.ch2pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(63,193,168,.6); box-shadow: 0 0 0 5px rgba(63,193,168,.2); cursor: pointer; padding: 0; z-index: 1; }
.ch2pin::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); animation: pinpulse 2.4s ease-out infinite; }
.ch2pin.is-seen { background: rgba(255,255,255,.28); box-shadow: none; }
.ch2pin.is-seen::after { animation: none; border: 0; }
.ch2pin.is-ev { background: var(--lamp, #e0a44b); }
@keyframes pinpulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.ch2pin__lbl { position: absolute; left: 50%; bottom: 130%; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.ch2pin:hover .ch2pin__lbl, .ch2pin:focus-visible .ch2pin__lbl { opacity: 1; }
.ch2place__cap { margin: 0; color: var(--frost); line-height: 1.5; font-size: 15px; }
.ch2place__note { margin: 0; color: var(--dim); line-height: 1.5; font-size: 14px; }
.ch2place__ppl { display: grid; gap: 8px; }
.ch2who { font: inherit; color: inherit; display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(8,12,14,.82); cursor: pointer; text-align: left; }
.ch2who:hover, .ch2who:focus-visible { border-color: var(--nata); }
.ch2who img { width: 46px; height: 46px; object-fit: cover; border-radius: 9px; }
.ch2who b { display: block; font-size: 14.5px; } .ch2who em { font-style: normal; font-size: 13px; color: var(--nata); }
.ch2flash { position: fixed; inset: 0; background: #fff; opacity: .7; z-index: 120; pointer-events: none; animation: flashout .45s ease forwards; }
@keyframes flashout { to { opacity: 0; } }
.ch2talk { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(200px, 30%) 1fr; gap: 20px; }
.ch2talk__face { position: relative; min-height: 0; border-radius: var(--r); overflow: hidden; background: #070a0b; }
.ch2talk__face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.ch2talk__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.8) 45%); }
.ch2talk__name b { display: block; font-size: 17px; }
.ch2talk__rec { font-size: 12.5px; color: var(--dim); } .ch2talk__rec.is-on { color: #e0574b; }
.ch2talk__log { min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px 8px 14px 0; }
.ch2talk__log > * { flex: none; }
.ch2talk__q { margin: 0; align-self: flex-end; max-width: 80%; padding: 8px 13px; border-radius: 14px 14px 4px 14px; background: rgba(63,193,168,.16); font-size: 15px; }
.ch2talk__a { margin: 0; max-width: 92%; font-family: var(--serif, Georgia, serif); font-size: 18px; line-height: 1.45; }
.ch2talk__pick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.ch2talk__hint { width: 100%; margin: 0 0 4px; color: var(--dim); font-size: 13px; }
.ch2eve__log { margin: 0; padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,.35); font-family: var(--mono); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.ch2eve__alena { margin: 0; font-family: var(--serif, Georgia, serif); font-size: 20px; font-style: italic; }
@media (max-width: 860px) { .ch2hall, .ch2talk { grid-template-columns: 1fr; } .ch2talk__face { min-height: 220px; } .ch2place { grid-template-columns: 1fr; } .ch2place__view { min-height: 56vw; } }
@media (prefers-reduced-motion: reduce) { .ch2pin::after, .ch2flash { animation: none; } }
.ch2place.ch2eve { grid-template-columns: 1fr minmax(280px, 340px); }
.ch2eve .ch2place__side { padding-right: 12px; }
.ch2eve .ch2eve__alena, .ch2eve .ch2eve__nata { font-size: 17px; line-height: 1.5; }
.ch2eve__me { margin: 0; align-self: flex-end; padding: 8px 14px; border-radius: 14px; background: rgba(120,190,180,.14); font-size: 15px; }
.ch2eve__rec { display: grid; gap: 10px; }
.ch2eve__nata { color: var(--frost) !important; font-family: var(--serif, Georgia, serif); font-size: 18px; }
.ava--notes { background: linear-gradient(180deg, #f6d36b, #e0a83a); color: #3b2a05; font-size: 15px; font-weight: 700; }

/* ===== Глава 2: игрок в доме — без пульта и панели Наты ===== */
.is-house .main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "side"; }
.is-house .console, .is-house .nata, .is-house .dialog { display: none; }
.is-house .side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "actions"; }
.is-house .side:has(.actions:empty) { display: none; }
.is-house .stage { border-bottom: 1px solid var(--edge); border-radius: var(--r); }
.is-house .stage:has(+ .side .actions:not(:empty)) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.nsub { position: fixed; z-index: 60; display: flex; justify-content: center; gap: 10px; align-items: baseline; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.nsub.is-on { opacity: 1; transform: none; }
.nsub b { flex: none; font-weight: 600; font-size: 13px; color: var(--nata); }
.nsub span { max-width: 760px; padding: 8px 14px; border-radius: 10px; background: rgba(0,0,0,.72); color: #fff; font-family: var(--serif, Georgia, serif); font-size: 19px; line-height: 1.4; text-align: center; }
.ch2hall__go { display: grid; gap: 2px; }
.ch2hall__go b { font-weight: 500; }
.ch2hall__go span { font-size: 13px; color: var(--nata); }
.ch2hall__go.is-seen b { color: var(--dim); }
.napp2 { display: flex; flex-direction: column; gap: 10px; }
.napp2__head { display: flex; align-items: center; gap: 10px; padding: 4px 2px 2px; }
.napp2__head b { display: block; font-size: 16px; } .napp2__head span { font-size: 12px; color: var(--dim); }
.napp2__ring { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--nata); box-shadow: 0 0 16px var(--nata-glow); }
.napp2__seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.06); }
.napp2__seg button { flex: 1; font: inherit; font-size: 13px; color: var(--dim); background: none; border: 0; border-radius: 8px; padding: 6px 4px; cursor: pointer; }
.napp2__seg button.is-on { background: rgba(63,193,168,.2); color: var(--frost); }
.napp2__seg--s button { font-size: 12px; padding: 4px; }
.napp2__plan { border-radius: 12px; background: rgba(0,0,0,.35); padding: 6px; }
.napp2__hint { margin: 0; font-size: 12px; color: var(--dim); }
.napp2__where { display: grid; gap: 4px; font-size: 13px; }
.napp2__wrow { display: flex; justify-content: space-between; gap: 10px; } .napp2__wrow span { color: var(--dim); text-align: right; }
.napp2__log { display: flex; flex-direction: column; gap: 6px; max-height: 230px; overflow-y: auto; }
.napp2__m { max-width: 86%; padding: 7px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.napp2__m--say, .napp2__m--a { align-self: flex-start; background: rgba(63,193,168,.12); border-bottom-left-radius: 4px; }
.napp2__m--ask { align-self: flex-end; background: rgba(255,255,255,.1); border-bottom-right-radius: 4px; }
.napp2__m.is-typing { color: var(--dim); }
.napp2__qs { display: grid; gap: 6px; }
.search__hours { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 10px; }
.search__hlbl { font-size: 13px; color: var(--dim); margin-right: 4px; }
.search__hours .chipbtn { cursor: pointer; font-family: var(--mono); }
.search__hours .chipbtn.is-on { border-color: var(--nata); color: var(--frost); background: rgba(63,193,168,.14); }
.ch2note { position: absolute; z-index: 4; width: min(300px, 60%); margin: 18px 0 0 18px; padding: 10px 30px 11px 13px; border-radius: 12px; background: rgba(8,12,14,.92); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 14px 30px -12px #000; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; animation: noteIn .2s ease-out; }
.ch2note b { font-size: 13px; color: var(--nata); font-weight: 600; }
.ch2note.is-left { transform: translateX(-100%); margin-left: -18px; }
.ch2note.is-up { transform: translateY(-100%); margin-top: -18px; }
.ch2note.is-left.is-up { transform: translate(-100%, -100%); }
.ch2note__x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--dim); font-size: 18px; cursor: pointer; padding: 2px 6px; }
@keyframes noteIn { from { opacity: 0; } to { opacity: 1; } }
.tray { padding-right: 380px; }
@media (max-width: 860px) { .tray { padding-right: 18px; padding-bottom: 70px; } }
.ch2who.is-cool { opacity: .55; cursor: default; }
.ch2who.is-cool em { color: var(--dim); }
.q--follow { border-color: var(--nata); }
.nb__by { margin: 0; padding: 0 13px 4px; font-size: 12.5px; line-height: 1.35; color: var(--dim); }
.nb__hint { margin: 4px 0 8px; font-size: 13px; color: var(--dim); line-height: 1.4; }
.ch2note { pointer-events: none; } .ch2note__x { pointer-events: auto; }
/* полосы прокрутки в телефоне — тонкие, как в iOS */
.pocket * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.pocket *::-webkit-scrollbar { width: 4px; height: 4px; }
.pocket *::-webkit-scrollbar-track { background: transparent; }
.pocket *::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
/* в разговоре полоса вопросов всегда одной высоты (две строки), чтобы портрет и реплики не прыгали */
.is-talk .actions { box-sizing: border-box; height: 124px; align-content: flex-start; overflow-y: auto; }
/* доска улик: стрелки и затухание по краям, когда улик больше, чем видно */
.tray__wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.tray__wrap .tray__row { flex: 1; scrollbar-width: none; }
.tray__wrap .tray__row::-webkit-scrollbar { display: none; }
.tray__nav { display: none; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge-2); background: rgba(8,12,14,.85); color: var(--frost); font-size: 18px; line-height: 1; cursor: pointer; }
.tray__nav:disabled { opacity: .25; cursor: default; }
.tray__wrap.is-scroll .tray__nav { display: inline-grid; place-items: center; }
.tray__wrap.is-scroll .tray__row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.tray__wrap.is-scroll.at-start .tray__row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tray__wrap.is-scroll.at-end .tray__row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.ch2hall__wait { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.back-hub { position: fixed; top: 16px; left: 18px; z-index: 50; font-size: 13.5px; color: rgba(236,240,238,.75); text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(6,10,12,.55); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.back-hub:hover, .back-hub:focus-visible { color: #fff; border-color: rgba(255,255,255,.3); }

/* доска улик во весь экран */
.board { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 3vh 3vw; background: rgba(4,7,8,.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.board__box { width: min(1180px, 100%); max-height: 94vh; display: flex; flex-direction: column; background: var(--night); border: 1px solid var(--edge-2); border-radius: 14px; box-shadow: 0 40px 100px -30px #000; overflow: hidden; }
.board__head { display: flex; align-items: baseline; gap: 14px; padding: 18px 22px 12px; border-bottom: 1px solid var(--edge); }
.board__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.board__count { color: var(--dim); font-size: 14px; }
.board__x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge-2); background: transparent; color: var(--frost); font-size: 22px; line-height: 1; cursor: pointer; }
.board__x:hover { border-color: var(--nata); }
.board__scroll { overflow-y: auto; padding: 8px 22px 24px; scrollbar-width: thin; }
.board__group { margin: 16px 0 10px; font-size: 13px; font-weight: 500; color: var(--dim); }
.board__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.bcard { display: grid; gap: 8px; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.bcard__pic { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid var(--edge-2); background: var(--panel-2); transition: transform .15s, border-color .15s; }
.bcard:hover:not(:disabled) .bcard__pic, .bcard:focus-visible .bcard__pic { transform: translateY(-3px); border-color: var(--nata); }
.bcard__pic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); }
.bcard__log { position: absolute; inset: 28px 10px 8px; font-family: var(--mono); font-size: 11.5px; line-height: 1.35; color: var(--dim); white-space: pre-wrap; overflow: hidden; }
.bcard__t { font-weight: 400; font-size: 13.5px; line-height: 1.35; color: var(--frost); }
.bcard--empty { cursor: default; }
.bcard--empty .bcard__pic { border-style: dashed; background: transparent; }
.bcard--empty .ev__num { background: none; color: var(--faint); }
.bcard--empty .bcard__t { color: var(--faint); }
@media (max-width: 600px) { .board { padding: 0; } .board__box { max-height: 100vh; height: 100%; border-radius: 0; } .board__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* «‹ Назад» в корне приложений телефона — в цвет приложения */
.appback { display: block; align-self: flex-start; font: inherit; font-size: 15px; background: none; border: 0; padding: 4px 2px; margin: 0 0 2px -2px; cursor: pointer; color: var(--nata); text-align: left; }
.appback:hover { opacity: .8; }
.appback--tg { color: #5bb5e8; margin: 0 0 2px 8px; }
.appback--notes { color: var(--nb-y); }
.appback--cal { color: var(--cal-red); }
.appback--mail { color: var(--mail-blue); }
.appback--weather { color: rgba(255,255,255,.9); }
.appback--maps { color: #ff6b5e; }
.appback--bank { color: #5fc2d1; }
.appback--taxi { color: #ffd35c; }
.napp { position: relative; }
.napp > .appback { position: absolute; top: 8px; left: 12px; }

/* подсказка «i» в блокноте: окошко поверх, прямо у значка */
.nb__hrow { position: relative; }
.nb__tip { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; padding: 10px 12px; border-radius: 12px; background: #23211b; border: 1px solid rgba(242,193,78,.45); box-shadow: 0 14px 30px -10px rgba(0,0,0,.9);
  font-family: var(--sans); font-size: 13.5px; font-weight: 400; line-height: 1.45; color: var(--frost); letter-spacing: 0; text-transform: none;
  opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity .15s, transform .15s, visibility 0s .15s; pointer-events: none; }
.nb__i:hover + .nb__tip, .nb__i:focus-visible + .nb__tip, .nb__i.is-on + .nb__tip { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s; }

/* окошко настроек звука */
.snd { position: fixed; z-index: 85; width: 300px; padding: 14px 16px 12px; border-radius: 14px; background: rgba(12,17,19,.98); border: 1px solid var(--edge-2); box-shadow: 0 24px 60px -18px #000; display: grid; gap: 12px; font-size: 14px; color: var(--frost); }
.snd__row { display: grid; gap: 6px; cursor: pointer; }
.snd__row--main { grid-template-columns: 1fr auto; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--edge); }
.snd__row--main b { font-weight: 600; font-size: 15px; }
.snd__name { display: flex; align-items: baseline; gap: 8px; }
.snd__name b { font-weight: 500; }
.snd__name span { color: var(--dim); font-size: 12.5px; }
.snd__range { width: 100%; accent-color: var(--nata); cursor: pointer; }
.snd__sw { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--edge-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.snd__sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.snd__sw:checked { background: var(--nata); }
.snd__sw:checked::after { transform: translateX(16px); }
.snd__row--rate { cursor: default; }
.snd__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.snd__seg button { font: inherit; font-size: 12.5px; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--edge-2); background: none; color: var(--dim); cursor: pointer; }
.snd__seg button.is-on { border-color: var(--nata); color: var(--frost); background: rgba(63,193,168,.14); }
.snd.is-off .snd__row:not(.snd__row--main) { opacity: .4; pointer-events: none; }

/* страница дела: сохранённая игра */
.resume { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; color: var(--dim); }
.resume__new { color: var(--frost); text-decoration: underline; text-underline-offset: 3px; }
.resume__new:hover { color: var(--nata); }
.facts__cta .resume { justify-content: center; }
.night__final .resume { justify-content: center; }
/* ссылка «← Все дела» не должна наезжать на подпись камеры */
.has-backhub .night__hud, .back-hub ~ * .night__hud { left: 150px; }

/* доска: люди и нитки */
.board__scroll { position: relative; }
.board__hint { margin: 0; padding: 8px 22px; font-size: 13px; color: var(--dim); border-bottom: 1px solid var(--edge); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.board__hint.is-on { color: #f3dca6; background: rgba(230,196,120,.08); }
.board__pinic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #c9a35b; color: #2a1f08; }
.board__pinic svg { width: 12px; height: 12px; }
.board__people { display: flex; flex-wrap: wrap; gap: 14px 18px; padding: 14px 0 6px; }
.bperson { display: grid; justify-items: center; gap: 6px; width: 84px; padding: 0; border: 0; background: none; color: var(--frost); font: inherit; cursor: default; }
.board.is-linking .bperson { cursor: pointer; }
.bperson__face { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--edge-2); background: var(--panel-2); display: block; transition: border-color .15s, transform .15s; }
.bperson__face img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25); }
.bperson__face--nata { background: radial-gradient(circle, #0c1513 52%, transparent 53%), radial-gradient(circle, var(--nata) 60%, transparent 62%); box-shadow: 0 0 16px rgba(63,193,168,.35); }
.bperson__name { font-size: 12.5px; line-height: 1.25; text-align: center; color: var(--dim); }
.board.is-linking .bperson:hover .bperson__face, .board.is-linking .bperson:focus-visible .bperson__face { border-color: #e6c478; transform: scale(1.06); }
.bcard { position: relative; display: grid; }
.bcard__open { display: grid; gap: 8px; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.bcard__open:disabled { cursor: default; }
.bcard__open:hover:not(:disabled) .bcard__pic, .bcard__open:focus-visible .bcard__pic { transform: translateY(-3px); border-color: var(--nata); }
.board.is-linking .bcard:not(.bcard--empty) .bcard__pic { border-color: rgba(230,196,120,.5); }
.bcard.is-from .bcard__pic { border-color: #e6c478 !important; box-shadow: 0 0 0 2px rgba(230,196,120,.35); }
.bcard__pin { position: absolute; z-index: 3; top: -7px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #c9a35b; color: #2a1f08; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.6); transition: transform .15s; }
.bcard__pin svg { width: 14px; height: 14px; }
.bcard__pin:hover, .bcard.is-from .bcard__pin { transform: scale(1.15); background: #e6c478; }
.board__threads { position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none; overflow: visible; }
.thread { fill: none; stroke-linecap: round; }
.thread--mine { stroke: #e6c478; stroke-width: 2; opacity: .85; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.thread--proven { stroke: #d0463a; stroke-width: 2.4; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }   /* нитка не перехватывает нажатия: под ней булавки карточек */
.thread__x { pointer-events: auto; cursor: pointer; opacity: .55; transition: opacity .15s; }
.board__threads:hover .thread__x, .thread__x:hover, .thread__x:focus { opacity: 1; }
.thread__x circle { fill: #2a2416; stroke: #e6c478; stroke-width: 1.5; }
.thread__x text { fill: #e6c478; font: 600 13px/1 var(--sans); }
.nb__ev.is-linked { border-color: rgba(230,196,120,.7); box-shadow: inset 3px 0 0 #e6c478; }
@media (max-width: 600px) { .bperson { width: 64px; } .bperson__face { width: 50px; height: 50px; } }

/* доска: плашки двигаются */
.board__reset { margin-left: auto; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--edge-2); background: none; color: var(--dim); cursor: pointer; }
.board__reset:hover { color: var(--frost); border-color: var(--nata); }
.board__reset:not([hidden]) + .board__x { margin-left: 10px; }
@media (hover: hover) and (pointer: fine) {
  .bperson, .bcard:not(.bcard--empty) { cursor: grab; }
  .board.is-linking .bperson, .board.is-linking .bcard { cursor: pointer; }
}
.bperson, .bcard { position: relative; }
.bperson.is-moved, .bcard.is-moved { z-index: 4; }
.is-drag { cursor: grabbing !important; z-index: 50 !important; transition: none !important; }
.is-drag .bcard__pic, .is-drag .bperson__face { box-shadow: 0 18px 34px -8px rgba(0,0,0,.85); transform: rotate(-1.2deg); }
.bcard.is-moved .bcard__pic { box-shadow: 0 10px 22px -10px rgba(0,0,0,.8); }
.board__scroll { padding-bottom: 60px; }

/* «Фото» в телефоне */
.pocket__icon--photos { background: conic-gradient(from 30deg, #f6c445, #f08a4b, #e2557a, #9b6be0, #4f9de8, #57c98a, #f6c445); color: #fff; }
.appback--photos { color: #4f9de8; }
.gal__seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 2px 0 10px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.06); }
.gal__seg button { font: inherit; font-size: 13px; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; }
.gal__seg button.is-on { background: rgba(255,255,255,.14); color: var(--frost); }
.gal__day { margin: 10px 2px 6px; font-size: 13px; font-weight: 600; color: var(--frost); }
.gal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.gal__tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: #1a1f22; overflow: hidden; cursor: pointer; }
.gal__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal__tile--shot { background: #0e1416; text-align: left; padding: 6px; }
.gal__tile--shot span { display: block; font-family: var(--mono); font-size: 7.5px; line-height: 1.35; color: #b9c4c2; white-space: pre-wrap; overflow: hidden; height: 100%; }
.gal__del { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.gal__dthumb { width: 74px; height: 74px; border-radius: 6px; overflow: hidden; background: #1a1f22; opacity: .6; }
.gal__dthumb img { width: 100%; height: 100%; object-fit: cover; }
.gal__dtext { display: grid; gap: 4px; font-size: 13px; }
.gal__dtext span { color: var(--dim); font-size: 12px; }
.gal__dacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gal__btn { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(79,157,232,.5); background: none; color: #6fb0ee; cursor: pointer; }
.gal__btn--red { border-color: rgba(230,90,80,.5); color: #f0786c; }
/* удалённый снимок на доске */
.ev--gone img, .bcard--gone .bcard__pic img { filter: grayscale(1) brightness(.35); }
.ev--gone::after, .bcard--gone .bcard__pic::after { content: "удалено"; position: absolute; inset: auto 0 0; padding: 3px 6px; font-size: 11px; color: #f0a24a; background: rgba(0,0,0,.6); text-align: center; }
.bcard--gone .bcard__log { opacity: .3; }
/* Ната недоступна */
.napp2__off { margin: 18px 6px; font-size: 14px; line-height: 1.5; color: var(--dim); text-align: center; }
/* холл: запертое место */
.ch2hall__go.is-locked { opacity: .75; }
.ch2hall__lock { color: #f0a24a !important; }
.ch2place__cap.is-text { color: var(--frost); }
/* сверка времени */
.nb__tline { display: grid; gap: 6px; padding: 0 13px 12px; }
.nb__trow { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
.nb__ttime { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.nb__trow.is-ok .nb__ttime { color: var(--nb-y); }
.nb__tslot { font: inherit; font-size: 13px; text-align: left; padding: 7px 10px; border-radius: 9px; border: 1px dashed rgba(242,193,78,.4); background: none; color: var(--frost); cursor: pointer; }
.nb__trow.is-ok .nb__tslot { border-style: solid; border-color: rgba(242,193,78,.6); background: rgba(242,193,78,.08); cursor: default; }
.nb__trow.is-sel .nb__tslot { border-color: var(--nb-y); }
.nb__tline .nb__evs { padding: 0; }
/* служебный раздел дома (глава 4) */
.svc { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; border-radius: var(--r); background: linear-gradient(180deg, #0b1416, #071012); border: 1px solid rgba(63,193,168,.25); box-shadow: inset 0 0 60px rgba(63,193,168,.05); overflow: hidden; }
.svc__head { display: flex; align-items: center; gap: 12px; }
.svc__ring { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--nata); box-shadow: 0 0 12px var(--nata-glow); }
.svc__head b { font-size: 17px; font-weight: 600; }
.svc__sub { color: var(--dim); font-size: 13px; margin-left: 4px; }
.svc__tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.svc__tabs button { font: inherit; font-size: 13.5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--edge-2); background: none; color: var(--dim); cursor: pointer; }
.svc__tabs button.is-on { border-color: var(--nata); color: var(--frost); background: rgba(63,193,168,.12); }
.svc__body { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 6px; scrollbar-width: thin; }
.svc__row { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.03); font-family: var(--mono); font-size: 13.5px; }
.svc__row.is-ev { background: rgba(230,162,74,.08); }
.svc__t { color: var(--dim); }
.svc__add { font: inherit; font-family: var(--sans); font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--edge-2); background: none; color: var(--frost); cursor: pointer; }
.svc__add:disabled { opacity: .5; cursor: default; }
.svc__msg { margin: 0 0 4px 82px; font-size: 13px; color: var(--lamp); }
/* редактор сценариев */
.rule { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--edge); }
.rule__name { margin: 0 0 4px; font-weight: 600; }
.rule__row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; }
.rule.is-done { gap: 4px; }
.rule__key { font-family: var(--mono); font-size: 13px; color: var(--nata); font-weight: 500; }
.rule__slot { font: inherit; font-size: 14px; text-align: left; padding: 6px 12px; border-radius: 9px; border: 1px dashed var(--edge-2); background: none; color: var(--dim); cursor: pointer; min-height: 36px; }
.rule__slot.is-full { border-style: solid; color: var(--frost); background: rgba(63,193,168,.08); }
.rule__slot.is-sel { border-color: var(--nata); }
.rule__slot.is-bad { border-color: var(--rec); background: rgba(220,80,70,.1); }
.rule__slot.is-ok { border-color: var(--nata); background: rgba(63,193,168,.16); cursor: default; }
.rule__bank { display: flex; flex-wrap: wrap; gap: 6px; }
.rule__part { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--edge-2); background: var(--panel-2); color: var(--frost); cursor: pointer; }
.rule__part:hover { border-color: var(--nata); }
.rule__hint { margin: 4px 0; font-size: 13px; color: var(--dim); }
.rule__twist { margin-top: 8px; padding: 16px; border-radius: 12px; background: rgba(230,162,74,.07); border: 1px solid rgba(230,162,74,.3); }
.rule__th { margin: 0 0 12px; font-weight: 600; color: var(--lamp); }
.rule__faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rule__face { display: grid; justify-items: center; gap: 6px; text-align: center; }
.rule__face img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(230,162,74,.5); }
.rule__face b { font-family: var(--mono); font-size: 14px; }
.rule__face span { font-size: 13px; color: var(--dim); line-height: 1.35; }
.rule__tt { margin: 14px 0 0; font-family: var(--serif, Georgia, serif); font-size: 18px; line-height: 1.45; }
.ch2place__console { margin-bottom: 6px; }
/* тонкие тёмные полосы прокрутки везде — в телефоне на входе, в доске, разговорах, итогах */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
*::-webkit-scrollbar-corner { background: transparent; }

/* архив вечера CAM 01 и CAM 04: закрытая часть шкалы */
.scrub__closed { left: 0; }
.scrub__scale--abs { position: relative; display: block; height: 14px; margin-left: 52px; }
.scrub__scale--abs span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scrub__scale--abs span:first-child { transform: none; }
.scrub__scale--abs span:last-child { transform: translateX(-100%); }
.archive > .btn--ghost { justify-self: start; align-self: flex-start; width: auto; margin-top: 4px; }

/* доска: при перетаскивании не выделяем текст и не тащим картинки */
.board__scroll .bcard, .board__scroll .bperson, .board.is-dragging { -webkit-user-select: none; user-select: none; }
.board__scroll img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

/* выбор улики в блокноте: вкладки по дням */
.nb__pick { padding: 0 13px 12px; }
.nb__pick .nb__evs { padding: 0; }
.nb__plabel { margin: 0 0 6px; font-size: 12px; color: var(--dim); }
.nb__pick .nb__plabel + .nb__evs { margin-bottom: 10px; }
.nb__ptabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); }
.nb__ptab { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: inherit; font-size: 12px; color: var(--dim); padding: 5px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; white-space: nowrap; }
.nb__ptab.is-on { background: rgba(230,196,120,.16); color: var(--frost); }
.nb__ptab:focus-visible { outline: 2px solid var(--nb-y); outline-offset: 1px; }
.nb__tline .nb__pick { padding: 0; }
.nb__ev--time b { font-weight: 600; color: var(--nb-y); font-variant-numeric: tabular-nums; margin-right: 2px; }

/* «Фото»: один снимок — как в обычной галерее телефона */
.pocket__screen.is-photo1 { background: #000; display: flex; flex-direction: column; }
.ph1__bar { display: flex; align-items: center; gap: 8px; padding: 46px 12px 8px; background: rgba(0,0,0,.85); }
.ph1__back { border: 0; background: none; color: #4f9de8; font: inherit; font-size: 15px; padding: 4px 0; cursor: pointer; flex: none; }
.ph1__head { display: grid; flex: 1; text-align: center; margin-right: 52px; }
.ph1__head b { font-size: 13px; color: #fff; }
.ph1__head span { font-size: 11px; color: #8e8e93; }
.ph1__body { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.ph1__img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ph1__shot { margin: 0 14px; padding: 14px; border-radius: 6px; background: #f4f4f2; color: #1d1d1f; font-family: var(--mono); font-size: 11px; line-height: 1.5; white-space: pre-wrap; max-height: 100%; overflow: auto; }
.ph1__cap { display: grid; gap: 4px; padding: 10px 14px 16px; background: rgba(0,0,0,.85); font-size: 12.5px; line-height: 1.4; color: #d7dde0; max-height: 34%; overflow-y: auto; }
.ph1__cap b { font-size: 13px; color: #fff; font-weight: 600; }

/* план дня: задача — ссылка; «?» — подсказка в два шага */
.nb__tgo { font: inherit; font-size: 14.5px; color: var(--frost); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(230,196,120,.35); text-underline-offset: 3px; }
.nb__tgo:hover { text-decoration-color: var(--nb-y); }
.nb__tgo:focus-visible { outline: 2px solid var(--nb-y); outline-offset: 2px; border-radius: 3px; }
.nb__hintq { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(230,196,120,.45); background: none; color: var(--nb-y); font: inherit; font-size: 12px; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; }
.nb__hintq.is-on { background: rgba(230,196,120,.16); }
.nb__task em + .nb__hintq { margin-left: 8px; }
.nb__hintbox { margin: -2px 0 4px 30px; padding: 8px 10px; border-left: 2px solid var(--nb-y); background: rgba(230,196,120,.06); border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.4; color: #d9d2bd; }
.nb__hintbox p { margin: 0 0 4px; }
.nb__hintbox p:last-of-type { margin-bottom: 0; }
.nb__hintmore { margin-top: 6px; font: inherit; font-size: 12.5px; color: var(--nb-y); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* блокнот: находки по дням, сворачиваются */
.nb__fold { border-top: 1px solid rgba(255,255,255,.07); }
.nb__fold:last-child { border-bottom: 1px solid rgba(255,255,255,.07); }
.nb__fold > summary { display: flex; align-items: center; gap: 8px; padding: 9px 2px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: var(--frost); }
.nb__fold > summary::-webkit-details-marker { display: none; }
.nb__fold > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--nb-y); transition: transform .2s; }
.nb__fold[open] > summary::before { transform: rotate(90deg); }
.nb__fold > summary em { margin-left: auto; font-style: normal; font-weight: 400; font-size: 12px; color: var(--dim); }
.nb__fold > .nb__note:last-child { margin-bottom: 10px; }
/* разговор: выбор улики по дням */
.ch2talk__pick .nb__pick { width: 100%; padding: 0 0 8px; }
.ch2talk__pick .nb__ptabs { max-width: 560px; }
.ch2talk__nopick { margin-top: 2px; }

/* ===== Глава 5: повтор ночи и вердикт ===== */
.c5__nata { color: var(--frost) !important; border-left: 2px solid var(--nata); padding-left: 12px; margin-top: 10px !important; }
.c5__nata b { color: var(--nata-2); font-weight: 600; }

.c5rep { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 0; border-radius: var(--r); overflow: hidden; background: #0b1114; }
.c5rep__plan { position: relative; display: grid; grid-template-rows: auto 1fr; padding: 16px 18px; border-right: 1px solid var(--edge); min-height: 0; }
.c5rep__floors { display: flex; gap: 6px; margin-bottom: 10px; }
.c5rep__floor { font-size: 12.5px; color: var(--faint); padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; }
.c5rep__floor.is-on { color: var(--frost); border-color: var(--edge-2); }
.c5rep__plan .plan { width: 100%; height: 100%; max-height: 62vh; }
.plan__room.is-now rect { fill: rgba(230, 162, 74, .22); stroke: var(--lamp); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) { .plan__room.is-now rect { animation: c5pulse 2.4s ease-in-out infinite; } }
@keyframes c5pulse { 50% { fill: rgba(230, 162, 74, .1); } }
.c5rep__side { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; padding: 18px 20px; gap: 12px; }
.c5rep__clock { font-family: var(--mono); font-size: 44px; line-height: 1; letter-spacing: .02em; color: var(--lamp); font-variant-numeric: tabular-nums; }
.c5rep__log { overflow-y: auto; display: grid; align-content: start; gap: 8px; padding-right: 4px; }
.c5rep__row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--faint); }
.c5rep__row.is-cur { color: var(--frost); font-size: 15.5px; }
.c5rep__row.is-closed { color: var(--dim); font-style: italic; }
.c5rep__t { font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 1px; }
.c5rep__row.is-cur .c5rep__t { color: var(--lamp); }
.c5rep__point { border: 1px solid rgba(230, 162, 74, .35); background: var(--lamp-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; justify-items: start; }
.c5rep__point b { font-size: 13.5px; color: var(--lamp); font-weight: 600; }
.c5rep__what { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--frost); }
.c5rep__miss { margin: 0; font-size: 14px; color: var(--dim); font-style: italic; }

.c5q { flex: 1 1 auto; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 40px 24px; text-align: center; border-radius: var(--r); background: radial-gradient(ellipse at 50% 30%, rgba(63, 193, 168, .08), transparent 60%), #0b1114; }
.c5q__ring { width: 86px; height: 86px; border-radius: 50%; border: 4px solid var(--nata); box-shadow: 0 0 30px var(--nata-glow), inset 0 0 16px var(--nata-glow); }
.c5q__text { margin: 0; max-width: 40ch; font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--frost); }
.c5q__text--a { font-size: 19px; color: var(--nata-2); }
.c5q__me { margin: 0; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); color: var(--dim); }

.c5mail { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-width: 860px; width: 100%; margin: 0 auto; padding: 22px 26px 26px; border-radius: var(--r); background: #0d1417; display: grid; align-content: start; gap: 10px; }
.c5mail__head { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.c5mail__head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.c5mail__meta p { margin: 0; font-size: 14px; color: var(--dim); }
.c5mail__hello { margin: 6px 0 0; font-size: 16px; }
.c5mail__h { margin: 14px 0 2px; font-size: 13px; font-weight: 600; color: var(--dim); }
.c5mail__facts { display: grid; gap: 6px; }
.c5fact { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; text-align: left; font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--frost); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--edge-2); background: rgba(255, 255, 255, .02); cursor: pointer; }
.c5fact:hover { border-color: rgba(63, 193, 168, .5); }
.c5fact.is-on { border-color: var(--nata); background: rgba(63, 193, 168, .08); }
.c5fact__box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #6d7a7c; display: grid; place-items: center; font-style: normal; font-size: 12px; color: #0b0f10; margin-top: 1px; }
.c5fact.is-on .c5fact__box { background: var(--nata); border-color: var(--nata); }
.c5fact__deal { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--lamp); }
.c5mail__resp { display: grid; gap: 8px; }
.c5resp { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.c5resp b { font-size: 14.5px; font-weight: 600; }
.c5resp__seg { display: flex; flex-wrap: wrap; gap: 4px; }
.c5resp__opt { font: inherit; font-size: 13px; color: var(--dim); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--edge-2); background: none; cursor: pointer; }
.c5resp__opt:hover { color: var(--frost); }
.c5resp__opt.is-on { color: #0b0f10; background: var(--nata); border-color: var(--nata); }
.c5mail__own { width: 100%; font: inherit; font-size: 15px; line-height: 1.5; color: var(--frost); background: rgba(0, 0, 0, .25); border: 1px solid var(--edge-2); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.c5mail__own:focus { outline: none; border-color: var(--nata); }
.c5mail__need { margin: 0; font-size: 13px; color: var(--dim); align-self: center; }
@media (max-width: 700px) { .c5resp { grid-template-columns: 1fr; } .c5rep { grid-template-columns: 1fr; } }

.c5end { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1.2fr 1fr; border-radius: var(--r); overflow: hidden; }
.c5end__img { background: center/cover no-repeat #0b1012; min-height: 240px; }
.c5end__text { padding: 28px 30px; display: grid; align-content: center; gap: 12px; background: #0b1114; overflow-y: auto; }
.c5end__kicker { margin: 0; font-size: 13px; color: var(--lamp); }
.c5end__text h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; }
.c5end__text p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--frost); }
.c5end__text p.c5end__kicker { color: var(--lamp); font-size: 13px; }

.c5epi { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 22px; border-radius: var(--r); background: #0b1114; }
.c5epi__title { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: 26px; }
.c5epi__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.c5epi__card { border-radius: 12px; overflow: hidden; background: #111a1e; border: 1px solid var(--edge); display: grid; grid-template-rows: 150px auto; }
.c5epi__card .c5end__img { min-height: 0; }
.c5epi__tx { padding: 12px 14px 14px; display: grid; gap: 4px; }
.c5epi__tx b { font-size: 15px; }
.c5epi__tx p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--dim); }

.c5final { flex: 1 1 auto; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 36px 24px; text-align: center; border-radius: var(--r); background: #0b1114; }
.c5final h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; }
.c5final__stats { display: grid; gap: 6px; min-width: min(460px, 100%); }
.c5final__row { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--edge); font-size: 15px; }
.c5final__row span { color: var(--dim); text-align: left; }
.c5final__pts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 560px; font-size: 14px; color: var(--faint); }
.c5final__pt.is-ok { color: var(--nata-2); }
.c5final__next { margin: 6px 0 0; color: var(--dim); font-size: 14.5px; }

/* оплата глав 3–5 */
.pay { margin-top: 18px; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(63,193,168,.35); background: rgba(63,193,168,.06); display: grid; gap: 8px; }
.pay__h { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--frost); }
.pay__t { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--dim); }
.pay__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.pay__link { font: inherit; font-size: 14px; color: var(--nata-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pay__form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.pay__form[hidden] { display: none; }
.pay__form input { flex: 1 1 180px; font: inherit; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--frost); background: rgba(0,0,0,.3); border: 1px solid var(--edge-2); border-radius: 10px; padding: 9px 12px; }
.pay__form input:focus { outline: none; border-color: var(--nata); }
.pay__msg { margin: 0; min-height: 1.2em; font-size: 13.5px; color: var(--dim); }
.pay__msg.is-bad { color: #e8857a; }
.pay__form--mail input { text-transform: none; letter-spacing: 0; }
.pay__note { flex-basis: 100%; margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.pay__note a { color: var(--nata-2); }

/* подсказки на старте: размытие вокруг, подсвеченное место и пояснение */
.coach { position: fixed; inset: 0; z-index: 400; opacity: 0; transition: opacity .25s; }
.coach.is-on { opacity: 1; }
.coach__blur { position: absolute; inset: 0; background: rgba(4, 7, 9, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.coach__hole { position: absolute; border-radius: 14px; box-shadow: 0 0 0 2px rgba(63, 193, 168, .9), 0 0 28px 4px rgba(63, 193, 168, .35); pointer-events: none; }
.coach__box { position: absolute; padding: 16px 18px 14px; border-radius: 14px; background: #121b1f; border: 1px solid rgba(63, 193, 168, .45); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.coach__t { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--frost); }
.coach__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.coach__off { font: inherit; font-size: 13px; color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.coach__off:hover { color: var(--frost); }
@media (prefers-reduced-motion: reduce) { .coach { transition: none; } }

/* звонок из мессенджера в переписке */
.bub--call { display: flex; align-items: center; gap: 10px; padding-right: 54px; min-width: 200px; }
.bub__callic { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.bub__callic svg { width: 17px; height: 17px; }
.bub__calltx { display: flex; flex-direction: column; line-height: 1.3; }
.bub__calltx b { font-weight: 600; }
.bub__callst { font-size: 13px; color: #8fd19e; }
.bub__callst.is-miss { color: #ff8a80; }
.bub--call .bub__meta { position: absolute; right: 10px; bottom: 7px; }

/* карточка на доске: текст записи без отступов, внизу плавно гаснет, если не помещается */
.bcard__log { font-size: 11px; line-height: 1.32; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }

/* края и углы для изменения размера доски */
@media (min-width: 821px) {
  .board__box { position: relative; max-width: 98vw; max-height: 96vh; }
  .board__box .board__scroll { flex: 1; }
  .board__edge { position: absolute; z-index: 6; touch-action: none; }
  .board__edge--n, .board__edge--s { left: 14px; right: 14px; height: 8px; cursor: ns-resize; }
  .board__edge--n { top: 0; } .board__edge--s { bottom: 0; }
  .board__edge--e, .board__edge--w { top: 14px; bottom: 14px; width: 8px; cursor: ew-resize; }
  .board__edge--e { right: 0; } .board__edge--w { left: 0; }
  .board__edge--ne, .board__edge--nw, .board__edge--se, .board__edge--sw { width: 18px; height: 18px; }
  .board__edge--ne { top: 0; right: 0; cursor: nesw-resize; } .board__edge--sw { bottom: 0; left: 0; cursor: nesw-resize; }
  .board__edge--nw { top: 0; left: 0; cursor: nwse-resize; } .board__edge--se { bottom: 0; right: 0; cursor: nwse-resize; }
  .board__edge--n:hover, .board__edge--s:hover, .board__edge--e:hover, .board__edge--w:hover { background: rgba(63,193,168,.18); }
  .board__grip { width: 22px; height: 22px; opacity: .8;
    background: linear-gradient(135deg, transparent 0 50%, var(--edge-2) 50% 56%, transparent 56% 66%, var(--edge-2) 66% 72%, transparent 72% 82%, var(--edge-2) 82% 88%, transparent 88%); }
  .board__grip:hover { opacity: 1; filter: brightness(1.6); }
  body.is-resizing, body.is-resizing * { user-select: none; }
  body[data-rz="n"] *, body[data-rz="s"] * { cursor: ns-resize !important; }
  body[data-rz="e"] *, body[data-rz="w"] * { cursor: ew-resize !important; }
  body[data-rz="ne"] *, body[data-rz="sw"] * { cursor: nesw-resize !important; }
  body[data-rz="nw"] *, body[data-rz="se"] * { cursor: nwse-resize !important; }
}

/* Ната замечает курсор: кольцо светлеет, по нему идут волны */
@media (hover: hover) {
  .ring:not(.is-talking):hover .ring__core { border-color: #7fe0c4; box-shadow: 0 0 22px rgba(127,224,196,.45), inset 0 0 10px rgba(127,224,196,.3); transform: scale(1.04); transition: border-color .3s, box-shadow .3s, transform .3s; }
  .ring:not(.is-talking):hover .ring__wave { animation: ripple 1.5s ease-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .ring:hover .ring__wave { animation: none !important; }
  .ring:hover .ring__core { transform: none !important; }
}

/* задача в верхней строке заметнее: бирюзовая рамка, подложка, яркий текст */
.bar__step.is-task { border-color: rgba(63,193,168,.55); background: rgba(63,193,168,.1); box-shadow: 0 0 14px -4px rgba(63,193,168,.45); padding: 5px 14px; }
.bar__step.is-task .bar__steplab { color: var(--nata); }
.bar__step.is-task .bar__steptx { color: #fff; font-weight: 600; }
.bar__step.is-task:hover { background: rgba(63,193,168,.18); border-color: var(--nata); }

/* конец ночи: экран гаснет, часы идут до утра */
.nightgo { position: fixed; inset: 0; z-index: 89; display: grid; place-items: center; background: #030506; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.nightgo.is-on { opacity: 1; pointer-events: auto; }
.nightgo__clock { font-family: var(--mono); font-size: clamp(52px, 8vw, 84px); color: #e9efed; text-shadow: 0 0 30px rgba(63,193,168,.25); letter-spacing: .02em; }

/* Ната в телефоне: новый значок светится, пока его не открыли */
.pocket__app.is-fresh .pocket__icon { animation: freshapp 2.4s ease-in-out infinite; }
@keyframes freshapp { 50% { box-shadow: 0 0 0 3px rgba(63,193,168,.35), 0 0 22px rgba(63,193,168,.75); } }
@media (prefers-reduced-motion: reduce) { .pocket__app.is-fresh .pocket__icon { animation: none; box-shadow: 0 0 0 3px rgba(63,193,168,.4); } }
.ava--nata { background: #0b1313; box-shadow: inset 0 0 0 3px var(--nata), 0 0 10px rgba(63,193,168,.4); }

/* снимок с телефона в карточке улики: обычное фото, без подписей камеры */
.evphoto { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.evphoto img { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.evphoto__tag { position: absolute; left: 12px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12.5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal__media .evphoto { position: absolute; inset: 0; border-radius: 0; }
.modal__media .evphoto img { width: 100%; height: 100%; max-height: none; object-fit: cover; }

/* миниатюра новой улики, как снимок в углу телефона */
.evthumb { position: fixed; left: 18px; bottom: 128px; z-index: 75; display: flex; align-items: center; gap: 12px; max-width: 340px; padding: 8px 14px 8px 8px; border-radius: 14px;
  border: 1px solid rgba(63,193,168,.55); background: rgba(10,16,18,.94); color: var(--frost); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 18px 40px -12px #000, 0 0 22px -6px rgba(63,193,168,.5); opacity: 0; transform: translateY(16px) scale(.94); transition: opacity .35s, transform .35s cubic-bezier(.2,.9,.3,1.2); }
.evthumb.is-on { opacity: 1; transform: none; }
.evthumb:hover { border-color: var(--nata); }
.evthumb__pic { flex: none; width: 92px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--panel-2); border: 2px solid #fff; display: grid; place-items: center; }
.evthumb__pic img { width: 100%; height: 100%; object-fit: cover; }
.evthumb__log { padding: 4px; font-family: var(--mono); font-size: 9.5px; line-height: 1.25; color: var(--dim); overflow: hidden; max-height: 100%; }
.evthumb__tx { display: grid; gap: 2px; font-size: 13.5px; line-height: 1.3; }
.evthumb__tx b { color: var(--nata); font-weight: 600; }
@media (max-width: 820px) { .evthumb { left: 10px; right: 10px; bottom: auto; top: 70px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .evthumb { transition: none; } }
/* новая улика на полосе светится, пока её не открыли */
.ev--unseen { border-color: var(--nata) !important; box-shadow: 0 0 0 1px rgba(63,193,168,.5), 0 0 16px -2px rgba(63,193,168,.6); }
.ev--unseen::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--nata); box-shadow: 0 0 8px var(--nata); }

/* кольцо Наты в пятой главе: при наведении светлеет, по нему идут волны */
.c5q__ring { position: relative; transition: border-color .3s, box-shadow .3s, transform .3s; }
.c5q__ring::before, .c5q__ring::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--nata); opacity: 0; pointer-events: none; }
@media (hover: hover) {
  .c5q__ring:hover { border-color: #7fe0c4; box-shadow: 0 0 40px rgba(127,224,196,.6), inset 0 0 20px rgba(127,224,196,.4); transform: scale(1.04); }
  .c5q__ring:hover::before { animation: ripple 1.6s ease-out infinite; }
  .c5q__ring:hover::after { animation: ripple 1.6s ease-out .8s infinite; }
}
@media (prefers-reduced-motion: reduce) { .c5q__ring:hover { transform: none; } .c5q__ring:hover::before, .c5q__ring:hover::after { animation: none; } }

/* голоса: отдельный выключатель рядом с громкостью */
.snd__vhead { display: grid; grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.snd__row--voice.is-off .snd__range { opacity: .35; }

/* дата редакции документа */
.doc__ed { font-size: 13px; color: var(--dim); margin: 0 0 22px; }

/* вечер: пункты плана, которые уже не успеть */
.nb__task.is-missed { opacity: .55; }
.nb__task.is-missed .nb__box { border-style: dashed; color: var(--dim); }
.nb__task.is-missed em { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--dim); }

/* подсказка застрявшему: плашка задачи мягко светится (2–3 «вдоха», потом ровно) */
#step.is-stuck { border-color: var(--nata); box-shadow: 0 0 0 1px rgba(63,193,168,.5), 0 0 18px rgba(63,193,168,.45); animation: stuckbreath 2.4s ease-in-out 3; }
@keyframes stuckbreath { 0%, 100% { box-shadow: 0 0 0 1px rgba(63,193,168,.5), 0 0 18px rgba(63,193,168,.45); } 50% { box-shadow: 0 0 0 2px rgba(63,193,168,.8), 0 0 34px rgba(63,193,168,.75); } }
@media (prefers-reduced-motion: reduce) { #step.is-stuck { animation: none; } }
/* задача из плашки: нужный пункт плана подсвечен */
.nb__task.is-flash { background: rgba(63,193,168,.12); border-radius: 8px; transition: background 1.5s ease; }

/* запись при выключенной озвучке: всплывашка рядом с кнопкой */
.vgate { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #12201f; border: 1px solid var(--nata); color: var(--frost); font-size: 13px; opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; }
.vgate.is-on { opacity: 1; transform: none; }
.vgate__on { font: inherit; font-weight: 600; color: var(--nata-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* находка в комнате: улика под текстом окошка */
.ch2note__evs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ch2note__ev { pointer-events: auto; position: relative; width: 132px; height: 84px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--edge-2); background: #0d1514; cursor: pointer; }
.ch2note__ev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch2note__evlog { display: block; padding: 8px; font-family: var(--mono); font-size: 10.5px; line-height: 1.35; color: var(--frost); text-align: left; white-space: pre-wrap; overflow: hidden; height: 100%; }
.ch2note__evn { position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.65); font-family: var(--mono); font-size: 11px; color: #fff; }
.ch2note__ev:hover, .ch2note__ev:focus-visible { border-color: var(--nata); }
.ch2note__ev.is-new { animation: evbreath 1.6s ease-in-out 3; }
@keyframes evbreath { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(63,193,168,0); } 50% { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(63,193,168,.8), 0 0 22px rgba(63,193,168,.55); } }
@media (prefers-reduced-motion: reduce) { .ch2note__ev.is-new { animation: none; } }

/* сверка-козырь в разговоре */
.q.q--claim { border-color: var(--nata); color: var(--frost); }
.q.q--claim::before { content: "≠ "; color: var(--nata); font-weight: 600; }

/* ночь после главы 2: уведомление на экране телефона */
.teaser { margin-top: 14px; max-width: 380px; padding: 12px 14px 13px; border-radius: 18px; background: rgba(28,32,36,.86); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 40px -14px #000; backdrop-filter: blur(10px); opacity: 0; transform: translateY(-8px); transition: opacity .5s ease, transform .5s ease; }
.teaser.is-on { opacity: 1; transform: none; }
.teaser__top { display: flex; justify-content: space-between; font-size: 12px; color: #9aa3ab; margin-bottom: 4px; }
.teaser__from { display: block; font-size: 14px; color: var(--frost); }
.teaser__t { margin: 3px 0 0; font-size: 14px; line-height: 1.4; color: #c9d1d6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .teaser { transition: none; } }

/* настройки: сложность */
.snd__h { margin: 12px 0 2px; padding-top: 10px; border-top: 1px solid var(--edge); font-weight: 600; font-size: 15px; }
.snd__lv { display: grid; gap: 6px; }
.snd__lvb { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge-2); background: transparent; color: var(--frost); font: inherit; cursor: pointer; }
.snd__lvb b { font-weight: 600; font-size: 14px; }
.snd__lvb span { color: var(--dim); font-size: 12px; line-height: 1.35; }
.snd__lvb:hover { border-color: rgba(63,193,168,.6); }
.snd__lvb.is-on { border-color: var(--nata); background: rgba(63,193,168,.1); }
.snd__lvb.is-on b::after { content: " ✓"; color: var(--nata); }
.snd { max-height: calc(100vh - 80px); overflow-y: auto; }

/* сложность «Расследование» и «Особо важное»: мест для осмотра не видно */
.ch2place__pic.is-lvl-inv .ch2pin, .ch2place__pic.is-lvl-hard .ch2pin { width: 56px; height: 56px; background: transparent; border: 0; box-shadow: none; }
.ch2place__pic.is-lvl-inv .ch2pin::after, .ch2place__pic.is-lvl-hard .ch2pin::after { display: none; }
.ch2place__pic.is-lvl-inv .ch2pin { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><circle cx='11' cy='11' r='8' fill='rgba(0,0,0,.25)' stroke='white' stroke-width='2.2'/><line x1='17' y1='17' x2='25' y2='25' stroke='white' stroke-width='3' stroke-linecap='round'/></svg>") 11 11, zoom-in; }
.ch2place__pic.is-lvl-inv .ch2pin:hover { background: radial-gradient(circle, rgba(255,233,190,.26) 0, rgba(255,233,190,.08) 45%, transparent 70%); }
.ch2place__pic.is-lvl-hard .ch2pin { cursor: default; }
.ch2place__pic.is-lvl-hard .ch2pin:hover .ch2pin__lbl { opacity: 0; }
.ch2place__pic.is-lvl-inv .ch2pin:focus-visible, .ch2place__pic.is-lvl-hard .ch2pin:focus-visible { outline: 2px solid var(--nata); outline-offset: -10px; border-radius: 50%; }
.ch2place__pic.is-lvl-hard .ch2pin:focus-visible .ch2pin__lbl { opacity: 1; }
/* осмотренное: маленькая галочка на предмете */
.ch2place__pic.is-lvl-inv .ch2pin.is-seen::before, .ch2place__pic.is-lvl-hard .ch2pin.is-seen::before { content: "✓"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.ch2place__pic.is-lvl-inv .ch2pin.is-seen.is-ev::before, .ch2place__pic.is-lvl-hard .ch2pin.is-seen.is-ev::before { background: var(--lamp, #e0a44b); color: #1c1608; }
/* застрял: неосмотренные места коротко мерцают */
.ch2place__pic.is-reveal .ch2pin:not(.is-seen) { animation: pinreveal 2.6s ease-in-out 1; }
@keyframes pinreveal { 0%, 100% { box-shadow: none; } 30%, 70% { box-shadow: 0 0 0 2px rgba(255,233,190,.7), 0 0 26px rgba(255,233,190,.5); border-radius: 50%; } }
/* промах: рябь, ничего не стоит */
.ch2ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6); pointer-events: none; animation: ripple .7s ease-out forwards; }
@keyframes ripple { to { transform: scale(5); opacity: 0; } }
.ch2place__count { margin: 6px 0 0; font-size: 13px; color: var(--dim); }
.ch2place__count.is-all { color: var(--nata); }
@media (prefers-reduced-motion: reduce) { .ch2ripple, .ch2place__pic.is-reveal .ch2pin { animation: none; } }

/* вывод: слово из улики с ниткой на доске */
.nb__word.is-thread { border-color: rgba(230,196,120,.55); }
.nb__word.is-thread::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #e6c478; vertical-align: 1px; }

/* выбор сложности перед началом */
.lvpick { margin: auto; width: min(1040px, 100%); padding: 24px 16px; display: grid; gap: 18px; }
.lvpick__h { margin: 0; text-align: center; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: clamp(24px, 3.4vw, 34px); }
.lvpick__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lvpick__note { margin: 0; text-align: center; color: var(--dim); font-size: 13.5px; }
.lvcard { display: grid; gap: 8px; align-content: start; text-align: left; padding: 10px 10px 16px; border-radius: 16px; border: 1px solid var(--edge-2); background: rgba(255,255,255,.03); color: var(--frost); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.lvcard:hover, .lvcard:focus-visible { border-color: var(--nata); transform: translateY(-2px); }
.lvcard__pv { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0d1514 center / cover no-repeat; }
.lvcard__name { padding: 0 6px; font-size: 17px; font-weight: 600; }
.lvcard__sub { padding: 0 6px; color: var(--dim); font-size: 13.5px; line-height: 1.4; }
.lvcard__dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; background: rgba(63,193,168,.65); box-shadow: 0 0 0 4px rgba(63,193,168,.25); animation: lvdot 2.2s ease-in-out infinite; }
@keyframes lvdot { 50% { box-shadow: 0 0 0 8px rgba(63,193,168,.1); } }
.lvcard__lens { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #fff; animation: lvlens 4.5s ease-in-out infinite; }
.lvcard__lens::after { content: ""; position: absolute; width: 10px; height: 3px; background: #fff; border-radius: 2px; right: -9px; bottom: -4px; transform: rotate(45deg); }
.lvcard__glow { position: absolute; left: 42%; top: 74%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: radial-gradient(circle, rgba(255,233,190,.45), transparent 70%); opacity: 0; animation: lvglow 4.5s ease-in-out infinite; }
@keyframes lvlens { 0% { left: 15%; top: 25%; } 45%, 75% { left: 38%; top: 68%; } 100% { left: 15%; top: 25%; } }
@keyframes lvglow { 0%, 40% { opacity: 0; } 50%, 72% { opacity: 1; } 85%, 100% { opacity: 0; } }
.lvcard--hard .lvcard__pv { filter: brightness(.55); }
.lvcard__count { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; font-style: normal; }
@media (max-width: 820px) { .lvpick__row { grid-template-columns: 1fr; } .lvcard { grid-template-columns: 120px 1fr; } .lvcard__pv { grid-row: span 2; } }
@media (prefers-reduced-motion: reduce) { .lvcard__dot, .lvcard__lens, .lvcard__glow { animation: none; } .lvcard__glow { opacity: 1; } .lvcard__lens { left: 38%; top: 68%; } }
.is-levelpick .console, .is-levelpick .side, .is-levelpick .tray, .is-levelpick #pocket, .is-levelpick .pocketbtn, .is-levelpick #step { display: none !important; }

/* выбор улики: вкладки одной ширины, список высотой по самой длинной вкладке */
.nb__pstack { display: grid; }
.nb__pstack > .nb__evs { grid-area: 1 / 1; align-content: start; }
.nb__pstack > .nb__evs.is-off { visibility: hidden; pointer-events: none; }
.btn--quiet { background: transparent; color: var(--frost); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.btn--quiet:hover { background: rgba(255,255,255,.06); }
.jrow__act { display: flex; gap: 14px; align-items: center; justify-content: flex-end; }
/* доска: полотно с масштабом, отметка дня на карточке, новые карточки, кнопки масштаба */
.board__sizer { position: relative; }
.board__canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bcard__day { position: absolute; left: 44px; top: 6px; z-index: 2; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.55); color: var(--dim); font-family: var(--mono); font-size: 11px; }
.bcard.is-new .bcard__pic { animation: bnew 2.4s ease-out 1; }
@keyframes bnew { 0%, 40% { box-shadow: 0 0 0 2px rgba(230,196,120,.9), 0 0 22px rgba(230,196,120,.45); } 100% { box-shadow: none; } }
.board__zoom { position: absolute; right: 18px; bottom: 16px; z-index: 70; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(12,16,18,.88); border: 1px solid var(--edge-2); }
.board__zb, .board__zp { min-width: 32px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--frost); font: inherit; font-size: 15px; cursor: pointer; }
.board__zp { min-width: 52px; font-size: 12.5px; color: var(--dim); }
.board__zb:hover, .board__zp:hover { background: rgba(255,255,255,.08); }
.board__grid + .board__grid { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .bcard.is-new .bcard__pic { animation: none; box-shadow: 0 0 0 2px rgba(230,196,120,.7); } }
.board__box { position: relative; }
.board__scroll { overflow: auto; }
/* подпись места у верхнего края картинки — снизу (п. 54); мерцание подсказки (п. 46) */
.ch2pin.is-low .ch2pin__lbl { bottom: auto; top: 130%; }
.ch2pin.is-glint { animation: pinreveal 2.6s ease-in-out 1; }
@media (prefers-reduced-motion: reduce) { .ch2pin.is-glint { animation: none; box-shadow: 0 0 0 2px rgba(255,233,190,.7); border-radius: 50%; } }
/* холл: слой мест осмотра поверх картинки */
.ch2hall__img { position: relative; }
.ch2hall__pins.ch2place__pic { position: absolute; inset: 0; width: auto; height: auto; overflow: hidden; border-radius: 0; }
.finlay__mel { margin: 14px 0 0; color: var(--dim); font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.finlay__badge { padding: 2px 10px; border-radius: 999px; background: rgba(230,196,120,.16); color: var(--lamp, #e0a44b); font-size: 13px; font-weight: 600; }
/* улика перетаскивается в окно разговора (п. 56) */
.ev--ghost { position: fixed; z-index: 400; width: 120px; pointer-events: none; transform: translate(-50%, -50%) rotate(-3deg); opacity: .92; box-shadow: 0 18px 40px -10px #000; }
.ch2talk.is-droppable { position: relative; outline: 1px dashed rgba(230,196,120,.35); outline-offset: 6px; border-radius: 12px; }
.ch2talk.is-over { outline: 2px solid rgba(230,196,120,.8); }
.ch2talk.is-droppable::after { content: "Отпустите, чтобы показать"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(12,16,18,.92); color: var(--lamp, #e0a44b); font-size: 14px; opacity: .55; pointer-events: none; transition: opacity .15s; }
.ch2talk.is-over::after { opacity: 1; }
body.is-evdrag, body.is-evdrag * { cursor: grabbing !important; user-select: none; }
/* заметки списком, как в телефоне (п. 41) */
.nl__h { margin: 14px 4px 6px; font-size: 13px; font-weight: 600; opacity: .55; }
.nl__box { border-radius: 12px; background: rgba(255,255,255,.05); overflow: hidden; }
.nl__row { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.nl__row + .nl__row { border-top: 1px solid rgba(255,255,255,.08); }
.nl__row:hover, .nl__row:focus-visible { background: rgba(255,255,255,.06); }
.nl__t { display: block; font-size: 15px; font-weight: 600; }
.nl__m { display: flex; gap: 8px; margin-top: 2px; font-size: 13px; opacity: .6; min-width: 0; }
.nl__d { flex: none; }
.nl__s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- телефон: правки мобильной версии (3 декабря 2026) ---------- */
@media (max-width: 820px) {
  /* верхняя строка в три ряда: дом и пульт / доверие и улики / настройки; задача — ниже во всю ширину */
  .bar { gap: 6px 12px; padding: 8px 10px 10px; font-size: 13px; }
  .bar__house { order: 1; }
  .bar__spacer { order: 2; }
  .bar__console { order: 3; padding: 3px 10px; font-size: 13px; }
  .meter { order: 4; gap: 6px; }
  .bar > span:not(.bar__step):not(.meter):not(.bar__spacer):not(.bar__chapter) { order: 5; margin-left: auto; }
  .bar__btn:not(.bar__console) { order: 6; padding: 3px 8px; font-size: 13px; }
  #sound { margin-left: -8px; }
  .bar__step { order: 7; }
  .bar::after { content: ""; order: 5; flex-basis: 100%; height: 0; }
  /* полоса улик — обычный блок внизу страницы: ничего не перекрывает */
  .tray { position: static !important; padding: 10px 10px 12px; background: rgba(8,12,14,.96); }
  /* вопросы в разговоре — без внутренней прокрутки, страница листается целиком */
  .is-talk .actions { height: auto; overflow: visible; }
  /* настройки — во всю ширину экрана */
  .snd { width: auto; left: 10px !important; right: 10px; max-height: calc(100dvh - 150px); }
}
@media (max-width: 820px) {
  /* реплика Наты из колонки — плашкой над карманом, текст под ней не просвечивает */
  .nsub { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 10px; border-radius: 12px; background: rgba(8,12,14,.96); border: 1px solid rgba(63,193,168,.35); box-shadow: 0 12px 30px -10px #000; }
  .nsub span { max-width: none; padding: 2px 0 0; background: none; font-size: 16px; text-align: left; }
}
@media (max-width: 860px) {
  .ch2place.ch2eve { grid-template-columns: 1fr; }   /* вечер: картинка над текстом, а не сжатой колонкой */
}
@media (max-width: 820px) { .nsub { z-index: 95; } }
@media (max-width: 820px) {
  /* повтор ночи: план по размеру, без пустого поля под ним */
  .c5rep__plan { border-right: 0; border-bottom: 1px solid var(--edge); padding: 12px; }
  .c5rep__plan .plan { height: auto; max-height: 50vh; }
  .c5rep__clock { font-size: 36px; }
  /* концовка: картинка над текстом */
  .c5end { grid-template-columns: 1fr; }
  .c5end__img { min-height: 220px; }
  .c5end__text { padding: 20px 18px; }
  .c5end__text h2 { font-size: 28px; }
}
@media (max-width: 820px) {
  /* страница дела: строка камеры (REC, CAM) — под часами, а не под кнопками «Все дела» и «Сразу к игре» */
  .night__hud { top: calc(9vh + clamp(70px, 11.8vw, 180px) + 34px); left: 6vw; }
}
@media (max-width: 820px) {
  /* находка в комнате: карточка под фотографией во всю ширину, не уезжает за край экрана */
  .ch2place__view, .ch2place__pic { overflow: visible; }
  .ch2place__pic > img { border-radius: var(--r); }
  .ch2note { left: 0 !important; right: 0; top: calc(100% + 8px) !important; width: auto; margin: 0; transform: none !important; z-index: 20; background: #0c1214; }
  .ch2note.is-left, .ch2note.is-up { margin: 0; }
}
@media (max-width: 820px) {
  /* пояснение «i» у доверия Наты: во всю ширину экрана, не уходит за левый край */
  .meter .tip { position: static; }
  .meter .tip__box { position: fixed; left: 10px; right: 10px; top: 80px; width: auto; }
}
@media (max-width: 820px) {
  /* «улика на доске»: плашка у самого верха, не закрывает «‹ Назад» в открытом телефоне */
  .evthumb { top: 6px; padding: 6px 12px 6px 6px; }
  .evthumb .ev, .evthumb img { max-height: 52px; }
}
@media (max-width: 820px) {
  /* телефон открыт на весь экран — реплика Наты из колонки его не перекрывает (она остаётся в приложении «Ната») */
  body:has(.pocket.is-open) .nsub { display: none; }
}
/* числа вида «6 из 7», «5 из 10», время — не переносятся посередине */
.c5final__row b, .c5final__row > :last-child { white-space: nowrap; }
