:root {
  --bg: #0f1013;
  --panel: #1a1c21;
  --panel2: #23262d;
  --line: #31353e;
  --text: #eef0f3;
  --muted: #8b919c;
  --red: #e5484d;
  --blue: #3e8ef7;
  --green: #30a46c;
  --yellow: #f5c518;
  --gray: #6b7079;
  --ok: #3ddc84;
  --lcd: #ff4d3d;
  --metal: linear-gradient(160deg, #3a3e46, #24272d 60%, #1c1e23);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.4 Geologica, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }
.muted { color: var(--muted); }
.center { margin: auto; text-align: center; padding: 24px; }
.hidden { display: none !important; }

/* ── шапка ── */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; padding: 10px 14px; background: #08090b; border-bottom: 1px solid var(--line);
  flex: none;
}
.role-chip { font-weight: 700; font-size: 14px; white-space: nowrap; }
.timer {
  font-family: 'Share Tech Mono', ui-monospace, monospace; font-size: 30px; letter-spacing: 2px;
  color: var(--lcd); background: #1a0706; border: 1px solid #3a1210; border-radius: 8px;
  padding: 0 10px; text-shadow: 0 0 10px rgba(255, 77, 61, .6); min-width: 110px; text-align: center;
}
.timer.low { animation: blink 1s steps(2) infinite; }
.strikes { justify-self: end; display: flex; gap: 4px; }
.strikes i {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #3a3e46;
  display: grid; place-items: center; font-style: normal; font-size: 13px; color: transparent;
}
.strikes i.on { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 0 8px var(--red); }
@keyframes blink { 50% { opacity: .35; } }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 16px; -webkit-overflow-scrolling: touch; }

.flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; }
.flash.bad { background: rgba(229, 72, 77, .35); opacity: 1; transition: none; }
.flash.good { background: rgba(61, 220, 132, .22); opacity: 1; transition: none; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ── лобби ── */
.lobby { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.role-big { text-align: center; }
.role-big .emo { font-size: 64px; line-height: 1; }
.role-big h1 { margin: 8px 0 4px; font-size: 26px; }
.role-big p { margin: 0; color: var(--muted); }
.how { margin: 0; padding-left: 18px; }
.how li { margin: 6px 0; }
.people { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; }
.person .st { margin-left: auto; font-size: 13px; color: var(--muted); }
.person .st.ok { color: var(--ok); }
.btn {
  display: block; width: 100%; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 17px;
  background: var(--red); color: #fff; box-shadow: 0 4px 0 #8f1f23;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8f1f23; }
.btn.ghost { background: var(--panel2); box-shadow: 0 4px 0 #111; }
.btn[disabled] { opacity: .5; }

/* ── бомба ── */
.bomb-info {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px;
}
.tag {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px;
  font-size: 13px; display: inline-flex; gap: 6px; align-items: center;
}
.tag b { font-family: 'Share Tech Mono', monospace; font-size: 16px; letter-spacing: 1px; }
.tag .bat { display: inline-flex; gap: 3px; }
.tag .bat i { width: 9px; height: 16px; border-radius: 2px; background: #c9ced6; position: relative; }
.tag .bat i::before { content: ''; position: absolute; top: -3px; left: 2px; width: 5px; height: 3px; background: #c9ced6; border-radius: 1px; }
.led { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.led.on { background: #ffe066; box-shadow: 0 0 8px #ffe066; }
.redact { color: transparent; background: repeating-linear-gradient(45deg, #444 0 3px, #2a2a2a 3px 6px); border-radius: 3px; }

.panel-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 14px 2px 8px; }
.bomb {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 20px;
  background: linear-gradient(160deg, #2b2e35, #15171b); border: 2px solid #3b3f48;
  box-shadow: 0 8px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}
.mod.empty { background: repeating-linear-gradient(135deg, #24272d 0 10px, #202227 10px 20px); border-color: #30333a; }
.mod.empty .screw { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #50555e; box-shadow: inset 0 0 0 2px #3a3e46; }
.mod.empty .screw:nth-child(1) { top: 8px; left: 8px; } .mod.empty .screw:nth-child(2) { top: 8px; right: 8px; }
.mod.empty .screw:nth-child(3) { bottom: 8px; left: 8px; } .mod.empty .screw:nth-child(4) { bottom: 8px; right: 8px; }
.legend { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }
.mod {
  position: relative; min-width: 0; background: var(--metal); border: 1px solid #40444d; border-radius: 14px;
  padding: 12px; min-height: 170px; display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 3px 10px rgba(0,0,0,.4);
}
.mod h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #aab0ba; letter-spacing: .5px; }
.mod .status {
  position: absolute; top: 10px; right: 10px; width: 12px; height: 12px; border-radius: 50%;
  background: #44141a; border: 1px solid #000;
}
.mod.solved .status { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.mod.solved { border-color: #2c6e48; }
.mod.solved .body { opacity: .55; pointer-events: none; }
.mod .body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mod.locked .body { pointer-events: none; }
.mod.closed { align-items: center; justify-content: center; text-align: center; color: var(--muted); background: #17191d; border-style: dashed; }
.mod.closed .ico { font-size: 34px; }

/* цвета: у слепого цвета нет — серый */
.c-red { --c: var(--red); } .c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-yellow { --c: var(--yellow); }
.c-none { --c: #8a8f98; }

/* провода */
.wires { display: flex; flex-direction: column; gap: 9px; }
.wire { height: 18px; position: relative; display: flex; align-items: center; }
.wire::before, .wire::after { content: ''; width: 10px; height: 18px; background: #a3a9b3; border-radius: 3px; flex: none; }
.wire span:not(.n) { flex: 1; height: 8px; background: var(--c); border-radius: 4px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); margin: 0 2px; }
.wire.cut span:not(.n) { background: linear-gradient(90deg, var(--c) 0 42%, transparent 42% 58%, var(--c) 58%); }
.wire .n { position: absolute; left: 0; top: -11px; width: 10px; text-align: center; font-size: 9px; color: #7b818b; }

/* кнопка */
.bigbtn {
  width: 110px; height: 110px; border-radius: 50%; margin: auto; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000));
  border: 5px solid #15171a; box-shadow: 0 5px 0 #000, 0 0 0 3px #50555e;
  font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); letter-spacing: 1px;
}
.bigbtn:active { transform: translateY(4px); box-shadow: 0 1px 0 #000, 0 0 0 3px #50555e; }

/* символы */
.glyphs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.glyph {
  aspect-ratio: 1.15; border-radius: 9px; background: #e9e4d6; color: #1b1b1b;
  font-size: 34px; display: grid; place-items: center; position: relative; box-shadow: 0 3px 0 #8d8676;
  font-family: 'Times New Roman', Georgia, serif;
}
.glyph::after { content: ''; position: absolute; top: 5px; left: 50%; width: 10px; height: 4px; margin-left: -5px; border-radius: 2px; background: #444; }
.glyph.done::after { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.glyph.blank { background: #555a62; box-shadow: 0 3px 0 #2d3035; color: transparent; }
.glyph:active { transform: translateY(2px); box-shadow: 0 1px 0 #8d8676; }

/* огни */
.lamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lamp {
  aspect-ratio: 1; border-radius: 50%; border: 3px solid #121316;
  background: color-mix(in srgb, var(--c) 30%, #111);
}
.lamp.on { background: var(--c); box-shadow: 0 0 18px var(--c), 0 0 4px #fff inset; }
.lamp.c-none.on { background: #f0f0f0; box-shadow: 0 0 18px #fff; }
.lamp:active { transform: scale(.94); }
.stage { display: flex; gap: 5px; justify-content: center; margin-top: 10px; }
.stage i { width: 22px; height: 5px; border-radius: 3px; background: #3a3e46; }
.stage i.on { background: var(--ok); }
.progress { text-align: center; font-size: 11px; color: var(--muted); margin-top: 6px; }

/* фигуры */
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shape {
  background: #2c2f36; border-radius: 9px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 3px 0 #111;
}
.shape svg { width: 30px; height: 30px; fill: #d5d9e0; }
.shape .dots { display: flex; gap: 2px; }
.shape .dots i { width: 5px; height: 5px; border-radius: 50%; background: #d5d9e0; }
.shape:active { transform: translateY(2px); box-shadow: 0 1px 0 #111; }

/* тумблеры */
.switches { display: flex; justify-content: space-between; gap: 4px; }
.sw { width: 24px; height: 56px; border-radius: 12px; background: #111; position: relative; border: 2px solid #3a3e46; }
.sw::after {
  content: ''; position: absolute; left: 2px; right: 2px; height: 24px; border-radius: 9px;
  background: linear-gradient(#e7eaee, #9aa0a8); top: 26px; transition: top .15s;
}
.sw.up::after { top: 2px; }
.lever { margin-top: 12px; padding: 8px; border-radius: 10px; background: #2c2f36; font-weight: 700; box-shadow: 0 3px 0 #111; }
.lever:active { transform: translateY(2px); box-shadow: 0 1px 0 #111; }

/* ── окно немого (у глухого) ── */
.mime {
  background: #14161a; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 4px;
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
}
.mime .face { font-size: 46px; line-height: 1; }
.mime .now {
  height: 64px; border-radius: 12px; background: #0b0c0e; display: grid; place-items: center;
  font-size: 40px; font-weight: 800; border: 1px solid #2a2d33;
}
.mime .now.pop { animation: pop .35s; }
@keyframes pop { 0% { transform: scale(.6); opacity: .2; } 70% { transform: scale(1.08); } }
.mime .room { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thing { height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--c) 25%, #101114); border: 2px solid color-mix(in srgb, var(--c) 45%, #000); transition: all .2s; display: grid; place-items: center; font-size: 11px; color: rgba(255,255,255,.55); }
.thing.lit { background: var(--c); box-shadow: 0 0 16px var(--c); color: #fff; transform: translateY(-2px); }
.mime .trail { grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; min-height: 30px; align-items: center; }
.mime .trail span { flex: none; min-width: 30px; height: 30px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; font-weight: 700; padding: 0 6px; }
.mime .trail span.col { background: var(--c); }
.mime .trail span:last-child { outline: 2px solid #fff; }
.colorbox { display: inline-block; width: 40px; height: 40px; border-radius: 10px; background: var(--c); box-shadow: 0 0 18px var(--c); }

/* ── разговоры ── */
.talk { flex: none; border-top: 1px solid var(--line); background: #0b0c0e; padding: 8px 10px calc(8px + var(--safe-b)); }
.feed { max-height: 26vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding: 2px 2px 8px; }
.say { padding: 6px 10px; border-radius: 12px; background: var(--panel2); max-width: 88%; font-size: 14px; }
.say small { display: block; font-size: 11px; color: var(--muted); }
.say.me { align-self: flex-end; background: #233a5c; }
.say.deaf small { color: #f59e0b; } .say.blind small { color: #a78bfa; }
.inrow { display: flex; gap: 8px; }
.inrow input {
  flex: 1; min-width: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); padding: 11px 12px; outline: none; user-select: text; -webkit-user-select: text;
}
.inrow button { border-radius: 12px; background: var(--blue); padding: 0 16px; font-weight: 700; }
.deafnote { font-size: 12px; color: var(--muted); padding: 0 2px 6px; display: flex; gap: 6px; align-items: center; }
.deafnote .wave { display: inline-flex; gap: 2px; }
.deafnote .wave i { width: 3px; height: 10px; background: var(--muted); border-radius: 2px; }
.deafnote.talking .wave i { background: #f59e0b; animation: wave .6s infinite alternate; }
.deafnote.talking .wave i:nth-child(2) { animation-delay: .15s; } .deafnote.talking .wave i:nth-child(3) { animation-delay: .3s; }
@keyframes wave { to { transform: scaleY(.3); } }

/* ── немой ── */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; flex: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--panel2); font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: #f1e9d2; color: #1d1a12; }
.page { background: #f1e9d2; color: #1d1a12; border-radius: 14px; padding: 14px 16px; font-size: 14.5px; }
.page h2 { margin: 0 0 2px; font-size: 20px; }
.page .where { font-size: 12px; color: #7a6f55; margin-bottom: 8px; }
.page p { margin: 6px 0; }
.page h4 { margin: 12px 0 4px; font-size: 14px; }
.page ol { margin: 0; padding-left: 20px; }
.page li { margin: 3px 0; }
.page table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.page td, .page th { border: 1px solid #cdbf98; padding: 4px; text-align: center; }
.cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.cols div { border: 1px solid #cdbf98; border-radius: 8px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; }
.cols span { font-size: 24px; line-height: 1.35; font-family: 'Times New Roman', Georgia, serif; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--c); vertical-align: -2px; }
.hear { flex: none; padding: 0 12px; }
.hear .feed { max-height: 18vh; padding-top: 8px; }
.signals { flex: none; border-top: 1px solid var(--line); background: #0b0c0e; padding: 10px 10px calc(10px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.signals .row { display: grid; gap: 6px; }
.signals .colors { grid-template-columns: repeat(4, 1fr); }
.signals .digits { grid-template-columns: repeat(10, 1fr); }
.signals .misc { grid-template-columns: repeat(10, 1fr); }
.sig { height: 42px; border-radius: 10px; background: var(--panel2); font-weight: 700; font-size: 18px; display: grid; place-items: center; }
.sig:active { transform: scale(.92); }
.sig.col { background: var(--c); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 50%, #000); font-size: 11px; color: rgba(0,0,0,.6); }
.signals .digits .sig { height: 38px; font-size: 16px; }
.signals .misc .sig { font-size: 19px; }
.sent { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-height: 18px; overflow: hidden; white-space: nowrap; }

/* ── итог ── */
.result { text-align: center; padding: 10px 0; }
.result .big { font-size: 80px; line-height: 1; }
.result h1 { margin: 10px 0 4px; font-size: 30px; }
.answers { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ans { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.ans b { display: block; }
.ans .ok { color: var(--ok); } .ans .no { color: var(--red); }
.boom { animation: boom .6s; }
@keyframes boom { 0% { transform: scale(.2); filter: brightness(4); } 60% { transform: scale(1.3); } }

@media (min-width: 560px) { .scroll, .tabs, .hear { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; } }

/* жесты головой и касания слепого */
.signals .heads { grid-template-columns: 1fr 1fr; }
.sig.head { font-size: 14px; background: #2b2f37; }
.mime .face.nod { animation: nod .5s 2; }
.mime .face.shake { animation: headshake .45s 2; }
@keyframes nod { 30% { transform: translateY(7px) rotate(4deg); } 60% { transform: translateY(-2px); } }
@keyframes headshake { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.headtxt { font-size: 16px; font-weight: 700; }
.mime .trail span.nod { background: #1f5f3d; } .mime .trail span.shake { background: #6b2226; }
.touched { animation: touch 1.2s ease-out; }
.touch-ok { --tc: 255, 255, 255; } .touch-bad { --tc: 229, 72, 77; }
@keyframes touch { 0% { box-shadow: 0 0 0 0 rgba(var(--tc), .95); outline: 3px solid rgba(var(--tc), 1); } 100% { box-shadow: 0 0 0 16px rgba(var(--tc), 0); outline: 3px solid rgba(var(--tc), 0); } }

/* ── 3D ── */
.stage3d { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.stage3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; top: 8px; left: 8px; right: 56px; z-index: 2; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.hud .bomb-info { margin: 0; }
.hud .tag { background: rgba(20, 22, 27, .82); backdrop-filter: blur(4px); }
.hint3d { font-size: 11px; color: rgba(255,255,255,.7); text-shadow: 0 1px 2px #000; }
.mime.mini { grid-template-columns: auto auto 1fr; padding: 6px 8px; gap: 8px; background: rgba(14, 16, 20, .82); backdrop-filter: blur(4px); margin: 0; }
.mime.mini .face { font-size: 26px; }
.mime.mini .now { height: 40px; min-width: 64px; font-size: 26px; padding: 0 8px; }
.mime.mini .now .headtxt { font-size: 12px; }
.mime.mini .now .colorbox { width: 26px; height: 26px; }
.mime.mini .trail { grid-column: auto; min-height: 26px; }
.mime.mini .trail span { min-width: 24px; height: 24px; font-size: 12px; }
.stagebtns { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.stagebtns button { width: 40px; height: 40px; border-radius: 12px; background: rgba(20, 22, 27, .85); border: 1px solid #3a3e46; font-weight: 700; font-size: 15px; }
.modebtn.inline { display: block; margin: 0 0 10px auto; padding: 7px 12px; border-radius: 10px; background: var(--panel2); font-size: 13px; font-weight: 600; }

/* ═════════════ полировка ═════════════ */
body { background: radial-gradient(120% 80% at 50% -10%, #1d2540 0%, var(--bg) 60%); }
.center.loading .spin { font-size: 56px; animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(12deg) scale(1.08); } }

/* шапка: табло с «призраками» сегментов */
.top { background: linear-gradient(180deg, #0b0d12, #090a0d); border-bottom: 1px solid #1f232c; box-shadow: 0 6px 18px rgba(0,0,0,.35); position: relative; z-index: 5; }
.role-chip { font-size: 13px; letter-spacing: .2px; }
.timer { position: relative; padding: 0 12px; background: #120404; border: 1px solid #3b0f0c; box-shadow: inset 0 0 14px rgba(0,0,0,.8), 0 0 18px rgba(255,60,40,.12); }
.timer .ghost { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,77,61,.08); text-shadow: none; pointer-events: none; }
.timer #timerTxt { position: relative; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.strikes i { width: 18px; height: 18px; font-size: 11px; background: #15171c; }
.sound { width: 30px; height: 30px; border-radius: 9px; background: #171a20; border: 1px solid #2a2e37; font-size: 15px; }

/* вспышки */
.flash.boom { background: radial-gradient(circle at 50% 55%, #fff6d8 0%, #ffb347 30%, rgba(255,80,20,.85) 60%, rgba(60,0,0,.9) 100%); opacity: 1; transition: none; }
.banner { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; }
.banner span {
  font: 900 54px/1 Geologica, sans-serif; letter-spacing: 2px; color: #fff;
  padding: 14px 28px; border-radius: 22px; background: linear-gradient(135deg, #e5484d, #f59e0b);
  box-shadow: 0 20px 60px rgba(229,72,77,.5); animation: bannerIn 1.4s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes bannerIn { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 25% { transform: scale(1.08) rotate(2deg); opacity: 1; } 70% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }

/* ── лобби ── */
.lobby { gap: 12px; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 16px 18px; text-align: center; border: 1px solid rgba(255,255,255,.08); }
.hero::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.08), transparent 30%); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero > * { position: relative; }
.hero-blind { background: linear-gradient(160deg, #5b1d1d, #2a0f14 70%); }
.hero-deaf { background: linear-gradient(160deg, #173a6b, #0f1a33 70%); }
.hero-mute { background: linear-gradient(160deg, #3d2470, #1a1233 70%); }
.hero-ring { width: 108px; height: 108px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; background: rgba(0,0,0,.25); box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 0 10px rgba(255,255,255,.04), 0 12px 30px rgba(0,0,0,.4); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.hero-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.6); }
.hero h1 { margin: 6px 0 2px; font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.hero-tag { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; }
.card { background: linear-gradient(180deg, #1b1e25, #16181e); border-color: #262a33; }
.how li::marker { color: #f59e0b; font-weight: 800; }
.matrix { padding: 10px 12px; display: grid; gap: 4px; }
.mx-head, .mx-row { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); align-items: center; text-align: center; gap: 4px; }
.mx-head span { font-size: 22px; padding: 4px 0; border-radius: 10px; }
.mx-head small { display: block; font-size: 10px; color: var(--muted); }
.mx-row > span:first-child { text-align: left; font-size: 13px; color: #c6cbd4; }
.mx-row > span { padding: 5px 0; border-radius: 8px; }
.mx-head .me, .mx-row .me { background: rgba(245,158,11,.12); }
.cap { font-weight: 800; font-size: 13px; }
.cap.yes { color: var(--ok); } .cap.no { color: #ff6b6b; } .cap.part { color: #f5c518; font-size: 11px; font-weight: 700; }
.person { padding: 8px 10px; border-radius: 12px; background: #1f232b; transition: background .3s; }
.person.ready { background: #16301f; }
.person small { color: var(--muted); font-weight: 400; }
.pav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; }
.pav-blind { background: #5b1d1d; } .pav-deaf { background: #173a6b; } .pav-mute { background: #3d2470; }
.person .st { padding: 3px 9px; border-radius: 999px; background: #2a2e37; font-size: 12px; }
.person .st.ok { background: #1e5a36; color: #b9f5cf; }
.person:not(.ready) .st { animation: blink 1.4s ease-in-out infinite; }
.btn { background: linear-gradient(180deg, #ff5a5f, #d93b40); box-shadow: 0 5px 0 #8f1f23, 0 12px 24px rgba(229,72,77,.3); font-size: 18px; letter-spacing: .3px; }
.small-note { text-align: center; margin: 4px 0 0; font-size: 12.5px; }

/* ── итог ── */
.result-page { padding-top: 18px; }
.result { text-align: center; padding: 8px 0 4px; }
.stamp {
  display: inline-block; font: 900 34px/1 Geologica, sans-serif; letter-spacing: 3px; padding: 12px 18px;
  border: 5px solid currentColor; border-radius: 12px; transform: rotate(-6deg);
  animation: stamp .55s cubic-bezier(.2,1.6,.4,1) both; animation-delay: .1s;
}
.result.won .stamp { color: #3ddc84; text-shadow: 0 0 18px rgba(61,220,132,.4); }
.result.lost .stamp { color: #ff5252; text-shadow: 0 0 18px rgba(255,82,82,.4); }
@keyframes stamp { 0% { transform: rotate(-6deg) scale(3); opacity: 0; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }
.result-sub { color: var(--muted); margin: 14px 0 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stats div { background: #1b1e25; border: 1px solid #262a33; border-radius: 12px; padding: 8px 2px; }
.stats b { display: block; font-size: 18px; font-family: 'Share Tech Mono', monospace; }
.stats small { font-size: 10.5px; color: var(--muted); }
.answers { margin-bottom: 14px; }
.ans { display: flex; gap: 10px; align-items: flex-start; }
.ans b { display: block; font-size: 14px; }
.ans span:not(.ans-mark) { display: block; color: #c6cbd4; font-size: 13px; }
.ans i { display: block; font-size: 13px; color: #f5c518; font-style: normal; margin-top: 2px; }
.ans-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ans.ok .ans-mark { background: #1e5a36; color: #b9f5cf; } .ans.no .ans-mark { background: #5a1e22; color: #ffb3b3; }

/* итог поверх 3D: выезжающая шторка */
.sheet-wrap { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; background: linear-gradient(180deg, transparent 0%, rgba(5,6,9,.55) 45%); animation: fadeIn .4s both; }
.sheet { width: 100%; max-height: 86%; overflow-y: auto; background: rgba(16,18,23,.94); backdrop-filter: blur(10px); border-top-left-radius: 24px; border-top-right-radius: 24px; border-top: 1px solid #2c313b; padding: 18px 14px calc(16px + var(--safe-b)); animation: sheetUp .5s cubic-bezier(.2,1,.3,1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ── немой: инструкция-блокнот ── */
.tabs button { border-radius: 10px 10px 4px 4px; background: #262a33; }
.tabs button.on { background: #f3ead2; color: #3a2e12; box-shadow: 0 -2px 0 #f59e0b inset; }
.page {
  position: relative; padding: 16px 16px 16px 30px; border-radius: 6px 14px 14px 6px;
  background: linear-gradient(90deg, rgba(0,0,0,.06) 0, transparent 8px), repeating-linear-gradient(180deg, #f6eed8 0 27px, #e9dfc2 27px 28px);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.page::before { content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 10px; background: radial-gradient(circle, #5b5346 3px, transparent 3.5px) 0 0 / 10px 22px repeat-y; }
.page h2 { font-weight: 800; color: #2a2210; }
.page table { background: rgba(255,255,255,.4); border-radius: 6px; overflow: hidden; }
.signals { background: linear-gradient(180deg, #0d0f13, #090a0d); }
.sig { background: linear-gradient(180deg, #2c3039, #22252c); box-shadow: 0 3px 0 #111318, inset 0 1px 0 rgba(255,255,255,.06); }
.sig:active { transform: translateY(2px); box-shadow: 0 1px 0 #111318; }
.sig.col { box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 45%, #000), inset 0 1px 0 rgba(255,255,255,.3); color: rgba(0,0,0,.65); font-weight: 800; }
.sig.head { background: linear-gradient(180deg, #2f3542, #252a34); }

/* 3D: подсказки и затемнение по краям; у слепого — «повязка» */
.stage3d::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 80px rgba(0,0,0,.55); }
.stage3d.blindview::after { background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(120,10,20,.35) 85%, rgba(60,0,8,.7) 100%); box-shadow: none; }
.center.fatal .spin { font-size: 64px; filter: drop-shadow(0 10px 20px rgba(229,72,77,.4)); }
.center.fatal p { max-width: 300px; margin: 14px auto 0; font-size: 16px; line-height: 1.5; }
/* правки: бумага без линовки, ряд сигналов не вылезает */
.page { background: linear-gradient(90deg, rgba(0,0,0,.07) 0, transparent 10px), linear-gradient(180deg, #f8f1de, #efe5c9); }
.signals .sig { min-width: 0; }
.signals .misc .sig { font-size: 17px; }

/* ── голос ── */
.voicebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 2px 8px; }
.voicebar:empty { display: none; }
.voicecard .voicebar { padding: 0; }
.vbtn { padding: 8px 12px; border-radius: 12px; background: #24324a; border: 1px solid #34507a; font-weight: 700; font-size: 13.5px; }
.vptt {
  flex: 1 1 100%; padding: 12px; border-radius: 14px; font-weight: 800; font-size: 15px;
  background: linear-gradient(180deg, #2b3a55, #222e44); border: 1px solid #3a5480; box-shadow: 0 3px 0 #141c2a;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.vptt.on { background: linear-gradient(180deg, #e5484d, #b8323a); border-color: #ff7b7f; box-shadow: 0 0 0 4px rgba(229,72,77,.25), 0 1px 0 #6e1a1f; transform: translateY(2px); }
.vnote { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.vdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #555c68; }
.vdot.ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); } .vdot.bad { background: var(--red); }
.vtalk { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #3a2a12; color: #ffd27a; animation: blink 1s ease-in-out infinite; }
.vtalk.mute { background: #2a2d33; color: var(--muted); }

/* тест в одного */
.seatbar { flex: none; display: flex; gap: 6px; align-items: center; padding: 6px 10px; background: #1d1830; border-bottom: 1px solid #3a2f63; font-size: 12px; color: #c9b8ff; overflow-x: auto; }
.seatbar span { flex: none; }
.seatbar button { flex: none; padding: 5px 10px; border-radius: 999px; background: #2b2446; font-weight: 700; font-size: 12.5px; color: #e6dcff; }
.seatbar button.on { background: #7a4bd1; color: #fff; }

/* ═════════════ компактно: главное — игра ═════════════ */
/* полный экран Телеграма: шапка уходит под его системные кнопки */
.top { padding: calc(var(--safe-t, 0px) + 6px) 10px 6px; gap: 6px; }
.timer { font-size: 24px; min-width: 88px; padding: 0 8px; border-radius: 7px; }
.role-chip { font-size: 12px; }
.strikes i { width: 16px; height: 16px; font-size: 10px; border-width: 1.5px; }
.sound { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
.seatbar { padding: 4px 8px; font-size: 11px; gap: 5px; }
.seatbar button { padding: 3px 9px; font-size: 11.5px; }

/* 3D: подсказки и плашки — тонко */
.hud { top: 6px; left: 6px; right: 48px; gap: 4px; }
.hud .tag { font-size: 11.5px; padding: 3px 7px; border-radius: 7px; }
.hud .tag b { font-size: 13px; }
.hud .tag .bat i { width: 7px; height: 12px; }
.hint3d { font-size: 10.5px; transition: opacity .8s; }
.hint3d.gone { opacity: 0; }
.mime.mini { padding: 4px 6px; gap: 6px; border-radius: 12px; }
.mime.mini .face { font-size: 20px; }
.mime.mini .now { height: 30px; min-width: 52px; font-size: 20px; border-radius: 8px; }
.mime.mini .now .headtxt { font-size: 10.5px; }
.mime.mini .now .colorbox { width: 20px; height: 20px; border-radius: 6px; }
.mime.mini .trail { min-height: 22px; gap: 4px; }
.mime.mini .trail span { min-width: 22px; height: 22px; font-size: 11px; border-radius: 6px; padding: 0 4px; }
.stagebtns { top: 6px; right: 6px; gap: 5px; }
.stagebtns button { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }

/* низ: статус в строку, последняя реплика, ввод с микрофоном */
.talk { padding: 5px 8px calc(6px + var(--safe-b)); }
.statusline { display: flex; align-items: center; gap: 8px; min-height: 0; overflow: hidden; white-space: nowrap; }
.statusline:has(.voicebar:empty):not(:has(.deafnote)) { display: none; }
.deafnote { padding: 0 0 3px; font-size: 11px; flex: none; }
.talk .voicebar { padding: 0 0 3px; flex-wrap: nowrap; overflow: hidden; }
.talk .vnote, .talk .vtalk { font-size: 11px; }
.talk .vtalk { padding: 2px 8px; }
.talk .feed { max-height: 34px; padding: 0 0 5px; gap: 3px; cursor: pointer; transition: max-height .25s; }
.talk .feed.open { max-height: 42vh; }
.talk .say, .hear .say { padding: 4px 9px; font-size: 13px; border-radius: 10px; }
.talk .say small, .hear .say small { display: inline; margin-right: 6px; font-size: 10.5px; }
.talk .feed > .muted { font-size: 12px !important; padding: 4px 2px; }
.inrow { gap: 6px; align-items: center; }
.inrow input { padding: 9px 11px; font-size: 14.5px; border-radius: 11px; }
.inrow .sendbtn { height: 38px; padding: 0 14px !important; border-radius: 11px !important; background: var(--blue); font-weight: 700; }
.inrow .micbtn { flex: none; width: 40px; height: 38px; border-radius: 11px; background: #24324a; border: 1px solid #34507a; font-size: 17px; touch-action: none; -webkit-touch-callout: none; user-select: none; }
.inrow .micbtn.ready { background: linear-gradient(180deg, #2f5fae, #24477f); border-color: #5b8de0; }
.inrow .micbtn.on { background: linear-gradient(180deg, #e5484d, #b8323a); border-color: #ff7b7f; box-shadow: 0 0 0 4px rgba(229,72,77,.3); }

/* немой: больше места инструкции */
.tabs { padding: 6px 10px 0; gap: 5px; }
.tabs button { padding: 6px 10px; font-size: 12.5px; }
#page.scroll { padding: 8px 10px 10px; }
.page { font-size: 14px; padding: 12px 12px 12px 26px; }
.page h2 { font-size: 18px; }
.hear { padding: 0 10px; }
.hear .feed { max-height: 50px; padding: 4px 0 2px; gap: 3px; cursor: pointer; transition: max-height .25s; }
.hear .feed.open { max-height: 40vh; }
.hear .voicebar { padding: 0 0 4px; }
.hear .vnote { font-size: 11px; }
.signals { padding: 6px 8px calc(6px + var(--safe-b)); gap: 5px; }
.signals .row { gap: 5px; }
.sent { font-size: 11px; min-height: 15px; }
.sig.col { height: 34px; font-size: 11px; }
.signals .digits .sig { height: 34px; font-size: 15px; }
.signals .misc .sig { height: 38px; font-size: 16px; }
.sig.head { font-size: 12px; font-weight: 800; flex-direction: column; line-height: 1; background: linear-gradient(180deg, #1f6b42, #18553a); }
.sig.head.no { background: linear-gradient(180deg, #7a2a2e, #5f2024); }
.sig.head small { font-size: 8.5px; font-weight: 600; opacity: .75; margin-top: 2px; }
.sig.head { display: flex; align-items: center; justify-content: center; }

/* ── немой в 3D: комната + инструкция ── */
.mutewrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mutewrap .stage3d { flex: 0 0 44%; min-height: 0; }
.mutewrap #page { flex: 1; }
.mutewrap.mode-book .stage3d { flex-basis: 0; visibility: hidden; }
.mutewrap.mode-room .stage3d { flex: 1 1 auto; }
.mutewrap.mode-room .tabs, .mutewrap.mode-room #page { display: none; }
.muteview::after { box-shadow: inset 0 0 50px rgba(0,0,0,.5); }
.signals .signs { grid-template-columns: repeat(5, 1fr); }
.signals .signs .sig { height: 40px; font-size: 20px; }
.sent .dot { width: 11px; height: 11px; margin-left: 1px; }

/* ═════════════ v2: иконки, эмодзи Телеграма, книжка, знаки по кругу ═════════════ */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.tgemo { display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; line-height: 1; vertical-align: middle; }
.tgemo > i { font-style: normal; font-size: calc(var(--s) * .82); }
.tgemo.anim > i { display: none; }
.tgemo > svg { width: 100% !important; height: 100% !important; }

/* шапка: обезьянка + роль и уровень в две строки */
.role-chip { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rc-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.rc-txt b { font-size: 14px; font-weight: 800; }
.rc-txt small { font-size: 11px; color: var(--muted); font-weight: 500; }
.sound { display: grid; place-items: center; color: #cfd5de; }
.sound .ic { width: 17px; height: 17px; }

.seatbar { gap: 6px; }
.seat-label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: #3a2f63; color: #e2d6ff; font-weight: 700; }
.seat-label .ic { width: 14px; height: 14px; }
.seatbar button { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; }

/* лобби */
.hero { padding: 16px 16px 20px; }
.hero-pills { display: flex; justify-content: center; gap: 6px; margin-bottom: 4px; }
.hero-pills span { padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }
.hero-emo { display: grid; place-items: center; height: 136px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.45)); animation: float 3s ease-in-out infinite; }
.hero-you { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.6); margin-top: 2px; }
.hero h1 { margin: 0 0 2px; font-size: 34px; }
.steps { display: grid; gap: 8px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, #1b1e25, #16181e); border: 1px solid #262a33; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.step-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(245,158,11,.14); color: #f5b041; }
.matrix .mx-head span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: inherit; }
.mx-row > span:first-child { display: flex; align-items: center; gap: 8px; }
.mx-row > span:first-child .ic { width: 17px; height: 17px; color: var(--muted); }
.cap .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 10px; color: #c6cbd4; }
.card-title .ic { width: 18px; height: 18px; }
.pname { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.pname small { font-size: 11.5px; color: var(--muted); }
.person .st { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
.person .st .ic { width: 13px; height: 13px; stroke-width: 3; }
.pav { overflow: hidden; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn .ic { width: 22px; height: 22px; }
.btn .ic[viewBox] path[d^="M8 5.5"] { fill: currentColor; }
.vbtn { display: inline-flex; align-items: center; gap: 6px; }
.vbtn .ic, .vnote .ic, .vtalk .ic { width: 14px; height: 14px; }
.vtalk { display: inline-flex; align-items: center; gap: 5px; }

/* кнопки на 3D и ввода — иконки */
.stagebtns button { display: grid; place-items: center; color: #dfe4ea; }
.stagebtns .ic { width: 18px; height: 18px; }
.inrow .micbtn, .inrow .sendbtn { display: grid; place-items: center; color: #fff; }
.inrow .micbtn .ic { width: 19px; height: 19px; }
.inrow .sendbtn .ic { width: 19px; height: 19px; }
.modebtn.inline { display: flex; align-items: center; gap: 6px; }
.modebtn.inline .ic { width: 16px; height: 16px; }
.panel-title { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 13px; color: #c6cbd4; font-weight: 700; }
.pt-chip { padding: 2px 8px; border-radius: 999px; background: #22262e; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.pt-chip.ok { color: #9be8bd; }
.result-emo { display: grid; place-items: center; height: 96px; margin-bottom: 4px; }
.center.fatal .spin { display: grid; place-items: center; }

/* ── инструкция-книжка ── */
.book { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px 10px 4px; }
.book-top { display: flex; align-items: center; gap: 8px; padding: 2px 2px 6px; }
.book-toc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; border-radius: 999px; background: #262a33; font-size: 12.5px; font-weight: 700; color: #e6e9ee; }
.book-toc .ic { width: 15px; height: 15px; }
.book-num { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.book-3d { width: 30px; height: 30px; border-radius: 9px; background: #262a33; display: grid; place-items: center; }
.book-3d .ic { width: 16px; height: 16px; }
.book-stage { position: relative; flex: 1; min-height: 0; perspective: 1400px; }
.leaf {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px 30px 26px; border-radius: 6px 16px 16px 6px; color: #1f1a10;
  background: linear-gradient(90deg, rgba(60,40,10,.18) 0, rgba(60,40,10,0) 14px), linear-gradient(180deg, #faf4e2, #f0e6c9);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), inset -1px 0 0 rgba(0,0,0,.06);
  transform-origin: left center; backface-visibility: hidden;
  transition: transform .46s cubic-bezier(.3,.7,.25,1), opacity .46s ease, filter .46s;
  font-size: 14.5px; line-height: 1.5; touch-action: pan-y;
}
.leaf::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 9px; background: radial-gradient(circle, #6b604e 2.6px, transparent 3px) 0 0 / 9px 20px repeat-y; opacity: .7; }
.leaf.from-right { transform: translateX(6%) scale(.98); opacity: 0; }
.leaf.from-left { transform: rotateY(-100deg); opacity: .4; }
.leaf.turn-left { transform: rotateY(-100deg); opacity: .3; filter: brightness(.7); z-index: 2; }
.leaf.turn-right { transform: translateX(6%) scale(.98); opacity: 0; }
.leaf-head { margin-bottom: 8px; }
.leaf-ch { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #a0763a; }
.leaf h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; color: #2a2210; }
.leaf p { margin: 6px 0; }
.leaf h4 { margin: 14px 0 5px; font-size: 14px; color: #5a4520; }
.leaf ol { margin: 0; padding-left: 20px; }
.leaf li { margin: 4px 0; }
.leaf table { border-collapse: collapse; margin-top: 6px; width: 100%; background: rgba(255,255,255,.45); border-radius: 8px; overflow: hidden; }
.leaf td, .leaf th { border: 1px solid #d8c9a0; padding: 5px 4px; text-align: center; }
.leaf .tbl-note { font-size: 12.5px; color: #6b5a38; }
.leaf .cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.leaf .cols div { border: 1px solid #d8c9a0; border-radius: 8px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.4); }
.leaf .cols b { font-size: 11px; color: #a0763a; }
.leaf .cols span { font-size: 23px; line-height: 1.35; font-family: 'Times New Roman', Georgia, serif; }
.leaf-foot { position: absolute; right: 14px; bottom: 8px; font-size: 11px; color: #a08a5c; font-weight: 700; }
.book-nav { display: flex; align-items: center; gap: 8px; padding: 6px 2px 2px; }
.book-arrow { width: 38px; height: 34px; border-radius: 11px; background: #262a33; display: grid; place-items: center; color: #e6e9ee; }
.book-arrow:disabled { opacity: .3; }
.book-arrow .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.book-dots { flex: 1; display: flex; justify-content: center; gap: 6px; }
.book-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a3f48; transition: all .25s; cursor: pointer; }
.book-dots i.on { width: 20px; border-radius: 4px; background: #f5b041; }
.toc { position: absolute; left: 10px; right: 10px; top: 44px; z-index: 5; display: none; flex-direction: column; gap: 2px; padding: 8px; border-radius: 16px; background: rgba(22,24,30,.97); border: 1px solid #30343d; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.book.toc-open .toc { display: flex; animation: fadeIn .18s both; }
.toc button { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; font-weight: 600; text-align: left; font-size: 14.5px; }
.toc button span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #262a33; font-size: 12px; color: var(--muted); flex: none; }
.toc button.on { background: #2b2516; color: #f5d27a; }
.mutewrap.mode-room .book { display: none; }
.mutewrap .book { flex: 1; }

/* немой: низ — переписка и строка «что видит глухой» */
.hear-row { display: flex; align-items: center; gap: 10px; padding: 2px 0 calc(6px + var(--safe-b)); overflow: hidden; }
.hear-row .voicebar { padding: 0; margin-left: auto; flex-wrap: nowrap; }
.sent { display: flex; align-items: center; gap: 5px; font-size: 12px; min-width: 0; overflow: hidden; white-space: nowrap; }
.sent-k { color: var(--muted); margin-right: 2px; }
.sent .sl { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 8px; background: #22262e; font-size: 13px; }
.sent-done { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: #9be8bd; font-weight: 700; }
.sent-done .ic { width: 13px; height: 13px; stroke-width: 3; }

/* кнопка знаков — как кнопка сообщения, справа внизу */
.mutewrap { position: relative; }
.fab {
  position: absolute; right: 14px; bottom: 14px; z-index: 6; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #8b5cf6, #6d3fd8);
  box-shadow: 0 10px 26px rgba(109,63,216,.55), 0 2px 0 rgba(255,255,255,.15) inset;
}
.fab .ic { width: 28px; height: 28px; stroke-width: 1.9; }
.fab:active { transform: scale(.93); }

/* окно со знаками по кругу */
.radial-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--safe-t, 0px) + 70px) 12px 0; background: rgba(6,7,10,0); backdrop-filter: blur(0); transition: background .22s, backdrop-filter .22s; }
.radial-wrap.open { background: rgba(6,7,10,.62); backdrop-filter: blur(6px); }
.radial-card { --ro: 128px; --ri: 64px; width: 100%; max-width: 360px; padding: 14px 12px 12px; border-radius: 26px; background: linear-gradient(180deg, #1d2029, #15171d); border: 1px solid #2e323b; box-shadow: 0 24px 60px rgba(0,0,0,.6); transform: translateY(-16px) scale(.96); opacity: 0; transition: transform .25s cubic-bezier(.2,1.2,.4,1), opacity .2s; }
.radial-wrap.open .radial-card { transform: none; opacity: 1; }
.radial-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; padding: 0 4px; }
.radial-sent { margin-left: auto; display: flex; gap: 4px; font-weight: 400; overflow: hidden; }
.radial-sent .sl { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 8px; background: #262a33; font-size: 13px; }
.radial { position: relative; width: calc(var(--ro) * 2 + 60px); height: calc(var(--ro) * 2 + 60px); margin: 8px auto 2px; border-radius: 50%; background: radial-gradient(circle, #20242c 0 calc(var(--ri) + 34px), #1a1d24 calc(var(--ri) + 35px) calc(var(--ro) + 32px), transparent calc(var(--ro) + 33px)); }
.rb {
  position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #f2f4f7;
  background: linear-gradient(180deg, #313642, #262a33); box-shadow: 0 3px 0 #111318, inset 0 1px 0 rgba(255,255,255,.08);
  transform: rotate(var(--a)) translate(0) rotate(calc(-1 * var(--a))) scale(.3); opacity: 0;
  transition: transform .34s cubic-bezier(.2,1.4,.4,1) calc(var(--i) * 18ms), opacity .2s calc(var(--i) * 18ms);
}
.radial-wrap.open .rb { transform: rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a))); opacity: 1; }
.rb-sign { width: 56px; height: 56px; margin: -28px 0 0 -28px; font-size: 27px; background: linear-gradient(180deg, #3a3350, #2c2640); }
.rb.hit { animation: rbhit .3s; }
@keyframes rbhit { 50% { filter: brightness(1.6); box-shadow: 0 0 0 6px rgba(139,92,246,.35); } }
.radial-close { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; background: #3a3f4a; color: #fff; }
.radial-close .ic { width: 20px; height: 20px; }
.radial-hint { margin: 2px 4px 0; text-align: center; font-size: 12px; color: var(--muted); }
.radial-colors { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.radial-colors .rc { width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 45%, #000); }
@media (max-width: 360px) { .radial-card { --ro: 112px; --ri: 56px; } .rb { width: 44px; height: 44px; margin: -22px 0 0 -22px; font-size: 18px; } }
/* кнопка знаков не перекрывает стрелки книжки */
.mutewrap .book-nav { padding-right: 70px; }
.mutewrap .fab { bottom: 6px; right: 12px; }
.mutewrap.mode-room .fab { bottom: 14px; right: 14px; }
.leaf-foot { right: auto; left: 50%; transform: translateX(-50%); }
.leaf.from-right { transform: translateX(2.5%) scale(.985); opacity: .65; }
.leaf.turn-right { transform: translateX(2.5%) scale(.985); opacity: 0; }
.mutewrap .fab { width: 54px; height: 54px; }

/* ── стартовый экран: коротко, подробности — по раскрытию ── */
.lobby2 { gap: 12px; padding-bottom: 6px; }
.lobby2 .hero { padding: 14px 16px 18px; }
.lobby2 .hero-emo { height: 124px; }
.hero-sum { margin: 8px auto 0; max-width: 300px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.85); }
.more { border-radius: 16px; background: linear-gradient(180deg, #1b1e25, #16181e); border: 1px solid #262a33; overflow: hidden; }
.more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; font-weight: 700; cursor: pointer; }
.more summary::-webkit-details-marker { display: none; }
.more summary > span { display: inline-flex; align-items: center; gap: 9px; }
.more summary .ic { width: 18px; height: 18px; color: #f5b041; }
.more summary .chev { color: var(--muted); transition: transform .2s; }
.more[open] summary .chev { transform: rotate(90deg); }
.more-body { padding: 0 10px 10px; display: grid; gap: 8px; animation: fadeIn .2s both; }
.more-body .card { border: 0; background: #14161b; }
.team-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tm { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 16px; background: #181b21; border: 1px solid #262a33; text-align: center; min-width: 0; transition: background .3s, border-color .3s; }
.tm.ready { background: #132a1d; border-color: #24553a; }
.tm.me { box-shadow: 0 0 0 2px rgba(245,176,65,.45); }
.tm b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm small { font-size: 11px; color: var(--muted); }
.tm-emo { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.tm-ok { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06210f; font-style: normal; box-shadow: 0 0 0 3px #132a1d; }
.tm-ok .ic { width: 12px; height: 12px; stroke-width: 3.2; }
.tm:not(.ready) .tm-emo { animation: blink 1.6s ease-in-out infinite; }
.go { display: grid; gap: 6px; }
.go .btn { font-size: 18px; padding: 16px; }
.btn-link { justify-self: center; padding: 6px 10px; font-size: 14px; color: #aab2bd; text-decoration: underline; text-underline-offset: 3px; }
.go-note { margin: 0; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.inrow .micbtn.denied { background: #2a2d33; border-color: #444a55; color: #8b919c; position: relative; }
.inrow .micbtn.denied::after { content: ''; position: absolute; width: 22px; height: 2px; background: #e5484d; transform: rotate(-45deg); border-radius: 2px; }

/* ── шапка v3: таймер наверху, роль по центру, прогресс слева ── */
.timerbar {
  flex: none; display: flex; align-items: center; justify-content: center;
  padding-top: var(--sa-t, 0px); height: calc(var(--sa-t, 0px) + max(var(--ca-t, 0px), 44px));
  background: #08090b; position: relative; z-index: 6;
}
.timerbar .timer { font-size: 22px; min-width: 84px; padding: 1px 10px; line-height: 1.25; }
.top { grid-template-columns: 1fr auto 1fr; padding: 4px 10px 6px; }
body.fs .top { padding-top: 4px; }
.role-chip { justify-self: center; }
.prog { justify-self: start; display: flex; align-items: center; gap: 7px; min-width: 0; }
.prog-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #1d2a22; color: #6fd39b; flex: none; }
.prog-ic.all { background: var(--ok); color: #05210f; }
.prog-ic .ic { width: 15px; height: 15px; stroke-width: 3; }
.prog-txt { display: flex; flex-direction: column; line-height: 1.1; }
.prog-txt b { font-size: 13.5px; font-weight: 800; }
.prog-txt small { font-size: 10.5px; color: var(--muted); }
/* у немого внизу «0 из 2» больше не нужно — оно в шапке */
.sent-done { display: none; }

/* микрофон: переключатель, иконка по центру */
.ic { display: block; }
.inrow .micbtn { padding: 0; }
.inrow .micbtn.on { animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 7px rgba(229,72,77,.18); } }
.vtalk { animation: none; }

/* книжка немого: кнопки скрыть / на весь экран, вернуть — из комнаты */
.book-btn { width: 30px; height: 30px; border-radius: 9px; background: #262a33; display: grid; place-items: center; color: #e6e9ee; }
.book-btn .ic { width: 16px; height: 16px; }
.showbook { position: absolute; left: 10px; bottom: 12px; z-index: 3; display: none; align-items: center; gap: 7px; padding: 10px 14px 10px 12px; border-radius: 999px; background: rgba(243,234,210,.95); color: #2a2210; font-weight: 800; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.showbook .ic { width: 18px; height: 18px; }
.mutewrap.mode-room .showbook { display: inline-flex; }

/* ── низ: люди столбиком, подсветка говорящего ── */
.statusline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 4px; overflow: visible; white-space: normal; }
.statusline:has(.voicebar:empty):not(:has(.deafnote)) { display: flex; }
.deafnote { font-size: 11px; line-height: 1.25; color: var(--muted); padding: 0; }
.talk .voicebar, .hear-row .voicebar { padding: 0; margin-left: auto; overflow: visible; }
.vind { display: flex; flex-direction: column; gap: 2px; min-width: 132px; }
.vrow { display: flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: 8px; font-size: 12px; line-height: 1.25; transition: background .2s, color .2s; }
.vrow b { font-weight: 700; color: #d7dce3; }
.vrow em { font-style: normal; color: var(--muted); font-size: 11px; margin-left: auto; padding-left: 8px; }
.vrow.far b { color: #9aa1ab; }
.vrow .vdot { width: 8px; height: 8px; flex: none; }
.vrow.talking { background: rgba(245,176,65,.16); }
.vrow.talking b { color: #ffd27a; }
.vrow.talking .vdot { background: #f5b041; box-shadow: 0 0 0 0 rgba(245,176,65,.7); animation: vpulse 1s ease-out infinite; }
@keyframes vpulse { 0% { box-shadow: 0 0 0 0 rgba(245,176,65,.7); } 100% { box-shadow: 0 0 0 7px rgba(245,176,65,0); } }
.vnote-line { font-size: 11.5px; color: #f2b8b8; padding: 0 2px 5px; }
.vnote-line .vbtn { font-size: 12.5px; }
.feed.empty { display: none; }
/* немой: «Глухой видит» — в две строки слева, люди — справа */
.hear-row { align-items: center; padding-top: 4px; }
.sent { flex-direction: column; align-items: flex-start; gap: 3px; white-space: normal; }
.sent-k { font-size: 11px; color: var(--muted); margin: 0; }
.sent-list { display: flex; gap: 4px; flex-wrap: wrap; min-height: 22px; align-items: center; }
.hear .feed { padding-top: 6px; }
