:root {
  --bg:#060914;
  --bg-2:#0b1020;
  --panel:rgba(17,20,31,.72);
  --panel-strong:rgba(14,17,27,.92);
  --line:rgba(255,255,255,.10);
  --line-strong:rgba(255,255,255,.18);
  --text:#f8f9ff;
  --muted:#9198aa;
  --soft:#cfd4df;
  --accent:#9b6bff;
  --accent-2:#47d7ff;
  --good:#68ffbd;
  --warn:#ffc95a;
  --danger:#ff4b72;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --usable-h:100dvh;
  --usable-w:100vw;
  --header-h:68px;
  --nav-h:74px;
  --xs:6px;
  --s:10px;
  --m:14px;
  --l:20px;
  --xl:28px;
  --radius:20px;
  --radius-sm:14px;
  --shadow:0 18px 60px rgba(0,0,0,.42);
  --blur:20px;
  --content-max:560px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--text);touch-action:manipulation;overscroll-behavior:none}
button,input{font:inherit}
button{color:inherit}
button:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}

.app-shell{
  position:fixed;
  inset:0;
  width:var(--usable-w);
  height:var(--usable-h);
  min-height:0;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 16% 18%, rgba(90,119,255,.22), transparent 29%),
    radial-gradient(circle at 86% 24%, rgba(43,221,255,.15), transparent 27%),
    radial-gradient(circle at 52% 88%, rgba(187,92,255,.16), transparent 32%),
    linear-gradient(180deg,#060914 0%, #0a1020 52%, #080b15 100%);
  padding-left:var(--safe-left);
  padding-right:var(--safe-right);
}

.app-shell::before{
  content:"";
  position:absolute;inset:0;z-index:-3;pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px, transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.68),transparent 88%);
}

.ambient{position:absolute;border-radius:999px;filter:blur(72px);opacity:.24;z-index:-2;pointer-events:none;animation:ambientFloat 10s ease-in-out infinite alternate}
.ambient-a{width:240px;height:240px;background:#683cff;left:-90px;top:18%}
.ambient-b{width:280px;height:280px;background:#00b7ff;right:-170px;bottom:2%;animation-delay:-4s}
.scanline{position:absolute;inset:0;pointer-events:none;z-index:80;opacity:.035;background:repeating-linear-gradient(0deg,transparent 0 3px,#fff 4px 4px)}
@keyframes ambientFloat{to{transform:translate3d(22px,-24px,0) scale(1.12)}}

.glass{background:linear-gradient(180deg,rgba(24,28,42,.78),rgba(10,12,20,.62));border:1px solid var(--line);box-shadow:inset 0 1px 0 rgba(255,255,255,.04),var(--shadow);backdrop-filter:blur(var(--blur));-webkit-backdrop-filter:blur(var(--blur))}

.app-header{
  position:absolute;
  z-index:50;
  top:calc(var(--safe-top) + 8px);
  left:max(10px,var(--safe-left));
  right:max(10px,var(--safe-right));
  height:var(--header-h);
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:9px 10px 9px 12px;
}
.brand-button{background:none;border:0;display:flex;align-items:center;gap:9px;padding:0;min-width:0;text-align:left;cursor:pointer}
.brand-mark{width:34px;height:34px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:linear-gradient(135deg,rgba(255,255,255,.09),rgba(255,255,255,.02));color:white;box-shadow:0 0 22px rgba(121,86,255,.18)}
.brand-mark img{width:21px;height:21px;filter:brightness(0) invert(1)}
.brand-lockup{display:flex;flex-direction:column;line-height:1;min-width:0}
.brand-lockup strong{font-size:13px;letter-spacing:.14em;font-weight:900;white-space:nowrap}
.brand-lockup small{margin-top:5px;color:#9f77ff;font-size:8px;font-weight:800;letter-spacing:.18em}
.header-actions{display:flex;align-items:center;gap:7px}
.coin-pill{height:38px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:13px;background:rgba(0,0,0,.26);padding:0 10px 0 6px;font-weight:900;font-size:13px;min-width:72px;justify-content:center}
.coin-pill img{width:26px;height:26px;filter:drop-shadow(0 0 8px rgba(255,175,35,.38))}
.icon-button,.pause-button{border:1px solid var(--line);background:rgba(0,0,0,.30);width:38px;height:38px;border-radius:13px;display:grid;place-items:center;cursor:pointer;color:#dbe0ed;font-weight:900}

.screen-host{
  position:absolute;
  top:calc(var(--safe-top) + 8px + var(--header-h) + 10px);
  bottom:calc(var(--safe-bottom) + var(--nav-h) + 12px);
  left:max(10px,var(--safe-left));
  right:max(10px,var(--safe-right));
  min-height:0;
  overflow:hidden;
  z-index:5;
}
.screen{
  position:absolute;inset:0;
  display:none;
  min-height:0;
  overflow:hidden;
  width:100%;height:100%;
  opacity:0;
  transform:translateY(8px) scale(.995);
}
.screen.is-active{display:block;animation:screenIn .28s ease forwards}
@keyframes screenIn{to{opacity:1;transform:none}}

.bottom-nav{
  position:absolute;
  z-index:50;
  left:max(10px,var(--safe-left));
  right:max(10px,var(--safe-right));
  bottom:calc(var(--safe-bottom) + 8px);
  height:var(--nav-h);
  border-radius:21px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  padding:7px;
  gap:4px;
}
.bottom-nav button{background:transparent;border:0;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#72798b;cursor:pointer;position:relative;overflow:hidden}
.bottom-nav button::before{content:"";position:absolute;inset:3px;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.015));opacity:0;transform:scale(.86);transition:.2s ease}
.bottom-nav button span{font-size:18px;line-height:1;position:relative;z-index:1}
.bottom-nav button small{font-size:7.5px;letter-spacing:.11em;font-weight:900;position:relative;z-index:1}
.bottom-nav button.is-active{color:white}
.bottom-nav button.is-active::before{opacity:1;transform:scale(1);box-shadow:inset 0 0 0 1px rgba(159,120,255,.24),0 0 18px rgba(108,73,255,.08)}

/* HOME */
.home-grid{width:100%;height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;max-width:var(--content-max);margin:0 auto}
.hero-stage{position:relative;min-height:0;border:1px solid rgba(255,255,255,.07);border-radius:24px;overflow:hidden;background:radial-gradient(circle at 50% 55%,rgba(86,217,255,.15),rgba(96,88,255,.14) 38%,rgba(10,15,30,.90) 74%,rgba(7,10,19,.98) 100%);box-shadow:inset 0 0 70px rgba(105,68,255,.04)}
.hero-stage::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.025),transparent 28%),repeating-linear-gradient(90deg,transparent 0 49px,rgba(255,255,255,.02) 50px 50px);mask-image:linear-gradient(to bottom,#000,transparent 82%)}
.hero-stage::after{content:"";position:absolute;left:16%;right:16%;bottom:10%;height:8%;background:radial-gradient(ellipse,rgba(131,91,255,.32),transparent 70%);filter:blur(12px)}
.hero-caption{position:absolute;top:16px;left:17px;z-index:4;display:flex;flex-direction:column;gap:4px}
.hero-caption strong{font-size:18px;letter-spacing:.01em}
.eyebrow{font-size:8px;letter-spacing:.18em;color:#9299ac;font-weight:900;text-transform:uppercase}
.hero-form{position:absolute;z-index:3;left:50%;top:52%;transform:translate(-50%,-50%);width:min(68%,280px);max-height:78%;object-fit:contain;filter:drop-shadow(0 12px 28px rgba(0,0,0,.20)) drop-shadow(0 0 30px rgba(86,211,255,.18));animation:heroBob 4.8s ease-in-out infinite;user-select:none}
@keyframes heroBob{0%,100%{transform:translate(-50%,-50%) translateY(0) rotate(-.5deg)}50%{transform:translate(-50%,-50%) translateY(-8px) rotate(.5deg)}}
.hero-halo{position:absolute;left:50%;top:54%;border-radius:50%;border:1px solid rgba(166,129,255,.28);transform:translate(-50%,-50%);box-shadow:0 0 28px rgba(118,74,255,.09)}
.halo-1{width:52%;aspect-ratio:1;animation:haloPulse 3.3s ease-in-out infinite}
.halo-2{width:72%;aspect-ratio:1;border-style:dashed;opacity:.45;animation:spinSlow 20s linear infinite}
@keyframes haloPulse{50%{transform:translate(-50%,-50%) scale(1.07);opacity:.55}}
@keyframes spinSlow{to{transform:translate(-50%,-50%) rotate(360deg)}}
.hero-coins{position:absolute;inset:0;z-index:2;pointer-events:none}
.hero-coin{position:absolute;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,rgba(255,226,142,.22),transparent 68%);filter:drop-shadow(0 0 14px rgba(255,184,47,.28))}
.hero-coin img{width:28px;height:28px;animation:coinSpin 2.6s linear infinite}
.hero-coin.coin-a{left:11%;top:18%;animation:coinFloatA 5s ease-in-out infinite}
.hero-coin.coin-b{right:12%;top:33%;animation:coinFloatB 5.7s ease-in-out infinite}
.hero-coin.coin-c{left:16%;bottom:19%;animation:coinFloatC 4.7s ease-in-out infinite}
.hero-coin.coin-d{right:17%;bottom:17%;animation:coinFloatD 5.2s ease-in-out infinite}
@keyframes coinSpin{50%{transform:scaleX(.35)}100%{transform:scaleX(1)}}
@keyframes coinFloatA{50%{transform:translate(8px,-10px)}}
@keyframes coinFloatB{50%{transform:translate(-7px,-9px)}}
@keyframes coinFloatC{50%{transform:translate(7px,8px)}}
@keyframes coinFloatD{50%{transform:translate(-8px,7px)}}
.hero-orbit{position:absolute;left:50%;top:54%;width:82%;height:34%;border:1px solid rgba(89,220,255,.12);border-radius:50%;transform:translate(-50%,-50%) rotate(-7deg)}
.orbit-two{width:66%;height:27%;transform:translate(-50%,-50%) rotate(18deg);border-color:rgba(173,106,255,.16)}
.form-power-chip{position:absolute;z-index:4;right:13px;bottom:13px;border:1px solid var(--line);border-radius:999px;background:rgba(0,0,0,.34);padding:7px 10px;font-size:8px;letter-spacing:.12em;font-weight:900;color:#d9c9ff}
.home-actions{display:grid;gap:8px}
.cta{border:1px solid var(--line);border-radius:16px;min-height:46px;padding:10px 14px;font-size:11px;font-weight:900;letter-spacing:.08em;cursor:pointer;transition:transform .15s ease,filter .15s ease,background .15s ease;position:relative;overflow:hidden}
.cta:active{transform:scale(.985)}
.cta-primary{background:linear-gradient(110deg,#ffffff 0%,#edf5ff 38%,#c8eaff 70%,#d8cbff 100%);color:#08090d;border-color:rgba(255,255,255,.55);box-shadow:0 12px 28px rgba(141,106,255,.18),inset 0 1px 0 white}
.cta-primary::after{content:"";position:absolute;top:-80%;left:-35%;width:28%;height:260%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);transform:rotate(18deg);animation:shine 3.8s ease-in-out infinite}
@keyframes shine{0%,60%{left:-45%;opacity:0}70%{opacity:.7}100%{left:125%;opacity:0}}
.cta-secondary{background:rgba(255,255,255,.045);color:#eef0f7}
.cta-ghost{background:transparent;color:#989eb0}
.pulse-cta{height:62px;display:grid;grid-template-columns:1fr auto;grid-template-rows:1fr 1fr;align-items:center;text-align:left;padding:10px 16px}
.cta-kicker{font-size:7px;letter-spacing:.2em;opacity:.55;align-self:end}
.cta-title{font-size:23px;line-height:.92;letter-spacing:.06em;align-self:start}
.cta-arrow{grid-column:2;grid-row:1/3;font-size:28px;font-weight:400}
.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.mini-stat{border:1px solid rgba(255,255,255,.075);background:rgba(255,255,255,.028);border-radius:13px;min-height:44px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:7px}
.mini-stat span{font-size:7px;letter-spacing:.12em;color:#707789;font-weight:900}.mini-stat strong{font-size:12px}
.progress-card{border-radius:16px;min-height:61px;display:flex;align-items:center;justify-content:space-between;padding:10px 11px 10px 13px;color:inherit;text-align:left;cursor:pointer;width:100%}
.progress-card-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.progress-card-copy strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.progress-card-copy small{font-size:9px;color:#aeb4c3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ring-progress{--p:0;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#9d72ff calc(var(--p)*1%),rgba(255,255,255,.08) 0);position:relative;flex:0 0 auto}.ring-progress::after{content:"";position:absolute;inset:4px;border-radius:inherit;background:#0c0f17}.ring-progress span{z-index:1;font-size:8px;font-weight:900}

/* Generic section */
.section-head{height:64px;display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:var(--content-max);margin:0 auto 8px}
.section-head h1{font-size:20px;line-height:1.05;margin:5px 0 0;letter-spacing:-.03em}.section-head>div{min-width:0}
.micro-button,.counter-pill{height:34px;border-radius:11px;border:1px solid var(--line);background:rgba(255,255,255,.04);padding:0 10px;font-size:8px;letter-spacing:.09em;font-weight:900;white-space:nowrap;color:#d8dce7}
.counter-pill{display:flex;align-items:center}

/* GAME */
.game-screen{display:none!important}
.game-screen.is-active{display:block!important;background:#030408;border-radius:22px;border:1px solid rgba(255,255,255,.065)}
.game-hud{position:absolute;z-index:20;top:7px;left:7px;right:7px;height:58px;border-radius:16px;display:grid;grid-template-columns:1fr 1fr 1fr .86fr 44px;gap:2px;padding:7px}
.hud-stat{display:flex;min-width:0;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 6px}.hud-stat small{font-size:6.5px;color:#71798d;font-weight:900;letter-spacing:.12em}.hud-stat strong{font-size:12px;margin-top:3px;white-space:nowrap}.hud-coin{flex-direction:row;align-items:center;gap:3px}.hud-coin img{width:21px;height:21px}
.pause-button{width:44px;height:44px;border-radius:11px;align-self:center}
.canvas-wrap{position:absolute;top:72px;left:7px;right:7px;bottom:33px;border-radius:17px;overflow:hidden;background:radial-gradient(circle at 50% 35%,rgba(97,62,191,.10),transparent 40%),#05070d;border:1px solid rgba(255,255,255,.055)}
#gameCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}
.game-bottom-strip{position:absolute;z-index:16;left:10px;right:10px;bottom:7px;height:22px;display:flex;align-items:center;justify-content:space-between;padding:0 4px;font-size:7px;letter-spacing:.11em;color:#737b8d;font-weight:900}
.event-banner{position:absolute;top:77px;left:50%;transform:translate(-50%,-12px);z-index:22;min-width:160px;max-width:72%;border:1px solid rgba(255,96,126,.24);border-radius:11px;background:rgba(15,8,16,.84);padding:7px 11px;display:flex;flex-direction:column;align-items:center;gap:2px;opacity:0;pointer-events:none}.event-banner.is-visible{animation:eventIn 2.2s ease forwards}.event-banner span{font-size:6px;letter-spacing:.18em;color:#ff7996;font-weight:900}.event-banner strong{font-size:9px;letter-spacing:.09em}@keyframes eventIn{0%{opacity:0;transform:translate(-50%,-8px) scale(.96)}12%,70%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,4px)}}
.threat-meter{position:absolute;z-index:21;top:69px;left:16%;right:16%;height:3px;background:rgba(255,255,255,.06);border-radius:999px;overflow:hidden}.threat-meter div{height:100%;width:0;background:linear-gradient(90deg,#7448ff,#ff456f);border-radius:inherit;transition:width .18s linear;box-shadow:0 0 12px rgba(255,70,111,.5)}
.touch-hint{position:absolute;z-index:6;left:50%;bottom:11%;transform:translateX(-50%);font-size:8px;letter-spacing:.2em;font-weight:900;color:rgba(255,255,255,.46);animation:hintFade 2.8s ease forwards}@keyframes hintFade{0%,35%{opacity:1}100%{opacity:0}}

/* FORMS */
[data-screen="forms"],[data-screen="challenges"],[data-screen="leaderboard"],[data-screen="squad"],[data-screen="share"]{max-width:var(--content-max);left:50%;right:auto;width:min(100%,var(--content-max));transform:translateX(-50%) translateY(8px) scale(.995)}
[data-screen="forms"].is-active,[data-screen="challenges"].is-active,[data-screen="leaderboard"].is-active,[data-screen="squad"].is-active,[data-screen="share"].is-active{animation:screenInCentered .28s ease forwards}@keyframes screenInCentered{to{opacity:1;transform:translateX(-50%)}}
.vault-layout{height:calc(100% - 64px - 8px - 111px);min-height:0;border-radius:22px;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;padding:9px;overflow:hidden}
.carousel-arrow{width:38px;height:58px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035);font-size:27px;color:#adb3c1;cursor:pointer}
.vault-center{height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;min-width:0}.vault-stage{position:relative;min-height:0;display:grid;place-items:center}.vault-stage::after{content:"";position:absolute;width:70%;height:18%;bottom:7%;border-radius:50%;background:radial-gradient(ellipse,rgba(131,93,255,.28),transparent 70%);filter:blur(10px)}.vault-glow{position:absolute;width:min(72%,280px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,rgba(142,99,255,.17),rgba(65,214,255,.05) 48%,transparent 70%);animation:haloPulse 3.4s ease-in-out infinite}.vault-stage img{position:relative;z-index:2;max-width:min(74%,290px);max-height:88%;filter:drop-shadow(0 0 18px rgba(255,255,255,.12))}.vault-copy{text-align:center;padding:5px 10px 12px}.vault-copy h2{font-size:22px;margin:4px 0}.vault-copy p{margin:0 auto 9px;color:#9da4b5;font-size:10px;line-height:1.4;max-width:310px}.state-chip{display:inline-flex;align-items:center;justify-content:center;min-height:23px;border-radius:999px;border:1px solid var(--line);padding:0 9px;font-size:7px;letter-spacing:.12em;font-weight:900;color:#cfd5e3;background:rgba(255,255,255,.035)}
.vault-actions{height:103px;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:8px}.vault-actions .cta:first-child{grid-column:1/-1}

/* CHALLENGES */
.challenge-hero{height:103px;border-radius:20px;padding:10px 12px;display:grid;grid-template-columns:74px 1fr auto;gap:11px;align-items:center;overflow:hidden}.challenge-hero img{width:68px;height:78px;object-fit:contain;filter:drop-shadow(0 0 14px rgba(255,255,255,.12))}.challenge-hero>div:nth-child(2){display:flex;flex-direction:column;min-width:0}.challenge-hero strong{font-size:14px;margin:3px 0}.challenge-hero small{font-size:8.5px;color:#a0a8b8;line-height:1.35}.challenge-total{text-align:right;display:flex;flex-direction:column;gap:3px}.challenge-total span{font-size:18px;font-weight:900}.challenge-total small{font-size:6px;letter-spacing:.12em}
.objective-grid{height:calc(100% - 64px - 8px - 103px - 32px);padding-top:8px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:8px;min-height:0}.objective-card{border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.048),rgba(255,255,255,.018));border-radius:17px;padding:12px;display:flex;flex-direction:column;justify-content:space-between;min-width:0;overflow:hidden;position:relative}.objective-card.is-complete{border-color:rgba(100,255,188,.24);background:linear-gradient(180deg,rgba(66,255,176,.07),rgba(255,255,255,.015))}.objective-card .obj-icon{font-size:18px}.objective-card .obj-copy{display:flex;flex-direction:column;gap:3px}.objective-card .obj-copy span{font-size:7px;letter-spacing:.12em;color:#767e90;font-weight:900}.objective-card .obj-copy strong{font-size:11px;line-height:1.2}.objective-card .obj-numbers{display:flex;justify-content:space-between;gap:7px;font-size:8px;color:#a7afbe}.obj-bar{height:4px;background:rgba(255,255,255,.07);border-radius:999px;overflow:hidden;margin-top:6px}.obj-bar i{display:block;height:100%;background:linear-gradient(90deg,#8f64ff,#4bdcff);border-radius:inherit}.objective-card.is-complete .obj-bar i{background:var(--good)}.complete-label{position:absolute;top:9px;right:9px;font-size:6px;letter-spacing:.12em;color:var(--good);font-weight:900}.page-dots{height:24px;display:flex;align-items:center;justify-content:center;gap:5px}.page-dots i{width:5px;height:5px;border-radius:50%;background:#303647}.page-dots i.is-active{width:15px;border-radius:999px;background:#8f66ff}

/* LEADERBOARD */
[data-screen="leaderboard"] .section-head{height:75px;align-items:flex-start;padding-top:7px}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;width:min(55%,250px);border:1px solid var(--line);background:rgba(255,255,255,.025);padding:3px;border-radius:11px}.segmented button{border:0;background:transparent;color:#6e7688;border-radius:8px;font-size:6.5px;font-weight:900;letter-spacing:.07em;padding:7px 3px}.segmented button.is-active{background:rgba(255,255,255,.08);color:white}
.podium{height:148px;display:grid;grid-template-columns:1fr 1.18fr 1fr;gap:6px;align-items:end;padding:0 4px 7px}.podium-card{border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018));border-radius:17px 17px 10px 10px;text-align:center;padding:10px 6px;min-width:0}.podium-card:nth-child(2){height:136px;order:2;border-color:rgba(173,139,255,.26);box-shadow:0 0 28px rgba(124,82,255,.08)}.podium-card:nth-child(1){height:110px;order:1}.podium-card:nth-child(3){height:94px;order:3}.podium-rank{font-size:8px;color:#888fa1;font-weight:900}.podium-avatar{width:34px;height:34px;border-radius:50%;margin:6px auto;background:radial-gradient(circle at 50% 38%,#c9b8ff,#5338a9);display:grid;place-items:center;font-size:10px;font-weight:900;border:1px solid rgba(255,255,255,.14)}.podium-card strong{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.podium-card small{display:block;color:#8f96a6;font-size:7px;margin-top:4px}
.rank-card{height:calc(100% - 75px - 148px);border-radius:20px;padding:8px;display:grid;grid-template-rows:1fr 35px;min-height:0}.rank-rows{display:grid;grid-template-rows:repeat(5,1fr);min-height:0}.rank-row{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:8px;border-bottom:1px solid rgba(255,255,255,.055);padding:0 8px;min-height:0}.rank-row:last-child{border-bottom:0}.rank-pos{font-size:9px;color:#777f90;font-weight:900}.rank-user{font-size:10px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rank-val{font-size:10px;font-weight:900}.rank-row.is-me{background:linear-gradient(90deg,rgba(137,92,255,.12),transparent);border-radius:10px}.rank-pagination{display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(255,255,255,.055);padding-top:6px}.rank-pagination button{height:28px;border:1px solid var(--line);background:rgba(255,255,255,.03);border-radius:9px;color:#b7becc;font-size:7px;font-weight:900;letter-spacing:.07em;padding:0 10px}.rank-pagination span{font-size:7px;color:#727a8c;font-weight:900;letter-spacing:.08em}

/* SQUAD */
.squad-banner{height:101px;border-radius:20px;padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px}.squad-banner>div:first-child{display:flex;flex-direction:column;min-width:0}.squad-banner strong{font-size:17px;margin:4px 0}.squad-banner small{font-size:7px;color:#8d95a6;letter-spacing:.09em}.squad-score{text-align:right}.squad-score strong{font-size:19px}.squad-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:8px 0}.metric{height:58px;border-radius:14px;padding:10px;display:flex;flex-direction:column;justify-content:space-between}.metric span{font-size:6px;letter-spacing:.11em;color:#778092;font-weight:900}.metric strong{font-size:15px}.member-card{height:calc(100% - 64px - 8px - 101px - 8px - 58px);border-radius:20px;padding:9px;display:grid;grid-template-rows:32px 1fr 34px;min-height:0}.member-title{display:flex;align-items:center;justify-content:space-between;padding:0 7px;border-bottom:1px solid rgba(255,255,255,.055);font-size:7px;letter-spacing:.11em;color:#7b8396;font-weight:900}.member-rows{display:grid;grid-template-rows:repeat(4,1fr);min-height:0}.member-row{display:grid;grid-template-columns:35px 1fr auto;align-items:center;gap:8px;border-bottom:1px solid rgba(255,255,255,.05);padding:0 7px}.member-avatar{width:27px;height:27px;border-radius:9px;background:linear-gradient(135deg,#7560b6,#18233e);display:grid;place-items:center;font-size:8px;font-weight:900}.member-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.member-copy strong{font-size:9px}.member-copy small{font-size:6.5px;color:#7e8697}.member-meter{text-align:right}.member-meter strong{font-size:9px}.member-meter small{display:block;font-size:6px;color:#737b8e}

/* RESULT */
.result-screen.is-active{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;max-width:var(--content-max);margin:0 auto;left:50%;right:auto;width:min(100%,var(--content-max));animation:screenInCentered .28s ease forwards}
.result-stage{border-radius:24px;position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 14px;min-height:0;text-align:center}.result-stage::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 41%,rgba(139,93,255,.16),transparent 36%)}.result-burst{position:absolute;width:270px;height:270px;border-radius:50%;border:1px dashed rgba(156,118,255,.22);animation:spinSlow 18s linear infinite}.result-burst::before,.result-burst::after{content:"";position:absolute;inset:28px;border-radius:50%;border:1px solid rgba(80,218,255,.1)}.result-burst::after{inset:58px;border-color:rgba(255,255,255,.06)}.result-form{position:relative;z-index:2;max-width:140px;max-height:29%;margin:8px 0 2px;filter:drop-shadow(0 0 18px rgba(255,255,255,.12))}.result-stage h1{position:relative;z-index:2;font-size:42px;line-height:.95;margin:5px 0 4px;letter-spacing:-.045em}.result-stage p{position:relative;z-index:2;font-size:8px;letter-spacing:.11em;color:#a7aebe;font-weight:900;margin:0}.result-stats{position:relative;z-index:2;width:100%;max-width:390px;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:13px}.result-stats>div{border:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.18);border-radius:12px;padding:8px}.result-stats span{display:block;font-size:6px;color:#71798b;letter-spacing:.1em;font-weight:900}.result-stats strong{font-size:11px;display:block;margin-top:3px}.challenge-gain{position:relative;z-index:2;margin-top:8px;border-radius:999px;background:rgba(97,255,186,.06);border:1px solid rgba(97,255,186,.12);padding:6px 9px;font-size:7px;color:#8fffd0;font-weight:800}.result-duel{position:relative;z-index:3;margin-top:7px;border:1px solid rgba(176,126,255,.22);background:linear-gradient(135deg,rgba(131,82,255,.13),rgba(65,225,255,.05));color:#ddd2ff;border-radius:999px;min-height:30px;padding:6px 13px;font-size:7px;font-weight:950;letter-spacing:.1em}.result-duel:active{transform:scale(.98)}.challenge-gain.duel-win{color:#d8ff76;border-color:rgba(216,255,118,.25);background:rgba(216,255,118,.07)}.result-actions{display:grid;gap:7px}.result-secondary-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.result-secondary-grid .cta{font-size:8px;min-height:42px;padding:8px}

/* SHARE */
.share-preview-shell{height:calc(100% - 64px - 8px - 98px);border-radius:22px;display:grid;place-items:center;padding:10px;position:relative;overflow:hidden}.share-preview-shell canvas{display:block;max-height:100%;max-width:100%;height:100%;aspect-ratio:9/16;border-radius:15px;background:#070812;box-shadow:0 12px 36px rgba(0,0,0,.4)}.share-loading{position:absolute;inset:10px;display:none;place-items:center;align-content:center;gap:8px;border-radius:15px;background:rgba(5,6,10,.86);backdrop-filter:blur(10px)}.share-loading.is-visible{display:grid}.share-loading strong{font-size:10px;letter-spacing:.12em}.share-loading small{font-size:8px;color:#8991a2}.spinner{width:28px;height:28px;border-radius:50%;border:2px solid rgba(255,255,255,.1);border-top-color:#a57cff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.share-actions{height:90px;padding-top:8px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.share-actions .cta-primary{grid-column:1/-1}

/* MODALS */
.modal-screen{z-index:100!important;inset:0!important;background:rgba(2,3,6,.56);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);align-items:center;justify-content:center!important;padding:18px}.modal-screen.is-active{display:flex!important;animation:modalFade .2s ease forwards}@keyframes modalFade{from{opacity:0}to{opacity:1}}
.modal-card,.unlock-card{width:min(100%,420px);border-radius:24px;padding:22px;display:grid;gap:10px;text-align:center;position:relative;overflow:hidden}.duel-modal{background:linear-gradient(160deg,rgba(21,18,36,.98),rgba(6,8,15,.98));box-shadow:0 30px 80px rgba(0,0,0,.58),0 0 0 1px rgba(155,111,255,.08) inset}.duel-mark{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;justify-self:center;border:1px solid rgba(169,119,255,.28);background:radial-gradient(circle,rgba(164,101,255,.18),rgba(12,14,23,.8));font-size:25px;box-shadow:0 0 34px rgba(145,91,255,.16)}.duel-target{border:1px solid rgba(255,255,255,.08);border-radius:15px;background:rgba(0,0,0,.22);padding:11px;display:grid;gap:4px}.duel-target span{font-size:7px;letter-spacing:.14em;color:#7e8799;font-weight:900}.duel-target strong{font-size:22px;letter-spacing:-.03em}.duel-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;border-radius:13px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.025)}.duel-metrics button{border:0;border-radius:9px;background:transparent;color:#70798d;font-size:6.5px;font-weight:950;letter-spacing:.06em;min-height:32px}.duel-metrics button.is-active{color:white;background:linear-gradient(135deg,rgba(135,88,255,.24),rgba(60,220,255,.08));box-shadow:0 0 0 1px rgba(163,121,255,.14) inset}.modal-card h1,.unlock-card h1{font-size:26px;margin:1px 0}.modal-card p,.unlock-card p{font-size:10px;color:#969eaf;line-height:1.45;margin:0 0 5px}.unlock-card img{width:min(54%,190px);max-height:190px;object-fit:contain;justify-self:center;margin:8px 0;position:relative;z-index:2;filter:drop-shadow(0 0 18px rgba(255,255,255,.16))}.unlock-card>strong{font-size:8px;letter-spacing:.15em;color:#8effc9}.unlock-rays{position:absolute;left:50%;top:37%;width:280px;height:280px;transform:translate(-50%,-50%);background:repeating-conic-gradient(from 0deg,rgba(156,105,255,.11) 0 8deg,transparent 8deg 18deg);mask-image:radial-gradient(circle,#000,transparent 67%);animation:spinSlow 20s linear infinite}

.toast{position:absolute;z-index:200;left:50%;bottom:calc(var(--safe-bottom) + var(--nav-h) + 22px);transform:translate(-50%,14px);max-width:min(86vw,420px);padding:10px 13px;border-radius:12px;border:1px solid var(--line);background:rgba(14,17,26,.94);box-shadow:var(--shadow);font-size:9px;font-weight:800;letter-spacing:.02em;color:#dce0e9;opacity:0;pointer-events:none;transition:.22s ease}.toast.is-visible{opacity:1;transform:translate(-50%,0)}

/* Compact phone */
@media (max-width:359px){
  :root{--header-h:60px;--nav-h:66px;--radius:17px;--content-max:100%;--m:11px;--l:15px;--xl:20px}
  .app-header{left:max(6px,var(--safe-left));right:max(6px,var(--safe-right));top:calc(var(--safe-top) + 5px);border-radius:15px;padding:7px 8px;height:var(--header-h)}
  .screen-host{top:calc(var(--safe-top) + 5px + var(--header-h) + 7px);bottom:calc(var(--safe-bottom) + var(--nav-h) + 8px);left:max(6px,var(--safe-left));right:max(6px,var(--safe-right))}
  .bottom-nav{left:max(6px,var(--safe-left));right:max(6px,var(--safe-right));bottom:calc(var(--safe-bottom) + 5px);height:var(--nav-h);border-radius:17px;padding:5px}
  .brand-mark{width:31px;height:31px}.brand-lockup strong{font-size:11px}.brand-lockup small{font-size:7px}.coin-pill{height:34px;font-size:11px;padding-right:8px}.coin-pill img{width:23px;height:23px}.icon-button{width:34px;height:34px}
  .home-grid{gap:6px}.hero-stage{border-radius:19px}.hero-caption{top:11px;left:12px}.hero-caption strong{font-size:15px}.hero-form{width:min(60%,210px);max-height:72%}.form-power-chip{right:9px;bottom:9px;padding:6px 8px;font-size:6.5px}.pulse-cta{height:53px;border-radius:14px;padding:8px 13px}.cta-title{font-size:20px}.cta-kicker{font-size:6px}.stat-row{gap:5px}.mini-stat{min-height:38px;border-radius:11px;padding:6px 8px}.mini-stat span{font-size:6px}.mini-stat strong{font-size:10px}.progress-card{min-height:51px;border-radius:13px;padding:7px 9px}.progress-card-copy strong{font-size:10px}.progress-card-copy small{font-size:7.5px}.ring-progress{width:36px;height:36px}
  .section-head{height:54px;margin-bottom:6px}.section-head h1{font-size:17px;margin-top:3px}.micro-button,.counter-pill{height:30px;font-size:6.5px;padding:0 7px}
  .vault-layout{height:calc(100% - 54px - 6px - 91px);grid-template-columns:34px 1fr 34px;border-radius:18px;padding:6px}.carousel-arrow{width:30px;height:50px;font-size:22px}.vault-stage img{max-width:68%;max-height:84%}.vault-copy{padding:3px 7px 7px}.vault-copy h2{font-size:18px;margin:2px 0}.vault-copy p{font-size:8px;line-height:1.28;margin-bottom:5px}.state-chip{min-height:20px;font-size:6px}.vault-actions{height:85px;padding-top:6px;gap:5px}.vault-actions .cta{min-height:38px;font-size:8px;border-radius:12px}
  .challenge-hero{height:84px;border-radius:17px;grid-template-columns:55px 1fr auto;gap:7px;padding:7px 9px}.challenge-hero img{width:52px;height:64px}.challenge-hero strong{font-size:11px}.challenge-hero small{font-size:7px}.challenge-total span{font-size:14px}.objective-grid{height:calc(100% - 54px - 6px - 84px - 20px);padding-top:6px;gap:5px}.objective-card{border-radius:13px;padding:8px}.objective-card .obj-icon{font-size:14px}.objective-card .obj-copy span{font-size:7px}.objective-card .obj-copy strong{font-size:9px}.objective-card .obj-numbers{font-size:7px}.page-dots{height:14px}
  [data-screen="leaderboard"] .section-head{height:63px}.section-head .segmented{width:60%;}.segmented button{font-size:5px;padding:6px 2px}.podium{height:118px}.podium-card:nth-child(2){height:110px}.podium-card:nth-child(1){height:90px}.podium-card:nth-child(3){height:78px}.podium-avatar{width:27px;height:27px;margin:4px auto}.rank-card{height:calc(100% - 63px - 118px);border-radius:16px;padding:6px}.rank-row{grid-template-columns:23px 1fr auto;gap:5px;padding:0 5px}.rank-user,.rank-val{font-size:8px}.rank-pagination button{height:25px;font-size:6px;padding:0 7px}
  .squad-banner{height:82px;padding:9px 10px;border-radius:16px}.squad-banner strong{font-size:14px;margin:3px 0}.squad-score strong{font-size:16px}.squad-metrics{margin:5px 0;gap:5px}.metric{height:48px;border-radius:12px;padding:7px}.metric strong{font-size:12px}.member-card{height:calc(100% - 54px - 6px - 82px - 5px - 48px);border-radius:16px;padding:6px}.member-title{height:27px}.member-row{grid-template-columns:29px 1fr auto;gap:5px;padding:0 4px}.member-avatar{width:23px;height:23px}.member-copy strong,.member-meter strong{font-size:7.5px}.member-copy small,.member-meter small{font-size:5.5px}
  .result-stage{border-radius:19px;padding:9px 10px}.result-form{max-width:105px;max-height:24%;margin:4px 0}.result-stage h1{font-size:34px}.result-stats{margin-top:8px;gap:4px}.result-stats>div{border-radius:9px;padding:6px}.challenge-gain{margin-top:5px;padding:4px 7px;font-size:6px}.result-actions{gap:5px}.result-actions>.cta{min-height:39px}.result-secondary-grid{gap:4px}.result-secondary-grid .cta{min-height:35px;font-size:6.5px;border-radius:11px}
  .game-hud{top:5px;left:5px;right:5px;height:54px;padding:5px;grid-template-columns:1fr 1fr 1fr .8fr 44px}.hud-stat{padding:0 4px}.hud-stat small{font-size:5.5px}.hud-stat strong{font-size:10px}.pause-button{width:44px;height:44px}.canvas-wrap{top:65px;left:5px;right:5px;bottom:27px}.threat-meter{top:62px}.event-banner{top:69px}.game-bottom-strip{bottom:4px;height:19px;font-size:5.5px}
}

/* Short height compresses decoration before controls */
@media (max-height:679px){
  :root{--header-h:58px;--nav-h:62px}
  .app-header{height:58px}.bottom-nav{height:62px}
  .hero-form{width:min(55%,205px);max-height:65%}.halo-2,.orbit-two{display:none}.hero-caption{top:10px}.home-grid{gap:5px}.pulse-cta{height:49px}.stat-row{display:none}.progress-card{min-height:48px}.section-head{height:50px;margin-bottom:5px}.section-head h1{font-size:16px}.vault-layout{height:calc(100% - 50px - 5px - 80px)}.vault-actions{height:75px}.challenge-hero{height:78px}.objective-grid{height:calc(100% - 50px - 5px - 78px - 19px)}.podium{height:104px}[data-screen="leaderboard"] .section-head{height:58px}.rank-card{height:calc(100% - 58px - 104px)}.squad-banner{height:75px}.squad-metrics{display:none}.member-card{height:calc(100% - 50px - 5px - 75px)}.result-form{max-width:90px}.result-stage h1{font-size:30px}.result-stats{margin-top:6px}.challenge-gain{display:none}.result-duel{margin-top:4px;min-height:25px;padding:4px 10px;font-size:6px}.result-actions>.cta{min-height:38px}.share-actions{height:76px}.share-preview-shell{height:calc(100% - 50px - 5px - 76px)}
}

/* Tablets: more whitespace, do not inflate everything */
@media (min-width:700px){
  :root{--header-h:72px;--nav-h:76px;--content-max:690px;--xl:34px}
  .app-header{left:50%;right:auto;width:min(calc(100% - 40px),760px);transform:translateX(-50%)}
  .bottom-nav{left:50%;right:auto;width:min(calc(100% - 40px),700px);transform:translateX(-50%)}
  .screen-host{left:50%;right:auto;width:min(calc(100% - 40px),820px);transform:translateX(-50%)}
  .home-grid{max-width:690px}.hero-form{width:min(55%,300px)}.hero-stage{border-radius:28px}.home-actions{max-width:640px;width:100%;justify-self:center}.section-head{max-width:690px}.vault-layout{max-width:690px;margin:0 auto}.vault-actions{max-width:690px;margin:0 auto}.challenge-hero,.objective-grid,.podium,.rank-card,.squad-banner,.squad-metrics,.member-card,.share-preview-shell,.share-actions{max-width:690px;margin-left:auto;margin-right:auto}.result-screen.is-active{max-width:690px}.result-form{max-width:170px}.game-screen.is-active{max-width:820px;margin:0 auto}
}

/* Landscape composition: dedicated, not portrait scale-up */
@media (orientation:landscape) and (max-height:700px){
  :root{--header-h:54px;--nav-h:56px;--content-max:760px}
  .app-header{top:calc(var(--safe-top) + 4px);height:54px}.screen-host{top:calc(var(--safe-top) + 4px + 54px + 5px);bottom:calc(var(--safe-bottom) + 56px + 6px)}.bottom-nav{height:56px;bottom:calc(var(--safe-bottom) + 4px)}.bottom-nav button{flex-direction:row;gap:6px}.bottom-nav button span{font-size:15px}
  .home-grid{grid-template-columns:minmax(0,1.12fr) minmax(260px,.88fr);grid-template-rows:1fr;gap:8px;max-width:760px}.hero-form{width:min(58%,220px);max-height:78%}.home-actions{align-content:center}.stat-row{display:grid}.pulse-cta{height:56px}.progress-card{min-height:55px}
  [data-screen="forms"].is-active{display:grid;grid-template-columns:1fr 260px;grid-template-rows:48px 1fr;gap:6px}.section-head{grid-column:1/-1;height:48px;margin:0}.vault-layout{height:100%;grid-column:1;border-radius:18px}.vault-actions{height:100%;grid-column:2;grid-row:2;grid-template-columns:1fr;grid-template-rows:1fr 1fr 1fr;align-content:center;padding:0}.vault-actions .cta:first-child{grid-column:auto}
  [data-screen="challenges"].is-active{display:grid;grid-template-columns:235px 1fr;grid-template-rows:48px 1fr;gap:6px}.challenge-hero{grid-column:1;height:100%}.objective-grid{grid-column:2;grid-row:2;height:100%;padding:0}.page-dots{display:none}
  [data-screen="leaderboard"].is-active{display:grid;grid-template-columns:260px 1fr;grid-template-rows:54px 1fr;gap:6px}.podium{grid-column:1;grid-row:2;height:100%;align-items:center;grid-template-columns:1fr;grid-template-rows:1fr 1.1fr 1fr}.podium-card:nth-child(n){height:auto!important;min-height:0}.rank-card{grid-column:2;grid-row:2;height:100%}
  [data-screen="squad"].is-active{display:grid;grid-template-columns:235px 1fr;grid-template-rows:48px 74px 1fr;gap:6px}.squad-banner{grid-column:1;grid-row:2/4;height:100%;flex-direction:column;align-items:flex-start;justify-content:center}.squad-score{text-align:left}.squad-metrics{grid-column:2;grid-row:2;margin:0}.member-card{grid-column:2;grid-row:3;height:100%}
  .result-screen.is-active{grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);grid-template-rows:1fr;max-width:760px}.result-stage{grid-column:1}.result-actions{grid-column:2;align-content:center}.result-form{max-width:95px}.result-stage h1{font-size:32px}
  .game-hud{height:54px;grid-template-columns:1fr 1fr 1fr .8fr 44px}.canvas-wrap{top:65px;bottom:24px}.threat-meter{top:62px}.event-banner{top:68px}
}

@media (prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}.ambient{display:none}}

/* Immersive gameplay/result mode: app header and bottom nav disappear; the route consumes the Telegram-safe viewport. */
.app-shell.mode-immersive .app-header,
.app-shell.mode-immersive .bottom-nav{opacity:0;pointer-events:none;transform:translateY(-8px)}
.app-shell.mode-immersive .bottom-nav{transform:translateY(8px)}
.app-shell.mode-immersive .screen-host{
  top:calc(var(--safe-top) + 7px);
  bottom:calc(var(--safe-bottom) + 7px);
}
.app-header,.bottom-nav{transition:opacity .18s ease,transform .18s ease}
.cta:disabled{cursor:default;filter:saturate(.4);opacity:.52}
.page-dots button{appearance:none;border:0;padding:0;width:5px;height:5px;border-radius:50%;background:#303647;cursor:pointer;transition:.18s ease}
.page-dots button.is-active{width:15px;border-radius:999px;background:#8f66ff}

@media (min-width:700px){.app-shell.mode-immersive .app-header{transform:translateX(-50%) translateY(-8px)}.app-shell.mode-immersive .bottom-nav{transform:translateX(-50%) translateY(8px)}}

/* gameplay combat controls refresh */
.shoot-button{position:absolute;z-index:18;right:10px;bottom:15%;width:64px;height:64px;border-radius:18px;border:1px solid rgba(255,255,255,.16);background:linear-gradient(180deg,rgba(124,105,255,.24),rgba(62,215,255,.14));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:#f7fbff;font-size:11px;font-weight:900;letter-spacing:.14em;box-shadow:0 14px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);touch-action:manipulation;display:grid;place-items:center}
.shoot-button::before{content:"";position:absolute;inset:8px;border-radius:14px;background:radial-gradient(circle at 50% 32%,rgba(255,255,255,.22),transparent 52%), radial-gradient(circle at 50% 74%,rgba(91,219,255,.18),transparent 56%)}
.shoot-button:active{transform:scale(.97)}
.result-actions>#resultHome{background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.04));}
.result-secondary-grid #shareResult,.result-secondary-grid #chaosChest,.result-secondary-grid #reviveButton{background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.035));}
@media (max-width:359px){
  .shoot-button{right:8px;bottom:14%;width:54px;height:54px;border-radius:15px;font-size:9px}
}
@media (min-width:700px){
  .shoot-button{right:14px;bottom:16%;width:70px;height:70px}
}

/* --- stability / live-data layout refresh --- */
.home-grid{grid-template-rows:minmax(290px,1fr) auto}
.hero-stage{min-height:clamp(290px,46vh,430px)}
.hero-caption{top:18px;left:18px}
.hero-form{top:50%;width:min(70%,292px);max-height:74%;will-change:transform}
.hero-orbit{top:51%}
.orbit-two{top:51%}
.halo-1,.halo-2{top:51%}
.hero-coins .coin-c{bottom:23%}
.hero-coins .coin-d{bottom:21%}

.live-list-card{height:calc(100% - 75px);display:grid;grid-template-rows:38px 1fr;min-height:0;padding:8px 8px 10px}
.list-head,.member-title{display:flex;align-items:center;justify-content:space-between;padding:0 8px;border-bottom:1px solid rgba(255,255,255,.055);font-size:7px;letter-spacing:.13em;color:#7b8396;font-weight:900}
.scroll-rows{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-right:3px}
.scroll-rows::-webkit-scrollbar{width:4px}.scroll-rows::-webkit-scrollbar-thumb{background:rgba(148,128,255,.28);border-radius:999px}
.rank-card{height:calc(100% - 75px);padding:8px;border-radius:20px}
.rank-rows{display:block;min-height:0}
.rank-row{min-height:58px;padding:0 10px}
.rank-row.rank-empty,.member-row.member-empty{display:flex;align-items:center;justify-content:center;min-height:100%;text-align:center;color:#8690a4;font-size:10px;font-weight:700;border-bottom:0;padding:18px}
.rank-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.rank-meta small{font-size:6.5px;color:#778092;letter-spacing:.1em;font-weight:800}
.member-card{height:calc(100% - 64px - 8px - 101px - 8px - 58px);padding:8px;border-radius:20px;display:grid;grid-template-rows:32px 1fr;min-height:0}
.member-rows{display:block;min-height:0}
.member-row{min-height:66px;padding:0 8px}
.member-avatar{width:30px;height:30px;border-radius:10px}
.member-copy strong,.member-meter strong{font-size:10px}
.member-copy small,.member-meter small{font-size:6.5px}

.share-preview-shell{height:calc(100% - 56px - 6px - 76px);padding:8px;display:flex;align-items:center;justify-content:center}
.share-preview-shell canvas{width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:9/16;object-fit:contain}
.share-actions{height:72px;padding-top:6px;grid-template-columns:1fr 1fr}
.share-actions .cta{min-height:40px}

.shoot-button{right:10px;bottom:calc(34px + env(safe-area-inset-bottom));width:62px;height:62px;border-radius:18px}
.game-bottom-strip{padding-right:82px}

@media (max-width:359px){
  .home-grid{grid-template-rows:minmax(250px,1fr) auto}
  .hero-stage{min-height:250px}
  .hero-form{top:49%;width:min(58%,205px);max-height:66%}
  .hero-coins .coin-c{bottom:24%}
  .hero-coins .coin-d{bottom:22%}
  .rank-card,.live-list-card{height:calc(100% - 63px);padding:6px;border-radius:16px;grid-template-rows:30px 1fr}
  .list-head,.member-title{padding:0 5px;font-size:6px}
  .rank-row{min-height:48px;grid-template-columns:24px 1fr auto;gap:6px;padding:0 5px}
  .rank-user,.rank-val{font-size:8px}.rank-meta small{font-size:5.5px}
  .member-card{padding:6px;border-radius:16px;grid-template-rows:27px 1fr;height:calc(100% - 54px - 6px - 82px - 5px - 48px)}
  .member-row{min-height:54px;grid-template-columns:29px 1fr auto;gap:6px;padding:0 4px}
  .member-avatar{width:23px;height:23px}.member-copy strong,.member-meter strong{font-size:7.5px}.member-copy small,.member-meter small{font-size:5.5px}
  .share-preview-shell{height:calc(100% - 50px - 5px - 68px);padding:6px}
  .share-actions{height:64px;gap:6px}
  .shoot-button{right:8px;bottom:calc(24px + env(safe-area-inset-bottom));width:52px;height:52px;border-radius:15px;font-size:9px}
  .game-bottom-strip{padding-right:70px}
}
@media (max-width:389px) and (max-height:760px){
  .hero-form{top:49%;width:min(56%,198px);max-height:64%}
  .share-preview-shell{height:calc(100% - 50px - 5px - 64px)}
}
@media (min-width:700px){
  .share-preview-shell{max-width:720px;margin:0 auto}
  .shoot-button{right:14px;bottom:calc(38px + env(safe-area-inset-bottom));width:70px;height:70px}
}
