:root { --ink:#1B1026; --glass:rgba(48,26,72,.86); --glass2:rgba(90,50,130,.72); --edge:rgba(255,255,255,.14); --txt:#fff; --dim:#c9b8e0;
  --pink:#FF3FA4; --cyan:#2EE6FF; --gold:#FFD23F; --vid:#A15CFF; --green:#3DDC84; --acc:#B86BFF;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { margin:0; height:100%; overflow:hidden; background:#0b0710; font-family:'Tilt Neon', 'Trebuchet MS', sans-serif; color:var(--txt);
  -webkit-user-select:none; user-select:none; touch-action:none; overscroll-behavior:none; }
img { -webkit-user-drag:none; }
#app { position:relative; margin:0 auto; max-width:480px; height:100dvh; height:100vh; height:100dvh; overflow:hidden; background:#120c18; }
#cv { position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; }
.svgi { display:inline-flex; align-items:center; justify-content:center; } .svgi svg { width:100%; height:100%; }
.missing { visibility:hidden; }

/* ---------- buttons ---------- */
.btn { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:50px; padding:6px 20px;
  background:var(--glass2); border:2px solid var(--edge); border-radius:26px; font-weight:400; font-size:20px; color:#fff; cursor:pointer;
  box-shadow:0 4px 0 rgba(0,0,0,.45); transition:transform .08s, box-shadow .08s; white-space:nowrap; }
.btn.pressed { transform:translateY(3px) scale(.96); box-shadow:0 1px 0 rgba(0,0,0,.45); }
.btn.disabled { opacity:.4; pointer-events:none; }
.btn .bi { width:34px; height:34px; object-fit:contain; }
.btn .vid { width:38px; height:38px; }
.btn.primary { background:linear-gradient(#FF5DB5,#D9208A); border-color:#FFB0DA; font-size:26px; min-height:62px; padding:8px 34px; box-shadow:0 5px 0 #6E0F45, 0 0 22px rgba(255,63,164,.45); }
.btn.white { background:#fff; color:#2a1840; font-size:26px; min-height:62px; padding:8px 40px; border-color:#fff; box-shadow:0 5px 0 rgba(0,0,0,.35); }
.btn.video { background:linear-gradient(#B47BFF,#7D3FE0); border-color:#D8B8FF; box-shadow:0 4px 0 #3D1680, 0 0 18px rgba(161,92,255,.4); }
.btn.gem { background:linear-gradient(#3a2a58,#2a1c42); border-color:#8f6bd0; }
.btn.quiet { background:transparent; border-color:transparent; box-shadow:none; font-size:18px; color:var(--dim); min-height:46px; text-decoration:underline; text-underline-offset:4px; }
.btn.late { visibility:hidden; } .btn.late.show { visibility:visible; animation:fadein .3s; }
.btn.round { width:54px; height:54px; padding:0; border-radius:50%; min-height:0; background:rgba(40,22,60,.72); }
.btn.round .bi, .btn.round .svgi { width:32px; height:32px; }
.btn .sub { display:block; font-size:14px; font-weight:400; opacity:.85; margin-top:-4px; }
.badge { position:absolute; top:-8px; right:-8px; min-width:24px; height:24px; padding:0 6px; border-radius:12px; background:var(--pink); color:#fff;
  border:2px solid #fff; font-size:14px; line-height:20px; text-align:center; font-weight:400; }
.badge.plus { background:var(--vid); } .badge.dot { min-width:16px; width:16px; height:16px; padding:0; top:-4px; right:-4px; }
.chip { display:flex; align-items:center; gap:6px; background:rgba(30,16,46,.75); border:2px solid var(--edge); border-radius:22px; padding:2px 14px 2px 6px; font-weight:400; font-size:20px; min-height:44px; }
.chip img { width:32px; height:32px; object-fit:contain; }
.bump { animation:bump .3s; } @keyframes bump { 40% { transform:scale(1.18); } }
@keyframes fadein { from { opacity:0; transform:translateY(6px); } }
@keyframes pop { from { transform:scale(.5); opacity:0; } }

/* ---------- HUD ---------- */
#hud { position:absolute; left:0; right:0; top:0; padding:calc(var(--sat) + 8px) 12px 0; display:flex; align-items:center; gap:10px; pointer-events:none; z-index:5; }
#hud > * { pointer-events:auto; }
#prog { flex:1; display:flex; align-items:center; gap:8px; }
#prog .bar { flex:1; height:12px; border-radius:6px; background:rgba(255,255,255,.14); overflow:hidden; }
#prog .bar i { display:block; height:100%; width:0; background:#fff; border-radius:6px; box-shadow:0 0 10px #fff; transition:width .25s; }
#prog .pc { width:52px; height:52px; border-radius:50%; border:2px solid rgba(255,255,255,.35); display:grid; place-items:center; font-weight:400; font-size:16px; background:rgba(20,10,30,.5); }
#prog .pc.full { background:#fff; color:#2a1840; }
#lvl { position:absolute; top:calc(var(--sat) + 64px); left:0; right:0; text-align:center; font-weight:400; font-size:16px; color:var(--dim); pointer-events:none; z-index:4; text-shadow:0 1px 3px #000; }
#lvl b { color:#fff; } #lvl .tag { display:inline-block; margin-left:6px; padding:0 8px; border-radius:9px; font-size:13px; background:var(--pink); color:#fff; }
#lvl .tag.big { background:var(--gold); color:#2a1840; }

/* ammo tray (right edge, like a rack) */
#tray { position:absolute; right:0; bottom:calc(var(--sab) + 12px); display:flex; flex-direction:column-reverse; gap:8px; z-index:5; }
.am { position:relative; display:flex; align-items:center; gap:4px; height:54px; min-width:84px; padding:0 12px 0 8px; border-radius:29px 0 0 29px;
  background:rgba(30,16,46,.78); border:2px solid var(--edge); border-right:none; font-weight:400; font-size:20px; transition:transform .12s, background .12s; }
.am img, .am .svgi { width:40px; height:40px; object-fit:contain; }
.am.sel { background:var(--acc); border-color:#fff; transform:translateX(-6px); box-shadow:0 0 18px rgba(255,255,255,.35); }
.am .n { min-width:26px; text-align:center; }
.am .buy { display:flex; align-items:center; gap:2px; font-size:16px; color:var(--gold); }
.am .buy img { width:22px; height:22px; }
.am.empty .n { color:#ff8a8a; }
.am.pulse { animation:nudge 1s infinite; }
@keyframes nudge { 50% { transform:translateX(-10px) scale(1.06); } }

/* ---------- home ---------- */
#home { position:absolute; inset:0; z-index:6; display:none; flex-direction:column; align-items:center; pointer-events:none; }
#home.on { display:flex; }
#home > * { pointer-events:auto; }
#home .top { width:100%; display:flex; justify-content:space-between; align-items:center; padding:calc(var(--sat) + 8px) 12px 0; }
#home .mid { margin-top:auto; display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom:24px; }
#home .playbtn { min-width:230px; flex-direction:column; gap:0; line-height:1.05; padding:8px 40px 10px; }
#home .row { display:flex; gap:14px; justify-content:center; margin-bottom:calc(var(--sab) + 18px); }
#home .row .btn { width:74px; height:74px; border-radius:24px; padding:0; }
#home .row .btn .bi { width:52px; height:52px; }
#home .row .btn .vid { position:absolute; bottom:-6px; right:-6px; width:30px; height:28px; }
#home .street { font-weight:400; color:var(--dim); font-size:17px; text-shadow:0 1px 3px #000; }

/* ---------- modals ---------- */
#modals { position:absolute; inset:0; pointer-events:none; z-index:20; }
#modals > * { pointer-events:auto; }
.dim { position:absolute; inset:0; background:rgba(6,2,12,.62); animation:fadein .2s; }
.dim.out, .modal.out { opacity:0; transition:opacity .2s; }
.modal { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(92%, 400px); max-height:88%; overflow:auto;
  background:var(--glass); border:2px solid var(--edge); border-radius:28px; padding:22px 18px 18px; text-align:center;
  box-shadow:0 20px 50px rgba(0,0,0,.6); animation:mpop .28s cubic-bezier(.3,1.5,.6,1); }
@keyframes mpop { from { transform:translate(-50%,-50%) scale(.7); opacity:0; } }
.mtitle { font-family:'Neonderthaw', 'Tilt Neon', cursive; font-size:50px; font-weight:400; line-height:1.05; margin:0 36px 8px; color:#fff; text-shadow:0 0 4px #fff, 0 0 10px #ff3fa4, 0 0 22px #ff3fa4, 0 0 40px #ff3fa4; }
.mart { width:110px; height:110px; object-fit:contain; display:block; margin:0 auto 6px; }
.mbtns { display:flex; flex-direction:column; align-items:center; gap:10px; margin-top:16px; }
.mbtns .btn { min-width:230px; }
.mclose { position:absolute; top:10px; right:10px; width:46px; height:46px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.08); }
.mclose svg { width:20px; height:20px; } .mclose .xi { width:34px; height:34px; }
.stars { display:flex; justify-content:center; gap:6px; margin:6px 0 2px; }
.stars img { width:64px; height:64px; filter:grayscale(1) brightness(.35); transition:filter .2s, transform .2s; }
.stars img:nth-child(2) { width:80px; height:80px; margin-top:-12px; }
.stars img.on { filter:none; animation:pop .35s cubic-bezier(.3,1.6,.6,1); }
.reward { display:flex; align-items:center; justify-content:center; gap:8px; font-size:34px; font-weight:400; margin:6px 0; }
.reward img { width:46px; height:46px; }
.ring { width:120px; height:120px; margin:4px auto 6px; position:relative; }
.ring svg { width:100%; height:100%; transform:rotate(-90deg); }
.ring b { position:absolute; inset:0; display:grid; place-items:center; font-size:28px; }
.note { color:var(--dim); font-size:17px; margin:2px 0; }
.dots { display:flex; justify-content:center; align-items:center; gap:5px; margin:10px 0 4px; }
.dots i { width:12px; height:12px; border-radius:50%; background:rgba(255,255,255,.2); }
.dots i.on { background:#fff; box-shadow:0 0 6px #fff; }
.dots img { width:40px; height:40px; margin-left:4px; }
.grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-top:8px; }
.cell { position:relative; background:rgba(255,255,255,.06); border:2px solid var(--edge); border-radius:18px; padding:8px 4px 6px; display:flex; flex-direction:column; align-items:center; gap:4px; min-height:110px; }
.cell img.big { width:64px; height:64px; object-fit:contain; }
.cell .lbl { font-size:15px; font-weight:400; color:var(--dim); }
.cell .price { display:flex; align-items:center; gap:3px; font-weight:400; font-size:17px; }
.cell .price img { width:22px; height:22px; }
.cell.sel { border-color:#fff; box-shadow:0 0 14px rgba(255,255,255,.35); }
.cell.locked img.big { filter:grayscale(1) brightness(.5); }
.tabs { display:flex; gap:8px; justify-content:center; margin:0 0 6px; }
.tabs .btn { min-height:44px; font-size:18px; padding:4px 18px; }
.tabs .btn.on { background:var(--acc); border-color:#fff; }
.gal { display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; }
.gal canvas { width:100%; aspect-ratio:1/1.1; background:rgba(0,0,0,.35); border-radius:14px; border:2px solid var(--edge); }
.pager { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; font-weight:400; }
.pager .btn { width:48px; height:48px; padding:0; min-height:0; border-radius:50%; }
.pager .btn .svgi { width:24px; height:24px; }
.gift7 { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.gift7 .cell { min-height:92px; padding:6px 2px; }
.gift7 .cell img { width:38px; height:38px; object-fit:contain; }
.gift7 .cell.done { opacity:.4; } .gift7 .cell.today { border-color:var(--gold); box-shadow:0 0 14px rgba(255,210,63,.5); }
.toggles { display:flex; justify-content:center; gap:14px; margin:8px 0; }
.toggles .btn { width:72px; height:72px; border-radius:22px; padding:0; }
.toggles .btn.off { opacity:.35; }
.toggles .btn .svgi { width:36px; height:36px; }
.build { font-size:13px; color:var(--dim); margin-top:10px; }

/* ---------- toast / coach / fx ---------- */
.toast { position:absolute; left:50%; top:calc(var(--sat) + 100px); transform:translateX(-50%) translateY(-10px); opacity:0; pointer-events:none; z-index:30;
  display:flex; align-items:center; gap:10px; background:rgba(26,12,40,.96); color:#fff; border:2px solid rgba(79,139,255,.8); border-left:7px solid #4F8BFF; border-radius:16px;
  box-shadow:0 0 16px rgba(79,139,255,.35), 0 4px 0 #000; padding:8px 16px 8px 10px; font-weight:400; font-size:19px; transition:opacity .2s, transform .2s; white-space:nowrap; }
.toast.show { opacity:1; transform:translateX(-50%); }
.toast.problem { border-color:rgba(255,75,75,.8); border-left-color:#FF4B4B; box-shadow:0 0 16px rgba(255,75,75,.35), 0 4px 0 #000; } .toast.reward { border-color:rgba(255,210,63,.8); border-left-color:var(--gold); box-shadow:0 0 16px rgba(255,210,63,.35), 0 4px 0 #000; }
.toast .ti { width:32px; height:32px; object-fit:contain; }
#fx { position:absolute; inset:0; pointer-events:none; z-index:25; overflow:hidden; }
.conf { position:absolute; top:-12px; width:9px; height:15px; border-radius:2px; animation:fall linear forwards; }
@keyframes fall { to { transform:translate(var(--dx), 110vh) rotate(var(--r)); } }
.flycoin { position:fixed; width:30px; height:30px; z-index:40; pointer-events:none; transition:transform .6s cubic-bezier(.5,0,.8,.6), opacity .6s; }
#coach { position:absolute; inset:0; z-index:19; display:none; }
#coach.on { display:block; }
#coach.pass { pointer-events:none; } #coach.pass .cbox { pointer-events:auto; }
#coach .hole { position:absolute; border-radius:18px; box-shadow:0 0 0 2000px rgba(6,2,12,.6); border:3px solid var(--gold); animation:hpulse 1s infinite; }
@keyframes hpulse { 50% { border-color:#fff; } }
#coach .cbox { position:absolute; left:16px; right:16px; display:flex; align-items:center; gap:10px; background:rgba(26,12,40,.97); color:#fff; border:2px solid rgba(255,210,63,.85);
  border-left:7px solid var(--gold); border-radius:16px; box-shadow:0 0 18px rgba(255,210,63,.35), 0 4px 0 #000; padding:10px 46px 10px 10px; font-weight:400; font-size:20px; }
#coach .cbox .ti { width:36px; height:36px; }
#coach .cbox::after { content:''; position:absolute; left:calc(var(--ax, 50%) - 16px - 10px); width:18px; height:18px; background:#1a0c28; border:2px solid rgba(255,210,63,.85); transform:rotate(45deg); }
#coach .cbox.up::after { top:-11px; border-right:none; border-bottom:none; } #coach .cbox.down::after { bottom:-11px; border-left:none; border-top:none; }
#coach .cbox:not(.up):not(.down)::after { display:none; }
#coach .cskip { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.1); }
#coach .cskip svg { width:16px; height:16px; }
#coach .dots { position:absolute; bottom:-18px; left:0; right:0; margin:0; } #coach .dots i { width:8px; height:8px; }
#coach .hand { position:absolute; width:58px; height:66px; margin:-6px 0 0 -14px; pointer-events:none; }
#coach .hand svg { width:100%; height:100%; } #coach .hand svg path { stroke:#1B1026; }
#coach .hand.tap { animation:htap 1s infinite; }
#coach .hand.drag { animation:hdrag 1.6s infinite ease-in-out; }
@keyframes htap { 50% { transform:translate(4px,8px) scale(.92); } }
@keyframes hdrag { 0%,15% { transform:translate(0,0); opacity:1; } 70% { transform:translate(-24px,120px); opacity:1; } 85%,100% { transform:translate(-24px,120px); opacity:0; } }
#boot { position:fixed; inset:0; background:#120c18; display:grid; place-content:center; gap:16px; z-index:100; transition:opacity .4s; }
#boot .t { font-family:'Neonderthaw', 'Tilt Neon', cursive; font-size:58px; font-weight:400; color:#fff; text-shadow:0 0 6px #fff, 0 0 14px #FF3FA4, 0 0 28px #FF3FA4; }
#boot .bar { width:200px; height:8px; border-radius:4px; background:rgba(255,255,255,.15); overflow:hidden; } #boot .bar i { display:block; height:100%; width:30%; background:#fff; animation:load 1s infinite; }
@keyframes load { from { transform:translateX(-100%); } to { transform:translateX(330%); } }
#boot.off { opacity:0; pointer-events:none; }

/* non-blocking tips: never dim, never capture input */
#coach.hint, #coach.hint * { pointer-events:none !important; }
#coach.hint .hole { box-shadow:0 0 18px rgba(255,210,63,.55); border-radius:18px; }
#coach.hint .cbox { padding-right:14px; animation:tipin .25s ease-out; }
#coach.fade { opacity:0; transition:opacity .2s; }
@keyframes tipin { from { opacity:0; transform:translateY(6px); } }

/* neon type: labels glow softly like lit tubes */
.btn .bl, .chip .gn, #prog .pc, #lvl, .reward, .am .n { text-shadow:0 0 6px rgba(255,255,255,.55); }
.btn.white .bl { text-shadow:none; }
#home .street { font-family:'Neonderthaw', 'Tilt Neon', cursive; font-size:34px; color:#fff; text-shadow:0 0 4px #fff, 0 0 12px #2EE6FF, 0 0 24px #2EE6FF; }

/* ---------- HUD v2: neon tube progress (Yash pick A) ---------- */
#hud { align-items:flex-start; }
#hud .btn.round { width:52px; height:52px; background:rgba(30,16,46,.75); border:1.5px solid rgba(46,230,255,.6); box-shadow:0 0 10px rgba(46,230,255,.35), 0 3px 0 rgba(0,0,0,.4); }
#hud .chip { border:1.5px solid rgba(184,107,255,.7); box-shadow:0 0 10px rgba(184,107,255,.35); min-height:46px; margin-top:3px; }
#prog { flex:1; min-width:0; display:flex; flex-direction:column; align-items:stretch; gap:3px; padding:0 4px; }
#prog .lv { margin-right:46px; text-align:center; font-family:'Neonderthaw', 'Tilt Neon', cursive; font-size:32px; line-height:1; color:#fff; white-space:nowrap;
  text-shadow:0 0 4px #fff, 0 0 10px #2EE6FF, 0 0 20px #2EE6FF; }
#prog .bar { position:relative; flex:none; margin-right:46px; height:14px; border-radius:7px; overflow:visible; background:rgba(255,255,255,.06); border:1.5px solid rgba(255,255,255,.2); }
#prog .bar i { position:absolute; left:2px; top:2px; bottom:2px; width:0; max-width:calc(100% - 4px); height:auto; border-radius:5px; background:#ffe6f4;
  box-shadow:0 0 6px #FF3FA4, 0 0 14px #FF3FA4, 0 0 24px #FF3FA4; transition:width .25s; }
#prog .pc { position:absolute; right:-46px; top:-5px; width:42px; text-align:right; width:auto; height:auto; border:none; background:none; display:block; font-size:15px; color:#ffd0ea; text-shadow:0 0 6px #FF3FA4; }
#prog .pc.full { background:none; color:#fff6c8; text-shadow:0 0 6px #FFD23F, 0 0 12px #FFD23F; }
#prog .street { text-align:center; margin-right:46px; font-size:12px; letter-spacing:1px; text-transform:uppercase; color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#prog .street .tag { margin-left:6px; padding:0 7px; border-radius:8px; font-size:11px; background:var(--pink); color:#fff; letter-spacing:.5px; }
#prog .street .tag.big { background:var(--gold); color:#2a1840; }
