*{box-sizing:border-box;margin:0;padding:0}
:root{
  --navy:#070427;--blue:#10106a;--violet:#3a1680;--gold:#f5c542;--orange:#ff9a1f;
  --green:#1fbf4a;--red:#d8262f;--edge:#9fb4ff;--text:#fff;
}
html,body{height:100%}
body{font-family:"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--navy);overflow-x:hidden;min-height:100vh;min-height:100dvh}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
button:disabled{cursor:default}
[hidden]{display:none!important}

/* --- сцена --- */
.stage-bg{position:fixed;inset:0;z-index:-1;overflow:hidden;
  background:radial-gradient(ellipse 80% 60% at 50% 30%,#2a1a8a 0%,#140c5a 40%,#070427 80%)}
.beam{position:absolute;top:-20%;width:26vw;height:140%;opacity:.22;filter:blur(8px);
  background:linear-gradient(to bottom,rgba(190,170,255,.95),rgba(120,90,255,0) 75%);
  clip-path:polygon(45% 0,55% 0,100% 100%,0 100%);transform-origin:50% 0;animation:sweep 9s ease-in-out infinite alternate}
.b1{left:2%;--r1:-25deg;--r2:-5deg}
.b2{left:26%;--r1:-8deg;--r2:12deg;animation-duration:11s;opacity:.16}
.b3{left:50%;--r1:10deg;--r2:-12deg;animation-duration:10s;opacity:.16}
.b4{left:72%;--r1:22deg;--r2:4deg;animation-duration:12s}
@keyframes sweep{from{transform:rotate(var(--r1))}to{transform:rotate(var(--r2))}}
.floor{position:absolute;left:-10%;right:-10%;bottom:-30vh;height:60vh;border-radius:50%;
  background:radial-gradient(ellipse at center,rgba(120,80,255,.35),rgba(20,10,80,0) 65%)}
@media (prefers-reduced-motion:reduce){.beam{animation:none}}

.screen{display:none;min-height:100vh;min-height:100dvh;padding:16px}
.screen.active{display:flex}

/* --- кнопки --- */
.btn{padding:12px 22px;border-radius:999px;font-weight:700;letter-spacing:.02em;transition:transform .15s,filter .15s}
.btn:hover:not(:disabled){filter:brightness(1.15)}
.btn:active:not(:disabled){transform:scale(.97)}
.btn.primary{background:linear-gradient(#ffd866,#e09a12);color:#1b0f00;box-shadow:0 0 18px rgba(255,190,60,.45)}
.btn.big{font-size:1.15rem;padding:14px 34px}
.btn.ghost{border:2px solid var(--edge);background:rgba(10,10,60,.6);padding:8px 16px;font-size:.9rem}
.btn.small{padding:8px 16px;font-size:.9rem}
.btn.blue{background:linear-gradient(#3c5cff,#1d2fb0);color:#fff}
.icon-btn{position:fixed;top:10px;right:10px;z-index:30;width:42px;height:42px;border-radius:50%;
  border:2px solid var(--edge);background:rgba(10,10,60,.75);font-size:1.2rem}

/* --- старт --- */
#startScreen,#endScreen{align-items:center;justify-content:center}
.start-card{display:grid;grid-template-columns:minmax(200px,340px) minmax(280px,520px);grid-template-areas:"logo logo" "host rules";
  gap:20px 28px;align-items:center;max-width:920px}
.logo{grid-area:logo;text-align:center;text-transform:uppercase;line-height:1.05;
  text-shadow:0 0 18px rgba(140,160,255,.8)}
.logo span{display:block;font-size:clamp(1.1rem,3.5vw,1.8rem);letter-spacing:.12em;color:#cfd8ff}
.logo strong{display:block;font-size:clamp(2rem,7vw,3.8rem);color:var(--gold);letter-spacing:.04em;text-shadow:0 0 22px rgba(255,200,60,.6)}
.start-host{grid-area:host}
.start-host img,.end-host img{width:100%;height:auto;border-radius:20px;border:2px solid rgba(160,180,255,.6);
  box-shadow:0 0 40px rgba(120,100,255,.5);display:block}
.rules{grid-area:rules;background:rgba(10,8,60,.75);border:2px solid var(--edge);border-radius:18px;padding:22px}
.rules h2{color:var(--gold);margin-bottom:10px}
.rules ul{padding-left:20px;margin-bottom:20px;line-height:1.5}
.rules li{margin-bottom:6px}
.rules .btn{width:100%}

/* --- игра --- */
#gameScreen{align-items:stretch;justify-content:center}
.game{display:grid;grid-template-columns:1fr 250px;gap:18px;width:100%;max-width:1200px;align-items:start}
.main{display:flex;flex-direction:column;gap:12px;min-width:0}
.host-row{display:flex;gap:14px;align-items:flex-end;min-height:170px}
.host{flex:0 0 auto}
.host img{width:150px;height:200px;object-fit:cover;object-position:50% 15%;border-radius:16px;border:2px solid rgba(160,180,255,.6);
  box-shadow:0 0 28px rgba(120,100,255,.5);display:block}
.host.talk img{animation:bob .5s ease-in-out 2}
@keyframes bob{50%{transform:translateY(-3px)}}
.bubble{position:relative;flex:1;background:rgba(255,255,255,.96);color:#14104a;border-radius:18px;padding:14px 18px;
  min-height:90px;box-shadow:0 6px 24px rgba(0,0,0,.35);margin-bottom:20px}
.bubble::before{content:"";position:absolute;left:-14px;bottom:22px;border:10px solid transparent;border-right:16px solid rgba(255,255,255,.96);border-left:0}
.bubble-name{font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em;color:#5b3bd6;margin-bottom:4px}
.bubble-text{font-size:1.02rem;line-height:1.4}
.bubble-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.bubble-actions:empty{display:none}

.hud{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.lifelines{display:flex;gap:8px}
.life{width:64px;height:40px;border-radius:50%;border:2px solid var(--edge);background:radial-gradient(#2840d0,#0c0f5a);
  font-weight:800;font-size:.85rem;position:relative;transition:transform .15s}
.life:hover:not(:disabled){transform:scale(1.07)}
.life.used{opacity:.45}
.life.used::after{content:"";position:absolute;inset:-2px;border-radius:50%;
  background:linear-gradient(to top right,transparent 46%,var(--red) 46%,var(--red) 54%,transparent 54%)}
.chip{border:2px solid var(--edge);border-radius:999px;padding:8px 14px;background:rgba(10,10,60,.6);font-size:.9rem}
.chip b{color:var(--gold)}
#walkBtn{margin-left:auto}

.panel{background:rgba(8,6,50,.88);border:2px solid var(--edge);border-radius:16px;padding:14px}
.panel h3{font-size:.95rem;color:var(--gold);margin-bottom:8px}
.bars{display:flex;justify-content:space-around;align-items:flex-end;height:150px;gap:10px}
.bar{flex:1;max-width:70px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.bar .fill{width:100%;height:0;background:linear-gradient(#ffd866,#e08a12);border-radius:6px 6px 0 0;transition:height 1.6s cubic-bezier(.2,.8,.2,1)}
.bar .pct{font-weight:800;margin-bottom:4px;font-size:.9rem}
.bar .lbl{margin-top:4px;font-weight:800;color:var(--gold)}
.phone{display:flex;gap:10px;align-items:flex-start;line-height:1.45}
.phone .ico{font-size:1.8rem}

/* --- плашки --- */
.plate{--hex:polygon(0 50%,22px 0,calc(100% - 22px) 0,100% 50%,calc(100% - 22px) 100%,22px 100%);
  position:relative;display:block;width:100%;padding:2px;clip-path:var(--hex);
  background:linear-gradient(90deg,#6f82d8,#d9e2ff 50%,#6f82d8);text-align:left}
.plate-in{clip-path:var(--hex);background:linear-gradient(#1a2280,#070b3d 55%,#10166a);padding:12px 32px;min-height:52px;
  display:flex;align-items:center;gap:8px;transition:background .25s}
.question .plate-in{justify-content:center;text-align:center;font-size:clamp(1.05rem,2.4vw,1.4rem);min-height:96px;line-height:1.35;padding:16px 40px}
.answers{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;position:relative}
.answer .plate-in{font-size:clamp(.95rem,2vw,1.12rem)}
.answer i{font-style:normal;color:var(--orange);font-weight:800}
.answer:hover:not(:disabled):not(.selected) .plate-in{background:linear-gradient(#2c3bb0,#121a6a)}
.answer:disabled{cursor:default}
.answer.removed{visibility:hidden}
.answer.selected .plate-in{background:linear-gradient(#ffb547,#e07400);color:#1b0b00}
.answer.selected i,.answer.correct i,.answer.wrong i{color:#fff}
.answer.suspense .plate-in{animation:pulse .5s ease-in-out infinite alternate}
@keyframes pulse{from{background:linear-gradient(#ffb547,#e07400)}to{background:linear-gradient(#ffd27a,#ff9a1f)}}
.answer.correct .plate-in{background:linear-gradient(#45e070,#119a36);color:#03200b}
.answer.correct.flash .plate-in{animation:flash .3s steps(2) 4}
@keyframes flash{50%{background:linear-gradient(#1a2280,#070b3d)}}
.answer.wrong .plate-in{background:linear-gradient(#ff5a5f,#a8121a)}

/* --- лесенка --- */
.ladder{background:rgba(8,6,50,.85);border:2px solid var(--edge);border-radius:16px;padding:10px 8px;position:sticky;top:16px}
.ladder ol{list-style:none;display:flex;flex-direction:column-reverse;gap:2px}
.ladder li{display:flex;justify-content:space-between;padding:4px 12px;border-radius:999px;font-weight:700;color:#f2a84a;font-size:.95rem}
.ladder li .n{opacity:.8;width:28px}
.ladder li.safe{color:#fff}
.ladder li.passed{color:#8b8fc7}
.ladder li.current{background:linear-gradient(#ffb547,#e07400);color:#1b0b00}
.ladder li.top{color:var(--gold)}

/* --- финал --- */
.end-card{text-align:center;max-width:480px;background:rgba(10,8,60,.8);border:2px solid var(--edge);border-radius:22px;padding:24px}
.end-host img{max-width:220px;margin:0 auto 14px}
.end-card h2{color:var(--gold);font-size:1.6rem;margin-bottom:6px}
.end-sum{font-size:2.6rem;font-weight:900;text-shadow:0 0 18px rgba(255,200,60,.7);margin:6px 0 10px}
.end-card p{line-height:1.5;margin-bottom:18px}
.end-card.win .end-sum{color:var(--gold);animation:glow 1.2s ease-in-out infinite alternate}
@keyframes glow{to{text-shadow:0 0 40px rgba(255,220,90,1)}}
.confetti{position:fixed;top:-20px;width:10px;height:16px;z-index:40;pointer-events:none;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}

/* --- адаптив --- */
@media (max-width:860px){
  .game{grid-template-columns:1fr}
  .ladder{position:fixed;top:60px;right:10px;z-index:25;width:230px;display:none;box-shadow:0 10px 40px rgba(0,0,0,.6)}
  .ladder.open{display:block}
  .start-card{grid-template-columns:1fr;grid-template-areas:"logo" "host" "rules"}
  .start-host img{max-width:240px;margin:0 auto}
}
@media (max-width:560px){
  .screen{padding:10px}
  .host-row{min-height:0;gap:10px}
  .host img{width:84px;height:112px}
  .bubble{padding:10px 12px;min-height:70px;margin-bottom:10px}
  .bubble-text{font-size:.92rem}
  .answers{grid-template-columns:1fr;gap:8px}
  .plate{--hex:polygon(0 50%,14px 0,calc(100% - 14px) 0,100% 50%,calc(100% - 14px) 100%,14px 100%)}
  .plate-in{padding:10px 22px;min-height:46px}
  .question .plate-in{min-height:80px;padding:12px 24px}
  .life{width:54px;height:36px;font-size:.78rem}
  .hud{gap:8px}
  #walkBtn{margin-left:0;padding:7px 12px;font-size:.82rem}
  .start-host img{max-width:170px}
  .rules{padding:16px}
}
/* место под кнопку звука */
@media (max-width:1320px) and (min-width:861px){.ladder{margin-top:52px;top:60px}}
@media (max-width:860px){.host-row{padding-right:48px}}
/* v2: ведущая Ирина — фото в полный рост */
.start-host,.end-host{display:flex;justify-content:center}
.start-host img{width:auto;max-width:100%;max-height:min(72vh,620px)}
.end-host img{width:auto;max-width:100%;max-height:320px}
.host img{object-position:50% 20%}
@media (max-width:860px){.start-host img{max-height:46vh;max-width:none}}

/* ---------- уведомление ---------- */
.btn:disabled{opacity:.55;cursor:default}
.notice{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:60;max-width:min(92vw,480px);padding:10px 16px;border-radius:12px;background:#3a0d18;border:1px solid #ff8a8a;font-size:.92rem;text-align:center}
.notice[hidden]{display:none}
