*{box-sizing:border-box}
:root{
  --bg:#070910;--bg2:#0b0e18;--glass:rgba(18,22,37,.72);--glass2:rgba(23,29,48,.84);
  --line:rgba(255,255,255,.09);--text:#f7f8ff;--muted:#8b94a9;
  --purple:#8b5cf6;--violet:#6d28d9;--cyan:#22d3ee;--pink:#ec4899;
  --green:#34d399;--red:#fb7185;--yellow:#fbbf24;
}
html,body{margin:0;min-height:100%;background:#070910;color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif}
body{overflow-x:hidden;background:
 radial-gradient(circle at 50% -20%,rgba(99,102,241,.18),transparent 38%),
 radial-gradient(circle at 100% 50%,rgba(6,182,212,.08),transparent 32%),#070910}
button,input{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.noise{position:fixed;inset:0;opacity:.025;pointer-events:none;z-index:0;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E")}
.ambient{position:fixed;border-radius:50%;filter:blur(110px);pointer-events:none;opacity:.17;z-index:0}
.ambient-a{width:420px;height:420px;background:#7c3aed;top:-180px;right:-100px;animation:floatA 12s ease-in-out infinite}
.ambient-b{width:360px;height:360px;background:#0891b2;left:-120px;bottom:-160px;animation:floatB 14s ease-in-out infinite}
.ambient-c{width:240px;height:240px;background:#db2777;left:45%;top:42%;opacity:.06;animation:pulseOrb 8s ease-in-out infinite}
@keyframes floatA{50%{transform:translate(-60px,80px) scale(1.1)}}@keyframes floatB{50%{transform:translate(70px,-60px) scale(.9)}}@keyframes pulseOrb{50%{transform:scale(1.45);opacity:.1}}
.shell{position:relative;z-index:2;width:min(1120px,calc(100% - 30px));margin:auto;padding:24px 0 64px}
.topbar{height:62px;display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}
.brand-wrap,.top-actions,.userbar,.connection-pill{display:flex;align-items:center}
.brand-wrap{gap:12px}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-weight:900;background:linear-gradient(135deg,var(--purple),#4338ca);box-shadow:0 0 34px rgba(139,92,246,.32)}
.brand{font-size:20px;font-weight:900;letter-spacing:.8px}.brand span{color:#a78bfa}.brand-wrap small{display:block;font-size:9px;color:#667087;margin-top:2px;letter-spacing:1.2px}
.top-actions{gap:10px}.userbar{gap:9px}.coin-pill{display:flex;gap:7px;padding:9px 14px;border-radius:999px;border:1px solid rgba(251,191,36,.13);background:rgba(251,191,36,.07);color:#fde68a}
.icon-btn,.ghost{border:1px solid var(--line);background:rgba(255,255,255,.035);color:#dbe2f3;border-radius:12px;padding:9px 13px;transition:.2s}
.icon-btn:hover,.ghost:hover{background:rgba(255,255,255,.075);border-color:rgba(255,255,255,.16)}
.connection-pill{direction:ltr;gap:7px;padding:8px 11px;border:1px solid rgba(52,211,153,.13);background:rgba(52,211,153,.06);border-radius:999px;font-size:11px;color:#a7f3d0}
.connection-pill small{color:#64748b}.connection-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 12px var(--green)}
.connection-pill.offline{border-color:rgba(251,113,133,.16);background:rgba(251,113,133,.07);color:#fecdd3}.connection-pill.offline .connection-dot{background:var(--red);box-shadow:0 0 12px var(--red)}
.glass{background:linear-gradient(160deg,rgba(25,31,50,.82),rgba(12,16,28,.76));border:1px solid var(--line);box-shadow:0 24px 80px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.035);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:2.3px;color:#a78bfa}
h1,h2,h3{margin-top:0}.muted{color:var(--muted);line-height:1.85}
.auth-layout{min-height:620px;display:grid;grid-template-columns:1.15fr .85fr;gap:70px;align-items:center}
.auth-copy{position:relative;padding:30px}.auth-copy h1{font-size:clamp(46px,7vw,82px);line-height:1.04;margin:15px 0 24px;letter-spacing:-3px}.auth-copy h1 span,.hero h1 span{background:linear-gradient(100deg,#a78bfa,#22d3ee);-webkit-background-clip:text;color:transparent}.auth-copy p{max-width:520px;color:#8993a8;line-height:1.9}
.floating-hands span{position:absolute;font-size:52px;filter:drop-shadow(0 16px 20px rgba(0,0,0,.3));animation:handFloat 5s ease-in-out infinite}.fh1{right:10%;top:6%;transform:rotate(-15deg)}.fh2{left:4%;bottom:8%;animation-delay:-1.7s!important}.fh3{right:34%;bottom:0;animation-delay:-3s!important}@keyframes handFloat{50%{translate:0 -16px;rotate:7deg}}
.auth-card{border-radius:28px;padding:30px}.tabs{display:grid;grid-template-columns:1fr 1fr;padding:5px;background:#090c15;border:1px solid var(--line);border-radius:14px;margin-bottom:24px}.tab{border:0;background:transparent;color:#717b90;padding:11px;border-radius:10px}.tab.active{background:linear-gradient(180deg,#1f2942,#182139);color:white;box-shadow:0 7px 18px rgba(0,0,0,.25)}
.auth-card label{display:block;color:#9ca6b9;font-size:11px;margin:13px 2px 6px}.auth-card input{width:100%;border:1px solid var(--line);background:#0a0d16;color:white;border-radius:14px;padding:14px 15px;outline:none;transition:.2s}.auth-card input:focus{border-color:rgba(139,92,246,.6);box-shadow:0 0 0 4px rgba(139,92,246,.08)}
.primary{position:relative;overflow:hidden;border:0;color:white;background:linear-gradient(135deg,#7c3aed,#5b21b6 56%,#0e7490);font-weight:800;border-radius:15px;padding:14px 20px;box-shadow:0 15px 38px rgba(124,58,237,.25);transition:.22s}.primary:hover{transform:translateY(-2px);box-shadow:0 20px 44px rgba(124,58,237,.34)}.primary:active{transform:scale(.985)}
.shine:after{content:"";position:absolute;inset:-100% auto -100% -35%;width:28%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);transform:rotate(18deg);animation:shine 4.8s infinite}@keyframes shine{0%,72%{left:-45%}100%{left:130%}}
.wide{width:100%;margin-top:18px}.error{min-height:20px;color:#fda4af;font-size:12px;margin-top:10px}.auth-note{text-align:center;color:#586174;font-size:10px;margin-top:16px}
.hero-grid{display:grid;grid-template-columns:1.65fr .75fr;gap:18px}.hero,.profile-card,.panel{border-radius:26px}.hero{padding:34px}.hero h1{font-size:clamp(40px,5vw,62px);line-height:1.08;margin:10px 0 14px;letter-spacing:-2px}.hero p{max-width:700px}
.play{width:100%;display:grid;grid-template-columns:auto 1fr auto;align-items:center;text-align:right;gap:15px;margin-top:23px;padding:16px 20px}.play-icon{font-size:26px}.play-copy b,.play-copy small{display:block}.play-copy b{font-size:17px}.play-copy small{margin-top:3px;font-weight:400;color:#c4b5fd;font-size:10px}.play-price{direction:ltr;color:#fde68a;background:rgba(255,255,255,.08);border-radius:12px;padding:9px 12px}
.feature-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:22px}.feature-strip>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.045);padding:11px;border-radius:13px}.feature-strip>div span{grid-row:1/3;font-size:18px}.feature-strip b{font-size:11px}.feature-strip small{font-size:9px;color:#626d82}
.profile-card{padding:30px;text-align:center}.avatar-ring{width:84px;height:84px;margin:2px auto 13px;border-radius:50%;padding:2px;background:linear-gradient(135deg,#8b5cf6,#22d3ee);box-shadow:0 0 32px rgba(139,92,246,.18)}.avatar{width:100%;height:100%;border-radius:50%;display:grid;place-items:center;background:#0e1321;font-size:31px}.profile-card h3{margin:0;font-size:20px}.rank-label{font-size:9px;letter-spacing:1.7px;color:#737e94;margin-top:5px}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:24px}.profile-stats div{padding:12px 6px;border-radius:12px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.045)}.profile-stats small{display:block;color:#69748a;font-size:9px}.profile-stats b{font-size:17px;margin-top:3px;display:block}
.lower-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:18px;margin-top:18px}.panel{padding:25px}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title h3{margin:4px 0 15px}.small{font-size:10px;padding:7px 10px}.list{display:flex;flex-direction:column;gap:7px}.empty-state{color:#667086;padding:25px 0}.list-row{display:grid;grid-template-columns:1.1fr .8fr .65fr .65fr;align-items:center;gap:9px;padding:11px 12px;background:rgba(5,8,14,.46);border:1px solid rgba(255,255,255,.045);border-radius:12px;font-size:11px;transition:.18s}.list-row:hover{transform:translateX(-2px);border-color:rgba(139,92,246,.2)}.green{color:var(--green)}.red{color:var(--red)}
.search-stage{min-height:600px;display:grid;place-items:center}.search-card{width:min(520px,100%);padding:46px;text-align:center;border-radius:30px}.radar{width:150px;height:150px;position:relative;margin:0 auto 30px;display:grid;place-items:center}.radar-ring{position:absolute;border:1px solid rgba(139,92,246,.28);border-radius:50%;animation:radar 2.4s ease-out infinite}.r1{inset:38px}.r2{inset:19px;animation-delay:.6s}.r3{inset:0;animation-delay:1.2s}@keyframes radar{0%{opacity:.9;transform:scale(.72)}100%{opacity:0;transform:scale(1.22)}}.radar-core{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;font-size:25px;background:linear-gradient(135deg,#7c3aed,#4338ca);box-shadow:0 0 45px rgba(139,92,246,.38);animation:corePulse 1.4s ease-in-out infinite}@keyframes corePulse{50%{transform:scale(1.08)}}.search-card h2{margin:8px 0}.search-dots{display:flex;justify-content:center;gap:6px;margin:22px 0}.search-dots i{width:6px;height:6px;background:#8b5cf6;border-radius:50%;animation:dots 1s infinite alternate}.search-dots i:nth-child(2){animation-delay:.2s}.search-dots i:nth-child(3){animation-delay:.4s}@keyframes dots{to{opacity:.25;transform:translateY(-5px)}}
.game-stage{animation:fadeIn .32s ease}@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}}.match-top{display:grid;grid-template-columns:1fr .48fr 1fr;gap:14px;align-items:center;margin-bottom:14px}.player-chip{min-height:84px;border-radius:20px;padding:14px 17px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}.mini-avatar{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;background:#171e31;border:1px solid var(--line);font-size:8px;color:#8994aa}.player-chip small{display:block;color:#606b82;font-size:8px;letter-spacing:1.2px}.player-chip b{font-size:15px}.player-chip strong{font-size:38px;background:linear-gradient(135deg,#fff,#a78bfa);-webkit-background-clip:text;color:transparent}.opponent{text-align:left;direction:ltr}.opponent>div:nth-child(2){direction:rtl;text-align:right}.versus{text-align:center}.versus>div{font-size:28px;font-weight:1000;font-style:italic}.versus small,.versus span{display:block;color:#69748a;font-size:9px;margin:4px}.versus b{color:#a78bfa}
.battle-card{border-radius:28px;padding:24px}.timer-track{height:5px;background:#090c14;border-radius:20px;overflow:hidden}.timer-track>div{height:100%;width:100%;background:linear-gradient(90deg,#22d3ee,#8b5cf6,#ec4899);box-shadow:0 0 16px rgba(139,92,246,.5);transition:width .15s linear}.status-line{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 14px}.game-status{font-size:16px;font-weight:800}.lock-status{font-size:10px;color:#667187}
.duel-zone{display:grid;grid-template-columns:1fr 58px 1fr;gap:11px;align-items:center;margin:6px 0 22px}.reveal-box{position:relative;overflow:hidden;min-height:190px;border-radius:22px;border:1px solid rgba(255,255,255,.055);background:radial-gradient(circle at 50% 70%,rgba(139,92,246,.1),transparent 55%),#0a0e18;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:.3s}.reveal-box.rival{background:radial-gradient(circle at 50% 70%,rgba(34,211,238,.08),transparent 55%),#0a0e18}.reveal-box.locked{border-color:rgba(139,92,246,.32);box-shadow:inset 0 0 45px rgba(139,92,246,.06)}.reveal-box.revealed{animation:revealPop .55s cubic-bezier(.2,.9,.3,1.2)}@keyframes revealPop{0%{transform:scale(.92);filter:brightness(1.8)}60%{transform:scale(1.035)}100%{transform:scale(1)}}.reveal-label{position:absolute;top:13px;color:#5f6a80;font-size:9px;letter-spacing:1px}.big-hand{font-size:72px;filter:drop-shadow(0 20px 24px rgba(0,0,0,.35));transition:.28s}.reveal-box small{color:#657086;font-size:9px}.clash{text-align:center;color:#8b5cf6}.clash span{font-size:27px;animation:clashSpin 4s linear infinite}@keyframes clashSpin{to{transform:rotate(360deg)}}.moves-title{text-align:center;color:#727e95;font-size:10px;margin-bottom:10px}.moves{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.moves button{position:relative;border:1px solid rgba(255,255,255,.06);background:linear-gradient(180deg,#161d30,#0b101c);color:white;border-radius:18px;padding:17px 10px;transition:.2s;overflow:hidden}.moves button:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 120%,rgba(139,92,246,.22),transparent 55%);opacity:0;transition:.2s}.moves button:hover:not(:disabled){transform:translateY(-5px);border-color:rgba(139,92,246,.46);box-shadow:0 16px 32px rgba(0,0,0,.24)}.moves button:hover:before,.moves button.selected:before{opacity:1}.moves button.selected{border-color:#8b5cf6;box-shadow:0 0 0 2px rgba(139,92,246,.1),0 14px 30px rgba(124,58,237,.18)}.moves button:disabled{opacity:.44;cursor:default}.moves span{position:relative;display:block;font-size:46px;margin-bottom:6px;filter:drop-shadow(0 10px 12px rgba(0,0,0,.28))}.moves b,.moves small{position:relative;display:block}.moves b{font-size:13px}.moves small{font-size:8px;color:#5e6980;margin-top:2px}.battle-card>#backHome{display:block;margin:18px auto 0}
.toast{position:fixed;z-index:50;left:50%;bottom:28px;transform:translateX(-50%);padding:11px 17px;border-radius:13px;background:#171d2d;border:1px solid var(--line);box-shadow:0 18px 40px rgba(0,0,0,.4);font-size:11px;animation:toastIn .25s ease}@keyframes toastIn{from{opacity:0;transform:translate(-50%,10px)}}
.round-flash{position:fixed;z-index:60;inset:0;background:rgba(6,8,14,.72);backdrop-filter:blur(4px);display:grid;place-items:center;pointer-events:none;animation:flashFade 1.15s ease forwards}.round-flash>div{font-size:clamp(38px,8vw,80px);font-weight:1000;text-align:center;animation:flashPop .65s cubic-bezier(.2,.9,.25,1.25)}@keyframes flashPop{from{opacity:0;transform:scale(.55)}70%{opacity:1;transform:scale(1.08)}to{transform:scale(1)}}@keyframes flashFade{0%,70%{opacity:1}100%{opacity:0}}
@media(max-width:820px){.auth-layout{grid-template-columns:1fr;gap:20px}.auth-copy{display:none}.hero-grid,.lower-grid{grid-template-columns:1fr}.match-top{grid-template-columns:1fr .34fr 1fr}.player-chip{grid-template-columns:1fr;text-align:center}.player-chip .mini-avatar{display:none}.opponent{direction:rtl;text-align:center}.player-chip strong{font-size:32px}.duel-zone{grid-template-columns:1fr 35px 1fr}.reveal-box{min-height:165px}.big-hand{font-size:58px}}
@media(max-width:560px){.shell{width:min(100% - 18px,1120px);padding-top:12px}.topbar{margin-bottom:15px}.brand-wrap small{display:none}.connection-pill #connectionText{display:none}.hero{padding:24px 19px}.feature-strip{grid-template-columns:1fr}.profile-card{padding:23px}.panel{padding:18px}.match-top{gap:7px}.player-chip{padding:10px 5px;min-height:68px}.versus>div{font-size:22px}.battle-card{padding:15px}.status-line{display:block;text-align:center}.lock-status{margin-top:5px}.duel-zone{grid-template-columns:1fr 25px 1fr;gap:5px}.reveal-box{min-height:145px}.big-hand{font-size:50px}.moves{gap:7px}.moves button{padding:14px 5px}.moves span{font-size:38px}.list-row{grid-template-columns:1fr 1fr}.search-card{padding:34px 18px}}

/* Telegram Mini App integration */
body.telegram-mini-app{
  padding-top:max(env(safe-area-inset-top),var(--tg-safe-area-inset-top,0px));
  padding-right:max(env(safe-area-inset-right),var(--tg-safe-area-inset-right,0px));
  padding-bottom:max(env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px));
  padding-left:max(env(safe-area-inset-left),var(--tg-safe-area-inset-left,0px));
  background-color:var(--tg-theme-bg-color,#070910);
}
body.telegram-mini-app .shell{
  min-height:var(--tg-viewport-stable-height,100vh);
}
.brand,.eyebrow,.brand-wrap small,.rank-label,.moves small,.player-chip small,.versus{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.avatar{overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
body.telegram-mini-app .topbar{padding-top:4px}
@media(max-width:560px){
  body.telegram-mini-app .shell{width:min(100% - 12px,1120px)}
}

.store-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.store-item{background:rgba(5,8,14,.5);border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:16px}.store-item h4{margin:0 0 6px}.store-item p{font-size:11px;color:#7d889d;min-height:34px}.store-price{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.store-price button{border:0;border-radius:10px;padding:9px 12px;background:#263047;color:#8b94a9;cursor:not-allowed}@media(max-width:700px){.store-grid{grid-template-columns:1fr}}


/* ============================================================
   v7 — Telegram fast boot + true mobile responsive patch
   ============================================================ */

html,body{
  min-height:100%;
  min-height:100dvh;
  -webkit-text-size-adjust:100%;
}

.boot-view{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:22px;
  background:
    radial-gradient(circle at 50% 26%,rgba(124,58,237,.22),transparent 32%),
    radial-gradient(circle at 20% 85%,rgba(34,211,238,.08),transparent 35%),
    #070910;
  transition:opacity .24s ease,transform .24s ease;
}

.boot-view.leaving{
  opacity:0;
  transform:scale(1.02);
  pointer-events:none;
}

.boot-card{
  width:min(360px,100%);
  text-align:center;
}

.boot-logo{
  display:flex;
  direction:ltr;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:20px;
  font-weight:900;
  letter-spacing:.6px;
}

.boot-logo span{color:#a78bfa}

.boot-logo-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  background:linear-gradient(135deg,#8b5cf6,#5b21b6);
  box-shadow:0 0 35px rgba(139,92,246,.32);
}

.boot-orbit{
  position:relative;
  width:150px;
  height:150px;
  margin:42px auto 26px;
}

.boot-ring{
  position:absolute;
  border:1px solid rgba(167,139,250,.18);
  border-radius:50%;
}

.boot-ring.ring-a{
  inset:8px;
  animation:bootSpin 5s linear infinite;
}

.boot-ring.ring-b{
  inset:29px;
  border-color:rgba(34,211,238,.15);
  animation:bootSpin 3.4s linear infinite reverse;
}

.boot-hand{
  position:absolute;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:rgba(16,22,37,.92);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 16px 30px rgba(0,0,0,.3);
  font-size:25px;
}

.hand-rock{top:-3px;left:51px;animation:bootFloat 1.5s ease-in-out infinite}
.hand-paper{bottom:6px;left:5px;animation:bootFloat 1.5s .25s ease-in-out infinite}
.hand-scissors{bottom:6px;right:5px;animation:bootFloat 1.5s .5s ease-in-out infinite}

.boot-card h2{
  margin:0 0 7px;
  font-size:20px;
}

.boot-card p{
  margin:0;
  color:#77839a;
  font-size:12px;
}

.boot-progress{
  width:135px;
  height:4px;
  overflow:hidden;
  margin:20px auto 0;
  border-radius:20px;
  background:rgba(255,255,255,.05);
}

.boot-progress i{
  display:block;
  width:45%;
  height:100%;
  border-radius:20px;
  background:linear-gradient(90deg,#8b5cf6,#22d3ee);
  animation:bootProgress 1.1s ease-in-out infinite;
}

@keyframes bootSpin{to{transform:rotate(360deg)}}
@keyframes bootFloat{50%{transform:translateY(-7px) scale(1.04)}}
@keyframes bootProgress{
  0%{transform:translateX(-160%)}
  100%{transform:translateX(320%)}
}

/* Telegram WebView */
body.telegram-mini-app{
  min-height:100dvh;
  padding:
    max(env(safe-area-inset-top),var(--tg-safe-area-inset-top,0px))
    max(env(safe-area-inset-right),var(--tg-safe-area-inset-right,0px))
    max(env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px))
    max(env(safe-area-inset-left),var(--tg-safe-area-inset-left,0px));
}

body.telegram-mini-app .shell{
  width:min(100% - 14px,1120px);
  min-height:var(--tg-viewport-stable-height,100dvh);
  padding:8px 0 18px;
}

body.telegram-mini-app .topbar{
  height:50px;
  margin-bottom:8px;
}

body.telegram-mini-app .brand-mark{
  width:36px;
  height:36px;
  border-radius:11px;
}

body.telegram-mini-app .brand{font-size:17px}
body.telegram-mini-app .brand-wrap small{display:none}

/* A Telegram user must never see the manual auth form. */
body.telegram-mini-app #authView{
  display:none!important;
}

body.telegram-mini-app .hero-grid,
body.telegram-mini-app .lower-grid{
  grid-template-columns:1fr;
  gap:10px;
}

body.telegram-mini-app .hero,
body.telegram-mini-app .profile-card,
body.telegram-mini-app .panel,
body.telegram-mini-app .battle-card{
  border-radius:19px;
}

body.telegram-mini-app .hero{
  padding:19px 16px;
}

body.telegram-mini-app .hero h1{
  font-size:32px;
  line-height:1.1;
  letter-spacing:-1px;
  margin:7px 0 8px;
}

body.telegram-mini-app .hero .muted{
  margin:0;
  font-size:12px;
  line-height:1.7;
}

body.telegram-mini-app .play{
  margin-top:15px;
  padding:14px;
}

body.telegram-mini-app .feature-strip{
  grid-template-columns:repeat(3,1fr);
  gap:5px;
  margin-top:13px;
}

body.telegram-mini-app .feature-strip>div{
  display:block;
  text-align:center;
  padding:8px 4px;
}

body.telegram-mini-app .feature-strip>div span{
  display:block;
  margin-bottom:3px;
}

body.telegram-mini-app .feature-strip small{
  display:none;
}

body.telegram-mini-app .profile-card{
  padding:16px;
}

body.telegram-mini-app .avatar-ring{
  width:68px;
  height:68px;
  margin-bottom:8px;
}

body.telegram-mini-app .profile-stats{
  margin-top:14px;
}

body.telegram-mini-app .panel{
  padding:16px;
}

body.telegram-mini-app .search-stage{
  min-height:calc(var(--tg-viewport-stable-height,100dvh) - 70px);
}

body.telegram-mini-app .search-card{
  padding:28px 16px;
  border-radius:22px;
}

body.telegram-mini-app .radar{
  width:125px;
  height:125px;
  margin-bottom:20px;
}

body.telegram-mini-app .match-top{
  gap:6px;
  margin-bottom:8px;
}

body.telegram-mini-app .player-chip{
  min-height:62px;
  padding:9px 7px;
  border-radius:15px;
}

body.telegram-mini-app .player-chip strong{
  font-size:29px;
}

body.telegram-mini-app .battle-card{
  padding:13px;
}

body.telegram-mini-app .status-line{
  margin:12px 2px 10px;
}

body.telegram-mini-app .duel-zone{
  margin-bottom:13px;
}

body.telegram-mini-app .reveal-box{
  min-height:130px;
  border-radius:16px;
}

body.telegram-mini-app .big-hand{
  font-size:46px;
}

body.telegram-mini-app .moves{
  gap:6px;
}

body.telegram-mini-app .moves button{
  padding:12px 4px;
  border-radius:14px;
}

body.telegram-mini-app .moves span{
  font-size:35px;
}

@media(max-width:430px){
  .shell{
    width:calc(100% - 12px);
    padding-top:8px;
  }

  .topbar{
    height:48px;
    margin-bottom:8px;
  }

  .brand-mark{
    width:34px;
    height:34px;
  }

  .brand{
    font-size:16px;
  }

  .coin-pill{
    padding:7px 10px;
    font-size:12px;
  }

  .connection-pill{
    padding:6px 8px;
  }

  .hero h1{
    font-size:30px;
  }

  .play{
    grid-template-columns:auto 1fr auto;
    gap:8px;
  }

  .play-price{
    padding:7px 8px;
    font-size:11px;
  }

  .profile-stats{
    gap:4px;
  }

  .profile-stats div{
    padding:9px 3px;
  }

  .match-top{
    grid-template-columns:1fr 52px 1fr;
  }

  .versus>div{
    font-size:18px;
  }

  .player-chip b{
    font-size:12px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:100%;
    display:block;
  }

  .duel-zone{
    grid-template-columns:1fr 22px 1fr;
  }
}


/* ===== V6 Challenges ===== */
.challenges-panel{overflow:hidden}
.challenge-total{font-size:11px;color:#fbbf24}
.challenge-intro{font-size:12px;margin-top:-4px}
.challenges-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.challenge-card{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:180px;
  padding:16px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:17px;
  background:
    radial-gradient(circle at 100% 0,rgba(139,92,246,.12),transparent 42%),
    rgba(5,8,14,.48);
}
.challenge-card:after{
  content:"";
  position:absolute;
  width:120px;height:120px;
  left:-55px;bottom:-70px;
  border-radius:50%;
  background:rgba(34,211,238,.04);
  filter:blur(2px);
}
.challenge-card.done{
  opacity:.72;
  background:
    radial-gradient(circle at 100% 0,rgba(52,211,153,.08),transparent 42%),
    rgba(5,8,14,.48);
}
.challenge-card-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.challenge-card h4{
  margin:0;
  font-size:14px;
  line-height:1.6;
}
.challenge-reward{
  position:relative;
  z-index:1;
  flex:none;
  padding:6px 9px;
  color:#fde68a;
  background:rgba(251,191,36,.07);
  border:1px solid rgba(251,191,36,.12);
  border-radius:999px;
  direction:ltr;
  font-size:10px;
}
.challenge-desc{
  position:relative;
  z-index:1;
  flex:1;
  margin:10px 0 14px;
  color:#7d889d;
  font-size:11px;
  line-height:1.8;
}
.challenge-actions{
  position:relative;
  z-index:1;
  display:flex;
  gap:7px;
  align-items:center;
}
.challenge-action-btn,
.challenge-claim-btn{
  border:0;
  border-radius:11px;
  padding:10px 12px;
  color:white;
  font-weight:700;
  font-size:11px;
}
.challenge-action-btn{
  background:linear-gradient(135deg,#6d28d9,#4338ca);
}
.challenge-claim-btn{
  background:linear-gradient(135deg,#047857,#0f766e);
}
.challenge-claim-btn:disabled{
  opacity:.48;
  cursor:default;
}
.challenge-done{
  color:#6ee7b7;
  font-size:11px;
  font-weight:700;
}
.challenge-wait{
  color:#7d889d;
  font-size:10px;
}
.challenge-empty{
  grid-column:1/-1;
  padding:24px;
  text-align:center;
  color:#667187;
}
@media(max-width:700px){
  .challenges-grid{grid-template-columns:1fr}
  .challenge-card{min-height:0}
}
body.telegram-mini-app .challenges-grid{
  grid-template-columns:1fr;
}
body.telegram-mini-app .challenge-card{
  min-height:0;
  padding:14px;
  border-radius:15px;
}


/* Game v0.6.0 */
body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.tg-only,.terms-gate{
  position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px;
  background:radial-gradient(circle at 50% 25%,rgba(124,58,237,.20),transparent 34%),#070910;
}
.tg-only.hidden,.terms-gate.hidden{display:none!important}
.tg-only-card,.terms-card{
  width:min(440px,100%);background:rgba(17,24,39,.96);
  border:1px solid rgba(255,255,255,.08);border-radius:24px;
  padding:24px;box-shadow:0 30px 90px rgba(0,0,0,.45);
}
.tg-only-card{text-align:center}
.tg-only-logo{
  width:64px;height:64px;margin:0 auto 14px;border-radius:19px;
  display:grid;place-items:center;font-size:29px;font-weight:900;
  background:linear-gradient(135deg,#8b5cf6,#2563eb)
}
.tg-only-button{
  display:block;margin-top:18px;padding:13px;border-radius:12px;
  background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;text-decoration:none;font-weight:800
}
.terms-card{text-align:left}.terms-card h2{margin:7px 0 15px}
.terms-scroll{
  max-height:48vh;overflow:auto;padding:13px;background:#0b101c;border:1px solid #263047;
  border-radius:14px;font-size:12px;line-height:1.72;color:#cbd5e1
}
.terms-scroll p{margin:0 0 10px}
.terms-check{display:flex;gap:9px;align-items:flex-start;margin:14px 0;font-size:12px}
.terms-check input{width:auto;margin-top:2px}
.terms-actions{display:flex;gap:9px}.terms-actions button{flex:1;padding:12px;border:0;border-radius:11px;font-weight:800}
.terms-actions .ghost{background:#202a3d;color:#cbd5e1}.terms-actions button:disabled{opacity:.42}
.daily-reward-card{
  display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;
  border:1px solid rgba(255,255,255,.07);border-radius:16px;
  background:linear-gradient(135deg,rgba(124,58,237,.11),rgba(34,211,238,.05))
}
.daily-reward-card h4{margin:4px 0}.daily-reward-card p{margin:0;color:#8290a8;font-size:11px}
.daily-reward-card button{border:0;border-radius:10px;padding:10px 14px;background:#6d28d9;color:#fff;font-weight:800}
.daily-reward-card.claimed{opacity:.72}


/* ===== Game v0.6.1 LTR normalization ===== */
html,
body {
  direction: ltr !important;
  text-align: left;
}

body,
button,
input,
textarea,
select {
  direction: ltr;
}

.app-shell,
.topbar,
.hero,
.glass,
.panel,
.profile-card,
.match-card,
.matchmaking-card,
.game-card,
.history,
.leaderboard,
.challenges-panel,
.store-panel,
.terms-card,
.tg-only-card {
  direction: ltr;
}

h1,h2,h3,h4,h5,h6,
p,small,label,
.eyebrow,
.muted,
.status-text,
.player-name,
.profile-name {
  direction: ltr;
  unicode-bidi: plaintext;
}

.hero h1,
.hero h2,
.hero p,
.match-card h1,
.match-card h2,
.match-card p,
.terms-card,
.tg-only-card {
  text-align: left;
}

.topbar {
  flex-direction: row;
}

.profile-head,
.stat-row,
.match-head,
.match-actions,
.terms-actions,
.daily-reward-card {
  direction: ltr;
}

input,
textarea {
  text-align: left;
}

/* Keep numeric/token badges readable in English UI */
.coin,
.badge,
.version-badge,
.stat-value {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Telegram safe areas */
body {
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

@media (max-width: 520px) {
  .hero,
  .glass,
  .panel {
    text-align: left;
  }
}

/* ===== Game v0.7.0 ===== */
.maintenance-gate{position:fixed;inset:0;z-index:20000;display:grid;place-items:center;padding:22px;background:#070910}
.maintenance-gate.hidden{display:none!important}
.maintenance-card{width:min(430px,100%);text-align:center;background:#111827;border:1px solid rgba(255,255,255,.08);padding:30px;border-radius:26px}
.maintenance-logo,.brand-logo-large{width:86px;height:86px;display:block;margin:0 auto 16px}
.support-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#supportPanel textarea{width:100%;min-height:110px;margin:10px 0}
#supportPanel select,#supportPanel input{width:100%;padding:12px;border-radius:12px;background:#0b101c;color:#fff;border:1px solid #273047}
.support-ticket-list{margin-top:14px;display:grid;gap:8px}
.support-ticket{display:flex;justify-content:space-between;gap:10px;padding:10px;border-radius:12px;background:#0b101c;border:1px solid #202a3d}
#moves button:disabled{cursor:not-allowed;opacity:.52;filter:saturate(.55)}
#moves button.selected:disabled{opacity:1;filter:none;box-shadow:0 0 0 2px rgba(139,92,246,.6),0 10px 30px rgba(124,58,237,.18)}
@media(max-width:520px){.support-form-grid{grid-template-columns:1fr}}


/* ===== Game v0.7.3 — Support Center ===== */
.support-launch-card{
  width:100%;
  display:grid;
  grid-template-columns:48px 1fr 22px;
  align-items:center;
  gap:12px;
  margin-top:18px;
  padding:16px;
  text-align:left;
  color:#fff;
  background:
    linear-gradient(135deg,rgba(124,58,237,.13),rgba(34,211,238,.06)),
    var(--panel,#111827);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  cursor:pointer;
}
.support-launch-card h3{
  margin:3px 0 4px;
}
.support-launch-card p{
  margin:0;
  color:#8792a8;
  font-size:11px;
  line-height:1.5;
}
.support-launch-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  font-size:22px;
  font-weight:900;
  background:linear-gradient(135deg,#7c3aed,#0891b2);
  box-shadow:0 10px 26px rgba(124,58,237,.22);
}
.support-launch-arrow{
  font-size:30px;
  color:#8d98ad;
  line-height:1;
}

body.support-open{
  overflow:hidden;
}

.support-center{
  position:fixed;
  inset:0;
  z-index:16000;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 0%,rgba(124,58,237,.16),transparent 36%),
    #070910;
}
.support-center.hidden{
  display:none!important;
}
.support-center-shell{
  width:min(520px,100%);
  min-height:100%;
  padding:
    max(16px,env(safe-area-inset-top))
    16px
    max(20px,env(safe-area-inset-bottom));
  overflow-y:auto;
}
.support-center-header{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}
.support-center-header h2{
  margin:3px 0 0;
  font-size:23px;
}
.support-back{
  width:42px;
  height:42px;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.08);
  color:#fff;
  background:#111827;
  font-size:29px;
  line-height:1;
}
.support-header-spacer{
  width:42px;
}

.support-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:5px;
  margin-bottom:14px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  background:#0b101c;
}
.support-tab{
  padding:11px 8px;
  border:0;
  border-radius:10px;
  color:#7f8ba3;
  background:transparent;
  font-weight:800;
}
.support-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#6d28d9,#3730a3);
}

.support-view{
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  background:rgba(17,24,39,.95);
}
.support-view.hidden{
  display:none!important;
}
.support-intro{
  margin-bottom:18px;
}
.support-intro h3{
  margin:0 0 5px;
  font-size:19px;
}
.support-intro p{
  margin:0;
  color:#8792a8;
  font-size:12px;
  line-height:1.6;
}

.support-field{
  display:block;
  margin:0 0 14px;
}
.support-field>span{
  display:block;
  margin-bottom:6px;
  color:#dce3ef;
  font-size:12px;
  font-weight:750;
}
.support-field input,
.support-field select,
.support-field textarea{
  width:100%;
  color:#fff;
  background:#090e19;
  border:1px solid #253049;
  border-radius:12px;
  outline:none;
}
.support-field input,
.support-field select{
  height:46px;
  padding:0 12px;
}
.support-field textarea{
  min-height:150px;
  padding:12px;
  resize:vertical;
}
.support-field input:focus,
.support-field select:focus,
.support-field textarea:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 3px rgba(124,58,237,.12);
}
.support-field small{
  display:block;
  margin-top:5px;
  color:#66738a;
  font-size:10px;
}

.support-submit{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:13px;
  color:#fff;
  font-weight:900;
  background:linear-gradient(135deg,#7c3aed,#0891b2);
}
.support-submit:disabled{
  opacity:.55;
}

.support-form-error{
  margin:0 0 14px;
  padding:11px 12px;
  color:#fecaca;
  background:rgba(185,28,28,.16);
  border:1px solid rgba(248,113,113,.26);
  border-radius:11px;
  font-size:11px;
  line-height:1.5;
}
.support-form-error.hidden{
  display:none!important;
}

.support-ticket-list{
  display:grid;
  gap:9px;
}
.support-ticket{
  padding:13px;
  border:1px solid #222d42;
  border-radius:13px;
  background:#090e19;
}
.support-ticket-title{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.support-ticket-title b{
  font-size:12px;
  line-height:1.45;
}
.support-ticket-status{
  flex:none;
  padding:4px 7px;
  border-radius:999px;
  font-size:9px;
  font-weight:850;
  text-transform:uppercase;
}
.support-ticket-status.open{
  color:#fcd34d;
  background:rgba(245,158,11,.14);
}
.support-ticket-status.answered{
  color:#86efac;
  background:rgba(34,197,94,.14);
}
.support-ticket-status.closed{
  color:#94a3b8;
  background:rgba(100,116,139,.14);
}
.support-ticket-meta{
  margin-top:7px;
  color:#69768e;
  font-size:10px;
}
.support-empty{
  display:grid;
  gap:4px;
  padding:28px 14px;
  text-align:center;
  color:#78859d;
  border:1px dashed #273149;
  border-radius:13px;
}
.support-empty b{
  color:#d9e0ec;
}
.support-empty span{
  font-size:10px;
}
.support-empty.support-error{
  color:#fca5a5;
}

@media(max-width:520px){
  .support-center-shell{
    width:100%;
  }
}


/* ===== Game v0.7.4 — Complete Support Thread ===== */

.support-ticket-button{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  color:#fff;
  text-align:left;
  cursor:pointer;
}

.support-ticket-button:hover{
  border-color:#3a4661;
}

.support-ticket-chevron{
  flex:none;
  color:#8b96aa;
  font-size:24px;
  line-height:1;
}

.support-thread-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.support-thread-head h3{
  margin:3px 0 0;
  font-size:15px;
  line-height:1.4;
}

.support-thread-back{
  min-height:38px;
  padding:0 11px;
  border-radius:10px;
  border:1px solid #273149;
  color:#cbd5e1;
  background:#0b101c;
}

.support-thread-meta{
  margin:0 0 14px;
  color:#76839a;
  font-size:10px;
}

.support-thread-messages{
  display:grid;
  gap:10px;
  margin-bottom:14px;
}

.support-message{
  max-width:90%;
  padding:11px 12px;
  border-radius:14px;
}

.support-message.user{
  justify-self:end;
  background:
    linear-gradient(
      135deg,
      rgba(109,40,217,.32),
      rgba(55,48,163,.20)
    );
  border:1px solid rgba(139,92,246,.26);
}

.support-message.admin{
  justify-self:start;
  background:#0b101c;
  border:1px solid #263149;
}

.support-message-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.support-message-head b{
  color:#fff;
  font-size:10px;
}

.support-message-head span{
  color:#67748b;
  font-size:8px;
}

.support-message-body{
  color:#dce3ef;
  font-size:12px;
  line-height:1.65;
  overflow-wrap:anywhere;
}

.support-reply-box textarea{
  width:100%;
  min-height:110px;
  padding:12px;
  margin-bottom:9px;
  color:#fff;
  background:#090e19;
  border:1px solid #253049;
  border-radius:12px;
  resize:vertical;
  outline:none;
}

.support-reply-box textarea:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 3px rgba(124,58,237,.12);
}

.support-closed-notice{
  padding:13px;
  color:#94a3b8;
  text-align:center;
  background:#0b101c;
  border:1px solid #263149;
  border-radius:12px;
  font-size:11px;
  line-height:1.6;
}

.support-closed-notice.hidden{
  display:none!important;
}


/* ===== Game v0.8.0 — TON Connect Wallet Lab ===== */

.wallet-lab-card{
  width:100%;
  display:grid;
  grid-template-columns:48px 1fr 22px;
  align-items:center;
  gap:12px;
  margin-top:18px;
  padding:16px;
  text-align:left;
  color:#fff;
  border:1px solid rgba(34,211,238,.16);
  border-radius:18px;
  background:
    linear-gradient(
      135deg,
      rgba(8,145,178,.12),
      rgba(124,58,237,.10)
    ),
    #111827;
}

.wallet-lab-card h3{
  margin:3px 0 4px;
}

.wallet-lab-card p{
  margin:0;
  color:#8792a8;
  font-size:11px;
  line-height:1.5;
}

.wallet-lab-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  font-size:25px;
  font-weight:900;
  color:#fff;
  background:
    linear-gradient(135deg,#0891b2,#6d28d9);
}

.wallet-lab-arrow{
  color:#8a97ab;
  font-size:30px;
}

body.wallet-lab-open{
  overflow:hidden;
}

.wallet-lab{
  position:fixed;
  inset:0;
  z-index:17000;
  display:flex;
  justify-content:center;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(8,145,178,.16),
      transparent 34%
    ),
    #070910;
}

.wallet-lab.hidden{
  display:none!important;
}

.wallet-lab-shell{
  width:min(520px,100%);
  min-height:100%;
  overflow-y:auto;
  padding:
    max(16px,env(safe-area-inset-top))
    16px
    max(20px,env(safe-area-inset-bottom));
}

.wallet-lab-header{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}

.wallet-lab-header h2{
  margin:3px 0 0;
}

.wallet-lab-back{
  width:42px;
  height:42px;
  color:#fff;
  background:#111827;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  font-size:29px;
}

.wallet-lab-spacer{
  width:42px;
}

.wallet-test-banner,
.wallet-status-card,
.wallet-info-card{
  margin-bottom:12px;
  padding:16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(17,24,39,.96);
}

.wallet-test-banner{
  display:grid;
  gap:4px;
  border-color:rgba(34,211,238,.20);
}

.wallet-test-banner b{
  color:#67e8f9;
  font-size:12px;
}

.wallet-test-banner span{
  color:#8290a8;
  font-size:10px;
  line-height:1.55;
}

.wallet-status-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}

.wallet-status-top h3{
  margin:3px 0 0;
}

.wallet-status-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  background:#64748b;
  box-shadow:0 0 0 5px rgba(100,116,139,.10);
}

.wallet-status-dot.connected{
  background:#22c55e;
  box-shadow:0 0 0 5px rgba(34,197,94,.12);
}

.wallet-muted{
  margin:0 0 12px;
  color:#8290a8;
  font-size:11px;
}

.wallet-primary,
.wallet-danger{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:13px;
  color:#fff;
  font-weight:900;
}

.wallet-primary{
  background:linear-gradient(135deg,#0891b2,#6d28d9);
}

.wallet-danger{
  margin-top:14px;
  background:linear-gradient(135deg,#991b1b,#dc2626);
}

.wallet-detail{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #202a3d;
}

.wallet-detail span{
  color:#758299;
  font-size:10px;
}

.wallet-detail b,
.wallet-detail code{
  color:#e5e7eb;
  font-size:11px;
  text-align:right;
}

.wallet-address-row{
  display:grid;
  gap:6px;
}

.wallet-address-row code{
  padding:8px 10px;
  overflow:hidden;
  text-overflow:ellipsis;
  border-radius:9px;
  background:#090e19;
  border:1px solid #202a3d;
}

.wallet-info-card h3{
  margin:0 0 12px;
}

.wallet-check{
  padding:8px 0;
  color:#a7b3c8;
  font-size:11px;
  border-bottom:1px solid #202a3d;
}

.wallet-check:last-child{
  border-bottom:0;
}

.wallet-test-error{
  padding:12px;
  color:#fecaca;
  font-size:11px;
  line-height:1.5;
  border:1px solid rgba(248,113,113,.25);
  border-radius:12px;
  background:rgba(185,28,28,.14);
}

.wallet-test-error.hidden{
  display:none!important;
}


/* ===== Game v0.8.1 — Native TON Connect Button ===== */

.ton-connect-root{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ton-connect-root > div{
  width:100%;
}

.ton-connect-root button{
  width:100%!important;
  min-height:48px!important;
}

.wallet-native-note{
  margin:8px 0 0;
  color:#65748a;
  text-align:center;
  font-size:9px;
  line-height:1.5;
}


/* ===== Game v0.8.2 ===== */

#connectTonWallet:disabled{
  opacity:.62;
  cursor:wait;
}

.wallet-native-note{
  margin-top:9px;
  color:#718096;
  text-align:center;
  font-size:9px;
  line-height:1.55;
}


/* ===== Game v0.8.3 — Direct Wallet Picker ===== */

.rps-wallet-picker{
  position:fixed;
  inset:0;
  z-index:19000;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:14px;
  background:rgba(2,6,16,.70);
  backdrop-filter:blur(8px);
}

.rps-wallet-picker.hidden{
  display:none!important;
}

.rps-wallet-picker-sheet{
  width:min(500px,100%);
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.09);
  background:#101626;
  box-shadow:0 -20px 70px rgba(0,0,0,.35);
}

.rps-wallet-picker-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.rps-wallet-picker-head h3{
  margin:4px 0 0;
}

.wallet-picker-close{
  width:38px;
  height:38px;
  border:0;
  border-radius:11px;
  color:#a9b4c7;
  background:#1a2235;
  font-size:24px;
}

.wallet-picker-copy{
  margin:12px 0 14px;
  color:#8390a5;
  font-size:10px;
  line-height:1.6;
}

.wallet-picker-list{
  display:grid;
  gap:8px;
}

.wallet-option{
  width:100%;
  display:grid;
  grid-template-columns:44px 1fr auto;
  align-items:center;
  gap:11px;
  padding:11px;
  text-align:left;
  color:#fff;
  background:#090e19;
  border:1px solid #253149;
  border-radius:13px;
}

.wallet-option:active{
  transform:scale(.99);
}

.wallet-option-logo{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  font-weight:950;
  background:linear-gradient(
    135deg,
    #0891b2,
    #6d28d9
  );
}

.wallet-option b{
  display:block;
  font-size:12px;
}

.wallet-option span{
  display:block;
  margin-top:3px;
  color:#76849a;
  font-size:9px;
}

.wallet-option strong{
  color:#8391a6;
  font-size:24px;
}

@media(min-width:700px){
  .rps-wallet-picker{
    align-items:center;
  }
}


/* ===== Game v0.8.4 — Testnet Transaction Lab ===== */

.wallet-test-transaction{
  margin-top:16px;
  padding:14px;
  border:1px solid rgba(34,211,238,.20);
  border-radius:14px;
  background:
    linear-gradient(
      135deg,
      rgba(8,145,178,.08),
      rgba(109,40,217,.06)
    ),
    #0a0f1b;
}

.wallet-test-transaction-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.wallet-test-transaction-head h3{
  margin:3px 0 0;
  font-size:15px;
}

.wallet-testnet-badge{
  flex:none;
  padding:5px 7px;
  color:#67e8f9;
  background:rgba(8,145,178,.13);
  border:1px solid rgba(34,211,238,.22);
  border-radius:999px;
  font-size:8px;
  font-weight:900;
}

.wallet-test-destination{
  display:grid;
  gap:6px;
  margin-top:12px;
}

.wallet-test-destination span{
  color:#77859a;
  font-size:9px;
}

.wallet-test-destination code{
  padding:8px 9px;
  overflow:hidden;
  color:#cbd5e1;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:#070b14;
  border:1px solid #202a3d;
  border-radius:9px;
  font-size:9px;
}

.wallet-test-copy{
  margin:10px 0;
  color:#76849a;
  font-size:9px;
  line-height:1.55;
}

.wallet-test-send{
  width:100%;
  min-height:46px;
  border:0;
  border-radius:12px;
  color:#fff;
  font-weight:900;
  background:
    linear-gradient(135deg,#0891b2,#6d28d9);
}

.wallet-test-send:disabled{
  opacity:.50;
}

.wallet-transaction-result{
  margin-top:10px;
  padding:10px;
  border-radius:10px;
  font-size:10px;
  line-height:1.5;
}

.wallet-transaction-result.hidden{
  display:none!important;
}

.wallet-transaction-result.pending{
  color:#fde68a;
  background:rgba(161,98,7,.13);
  border:1px solid rgba(245,158,11,.22);
}

.wallet-transaction-result.success{
  color:#86efac;
  background:rgba(22,163,74,.13);
  border:1px solid rgba(34,197,94,.22);
}

.wallet-transaction-result.error{
  color:#fca5a5;
  background:rgba(185,28,28,.13);
  border:1px solid rgba(239,68,68,.22);
}
