/* v9: игровое поле подстраивается под высоту экрана (ноутбуки, низкие окна) */

/* --free — сколько высоты остаётся полю после шапки игры */
.g-wrap { --free: max(230px, calc(100dvh - 200px)); }
@media (max-width: 1099px) { .g-wrap { --free: max(230px, calc(100dvh - 236px)); } }

/* квадратные поля: ширина не больше доступной высоты */
.sc-grid { max-width: min(440px, var(--free)); }
.grid9, .sm-grid, .ml-grid { max-width: min(380px, calc(var(--free) - 20px)); }
.od-grid { max-width: min(420px, calc(var(--free) - 30px)); }
.arena { max-width: min(460px, calc(var(--free) - 20px)); }
.pr-grid { max-width: min(420px, calc((var(--free) - 30px) / 1.25)); }
.sw-face { width: min(72vw, 300px, calc(var(--free) - 130px)); }
.rpad { min-height: min(340px, calc(var(--free) - 30px)); }
.mq { max-width: min(420px, calc((var(--free) - 300px) * 2.3)); min-width: 220px; }
.cn-field { max-width: min(520px, calc((var(--free) - 120px) * 1.25)); }
@media (min-width: 1100px) {
  .sc-grid { max-width: min(540px, var(--free)); }
  .grid9 { max-width: min(440px, calc(var(--free) - 20px)); }
  .arena { max-width: min(560px, calc(var(--free) - 20px)); }
  .od-grid { max-width: min(500px, calc(var(--free) - 30px)); }
}

/* низкий экран: плотнее отступы и кнопки */
@media (max-height: 820px) {
  .g-wrap { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .g-side { padding: 10px 0; gap: 10px; }
  .gs-card { padding: 12px 14px; gap: 7px; }
  .gs-bank { font-size: 28px; }
  .stage { gap: 10px; }
  .gt { font-size: 16px; }
  .gpts b { font-size: 20px; }
  .ghead .gicon { width: 36px; height: 36px; }
  .pad { gap: 6px; }
  .pad button { padding: 9px 0; font-size: 20px; border-radius: 13px; }
  .mans, .tm-out { font-size: 32px; min-height: 40px; }
  .st-opts button { height: 64px; }
  .sq-opts button, .cn-opts button { height: 56px; }
  .lg-opts button { height: 50px; }
  .lg-card { padding: 14px; gap: 8px; }
  .lg-lines li { padding: 7px 12px; font-size: 15px; }
  .cp-side { min-height: 110px; }
  .tm-sig { width: 76px; height: 76px; font-size: 30px; }
  .sw-btn { padding: 16px; }
  .sq-row { padding: 16px 10px; }
  .ar-row { padding: 18px 0; }
  .ar-pad { grid-template-columns: repeat(3, 70px); grid-template-rows: repeat(3, 54px); gap: 6px; }
  .mz-pad { grid-template-rows: 42px 42px; }
  .sm-head div { padding: 6px 14px; }
  .sm-head b { font-size: 26px; }
  /* кодовый замок */
  .lk-clues { gap: 5px; }
  .lk-row { padding: 5px 10px; gap: 10px; border-radius: 13px; }
  .lk-g i { width: 26px; height: 30px; font-size: 17px; border-radius: 7px; }
  .lk-row small { font-size: 13px; }
  .lk-in span { width: 48px; height: 54px; font-size: 28px; border-radius: 13px; }
}

/* широкий, но низкий экран (ноутбук): замок в две колонки — подсказки слева, ввод справа */
@media (min-width: 900px) and (max-height: 820px) {
  .g-wrap:has(.lk-clues) { width: min(680px, 100%); }
  .stage:has(> .lk-clues) {
    display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 16px; row-gap: 10px;
    grid-template-areas: "clues bar" "clues in" "clues st" "clues pad"; align-content: center;
  }
  .stage:has(> .lk-clues) > .lk-clues { grid-area: clues; align-content: center; }
  .stage:has(> .lk-clues) > .pr-bar { grid-area: bar; align-self: end; }
  .stage:has(> .lk-clues) > .lk-in { grid-area: in; }
  .stage:has(> .lk-clues) > .lk-st { grid-area: st; }
  .stage:has(> .lk-clues) > .pad { grid-area: pad; }
}

/* ---------- нижнее меню на 6 вкладок */
nav.tabs { grid-template-columns: repeat(6, 1fr); width: min(680px, calc(100% - 24px)); }
@media (max-width: 480px) { nav.tabs button span { font-size: 9.5px; letter-spacing: -.01em; } nav.tabs { width: calc(100% - 16px); } }

/* ---------- Тренировка */
.train-promo { width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 22px; text-align: left;
  background: linear-gradient(110deg, rgba(198,255,61,.12), rgba(61,214,255,.08) 60%, rgba(14,15,27,.7)); border: 1px solid rgba(198,255,61,.3); transition: transform .2s var(--ease), border-color .2s; }
.train-promo:hover { transform: translateY(-3px); border-color: var(--lime); }
.tp-thumbs { display: flex; flex: none; }
.tp-thumbs i { width: 46px; height: 60px; border-radius: 10px; background: #0b0c18 var(--img) center / cover; border: 2px solid #0b0c18; box-shadow: 0 6px 16px -6px var(--c); margin-left: -14px; transform: rotate(var(--r, 0deg)); }
.tp-thumbs i:first-child { margin-left: 0; --r: -6deg; } .tp-thumbs i:nth-child(2) { --r: -2deg; } .tp-thumbs i:nth-child(3) { --r: 2deg; } .tp-thumbs i:nth-child(4) { --r: 6deg; }
.tp-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tp-txt b { font-family: var(--display); font-size: 20px; }
.tp-txt small { color: #c4c8dc; font-size: 13px; }
.tp-txt em { font-style: normal; color: var(--lime); font-weight: 800; }
.tp-go { flex: none; font-family: var(--display); font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 12px; color: #07070d; background: linear-gradient(100deg, var(--lime), var(--cyan)); }
@media (max-width: 480px) { .tp-go { display: none; } .tp-thumbs i { width: 38px; height: 50px; } }

.train-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.train-head .page-h { margin-bottom: 8px; }
.train-head .page-sub { max-width: 560px; margin: 0; }
.train-stats { display: flex; gap: 10px; }
.train-stats span { display: grid; justify-items: center; min-width: 108px; padding: 10px 14px; border-radius: 16px; background: rgba(14,15,27,.7); border: 1px solid var(--line2); }
.train-stats b { font-family: var(--display); font-size: 22px; }
.train-stats small { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.train-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.train-tags button { padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #c4c8dc; background: rgba(14,15,27,.7); border: 1px solid var(--line2); transition: background .15s, color .15s; }
.train-tags button small { color: var(--muted); margin-left: 3px; }
.train-tags button.on { color: #07070d; background: linear-gradient(100deg, var(--lime), var(--cyan)); border-color: transparent; }
.train-tags button.on small { color: rgba(7,7,13,.6); }
.train-grid { grid-template-columns: repeat(5, 1fr); padding-bottom: 110px; }
@media (max-width: 1100px) { .train-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .train-grid { grid-template-columns: repeat(2, 1fr); } }
.gc-badge.best { border-color: var(--gold); color: var(--gold); }
.gc-badge.fresh { border-color: var(--lime); color: var(--lime); background: rgba(7,7,13,.75); }

/* ---------- Поворот */
.sp-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sp-box { aspect-ratio: 1; width: min(100%, 230px, calc(var(--free) - 210px)); justify-self: center; display: grid; place-items: center; padding: 14%; border-radius: 24px; background: var(--card-solid); border: 2px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.sp-box svg { width: 100%; height: 100%; fill: color-mix(in srgb, var(--c) 75%, #fff); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 60%, transparent)); transition: transform .45s var(--ease); }
.sp-b svg { transform: rotate(var(--tilt, 0deg)); }
.sp-box.okb { border-color: var(--lime); box-shadow: 0 0 30px -8px var(--lime); }
.sp-box.badb { border-color: var(--danger); }
.sp-arrow { font-size: 30px; color: var(--c); opacity: .8; }
.sp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-opts button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 16px 8px; border-radius: 20px; background: var(--card-solid); border: 2px solid var(--line); outline: 3px solid transparent; outline-offset: 3px; transition: transform .1s, border-color .15s; }
.sp-opts button:active { transform: scale(.96); }
.sp-opts b { font-family: var(--display); font-size: 22px; }
.sp-opts small { color: var(--muted); font-size: 12px; }
.sp-opts kbd { position: absolute; left: 10px; top: 8px; font-size: 11px; color: var(--muted); font-family: var(--display); }
.sp-opts button.chosen { border-color: var(--c); }
.sp-opts button.right { outline-color: var(--lime); background: color-mix(in srgb, var(--lime) 16%, var(--card-solid)); }

/* ---------- Снимок */
.sn-lives { display: flex; justify-content: center; gap: 6px; font-size: 20px; color: #ff5a7a; min-height: 24px; }
.sn-lives i { font-style: normal; transition: opacity .3s, transform .3s; }
.sn-lives i.lost { opacity: .18; transform: scale(.8); }
.sn-grid { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; width: 100%; max-width: min(400px, calc(var(--free) - 70px)); margin: 0 auto; }
.sn-grid button { aspect-ratio: 1; border-radius: calc(44px / var(--n) + 6px); background: var(--card-solid); border: 1px solid var(--line2); transition: background .12s, box-shadow .12s, transform .1s; }
.sn-grid button:active { transform: scale(.93); }
.sn-grid button.lit { background: radial-gradient(circle, #fff, var(--c)); box-shadow: 0 0 30px var(--c); }
.sn-grid button.pick { background: color-mix(in srgb, var(--c) 30%, var(--card-solid)); }
.sn-grid button.ok { background: var(--c); box-shadow: 0 0 18px -2px var(--c); }
.sn-grid button.bad { background: var(--danger); animation: shake .3s; }
.sn-grid button.miss { border: 2px dashed var(--c); }
.sn-grid.locked button { pointer-events: none; }

/* ---------- Ритм */
.rh-lines { display: grid; gap: 8px; padding: 12px 16px; border-radius: 18px; background: var(--card-solid); border: 1px solid var(--line); }
.rh-line { position: relative; height: 16px; margin: 0 8px; border-radius: 8px; background: rgba(255,255,255,.05); }
.rh-line i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); animation: rise .3s var(--ease) both; }
.rh-line i.me { background: #fff; box-shadow: 0 0 10px #fff; }
.rh-pad { position: relative; width: min(260px, 60vw, calc(var(--free) - 170px)); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 4px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 30%, #1b1d33), #0d0e1c 70%); border: 3px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 50px -16px var(--c), inset 0 0 40px rgba(0,0,0,.6); touch-action: manipulation; transition: border-color .2s; }
.rh-pad b { font-size: 56px; line-height: 1; }
.rh-pad small { font-family: var(--display); font-size: 13px; color: var(--muted); min-height: 16px; }
.rh-ring { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--c); opacity: 0; pointer-events: none; }
.rh-pad.go { border-color: var(--c); }
.rh-pad.go small { color: var(--c); }
.rh-pad.beat { animation: rh-beat .28s var(--ease); }
.rh-pad.beat .rh-ring { animation: rh-ring .5s ease-out; }
.rh-pad.hit { animation: rh-beat .2s var(--ease); }
.rh-pad.hit .rh-ring { animation: rh-ring .4s ease-out; border-color: #fff; }
@keyframes rh-beat { 40% { transform: scale(.93); } }
@keyframes rh-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }

/* ---------- Близнецы */
.tw-grid { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 7px; width: 100%; max-width: min(440px, calc(var(--free) - 40px)); margin: 0 auto; container-type: inline-size; }
.tw-grid button { aspect-ratio: 1; border-radius: calc(40px / var(--n) + 6px); background: var(--card-solid); border: 1px solid var(--line2); font-size: calc(100cqw / var(--n) * .5); line-height: 1; display: grid; place-items: center; transition: transform .1s, background .15s, box-shadow .15s; animation: rise .25s var(--ease) both; }
.tw-grid button:active { transform: scale(.92); }
.tw-grid button.ok { background: color-mix(in srgb, var(--c) 35%, var(--card-solid)); border-color: var(--c); box-shadow: 0 0 20px -4px var(--c); transform: scale(1.05); }
.tw-grid button.bad { animation: shake .3s; background: rgba(255,77,94,.3); }
.tw-grid.done button:not(.ok) { opacity: .35; }

/* ---------- события: Турнир дня (повторные попытки), корона «Чемпион дня» */
.evc-stats { flex-wrap: wrap; row-gap: 6px; }
.evc-mine { font-size: 12.5px; font-weight: 800; color: #e6e8f5; }
.evc-mine em, .evp-mine b { font-style: normal; color: var(--gold); }
.evc.done.ev-hourly .evc-go { background: linear-gradient(100deg, #ffd36b, #ff9a2e); color: #07070d; }
.evp-mine { margin: 4px 0 -2px; font-weight: 700; color: #e6e8f5; }
.ev-note { margin: -4px 0 10px; }
.st-mid small { display: block; font-size: 11.5px; color: var(--muted); }
.st-row.paid .st-score { color: var(--gold); }
.crowns { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; margin: 6px 0 18px; border-radius: 18px; font-size: 22px; border: 1px solid rgba(255,200,61,.4); }
.crowns b { font-family: var(--display); font-size: 16px; color: var(--gold); }
.crowns small { flex-basis: 100%; font-size: 12px; color: var(--muted); }

/* ---------- Лестница и Трон */
.ld-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
@media (max-width: 760px) { .ld-row { grid-template-columns: 1fr; } }
.ld-card { position: relative; overflow: hidden; isolation: isolate; width: 100%; text-align: left; display: grid; border-radius: 24px; padding: 16px;
  background: radial-gradient(120% 90% at 85% 0%, rgba(255,200,61,.22), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(138,92,255,.25), transparent 60%), rgba(14,15,27,.85);
  border: 1px solid rgba(255,200,61,.35); box-shadow: 0 20px 50px -24px rgba(255,200,61,.5); transition: transform .2s var(--ease), border-color .2s; }
.ld-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.ld-body { display: grid; gap: 8px; }
.ld-name { font-family: var(--display); font-weight: 900; font-size: 26px; background: linear-gradient(90deg, #ffe08a, #ffb347, #ff8be0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-body > small { color: #c9cde0; font-size: 13px; line-height: 1.45; }
.ld-body > small b { color: var(--gold); }
.ld-card .evc-go { background: linear-gradient(100deg, #ffd36b, #ff9a2e); }
.ld-art { position: relative; height: 92px; margin-bottom: 6px; }
.ld-art i { position: absolute; left: calc(var(--i) * 17%); bottom: calc(var(--i) * 16px); width: 22%; height: 12px; border-radius: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.ld-art i.past { background: color-mix(in srgb, var(--gold) 45%, transparent); border-color: var(--gold); }
.ld-art i.cur { background: var(--gold); box-shadow: 0 0 18px var(--gold); animation: pulseGlow 1.2s infinite; }
.ld-art b { position: absolute; right: 2%; top: -4px; font-size: 30px; filter: drop-shadow(0 0 14px rgba(255,200,61,.8)); }
.sh-head .ld-art { width: 120px; height: 80px; flex: none; }
.ld-screen .ld-art, .result .ld-art { width: min(320px, 80%); margin: 0 auto 4px; }
.ld-games { display: flex; gap: 6px; flex-wrap: wrap; }
.ld-games.big { justify-content: center; gap: 10px; }
.ld-g { display: grid; place-items: center; padding: 2px; border-radius: 12px; border: 1px solid transparent; opacity: .75; }
.ld-g .gicon { --s: 32px; border-radius: 10px; }
.ld-games.big .ld-g .gicon { --s: 44px; }
.ld-g.past { opacity: .35; filter: grayscale(.6); }
.ld-g.cur { opacity: 1; border-color: var(--c); box-shadow: 0 0 16px -2px var(--c); }
.ld-side .gs-op.out { opacity: .4; }
.ld-side .gs-op.out b { text-decoration: line-through; }
.st-row.ld-out { border-color: var(--danger); background: rgba(255,77,94,.1); }

.th-list { display: grid; gap: 10px; }
.th-card { width: 100%; text-align: left; display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: radial-gradient(100% 120% at 0% 0%, rgba(255,200,61,.14), transparent 55%), rgba(14,15,27,.85); border: 1px solid rgba(255,200,61,.3); transition: transform .2s var(--ease), border-color .2s; }
.th-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.th-top { display: flex; align-items: center; gap: 10px; position: relative; }
.th-crown { position: absolute; left: 12px; top: -16px; font-size: 20px; filter: drop-shadow(0 0 8px rgba(255,200,61,.9)); z-index: 1; }
.th-who { flex: 1; min-width: 0; display: grid; }
.th-who b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-who small { font-size: 12px; color: var(--muted); }
.th-time { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--line2); }
.th-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.th-games > span { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.th-games .gicon { --s: 34px; border-radius: 10px; }
.th-games small { font-family: var(--display); font-size: 11.5px; color: #e6e8f5; }
.th-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.th-foot > span > small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.th-foot b { font-family: var(--display); font-size: 18px; color: var(--gold); }
.th-foot em { font-style: normal; font-weight: 900; font-size: 13px; padding: 9px 14px; border-radius: 12px; color: #07070d; background: linear-gradient(100deg, #ffd36b, #ff9a2e); }
.th-empty { display: flex; gap: 12px; align-items: center; padding: 18px; border-radius: 20px; }
.th-empty > .th-ico { font-size: 34px; opacity: .5; filter: grayscale(.5); }
.th-empty b { display: block; font-family: var(--display); }
.th-empty small { color: var(--muted); font-size: 13px; line-height: 1.4; }

.th-sheet { display: grid; gap: 12px; }
.th-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.th-king { position: relative; flex: none; }
.th-king > .th-cr { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font-size: 30px; filter: drop-shadow(0 0 12px rgba(255,200,61,.9)); }
.th-scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.th-scores div { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.th-scores b { display: block; font-size: 13px; }
.th-scores small { font-family: var(--display); font-size: 16px; color: var(--gold); }
.th-vs { display: flex; align-items: center; gap: 22px; margin: 10px 0; }
.th-vs div { display: grid; justify-items: center; }
.th-vs small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.th-vs b { font-family: var(--display); font-size: 36px; }
.th-vs > span { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 22px; }
.res-score small { font-size: .45em; color: var(--muted); }
/* ---------- Лестница славы: страница-испытание */
.evp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.evc .evp-video { border-radius: inherit; }
.evc-line { font-size: 13px; color: #e6e8f5; font-weight: 700; }
.ev-glory .evc-name { background: linear-gradient(90deg, #ffe08a, #ffb347, #ff8be0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ev-glory .evc-go { background: linear-gradient(100deg, #ffd36b, #ff9a2e); color: #07070d; }
.glory .evp-txt h2 { background: linear-gradient(90deg, #ffe08a, #ffb347, #ff8be0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glory-hero::before { background: linear-gradient(90deg, rgba(9,10,20,.95) 0%, rgba(9,10,20,.8) 50%, rgba(9,10,20,.72) 100%), linear-gradient(0deg, #090a14 0%, transparent 40%); }
.glory-hero { gap: 24px; justify-content: space-between; flex-wrap: wrap; min-height: 460px; }
.glory-tower { position: relative; display: grid; justify-items: center; gap: 6px; width: min(300px, 100%); margin-left: auto; }
.gt-throne { position: relative; display: grid; justify-items: center; gap: 2px; padding: 16px 22px 12px; border-radius: 22px 22px 10px 10px; text-align: center;
  background: linear-gradient(180deg, rgba(255,200,61,.28), rgba(42,26,8,.85)); border: 2px solid var(--gold); box-shadow: 0 0 50px -10px rgba(255,200,61,.8); }
.gt-throne > i { position: absolute; top: -24px; font-style: normal; font-size: 32px; filter: drop-shadow(0 0 14px rgba(255,200,61,.9)); }
.gt-throne b { font-family: var(--display); font-size: 15px; margin-top: 4px; }
.gt-throne small { font-size: 12px; color: var(--gold); font-weight: 800; }
.gt-empty { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-family: var(--display); font-size: 26px; color: var(--gold); border: 2px dashed var(--gold); }
.gt-step { width: calc(56% + var(--k) * 11%); height: 30px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(180deg, rgba(255,207,107,.22), rgba(28,20,48,.9)); border: 1px solid rgba(255,207,107,.45); box-shadow: 0 6px 18px -8px rgba(255,200,61,.6); animation: rise .5s var(--ease) both; animation-delay: calc(var(--k) * 80ms); }
.gt-step span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ffe2a6; }
.gt-base { width: 100%; padding: 8px; text-align: center; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--muted); background: rgba(255,255,255,.05); border: 1px dashed var(--line2); }
@media (max-width: 760px) { .glory-tower { margin: 0 auto; } .glory-hero { min-height: 0; } }
.glory[data-mode="ladder"] .seg-ladder, .glory[data-mode="throne"] .seg-throne { opacity: 1; filter: none; background: linear-gradient(110deg, rgba(255,200,61,.28), rgba(255,140,40,.14)); border-color: var(--gold); box-shadow: 0 10px 30px -10px rgba(255,200,61,.6); }
.glory[data-mode="ladder"] .seg-ladder .seg-ic, .glory[data-mode="throne"] .seg-throne .seg-ic { background: linear-gradient(135deg, #ffd36b, #ff9a2e); }
.glory[data-mode="ladder"] .seg-ladder .seg-check, .glory[data-mode="throne"] .seg-throne .seg-check { transform: scale(1); }
.glory[data-mode="ladder"] .pane-ladder, .glory[data-mode="throne"] .pane-throne { display: grid; }
.glory-cta { display: grid; gap: 10px; justify-items: center; padding: 18px; border-radius: 22px; text-align: center; }
.glory-cta .btn { width: 100%; background: linear-gradient(100deg, #ffd36b, #ff9a2e); color: #07070d; }
.th-page-hero { min-height: 300px; }
.glory .btn[data-throne-go]:not([disabled]) { background: linear-gradient(100deg, #ffd36b, #ff9a2e); color: #07070d; }
.th-page-hero .tp-back { position: absolute; left: 16px; top: 14px; }
/* ---------- Легенда: страница записи */
.lg-hero { min-height: 520px; background: radial-gradient(120% 90% at 80% 10%, rgba(255,95,210,.35), transparent 55%), radial-gradient(80% 70% at 10% 90%, rgba(61,214,255,.25), transparent 60%), #0b0c18; }
.legend-page .evp-txt h2 { font-size: clamp(54px, 10vw, 96px); letter-spacing: .04em; background: linear-gradient(90deg, #ff8be0, #b59bff, #7fe6ff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255,95,210,.45)); }
.lg-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.lg-count small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ff9be4; font-weight: 800; }
.lg-count > b { font-family: var(--display); font-size: 22px; }
.lg-count span { color: #c9cde0; }
.lg-action { display: grid; gap: 8px; max-width: 460px; }
.lg-cta { background: linear-gradient(100deg, #ff5fd2, #8a5cff) !important; color: #fff !important; }
.lg-state { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid var(--line2); font-weight: 700; line-height: 1.4; }
.lg-state.ok { border-color: var(--lime); background: color-mix(in srgb, var(--lime) 12%, transparent); }
.lg-list { display: flex; flex-wrap: wrap; gap: 10px; }
.lg-p { display: grid; justify-items: center; gap: 3px; width: 62px; opacity: .65; }
.lg-p.paid { opacity: 1; }
.lg-p.paid .ava { box-shadow: 0 0 0 2px var(--lime), 0 0 14px -2px var(--lime); }
.lg-p small { font-size: 10.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9cde0; }

/* ---------- Легенда: вступительный фильм (рисованная версия, пока нет legend-intro.mp4) */
#game.legend-intro { background: radial-gradient(90% 70% at 50% 100%, rgba(255,95,210,.28), transparent 60%), radial-gradient(60% 50% at 50% 0%, rgba(127,230,255,.18), transparent 60%), #05050b; }
.li-stage { position: relative; width: 100%; min-height: 100%; display: grid; place-items: center; align-content: center; gap: 26px; padding: 30px 16px; }
.li-film { width: min(1100px, 100%); max-height: 76vh; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(255,95,210,.5); }
.li-podium { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 240px; }
.li-podium i { position: relative; width: 120px; display: grid; place-items: start center; padding-top: 10px; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.2); }
.li-podium i b { font-family: var(--display); font-size: 34px; color: rgba(255,255,255,.75); }
.li-podium .p3 { height: 90px; order: 3; } .li-podium .p2 { height: 140px; order: 1; } .li-podium .p1 { height: 200px; order: 2; border-color: rgba(255,95,210,.7); box-shadow: 0 0 40px -6px rgba(255,95,210,.7); }
.li-hero { position: absolute; bottom: 0; left: 50%; width: 22px; height: 46px; margin-left: -11px; border-radius: 11px 11px 4px 4px; background: linear-gradient(180deg, #fff, #ff8be0); box-shadow: 0 0 24px #ff8be0; transition: transform 1.4s var(--ease); }
.li-podium[data-k="1"] .li-hero, .li-podium[data-k="2"] .li-hero { transform: translate(130px, -92px); }
.li-podium[data-k="3"] .li-hero, .li-podium[data-k="4"] .li-hero { transform: translate(-130px, -142px); }
.li-podium[data-k="5"] .li-hero, .li-podium[data-k="6"] .li-hero { transform: translate(0, -202px); }
.li-line { min-height: 40px; margin: 0; font-family: var(--display); font-size: clamp(18px, 3vw, 26px); text-align: center; color: #f1e8ff; opacity: 0; }
.li-line.on { animation: li-in 1.7s ease both; }
.li-line.big { font-size: clamp(54px, 12vw, 110px); letter-spacing: .06em; background: linear-gradient(90deg, #ff8be0, #b59bff, #7fe6ff); -webkit-background-clip: text; background-clip: text; color: transparent; animation: li-big 1.7s ease both; }
@keyframes li-in { 0% { opacity: 0; transform: translateY(10px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes li-big { 0% { opacity: 0; transform: scale(1.4); filter: blur(8px); } 30% { opacity: 1; transform: scale(1); filter: none; } 100% { opacity: 1; } }
.li-meta { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ff9be4; }
.li-skip { width: auto; position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
.ktag { margin-left: 4px; filter: drop-shadow(0 0 6px rgba(255,200,61,.8)); }
.sub.center { text-align: center; }

/* ---------- страницы испытаний: фон во всю ширину и высоту экрана, видео не обрезано по краям */
#sheet.full .evp-hero {
  width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0;
  padding-left: max(16px, calc((100vw - 1180px) / 2 + 16px));
  padding-right: max(16px, calc((100vw - 1180px) / 2 + 16px));
  background-position: center 35%;
}
#sheet.full .evp-hero .tp-back { left: max(16px, calc((100vw - 1180px) / 2 + 16px)); }
#sheet.full .evp-video { object-position: center 35%; }
@media (min-width: 761px) {
  #sheet.full .evp-hero { min-height: 100vh; min-height: 100svh; padding-bottom: 48px; }
  #sheet.full .th-page-hero { min-height: 70vh; }
}
/* полноэкранный фон: затемняем только слева под текстом и внизу, сам ролик виден */
#sheet.full .evp-hero::before, #sheet.full .glory-hero::before {
  background: linear-gradient(90deg, rgba(9,10,20,.82) 0%, rgba(9,10,20,.45) 45%, rgba(9,10,20,.15) 100%), linear-gradient(0deg, #090a14 0%, rgba(9,10,20,.55) 18%, transparent 45%);
}

/* тихое фоновое обновление лобби — без повторных анимаций появления */
body.quiet *, body.quiet *::before, body.quiet *::after { animation: none !important; transition: none !important; }

/* ---------- Новости арены: карточка в лобби */
.news-card { position: relative; width: 100%; display: grid; text-align: left; border-radius: 24px; overflow: hidden; isolation: isolate;
  background: #0c0f24; border: 1px solid rgba(61,155,255,.45); box-shadow: 0 20px 50px -24px rgba(61,155,255,.7); transition: transform .25s var(--ease), border-color .2s; }
.news-card:hover { transform: translateY(-3px); border-color: #3d9bff; }
.nc-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1a3a var(--img, none) center / cover no-repeat; }
.nc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nc-studio { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 30%, #2a6bff 0%, #10245a 55%, #070b1d 100%); }
.nc-studio::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: 14%; height: 22%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #d8dff0, #8592b5); box-shadow: 0 -2px 0 #ff5fa2 inset; }
.nc-studio i { position: absolute; bottom: 30%; width: 15%; aspect-ratio: .8; border-radius: 50% 50% 12px 12px; background: linear-gradient(180deg, #1c1f33 0 38%, #263159 38%); }
.nc-studio i:first-child { left: 30%; } .nc-studio i:last-child { right: 30%; }
.nc-live { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: .12em; color: #fff; background: #e1203f; box-shadow: 0 4px 14px rgba(225,32,63,.5); }
.nc-live .live-dot { background: #fff; }
.nc-bar { display: flex; align-items: stretch; min-height: 34px; background: #08112b; border-top: 2px solid #3d9bff; overflow: hidden; }
.nc-bar > b { flex: none; display: grid; place-items: center; padding: 0 10px; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: #07070d; background: #ffd23d; }
.nc-tick { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 10px; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-tick.in { animation: nc-in .45s var(--ease); }
@keyframes nc-in { from { opacity: 0; transform: translateY(8px); } }
.nc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 12px; }
.nc-foot b { display: block; font-family: var(--display); font-size: 17px; }
.nc-foot small { font-size: 12px; color: var(--muted); }
.nc-foot em { font-style: normal; font-weight: 900; font-size: 13px; padding: 8px 12px; border-radius: 10px; color: #fff; background: linear-gradient(100deg, #3d9bff, #7c6bff); }

/* ---------- Новости арены: студия на весь экран, справа (на телефоне снизу) — список сюжетов */
#sheet.news .sheet-card { padding: 0; overflow: hidden; background: #05070f; }
.nw { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100%; }
.nw-stage { position: relative; min-height: 0; overflow: hidden; background: #000; }
.nw-screen { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.nw-screen .nc-live { left: 20px; top: 20px; font-size: 13px; padding: 6px 12px; }
.nw-screen.talking .nc-live .live-dot { animation: pulseGlow 1.2s infinite; }
.nw-x { position: absolute; right: 18px; top: 16px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; color: #fff;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.nw-x:hover { background: rgba(0,0,0,.8); }
/* титры как в эфире: заголовок на плашке + текст ведущего */
.nw-lower { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 60px clamp(16px, 4vw, 48px) clamp(18px, 3vw, 34px);
  background: linear-gradient(180deg, transparent, rgba(3,6,18,.82) 45%, rgba(3,6,18,.95)); }
.nw-title { display: inline-block; max-width: 100%; padding: 6px 14px; margin-bottom: 10px; border-radius: 4px; font-family: var(--display); font-size: clamp(16px, 2.2vw, 26px);
  color: #07070d; background: #ffd23d; box-shadow: 6px 0 0 #e1203f; }
.nw-sub { max-width: 980px; font-size: clamp(14px, 1.5vw, 19px); line-height: 1.5; color: #eef1ff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.nw-sub b { display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 4px; font-size: .75em; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #3d9bff; vertical-align: 2px; }
.nw-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); background: #0a0d1f; border-left: 1px solid var(--line); }
.nw-side .nw-list { flex: 1; max-height: none; align-content: start; }
@media (max-width: 900px) {
  .nw { grid-template-columns: 1fr; grid-template-rows: minmax(0, 58%) minmax(0, 1fr); }
  .nw-side { border-left: 0; border-top: 1px solid var(--line); }
  .nw-lower { padding-top: 40px; }
}
.nw-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nw-ctl .btn { width: auto; padding: 10px 18px; }
.nw-list { display: grid; gap: 8px; max-height: 34vh; overflow-y: auto; padding-right: 4px; }
.nw-item { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; padding: 12px 14px; text-align: left; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.nw-item.on { border-color: #3d9bff; background: rgba(61,155,255,.12); }
.nw-item b { display: block; font-size: 14px; }
.nw-item small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: #c4c8dc; }
.nw-item em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.nw-tag { padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #07070d; background: #8fb4ff; }
.nw-tag.t-legend { background: #ff6bd5; } .nw-tag.t-throne, .nw-tag.t-ladder { background: #ffd23d; } .nw-tag.t-tournament { background: #ff9a2e; }
.nw-tag.t-boss { background: #ff9a2e; } .nw-tag.t-wanted { background: #ff3d5e; color: #fff; }
.nw-tag.t-win { background: #c6ff3d; } .nw-tag.t-season { background: #3dd6ff; } .nw-tag.t-club { background: #2ee6a8; } .nw-tag.t-record { background: #b48cff; }

/* ---------- 3D-лиса в полный рост (public/fox/*.webp) ---------- */
.fox.fox3d { display: flex; justify-content: center; align-items: flex-end; overflow: visible; filter: drop-shadow(0 12px 22px rgba(255,106,31,.35)); }
.fox3d .f3-in { position: relative; height: 100%; max-width: 100%; display: inline-block; }
.fox3d img { max-height: 100%; }
.fox3d img { height: 100%; width: auto; max-width: none; display: block; user-select: none; -webkit-user-drag: none; }
.fox3d .fox3d-crown { position: absolute; left: var(--cx, 60%); top: var(--cy, 14%); width: 26%; transform: translate(-50%, -80%) rotate(-6deg); filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); animation: float2 2.4s ease-in-out infinite; }
.fox3d.happy { --cx: 52%; --cy: 11%; }
.fox3d.focus { --cx: 47%; --cy: 16%; }
.fox3d.sad { --cx: 64%; --cy: 17%; }
.fox3d.wink { --cx: 51%; --cy: 14%; }
.fox3d.focus img { animation: fox3dBreath 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes fox3dBreath { 50% { transform: scale(1.025, .985); } }
/* лиса теперь в полный рост — главным местам нужна высота */
.res-fox { width: 180px; height: 170px; }
.rankup .fox, .land-final .fox { width: 180px; height: 180px; }
.ban .fox { width: 180px; height: 170px; }
.empty .fox { width: 140px; height: 140px; }
.fox-load { width: 150px; height: 150px; }
.form-fox { width: 150px; height: 175px; top: -158px; right: 18px; }
body.quiet .fox3d img, body.quiet .fox3d-crown { animation: none; }

/* ---------- Босс Джинджер: широкий баннер рейда, лиса справа */
.evc.ev-boss { grid-column: 1 / -1; min-height: 230px; border-color: rgba(255,122,46,.6);
  background: radial-gradient(60% 90% at 82% 40%, rgba(255,122,46,.45), transparent 70%), linear-gradient(120deg, #1a0b14, #2a0f0a 55%, #120612); }
.evc.ev-boss::before { background: linear-gradient(90deg, rgba(5,5,12,.92) 0%, rgba(5,5,12,.7) 45%, transparent 75%); }
.ev-boss .evc-body { max-width: min(560px, 68%); }
.boss-fox { position: absolute; right: 2%; bottom: 0; height: 96%; width: 34%; z-index: -1; pointer-events: none; }
.boss-fox .fox { width: 100%; height: 100%; }
.ev-boss .evc-go { background: linear-gradient(100deg, #ff9a2e, #ff3d5e); color: #fff; }
.boss-hp { position: relative; display: block; height: 22px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,122,46,.5); }
.boss-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff3d5e, #ff9a2e 60%, #ffd23d); box-shadow: 0 0 18px rgba(255,90,60,.6); transition: width .6s var(--ease); }
.boss-hp b { position: relative; display: block; text-align: center; font-size: 11px; font-weight: 900; letter-spacing: .08em; line-height: 20px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.boss-hero { background: radial-gradient(55% 80% at 78% 45%, rgba(255,122,46,.5), transparent 70%), linear-gradient(120deg, #14070f, #2a0f0a 60%, #0d0510); }
.boss-hero-fox { position: absolute; right: max(16px, calc((100vw - 1180px) / 2)); bottom: 0; height: 88%; width: min(40vw, 460px); pointer-events: none; }
.boss-hero-fox .fox { width: 100%; height: 100%; }
.boss-hero .evp-txt { max-width: min(620px, 58%); }
.boss-hero .boss-hp { height: 28px; margin: 6px 0 4px; } .boss-hero .boss-hp b { line-height: 26px; font-size: 13px; }
.gs-boss .boss-hp { margin: 8px 0; }
.g-wrap.result .boss-hp { width: min(420px, 100%); margin: 10px auto 0; }
@media (max-width: 700px) {
  .ev-boss .evc-body { max-width: 100%; }
  .boss-fox { width: 46%; height: 70%; top: 8px; bottom: auto; opacity: .9; }
  .boss-hero-fox { opacity: .35; width: 70vw; }
  .boss-hero .evp-txt { max-width: 100%; }
}

/* ---------- Охота за головой: доска «Разыскиваются» */
.wanted .wt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.wt-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "ava mid prize" "act act act"; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,61,94,.12), rgba(255,154,46,.06)); border: 1px solid rgba(255,90,60,.35); }
.wt-row > .ava, .wt-row > :first-child { grid-area: ava; }
.wt-row.me { border-color: var(--lime); }
.wt-mid { grid-area: mid; min-width: 0; } .wt-mid b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wt-mid small { color: var(--muted); font-size: 12px; }
.wt-prize { grid-area: prize; text-align: right; } .wt-prize small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #ff9a7a; }
.wt-prize b { font-family: var(--display); font-size: 20px; display: inline-flex; align-items: center; gap: 4px; color: #ffd23d; }
.wt-hunt { grid-area: act; width: 100%; padding: 9px 14px; background: linear-gradient(100deg, #ff3d5e, #ff9a2e); color: #fff; }
.wt-hunt small { display: block; font-size: 11px; opacity: .85; }
.wt-tag { grid-area: act; justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(198,255,61,.15); color: var(--lime); }
.wt-tag.off { background: rgba(255,255,255,.06); color: var(--muted); }
.wt-empty { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,90,60,.35); }
.wt-empty .fox { width: 64px; height: 70px; flex: none; } .wt-empty p { margin: 0; font-size: 14px; line-height: 1.45; color: #c4c8dc; }
.wt-last { margin-top: 8px; }

/* ---------- Реванш «всё или ничего» */
.x2-btn { background: linear-gradient(100deg, #ffd23d, #ff7a2e); color: #07070d; }
.x2-btn small { display: block; font-size: 11px; font-weight: 700; opacity: .8; }
.ev-boss-page .ev-play:not([disabled]) { background: linear-gradient(100deg, #ff9a2e, #ff3d5e); color: #fff; }

/* Бесплатный кубок дня — первым в «Испытаниях дня», на всю ширину */
.evc.ev-daily { grid-column: 1 / -1; min-height: 210px; border-color: rgba(198,255,61,.55); box-shadow: 0 0 0 1px rgba(198,255,61,.25), 0 18px 50px -20px rgba(198,255,61,.45); }
.evc.ev-daily .evc-tag { background: var(--lime); color: #07070d; font-weight: 800; }
.evc.ev-daily .evc-go { background: linear-gradient(100deg, #c6ff3d, #5cffb0); color: #07070d; }
.evc.ev-daily.done .evc-go { background: rgba(255,255,255,.1); color: #fff; }
.nw-tag.t-cup { background: #c6ff3d; }

/* Игры по лигам: подпись уровня в лиге и разделы в «Тренировке» */
.tp-level { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: rgba(14,15,27,.6); border: 1px solid var(--line2); color: #c4c8dc; font-size: 13px; line-height: 1.45; }
.train-leagues { padding-bottom: 110px; display: grid; gap: 26px; }
.train-leagues .train-grid { padding-bottom: 0; }
.train-lg-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; font-size: 18px; }
.train-lg-h .trow-em { width: 34px; height: 34px; display: inline-grid; place-items: center; }
.train-lg-h .trow-em svg { width: 100%; height: 100%; }
.train-lg-h em { font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: #07070d; background: var(--lime); }
.train-lg.tier-pro .train-lg-h em { background: #3de0ff; }
.train-lg.tier-elite .train-lg-h em { background: #ffb02e; }
.train-lg.tier-legend .train-lg-h em { background: linear-gradient(90deg, #ff6bd5, #ffd23d); }
.train-lg-h small { flex-basis: 100%; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Кошелёк USDC */
.balance { cursor: pointer; border: 0; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.balance .bal-plus { font-style: normal; font-weight: 900; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #07070d; font-size: 14px; line-height: 1; }
.wl { display: grid; gap: 12px; }
.wl h2 { margin: 0; }
.wl-bal { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, rgba(39,117,202,.35), rgba(14,15,27,.7)); border: 1px solid rgba(39,117,202,.5); }
.wl-bal .coin { width: 36px; height: 36px; }
.wl-bal small { display: block; color: var(--muted); font-size: 12px; }
.wl-bal b { font-size: 26px; }
.wl-net { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9ec3ff; }
.wl-amts { display: flex; gap: 8px; flex-wrap: wrap; }
.wl-amts .chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(14,15,27,.7); color: #fff; font-weight: 800; cursor: pointer; }
.wl-qr { display: grid; place-items: center; padding: 10px; }
.wl-qr img { border-radius: 16px; background: #fff; padding: 8px; }
.wl-amt { text-align: center; margin: 0; font-size: 16px; }
.wl-wait { text-align: center; }
.wl-terms { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #c4c8dc; }
.wl-hist { display: grid; gap: 6px; }
.wl-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(14,15,27,.6); border: 1px solid var(--line2); }
.wl-row div { flex: 1; min-width: 0; }
.wl-row b { display: block; }
.wl-row small { color: var(--muted); font-size: 12px; }
.wl-row a { color: #9ec3ff; font-size: 12px; font-weight: 700; text-decoration: none; }
#wdAddr { font-family: ui-monospace, monospace; font-size: 13px; }

.wl-cta { width: 100%; display: block; text-align: center; }
.wl-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.wl-or::before, .wl-or::after { content: ''; flex: 1; height: 1px; background: var(--line2); }

.land-social a { color: #9ec3ff; font-weight: 700; text-decoration: none; }

/* Задания с наградой в USDC */
.quest.soon { opacity: .55; }
.q-rw.soon { color: var(--muted); }
.q-goto { background: rgba(255,200,61,.1); border: 1px solid rgba(255,200,61,.35); padding: 8px 10px; border-radius: 11px; cursor: pointer; }
.q-goto:hover { background: rgba(255,200,61,.2); }
.q-foot { margin: 6px 8px 4px; color: var(--muted); font-size: 11px; }

/* Игры «увидел → выбери» */
.gi-emo { font-style: normal; font-size: 1.4em; line-height: 1; }
.qz { display: grid; gap: 14px; width: min(560px, 100%); margin: 0 auto; }
.qz-tbar { height: 6px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.qz-tbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--lime), var(--cyan)); border-radius: inherit; }
.qz-q { min-height: 120px; display: grid; place-items: center; text-align: center; transition: opacity .15s; }
.qz-q.gone { opacity: 0; }
.qz-ask { margin: 0; text-align: center; color: var(--muted); font-weight: 700; min-height: 1.2em; }
.qz-big { font-family: var(--display); font-size: clamp(26px, 6vw, 44px); font-weight: 900; letter-spacing: .02em; line-height: 1.15; }
.qz-text { font-size: 18px; line-height: 1.5; max-width: 460px; }
.qz-task { color: #c4c8dc; font-weight: 700; margin-bottom: 6px; }
.qz-target { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; }
.qz-emo { font-size: 1.9em; line-height: 1; }
.qz-shadow { filter: brightness(0) drop-shadow(0 0 1px rgba(255,255,255,.6)); font-size: 4em; }
.qz-dot { display: inline-block; width: calc(30px * var(--s, 1)); height: calc(30px * var(--s, 1)); border-radius: 50%; box-shadow: inset 0 -4px 8px rgba(0,0,0,.25); }
.qz-tile { display: inline-block; width: 26px; height: 26px; border-radius: 6px; }
.qz-dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 260px; }
.qz-dots.wide { max-width: 420px; }
.qz-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.qz-split { display: flex; gap: 24px; align-items: center; justify-content: center; }
.qz-split .qz-dots { max-width: 170px; }
.qz-grid { display: grid; grid-template-columns: repeat(var(--n), 52px); gap: 6px; }
.qz-cell { width: 52px; height: 52px; border-radius: 12px; background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 28px; }
.qz-cell.num { font-family: var(--display); font-weight: 900; font-size: 22px; }
.qz-blank { display: block; width: 100%; height: 34px; }
.qz-letter { font-family: var(--display); font-size: 1.4em; }
.qz-shape { font-size: 2em; line-height: 1; }
.qz-bar { display: block; height: 14px; border-radius: 9px; background: linear-gradient(90deg, var(--lime), var(--cyan)); }
.qz-frac { display: inline-grid; text-align: center; line-height: 1.05; font-family: var(--display); font-size: 26px; }
.qz-frac b:first-child { border-bottom: 3px solid currentColor; padding: 0 6px; }
.qz-mid { color: var(--lime); }
.qz-clock { width: 150px; height: 150px; }
.qz-light { padding: 14px; border-radius: 30px; background: #0d0f1c; border: 2px solid #2a2e48; }
.qz-opts { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.qz-opts button { min-height: 58px; padding: 10px; border-radius: 16px; background: rgba(20,22,40,.9); border: 1px solid var(--line2); color: #fff; font: inherit; font-weight: 800; font-size: 17px; display: grid; place-items: center; cursor: pointer; transition: transform .08s, background .15s, border-color .15s; touch-action: manipulation; }
.qz-opts button:active { transform: scale(.96); }
.qz-opts button.pick { border-color: var(--cyan); }
.qz-opts button.ok { background: rgba(46,230,107,.22); border-color: #2ee66b; }
.qz-opts button.bad { background: rgba(255,77,94,.22); border-color: #ff4d5e; }
.qz-opts button .qz-bar { width: 100%; }
@media (max-width: 520px) { .qz-opts button { min-height: 52px; font-size: 15px; } .qz-grid { grid-template-columns: repeat(var(--n), 44px); } .qz-cell { width: 44px; height: 44px; } }
