:root {
  --ice: #9fe3ff;
  --glass-top: rgba(28, 52, 98, .52);
  --glass-bot: rgba(6, 14, 38, .62);
  --glass-line: rgba(190, 230, 255, .2);
  --text: #eef8ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text);
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
canvas { position: fixed; inset: 0; z-index: 2; display: block; }
#cam { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity .6s; }
body.cam-on #cam { opacity: 1; }
body.xr-on #cam { display: none; }
body.xr-on { background: transparent; }

#overlay { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#overlay > * { pointer-events: auto; }
body.xr-on #overlay { pointer-events: auto; touch-action: none; }   /* в AR жесты ловит слой интерфейса */
[hidden] { display: none !important; }

/* общий «ледяной» материал панелей */
.glass, .ico, .dock, #xrHint {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--glass-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
button { font-family: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* верх: круглые кнопки */
#hud .top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; pointer-events: none; }
#hud .top > * { pointer-events: auto; }
.btns { display: flex; gap: 10px; margin-left: auto; }
.ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: #fff;
  transition: transform .15s ease, opacity .2s; }
.ico svg { width: 22px; height: 22px; filter: drop-shadow(0 0 5px rgba(140, 215, 255, .55)); }
.ico .f { fill: rgba(255, 255, 255, .16); }
.ico:active { transform: scale(.9); }
#btnSound .x { display: none; }
#btnSound.off .w { display: none; }
#btnSound.off .x { display: inline; }
#btnSound.off { opacity: .6; }
#btnExit { display: none; }
body.xr-on #btnExit { display: grid; }
body.xr-on #btnCam { display: none; }

/* низ: главная кнопка и док */
#hud .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(env(safe-area-inset-bottom) + 18px);
  display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
#hud .bottom > * { pointer-events: auto; }

.dock { display: flex; gap: 4px; padding: 6px; border-radius: 26px; animation: rise .6s cubic-bezier(.2, .9, .3, 1.2) both;
  background: linear-gradient(180deg, rgba(18, 20, 26, .94), rgba(0, 0, 0, .96)); border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08); }
.dock button { position: relative; width: 84px; height: 62px; border: 0; border-radius: 20px; background: transparent; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px; transition: background .2s, transform .15s ease; }
.dock button svg { width: 25px; height: 25px; color: #fff; filter: drop-shadow(0 0 6px rgba(140, 215, 255, .65)); transition: transform .4s ease; }
.dock button .f { fill: currentColor; stroke: none; }
.dock button span { opacity: .9; }
.dock button:active { transform: scale(.92); background: rgba(255, 255, 255, .1); }
.dock button.tap svg { animation: pop .5s ease; }
#btnShake.tap svg { animation: spin6 .7s cubic-bezier(.3, .8, .3, 1); }
#btnFlip.tap svg { animation: flipY .6s ease; }
#btnReplay.tap svg { animation: spinBack .7s ease; }
@media (hover: hover) { .dock button:hover { background: rgba(255, 255, 255, .07); } .ico:hover { border-color: rgba(190, 230, 255, .45); } }

.cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px 0 18px;
  border: 0; border-radius: 999px; font-size: 15.5px; font-weight: 700; letter-spacing: .2px; color: #04122e;
  background: linear-gradient(135deg, #e3f8ff 0%, #9fe3ff 38%, #4fb0ff 100%);
  box-shadow: 0 10px 28px rgba(79, 176, 255, .45), 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 1px 0 rgba(255, 255, 255, .8) inset;
  transition: transform .15s ease, box-shadow .2s; animation: rise .6s .1s cubic-bezier(.2, .9, .3, 1.2) both; }
.cta svg { width: 24px; height: 24px; stroke-width: 1.8; }
.cta .s { stroke-width: 1.4; opacity: .55; }
.cta::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-20deg);
  animation: shine 3.6s 1.2s ease-in-out infinite; }
.cta:active { transform: scale(.96); }
.cta.busy { opacity: .75; pointer-events: none; }
.cta.alt { height: 44px; font-size: 14px; padding: 0 18px 0 14px; color: var(--text);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot)); border: 1px solid var(--glass-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.cta.alt::after { display: none; }
body.xr-on:not(.xr-placed) .dock, body.xr-on:not(.xr-placed) .cta { display: none; }

/* подсказка в режиме «на стол» */
#xrHint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(300px, calc(100vw - 48px));
  padding: 20px 20px 18px; border-radius: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; transition: opacity .4s, transform .4s; }
#xrHint b { font-size: 16px; }
#xrHint span { font-size: 13px; color: #b9d6f2; }
#xrHint.found { opacity: 0; transform: translate(-50%, -30%); }
#xrHint .scan { position: relative; width: 64px; height: 40px; margin-bottom: 6px; }
#xrHint .scan i { position: absolute; left: 50%; top: 50%; width: 56px; height: 22px; margin: -11px 0 0 -28px; border-radius: 50%;
  border: 2px solid var(--ice); animation: scan 1.8s ease-out infinite; opacity: 0; }
#xrHint .scan i + i { animation-delay: .9s; }

#err { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 70px); transform: translate(-50%, -20px); opacity: 0;
  background: rgba(120, 20, 40, .85); padding: 10px 16px; border-radius: 14px; font-size: 14px; transition: .4s; max-width: 90vw; text-align: center; pointer-events: none; }
#err.show { opacity: 1; transform: translate(-50%, 0); }

#loader { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ice); font-size: 34px; pointer-events: none; }
#loader span { animation: spin 2.4s linear infinite; text-shadow: 0 0 20px var(--ice); }
body.preview { background: #0b1022; }

.dock:has(#btnAlbum:not([hidden])) button, .dock:has(#btnPortal:not([hidden])) button { width: 78px; }
.dock:has(#btnAlbum:not([hidden])):has(#btnPortal:not([hidden])) { gap: 2px; }
.dock:has(#btnAlbum:not([hidden])):has(#btnPortal:not([hidden])) button { width: 72px; font-size: 10.2px; letter-spacing: -.2px; }
@media (max-width: 380px) { .dock button, .dock:has(#btnAlbum:not([hidden])) button, .dock:has(#btnPortal:not([hidden])) button { width: 70px; } }
@media (max-width: 400px) { .dock:has(#btnAlbum:not([hidden])):has(#btnPortal:not([hidden])) button { width: 66px; font-size: 9.8px; letter-spacing: -.2px; } }
@media (max-width: 370px) { .dock:has(#btnAlbum:not([hidden])):has(#btnPortal:not([hidden])) { padding: 5px; }
  .dock:has(#btnAlbum:not([hidden])):has(#btnPortal:not([hidden])) button { width: 60px; font-size: 9px; letter-spacing: -.3px; } }
@media (max-width: 340px) { .dock:has(#btnAlbum:not([hidden])) button { width: 64px; font-size: 10.5px; } }
.dock .badge { position: absolute; top: 9px; right: calc(50% - 17px); width: 9px; height: 9px; border-radius: 50%; background: #ff5a5f; box-shadow: 0 0 0 2px #000; }
#btnAlbum .f2 { fill: rgba(255, 255, 255, .35); }
#btnAlbum.tap svg { animation: pop .5s ease; }
body.xr-on #btnAlbum { display: none; }
body.album-open #hud { visibility: hidden; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shine { 0% { left: -80px; } 45%, 100% { left: calc(100% + 40px); } }
@keyframes pop { 40% { transform: scale(1.25); } }
@keyframes spin6 { from { transform: rotate(0); } to { transform: rotate(180deg); } }
@keyframes spinBack { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes flipY { 50% { transform: scaleX(-1); } }
@keyframes scan { 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* портал и стадион */
#btnPortal svg { color: #fff; }
#btnPortal.tap svg { animation: spinIn .8s cubic-bezier(.3, .8, .3, 1); }
body.xr-on #btnPortal { display: none; }
body.portal-on #hud { visibility: hidden; }
#stadiumUi { display: none; }
body.st-on #stadiumUi { display: block; }
#stadiumUi .top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; pointer-events: none; }
#stadiumUi .top > * { pointer-events: auto; }
#stadiumUi .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(env(safe-area-inset-bottom) + 18px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
#stadiumUi .bottom > * { pointer-events: auto; }
#stadiumUi .ico { background: linear-gradient(180deg, rgba(18, 20, 26, .78), rgba(0, 0, 0, .82)); border-color: rgba(255, 255, 255, .14); }
#stadiumUi .ico svg { filter: none; }
#stSound .x { display: none; }
#stSound.off .w { display: none; }
#stSound.off .x { display: inline; }
#stSound.off { opacity: .6; }
#stadiumUi .dock { gap: 2px; }
#stadiumUi .dock button { width: 72px; font-size: 10.4px; letter-spacing: -.1px; }
#stadiumUi .dock button svg { filter: drop-shadow(0 0 6px rgba(255, 210, 140, .5)); }
#stadiumUi .dock button.on { background: rgba(255, 255, 255, .14); }
#stadiumUi .dock button.on svg { color: #fff6d8; filter: drop-shadow(0 0 8px rgba(255, 236, 190, .95)); }
#stadiumUi .dock.sheet { animation: sheetUp .32s cubic-bezier(.2, .9, .3, 1.15) both; }
#stadiumUi .dock.sheet button { height: 58px; }
#stBack svg { stroke-width: 2; }
#stBack span { color: #ffe1a6; }
@media (max-width: 400px) { #stadiumUi .dock button { width: 66px; font-size: 9.9px; } }
@media (max-width: 370px) { #stadiumUi .dock { padding: 5px; } #stadiumUi .dock button { width: 60px; font-size: 9.2px; letter-spacing: -.3px; } }
#stWave.tap svg { animation: waveUp .8s ease; }
#stShot.tap svg, #stShow.tap svg, #stLoud.tap svg, #stPhoto.tap svg, #stCam.tap svg { animation: pop .5s ease; }
#stView.tap svg { animation: spinIn .7s ease; }
body.st-busy #stadiumUi .dock.main button:not(#stBack):not(.on) { opacity: .45; }

/* счёт мини-игры */
#stGame { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 20, 26, .86), rgba(0, 0, 0, .9)); border: 1px solid rgba(255, 255, 255, .14); }
#stGame b { font-size: 24px; font-weight: 900; min-width: 16px; text-align: center; }
#stGame #stOf { font-size: 13px; font-weight: 700; opacity: .7; }
#stDots { display: flex; gap: 5px; margin-left: 4px; }
#stDots u { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .18); text-decoration: none; transition: background .3s, transform .3s; }
#stDots u.hit { background: #6dff9b; box-shadow: 0 0 8px #6dff9b; transform: scale(1.15); }
#stDots u.miss { background: #ff5a6a; }
#stGame.pop b { animation: pop .45s ease; }

#stGame.duel #stScore { letter-spacing: 1px; }
#stGame.blitz #stOf { opacity: .95; color: #ffe1a6; font-variant-numeric: tabular-nums; }
#stGame.blitz.low #stOf { color: #ff6b6b; animation: pop .5s ease infinite; }
#stGame img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--st-a, #ffcf6b); margin-left: 2px; }

/* выбор режима броска */
#stModes { width: min(100%, 430px); padding: 14px 12px 12px; border-radius: 28px; pointer-events: auto;
  background: linear-gradient(180deg, rgba(26, 28, 38, .82), rgba(6, 7, 12, .9)); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: sheetUp .38s cubic-bezier(.2, .9, .3, 1.15) both; }
#stModes .mh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 6px 11px; }
#stModes .mh b { font-size: 17px; font-weight: 900; letter-spacing: .3px; }
#stModes .mh span { font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .55); white-space: nowrap; }
#stModes .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#stModes .mode { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 10px 10px 11px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .16); border-color: color-mix(in srgb, var(--m) 45%, transparent); color: #fff; text-align: left; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--m) 34%, transparent), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 6px 18px rgba(0, 0, 0, .3); animation: modeIn .45s cubic-bezier(.2, .9, .3, 1.2) both; transition: transform .15s ease; }
#stModes .mode:nth-child(2) { animation-delay: .06s; }
#stModes .mode:nth-child(3) { animation-delay: .12s; }
#stModes .mode:active { transform: scale(.95); }
#stModes .mode::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-120%); animation: modeShine 3.6s ease-in-out infinite; }
#stModes .mode:nth-child(2)::after { animation-delay: 1.2s; }
#stModes .mode:nth-child(3)::after { animation-delay: 2.4s; }
#stModes .art { display: grid; place-items: center; align-self: stretch; height: 50px; margin-bottom: 4px; }
#stModes .art svg { width: 66px; height: 46px; overflow: visible; fill: none; stroke: var(--m); stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--m) 70%, transparent)); }
#stModes .arc { stroke-dasharray: 2 5; opacity: .55; }
#stModes .d { fill: rgba(255, 255, 255, .14); stroke: none; }
#stModes .d.on { fill: var(--m); }
#stModes .rim { stroke: #ff7a3c; stroke-width: 2.4; filter: none; }
#stModes .net { stroke: rgba(255, 255, 255, .7); stroke-width: 1.3; }
#stModes .track { stroke: rgba(255, 255, 255, .14); stroke-width: 4; }
#stModes .prog { stroke-width: 4; stroke-dasharray: 80 107; transform: rotate(-90deg); transform-origin: 32px 23px; animation: blitzRing 2.4s linear infinite; }
#stModes .knob { stroke: rgba(255, 255, 255, .7); stroke-width: 2.4; }
#stModes .art text { fill: #fff; stroke: none; font: 900 15px system-ui, sans-serif; }
#stModes .duel { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; }
#stModes .duel .you, #stModes .duel .pface { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--m); box-shadow: 0 0 12px color-mix(in srgb, var(--m) 70%, transparent); }
#stModes .duel .you { display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 900; background: linear-gradient(160deg, #2b2f3d, #11131a); }
#stModes .duel .pface { flex: none; object-fit: cover; background: #000; }
#stModes .duel u { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); z-index: 2; white-space: nowrap; padding: 1px 4px; border-radius: 6px; text-decoration: none;
  font-size: 10px; font-weight: 900; font-style: italic; background: var(--m); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); animation: vsPulse 1.6s ease-in-out infinite; }
#stModes .mode b { font-size: 15px; font-weight: 900; letter-spacing: .2px; }
#stModes .mode small { font-size: 10.5px; font-weight: 600; line-height: 1.25; color: rgba(255, 255, 255, .66); min-height: 26px; }
#stModes .mode em { margin-top: 5px; padding: 3px 7px; border-radius: 9px; font-size: 9.8px; font-weight: 800; font-style: normal; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  color: #fff; background: rgba(255, 255, 255, .1); color: color-mix(in srgb, var(--m) 40%, #fff); background: color-mix(in srgb, var(--m) 18%, transparent); }
@media (max-width: 400px) { #stModes .duel { gap: 15px; } #stModes .duel .you, #stModes .duel .pface { width: 34px; height: 34px; } #stModes .duel .you { font-size: 11px; } }
@media (max-width: 370px) { #stModes { padding: 12px 9px 10px; } #stModes .mode { padding: 9px 8px 10px; } #stModes .mode small { font-size: 9.8px; } #stModes .mh span { display: none; } }
@keyframes modeIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes modeShine { 0%, 62% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes blitzRing { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -107; } }
@keyframes vsPulse { 50% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.15); } }

/* игрок говорит: лицо и реплика */
#stCoach { position: absolute; left: 14px; right: 14px; top: calc(env(safe-area-inset-top) + 70px); display: flex; align-items: center; gap: 10px; pointer-events: none; }
#stCoach.show { animation: coachIn .4s cubic-bezier(.2, .9, .3, 1.25) both; }
#stCoach.hide { animation: coachOut .35s ease both; }
#stCoach img { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--st-a, #ffcf6b); box-shadow: 0 0 16px var(--st-a, #ffcf6b), 0 6px 18px rgba(0, 0, 0, .6); background: #000; }
#stCoach.yes img { animation: coachYes .7s ease; }
#stCoach.no img { animation: coachNo .6s ease; }
#stCoach p { position: relative; margin: 0; max-width: 250px; padding: 9px 14px; border-radius: 16px 16px 16px 4px; font-size: 14.5px; font-weight: 800; line-height: 1.25;
  color: #fff; background: linear-gradient(180deg, rgba(22, 24, 32, .9), rgba(4, 4, 8, .92)); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
@keyframes coachIn { from { opacity: 0; transform: translateX(-16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes coachOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes coachYes { 30% { transform: translateY(-9px) scale(1.08); } 55% { transform: translateY(0); } 75% { transform: translateY(-4px); } }
@keyframes coachNo { 20% { transform: translateX(-6px) rotate(-6deg); } 45% { transform: translateX(6px) rotate(6deg); } 70% { transform: translateX(-3px); } }

/* подсказки и всплывающие надписи */
#stToast { position: absolute; left: 0; right: 0; top: 38%; text-align: center; pointer-events: none; opacity: 0; transform: scale(.7); }
#stToast.show { animation: toast 1.9s cubic-bezier(.2, .9, .3, 1.2) both; }
#stToast b { display: block; font-size: clamp(34px, 11vw, 60px); font-weight: 900; letter-spacing: 1px; text-transform: uppercase; line-height: 1;
  color: #fff; text-shadow: 0 0 22px var(--st-a, #ffcf6b), 0 4px 18px rgba(0, 0, 0, .8); }
#stToast span { display: block; margin-top: 8px; font-size: 15px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .9); text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
#stToast.small b { font-size: clamp(22px, 7vw, 34px); }
#stHint { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 112px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none; font-size: 15px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); white-space: nowrap; }
#stHint .hand { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 16px rgba(255, 255, 255, .8); animation: swipeUp 1.3s ease-in-out infinite; }
#stMeter { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 74px); transform: translateX(-50%); width: min(320px, calc(100vw - 48px)); text-align: center; pointer-events: none; }
#stMeter .bar { height: 18px; border-radius: 9px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .25); overflow: hidden; }
#stMeter .bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, #46e07a, #ffd84a 60%, #ff4d4d); box-shadow: 0 0 14px rgba(255, 220, 90, .8); transition: width .08s linear; }
#stMeter span { display: block; margin-top: 8px; font-size: 15px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
#stMeter.full .bar i { animation: meterFlash .25s steps(2) infinite; }

/* фото со стадиона */
#snap { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadeIn .25s ease both; }
#snap .card { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; }
#snap img { display: block; max-width: min(88vw, 520px); max-height: calc(100vh - 170px); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .15); animation: snapIn .45s cubic-bezier(.2, .9, .3, 1.2) both; }
#snap .row { display: flex; gap: 10px; align-items: center; }
#snap .cta { height: 46px; padding: 0 20px; font-size: 15px; }
#stTitle { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 74px); text-align: center; pointer-events: none;
  opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .9, .3, 1.2); }
#stTitle.show { opacity: 1; transform: none; }
#stTitle b { display: block; font-size: clamp(30px, 9vw, 48px); font-weight: 900; letter-spacing: 1px; text-transform: uppercase; line-height: 1.02;
  background: linear-gradient(100deg, #fff 30%, #ffe7a8 50%, #fff 70%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .8)); animation: titleShine 2.6s ease-in-out infinite; }
#stTitle span { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255, 255, 255, .82); text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none !important; }
#flash.go { animation: flashOut .55s ease-out; }
@keyframes flashOut { from { opacity: .55; } to { opacity: 0; } }
@keyframes spinIn { from { transform: rotate(0) scale(1); } 50% { transform: rotate(-200deg) scale(.7); } to { transform: rotate(-360deg) scale(1); } }
@keyframes waveUp { 30% { transform: translateY(-4px); } 60% { transform: translateY(2px); } }
@keyframes titleShine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes sheetUp { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast { 0% { opacity: 0; transform: scale(.6); } 18% { opacity: 1; transform: scale(1.06); } 28% { transform: scale(1); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08) translateY(-10px); } }
@keyframes swipeUp { 0% { transform: translateY(40px); opacity: 0; } 25% { opacity: 1; } 75% { transform: translateY(-34px); opacity: 1; } 100% { transform: translateY(-44px); opacity: 0; } }
@keyframes meterFlash { 50% { filter: brightness(1.8); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes snapIn { from { opacity: 0; transform: scale(.85) rotate(-2deg); } }

#desktopGate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .78);
}
.desktop-gate__card {
  max-width: 440px;
  width: min(440px, 100%);
  padding: 28px 26px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(28, 52, 98, .94), rgba(6, 14, 38, .96));
  border: 1px solid rgba(190, 230, 255, .28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.desktop-gate__card b {
  display: block;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: #eef8ff;
}
html.ar-desktop #loader { display: none !important; }
