/* Existing layout rules, isolated below the Midnight Arena component layer. */
@layer legacy {
.training-screen{padding:18px 14px}.training-screen h2{margin:0 0 4px;font-size:26px}.training-kicker{margin:8px 0 8px;color:#b98aff;font-size:11px;font-weight:700;letter-spacing:.16em}.training-subtitle{margin:0 0 20px;color:var(--muted);font-size:14px}.training-levels{display:grid;gap:10px}.training-level{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;text-align:left;background:#202531;border:1px solid #303746;border-radius:16px;color:#fff}.level-icon{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:50%;font-size:24px}.level-icon.green{background:#257b3d}.level-icon.mint{background:#2f9960}.level-icon.blue{background:#4a6fd6}.level-icon.orange{background:#c25a20}.level-icon.gold{background:#c49220}.level-copy{min-width:0;flex:1}.level-copy strong{display:block;font-size:16px}.level-copy small{display:block;margin-top:3px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.level-bars{font-size:16px;letter-spacing:2px;white-space:nowrap}.level-bars.green{color:#3fb950}.level-bars.mint{color:#5dc88a}.level-bars.blue{color:#6b93ff}.level-bars.orange{color:#f0874a}.level-bars.gold{color:#f5c84b}
    :root { color-scheme: dark; --bg:#0d0e14; --panel:#171b23; --muted:#8f96a8; --accent:#9867ff; --light:#e7c792; --dark:#9c693e; --fullscreen-top:0px; }
    * { box-sizing:border-box } body { margin:0; background:radial-gradient(circle at 50% 18%,#251b43 0,#0d0e14 38%); color:#f6f7fb; font-family:Inter,system-ui,-apple-system,sans-serif; min-height:100vh; }
    main { max-width:540px; margin:auto; padding:calc(14px + var(--fullscreen-top)) 10px 28px; transition:padding-top .2s ease-out; } header { display:flex; justify-content:flex-end; align-items:center; min-height:40px; margin-bottom:12px; } h1 { display:none; font-size:26px; margin:0; } .pill { color:#67e0b2; background:#172a2a; border-radius:20px; padding:8px 12px; font-size:13px; } .top-exit { width:auto; padding:6px 2px; background:transparent; font-size:18px; text-align:left; }
    .panel { background:rgba(23,27,35,.9); border:1px solid #29303d; border-radius:24px; padding:14px; box-shadow:0 14px 50px #0004; } #gameScreen { padding:10px; } .player-strip { display:flex; align-items:center; gap:10px; padding:9px 11px; margin-bottom:8px; border-radius:15px; background:#202531; border:1px solid transparent; } .player-strip.bottom { margin:8px 0 0; } .player-strip.active { border-color:var(--accent); box-shadow:0 0 15px #9867ff2b; } .avatar { width:38px; height:38px; flex:none; border-radius:50%; display:grid; place-items:center; overflow:hidden; background:#343b4a; color:#fff; font-weight:800; } .avatar img { width:100%; height:100%; object-fit:cover; } .bot-avatar-icon{display:grid;place-items:center;width:100%;height:100%;color:#fff}.bot-avatar-icon svg{width:24px;height:24px} .strip-main { min-width:0; flex:1; } .name { font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .sub { color:#c8a952; font-size:12px; margin-top:3px; } .strip-side { text-align:right; min-width:72px; } .timer { font-size:17px; font-weight:800; color:#e9edf7; } .timer.urgent { color:#ff5757; animation:timerPulse 1s ease-in-out infinite; } .captures { display:flex; justify-content:flex-end; gap:2px; margin-top:4px; min-height:14px; } .capture-piece { width:14px; height:14px; flex:none; border-radius:50%; border:1px solid #2227; box-shadow:inset 0 1px 2px #fff6,0 1px 2px #0007; } .capture-piece.white { background:linear-gradient(145deg,#fff,#bac5d3); } .capture-piece.black { background:linear-gradient(145deg,#343943,#07080b); }
    #board { width:100%; height:auto; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); grid-template-rows:repeat(8,minmax(0,1fr)); aspect-ratio:1 / 1; overflow:hidden; border-radius:18px; border:3px solid #b47c49; contain:layout paint; } .cell { position:relative; min-width:0; min-height:0; display:grid; place-items:center; cursor:pointer; touch-action:manipulation; } .cell.light { background:var(--light) } .cell.dark { background:var(--dark) } .cell.last-move-from,.cell.last-move-to{background:#9b9b45;box-shadow:inset 0 0 0 999px #9b9b4538} .cell.target::after { content:""; width:26%; aspect-ratio:1; border-radius:50%; background:#e8d24b; opacity:.9; } .cell.target.capture-target::after { background:#e58b00; opacity:1; box-shadow:0 0 0 2px #f6b73c66; } .piece { position:relative; z-index:1; width:84%; aspect-ratio:1 / 1; border-radius:50%; border:3px solid #2227; box-shadow:inset 0 3px 7px #fff7,0 3px 6px #0008; } .cell.selected .piece { box-shadow:0 0 0 3px #fde047d9,inset 0 3px 7px #fff7,0 3px 6px #0008; } .piece.white { background:linear-gradient(145deg,#fff,#bac5d3) } .piece.black { background:linear-gradient(145deg,#343943,#07080b) } .piece.king::after { content:"♛"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#ffd63e; font-size:clamp(14px,4.2vw,22px); line-height:1; transform:translateY(-1px); text-shadow:0 1px 2px #000; } .board-coordinate { position:absolute; z-index:2; font-size:clamp(7px,1.8vw,11px); font-weight:600; line-height:1; pointer-events:none; } .cell.light .board-coordinate { color:#00000061; } .cell.dark .board-coordinate { color:#ffffff80; } .board-coordinate.row { top:2px; left:4px; } .board-coordinate.column { right:4px; bottom:2px; }
    .status { text-align:center; color:#d7dbea; padding:12px 0 4px; } .actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; } .actions button { background:#252b37; } .actions button.draw { background:#312650; border:1px solid #7950d2; } button { width:100%; border:0; border-radius:16px; padding:15px; color:white; background:var(--accent); font-size:17px; font-weight:700; cursor:pointer; } button.secondary { background:#252b37; margin-top:10px; } button:disabled { opacity:.55; cursor:default; } .error { color:#ff9caa; min-height:20px; text-align:center; margin-top:10px; }
    .screen[hidden] { display:none; } .hero { text-align:center; padding:20px 10px 24px; } .hero-icon { width:92px; height:92px; display:grid; place-items:center; margin:0 auto 18px; border-radius:28px; background:linear-gradient(145deg,#ad7aff,#6640d9); font-size:48px; box-shadow:0 18px 50px #8f5fff55; } .hero h2 { margin:0 0 8px; font-size:28px; } .hero p,.lobby p { margin:0; color:var(--muted); line-height:1.5; } .modes { display:grid; gap:12px; } .mode { display:flex; align-items:center; gap:14px; text-align:left; padding:17px; background:#222733; border:1px solid #303746; } .mode-icon { width:46px; height:46px; flex:none; display:grid; place-items:center; border-radius:14px; background:#312650; font-size:24px; } .mode strong { display:block; font-size:17px; } .mode small { display:block; margin-top:4px; color:var(--muted); font-weight:400; } .invite-code { margin:18px 0 4px; padding:14px; border-radius:14px; background:#202531; color:#c8bedf; overflow-wrap:anywhere; font-size:13px; } .back { margin-bottom:12px; background:transparent; color:#b8bed0; text-align:left; padding:5px 0; } .modal[hidden] { display:none; } .modal { position:fixed; inset:0; z-index:5; display:grid; place-items:center; padding:20px; background:#0009; } .modal-card { width:min(430px,100%); padding:24px; text-align:center; border:1px solid #353c4c; border-radius:24px; background:#171b23; box-shadow:0 20px 80px #000b; } .modal-card h2 { margin:0 0 10px; } .modal-card p { color:var(--muted); line-height:1.45; } .modal-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:20px; } .modal-actions .danger { background:#ff5757; } @keyframes spin { to { transform:rotate(360deg); } } @keyframes timerPulse { 50% { opacity:.45; } }
    .search-screen { min-height:calc(100vh - 28px); display:flex; align-items:center; justify-content:center; text-align:center; } .search-stage { width:100%; padding:20px 10px 52px; } .search-orbit { position:relative; width:244px; height:244px; margin:0 auto 28px; display:grid; place-items:center; filter:drop-shadow(0 0 26px #8f62ff2e); } .search-wave { position:absolute; inset:16px; border:3px solid #7652d7; border-radius:50%; opacity:.45; animation:searchWave 2.4s ease-out infinite; } .search-wave.w2 { animation-delay:.8s; } .search-wave.w3 { animation-delay:1.6s; } .search-avatar { position:relative; z-index:2; width:116px; height:116px; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:linear-gradient(145deg,#8e64ff,#4ed18a); border:5px solid #171b23; font-size:48px; font-weight:800; box-shadow:0 0 34px #8d5fff55; } .search-avatar img { width:100%; height:100%; object-fit:cover; } .lens-orbit { position:absolute; z-index:3; inset:42px; animation:spin 3.2s linear infinite; } .search-lens { position:absolute; right:-3px; bottom:10px; width:50px; height:50px; display:grid; place-items:center; border:4px solid var(--accent); border-radius:50%; background:#171329; color:#a77cff; font-size:27px; box-shadow:0 0 18px #9867ff66; } .search-lens::after { display:none; } .search-stage h2 { margin:0 0 10px; font-size:28px; } .search-stage p { color:var(--muted); font-size:16px; } .search-dots { display:flex; justify-content:center; gap:8px; margin:24px 0 34px; } .search-dots i { width:8px; height:8px; border-radius:50%; background:#563b8c; animation:dotPulse 1.2s ease-in-out infinite; } .search-dots i:nth-child(2) { animation-delay:.2s; } .search-dots i:nth-child(3) { animation-delay:.4s; } .cancel-search { width:auto; min-width:172px; padding:14px 28px; background:#1c222b; border:1px solid #2d3440; } .search-invite-actions { max-width:360px; margin:18px auto 0; } @keyframes searchWave { 0% { transform:scale(.55); opacity:.7; } 75%,100% { transform:scale(1.13); opacity:0; } } @keyframes dotPulse { 0%,100% { opacity:.28; transform:scale(.8); } 50% { opacity:1; transform:scale(1.2); } }
    .search-screen.friend-mode { align-items:flex-start; } .friend-stage { width:100%; padding:8px 4px 42px; text-align:left; } .friend-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; } .friend-cancel { width:auto; padding:8px 2px; background:transparent; color:#d9dce5; font-size:18px; font-weight:500; } .friend-tag { padding:9px 14px; border:1px solid #323844; border-radius:20px; color:#9ba1b0; font-size:13px; letter-spacing:.08em; } .friend-hero { position:relative; min-height:226px; padding:30px; overflow:hidden; border-radius:28px; background:linear-gradient(135deg,#9b65ff,#7187ff); box-shadow:0 20px 45px #7555ed38; } .friend-hero::after { content:""; position:absolute; right:-12px; bottom:-30px; width:150px; height:150px; border:22px solid #ffffff20; border-radius:50%; box-shadow:inset 0 0 0 28px #ffffff12; } .friend-link-icon { width:62px; height:62px; display:grid; place-items:center; border-radius:20px; background:#ffffff18; font-size:31px; } .friend-hero h2 { position:relative; z-index:1; margin:42px 0 8px; font-size:31px; } .friend-hero p { position:relative; z-index:1; max-width:330px; color:#f1edff; font-size:17px; line-height:1.45; } .friend-card { margin-top:16px; padding:20px; border:1px solid #2c3340; border-radius:22px; background:#171c24; } .friend-card-label { color:#737a89; font-size:13px; letter-spacing:.05em; } .friend-time { display:flex; align-items:center; gap:16px; } .friend-time-icon { color:#aeb4c2; font-size:30px; } .friend-time strong { display:block; margin-top:5px; font-size:20px; } .friend-link-box { color:#b6bbc7; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:15px; line-height:1.5; overflow-wrap:anywhere; } .friend-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; } .friend-actions button { min-width:0; } .friend-actions .secondary { margin-top:0; } .friend-wait { display:flex; align-items:center; gap:16px; } .friend-hourglass { width:54px; height:54px; flex:none; display:grid; place-items:center; border-radius:50%; background:#3a2b61; color:#bc91ff; font-size:27px; animation:hourglassPulse 1.8s ease-in-out infinite; } .friend-wait strong { font-size:18px; } .friend-wait p { margin:5px 0 0; color:var(--muted); line-height:1.4; } .friend-note { padding:28px 20px 0; color:#666d7b; text-align:center; line-height:1.5; } @keyframes hourglassPulse { 50% { transform:scale(1.08); box-shadow:0 0 22px #9867ff44; } }
    .friend-stage { padding:var(--fullscreen-top) 4px 14px; transition:padding-top .2s ease-out; } .friend-top { margin-bottom:12px; } .friend-cancel { padding:4px 2px; font-size:16px; } .friend-tag { padding:7px 11px; font-size:11px; } .friend-hero { min-height:174px; padding:20px 22px; border-radius:22px; } .friend-hero::after { width:112px; height:112px; border-width:17px; box-shadow:inset 0 0 0 20px #ffffff12; } .friend-link-icon { width:48px; height:48px; border-radius:15px; font-size:24px; } .friend-hero h2 { margin:24px 0 6px; font-size:clamp(22px,6.3vw,27px); white-space:nowrap; } .friend-hero p { max-width:290px; font-size:14px; line-height:1.35; } .friend-card { margin-top:10px; padding:13px 15px; border-radius:17px; } .friend-card-label { font-size:11px; } .friend-time { gap:12px; min-height:62px; } .friend-time-icon { font-size:23px; } .friend-time strong { margin-top:3px; font-size:17px; } .friend-link-box { max-height:48px; overflow:hidden; font-size:12px; line-height:1.4; } .friend-actions { gap:8px; margin-top:9px; } .friend-actions button { padding:12px 8px; border-radius:14px; font-size:14px; } .friend-wait { min-height:76px; gap:12px; } .friend-hourglass { width:43px; height:43px; font-size:21px; } .friend-wait strong { font-size:16px; } .friend-wait p { margin-top:3px; font-size:13px; } .friend-note { padding:14px 12px 0; font-size:12px; line-height:1.4; }
    .draw-icon { --progress:100%; width:74px; height:74px; position:relative; margin:0 auto 20px; display:grid; place-items:center; border-radius:50%; background:conic-gradient(var(--accent) var(--progress),#392d55 0); color:#b68cff; font-size:30px; } .draw-icon::before { content:""; position:absolute; inset:6px; border-radius:50%; background:#171b23; } .draw-icon span { position:relative; z-index:1; } #drawModal .modal-card { padding:30px 22px 22px; } #drawModal .modal-card h2 { font-size:22px; } #drawModal .modal-card p { margin:8px 0 0; } .modal-countdown { color:var(--muted); } .modal-actions .secondary { margin-top:0; } #resultModal .modal-card { max-height:calc(100vh - 30px); overflow:auto; } .result-icon { width:104px; height:104px; margin:0 auto 12px; display:grid; place-items:center; border-radius:28px; background:#222834; font-size:58px; } #resultTitle { font-size:34px; margin-bottom:4px; } #resultReason { margin:0 0 20px; font-size:17px; } .result-buttons { display:grid; gap:10px; } .result-buttons .secondary { margin:0; } .result-bottom { display:grid; grid-template-columns:1fr 1fr; gap:10px; } #invitationModal .modal-card { width:min(384px,100%); padding:20px; } .invite-avatar { width:84px; height:84px; margin:18px auto 12px; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:linear-gradient(145deg,#8d63ff,#4fd48a); font-size:42px; font-weight:800; box-shadow:0 0 28px #9165ff42; } .invite-avatar img { width:100%; height:100%; object-fit:cover; } .invite-label { color:var(--muted); font-size:12.5px; font-weight:600; letter-spacing:.06em; } .invite-name { font-size:17px; font-weight:800; } .invite-rating { margin:6px 0; color:#c1a761; font-size:12.5px; } .invite-text { color:var(--muted); font-size:13px; } .invite-mode-badge { width:max-content; margin:10px auto 0; padding:5px 12px; border-radius:999px; color:#4fd47b; background:#1c452d; font-size:12px; font-weight:800; } .invite-progress { height:6px; margin:22px 0 8px; overflow:hidden; border-radius:9px; background:#252b37; } .invite-progress > i { display:block; width:100%; height:100%; border-radius:inherit; background:var(--accent); transition:width .1s linear; }
    .result-rewards{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 18px}.result-reward{display:inline-flex;align-items:center;gap:5px;padding:8px 12px;border:1px solid #4a3c75;border-radius:999px;background:#302650;color:#c9a8ff;font-size:14px}.result-reward svg{width:15px;height:15px}.result-reward.rating{color:#d8b64d;background:#28251d;border-color:#5a4c28}.result-reward.rating.positive{color:#5ee28c;background:#173625;border-color:#245d38}.result-reward.rating.negative{color:#ff6f78;background:#3a1d24;border-color:#6a2934}.result-level-up{color:#f3c75d;font-weight:800;white-space:nowrap}
    .friend-stage { padding-top:0; } body.telegram-shell.menu-mode > main { padding-top:calc(48px + var(--fullscreen-top)); } body.telegram-shell > main > header { transform:translateY(10px); transition:transform .2s ease-out; } body.telegram-fullscreen.game-mode > main { padding-top:calc(56px + var(--fullscreen-top)); } body.game-mode > main > header { justify-content:space-between; transform:none; } #onlinePill[hidden] { display:none; } .connection-pill { display:inline-flex; align-items:center; gap:6px; height:28px; box-sizing:border-box; color:#55dfb0; background:#202531; border:1px solid #353e50; border-radius:999px; padding:0 10px 0 8px; font-size:11.5px; font-weight:600; line-height:1; font-variant-numeric:tabular-nums; } .connection-pill.offline { color:#ff5b68; background:#2d202a; } .wifi-icon { width:14px; height:14px; flex:none; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; } .wifi-slash { display:none; } .connection-pill.offline .wifi-slash { display:block; } .button-icon { width:21px; height:21px; flex:none; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; } .friend-actions button { display:flex; align-items:center; justify-content:center; gap:8px; }
.rematch-invite{margin:20px 0 12px;padding:12px;border:1px solid var(--accent);border-radius:18px;background:#202633;text-align:left}.rematch-player{display:flex;align-items:center;gap:12px}.rematch-player .invite-avatar{width:58px;height:58px;margin:0;font-size:25px}.rematch-player strong,.rematch-player span{display:block}.rematch-player strong{font-size:18px}.rematch-player span{margin-top:3px;color:var(--muted)}.rematch-invite .modal-actions{margin-top:12px}.rematch-invite .modal-actions button{padding:12px 8px;font-size:15px}
.game-actions{position:relative;display:flex;align-items:center;gap:10px;margin:16px 4px 0}.game-actions .actions{flex:1;margin:0}.reaction-buttons{display:flex;gap:8px}.icon-action{width:52px;height:52px;flex:none;padding:0;border-radius:50%;background:#171c24;border:1px solid #303846;font-size:25px}.icon-action:disabled{opacity:.45}.emoji-picker{position:absolute;z-index:4;left:-2px;bottom:62px;width:300px;padding:12px;border:1px solid #303846;border-radius:20px;background:#202633ee;box-shadow:0 18px 45px #000b}.emoji-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.emoji-grid button{padding:8px;font-size:25px;line-height:1;background:#252d3b;border-radius:13px}.emoji-grid button:disabled{opacity:.35}.emoji-cooldown{min-height:18px;margin:7px 0 0;color:#aeb4c2;text-align:center;font-size:12px}.emoji-toggle{margin-top:8px;padding:10px;font-size:15px;background:#252d3b}.emoji-picker.is-disabled .emoji-grid{display:none}.emoji-picker.is-disabled .emoji-cooldown{display:none}.reaction-bubble{position:absolute;z-index:3;left:14px;top:-30px;width:58px;height:58px;display:grid;place-items:center;border:1px solid #3c4658;border-radius:50%;background:#202633f2;font-size:34px;box-shadow:0 8px 20px #0008;animation:reactionPop .22s ease-out}.player-strip{position:relative}@keyframes reactionPop{from{transform:scale(.55);opacity:0}to{transform:scale(1);opacity:1}}
.icon-action{position:relative;width:38px;height:38px;font-size:18px}.game-chat-unread[hidden]{display:none}.game-chat-unread{position:absolute;right:-6px;top:-6px;min-width:16px;height:16px;display:grid;place-items:center;padding:0 4px;border:2px solid #1d2330;border-radius:999px;background:#b994ff;color:#fff;font-size:10px;font-weight:800;line-height:12px;font-variant-numeric:tabular-nums}
.emoji-picker{bottom:46px;width:154px;padding:6px;border-radius:16px}
.emoji-grid{gap:4px}
.emoji-grid button{width:44px;height:44px;padding:0;border-radius:12px;font-size:24px}
.emoji-cooldown{min-height:15px;margin-top:4px;font-size:10.5px;line-height:1.2}
.emoji-toggle{margin-top:4px;padding:8px 5px;border-radius:12px;font-size:12.5px}
.reaction-bubble{left:12px;top:-21px;width:46px;height:46px;font-size:27px}
.game-actions{margin:16px 16px 0;align-items:center}
.game-actions .actions{gap:10px}
.game-actions .actions button{display:flex;min-width:0;align-items:center;justify-content:center;gap:8px;padding:14px 8px;border-radius:16px;font-size:14px;font-weight:500;line-height:20px;white-space:nowrap}
.game-actions[hidden]{display:none}
.leaderboard-mode{margin-top:10px}.leaderboard-mode .mode-icon{color:#b98aff}
.leaderboard-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-bottom:12px;padding:4px;border:1px solid #2d3442;border-radius:15px;background:#171b23}.leaderboard-tab{height:40px;padding:0 10px;border-radius:11px;background:transparent;color:#9299aa;font-size:13px;font-weight:700}.leaderboard-tab.active{background:#272d3a;color:#b98aff;box-shadow:0 4px 14px #0003}.leaderboard-summary{margin:0 2px 10px;color:#8f97a8;font-size:11px}.leaderboard-list{display:grid;gap:7px}.leaderboard-row{width:100%;min-width:0;display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid #2d3543;border-radius:15px;background:#1b2029;color:#fff;text-align:left}.leaderboard-row:active{opacity:.78}.leaderboard-place{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:11px;background:#242b39;color:#9ca4b6;font-size:12px;font-weight:800}.leaderboard-row.top-1 .leaderboard-place{background:#f5c94b;color:#191a1f}.leaderboard-row.top-2 .leaderboard-place{background:#d8dee8;color:#252a33}.leaderboard-row.top-3 .leaderboard-place{background:#ed944c;color:#24180f}.leaderboard-league{width:38px;height:38px;flex:none;object-fit:contain}.leaderboard-copy{min-width:0;flex:1;display:block;overflow:hidden}.leaderboard-name,.leaderboard-rank-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.leaderboard-name{font-size:13.5px;font-weight:800;line-height:1.2}.leaderboard-rank-name{margin-top:3px;font-size:10.5px;font-weight:600;line-height:1.2}.leaderboard-rating{flex:none;display:inline-flex;align-items:center;gap:4px;font-size:15px;font-weight:800}.leaderboard-trophy{font-size:16px;line-height:1}.leaderboard-current{border-color:#7d55ce;background:#211a35}.leaderboard-pin{position:sticky;bottom:calc(var(--safe-bottom) + 4px);z-index:2;margin-top:10px;padding-top:7px;background:linear-gradient(180deg,transparent,#0f1219 28%)}.leaderboard-pin-label{margin:0 3px 5px;color:#a88bdf;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.1em}.leaderboard-loading{padding:36px 8px;color:#939bad;text-align:center}
.home-profile{display:flex;align-items:center;gap:12px;margin-bottom:14px;padding:12px;border:1px solid #31394a;border-radius:18px;background:#202531}.home-profile-avatar,.social-avatar{width:52px;height:52px;flex:none;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(145deg,#9867ff,#4ecf91);font-size:22px;font-weight:800}.home-profile-avatar img,.social-avatar img{width:100%;height:100%;object-fit:cover}.home-profile-main{min-width:0;flex:1}.home-profile-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;font-weight:800}.home-profile-meta{margin-top:4px;color:#d1ad4d;font-size:12px}.home-profile-actions{display:flex;gap:6px}.mini-button{position:relative;width:38px;height:38px;padding:0;border:1px solid #353e50;border-radius:12px;background:#282e3b;font-size:18px}.request-badge{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:1px 5px;border-radius:9px;background:#ff596b;font-size:10px;line-height:16px}.request-badge[hidden]{display:none}.menu-intro{margin:0 2px 14px;color:var(--muted);font-size:14px}.social-screen{padding:14px}.social-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.social-head h2{margin:0;font-size:22px}.social-back{width:auto;padding:7px 4px;background:transparent;color:#dce0ea;font-size:16px}.profile-card,.social-block{margin-top:12px;padding:14px;border:1px solid #2f3746;border-radius:18px;background:#202531}.profile-identity{display:flex;align-items:center;gap:12px}.profile-identity .social-avatar{width:64px;height:64px}.profile-name{font-size:20px;font-weight:800}.profile-league{margin-top:5px;color:#adb4c5;font-size:13px}.profile-progress{height:7px;margin-top:14px;overflow:hidden;border-radius:8px;background:#343b49}.profile-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#9b64ff,#7387ff)}.profile-xp{display:flex;justify-content:space-between;margin-top:6px;color:var(--muted);font-size:11px}.profile-numbers{display:flex;gap:10px;margin:12px 0}.profile-number{padding:9px 13px;border-radius:18px;background:#202531;font-weight:800}.profile-number span{color:#d5b24e}.section-title{margin:0 0 10px;color:#aeb5c6;font-size:13px}.task-list,.friend-list{display:grid;gap:9px}.task-row,.friend-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:14px;background:#272d3a}.task-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#332953}.task-main,.friend-main{min-width:0;flex:1}.task-title,.friend-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700}.task-progress{height:5px;margin-top:7px;overflow:hidden;border-radius:6px;background:#3a414f}.task-progress i{display:block;height:100%;background:#9b65ff}.task-claim,.friend-small{width:auto;padding:8px 10px;border-radius:11px;font-size:12px}.task-claim:disabled{opacity:.45}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stat-box{padding:11px 5px;border-radius:12px;background:#272d3a;text-align:center}.stat-box strong{display:block;font-size:18px}.stat-box span{display:block;margin-top:3px;color:var(--muted);font-size:10px}.profile-edit{display:flex;gap:8px;margin-top:12px}.profile-edit input,.chat-compose input{min-width:0;flex:1;border:1px solid #353e50;border-radius:13px;background:#151922;color:#fff;padding:11px 12px;font:inherit}.profile-edit button,.chat-compose button{width:auto;padding:10px 14px;font-size:13px}.incoming-title{margin:14px 0 8px;color:#b98cff;font-size:12px;font-weight:700}.friend-avatar-wrap{position:relative}.online-dot{position:absolute;right:0;bottom:1px;width:10px;height:10px;border:2px solid #272d3a;border-radius:50%;background:#42d69c}.friend-meta{margin-top:3px;color:var(--muted);font-size:11px}.friend-controls{display:flex;gap:6px;flex:none;max-width:42%}.friend-controls .friend-small{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-decline{background:#303644}.empty-social{padding:28px 8px;color:var(--muted);text-align:center}.chat-overlay[hidden]{display:none}.chat-overlay{position:fixed;inset:0;z-index:7;background:#0008}.chat-drawer{position:absolute;left:0;top:0;bottom:0;width:min(390px,92vw);display:flex;flex-direction:column;background:#171b23;border-right:1px solid #353d4c;box-shadow:18px 0 60px #0009;animation:drawerIn .2s ease-out}.chat-head{display:flex;align-items:center;justify-content:space-between;padding:18px;border-bottom:1px solid #2b3240}.chat-head strong{font-size:18px}.chat-close{width:36px;height:36px;padding:0;background:transparent;color:#ccd1dc}.chat-content{min-height:0;flex:1;display:flex;flex-direction:column;padding:16px}.friend-prompt{margin:auto;text-align:center}.friend-prompt-icon{width:62px;height:62px;margin:0 auto 16px;display:grid;place-items:center;border-radius:18px;background:#30264c;color:#b98aff;font-size:30px}.friend-prompt h3{max-width:290px;margin:0 auto 8px;font-size:18px}.friend-prompt p{color:var(--muted);line-height:1.45}.prompt-actions{display:flex;justify-content:center;gap:10px;margin-top:18px}.prompt-actions button{width:auto;min-width:120px;padding:12px 16px;font-size:14px}.chat-user-row{margin-bottom:14px}.chat-messages{min-height:0;flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px}.chat-message{max-width:82%;padding:10px 12px;border-radius:14px;background:#282e3a;font-size:14px;line-height:1.4}.chat-message.mine{align-self:flex-end;background:#563a92}.chat-compose{display:flex;gap:8px;padding-top:12px}.chat-compose[hidden]{display:none}@keyframes drawerIn{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@media(max-width:430px){.social-screen{padding:12px}.home-profile{padding:10px}.mode{padding:14px}.chat-drawer{width:94vw}}
    .home-profile-link{width:auto;min-width:0;flex:1;display:flex;align-items:center;gap:12px;padding:0;border:0;border-radius:12px;background:transparent;color:inherit;text-align:left}.home-profile-link .home-profile-main{display:block}.home-profile-link .home-profile-name,.home-profile-link .home-profile-meta{display:block}.home-profile-link:active{opacity:.78}
    .social-screen{padding:14px 4px;background:transparent;border:0;box-shadow:none}.social-head{justify-content:flex-start;gap:12px;margin:0 0 20px}.social-head h2{font-size:20px;line-height:1.2}.social-back{width:36px;height:36px;flex:none;display:grid;place-items:center;padding:0;border:1px solid #303744;border-radius:50%;background:#1b2029;color:#aeb5c6}.social-back:active{background:#252b37}.profile-card,.social-block{margin-top:0}.profile-numbers+.social-block,.social-block+.social-block{margin-top:12px}
    .chat-drawer{width:min(360px,86vw);overflow:hidden;border-top:1px solid #353d4c;border-bottom:1px solid #353d4c;border-right:1px solid #353d4c;border-radius:0 24px 24px 0;background:#171b23;box-shadow:24px 0 60px -20px #000c}.chat-head{padding:calc(var(--fullscreen-top) + 14px) 16px 10px;border-bottom:1px solid #2b3240}.chat-head strong{display:flex;align-items:center;gap:8px;color:#f5f6fa;font-size:15px}.chat-head strong svg{color:#b98aff}.chat-close{width:32px;height:32px;display:grid;place-items:center;padding:0;border-radius:50%;background:transparent;color:#aeb5c6}.chat-close:active{background:#252b37}.chat-content{padding:16px 24px}.friend-prompt{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:12px;margin:0;text-align:center}.friend-prompt-icon{width:56px;height:56px;margin:0;display:grid;place-items:center;border-radius:16px;background:#30264c;color:#b98aff}.friend-prompt h3{max-width:290px;margin:0;font-size:15.5px;line-height:1.25}.friend-prompt p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}.prompt-actions{margin-top:8px}.prompt-actions button{min-width:0;height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 20px;border-radius:16px;font-size:14px}.friend-request-button{background:var(--accent)}
    @media(max-width:430px){.chat-drawer{width:min(360px,86vw)}.social-screen{padding:12px 4px}}
    body.telegram-fullscreen .social-screen{transform:translateY(-40px)}
    body.telegram-fullscreen .chat-head{padding-top:calc(var(--fullscreen-top) + 104px)}
    /* Mobile containment fixes for training and friends. */
    .training-screen{width:100%;max-width:100%;min-width:0;overflow-x:hidden;padding:8px 4px 18px}
    .training-levels{width:100%;min-width:0}
    .training-level{width:100%;max-width:100%;min-width:0;gap:10px;padding:12px}
    .level-icon{width:44px;height:44px;font-size:21px}
    .level-copy{min-width:0;overflow:hidden}
    .level-copy strong,.level-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .level-bars{flex:none;font-size:11px;letter-spacing:0}
    #friendsContent,.social-block,.friend-list{width:100%;max-width:100%;min-width:0;overflow:hidden}
    .friend-list .friend-row{width:100%;max-width:100%;min-width:0;display:grid;grid-template-columns:52px minmax(0,1fr) 104px;gap:10px;overflow:hidden}
    .friend-list .friend-main{width:auto;min-width:0;overflow:hidden}
    .friend-list .friend-controls{width:104px;max-width:104px;min-width:0;overflow:hidden}
    .friend-list .friend-controls .friend-small{width:100%;max-width:100%;min-width:0;padding:8px 6px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    body.telegram-fullscreen .training-screen{transform:translateY(-48px)}
    @media(max-width:380px){.training-level{padding:10px;gap:8px}.level-icon{width:40px;height:40px}.level-copy strong{font-size:14px}.level-copy small{font-size:11px}.level-bars{font-size:9px}.friend-list .friend-row{grid-template-columns:46px minmax(0,1fr) 92px}.friend-list .social-avatar{width:46px;height:46px}.friend-list .friend-controls{width:92px}.friend-list .friend-controls .friend-small{font-size:10.5px}} .training-badge[hidden]{display:none}.training-badge{display:inline-flex;align-items:center;height:28px;padding:0 10px;border:1px solid #353e50;border-radius:999px;background:#202531;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.14em}.game-actions button[hidden]{display:none}.game-actions.bot-mode .reaction-buttons{display:none}.game-actions.bot-mode .actions{grid-template-columns:1fr 1fr}.bot-new-game{background:var(--accent);border:1px solid #b18bff} .bot-resign-actions[hidden],.result-buttons[hidden]{display:none}.bot-resign-actions>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.bot-resign-actions button{padding:12px;font-size:14px}.bot-resign-actions .secondary{margin:0}.bot-view-board{margin-top:10px;background:transparent;color:var(--muted);font-size:13px;text-decoration:underline;text-underline-offset:2px}.result-icon.bot-resigned{width:64px;height:64px;border-radius:16px;color:#ff5757;background:#ff57571f;box-shadow:inset 0 0 0 1px #ff575747}.result-icon.bot-resigned svg{width:32px;height:32px}.result-icon.bot-victory{width:64px;height:64px;border-radius:16px;color:#f5c84b;background:#f5c84b1f;box-shadow:inset 0 0 0 1px #f5c84b47}.result-icon.bot-victory svg{width:32px;height:32px}
    .history-mode{margin-top:12px}.history-mode .mode-icon{color:#b98aff}.history-overlay[hidden]{display:none}.history-overlay{position:fixed;inset:0;z-index:110;display:flex;align-items:flex-end;justify-content:center;padding-top:calc(52px + var(--fullscreen-top));background:#000b;backdrop-filter:blur(7px)}.history-sheet{width:min(520px,100%);max-height:calc(100dvh - 52px - var(--fullscreen-top));padding:18px 16px calc(18px + env(safe-area-inset-bottom));overflow:auto;border:1px solid #303746;border-radius:26px 26px 0 0;background:#12161e}.history-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.history-head strong{font-size:22px}.history-close{width:38px;height:38px;padding:0;border-radius:50%;background:#252b37}.history-list{display:grid;gap:8px}.history-item{display:grid;grid-template-columns:36px minmax(0,1fr) 32px;align-items:center;gap:11px;width:100%;padding:11px 12px;text-align:left;border:1px solid #2c3442;border-radius:16px;background:#1c222c}.history-result{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;font-size:13px;font-weight:900}.history-result.win{color:#56d98a;background:#173625}.history-result.loss{color:#ff7079;background:#3a1d24}.history-result.draw{color:#aeb5c4;background:#2b303a}.history-copy{min-width:0}.history-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.15}.history-meta{display:flex;align-items:center;gap:6px;margin-top:3px;color:var(--muted);font-size:11.5px;font-weight:500;line-height:1}.history-delta{display:inline-flex;align-items:center;gap:2px;font-weight:800}.history-delta svg{width:11px;height:11px;color:#f5c84b}.history-delta.positive{color:#56d98a}.history-delta.negative{color:#ff7079}.history-play{width:32px;height:32px;display:grid;place-items:center;padding:0;border-radius:50%;background:#9867ff26;color:#b994ff}.history-play svg{width:14px;height:14px;margin-left:2px}.history-empty{padding:32px 12px;color:var(--muted);text-align:center}.replay-overlay{align-items:center;padding:calc(58px + var(--fullscreen-top)) 10px 16px}.replay-sheet{max-height:calc(100dvh - 74px - var(--fullscreen-top));border-radius:24px}.replay-players{display:flex;justify-content:space-between;gap:8px;margin-bottom:10px;color:var(--muted);font-size:12px}.replay-player{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.replay-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;aspect-ratio:1 / 1;overflow:hidden;border:3px solid #b47c49;border-radius:17px;contain:layout paint}.replay-cell{position:relative;min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden}.replay-cell.light{background:var(--light)}.replay-cell.dark{background:var(--dark)}.replay-cell.mark{background:#9b9b45}.replay-cell .piece{width:82%;height:auto;aspect-ratio:1 / 1}.replay-counter{margin:10px 0 5px;color:var(--muted);text-align:center;font-size:12px}.replay-range{width:100%;accent-color:var(--accent)}.replay-controls{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:10px}.replay-controls button{height:42px;padding:0;border-radius:12px;background:#252b37;font-size:16px}.replay-controls .replay-play{background:var(--accent)}
    .friend-list .friend-row{grid-template-columns:52px minmax(0,1fr) auto}.friend-list .friend-controls{width:auto;max-width:none;overflow:visible;align-items:center}.friend-chat-icon{width:32px;height:32px;display:grid;place-items:center;padding:0;border:1px solid #353e50;border-radius:50%;background:transparent;color:#b994ff}.friend-chat-icon svg{width:15px;height:15px}.friend-invite-button{width:auto;display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;background:#9867ff29;color:#b994ff;font-size:12px}.friend-invite-button svg{width:13px;height:13px}.direct-invite-overlay[hidden]{display:none}.direct-invite-overlay{position:fixed;inset:0;z-index:120;display:flex;flex-direction:column;background:var(--bg)}.direct-invite-glow{position:absolute;left:50%;top:34%;width:280px;height:280px;transform:translate(-50%,-50%);border-radius:50%;background:#9867ff38;filter:blur(55px);pointer-events:none}.direct-invite-main{position:relative;width:min(430px,100%);min-height:0;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;padding:calc(22px + var(--fullscreen-top)) 24px 18px;text-align:center}.direct-invite-avatar{width:92px;height:92px;display:grid;place-items:center;overflow:hidden;border:2px solid #9867ff55;border-radius:50%;background:#252b37;font-size:34px;font-weight:800;box-shadow:0 0 24px #9867ff44}.direct-invite-avatar img{width:100%;height:100%;object-fit:cover}.direct-invite-name{max-width:100%;margin-top:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:19px;font-weight:800}.direct-invite-state{margin-top:28px;display:flex;flex-direction:column;align-items:center}.direct-invite-clock{position:relative;width:56px;height:56px;display:grid;place-items:center}.direct-invite-clock svg{position:absolute;inset:0;transform:rotate(-90deg)}.direct-invite-clock circle:last-child{transition:stroke-dashoffset .25s linear}.direct-invite-seconds{position:relative;font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}.direct-invite-status-icon{width:56px;height:56px;display:grid;place-items:center;border-radius:16px;background:#f5c84b2e;color:#f5c84b;font-size:27px}.direct-invite-message{max-width:310px;margin-top:18px;color:var(--muted);font-size:15px;font-weight:600;line-height:1.35}.direct-invite-footer{position:relative;width:min(430px,100%);margin:auto;padding:0 24px calc(28px + env(safe-area-inset-bottom))}.direct-invite-footer button{padding:14px;border:1px solid #303746;background:#202631;color:var(--muted);font-size:14px}
  

    .history-filters{display:flex;gap:7px;margin:-2px 0 13px;overflow-x:auto;padding-bottom:1px}
    .history-filters button{flex:none;padding:7px 10px;border:1px solid #303746;border-radius:999px;background:#1c222c;color:var(--muted);font-size:11.5px;font-weight:700}
    .history-filters button.active{border-color:#9867ff66;background:#9867ff24;color:#c5a7ff}
    .history-details{display:flex;align-items:center;gap:5px;margin-top:4px;overflow:hidden;color:#7f8797;font-size:10.5px;line-height:1;white-space:nowrap}
    .history-item:disabled{opacity:.66}
  

  .expired-invite{position:fixed;inset:0;z-index:40;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;background:var(--bg)}
  .expired-invite[hidden]{display:none}.expired-clock{width:80px;height:80px;display:grid;place-items:center;margin-bottom:20px;border:1px solid #303746;border-radius:50%;background:#171b23;font-size:40px}
  .expired-invite h2{margin:0;font-size:21px;font-weight:800;line-height:1.2}.expired-invite p{max-width:320px;margin:9px 0 0;color:var(--muted);font-size:14px;line-height:1.55}
  .expired-actions{display:grid;width:min(320px,100%);gap:12px;margin-top:28px}.expired-actions button{padding:14px;border-radius:16px;font-size:15px}.expired-actions .secondary{margin:0;border:1px solid #303746;background:#171b23}
  .invite-ttl{color:#b98aff}
  .direct-invite-clock[hidden],.direct-invite-status-icon[hidden]{display:none}
  .home-friend-requests[hidden]{display:none}.home-friend-requests{margin-top:14px}.request-section-head,.friends-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.request-section-head strong{color:#b994ff;font-size:12px}.accept-all,.find-friends{width:auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:7px 10px;border-radius:999px;font-size:12px}.accept-all{background:#9867ff26;color:#b994ff}.find-friends{width:auto;flex:none;gap:6px;padding:6px 12px;border:1px solid #303746;border-radius:999px;background:#171b23;color:#b994ff;font-size:12.5px;font-weight:600;line-height:1.2}.find-friends svg{width:14px;height:14px;flex:none}.home-request-list{display:grid;gap:8px}.home-request-row{display:grid;grid-template-columns:40px minmax(0,1fr) 36px 36px;align-items:center;gap:9px;padding:11px;border:1px solid #9867ff59;border-radius:16px;background:#9867ff14}.home-request-row .social-avatar{width:40px;height:40px}.request-copy{min-width:0}.request-copy strong,.request-copy small{display:block}.request-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.request-copy small{margin-top:3px;color:var(--muted);font-size:11.5px}.request-icon-button{width:36px;height:36px;display:grid;place-items:center;padding:0;border-radius:50%;background:transparent;border:1px solid #303746;color:var(--muted)}.request-icon-button.accept{border-color:transparent;background:var(--accent);color:#fff}.request-icon-button svg{width:17px;height:17px}
  .friends-section-head{margin:0 0 12px}.friends-section-head strong{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.13em}
  .friend-search-screen{margin-top:-28px;padding:14px 4px;background:transparent}.friend-search-box{position:relative;margin-bottom:12px}.friend-search-box svg{position:absolute;left:13px;top:50%;width:17px;height:17px;transform:translateY(-50%);color:var(--muted)}.friend-search-box input{width:100%;padding:13px 14px 13px 40px;border:1px solid #303746;border-radius:14px;background:#202531;color:#fff;font:inherit;outline:none}.friend-search-box input:focus{border-color:#9867ff88}.friend-search-results{display:grid;gap:9px}.friend-search-row{display:grid;grid-template-columns:44px minmax(0,1fr) 34px;align-items:center;gap:11px;padding:11px 12px;border:1px solid #29313d;border-radius:16px;background:#171c24}.friend-search-row .social-avatar{width:44px;height:44px}.search-user-action{width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid #303746;border-radius:50%;background:transparent;color:#b994ff}.search-user-action:disabled{opacity:.48}.search-user-action svg{width:16px;height:16px}
  [data-player-profile]{cursor:pointer}.player-profile-modal[hidden]{display:none}.player-profile-modal{position:fixed;inset:0;z-index:125;display:flex;align-items:flex-end;justify-content:center;padding-top:calc(52px + var(--fullscreen-top));background:#000b;backdrop-filter:blur(7px)}.player-profile-sheet{position:relative;width:min(460px,100%);max-height:calc(100dvh - 52px - var(--fullscreen-top));padding:16px 16px calc(18px + env(safe-area-inset-bottom));overflow:auto;border:1px solid #303746;border-radius:26px 26px 0 0;background:#12161e}.player-profile-close{position:absolute;top:12px;right:12px;z-index:2;width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid #303746;border-radius:50%;background:#252b37;color:#d7dbe5}.player-profile-close svg{width:16px;height:16px}.public-profile-card{padding:16px;border:1px solid #303746;border-radius:18px;background:linear-gradient(135deg,#191e27,#211f36)}.public-profile-head{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:12px;padding-right:34px}.public-profile-avatar .social-avatar{width:58px;height:58px}.public-profile-identity{min-width:0}.public-profile-name-row{min-width:0;display:flex;align-items:center;gap:6px}.public-profile-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:800}.public-profile-top-badge{flex:none;padding:2px 6px;border:1px solid #0002;border-radius:6px;background:linear-gradient(#ffd964,#e8a93c);color:#1a1206;font-size:10px;font-weight:800;line-height:1;letter-spacing:.04em}.public-profile-meta{display:flex;align-items:center;gap:7px;margin-top:6px}.public-profile-league,.public-profile-rating{width:auto;display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:#ffffff0d;font-size:11.5px;font-weight:700}.public-profile-league img{width:18px;height:18px;object-fit:contain}.public-profile-rating svg{width:13px;height:13px;color:#f5c84b}.public-profile-online{display:flex;align-items:center;gap:6px;margin:12px 0;color:var(--muted);font-size:11.5px}.public-profile-online i{width:7px;height:7px;border-radius:50%;background:#555e70}.public-profile-online.active{color:#62da8d}.public-profile-online.active i{background:#3fb950}.public-profile-actions{display:grid;gap:8px}.public-profile-actions.two{grid-template-columns:1fr 1fr}.public-profile-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:12px;border-radius:15px;background:var(--accent);font-size:13px;font-weight:700}.public-profile-action.secondary{border:1px solid #353e50;background:#202631;color:#d7dbe5}.public-profile-action:disabled{opacity:.55}.public-profile-action svg{width:15px;height:15px}.public-profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.public-profile-stat{padding:12px 5px;border:1px solid #303746;border-radius:14px;background:#191e27;text-align:center}.public-profile-stat strong,.public-profile-stat span{display:block}.public-profile-stat strong{font-size:18px}.public-profile-stat span{margin-top:5px;color:var(--muted);font-size:10px}.public-profile-loading{padding:42px 12px;color:var(--muted);text-align:center}
  .public-profile-actions.two{align-items:stretch}.public-profile-actions.two .public-profile-action{box-sizing:border-box;width:100%;height:42px;margin:0;padding:0 10px;align-self:stretch;line-height:1;transform:none}.personal-chat.chat-overlay{z-index:90;background:var(--bg)}.personal-chat .chat-drawer{inset:0;width:100%;max-width:none;border:0;border-radius:0;background:var(--bg);box-shadow:none;animation:none}.personal-chat .chat-head{padding:calc(var(--fullscreen-top) + 84px) 12px 10px}.personal-chat .chat-content{padding:12px}.personal-chat .chat-user-row{display:none}.personal-chat .chat-messages{padding:3px 0}.personal-chat-head{display:flex;align-items:center;gap:9px;width:100%;min-width:0}.personal-chat-back,.personal-chat-menu-button{width:36px;height:36px;flex:none;display:grid;place-items:center;padding:0;border-radius:50%;background:transparent;color:#aeb5c6}.personal-chat-back svg,.personal-chat-menu-button svg{width:20px;height:20px}.personal-chat-person{min-width:0;flex:1;display:flex;align-items:center;gap:9px}.personal-chat-person .social-avatar{width:36px;height:36px}.personal-chat-copy{min-width:0}.personal-chat-copy strong,.personal-chat-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.personal-chat-copy strong{font-size:15px}.personal-chat-copy small{margin-top:2px;color:var(--muted);font-size:11.5px;font-weight:400}.chat-actions-menu[hidden]{display:none}.chat-actions-menu{position:absolute;z-index:5;right:12px;top:calc(var(--fullscreen-top) + 130px);width:220px;overflow:hidden;border:1px solid #303746;border-radius:18px;background:#171b23;box-shadow:0 16px 42px #000b}.chat-actions-title{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid #303746;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase}.chat-actions-title button{width:26px;height:26px;padding:0;background:transparent;color:var(--muted)}.chat-menu-action{width:100%;display:flex;align-items:center;gap:10px;padding:12px;border-radius:0;background:transparent;color:#e2e5ec;font-size:13px;text-align:left}.chat-menu-action.danger{color:#ff666b}.chat-menu-action+ .chat-menu-action{border-top:1px solid #242b36}.chat-menu-action svg{width:16px;height:16px;flex:none}.clear-chat-modal[hidden]{display:none}.clear-chat-modal{position:fixed;inset:0;z-index:130;display:grid;place-items:center;padding:24px;background:#000b;backdrop-filter:blur(6px)}.clear-chat-card{width:min(360px,100%);padding:24px;border:1px solid #303746;border-radius:24px;background:#171b23;text-align:center}.clear-chat-icon{width:56px;height:56px;display:grid;place-items:center;margin:0 auto 14px;border-radius:16px;background:#ff57571f;color:#ff666b}.clear-chat-icon svg{width:26px;height:26px}.clear-chat-card h3{margin:0 0 7px;font-size:18px}.clear-chat-card p{margin:0 0 18px;color:var(--muted);font-size:13px;line-height:1.5}.clear-chat-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:10px}.clear-chat-actions button{box-sizing:border-box;width:100%;height:44px;margin:0;padding:0 12px;border-radius:16px;font-size:14px;line-height:1}.clear-chat-actions .secondary{font-weight:500}.clear-chat-actions .danger{background:#ff5757;font-weight:600}
  .random-invite-toggle{box-sizing:border-box;width:100%;display:flex;align-items:center;gap:11px;margin-top:12px;padding:11px 13px;border:1px solid #2b313d;border-radius:16px;background:#171c24;color:#f2f4f8;text-align:left;transition:border-color .18s,background .18s}.random-invite-toggle.enabled{border-color:#7550ba;background:linear-gradient(90deg,#241b3c,#201a35)}.random-invite-toggle:disabled{opacity:.7}.random-invite-signal{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:11px;background:#202634}.random-invite-toggle.enabled .random-invite-signal{background:#3a2862}.random-invite-pulse{position:relative;width:22px;height:22px;display:block}.random-invite-pulse::before,.random-invite-pulse::after{content:"";position:absolute;inset:0;border-radius:50%;background:#b48aff66;opacity:0;transform:scale(.35)}.random-invite-pulse::after{inset:32%;opacity:1;transform:none;background:#7f8798}.random-invite-toggle.enabled .random-invite-pulse::before{animation:random-invite-ring 2.6s ease-out infinite}.random-invite-toggle.enabled .random-invite-pulse::after{background:#b48aff;box-shadow:0 0 10px #a56dff}.random-invite-wave{position:absolute;inset:0;border-radius:50%;background:#b48aff66;opacity:0;transform:scale(.35)}.random-invite-toggle.enabled .random-invite-wave{animation:random-invite-ring 2.6s ease-out 1.3s infinite}@keyframes random-invite-ring{0%{opacity:.75;transform:scale(.35)}70%,100%{opacity:0;transform:scale(1)}}.random-invite-copy{min-width:0;flex:1}.random-invite-copy strong,.random-invite-copy small{display:block}.random-invite-copy strong{font-size:13px;line-height:1.2}.random-invite-copy small{margin-top:3px;color:#929aab;font-size:10.5px;line-height:1.25}.random-invite-switch{position:relative;width:44px;height:24px;flex:none;border-radius:999px;background:#273040;transition:background .18s}.random-invite-toggle.enabled .random-invite-switch{background:#9361f4}.random-invite-switch::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#f7f8fb;box-shadow:0 2px 6px #0007;transition:transform .18s}.random-invite-toggle.enabled .random-invite-switch::after{transform:translateX(20px)}@media(prefers-reduced-motion:reduce){.random-invite-toggle.enabled .random-invite-pulse::before,.random-invite-toggle.enabled .random-invite-wave{animation:none}}


  /* Profile details matched to the reference UI. */
  .home-profile{position:relative;display:block;margin-bottom:14px;padding:0;overflow:hidden;border:1px solid #29313d;border-radius:18px;background:linear-gradient(135deg,#171c24,#191d29);box-shadow:none;cursor:pointer}
  .home-profile::before,.profile-reference::before{content:"";position:absolute;right:-56px;top:-64px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(151,111,255,.28),transparent 66%);filter:blur(18px);pointer-events:none}
  .home-profile-link{position:relative;display:block;width:100%;padding:15px 16px;color:inherit}
  .home-profile-top{display:flex;align-items:center;gap:12px;padding-right:44px}
  .home-profile-avatar-wrap{position:relative;width:54px;height:54px;display:block;flex:none}
  .home-profile-avatar{width:54px;height:54px;border:2px solid rgba(151,111,255,.28);box-shadow:0 6px 20px rgba(151,111,255,.22)}
  .home-task-badge{position:absolute;right:-7px;top:-7px;z-index:4;min-width:22px;height:22px;padding:0 6px;display:flex;align-items:center;justify-content:center;border:2px solid #171c24;border-radius:999px;background:#976fff;color:#fff;box-shadow:0 2px 8px rgba(151,111,255,.5);font-size:12px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;pointer-events:none}
  .home-task-badge[hidden]{display:none}
  .home-task-badge i{position:absolute;inset:-2px;border-radius:inherit;background:#976fff;opacity:.34;animation:homeTaskBadgePing 1.5s cubic-bezier(0,0,.2,1) infinite}
  .home-task-badge b{position:relative;font:inherit}
  @keyframes homeTaskBadgePing{0%{transform:scale(.85);opacity:.48}75%,100%{transform:scale(1.65);opacity:0}}
  @media(prefers-reduced-motion:reduce){.home-task-badge i{animation:none}}
  .home-profile-name{font-size:17px;font-weight:700}
  .home-profile-meta{display:flex;align-items:center;gap:7px;margin-top:7px;color:inherit}
  .profile-value-chip{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid #2c3441;border-radius:999px;background:#202633;color:#f4f5f8;font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
  .profile-value-chip svg{width:14px;height:14px;display:block;flex:none}.profile-value-chip.trophy svg{color:#e8b84b}.profile-value-chip.star svg{color:#f5c84b}
  .home-profile-actions{position:absolute;right:12px;top:13px;z-index:2}
  .home-profile-actions .mini-button{width:36px;height:36px;border-radius:12px;background:#202633;font-size:17px}
  .home-league{position:relative;margin-top:12px}
  .league-labels{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .league-chip{display:inline-flex;width:auto;min-width:0;align-items:center;gap:5px;height:26px;padding:0 9px 0 5px;border:0;border-radius:999px;background:#252c34;color:#aeb4bf;font-size:12px;font-weight:600}
  .league-labels .league-chip{width:max-content;flex:0 0 auto;height:24px;gap:6px;padding:0 10px 0 6px;color:var(--league-chip-color,#aeb4bf);background:color-mix(in srgb,var(--league-chip-color,#aeb4bf) 12%,transparent)}
  .league-labels .league-chip:last-child{margin-left:auto}
  .league-chip img{width:19px;height:19px;flex:none;object-fit:contain}
  .league-labels .league-chip img{width:18px;height:18px}
  .league-track,.profile-xp-track{height:6px;margin-top:8px;overflow:hidden;border-radius:999px;background:#262d37}
  .league-track i,.profile-xp-track i{display:block;height:100%;border-radius:inherit;transition:width .45s ease}
  .league-caption{display:flex;justify-content:space-between;margin-top:6px;color:#9098aa;font-size:10.5px;font-variant-numeric:tabular-nums}
  .profile-reference{position:relative;margin:0 0 12px;padding:16px;overflow:visible;border:1px solid #29313d;border-radius:17px;background:linear-gradient(135deg,#171c24,#191d29)}
  .profile-reference-head{position:relative;display:flex;align-items:center;gap:12px;padding-right:42px}
  .profile-reference-avatar{position:relative;width:60px;height:60px;flex:none}
  .profile-reference-avatar .social-avatar{width:60px;height:60px;border:2px solid rgba(151,111,255,.28);box-shadow:0 6px 20px rgba(151,111,255,.22)}
  .profile-avatar-mark{position:absolute;right:-2px;bottom:-2px;width:23px;height:23px;padding:0;display:grid;place-items:center;border:2px solid #171c24;border-radius:50%;background:#976fff;color:white;box-shadow:0 4px 12px rgba(151,111,255,.35)}
  .profile-reference-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;font-weight:700}
  .profile-settings-toggle{position:absolute;right:10px;top:10px;z-index:10;width:36px;height:36px;padding:0;display:grid;place-items:center;border:1px solid #303847;border-radius:50%;background:#202633;color:#cfd4de;transition:transform .14s ease,background-color .14s ease,color .14s ease}
  .profile-settings-toggle:active{transform:scale(.9);background:#29303d;color:#fff}
  .profile-settings-toggle svg{width:16px;height:16px}
  .profile-league-chip{margin-top:7px}
  .profile-xp-row{display:flex;justify-content:space-between;margin-top:14px;color:#f0f1f5;font-size:11px}
  .profile-xp-row span:last-child{color:#9098aa;font-variant-numeric:tabular-nums}
  .profile-xp-track i{background:linear-gradient(90deg,#976fff,#6b93ff)}
  .profile-reference .profile-league-track{margin-top:14px}
  .profile-edit-panel{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:14px;padding-top:13px;border-top:1px solid #2a313d}
  .profile-edit-panel[hidden]{display:none}
  .profile-edit-panel input{min-width:0;padding:10px 11px;border:1px solid #353e50;border-radius:12px;background:#11151c;color:#fff;font:inherit}
  .profile-edit-panel button{width:auto;padding:10px 13px;border-radius:12px;font-size:12px}
  .profile-sound-setting{position:relative;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;min-height:52px;margin-top:4px;padding:0 4px 0 12px;border:1px solid #29313d;border-radius:14px;background:#171c24;color:#f0f1f5;font-size:14px}
  .profile-reset-account{grid-column:1/-1;width:100%;min-height:52px;margin-top:4px;padding:0 12px;display:flex;align-items:center;gap:10px;border:1px solid #29313d;border-radius:14px;background:#171c24;color:#ff666b;text-align:left;font-size:14px;font-weight:600}
  .profile-reset-account span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#ff57571f}
  .profile-reset-account svg{width:16px;height:16px}
  .reset-profile-card{max-width:384px}
  .reset-profile-icon{width:56px;height:56px;display:grid;place-items:center;margin:0 auto 14px;border-radius:16px;background:#ff57571f;color:#ff666b}
  .reset-profile-icon svg{width:26px;height:26px}
  .reset-profile-card h2{font-size:18px;margin-bottom:8px}
  .reset-profile-card p{margin:0 0 20px;font-size:13px;line-height:1.5}
  .sound-control{position:relative;flex:none}
  .profile-edit-panel .sound-menu-toggle{width:38px;height:38px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:#8f97a6}
  .profile-edit-panel .sound-menu-toggle.enabled{color:#f0f1f5}
  .sound-menu-toggle svg,.sound-mute-toggle svg{width:19px;height:19px}
  .sound-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:40;width:min(244px,calc(100vw - 48px));padding:14px;border:1px solid #303846;border-radius:16px;background:#171c24;box-shadow:0 16px 40px rgba(0,0,0,.42)}
  .sound-popover[hidden]{display:none}
  .sound-popover-title{margin:0 2px 12px;color:#9098aa;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
  .sound-volume-row{display:flex;align-items:center;gap:10px}
  .profile-edit-panel .sound-mute-toggle{width:34px;height:34px;padding:0;display:grid;place-items:center;flex:none;border:0;border-radius:10px;background:#252b36;color:#7f8796}
  .profile-edit-panel .sound-mute-toggle.enabled{background:rgba(167,139,250,.13);color:#a78bfa}
  .sound-volume-main{min-width:0;flex:1}
  .sound-volume-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;color:#f0f1f5;font-size:12px}
  .sound-volume-label b{color:#9098aa;font-size:10.5px;font-weight:500;font-variant-numeric:tabular-nums}
  .profile-edit-panel .sound-volume-slider{width:100%;height:4px;padding:0;border:0;border-radius:999px;outline:0;appearance:none;background:linear-gradient(to right,#a78bfa 0,#a78bfa var(--sound-volume),#292f3a var(--sound-volume),#292f3a 100%);accent-color:#a78bfa}
  .sound-volume-slider::-webkit-slider-thumb{width:15px;height:15px;border:2px solid #171c24;border-radius:50%;appearance:none;background:#a78bfa;box-shadow:0 2px 8px rgba(0,0,0,.35)}
  .sound-volume-slider::-moz-range-thumb{width:13px;height:13px;border:2px solid #171c24;border-radius:50%;background:#a78bfa;box-shadow:0 2px 8px rgba(0,0,0,.35)}
  .profile-numbers{display:flex;gap:8px;margin:0 0 12px}
  .profile-number{display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 16px;border:1px solid #29313d;border-radius:999px;background:#1d2330;font-size:16px;font-weight:800}
  .profile-number svg{width:18px;height:18px;display:block;flex:none}.profile-number.rating svg{color:#e8b84b}.profile-number.rating span{color:#f4f5f8}
  #profileContent .social-block{padding:16px;border-color:#29313d;border-radius:17px;background:#171c24}
  #profileContent .section-title{color:#9098aa;font-size:12px}
  #profileContent .task-row{padding:8px 0;background:transparent}
  #profileContent .task-row+.task-row{margin-top:2px}
  #profileContent .task-icon{width:40px;height:40px;border-radius:12px}
  #profileContent .task-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
  #profileContent .task-title{font-size:12px}
  #profileContent .task-count{flex:none;color:#8e96a6;font-size:10.5px;font-variant-numeric:tabular-nums}
  #profileContent .task-progress{height:5px;background:#29313a}
  #profileContent .task-claim{min-width:54px;padding:7px 9px;border-radius:999px;background:#203746;color:#9be8ff;font-size:10.5px}
  #profileContent .task-claim.ready{padding-inline:12px;background:linear-gradient(135deg,#f5c84b 0%,#f0874a 100%);color:#1a1532;box-shadow:0 4px 14px -4px rgba(245,200,75,.55);animation:taskClaimPulse 1.35s ease-in-out infinite}
  @keyframes taskClaimPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.055);box-shadow:0 5px 18px -3px rgba(245,200,75,.72)}}
  @media(prefers-reduced-motion:reduce){#profileContent .task-claim.ready{animation:none}}
  .daily-complete{margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(63,185,80,.1);box-shadow:inset 0 0 18px rgba(63,185,80,.12);color:#3fb950;text-align:center;font-size:12px;font-weight:600;text-shadow:0 0 14px rgba(63,185,80,.5)}
  .achievement-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .achievement-section-title span:last-child{padding:3px 8px;border-radius:999px;background:#282f3c;color:#b7bdc9;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}
  .achievement-list{display:grid;gap:8px}
  .achievement-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid #29313d;border-radius:14px;background:#202633}
  .achievement-card.locked{opacity:.72}
  .achievement-card.ready{border-color:#9b65ff;box-shadow:0 0 0 2px rgba(152,103,255,.08)}
  .achievement-card.claimed{border-color:rgba(63,185,80,.25);background:#1b2925}
  .achievement-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#332953;font-size:21px}
  .achievement-card.claimed .achievement-icon{background:rgba(63,185,80,.1)}
  .achievement-copy{min-width:0}
  .achievement-title{font-size:12.5px;font-weight:800}
  .achievement-description{margin-top:2px;color:#8f97a8;font-size:10px;line-height:1.25}
  .achievement-progress-row{display:flex;align-items:center;gap:7px;margin-top:7px}
  .achievement-progress{height:5px;flex:1;overflow:hidden;border-radius:999px;background:#303744}
  .achievement-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#9867ff,#728aff)}
  .achievement-progress-row span{flex:none;color:#8f97a8;font-size:9.5px;font-variant-numeric:tabular-nums}
  .achievement-claim{width:auto;min-width:58px;padding:7px 9px;border-radius:999px;background:#203746;color:#9be8ff;font-size:10px;font-weight:700}
  .achievement-claim.ready{background:linear-gradient(135deg,#9867ff,#7650dd);color:#fff;animation:taskClaimPulse 1.35s ease-in-out infinite}
  .achievement-claim.claimed{background:rgba(63,185,80,.1);color:#62da8d}
  @media(prefers-reduced-motion:reduce){.achievement-claim.ready{animation:none}}
  @media(max-width:380px){.achievement-card{grid-template-columns:38px minmax(0,1fr)}.achievement-icon{width:38px;height:38px}.achievement-claim{grid-column:2;justify-self:start}}
  .section-title.stats-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .streak-badge{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid rgba(240,135,74,.28);border-radius:999px;background:rgba(240,135,74,.14);color:#f0874a;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
  #profileContent .stats-grid{gap:8px}
  #profileContent .stat-box{min-height:64px;display:grid;align-content:center;border-radius:12px;background:#202633}
  #profileContent .stat-box strong{font-size:18px}
  #profileContent .stat-box span{font-size:10px}
  body.league-open{overflow:hidden}.league-modal[hidden]{display:none}.league-modal{position:fixed;inset:0;z-index:120;display:flex;align-items:flex-end;justify-content:center;background:rgba(8,10,14,.72);backdrop-filter:blur(5px)}
  .league-modal-sheet{width:min(420px,100%);max-height:88vh;overflow:auto;border:1px solid #303846;border-bottom:0;border-radius:28px 28px 0 0;background:#0d0f14;box-shadow:0 -16px 50px #0008}
  .league-modal-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:12px 12px 4px 16px;background:#0d0f14}
  .league-modal-head strong{font-size:18px}.league-modal-head button{width:36px;height:36px;padding:0;border:1px solid #303846;border-radius:50%;background:#202633;color:#aeb4c2}
  .league-modal-content{display:grid;gap:10px;padding:4px 16px max(20px,var(--safe-bottom,0px))}
  .league-family-card{box-sizing:border-box;padding:14px;border:1px solid #29313d;border-radius:20px;background:#171c24}
  .league-family-card.current{box-shadow:0 0 0 1px var(--league-color),0 10px 28px color-mix(in srgb,var(--league-color) 13%,transparent);background:linear-gradient(135deg,color-mix(in srgb,var(--league-color) 14%,#171c24),#171c24)}
  .league-family-head{display:flex;align-items:center;gap:12px}.league-family-head img{width:42px;height:42px;object-fit:contain}
  .league-family-copy{min-width:0;flex:1}.league-family-copy strong{display:block;color:var(--league-color);font-size:15px}.league-family-copy small{display:block;margin-top:2px;color:#7f8797;font-size:10.5px}
  .league-you{padding:4px 9px;border-radius:999px;background:color-mix(in srgb,var(--league-color) 18%,transparent);color:var(--league-color);font-size:9px;font-weight:800;text-transform:uppercase}
  .league-complete{width:28px;height:28px;display:grid;place-items:center;flex:none;border-radius:50%;background:rgba(53,207,120,.16);color:#35cf78}
  .league-tiers{display:flex;gap:6px;margin-top:12px}.league-tier{flex:1;padding:6px 8px;border:1px solid #303744;border-radius:12px;background:#202633;text-align:center;color:#8e96a6;font-size:11px;line-height:1}.league-tier.current{border-color:var(--league-color);color:var(--league-color);background:color-mix(in srgb,var(--league-color) 15%,#202633)}.league-tier small{display:block;margin-top:5px;color:#737b8b;font-size:9px}
  body.avatar-open{overflow:hidden}.avatar-modal[hidden]{display:none}.avatar-modal{position:fixed;inset:0;z-index:130;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.9);backdrop-filter:blur(8px)}
  .avatar-modal-close{position:absolute;right:16px;top:16px;z-index:2;width:40px;height:40px;padding:0;display:grid;place-items:center;border:1px solid rgba(255,255,255,.15);border-radius:50%;background:rgba(255,255,255,.1);color:#fff}
  body.telegram-shell .avatar-modal-close{top:calc(var(--fullscreen-top,0px) + 72px)}
  .avatar-modal-content{display:flex;max-width:100%;flex-direction:column;align-items:center}
  .avatar-modal-image{width:min(340px,82vw);height:min(340px,82vw);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(255,255,255,.15);border-radius:28px;background:linear-gradient(135deg,#976fff,#48cfae);box-shadow:0 30px 80px -20px rgba(0,0,0,.9);color:#fff;font-size:96px;font-weight:800}
  .avatar-modal-image img{width:100%;height:100%;display:block;object-fit:cover}
  .avatar-modal-name{max-width:80vw;margin-top:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;color:#fff;font-size:17px;font-weight:600}
  .section-title.daily-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .daily-reset{display:inline-flex;align-items:center;gap:4px;flex:none;white-space:nowrap;border-radius:999px;padding:2px 8px;color:#e8b84b;background:rgba(232,184,75,.12);font-size:10.5px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.35}
  .daily-reset svg{flex:none}
  .task-icon.capture-task{color:#a78bfa;background:rgba(167,139,250,.12)}
  .task-claimed{width:32px;height:32px;display:grid;place-items:center;flex:none;border-radius:50%;color:#35cf78;background:rgba(53,207,120,.16)}
  .stat-win-rate{color:#a78bfa}.stat-best-streak{color:#f0874a}.stat-wins{color:#35cf78}.stat-losses{color:#ff5f63}
  body.telegram-fullscreen .chat-head{padding-top:calc(var(--fullscreen-top) + 68px)}
  body.telegram-fullscreen .personal-chat .chat-head{padding-top:calc(var(--fullscreen-top) + 84px)}
  body.game-mode .game-actions{margin-top:clamp(34px,7dvh,110px)}
  @media(max-width:420px){.daily-reset{padding-inline:6px;font-size:9.5px}.home-profile-link{padding:14px}.profile-reference{padding:14px}.profile-number{padding-inline:14px}}

}
