@font-face { font-family: 'Baloo2'; src: url('../fonts/baloo2-latin.woff2') format('woff2'); font-weight: 400 800; font-display: block; }
@font-face { font-family: 'Baloo2'; src: url('../fonts/baloo2-deva.woff2') format('woff2'); font-weight: 400 800; unicode-range: U+0900-097F; font-display: block; }

:root {
  --ink: #1b1b2f;
  --orange: #ff9f1c;
  --yellow: #ffd23f;
  --red: #ef476f;
  --green: #06d6a0;
  --blue: #118ab2;
  --cream: #fff8e7;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #ff9f1c; font-family: 'Baloo2', 'Trebuchet MS', sans-serif; color: var(--ink); touch-action: none; overscroll-behavior: none; }
#app { position: fixed; inset: 0; }
canvas#game { position: absolute; inset: 0; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; border: 0; cursor: pointer; color: inherit; }

/* chunky button press */
.big-btn, .round-btn, .ad-btn, .gun-btn, .toggle, .lvl-node { transition: transform .08s; }
.big-btn:active, .round-btn:active, .ad-btn:active, .gun-btn:active, .toggle:active, .lvl-node:active { transform: translateY(4px) scale(.97); }

.round-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-size: 18px; font-weight: 800; display: grid; place-items: center; }
.pill { background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 16px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.coin-ico { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #ffc300 45%, #e09400); border: 2px solid #8a5a00; display: inline-block; flex: none; }
.coin-ico.big { width: 30px; height: 30px; }

/* HUD */
#hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-top)) 12px 0; pointer-events: none; z-index: 5; }
#hud button { pointer-events: auto; }
.hud-row { display: flex; align-items: center; gap: 8px; }
.progress { flex: 1; height: 26px; border-radius: 999px; background: rgba(255,255,255,.65); border: 3px solid var(--ink); position: relative; overflow: hidden; box-shadow: 0 3px 0 var(--ink); }
.progress-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: repeating-linear-gradient(-45deg, #f4f1ea 0 10px, #dcd6c8 10px 20px); transition: width .15s; border-right: 3px solid var(--ink); }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.uncle-box { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.patience { width: 130px; }
.patience-label { font-size: 12px; font-weight: 800; text-align: center; color: #fff; background: var(--ink); border-radius: 8px 8px 0 0; width: 90px; margin: 0 0 -2px auto; }
.patience-bar { height: 14px; border-radius: 999px; background: #fff; border: 3px solid var(--ink); overflow: hidden; }
.patience-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #06d6a0, #7ae582); transition: width .2s linear, background .3s; }
.patience-fill.mid { background: linear-gradient(90deg, #ffd23f, #ffb703); }
.patience-fill.low { background: linear-gradient(90deg, #ef476f, #ff7b95); animation: blink .5s infinite alternate; }
@keyframes blink { to { opacity: .55; } }
.uncle { width: 68px; height: 68px; border-radius: 50%; background: #fff3d6; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); overflow: hidden; flex: none; }
.uncle svg { width: 100%; height: 100%; overflow: visible; }
.uncle.big { width: 120px; height: 120px; margin: 6px auto; }
.uncle-bubble { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 10px; font-weight: 800; font-size: 14px; max-width: 150px; opacity: 0; transform: scale(.6); transition: .18s; transform-origin: right center; }
.uncle-bubble.show { opacity: 1; transform: scale(1); }

/* uncle moods */
.uncle .ub-angry, .uncle .ub-sad, .uncle .u-eyes-happy, .uncle .um-happy, .uncle .um-angry, .uncle .um-sad, .uncle .u-tears, .uncle .u-steam { display: none; }
.uncle.mood-happy .u-eyes-n, .uncle.mood-chai .u-eyes-n { display: none; }
.uncle.mood-happy .u-eyes-happy, .uncle.mood-chai .u-eyes-happy, .uncle.mood-happy .um-happy, .uncle.mood-chai .um-happy { display: inline; }
.uncle.mood-happy .um-n, .uncle.mood-chai .um-n { display: none; }
.uncle.mood-angry .ub-n, .uncle.mood-angry .um-n { display: none; }
.uncle.mood-angry .ub-angry, .uncle.mood-angry .um-angry, .uncle.mood-angry .u-steam { display: inline; }
.uncle.mood-angry .u-red { opacity: .35; }
.uncle.mood-angry { animation: shakeit .25s infinite; }
.uncle.mood-sad .ub-n, .uncle.mood-sad .um-n { display: none; }
.uncle.mood-sad .ub-sad, .uncle.mood-sad .um-sad, .uncle.mood-sad .u-tears { display: inline; }
@keyframes shakeit { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-2px) rotate(-2deg) } 75% { transform: translateX(2px) rotate(2deg) } }

/* bottom: mistri */
#bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; padding-bottom: var(--safe-bot); pointer-events: none; z-index: 5; }
#bottom button { pointer-events: auto; }
#mistri { position: absolute; left: 4px; bottom: calc(-6px + var(--safe-bot)); width: 124px; height: 155px; animation: bob 1.6s ease-in-out infinite; transform-origin: bottom center; }
.mistri svg { width: 100%; height: 100%; overflow: visible; }
@keyframes bob { 50% { transform: translateY(-4px) scaleY(1.02); } }
.mistri.jump { animation: jump .5s cubic-bezier(.3,1.6,.5,1) 2; }
@keyframes jump { 40% { transform: translateY(-34px) rotate(-4deg); } }
.mistri.zap { animation: zap .08s infinite; }
@keyframes zap { 50% { transform: translateX(3px) skewX(4deg); filter: brightness(1.6); } }
.bubble { position: absolute; left: 124px; bottom: 92px; max-width: calc(100% - 250px); min-width: 110px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 6px 12px; font-weight: 800; font-size: 15px; line-height: 1.15; box-shadow: 0 4px 0 var(--ink); opacity: 0; transform: scale(.5) translateY(10px); transform-origin: left bottom; transition: .18s cubic-bezier(.3,1.6,.5,1); }
.bubble::after { content: ''; position: absolute; left: -12px; bottom: 10px; border: 8px solid transparent; border-right: 10px solid var(--ink); }
.bubble.show { opacity: 1; transform: scale(1) translateY(0); }

/* mistri expressions */
.mistri .brow-up, .mistri .brow-sad, .mistri .eyes-happy, .mistri .eyes-shock, .mistri .mouth-happy, .mistri .mouth-shock, .mistri .mouth-sad, .mistri .zaps, .mistri .sweat { display: none; }
.mistri.expr-happy .eyes-n, .mistri.expr-happy .mouth-n { display: none; }
.mistri.expr-happy .eyes-happy, .mistri.expr-happy .mouth-happy, .mistri.expr-happy .brow-up { display: inline; }
.mistri.expr-happy .brow-n { display: none; }
.mistri.expr-shock .eyes-n, .mistri.expr-shock .mouth-n, .mistri.expr-shock .brow-n { display: none; }
.mistri.expr-shock .eyes-shock, .mistri.expr-shock .mouth-shock, .mistri.expr-shock .brow-up, .mistri.expr-shock .zaps, .mistri.expr-shock .sweat { display: inline; }
.mistri.expr-sad .mouth-n, .mistri.expr-sad .brow-n { display: none; }
.mistri.expr-sad .mouth-sad, .mistri.expr-sad .brow-sad, .mistri.expr-sad .sweat { display: inline; }
.mistri.expr-happy .m-arm { animation: wave .35s ease-in-out infinite alternate; transform-origin: 150px 200px; }
@keyframes wave { to { transform: rotate(-10deg); } }

.gun-btn { position: absolute; right: 12px; bottom: calc(18px + var(--safe-bot)); width: 84px; height: 84px; border-radius: 22px; background: linear-gradient(#ffd23f, #ff9f1c); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; }
.gun-ico { font-size: 32px; line-height: 1; }
.gun-lbl { font-size: 12px; }
.gun-badge { position: absolute; top: -10px; right: -10px; min-width: 28px; height: 28px; border-radius: 14px; background: var(--red); color: #fff; border: 3px solid var(--ink); display: grid; place-items: center; font-size: 14px; padding: 0 6px; }

/* screens */
.screen { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: calc(14px + var(--safe-top)) 16px calc(92px + var(--safe-bot)); overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #ffd23f, #ff9f1c 60%, #f3722c); }
.rays { position: absolute; left: 50%; top: 38%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax; background: repeating-conic-gradient(rgba(255,255,255,.18) 0 10deg, transparent 10deg 20deg); animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.title-top { width: 100%; display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { position: relative; margin: 2vh 0 0; text-align: center; line-height: .82; transform: rotate(-4deg); animation: logoIn .7s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes logoIn { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
.logo span { display: block; font-weight: 800; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink), 0 10px 18px rgba(0,0,0,.25); }
.logo .l1 { font-size: min(26vw, 120px); color: #f4f1ea; letter-spacing: 2px; }
.logo .l2 { font-size: min(12vw, 56px); color: var(--yellow); }
.tag { position: relative; margin-top: 10px; font-weight: 800; font-size: 18px; background: var(--ink); color: #fff; padding: 2px 14px; border-radius: 10px; transform: rotate(2deg); }
.title-mistri { position: relative; width: min(56vw, 250px); height: auto; aspect-ratio: 200/250; margin-top: auto; animation: bob 1.4s ease-in-out infinite; }
.big-btn { position: relative; margin-top: 10px; min-width: 230px; padding: 10px 26px; font-size: 32px; font-weight: 800; color: #fff; border-radius: 20px; background: linear-gradient(#3ee8b5, #06b68a); border: 4px solid var(--ink); box-shadow: 0 7px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; animation: pulse 1.2s ease-in-out infinite; }
.big-btn.small { min-width: 150px; font-size: 24px; padding: 6px 18px; animation: none; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.link-btn { position: relative; margin-top: 10px; background: none; font-weight: 800; font-size: 18px; color: #fff; text-decoration: underline; text-shadow: 0 2px 0 var(--ink); }
.link-btn.dark { color: var(--ink); text-shadow: none; }

/* map */
.map-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 2; }
.map-title { font-size: 26px; font-weight: 800; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.map-scroll { width: 100%; flex: 1; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; padding: 20px 0 60px; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.lvl-row { display: flex; justify-content: center; margin: 0 0 22px; }
.lvl-node { width: 84px; height: 84px; border-radius: 26px; background: #fff; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; position: relative; }
.lvl-node .ico { font-size: 30px; line-height: 1; }
.lvl-node .num { font-size: 15px; }
.lvl-node .st { position: absolute; bottom: -18px; font-size: 16px; letter-spacing: -2px; color: #ffd23f; -webkit-text-stroke: 1.5px var(--ink); }
.lvl-node.locked { background: #d4d0c8; filter: grayscale(1); opacity: .75; }
.lvl-node.current { background: var(--yellow); animation: pulse 1s ease-in-out infinite; }
.lvl-node.boss { width: 100px; height: 100px; background: linear-gradient(#b388ff, #7b2cbf); color: #fff; }
.lvl-node.boss .num { -webkit-text-stroke: 1px var(--ink); }

/* overlays */
.overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(27,27,47,.55); padding: 16px; backdrop-filter: blur(2px); }
.meme-card { width: min(92vw, 420px); background: #111; border: 4px solid #fff; border-radius: 18px; padding: 22px 16px 16px; text-align: center; color: #fff; box-shadow: 0 10px 0 rgba(0,0,0,.4); animation: pop .35s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.meme-lvl { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 800; padding: 0 12px; border-radius: 8px; font-size: 15px; }
.meme-q { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 12px; }
.meme-a { font-size: 22px; font-weight: 800; margin-top: 10px; opacity: 0; transition: .25s; }
.meme-a.show { opacity: 1; }
.stamp { display: inline-block; white-space: nowrap; margin-top: 10px; font-size: min(8.5vw, 34px); font-weight: 800; color: var(--yellow); border: 4px solid var(--yellow); border-radius: 10px; padding: 0 12px; transform: rotate(-6deg) scale(3); opacity: 0; }
.stamp.show { animation: stampIn .35s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stampIn { to { transform: rotate(-6deg) scale(1); opacity: 1; } }
.tap-hint { margin-top: 16px; font-size: 14px; opacity: .7; animation: blink .8s infinite alternate; }

.panel { width: min(90vw, 380px); background: var(--cream); border: 4px solid var(--ink); border-radius: 26px; padding: 40px 18px 20px; text-align: center; position: relative; box-shadow: 0 10px 0 var(--ink); animation: pop .4s cubic-bezier(.3,1.7,.5,1) both; display: flex; flex-direction: column; align-items: center; }
.panel-ribbon { position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; background: var(--green); color: #fff; font-size: 26px; font-weight: 800; padding: 4px 18px; border: 4px solid var(--ink); border-radius: 14px; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; box-shadow: 0 5px 0 var(--ink); }
.panel-ribbon.red { background: var(--red); }
.stars { display: flex; gap: 6px; justify-content: center; margin: 4px 0; }
.star { font-size: 64px; line-height: 1; color: #d9d4c7; -webkit-text-stroke: 3px var(--ink); transform: scale(0); }
.star:nth-child(2) { font-size: 80px; margin-top: -14px; }
.star.on { color: var(--yellow); animation: starIn .45s cubic-bezier(.2,1.8,.4,1) forwards; }
.star.off { animation: starIn .3s forwards; }
@keyframes starIn { from { transform: scale(2.5) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
.win-line { font-size: 20px; font-weight: 800; margin: 6px 0; }
.reward { font-size: 34px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.panel-btns { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ad-btn { padding: 10px 14px; border-radius: 16px; background: linear-gradient(#b388ff, #7b2cbf); color: #fff; font-weight: 800; font-size: 17px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.ad-btn:disabled { opacity: .4; }
.toggles { display: flex; gap: 10px; margin: 16px 0 6px; }
.toggle { padding: 8px 14px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 800; font-size: 16px; }
.toggle.off { opacity: .45; text-decoration: line-through; }

.stamp-big { position: absolute; z-index: 15; left: 50%; top: 42%; font-size: min(13vw, 64px); font-weight: 800; color: #fff; white-space: nowrap; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); transform: translate(-50%, -50%) rotate(-6deg) scale(3); opacity: 0; pointer-events: none; }
.stamp-big.show { animation: bigStamp 1.6s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes bigStamp { 0% { transform: translate(-50%,-50%) rotate(-6deg) scale(3); opacity: 0; } 18% { transform: translate(-50%,-50%) rotate(-6deg) scale(1); opacity: 1; } 80% { transform: translate(-50%,-50%) rotate(-6deg) scale(1.05); opacity: 1; } 100% { transform: translate(-50%,-50%) rotate(-6deg) scale(1.1); opacity: 0; } }

#coin-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fly-coin { position: absolute; width: 22px; height: 22px; transition: transform .65s cubic-bezier(.5,-0.4,.7,1), opacity .65s; }

#ad-fake { position: absolute; inset: 0; z-index: 50; background: #000c; display: grid; place-items: center; color: #fff; }
.ad-box { width: 80vw; max-width: 340px; aspect-ratio: 9/14; background: linear-gradient(135deg, #222, #444); border: 2px dashed #888; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 800; }
.ad-tag { font-size: 12px; opacity: .7; }
.ad-count { font-size: 64px; }

/* ---------- ranks, leaderboard, share ---------- */
.rank-chip { position: relative; margin-top: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px; font-weight: 800; font-size: 16px; box-shadow: 0 3px 0 var(--ink); }
.title-row { position: relative; display: flex; gap: 10px; margin-top: 12px; }
.pill-btn { padding: 8px 16px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 800; font-size: 17px; transition: transform .08s; }
.pill-btn.gold { background: linear-gradient(#ffe066, #ffc300); }
.pill-btn:active { transform: translateY(3px); }
.gp-line { margin-top: 2px; font-weight: 800; font-size: 17px; color: var(--blue); }
.share-btn { margin-top: 12px; width: 100%; padding: 10px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 800; font-size: 17px; }
.share-btn:active { transform: translateY(3px); }

.lb-screen { z-index: 25; padding-bottom: calc(14px + var(--safe-bot)); background: radial-gradient(circle at 50% 0%, #ffe066, #ff9f1c 55%, #f3722c); }
.lb-tabs { position: relative; display: flex; gap: 6px; width: 100%; margin-top: 12px; background: rgba(27,27,47,.15); padding: 5px; border-radius: 16px; }
.lb-tab { flex: 1; padding: 8px 4px; border-radius: 12px; background: transparent; font-weight: 800; font-size: 15px; color: var(--ink); }
.lb-tab.on { background: #fff; box-shadow: 0 3px 0 var(--ink); border: 2px solid var(--ink); }
.lb-list { position: relative; width: 100%; flex: 1; overflow-y: auto; touch-action: pan-y; margin: 10px 0; padding: 2px 2px 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; background: #fff8e7; border: 3px solid var(--ink); border-radius: 16px; padding: 7px 12px; margin-bottom: 8px; box-shadow: 0 3px 0 var(--ink); animation: rowIn .35s cubic-bezier(.2,1.4,.4,1) both; }
.lb-row:nth-child(n) { animation-delay: calc(var(--d, 0) * 1s); }
@keyframes rowIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.lb-row .pos { width: 36px; text-align: center; font-weight: 800; font-size: 20px; }
.lb-row .nm { flex: 1; min-width: 0; }
.lb-row .nm b { display: block; font-size: 17px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .nm small { font-size: 13px; opacity: .7; }
.lb-row .sc { font-weight: 800; font-size: 18px; color: var(--blue); }
.lb-row.top1 { background: linear-gradient(90deg, #fff3b0, #ffd23f); }
.lb-row.top2 { background: linear-gradient(90deg, #f4f4f4, #d9d9d9); }
.lb-row.top3 { background: linear-gradient(90deg, #ffe0c7, #f4a261); }
.lb-row.me { outline: 4px solid var(--green); }
.lb-row .bar { display: block; height: 8px; background: rgba(27,27,47,.12); border-radius: 6px; margin-top: 3px; overflow: hidden; }
.lb-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #06d6a0, #118ab2); border-radius: 6px; }
.lb-empty { text-align: center; background: #fff8e7; border: 3px solid var(--ink); border-radius: 20px; padding: 24px 16px; box-shadow: 0 4px 0 var(--ink); }
.lb-empty .big { font-size: 54px; }
.lb-empty b { font-size: 20px; }
.lb-empty p { margin: 6px 0 0; font-weight: 600; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 5px solid #ffd23f; border-top-color: var(--ink); margin: 0 auto; animation: spin .8s linear infinite; }
.lb-me { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.me-rank { font-size: 32px; }
.me-txt { flex: 1; min-width: 0; }
.me-txt b { display: block; font-size: 16px; }
.me-txt small { font-size: 12.5px; opacity: .8; }
.me-pos { font-size: 26px; font-weight: 800; color: var(--yellow); }

.pf-input { width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--ink); font: inherit; font-size: 18px; font-weight: 700; background: #fff; color: var(--ink); user-select: text; -webkit-user-select: text; }
.pf-note { margin-top: 10px; font-size: 14px; font-weight: 700; opacity: .75; }
.pf-err { min-height: 22px; color: var(--red); font-weight: 800; margin: 4px 0; }

.rankup { position: absolute; z-index: 40; left: 50%; top: 30%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: ruIn 2.6s cubic-bezier(.2,1.6,.4,1) forwards; }
.ru-ico { font-size: 110px; filter: drop-shadow(0 8px 0 rgba(0,0,0,.25)); }
.ru-k { font-weight: 800; font-size: 26px; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.ru-name { font-weight: 800; font-size: 52px; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); white-space: nowrap; }
@keyframes ruIn { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25%, 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(.9); opacity: 0; } }

/* ---------- "Raju ki Duniya" play button (title screen) ---------- */
.raju-btn { position: relative; margin-top: 22px; width: min(320px, 84vw); height: 92px; border-radius: 22px; border: 4px solid var(--ink); box-shadow: 0 7px 0 var(--ink);
  overflow: visible; padding: 0; color: #fff; text-align: left; transition: transform .08s; animation: rbBob 2.4s ease-in-out infinite; }
.raju-btn:active { transform: translateY(5px) scale(.98); box-shadow: 0 2px 0 var(--ink); }
.rb-bg { position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
  background: linear-gradient(90deg, rgba(20,8,40,.15) 0%, rgba(20,8,40,.55) 42%, rgba(20,8,40,.85) 100%), url(../img/raju-bg.jpg) center 40% / cover; }
.rb-shine { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; pointer-events: none; }
.rb-shine::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 28%; left: -40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: rbShine 2.8s ease-in-out infinite; }
.rb-hero { position: absolute; left: 4px; bottom: 0; height: 128px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); pointer-events: none; }
.rb-txt { position: absolute; left: 96px; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1px; }
.rb-txt small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #ffd23f; }
.rb-txt b { font-size: 23px; font-weight: 900; line-height: 1; letter-spacing: .01em; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.rb-txt em { align-self: flex-start; margin-top: 5px; font-style: normal; font-weight: 900; font-size: 14px; padding: 3px 12px; border-radius: 999px;
  background: linear-gradient(#ff7a2e, #ff3d00); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.rb-txt em i { font-style: normal; }
.rb-new { position: absolute; top: -12px; right: -10px; transform: rotate(10deg); padding: 3px 9px; border-radius: 10px; background: #ff2e4d; color: #fff;
  font-weight: 900; font-size: 13px; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: rbNew 1s ease-in-out infinite; }
@keyframes rbBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes rbShine { 0% { left: -40%; } 60%, 100% { left: 130%; } }
@keyframes rbNew { 0%, 100% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(4deg) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .raju-btn, .rb-shine::after, .rb-new { animation: none; } }
/* make room for the Raju button: mistri art scales with screen height, button never squashes */
#scr-title .title-mistri { width: min(46vw, 220px, 17.5vh); }
.raju-btn { flex-shrink: 0; margin-top: 20px; }
.raju-btn .rb-txt, .raju-btn .rb-new { z-index: 1; }
@media (max-height: 640px) { #scr-title .title-mistri { width: min(40vw, 13vh); } .raju-btn { height: 80px; margin-top: 16px; } .rb-hero { height: 108px; } }

/* ---- 2D mistri art ---- */
.mistri .m-img { display: block; height: 100%; width: auto; margin: 0 auto; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); transition: filter .2s, transform .2s; transform-origin: bottom center; }
#mistri { width: 96px; height: 172px; left: 6px; bottom: calc(-4px + var(--safe-bot)); }
.bubble { left: 104px; }
.mistri.expr-shock .m-img { filter: drop-shadow(0 0 10px #ffe14d) brightness(1.35) saturate(1.3); }
.mistri.expr-sad .m-img { filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)) saturate(.55) brightness(.85); transform: rotate(-5deg) translateY(6px) scaleY(.96); }
.mistri.expr-happy .m-img { transform: rotate(3deg); }

/* ---- title screen: always fits above the bottom banner ----
   --ban-h is set from JS to the live banner height, so nothing hides behind the ad */
#scr-title { padding-bottom: calc(var(--ban-h, 84px) + 14px + var(--safe-bot)); justify-content: flex-start; }
#scr-title > * { flex-shrink: 0; }
#scr-title .title-mistri { flex: 1 1 auto; min-height: 70px; max-height: 300px; width: 100%; aspect-ratio: auto; margin-top: 6px; display: flex; justify-content: center; }
#scr-title .title-mistri .m-img { height: 100%; max-height: 100%; }
#scr-title .logo .l1 { font-size: min(26vw, 120px, 11.5vh); }
#scr-title .logo .l2 { font-size: min(12vw, 56px, 5.6vh); }
#scr-title .raju-btn { margin-top: 14px; }
.screen { padding-bottom: calc(var(--ban-h, 84px) + 14px + var(--safe-bot)); }
@media (max-height: 700px) {
  #scr-title .tag { font-size: 15px; margin-top: 6px; }
  #scr-title .rank-chip { margin-top: 6px; transform: scale(.9); }
  #scr-title .big-btn { font-size: 26px; padding: 6px 22px; }
  #scr-title .title-row { margin-top: 8px; }
  #scr-title .raju-btn { height: 76px; margin-top: 10px; }
}
@media (max-height: 580px) { #scr-title .rank-chip, #scr-title .tag { display: none; } }

/* ---- notification ask ---- */
.push-ask { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(27,27,47,.55); }
.push-card { position: relative; width: min(340px, 100%); background: var(--cream); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); padding: 22px 20px 14px; text-align: center; animation: pushIn .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes pushIn { from { transform: scale(.6) translateY(40px); opacity: 0; } }
.push-bell { font-size: 46px; line-height: 1; animation: ring 1.2s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ring { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(-16deg); } 20%,40% { transform: rotate(16deg); } }
.push-card h3 { margin: 8px 0 6px; font-size: 24px; line-height: 1.05; }
.push-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.3; color: #4a4a5e; }
.push-card .big-btn { width: 100%; }
.push-card .link-btn { margin-top: 8px; font-size: 16px; }

/* ---- leaderboard: everyone ---- */
.rank-chip { cursor: pointer; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.lb-row .pos { width: auto; min-width: 36px; }
.lb-row .pos.long { font-size: 15px; }
.lb-count { text-align: center; font-weight: 800; font-size: 13px; color: var(--ink); opacity: .7; margin: 0 0 8px; }
.lb-more { display: block; width: 100%; margin: 4px 0 10px; padding: 10px; border-radius: 14px; border: 3px dashed var(--ink); background: rgba(255,255,255,.55); font-weight: 800; font-size: 15px; color: var(--ink); }
.lb-me .me-pos { cursor: pointer; text-align: center; line-height: 1.05; }
.lb-me .me-pos small { display: block; font-size: 10.5px; font-weight: 800; opacity: .8; white-space: nowrap; }
