/* Экран ступеней, экран вопроса, результат, разбор. */
#scr-tiers { background: radial-gradient(circle at 50% 0%, #2a5bd7, #0b1f63 55%, #050f33); }
.tiers-wrap { display: flex; flex-direction: column; padding: 10px 14px 12px; gap: 8px; }
.scr-head { display: flex; align-items: center; gap: 10px; }
.scr-title { flex: 1; text-align: center; font-size: 24px; font-weight: 900; color: #ffd23f; text-shadow: 0 2px 0 #7a2a00, 0 4px 8px rgba(0,0,0,.5); }
.head-gap { width: 44px; }
.tiers-note { font-size: 12.5px; font-weight: 600; text-align: center; color: #cfdcff; line-height: 1.3; padding: 0 6px; }
.tier-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 8px; }
.tier { position: relative; flex-shrink: 0; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; text-align: left;
  border: 3px solid #ffd23f; color: #fff; font: inherit; box-shadow: 0 0 0 2px #1a0505, inset 0 2px 0 rgba(255,255,255,.3), 0 6px 0 rgba(0,0,0,.35); }
.tier.t1 { background: linear-gradient(135deg, #3c9b3a, #155c22); }
.tier.t2 { background: linear-gradient(135deg, #2f6bff, #0e2f95); }
.tier.t3 { background: linear-gradient(135deg, #e09a00, #8a4a00); }
.tier.t4 { background: linear-gradient(135deg, #e3261b, #6e0707); }
.tier.locked { filter: grayscale(.75) brightness(.7); }
.tier.cur { animation: tcur 1.6s ease-in-out infinite; }
@keyframes tcur { 0%, 100% { box-shadow: 0 0 0 2px #1a0505, inset 0 2px 0 rgba(255,255,255,.3), 0 6px 0 rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 2px #1a0505, 0 0 18px 4px rgba(255,214,60,.7), 0 6px 0 rgba(0,0,0,.35); } }
.tier * { pointer-events: none; }
.tier-medal { width: 64px; height: 70px; flex-shrink: 0; }
.tier-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tier-name { font-size: 19px; font-weight: 900; text-shadow: 0 2px 2px rgba(0,0,0,.5); }
.tier-desc { font-size: 11.5px; font-weight: 600; line-height: 1.25; opacity: .92; }
.tier-bar { position: relative; height: 12px; border-radius: 6px; background: rgba(0,0,0,.4); overflow: hidden; margin-top: 2px; }
.tier-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#fff7b0, #ffc21a); border-radius: 6px; }
.tier-bar em { position: absolute; left: 80%; top: -2px; bottom: -2px; width: 2px; background: #fff; opacity: .8; }
.tier-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; }
.tier-stars { display: flex; gap: 1px; }
.tier-lock { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; }

/* Экран вопроса */
#scr-game { background: #071a5a; }
.game-bg { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 18%, rgba(255,214,90,.25), rgba(255,214,90,0) 45%),
    radial-gradient(circle at 10% 95%, rgba(227,38,27,.45), rgba(227,38,27,0) 45%),
    radial-gradient(circle at 92% 90%, rgba(47,107,255,.5), rgba(47,107,255,0) 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 12px, rgba(255,255,255,0) 12px 24px),
    linear-gradient(#0d2a82, #071a5a 55%, #050f33); }
.game-bg::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #fff 0 33%, #2f6bff 33% 66%, #e3261b 66%); }
#cv { position: absolute; left: 0; top: 0; display: block; pointer-events: none; z-index: 5; }
.qwrap { display: flex; flex-direction: column; padding: 14px 14px 12px; gap: 10px; }
.q-head { display: flex; align-items: center; gap: 10px; }
.q-tier { flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 900; color: #ffd23f; text-shadow: 0 2px 0 #7a2a00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-score { display: flex; align-items: center; gap: 5px; min-width: 86px; height: 40px; padding: 0 10px; justify-content: flex-end; border-radius: 12px;
  background: linear-gradient(#06112f, #13265e); border: 2px solid #ffd23f; font-size: 19px; font-weight: 900; color: #ffe27a; text-shadow: 0 0 8px rgba(255,200,60,.6); }
.q-score.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.q-dots { display: flex; gap: 5px; justify-content: center; }
.q-dots i { flex: 1; max-width: 30px; height: 9px; border-radius: 5px; background: rgba(255,255,255,.18); border: 1px solid rgba(0,0,0,.4); transition: background .2s; }
.q-dots i.now { background: #ffd23f; box-shadow: 0 0 8px rgba(255,210,63,.8); }
.q-dots i.ok { background: #2fd14a; } .q-dots i.bad { background: #ff3b30; }
.q-card { position: relative; flex: 1 1 auto; min-height: 168px; max-height: 300px; padding: 16px 18px 18px; border-radius: 18px; color: #14204a;
  background: linear-gradient(#fffdf4, #fff4d6); border: 3px solid #ffd23f; box-shadow: 0 0 0 3px #7a2a00, 0 10px 24px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 10px; animation: cardin .35s cubic-bezier(.2, 1.3, .5, 1); }
.q-card.out { animation: cardout .22s ease-in forwards; }
@keyframes cardin { 0% { opacity: 0; transform: translateX(40px) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes cardout { 100% { opacity: 0; transform: translateX(-40px) rotate(-2deg); } }
.orn { position: absolute; width: 22px; height: 22px; border: 3px solid #e3261b; pointer-events: none; }
.o1 { left: 6px; top: 6px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.o2 { right: 6px; top: 6px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.o3 { left: 6px; bottom: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.o4 { right: 6px; bottom: 6px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.q-meta { display: flex; justify-content: space-between; align-items: center; }
.q-theme { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 12px; background: #13265e; color: #fff; font-size: 12px; font-weight: 800; }
.q-num { font-size: 13px; font-weight: 900; color: #b3120f; }
.q-text { font-size: 21px; font-weight: 800; line-height: 1.25; text-align: center; flex: 1; display: flex; align-items: center; justify-content: center; }
.q-text.long { font-size: 18px; } .q-text.xlong { font-size: 16px; }
.q-streak { position: absolute; right: 14px; bottom: -14px; padding: 3px 10px; border-radius: 10px; background: linear-gradient(#ffb03a, #e3261b); color: #fff;
  font-size: 13px; font-weight: 900; border: 2px solid #5a0808; opacity: 0; transform: scale(.5); transition: all .2s; }
.q-streak.show { opacity: 1; transform: scale(1); }
.q-answers { display: flex; flex-direction: column; gap: 10px; }
.ans { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px 8px 8px; border-radius: 16px; text-align: left;
  border: 2px solid #050f33; font: inherit; font-size: 17px; font-weight: 800; color: #fff; line-height: 1.2;
  background: linear-gradient(#2f62e8, #1a3fb0 55%, #142f8a); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 5px 0 #071a5a, 0 7px 12px rgba(0,0,0,.4);
  transition: transform .06s, opacity .25s; animation: ansin .3s backwards; }
.ans:nth-child(2) { animation-delay: .05s; } .ans:nth-child(3) { animation-delay: .1s; } .ans:nth-child(4) { animation-delay: .15s; }
@keyframes ansin { 0% { opacity: 0; transform: translateY(14px); } }
.ans:active { transform: translateY(3px); }
.ans * { pointer-events: none; }
.ans b { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff;
  border: 2px solid rgba(0,0,0,.5); box-shadow: inset 0 2px 0 rgba(255,255,255,.45); }
.ans:nth-child(1) b { background: linear-gradient(#ff6a5a, #c51d12); } .ans:nth-child(2) b { background: linear-gradient(#ffe066, #e09a00); color: #4a2a00; }
.ans:nth-child(3) b { background: linear-gradient(#7ee86a, #1f9e2c); } .ans:nth-child(4) b { background: linear-gradient(#e6f0ff, #9fb4e8); color: #10204f; }
.ans span { flex: 1; min-width: 0; }
.ans.ok { background: linear-gradient(#5be86c, #1fae34 55%, #128025); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 5px 0 #0b4a14, 0 0 22px rgba(80,255,110,.7); animation: okpop .4s; }
.ans.bad { background: linear-gradient(#ff6a5a, #d5281b 55%, #a0150e); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 5px 0 #5a0808; animation: shake .4s; }
.ans.dim { opacity: .4; }
.ans.gone { opacity: 0; pointer-events: none; }
.ans .mark { width: 26px; height: 26px; flex-shrink: 0; }
@keyframes okpop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.q-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; margin-top: auto; }
.pill { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px; border-radius: 24px; border: 2px solid #050f33; font: inherit; font-size: 15px; font-weight: 900; color: #fff;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 rgba(0,0,0,.45); white-space: nowrap; }
.pill:active { transform: translateY(3px); }
.pill * { pointer-events: none; }
.pill-life { background: linear-gradient(#ffd75a, #e09a00); color: #4a2a00; }
.pill-life.used { opacity: .35; }
.pill-why { background: linear-gradient(#5a8cff, #1f4fd0); }
.pill-next { background: linear-gradient(#ffd75a, #ff9d00 50%, #f26a00); color: #3a1200; font-size: 17px; padding: 0 18px; animation: m3pulse 1.2s infinite; }
.q-verdict { flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 900; text-shadow: 0 2px 3px rgba(0,0,0,.6); }
.q-verdict.ok { color: #6dff7e; } .q-verdict.bad { color: #ff8a7a; }
.hide { display: none !important; }

/* Почему так? */
.why-q { font-size: 15px; font-weight: 700; color: #cfdcff; text-align: center; line-height: 1.3; }
.why-a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(47,209,74,.18); border: 2px solid #2fd14a; font-size: 17px; font-weight: 900; color: #b8ffbf; }
.why-a svg { flex-shrink: 0; }
.why-t { font-size: 15px; line-height: 1.42; color: #fff; font-weight: 600; padding: 2px 4px; }

/* Результат */
.panel-res { gap: 9px; }
.res-stars { display: flex; justify-content: center; gap: 4px; margin-top: -2px; }
.res-stars svg { width: 58px; height: 58px; animation: starin .45s cubic-bezier(.2, 1.6, .5, 1) backwards; }
.res-stars svg:nth-child(2) { width: 72px; height: 72px; margin-top: -10px; animation-delay: .25s; }
.res-stars svg:nth-child(3) { animation-delay: .5s; }
@keyframes starin { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } }
.res-grid { display: flex; gap: 8px; }
.res-grid div { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 12px; background: rgba(0,0,0,.3); }
.res-grid small { font-size: 11px; font-weight: 700; color: #9fb4e8; }
.res-grid b { font-size: 20px; font-weight: 900; color: #ffe27a; }
.res-tier { display: flex; justify-content: space-between; font-size: 14px; font-weight: 900; color: #fff; }
.res-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(0,0,0,.45); overflow: hidden; border: 2px solid #050f33; }
.res-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #fff 0 33%, #2f6bff 33% 66%, #e3261b 66%); background-size: 330px 100%; transition: width 1.1s ease-out; }
.res-mark { position: absolute; left: 80%; top: 0; bottom: 0; width: 3px; background: #ffd23f; }
.res-rank { min-height: 18px; font-size: 14px; font-weight: 800; text-align: center; color: #ffd23f; line-height: 1.3; }
.res-rank.up { font-size: 16px; color: #fff; padding: 8px; border-radius: 12px; background: linear-gradient(90deg, rgba(227,38,27,.6), rgba(255,210,63,.6)); animation: okpop .6s 2; }
.res-row { display: flex; gap: 8px; }
.res-row .btn { font-size: 15px; padding: 0 8px; }

/* Разбор */
.panel-review { width: 340px; }
.rv-list { max-height: 360px; display: flex; flex-direction: column; gap: 10px; }
.rv { flex-shrink: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.08); border-left: 5px solid #e3261b; display: flex; flex-direction: column; gap: 5px; }
.rv-q { font-size: 14px; font-weight: 800; line-height: 1.3; }
.rv-y { font-size: 13px; font-weight: 700; color: #ff9d8a; text-decoration: line-through; }
.rv-a { font-size: 14px; font-weight: 900; color: #7dff8c; }
.rv-w { font-size: 13px; line-height: 1.38; color: #dfe7ff; font-weight: 600; }
.rv-empty { text-align: center; padding: 24px 8px; font-size: 15px; font-weight: 700; color: #b8ffbf; }
