/* «Выжить до пятницы» — тема «Ночной офис, неон» (макет 1b).
   Layout: на десктопе (≥ 1000 px) кадр 1280 × 800 — часы и прогресс сверху, неоновые трубки-шкалы по бокам,
   стеклянная карточка с ответами в центре. На телефоне та же система в одну колонку. */
:root {
  --bg: #07070d;
  --text: #f2f0ff;
  --text-2: #b9b4d6;
  --text-3: #d6d2ef;
  --magenta: #ff3bd4; --magenta-l: #ff8be6; --magenta-xl: #ffd1f4;
  --cyan: #2de2e6; --cyan-l: #7df9ff; --cyan-xl: #c8feff;
  --up: #d4ff3a; --down: #ff3b6b;
  --glass: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  --line: rgba(255,255,255,.14);
  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }  /* на телефоне учитывает панели браузера и клавиатуру */
body {
  background:
    radial-gradient(900px 500px at 15% 110%, rgba(178,107,255,.22), transparent 60%),
    radial-gradient(800px 500px at 90% -10%, rgba(45,226,230,.18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text); font-family: var(--f-body); font-size: 15px; font-weight: 700;
  display: flex; flex-direction: column; overflow: hidden;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 14px;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan-l); outline-offset: 3px; }

.app { flex: 1; min-height: 0; width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; position: relative; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.glass, .panel { background: var(--glass); border: 1.5px solid var(--line); border-radius: 24px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 40px rgba(120,100,255,.12), inset 0 1px 0 rgba(255,255,255,.08); }
.kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-l); }
.neon-m { color: var(--magenta); text-shadow: 0 0 14px rgba(255,59,212,.8); }

/* ---------- кнопки ---------- */
.btn-main, .btn-ghost { width: 100%; border-radius: 999px; font-family: var(--f-display); font-weight: 800; letter-spacing: .02em; transition: background .15s, box-shadow .15s, color .15s, transform .08s; }
.btn-main { padding: 16px 20px; border: 0; background: var(--magenta); color: var(--bg); font-size: 16px; box-shadow: 0 0 30px rgba(255,59,212,.7); }
.btn-main:hover { background: #ff7be3; }
.btn-ghost { padding: 13px 16px; background: transparent; color: var(--cyan-xl); border: 2px solid var(--cyan); font-size: 13px; box-shadow: 0 0 18px rgba(45,226,230,.3); }
.btn-ghost:hover { background: rgba(45,226,230,.14); box-shadow: 0 0 30px rgba(45,226,230,.6); color: #fff; }
.btn-main:active, .btn-ghost:active, .ans:active { transform: scale(.98); }
.btn-chip { flex: none; border: 1.5px solid rgba(255,59,212,.6); border-radius: 999px; background: transparent; color: var(--magenta-l); padding: 6px 12px; font-weight: 800; font-size: 12px; box-shadow: 0 0 12px rgba(255,59,212,.3); }
.btn-chip:hover { background: rgba(255,59,212,.16); color: #fff; }
.icon-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: transparent; border: 1.5px solid var(--line); color: var(--text-2); font-family: var(--f-mono); font-size: 15px; }
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan-xl); box-shadow: 0 0 14px rgba(45,226,230,.4); }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); padding: 0; margin-bottom: 6px; }
.field input[type=text] { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); font-size: 16px; font-weight: 800; }
.field input[type=text]::placeholder { color: rgba(185,180,214,.55); }
.field input[type=text]:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.field input[aria-invalid="true"] { border-color: var(--down); box-shadow: 0 0 18px rgba(255,59,107,.4); }

/* ---------- меню ---------- */
.menu { justify-content: flex-start; overflow-y: auto; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.logo { width: 84px; height: auto; color: var(--cyan-l); filter: drop-shadow(0 0 8px rgba(45,226,230,.8)); }
.title { margin: 0; font-family: var(--f-display); font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: .01em; display: flex; flex-direction: column; gap: 4px; }
.title .t1 { font-size: clamp(30px, 9vw, 44px); color: #fff; }
.title .t2 { font-size: clamp(22px, 6.6vw, 32px); color: var(--magenta); text-shadow: 0 0 14px rgba(255,59,212,.8), 0 0 40px rgba(255,59,212,.4); }
.tagline { margin: 0; max-width: 34ch; color: var(--text-2); line-height: 1.45; font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.me-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; border: 1.5px solid var(--line); background: rgba(255,255,255,.03); }
.me-ava { width: 46px; height: 46px; flex: none; border-radius: 14px; border: 1.5px solid rgba(45,226,230,.55); box-shadow: 0 0 14px rgba(45,226,230,.3); display: grid; place-items: center; font-size: 26px; }
.me-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-who b { font-weight: 900; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who small { color: var(--text-2); font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prof { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; min-width: 0; }
.prof input { position: absolute; opacity: 0; pointer-events: none; }
.prof .pe { display: none; }
.prof b { font-weight: 900; font-size: 15px; line-height: 1.2; }
.prof small { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-2); font-weight: 500; line-height: 1.35; }
.prof:hover { border-color: rgba(45,226,230,.5); }
.prof:has(input:checked) { border-color: var(--cyan); background: rgba(45,226,230,.1); box-shadow: 0 0 22px rgba(45,226,230,.35); }
.prof:has(input:checked) b { color: var(--cyan-xl); }
.prof:has(input:focus-visible) { outline: 2px solid var(--cyan-l); outline-offset: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-foot { display: flex; gap: 8px; align-items: stretch; }
.record { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; min-width: 0; border-radius: 18px; }
.record b { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; color: var(--cyan-l); text-transform: uppercase; white-space: nowrap; }
.sound { flex: none; width: 52px; border-radius: 18px; font-family: var(--f-mono); font-size: 12px; color: var(--text-2); }

/* ---------- пропуск ---------- */
.join { justify-content: flex-start; overflow-y: auto; }
.pass { overflow: hidden; }
.pass-top { position: relative; padding: 24px 16px 14px; text-align: center; border-bottom: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pass-top b { font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(255,59,212,.8); }
.pass-top small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-l); font-weight: 500; }
.pass-hole { position: absolute; top: 9px; left: 50%; width: 54px; height: 8px; margin-left: -27px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--bg); }
.pass-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.pass-photo { align-self: center; width: 92px; height: 92px; border-radius: 24px; border: 2px solid var(--magenta); box-shadow: 0 0 26px rgba(255,59,212,.5), inset 0 0 18px rgba(255,59,212,.25); display: grid; place-items: center; font-size: 52px; }
.avatars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ava { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 22px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ava input { position: absolute; opacity: 0; pointer-events: none; }
.ava:has(input:checked) { border-color: var(--magenta); box-shadow: 0 0 16px rgba(255,59,212,.55); background: rgba(255,59,212,.12); }
.ava:has(input:focus-visible) { outline: 2px solid var(--cyan-l); outline-offset: 2px; }
.join-err { margin: 0; color: var(--down); font-weight: 800; font-size: 13px; text-shadow: 0 0 10px rgba(255,59,107,.5); }
.join-err:empty { display: none; }
.join-note { margin: 0; text-align: center; font-size: 12px; color: var(--text-2); font-weight: 700; }

/* ---------- игровой экран ---------- */
.game { gap: 14px; }
.g-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand day" "clock clock"; align-items: center; gap: 10px 12px; }
.g-brand { grid-area: brand; font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.g-brand em { font-style: normal; color: var(--magenta); text-shadow: 0 0 14px rgba(255,59,212,.8); }
.g-day { grid-area: day; text-align: right; font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.g-day small { display: block; color: var(--text-2); font-size: 11px; margin-top: 3px; }
.g-clock { grid-area: clock; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.g-clock .time { font-family: var(--f-mono); font-weight: 700; font-size: 46px; line-height: 1; color: var(--cyan-l); text-shadow: 0 0 12px rgba(45,226,230,.9), 0 0 40px rgba(45,226,230,.5); font-variant-numeric: tabular-nums; }
.segs { display: flex; gap: 4px; }
.segs i { width: 16px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .3s, box-shadow .3s; }
.segs i.done { background: var(--cyan-l); box-shadow: 0 0 8px var(--cyan); }
.segs i.now { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }

.g-stats { display: flex; justify-content: space-between; gap: 10px; }
.tubes { display: flex; gap: 10px; }
.tube-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 66px; }
.arrows { height: 18px; font-size: 13px; letter-spacing: -.05em; white-space: nowrap; }
.arrows .u { color: var(--up); text-shadow: 0 0 8px var(--up); }
.arrows .d { color: var(--down); text-shadow: 0 0 8px var(--down); }
.tube { position: relative; width: 40px; height: 84px; border-radius: 22px; border: 2px solid var(--c-border); box-shadow: inset 0 0 18px var(--c-inner); overflow: hidden; }
.tube .fill { position: absolute; left: 4px; right: 4px; bottom: 4px; height: max(0px, calc(var(--v, 50) * 1% - 8px)); border-radius: 18px;
  background: linear-gradient(var(--c-light), var(--c)); box-shadow: 0 0 22px var(--c); transition: height .8s cubic-bezier(.34, 1.4, .5, 1), opacity .6s, filter .6s; }
.tube-wrap .lbl { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--c-label); }
.tube-wrap .pct { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--text-2); margin-top: -4px; font-variant-numeric: tabular-nums; }
.tube-wrap.danger .pct { color: var(--down); text-shadow: 0 0 8px var(--down); }
.tube-wrap[data-k="psyche"]     { --c: #b26bff; --c-light: #e2c2ff; --c-border: rgba(178,107,255,.55); --c-inner: rgba(178,107,255,.25); --c-label: #d9c2ff; }
.tube-wrap[data-k="energy"]     { --c: #c6f01a; --c-light: #f2ffb8; --c-border: rgba(212,255,58,.5);  --c-inner: rgba(212,255,58,.2);  --c-label: #ecffad; }
.tube-wrap[data-k="boss"]       { --c: #ff3b6b; --c-light: #ffc2d0; --c-border: rgba(255,90,130,.55); --c-inner: rgba(255,59,107,.22); --c-label: #ffc2d0; }
.tube-wrap[data-k="colleagues"] { --c: #2de2e6; --c-light: #c8feff; --c-border: rgba(45,226,230,.55); --c-inner: rgba(45,226,230,.22); --c-label: #c8feff; }

.g-center { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.card { width: 100%; max-width: 600px; flex: 1; min-height: 200px; padding: 22px 22px; border-radius: 28px; background: var(--glass);
  border: 1.5px solid var(--glow, rgba(255,255,255,.14)); box-shadow: 0 0 40px var(--glow-soft, rgba(120,100,255,.12)), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  display: flex; flex-direction: column; gap: 18px; overflow: auto; will-change: transform; transition: border-color .2s, box-shadow .2s; }
.card:active { cursor: grabbing; }
.card[data-hot="left"] { --glow: var(--magenta); --glow-soft: rgba(255,59,212,.45); }
.card[data-hot="right"] { --glow: var(--cyan); --glow-soft: rgba(45,226,230,.45); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.who { font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,59,212,.6); color: var(--magenta-l); box-shadow: 0 0 14px rgba(255,59,212,.35); }
.rnd-tag { font-family: var(--f-mono); font-size: 12px; color: var(--up); text-shadow: 0 0 8px var(--up); }
.card .text { font-size: clamp(19px, 5.2vw, 32px); line-height: 1.25; font-weight: 800; text-wrap: pretty; }
.answers { width: 100%; max-width: 660px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ans { background: transparent; border-radius: 18px; padding: 14px 14px; font-family: var(--f-body); font-weight: 800; font-size: 15px; line-height: 1.25; display: flex; gap: 10px; align-items: flex-start; min-height: 64px;
  transition: background .15s, box-shadow .15s, color .15s, transform .08s; }
.ans .ar { font-family: var(--f-mono); }
.ans.no { color: var(--magenta-xl); border: 2px solid var(--magenta); box-shadow: 0 0 18px rgba(255,59,212,.3); text-align: left; }
.ans.yes { color: var(--cyan-xl); border: 2px solid var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.3); text-align: right; justify-content: flex-end; }
.ans.no:hover, .ans.no.hot { background: rgba(255,59,212,.16); box-shadow: 0 0 30px rgba(255,59,212,.6); color: #fff; }
.ans.yes:hover, .ans.yes.hot { background: rgba(45,226,230,.14); box-shadow: 0 0 30px rgba(45,226,230,.6); color: #fff; }
.hint { text-align: center; font-family: var(--f-mono); font-size: 11.5px; color: var(--text-2); letter-spacing: .06em; }

/* десктоп: кадр как в макете */
@media (min-width: 1000px) and (min-height: 660px) {
  .app:has(#game:not([hidden])) { max-width: 1280px; }
  .game { position: relative; display: block; }
  .g-top { position: absolute; top: 22px; left: 48px; right: 48px; grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand clock day"; }
  .g-brand { font-size: 20px; }
  .g-day { font-size: 16px; display: block; }
  .g-day small { font-size: 13px; margin-top: 4px; }
  .g-day .icon-btn { position: absolute; right: 0; top: 64px; }
  .g-clock .time { font-size: 64px; }
  .segs { gap: 5px; } .segs i { width: 20px; }
  .g-stats { display: contents; }
  .tubes { position: absolute; top: 200px; bottom: 150px; gap: 28px; }
  .tubes.left { left: 56px; } .tubes.right { right: 56px; }
  .tube-wrap { width: 76px; gap: 12px; }
  .arrows { height: 22px; font-size: 16px; }
  .tube { flex: 1; width: 54px; height: auto; border-radius: 27px; }
  .tube .fill { left: 5px; right: 5px; bottom: 5px; border-radius: 22px; height: max(0px, calc(var(--v, 50) * 1% - 10px)); }
  .tube-wrap .lbl { font-size: 15px; }
  .g-center { position: absolute; left: 300px; right: 300px; top: 190px; bottom: 40px; gap: 34px; }
  .card { flex: none; width: 600px; max-width: 100%; min-height: 340px; padding: 38px 42px; gap: 22px; }
  .who { font-size: 14px; } .rnd-tag { font-size: 13px; }
  .card .text { font-size: 32px; }
  .answers { width: 660px; max-width: 100%; gap: 22px; }
  .ans { padding: 18px 20px; font-size: 18px; gap: 12px; }
  .hint { position: absolute; bottom: 0; left: 0; right: 0; }
}

/* ---------- заставка дня ---------- */
.splash { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 24px; cursor: pointer; background: rgba(7,7,13,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadein .2s; }
.splash-in { max-width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.splash small { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-l); text-shadow: 0 0 10px rgba(45,226,230,.8); animation: slidein .4s .05s both; }
.splash h2 { margin: 0; max-width: 100%; font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 9vw, 76px); line-height: 1; text-transform: uppercase; color: #fff;
  text-shadow: 0 0 24px rgba(255,59,212,.8), 0 0 60px rgba(255,59,212,.4); animation: neonon .7s .1s both; }
.splash p { margin: 0; max-width: 30ch; font-size: 18px; line-height: 1.45; color: var(--text-3); animation: slidein .4s .35s both; }
.splash .tap { font-family: var(--f-mono); font-size: 11px; color: var(--text-2); letter-spacing: .08em; animation: slidein .4s .55s both; }

/* ---------- финал ---------- */
.end { justify-content: flex-start; overflow-y: auto; }
.end-sheet { position: relative; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: center; }
.end-sheet > * { max-width: 100%; }
.end h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 8.4vw, 40px); overflow-wrap: anywhere; line-height: 1.05; margin: 0; color: #fff; text-shadow: 0 0 24px rgba(255,59,212,.8); text-wrap: balance; }
.end h1.lose { text-shadow: 0 0 24px rgba(255,59,107,.85); }
.end p { margin: 0; line-height: 1.5; color: var(--text-3); font-size: 16px; max-width: 46ch; }
.end .cause { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--down); text-shadow: 0 0 8px rgba(255,59,107,.6); }
.rank { display: inline-block; padding: 4px 14px; border-radius: 999px; border: 1.5px solid var(--up); color: var(--up); text-shadow: 0 0 8px rgba(212,255,58,.6); box-shadow: 0 0 14px rgba(212,255,58,.3); font-weight: 900; }
.final { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.final div { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 4px; }
.final b { display: block; font-family: var(--f-mono); font-weight: 700; font-size: 18px; color: var(--cyan-l); text-shadow: 0 0 10px rgba(45,226,230,.6); font-variant-numeric: tabular-nums; }
.final span { font-size: 11.5px; color: var(--text-2); font-weight: 800; }
.final div.zero { border-color: var(--down); box-shadow: 0 0 16px rgba(255,59,107,.4); } .final div.zero b { color: var(--down); text-shadow: 0 0 10px rgba(255,59,107,.7); }
.total { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1.5px dashed var(--line); padding-top: 14px; font-family: var(--f-mono); color: var(--text-2); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.total b { font-family: var(--f-mono); font-size: 24px; color: #fff; text-shadow: 0 0 12px rgba(255,59,212,.7); }
.place { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 1.5px solid rgba(45,226,230,.45); border-radius: 16px; color: var(--cyan-xl); font-weight: 800; text-align: left; }
.place b { font-family: var(--f-mono); font-size: 22px; color: var(--cyan-l); text-shadow: 0 0 10px rgba(45,226,230,.8); }
.stack { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- карьера ---------- */
.g-brand small { display: block; margin-top: 5px; font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--cyan-l); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.career-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.career-card .cc-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.career-card .cc-head b { font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 0 14px rgba(255,59,212,.7); }
.career-card .cc-head span { font-weight: 800; color: var(--cyan-xl); font-size: 13px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.career-card .cc-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.career-card .cc-bar i { display: block; height: 100%; background: var(--cyan-l); box-shadow: 0 0 10px var(--cyan); border-radius: 3px; }
.stat-box { border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 6px; text-align: center; }
.stat-box b { display: block; font-family: var(--f-mono); font-weight: 700; font-size: 18px; color: var(--cyan-l); text-shadow: 0 0 10px rgba(45,226,230,.6); }
.stat-box span { font-size: 11px; color: var(--text-2); font-weight: 800; }
.vacancies { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.vac { width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; background: transparent; border: 1.5px solid var(--line); color: var(--text); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.vac:hover, .vac:focus-visible { border-color: var(--cyan); box-shadow: 0 0 22px rgba(45,226,230,.35); background: rgba(45,226,230,.06); }
.vac b { font-weight: 900; font-size: 16px; }
.vac .lvl { font-family: var(--f-mono); font-size: 11px; color: var(--magenta-l); white-space: nowrap; align-self: center; }
.vac small { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
.vac .perk { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 11px; color: var(--up); text-shadow: 0 0 8px rgba(212,255,58,.4); }
.iv-q { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; border: 1.5px solid rgba(255,59,212,.45); box-shadow: 0 0 30px rgba(255,59,212,.18); }
.iv-q .text { font-size: clamp(19px, 5vw, 26px); font-weight: 800; line-height: 1.3; }
.iv-reply { min-height: 1.4em; font-family: var(--f-mono); font-size: 13px; color: var(--cyan-xl); text-shadow: 0 0 8px rgba(45,226,230,.5); }
.iv-dots { display: flex; gap: 5px; justify-content: center; }
.iv-dots i { width: 24px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); }
.iv-dots i.done { background: var(--cyan-l); box-shadow: 0 0 8px var(--cyan); } .iv-dots i.now { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.iv-answers { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.iv-answers .ans { width: 100%; text-align: left; justify-content: flex-start; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; min-height: 0; }
.iv-answers .ans:hover:not(:disabled) { border-color: var(--cyan); background: rgba(45,226,230,.1); box-shadow: 0 0 22px rgba(45,226,230,.4); color: #fff; }
.iv-answers .ans.picked { border-color: var(--magenta); background: rgba(255,59,212,.14); box-shadow: 0 0 22px rgba(255,59,212,.45); color: #fff; }
.iv-answers .ans:disabled:not(.picked) { opacity: .4; cursor: default; }
.companies { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.companies li { border: 1px solid rgba(255,59,212,.5); color: var(--magenta-l); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }

/* ---------- офис за окном ---------- */
.office { position: fixed; left: 0; right: 0; bottom: 0; height: min(46vh, 420px); z-index: -1; pointer-events: none; opacity: .42; }
.office svg { width: 100%; height: 100%; display: block; }
.office .sky { fill: #0c0c18; transition: fill 1.2s; }
.office .frame { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 3; }
.office .bld { fill: #12121f; }
.office .cw { fill: rgba(255,255,255,.05); transition: fill 1s; }
.office .floor { fill: #0b0b14; }
.office .top, .office .leg, .office .stand { fill: #1c1c2c; }
.office .mon { fill: #141424; stroke: rgba(255,255,255,.12); stroke-width: 2; transition: fill .8s, filter .8s; }
.office .person { fill: #1f1f33; opacity: 0; transition: opacity .8s; }
.office .lamp { fill: none; stroke: #3a3a55; stroke-width: 4; }
.office .lamp-glow { fill: rgba(255,214,120,.28); opacity: 0; transition: opacity 1s; filter: blur(6px); }
body[data-phase="morning"] .office .sky { fill: #2a1640; }
body[data-phase="morning"] .office .cw.lit { fill: rgba(255,139,230,.35); }
body[data-phase="day"] .office .sky { fill: #0e2a3a; }
body[data-phase="day"] .office .mon { fill: rgba(45,226,230,.35); filter: drop-shadow(0 0 8px rgba(45,226,230,.6)); }
body[data-phase="day"] .office .person { opacity: 1; }
body[data-phase="evening"] .office .cw.lit { fill: rgba(255,214,120,.6); }
body[data-phase="evening"] .office .last .lamp-glow { opacity: 1; }
body[data-phase="evening"] .office .last .person { opacity: 1; }
body[data-phase="evening"] .office .last .mon { fill: rgba(45,226,230,.25); filter: drop-shadow(0 0 6px rgba(45,226,230,.5)); }

/* ---------- предметы, реакции, метки карточек ---------- */
.inv { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 22px; }
.item { font-family: var(--f-mono); font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(212,255,58,.55); color: var(--up); text-shadow: 0 0 6px rgba(212,255,58,.5); }
.item.used { opacity: .35; text-decoration: line-through; text-shadow: none; }
.arrows .s { color: var(--up); text-shadow: 0 0 8px var(--up); }
.arrows .q { color: var(--text-2); font-family: var(--f-mono); }
.segs i.chain { box-shadow: inset 0 0 0 1.5px var(--up); }
.rnd-tag.chain { color: var(--cyan-l); text-shadow: 0 0 8px rgba(45,226,230,.7); }
.rnd-tag.prof { color: var(--magenta-l); text-shadow: 0 0 8px rgba(255,59,212,.6); }
.g-type { color: var(--up) !important; text-shadow: 0 0 8px rgba(212,255,58,.5); }
@media (max-width: 999px), (max-height: 659px) { .g-center { position: relative; } } /* на десктопе центр уже позиционирован */
.react { position: absolute; top: -16px; left: 50%; translate: -50% 0; z-index: 3; width: max-content; max-width: 92%; padding: 7px 14px; border-radius: 14px; border: 1.5px solid var(--rc, var(--cyan)); color: #fff; background: rgba(7,7,13,.85);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rc, #2de2e6) 45%, transparent); font-size: 13.5px; font-weight: 800; opacity: 0; pointer-events: none; text-align: center; }
.react b { color: var(--rc, var(--cyan)); margin-right: 4px; }
.react:empty { display: none; }
.react.on { animation: react 2.2s var(--ease) forwards; }
@keyframes react { 0% { opacity: 0; transform: translateY(8px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
.toast-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--up); background: rgba(7,7,13,.92); color: var(--up); font-weight: 800; font-size: 13px; box-shadow: 0 0 20px rgba(212,255,58,.35); transition: opacity .25s, transform .25s; text-align: center; }
.toast-bar.on { opacity: 1; transform: translate(-50%, 0); }
.splash-week { display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 36ch; padding: 12px 16px; border-radius: 16px; border: 1.5px solid rgba(212,255,58,.45); animation: slidein .4s .45s both; }
.splash-week b { font-family: var(--f-display); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--up); text-shadow: 0 0 10px rgba(212,255,58,.6); }
.splash-week span { color: var(--text-3); font-size: 14px; line-height: 1.45; }
.splash-week .splash-items { font-family: var(--f-mono); font-size: 12px; color: var(--cyan-xl); }
@media (min-width: 1000px) and (min-height: 660px) { .inv { margin-top: 4px; } .react { top: -50px; } }

/* ---------- меню: черты, кнопки режимов ---------- */
.cc-trait { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); text-align: center; letter-spacing: .04em; }
.btn-daily { border-color: var(--up); color: var(--up); box-shadow: 0 0 18px rgba(212,255,58,.25); }
.btn-daily:hover { background: rgba(212,255,58,.1); box-shadow: 0 0 28px rgba(212,255,58,.5); color: #fff; }
.btn-pack { border-color: var(--magenta); color: var(--magenta-xl); box-shadow: 0 0 18px rgba(255,59,212,.3); }
.tabs4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs4 .tab { font-size: 10.5px; padding: 9px 4px; }

/* ---------- концовки ---------- */
.unlocked { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.unlocked span { padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--up); color: var(--up); font-weight: 900; font-size: 13.5px; text-shadow: 0 0 8px rgba(212,255,58,.5); box-shadow: 0 0 16px rgba(212,255,58,.2); }
.trait-line { font-size: 14px !important; color: var(--magenta-xl) !important; font-style: italic; }
.collection { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; text-align: left; }
.ach { border: 1.5px dashed var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ach b { font-weight: 900; font-size: 13.5px; color: var(--text-2); }
.ach small { font-size: 11.5px; color: var(--text-2); opacity: .75; line-height: 1.35; }
.ach.on { border-style: solid; border-color: var(--up); box-shadow: 0 0 16px rgba(212,255,58,.2); }
.ach.on b { color: var(--up); text-shadow: 0 0 8px rgba(212,255,58,.5); }
.ach.on small { color: var(--text-3); opacity: 1; }

/* ---------- форма «Предложи ситуацию» ---------- */
.suggest { text-align: left; align-items: stretch; }
.suggest h1, .suggest .kicker { text-align: center; }
.suggest textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-size: 15px; resize: vertical; }
.suggest textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.sg-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 16px; }
.effs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eff { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-2); font-weight: 800; min-width: 0; }
.eff select { width: 100%; padding: 7px 4px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.18); background: #11111c; color: var(--text); font: inherit; font-size: 14px; }

/* ---------- аккаунт, офис, чат ---------- */
.field-note { color: var(--text-2); font-size: 12px; line-height: 1.4; font-weight: 700; }
.field input[type=email] { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); font-size: 16px; font-weight: 800; }
.field input[type=email]:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.id-chip { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(45,226,230,.55); background: transparent; color: var(--cyan-l); font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; }
.id-chip:hover { box-shadow: 0 0 12px rgba(45,226,230,.45); }
.invites { display: flex; flex-direction: column; gap: 8px; }
.invite { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--up); box-shadow: 0 0 18px rgba(212,255,58,.2); }
.invite span { font-size: 13px; font-weight: 800; min-width: 0; }
.invite b { color: var(--up); }
.office-code { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; border: 1.5px solid rgba(255,59,212,.5); box-shadow: 0 0 22px rgba(255,59,212,.2); }
.office-code b { font-family: var(--f-mono); font-size: 30px; letter-spacing: .2em; color: #fff; text-shadow: 0 0 14px rgba(255,59,212,.8); }
.office-code small { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.inline-form { width: 100%; display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-size: 15px; font-weight: 800; }
.inline-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.inline-form .btn-main, .inline-form .btn-ghost { width: auto; flex: none; padding: 12px 16px; font-size: 13px; }
.members { width: 100%; text-align: left; }
.chat { width: 100%; max-width: 640px; margin: 0 auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-list { flex: 1; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 22px; }
.msg { max-width: 86%; align-self: flex-start; display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; }
.msg .ava-s { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid rgba(255,59,212,.5); display: grid; place-items: center; font-size: 17px; }
.msg .meta { font-size: 11.5px; color: var(--text-2); font-weight: 800; }
.msg .meta b { color: var(--magenta-l); }
.msg .bubble { padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; grid-template-columns: 1fr; }
.msg.mine .ava-s { display: none; }
.msg.mine .meta { text-align: right; }
.msg.mine .bubble { border-radius: 16px 4px 16px 16px; background: rgba(45,226,230,.12); border-color: rgba(45,226,230,.45); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; padding: 13px 14px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; }
.chat-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.chat-form .btn-main { width: auto; padding: 12px 18px; }
.end.chat-view { justify-content: flex-start; overflow: hidden; }

/* ---------- приветствие и замки ---------- */
.welcome-lead { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-3); font-weight: 700; text-align: center; }
.perks { margin: 0; padding: 12px 14px; list-style: none; display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--line); border-radius: 16px; }
.perks li { position: relative; padding-left: 20px; font-size: 13.5px; font-weight: 800; color: var(--text); }
.perks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.btn-link { background: none; border: 0; color: var(--cyan-l); font-weight: 800; font-size: 14px; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: #fff; }
.me-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.btn-reg { border-color: var(--up); color: var(--up); box-shadow: 0 0 12px rgba(212,255,58,.35); }
.btn-ghost.locked { opacity: .55; border-style: dashed; box-shadow: none; }
.btn-ghost.locked::after { content: "после регистрации"; display: block; margin-top: 2px; font-family: var(--f-mono); font-weight: 500; font-size: 10px; letter-spacing: .02em; opacity: .85; }

/* ---------- второй шанс: вопрос на эрудицию ---------- */
.quiz { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; overflow-y: auto; background: rgba(7,7,13,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadein .25s;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.quiz-box { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; border-radius: 26px; border: 1.5px solid var(--up); background: #0d0d17;
  box-shadow: 0 0 40px rgba(212,255,58,.25), inset 0 1px 0 rgba(255,255,255,.06); }
.quiz-box .kicker { color: var(--down); text-shadow: 0 0 8px rgba(255,59,107,.6); text-align: center; }
.quiz-box h2 { margin: 0; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: clamp(22px, 6vw, 30px); color: #fff; text-shadow: 0 0 18px rgba(212,255,58,.6); }
.quiz-box .q-lead { margin: 0; text-align: center; color: var(--text-3); font-size: 14px; }
.quiz-box .q-topic { align-self: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-l); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(45,226,230,.5); }
.quiz-box .q-text { font-size: clamp(18px, 4.8vw, 23px); font-weight: 900; line-height: 1.3; text-align: center; }
.q-timer { height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.q-timer i { display: block; height: 100%; width: 100%; background: var(--up); box-shadow: 0 0 10px var(--up); transform-origin: left; }
.q-timer i.run { animation: qtimer var(--qt, 20s) linear forwards; }
@keyframes qtimer { to { transform: scaleX(0); background: var(--down); } }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-opt { min-height: 56px; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font-weight: 800; font-size: 15px; line-height: 1.25; text-align: left; display: flex; gap: 8px; align-items: center; transition: border-color .15s, background .15s, box-shadow .15s; }
.q-opt .n { font-family: var(--f-mono); color: var(--text-2); font-size: 12px; }
.q-opt:hover:not(:disabled) { border-color: var(--cyan); background: rgba(45,226,230,.1); box-shadow: 0 0 20px rgba(45,226,230,.35); }
.q-opt.right { border-color: var(--up); background: rgba(212,255,58,.14); box-shadow: 0 0 22px rgba(212,255,58,.45); color: #fff; }
.q-opt.wrong { border-color: var(--down); background: rgba(255,59,107,.14); box-shadow: 0 0 22px rgba(255,59,107,.45); }
.q-opt:disabled { cursor: default; }
.q-result { text-align: center; font-weight: 900; font-size: 17px; }
.q-result.ok { color: var(--up); text-shadow: 0 0 10px rgba(212,255,58,.6); } .q-result.bad { color: var(--down); text-shadow: 0 0 10px rgba(255,59,107,.6); }
.q-fact { margin: 0; text-align: center; color: var(--text-3); font-size: 14px; line-height: 1.45; }
@media (max-width: 420px) { .q-opts { grid-template-columns: 1fr; } }
.office-cta { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; border: 1.5px solid rgba(255,59,212,.55); box-shadow: 0 0 20px rgba(255,59,212,.2); }
.office-cta span { font-size: 13px; color: var(--text-3); font-weight: 700; line-height: 1.35; }
.office-cta b { display: block; color: #fff; font-size: 15px; }
.office-cta .btn-main { width: auto; padding: 11px 14px; font-size: 13px; }
.lb-row .btn-chip { align-self: center; }

/* ---------- приглашения в игру ---------- */
.btn-invite { border-color: var(--magenta); color: var(--magenta-xl); box-shadow: 0 0 18px rgba(255,59,212,.3); }
.btn-invite:hover { background: rgba(255,59,212,.14); box-shadow: 0 0 28px rgba(255,59,212,.55); color: #fff; }
.viral-pop { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 35; width: min(460px, calc(100% - 24px)); translate: -50% 0;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 20px; border: 1.5px solid var(--magenta); background: rgba(12,10,22,.96);
  box-shadow: 0 0 34px rgba(255,59,212,.4); animation: popup-in .45s var(--ease) both; }
.viral-pop b { font-family: var(--f-display); font-weight: 800; font-size: 15px; color: #fff; text-shadow: 0 0 12px rgba(255,59,212,.7); padding-right: 28px; }
.viral-pop span { font-size: 13px; color: var(--text-3); font-weight: 700; line-height: 1.4; }
.viral-pop .btn-main, .viral-pop .btn-ghost { padding: 11px 10px; font-size: 12.5px; }
.viral-x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 18px; line-height: 1; }
@keyframes popup-in { from { transform: translateY(40px); opacity: 0; } }
.viral { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; border: 1.5px dashed rgba(255,59,212,.6); }
.viral b { font-weight: 900; color: #fff; font-size: 14.5px; }
.viral .btn-main, .viral .btn-ghost { padding: 12px 10px; font-size: 12.5px; }
.share-box { text-align: center; }
.share-box h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 0 16px rgba(255,59,212,.7); }
.share-text { margin: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); text-align: left; font-size: 13.5px; line-height: 1.45; color: var(--text-3); overflow-wrap: anywhere; user-select: text; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-grid a, .share-grid button { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font-weight: 900; font-size: 14px; text-decoration: none; }
.share-grid a:hover, .share-grid button:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.4); color: #fff; }
.share-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; border: 1.5px solid var(--line); }
.share-count { font-family: var(--f-mono); font-size: 12px; color: var(--up); text-shadow: 0 0 8px rgba(212,255,58,.5); }

/* ---------- счёт, отпуск, магазин мощей ---------- */
.inv-items { display: contents; }
.bank-chip { font-family: var(--f-mono); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--cyan); background: rgba(45,226,230,.08); color: var(--cyan-l); text-shadow: 0 0 6px rgba(45,226,230,.6); }
.bank-chip:hover { box-shadow: 0 0 14px rgba(45,226,230,.5); color: #fff; }
.money { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.money div { border: 1.5px solid rgba(45,226,230,.4); border-radius: 14px; padding: 9px 6px; text-align: center; }
.money b { display: block; font-family: var(--f-mono); font-size: 17px; color: var(--cyan-l); text-shadow: 0 0 10px rgba(45,226,230,.6); }
.money span { font-size: 11px; color: var(--text-2); font-weight: 800; }
.btn-vac { border-color: var(--up); color: var(--up); box-shadow: 0 0 18px rgba(212,255,58,.3); }
.btn-vac:hover { background: rgba(212,255,58,.1); color: #fff; }
.shop-box { gap: 12px; }
.shop-box h2 { margin: 0; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 0 16px rgba(45,226,230,.7); }
.shop-bal { text-align: center; font-family: var(--f-mono); color: var(--cyan-l); font-size: 14px; }
.shop-sec { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-item { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: transparent; color: var(--text); min-width: 0; }
.shop-item b { font-weight: 900; font-size: 14px; }
.shop-item small { font-size: 11.5px; color: var(--text-2); font-weight: 700; line-height: 1.3; }
.shop-item .price { font-family: var(--f-mono); font-size: 12px; color: var(--up); text-shadow: 0 0 6px rgba(212,255,58,.5); }
.shop-item:hover:not(:disabled) { border-color: var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.35); }
.shop-item:disabled { opacity: .4; cursor: default; }

/* ---------- турнир и экран итогов ---------- */
.tour-box { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; border: 1.5px solid rgba(212,255,58,.5); box-shadow: 0 0 22px rgba(212,255,58,.15); text-align: left; }
.tour-when { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-when b { color: var(--up); text-shadow: 0 0 10px rgba(212,255,58,.5); font-size: 16px; }
.tour-when span { color: var(--text-2); font-size: 13px; }
.tour-box input[type=datetime-local] { color-scheme: dark; }
.react.long.on { animation-duration: 5.5s; }
.end.screen-view { max-width: none; justify-content: flex-start; }
.app:has(.end.screen-view:not([hidden])) { max-width: 1280px; }
.screen { width: 100%; display: flex; flex-direction: column; gap: 18px; padding: 8px 0 20px; }
.scr-head { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.scr-head h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 6vw, 64px); color: #fff; text-shadow: 0 0 30px rgba(255,59,212,.8); }
.scr-when { margin: 0 auto !important; max-width: none !important; font-family: var(--f-mono); color: var(--cyan-l); font-size: clamp(14px, 2vw, 20px); }
.scr-list { display: flex; flex-direction: column; gap: 10px; }
.scr-row { display: grid; grid-template-columns: 56px 52px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-radius: 20px; border: 1.5px solid var(--line); background: rgba(255,255,255,.03); }
.scr-row.top { border-color: var(--up); box-shadow: 0 0 24px rgba(212,255,58,.25); }
.scr-pos { font-family: var(--f-mono); font-weight: 700; font-size: clamp(20px, 3vw, 34px); color: var(--up); text-align: center; }
.scr-ava { font-size: clamp(26px, 3vw, 38px); text-align: center; }
.scr-name { min-width: 0; display: flex; flex-direction: column; }
.scr-name b { font-size: clamp(17px, 2.6vw, 30px); font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-name small { color: var(--text-2); font-size: clamp(12px, 1.4vw, 16px); }
.scr-res { font-family: var(--f-mono); font-weight: 700; font-size: clamp(15px, 2.4vw, 28px); white-space: nowrap; }
.scr-res.won { color: var(--cyan-l); text-shadow: 0 0 12px rgba(45,226,230,.7); } .scr-res.lost { color: var(--down); }
.scr-empty { text-align: center; color: var(--text-2); font-size: 20px; }
.scr-exit { align-self: center; width: auto; padding: 10px 22px; }
@media (max-width: 600px) { .scr-row { grid-template-columns: 34px 34px 1fr; } .scr-res { grid-column: 2 / -1; } }

.streak-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: -4px; }
.streak-row span { font-family: var(--f-mono); font-size: 11.5px; color: var(--up); text-shadow: 0 0 8px rgba(212,255,58,.4); min-width: 0; }
.money.expense div { border-color: rgba(255,59,107,.35); } .money.expense b { color: var(--magenta-xl); text-shadow: 0 0 8px rgba(255,59,212,.4); }
.debt { color: var(--down) !important; font-weight: 800; font-size: 14px !important; }

.msg-act { grid-column: 2; display: flex; gap: 10px; }
.msg.mine .msg-act { grid-column: 1; justify-content: flex-end; }
.msg-act button { background: none; border: 0; padding: 0; color: var(--text-2); font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; opacity: .7; }
.msg-act button:hover { opacity: 1; color: var(--text); }
.stats h2 { margin: 6px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--cyan-l); text-transform: uppercase; letter-spacing: .06em; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stats-grid .stat-box b { font-size: 22px; }

/* ---------- рейтинг и участники ---------- */
.board { overflow: hidden; }
.board-head { display: flex; align-items: center; gap: 10px; }
.board-head h2 { flex: 1; margin: 0; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(255,59,212,.8); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; border: 1.5px solid var(--line); }
.tab { border: 0; border-radius: 999px; padding: 9px; background: transparent; color: var(--text-2); font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.tab[aria-selected="true"] { background: rgba(255,59,212,.16); color: #fff; box-shadow: inset 0 0 0 1.5px var(--magenta), 0 0 18px rgba(255,59,212,.4); }
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 11.5px; color: var(--text-2); }
.chk { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--text); font-family: var(--f-body); font-weight: 800; font-size: 12.5px; }
.chk input { width: 15px; height: 15px; accent-color: var(--cyan); margin: 0; }
.board-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; border-radius: 22px; }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 14px; }
.lb-row + .lb-row { border-top: 1px solid rgba(255,255,255,.07); }
.lb-row.me { background: rgba(45,226,230,.08); box-shadow: inset 0 0 0 1.5px rgba(45,226,230,.6); border-top-color: transparent; }
.lb-pos { font-family: var(--f-mono); font-weight: 700; font-size: 15px; text-align: center; color: var(--text-2); }
.lb-pos.medal { font-size: 18px; color: var(--up); text-shadow: 0 0 10px rgba(212,255,58,.7); }
.lb-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-who b { font-weight: 900; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-who small { color: var(--text-2); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-meta { color: var(--text-3) !important; white-space: normal !important; font-family: var(--f-mono); font-size: 11px !important; font-weight: 500 !important; }
.lb-res { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.lb-res b { font-family: var(--f-mono); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-res small { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.lb-res.won b { color: var(--cyan-l); text-shadow: 0 0 8px rgba(45,226,230,.7); } .lb-res.lost b { color: var(--down); text-shadow: 0 0 8px rgba(255,59,107,.6); }
.lb-ava { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid rgba(255,59,212,.5); display: grid; place-items: center; font-size: 19px; }
.lb-row.person { align-items: start; } .lb-row.person .lb-ava { margin-top: 2px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-weight: 500; font-size: 11px; white-space: nowrap; color: var(--text-2); }
.st i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); }
.st.on { color: var(--cyan-xl); } .st.on i { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.st.play { color: var(--magenta-xl); } .st.play i { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); animation: flicker 1.2s ease-in-out infinite; }
.lb-empty { padding: 30px 16px; text-align: center; font-weight: 700; color: var(--text-2); line-height: 1.5; }
.lb-empty .big { display: block; font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-l); margin-bottom: 8px; }
.board-note { margin: 0; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--text-2); }

/* мем-карточка */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(7,7,13,.8); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal-box { padding: 14px; max-width: 400px; width: 100%; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #12121d; }
.modal-box img { width: 100%; border-radius: 14px; display: block; }
.modal-box p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.toast { font-size: 13px; font-weight: 800; color: var(--cyan-l); min-height: 1.2em; text-align: center; overflow-wrap: anywhere; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

@keyframes flicker { 50% { opacity: .55; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes slidein { from { transform: translateY(14px); opacity: 0; } }
@keyframes neonon { 0% { opacity: 0; } 20% { opacity: .9; } 28% { opacity: .2; } 40% { opacity: 1; } 52% { opacity: .5; } 64%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-height: 700px) and (max-width: 999px) { .g-clock .time { font-size: 34px; } .tube { height: 60px; } .card .text { font-size: 18px; } .hint { display: none; } .menu .logo { display: none; } }
@media (max-width: 370px) { .segs i { width: 12px; } .tube-wrap { width: 58px; } }

/* ---------- маленькие телефоны (iPhone SE и т. п.) ---------- */
@media (max-width: 999px) and (max-height: 620px) {
  body { padding-block: 8px; }
  .game { gap: 8px; }
  .g-top { gap: 4px 10px; }
  .g-brand { font-size: 12px; } .g-brand small { font-size: 10px; margin-top: 2px; }
  .g-day { font-size: 11px; } .g-day small { font-size: 10px; } .g-day .icon-btn { width: 32px; height: 32px; }
  .g-clock { gap: 6px; } .g-clock .time { font-size: 28px; }
  .segs i { height: 5px; width: 13px; }
  .inv { min-height: 0; } .item, .bank-chip { font-size: 10px; padding: 2px 7px; }
  .tube-wrap { gap: 3px; } .tube { height: 46px; width: 34px; } .arrows { height: 14px; font-size: 11px; }
  .tube-wrap .lbl { font-size: 11px; } .tube-wrap .pct { font-size: 10px; }
  .card { padding: 14px; gap: 10px; min-height: 140px; border-radius: 22px; } .who { font-size: 10.5px; padding: 5px 10px; }
  .card .text { font-size: 16px; line-height: 1.3; }
  .answers { gap: 8px; } .ans { min-height: 50px; padding: 10px; font-size: 13.5px; }
  .hint { display: none; }
}
/* ---------- телефон горизонтально: две колонки ---------- */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 999px) {
  .app:has(#game:not([hidden])) { max-width: 900px; }
  .game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); grid-template-rows: auto 1fr; gap: 8px 18px; }
  .g-top { grid-column: 1; grid-row: 1; }
  .g-stats { grid-column: 1; grid-row: 2; align-self: start; justify-content: space-around; }
  .g-center { grid-column: 2; grid-row: 1 / span 2; min-height: 0; }
  .g-clock .time { font-size: 30px; }
  .tube { height: 70px; }
  .card { min-height: 0; padding: 14px 16px; } .card .text { font-size: 16px; }
  .ans { min-height: 48px; padding: 9px 10px; font-size: 13px; }
  .hint { display: none; }
  .menu, .end, .join { justify-content: flex-start; }
  .g-top { grid-template-columns: minmax(0, 1fr) auto; min-width: 0; }
  .g-brand { font-size: 12px; min-width: 0; }
  .g-day { font-size: 11px; min-width: 0; } .g-day .icon-btn { display: none; }
  .g-day > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* очень узкие экраны: звук переключается в меню */
@media (max-width: 360px) { .g-day .icon-btn { display: none; } .g-top { grid-template-columns: minmax(0, 1fr) auto; } .g-brand { min-width: 0; } }


/* ---------- меню: две главные кнопки и вкладки ---------- */
.play2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.play2 .btn-main { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 10px; font-size: 19px; line-height: 1.1; }
.play2 .btn-main small { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .02em; opacity: .8; }
.btn-day { background: var(--up); box-shadow: 0 0 30px rgba(212,255,58,.55); }
.btn-day:hover { background: #e4ff7a; }
.menu-tabs { margin-top: 4px; }
.pane { display: flex; flex-direction: column; gap: 10px; }
.pane[hidden] { display: none; }
/* ---------- подписи опасных зон на шкалах ---------- */
.tube-wrap .zone { min-height: 1.2em; margin-top: -6px; font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--down); text-shadow: 0 0 8px var(--down); }
.tube-wrap.hot .zone { color: #ffb03b; text-shadow: 0 0 8px #ff8a3b; }
/* ---------- заставка дня 2–5: баннер, не мешает играть ---------- */
.splash.mini { inset: calc(10px + env(safe-area-inset-top, 0px)) 16px auto 16px; max-width: 560px; margin: 0 auto; padding: 10px 16px; border-radius: 18px; border: 1.5px solid rgba(45,226,230,.5); background: rgba(7,7,13,.94); pointer-events: none; }
.splash.mini .splash-in { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.splash.mini h2 { font-size: 20px; }
.splash.mini p { font-size: 13px; max-width: none; }
.splash.mini small { font-size: 10.5px; flex-basis: 100%; }
.splash.mini .tap:empty { display: none; }
/* ---------- подсказки первой недели ---------- */
.coach { position: relative; display: flex; gap: 6px; align-items: flex-start; max-width: 520px; width: 100%; margin: 0 auto 8px; padding: 9px 34px 9px 12px; border-radius: 14px; border: 1.5px dashed var(--cyan); background: rgba(45,226,230,.08); color: var(--text-3); font-size: 13px; line-height: 1.4; }
.coach[hidden] { display: none; }
.coach b { color: var(--cyan-l); flex: none; }
.coach button { position: absolute; top: 4px; right: 6px; border: 0; background: transparent; color: var(--text-2); font-size: 18px; line-height: 1; padding: 2px 6px; }
@media (prefers-reduced-motion: reduce) {
  .react.on, .react.long.on { animation: none; opacity: 1; }
  .tube-wrap.danger .tube { animation: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.coach:not([hidden]) + .hint { display: none; }
.coach { margin: 0 auto; }
/* ---------- вызов коллеге ---------- */
.ch-cta { border-color: rgba(212,255,58,.6); box-shadow: 0 0 22px rgba(212,255,58,.22); }
.ch-cta b { color: var(--up); }
.ch-cta .btn-main { background: var(--up); box-shadow: 0 0 22px rgba(212,255,58,.5); }
.place.challenge { flex-direction: column; align-items: flex-start; gap: 4px; border-color: rgba(212,255,58,.55); color: var(--text-3); font-size: 13px; }
.place.challenge b { font-family: var(--f-display); font-size: 16px; color: var(--up); text-shadow: 0 0 10px rgba(212,255,58,.6); }
.btn-share { border-color: var(--up); color: var(--up); }
.modal-box .share-text { max-height: 7.5em; overflow: auto; }

/* Центрирование по вертикали без обрезки: при justify-content: center высокое содержимое уходит за верхний край
   прокручиваемого блока и до него не докрутить. Поля auto центрируют, только пока есть свободное место */
.menu > :first-child, .join > :first-child, .end > :first-child { margin-top: auto; }
.menu > :last-child, .join > :last-child, .end > :last-child { margin-bottom: auto; }

/* ====================== Анимации (js/fx.js) ====================== */
/* 2. Живая жидкость: волна по поверхности, уровень перетекает с небольшим отскоком (transition у .fill) */
.tube-wrap { position: relative; }
.tube .fill::before { content: ''; position: absolute; left: -20px; right: -20px; top: -3px; height: 7px; opacity: .55;
  background: radial-gradient(ellipse 10px 6px at 10px 7px, var(--c-light) 98%, transparent) repeat-x; background-size: 20px 7px; animation: wave 2.6s linear infinite; }
@keyframes wave { to { transform: translateX(20px); } }
/* 3. Перегрев кипит: пузырьки и пар; у нуля жидкость тускнеет и дрожит */
.tube .bub { position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.85); opacity: 0; pointer-events: none; }
.tube .bub:nth-of-type(1) { left: 30%; } .tube .bub:nth-of-type(2) { left: 55%; width: 4px; height: 4px; } .tube .bub:nth-of-type(3) { left: 42%; width: 6px; height: 6px; }
.tube-wrap.hot .bub { animation: rise 1.3s ease-in infinite; }
.tube-wrap.hot .bub:nth-of-type(2) { animation-delay: .45s; } .tube-wrap.hot .bub:nth-of-type(3) { animation-delay: .9s; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-70px); opacity: 0; } }
.steam { position: absolute; top: 6px; left: 50%; width: 0; height: 0; pointer-events: none; }
.steam i { position: absolute; left: -8px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(rgba(255,255,255,.55), transparent 70%); opacity: 0; }
.tube-wrap.hot .steam i { animation: steam 1.8s ease-out infinite; }
.tube-wrap.hot .steam i:nth-child(2) { animation-delay: .6s; left: -2px; } .tube-wrap.hot .steam i:nth-child(3) { animation-delay: 1.2s; left: -14px; }
@keyframes steam { 0% { transform: translateY(10px) scale(.5); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-26px) scale(1.6); opacity: 0; } }
.tube-wrap.hot .tube { box-shadow: inset 0 0 18px var(--c-inner), 0 0 18px rgba(255,138,59,.55); }
.tube-wrap.low .fill { opacity: .55; filter: saturate(.4); }
.tube-wrap.low .tube { animation: shiver 2.4s ease-in-out infinite; }
@keyframes shiver { 0%, 86%, 100% { transform: none; } 88% { transform: translateX(-1.5px); } 92% { transform: translateX(1.5px); } 96% { transform: translateX(-1px); } }
/* 1. Числа из трубок */
.fnum { position: absolute; left: 50%; top: 40%; z-index: 4; font-family: var(--f-mono); font-weight: 700; font-size: 16px; pointer-events: none; white-space: nowrap;
  animation: fnum 1.25s cubic-bezier(.2,.7,.2,1) forwards; }
.fnum.up { color: var(--up); text-shadow: 0 0 10px var(--up); } .fnum.down { color: var(--down); text-shadow: 0 0 10px var(--down); }
.fnum.big { font-size: 22px; }
@keyframes fnum { 0% { transform: translate(-50%, 6px) scale(.5); opacity: 0; } 18% { transform: translate(-50%, -6px) scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -48px) scale(1); opacity: 0; } }
/* 4. Сильный удар: трубка вздрагивает и вспыхивает */
.tube-wrap.hit .tube { animation: hit .55s ease-out; }
@keyframes hit { 0% { box-shadow: 0 0 34px #fff; } 15% { transform: translateX(-4px) rotate(-3deg); } 35% { transform: translateX(4px) rotate(3deg); } 55% { transform: translateX(-2px); } 75% { transform: translateX(2px); } 100% { transform: none; } }
/* 8. Щит предмета */
.fly-chip { position: fixed; z-index: 60; pointer-events: none; font-family: var(--f-mono); font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--up); color: var(--up); background: rgba(7,7,13,.9); box-shadow: 0 0 14px rgba(212,255,58,.6); }
.shield-ring { position: absolute; left: 50%; top: 52px; z-index: 4; font-size: 26px; color: #fff; text-shadow: 0 0 14px var(--up), 0 0 30px var(--up); pointer-events: none; animation: ring .9s ease-out forwards; }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; } }
.tube-wrap.shielded .tube { box-shadow: 0 0 0 3px rgba(212,255,58,.9), 0 0 26px var(--up); transition: box-shadow .2s; }
/* 9. Монетка зарплаты */
.fly-coin { position: fixed; z-index: 60; pointer-events: none; min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd23a 55%, #c99400); color: #3a2a00; font-family: var(--f-mono); font-weight: 700; font-size: 12px; box-shadow: 0 0 18px rgba(255,210,58,.8); }
.bank-chip.paid { animation: paid .6s ease-out; }
@keyframes paid { 30% { transform: scale(1.18); box-shadow: 0 0 22px rgba(255,210,58,.9); border-color: #ffd23a; color: #fff; } }
/* 5. Штамп ответа на карточке */
.card { position: relative; }
.stamp { position: absolute; top: 58px; max-width: 72%; padding: 6px 12px; border: 3px solid currentColor; border-radius: 10px; font-family: var(--f-display); font-weight: 800; font-size: 17px;
  text-transform: uppercase; line-height: 1.15; letter-spacing: .03em; opacity: 0; pointer-events: none; background: rgba(7,7,13,.88); transition: opacity .12s; z-index: 2; }
.stamp[data-side="right"] { left: 18px; color: var(--cyan-l); transform: rotate(-11deg); text-shadow: 0 0 12px var(--cyan); box-shadow: 0 0 18px rgba(45,226,230,.45); }
.stamp[data-side="left"] { right: 18px; color: #ff8be6; transform: rotate(11deg); text-shadow: 0 0 12px var(--magenta); box-shadow: 0 0 18px rgba(255,59,212,.45); }
/* 6. Карточка «дышит», новый день — лист календаря */
.card.idle { animation: breathe 4.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -4px; rotate: .5deg; } }
.card.page { transform-origin: 50% 0; animation: page .62s cubic-bezier(.2,.8,.2,1); }
@keyframes page { 0% { transform: perspective(900px) rotateX(-88deg); opacity: .2; } 70% { transform: perspective(900px) rotateX(8deg); opacity: 1; } 100% { transform: none; } }
/* 7. Случайное событие — помехи, последствие — перемотка */
.card.glitch { animation: glitch .7s steps(1, end); }
@keyframes glitch {
  0% { opacity: 0; } 10% { opacity: 1; transform: translate(-6px, 2px); clip-path: inset(10% 0 55% 0); filter: hue-rotate(80deg); }
  20% { transform: translate(5px, -2px); clip-path: inset(50% 0 10% 0); text-shadow: 3px 0 var(--cyan), -3px 0 var(--magenta); }
  30% { transform: translate(-3px, 0); clip-path: inset(0 0 70% 0); filter: none; } 40% { transform: none; clip-path: none; }
  55% { transform: translate(3px, 1px); filter: hue-rotate(-60deg); text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta); } 70%, 100% { transform: none; filter: none; text-shadow: none; } }
.card.rewind { animation: rewind .7s cubic-bezier(.2,.8,.2,1); }
@keyframes rewind { 0% { transform: translateX(-70%) skewX(20deg); filter: blur(6px); opacity: 0; } 55% { transform: translateX(6%) skewX(-6deg); filter: blur(0); opacity: 1; } 100% { transform: none; } }
/* 11. Часы-табло */
#clock .dg { display: inline-block; }
#clock .dg.flip { animation: flipdg .38s cubic-bezier(.2,.8,.2,1); }
@keyframes flipdg { 0% { transform: perspective(200px) rotateX(-90deg); opacity: .2; } 100% { transform: none; opacity: 1; } }
/* 12. Финалы */
.tube-wrap.burst .tube { animation: burst .9s ease-out; }
@keyframes burst { 0% { box-shadow: 0 0 50px #fff; } 10%, 30%, 50% { transform: translateX(-5px) rotate(-4deg) scale(1.06); } 20%, 40%, 60% { transform: translateX(5px) rotate(4deg) scale(1.06); } 100% { transform: none; } }
.tube-wrap.burst .fill { background: linear-gradient(#fff, #ff8a3b); }
.puff { position: absolute; left: 50%; top: 40px; width: 30px; height: 30px; margin: -15px; border-radius: 50%; z-index: 5; pointer-events: none;
  background: radial-gradient(rgba(255,240,230,.9), rgba(255,140,90,.4) 50%, transparent 72%); animation: puff 1.1s ease-out forwards;
  --a: calc(var(--i) * 60deg - 150deg); }
@keyframes puff { 0% { transform: rotate(var(--a)) translateY(0) scale(.4); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-70px) scale(2.2); opacity: 0; } }
.tube-wrap.drain .tube { animation: drain 1.2s steps(6, end); }
@keyframes drain { 0%, 33%, 66% { opacity: 1; } 16%, 50%, 83% { opacity: .25; } 100% { opacity: .45; } }
.fx-screen { position: fixed; inset: 0; z-index: 30; pointer-events: none; animation: fxscreen 1.25s ease-out forwards; }
.fx-screen.heat { background: radial-gradient(circle at 50% 40%, rgba(255,90,40,.15), rgba(255,40,60,.5)); }
.fx-screen.dim { background: rgba(0,0,0,.65); }
@keyframes fxscreen { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.fx-doors { position: fixed; inset: 0; z-index: 35; pointer-events: none; display: block; animation: fadein .3s; }
.fx-doors i { position: absolute; top: 0; bottom: 0; width: 50.5%; background: linear-gradient(90deg, #0b0b16, #161628); animation: doorl 1.5s cubic-bezier(.7,0,.2,1) .35s forwards; }
.fx-doors i:first-child { left: 0; border-right: 3px solid var(--magenta); box-shadow: 0 0 30px var(--magenta); }
.fx-doors i:nth-child(2) { right: 0; border-left: 3px solid var(--magenta); box-shadow: 0 0 30px var(--magenta); animation-name: doorr; }
.fx-doors b { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-family: var(--f-mono); font-size: clamp(48px, 14vw, 120px); color: var(--cyan-l);
  text-shadow: 0 0 20px var(--cyan), 0 0 60px var(--cyan); animation: doortime 1.4s ease-out forwards; }
@keyframes doorl { to { transform: translateX(-102%); } }
@keyframes doorr { to { transform: translateX(102%); } }
@keyframes doortime { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
/* 10. Офис: окна загораются по одному, кто-то ходит с кружкой, у кулера пузырьки; в пятницу в 18:00 свет гаснет */
.office .cw { transition: fill 1s var(--d, 0s); }
.office .walker { fill: #1f1f33; opacity: 0; transition: opacity 1s; animation: walk 28s linear infinite; }
.office .walker .mug { fill: #2a2a44; }
body[data-phase="day"] .office .walker, body[data-phase="morning"] .office .walker { opacity: 1; }
@keyframes walk { 0% { transform: translateX(-60px); } 100% { transform: translateX(1260px); } }
.office .cooler .bottle { fill: rgba(45,226,230,.16); stroke: rgba(45,226,230,.4); stroke-width: 2; }
.office .cooler .body { fill: #1c1c2c; } .office .cooler .tap { fill: #2d2d48; }
.office .cooler .cb { fill: rgba(200,254,255,.8); animation: cbub 3.2s ease-in infinite; }
.office .cooler .cb:nth-of-type(2) { animation-delay: 1.1s; } .office .cooler .cb:nth-of-type(3) { animation-delay: 2.2s; }
@keyframes cbub { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-38px); opacity: 0; } }
body[data-phase="night"] .office .sky { fill: #05050b; }
body[data-phase="night"] .office .cw.lit { fill: rgba(255,255,255,.04); }
body[data-phase="night"] .office .person, body[data-phase="night"] .office .lamp-glow { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .fnum, .shield-ring, .puff, .fx-screen, .fx-doors, .fly-chip, .fly-coin, .tube .bub, .steam { display: none !important; }
  .card.idle, .office .walker, .office .cooler .cb, .tube .fill::before { animation: none !important; }
}

/* ====================== Люди: портреты, коллеги, живые игроки (js/faces.js) ====================== */
.face { flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 0 18px rgba(120,100,255,.25); background: #141428; }
.face svg { width: 100%; height: 100%; display: block; }
.face .brow, .face .ln { fill: none; stroke: #1b1424; stroke-width: 2.4; stroke-linecap: round; }
.face .fl { fill: #3a1424; }
.face .eyes { fill: #1b1424; transform-origin: 32px 31px; animation: blink 5.5s infinite; }
.face .glasses { fill: rgba(255,255,255,.12); stroke: #1b1424; stroke-width: 1.8; }
.face.icon { font-size: 26px; line-height: 1; background: rgba(255,255,255,.06); }
.face.mini { width: 34px; height: 34px; }
.face.icon.mini { font-size: 18px; }
.face.emote svg { animation: emote .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes emote { 0% { transform: scale(.9) rotate(-4deg); } 100% { transform: none; } }
.card-head { align-items: center; }
.rel-tag { font-size: 12px; letter-spacing: .05em; color: #ff8be6; text-shadow: 0 0 8px rgba(255,59,212,.6); white-space: nowrap; }
/* Реплика с лицом говорящего */
.react { display: flex; align-items: center; gap: 8px; text-align: left; }
.react > span:last-child { min-width: 0; }
.rel-note { position: absolute; left: 50%; top: 18px; z-index: 4; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  background: rgba(7,7,13,.9); pointer-events: none; animation: relnote 2.2s ease-out forwards; }
.rel-note.up { color: #ff8be6; border: 1px solid rgba(255,59,212,.6); } .rel-note.down { color: var(--down); border: 1px solid rgba(255,59,107,.6); }
@keyframes relnote { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
/* Сейчас в игре */
.live { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--text-2); }
.live[hidden] { display: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: livedot 1.6s ease-in-out infinite; }
@keyframes livedot { 50% { opacity: .35; } }
.live-ava { display: flex; } .live-ava span { width: 20px; height: 20px; margin-left: -4px; display: grid; place-items: center; border-radius: 50%; background: #1a1a2e; border: 1px solid rgba(255,255,255,.18); font-size: 12px; }
.live small { font-family: var(--f-mono); }
/* Сколько ответили так же (неделя дня) */
.pick-stat { font-family: var(--f-mono); font-size: 12px; color: var(--cyan-l); text-align: center; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(45,226,230,.4); background: rgba(45,226,230,.06); }
.pick-stat[hidden] { display: none; }
.pick-stat.on { animation: fadein .3s; }
/* Коллеги в профиле */
.cast-list { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 18px; border: 1.5px solid var(--line); }
.cast-list[hidden] { display: none; }
.cast-title { font-family: var(--f-display); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.cast-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.cast-row .face { width: 40px; height: 40px; }
.cast-row b { display: block; font-size: 14px; } .cast-row small { color: var(--text-2); font-size: 11.5px; }
.cast-row em { font-style: normal; font-size: 12px; color: var(--text-2); } .cast-row em.up { color: #ff8be6; } .cast-row em.down { color: var(--down); }
@media (prefers-reduced-motion: reduce) { .face .eyes, .live-dot { animation: none; } }
.card-head { justify-content: flex-start; }
.card-head .rnd-tag { margin-left: auto; }
