:root{color-scheme:dark;font-family:Arial,sans-serif;color:#fff;background:#111426}*{box-sizing:border-box}body{margin:0}button,a,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit;border:1px solid #655c81}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #ffd326;outline-offset:3px}.app{max-width:520px;margin:auto;min-height:100dvh;padding:12px 10px 84px;background:#29235c}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.topbar a{color:#fff;text-decoration:none}.small-btn{background:#282441;border-radius:6px;padding:8px 12px}.welcome{text-align:center;margin:55px 0 30px;font-size:26px}.gold{color:#ffd326}.panel{background:#35304f;border:1px solid #655c81;border-radius:10px;padding:16px;margin:14px 0}.stake-panel{border-color:#a58a38}.stake-panel h3{text-align:center;font-size:16px;margin:0 0 28px}.primary{width:100%;border:0;border-radius:12px;padding:13px;font-weight:700;background:#09bb90;margin:8px 0}.secondary{background:#5340f5}.stats{text-align:center;padding:28px}.stats strong{font-size:26px;display:block}.stats span{color:#ded7ef;font-size:13px}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,520px);display:flex;background:#22273c;border-top:1px solid #4b416d;z-index:2}.bottom-nav button{flex:1;background:none;border:0;padding:14px 3px;color:#b6b9ce;font-size:12px}.bottom-nav button.active{color:#6db5ff}.notice{color:#ffc861;min-height:20px;font-size:14px}.metrics{display:grid;grid-template-columns:1.6fr 1.1fr .95fr 1.1fr 1fr;gap:8px;margin-bottom:10px}.metric{background:#4b3e67;border:1px solid #776689;border-radius:6px;padding:6px 8px;min-width:0}.metric span{color:#e8cfff;font-size:clamp(10px,3vw,17px);font-weight:bold;display:block}.metric strong{display:block;font-size:clamp(13px,3.6vw,20px);margin-top:5px;overflow-wrap:anywhere}.game-layout{display:grid;grid-template-columns:.94fr 1.06fr;gap:6px}.numbers-board{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;padding:8px;background:#41365a;border:1px solid #786b8b;border-radius:6px}.number-cell,.letter{display:flex;align-items:center;justify-content:center;min-width:0;border-radius:5px;aspect-ratio:.89;font-weight:bold;font-size:clamp(12px,3.4vw,18px)}.number-cell{background:#665a7c;border:1px solid #a092b2}.number-cell.active{background:#f7650a;border-color:#f7650a}.number-cell.latest{background:#00cd50;border-color:#00cd50}.letter{border:0;color:white}.letter-b{background:#2c7cff}.letter-i{background:#6454ff}.letter-n{background:#aa40fa}.letter-g{background:#00c944}.letter-o{background:#ff7300}.right-side{display:flex;flex-direction:column;gap:6px;min-width:0}.recent-calls{display:flex;gap:5px;align-items:center;min-height:55px;padding:6px;background:#35304b;border:1px solid #776b88;border-radius:6px}.recent-ball{background:#2f76ff;border-radius:50%;width:39px;height:39px;display:grid;place-items:center;font-size:13px;font-weight:bold}.sound{margin-left:auto;background:none;border:0;padding:5px;font-size:13px}.ball-stage{display:grid;place-items:center;background:#413744;border:1px solid #776b88;border-radius:6px;min-height:110px}.call-number{display:grid;place-items:center;width:86px;height:86px;border:6px solid #ffcb00;border-radius:50%;background:#fff;color:#8900dd;font-size:30px;font-weight:bold}.auto-control{display:flex;align-items:center;gap:10px;border:1px solid #776b88;border-radius:30px;padding:8px 12px;background:#35304f;font-size:14px}.auto-control input{accent-color:#00c966;width:22px;height:22px}.player-panel{flex:1;background:#34345b;border:1px solid #776b88;border-radius:6px;padding:12px 8px;text-align:center}.player-panel h2{font-size:clamp(18px,4vw,24px);margin:24px 0 42px}.player-panel p{font-size:19px;line-height:1.8;color:#ece1fa}.player-board{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:12px}.player-board .number-cell{font-size:12px;padding:0}.player-board .free{font-size:9px}.actions{display:grid;grid-template-columns:1fr 1.1fr 2.2fr;gap:10px;margin-top:14px}.actions button{border:0;border-radius:10px;padding:14px 2px;font-size:18px;font-weight:bold}.leave{background:#ff594a}.refresh{background:#9b4856}.bingo{background:#b28538}.cartela-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}.cartela-grid button{background:#df4204;border:0;border-radius:4px;aspect-ratio:1;font-weight:bold}.cartela-grid button.selected{background:#00ca72;outline:2px solid white}.selection-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:14px}.selection-meta div{background:#4b3e67;padding:8px;border:1px solid #776689;border-radius:4px;font-size:12px}.selection-meta strong{display:block;font-size:16px}.board-preview{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin:10px 0}.board-preview span{padding:8px;text-align:center;background:#60547b;border-radius:4px}.hidden{display:none!important}dialog{color:#fff;background:#30294d;border:1px solid #776689;border-radius:12px;width:90%;max-width:420px}dialog::backdrop{background:#0009}.game-card{display:flex;justify-content:space-between;align-items:center;margin:8px 0}.game-card a{color:#a8ceff}.game-app{padding-bottom:20px;background:#302760}.muted{color:#c0bad6;font-size:13px} @media(min-width:700px){.app{margin:24px auto;border-radius:16px;min-height:calc(100dvh - 48px)}.game-app{max-width:540px}.numbers-board{gap:6px}}

.selection-meta{grid-template-columns:repeat(4,1fr);position:sticky;top:0;z-index:1;background:#29235c}.countdown{display:grid;place-items:center}.countdown strong{font-size:24px;color:#ffdc16}.cartela-scroll{height:62dvh;overflow:auto;border:1px solid #776689;border-radius:6px;padding:8px}.cartela-grid button{background:#625576;border:1px solid #9185a1}.cartela-grid button:disabled{background:#e34800;opacity:1}.cartela-grid button.selected{background:#00c96a}.selection-app .topbar{margin-bottom:12px}.selection-app{padding-bottom:84px}

#result{position:fixed;z-index:5;top:20%;left:50%;transform:translateX(-50%);width:min(90%,460px);border:2px solid #ffce24;box-shadow:0 0 0 100vmax #111b;text-align:center}#result h2{color:#ffce24}

#result{top:50%;transform:translate(-50%,-50%);width:min(94%,480px);max-height:94dvh;overflow:auto;padding:24px 18px;background:#353e4b;border-radius:18px;border:1px solid #64717f}
#result h2{font-size:32px;margin:10px 0;color:#ffdf13}#winner-count{font-size:22px;font-weight:bold;margin:14px 0}.winner-list{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:16px 0}.winner-chip{padding:10px 14px;border-radius:30px;background:#455061;border:1px solid #7f8994;font-weight:bold}.winner-chip[aria-pressed=true]{border-color:#ffcf20}#winning-card{background:#3b4653;border:1px solid #7a8590;border-radius:16px;padding:10px}#winning-title{margin:8px 0 14px;font-size:20px}.winning-board{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.winning-board .letter{aspect-ratio:auto;padding:6px;border-radius:14px}.winner-cell{display:grid;place-items:center;background:#eeeff3;border:1px solid #c8ced7;border-radius:5px;color:#334158;padding:5px;font-size:22px;font-weight:bold;min-height:34px}.winner-cell.winning{background:#00b541;color:#fff}.winner-cell.last{background:#f48a17;color:#fff}.winner-cell:nth-child(18){font-size:10px}#result>p:last-child{font-size:14px;border:1px solid #7a8590;border-radius:30px;padding:10px;margin:16px 0 0}

/* Cartela states match the supplied selection reference. */
.selection-app .cartela-grid button{background:#514969;border:1px solid #9184aa;color:#fff}
.selection-app .cartela-grid button:disabled{background:#514969;opacity:1}
.selection-app .cartela-grid button.taken{background:#e84800;border-color:#e84800}
.selection-app .cartela-grid button.selected{background:#bd4100;border:1px solid #ffd8b9;outline:0}
.selection-app .selection-meta div{background:#443757;color:#e8cfff;font-weight:bold}
.selection-app .selection-meta strong{color:#fff}
.selection-app .selection-meta .countdown strong{color:#ffdc16}

.inline-card{margin:12px auto;max-width:360px;padding:10px;border:1px solid #786a94;border-radius:8px;background:#393158}.inline-card h3{text-align:center;font-size:14px;color:#f6d34a;margin:0 0 8px}.inline-card .winner-cell{font-size:17px;min-height:26px}.inline-card .winning-board .letter{padding:3px;border-radius:4px}.selection-app:has(.inline-card:not(.hidden)) .cartela-scroll{height:43dvh}.player-board .number-cell{background:#edf0f5;color:#334158;border-color:#c8ced7}.player-board .number-cell.active{background:#00b64b;color:#fff;border-color:#52d57d}.player-board .letter{font-size:14px;aspect-ratio:auto;padding:5px 0}

.crown-badge{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:#f6a000;margin:8px auto 14px}.winner-cell.called{background:#f48a17;color:#fff}.winner-cell.called.winning{background:#00b541;color:#fff}.selection-app .cartela-scroll:has(+.inline-card:not(.hidden)){height:43dvh}
.bottom-nav{padding:5px 8px max(5px,var(--safe-bottom));gap:4px;border-radius:0 0 12px 12px}.bottom-nav a{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:8px 2px;color:#a5b4c9;text-decoration:none;border-radius:12px;font-size:12px;font-weight:600}.bottom-nav a.active{background:#273952;color:#61aeff}.bottom-nav a.active img{filter:brightness(1.4)}.game-app{padding-bottom:92px;max-width:520px}.dashboard-app{padding:16px 16px 100px}.dashboard-app h1{font-size:30px;margin:12px 0 24px}.dashboard-app h2{font-size:23px;margin-top:28px}.page-hero{background:#44306e;margin:-16px -16px 24px;padding:26px 16px 24px;border-radius:14px 14px 0 0}.page-hero .topbar{margin:0}.page-hero .topbar h1{margin-bottom:20px}.total-card{background:#343d60;padding:16px;border:1px solid #65517f;border-radius:16px;color:#a5b4c9}.total-card strong{display:block;font-size:32px;color:white;margin-top:16px}.stack{display:flex;flex-direction:column;gap:16px}.history-card,.profile-stat,.balance-row,.setting-row,.account-row,.transaction-row{background:#202b40;border:1px solid #574575;border-radius:16px;padding:18px}.history-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.history-heading h3{margin:0;font-size:19px}.badge{display:inline-block;border:1px solid #67748b;color:#a5b4c9;padding:5px 9px;border-radius:10px;font-size:13px}.badge.verified{color:#00cf79;border-color:#13805b;background:#184d43}.badge.lost{color:#ff606d;border-color:#884352;background:#4c2f40}.history-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px;font-size:13px;color:#a5b4c9}.history-metrics strong{display:block;margin-top:8px;color:white;font-size:17px}.account-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.wallet-tabs{display:flex;padding:4px;background:#343d60;border-radius:12px}.wallet-tabs button{flex:1;border:0;border-radius:10px;background:none;color:#a5b4c9;padding:12px}.wallet-tabs button.active{background:#4a6077;color:white}.balance-row{display:flex;justify-content:space-between;align-items:center;margin:18px 0;color:#a5b4c9;font-size:21px}.balance-row strong{font-size:29px;color:#fff}.balance-row strong.green{color:#00cf79}.profile-hero{text-align:center}.profile-hero h1{margin-bottom:0}.profile-avatar{display:grid;place-items:center;border:2px solid #596780;border-radius:50%;width:74px;height:74px;background:#344459;margin:0 auto 14px;font-size:30px}.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.profile-stat{padding:18px 14px}.profile-stat>div{display:flex;gap:8px;align-items:center;color:#a5b4c9;font-size:14px}.profile-stat>strong{display:block;font-size:28px;margin-top:26px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.setting-row span{display:flex;gap:10px;align-items:center}.setting-row input{width:24px;height:24px;accent-color:#00bd79}.support-link{display:block;margin:20px 0;color:#8ebdff}.rules-dialog{max-height:90dvh;max-width:520px;overflow:auto;padding:18px}.rules-dialog .topbar{position:sticky;top:-18px;background:#30294d;padding:8px 0;z-index:1}.rules-tabs{display:flex;gap:6px;flex-wrap:wrap}.rules-tabs a{padding:8px 10px;border:1px solid #64537f;border-radius:6px;color:#ffdc38;text-decoration:none}.rules-dialog article{background:#222e43;border:1px solid #544371;border-radius:10px;padding:14px;margin:12px 0}.rules-dialog p,.rules-dialog li{font-size:14px;line-height:1.8}.rules-dialog li a{color:#8ebdff}.rules-dialog p[lang=am]{color:#f2d548}.rules-dialog section{scroll-margin-top:80px}

/* Rules open as a bottom sheet; the main tabs remain a navigation bar. */
.rules-dialog.bottom-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:520px;max-height:85dvh;border-radius:22px 22px 0 0;border-bottom:0;padding:12px 18px max(18px,var(--safe-bottom));overscroll-behavior:contain;box-shadow:0 -12px 40px #0005}
.sheet-handle{width:42px;height:5px;margin:0 auto 14px;border-radius:9px;background:#a5b4c9}
.bottom-sheet .topbar{top:-12px;margin-bottom:16px}
.bottom-sheet[open]{animation:sheet-enter .2s ease-out}
@keyframes sheet-enter{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.bottom-sheet[open]{animation:none}}
.wallet-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wallet-actions button{display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;min-height:48px}#payment-form{display:flex;flex-direction:column;gap:10px;margin-top:20px}#payment-form label{font-size:14px;color:#ded7ef}#payment-form input{width:100%;min-height:48px;padding:12px;border:1px solid #776689;border-radius:10px;background:#202b40;color:white}#payment-form input:focus-visible{outline:2px solid #61aeff;outline-offset:2px}#payment-sheet .notice{line-height:1.7}
.topbar{gap:12px;min-width:0}.header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.topbar .small-btn,.support-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 10px;line-height:1.2;text-decoration:none;color:#fff;white-space:nowrap}.small-btn svg,.small-btn img{display:block;flex-shrink:0}.app-header{margin-bottom:24px}.dashboard-app .page-hero .topbar h1{margin:0}.dashboard-app .page-hero .topbar{margin-bottom:20px}.dashboard-app .page-hero{border-radius:0;padding-top:24px}.profile-support{margin:24px 0}.profile-support .support-button{width:100%;min-height:48px;background:#334a68;border-color:#56759b;border-radius:12px;font-weight:600}.topbar h2{margin:8px 0}.game-app .app-header{margin-bottom:12px}@media(max-width:360px){.app-header strong{font-size:14px}.header-actions{gap:5px}.topbar .small-btn{font-size:12px;padding:8px}.topbar{gap:8px}}
.more-stakes{margin-top:12px}.more-stakes summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px;border:1px solid #776689;border-radius:10px;background:#282441;color:#ded7ef;cursor:pointer;list-style:none;font-weight:600}.more-stakes summary::-webkit-details-marker{display:none}.more-stakes summary:focus-visible{outline:3px solid #ffd326;outline-offset:3px}.more-stakes[open] summary svg{transform:rotate(180deg)}.extra-stakes{padding-top:8px}.stake-panel .notice:empty{display:none}
.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand img,.selection-back img{display:block;flex-shrink:0;border-radius:10px}.brand strong{font-size:16px}.selection-back{gap:8px}@media(max-width:360px){.brand{gap:7px}.brand strong{font-size:14px}.brand img{width:36px;height:36px}}
.toggle-switch{position:relative;display:inline-flex;width:46px;height:28px;flex-shrink:0;vertical-align:middle}.toggle-switch input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer;z-index:1}.switch-track{position:absolute;inset:0;border-radius:20px;background:#596479;transition:background .15s}.switch-track::before{content:"";position:absolute;left:4px;top:4px;width:20px;height:20px;background:#fff;border-radius:50%;transition:transform .15s}.toggle-switch input:checked+.switch-track{background:#00b96b}.toggle-switch input:checked+.switch-track::before{transform:translateX(18px)}.toggle-switch input:focus-visible+.switch-track{outline:3px solid #ffd326;outline-offset:3px}.toggle-switch input:disabled{cursor:not-allowed}.toggle-switch input:disabled+.switch-track{opacity:.45}.auto-control{justify-content:space-between}.sound{display:grid;place-items:center;flex-shrink:0;min-width:36px;min-height:44px;padding:4px}.sound img{display:block}#recent{min-width:0;flex:1}.recent-ball{width:clamp(23px,6vw,39px);height:clamp(23px,6vw,39px);flex-shrink:0;font-size:clamp(9px,2.5vw,13px)}@media(prefers-reduced-motion:reduce){.switch-track,.switch-track::before{transition:none}}
.cartela-toast{visibility:hidden;min-height:0;margin:0 0 8px;padding:0 12px;border:1px solid #d68a36;border-radius:10px;background:#5b3b2d;color:#ffd39a;line-height:1.45}
.cartela-toast.visible{visibility:visible;min-height:44px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.cartela-toast #error-deposit{flex:0 0 auto;display:flex;gap:6px}.cartela-toast #error-deposit button{display:inline-flex;align-items:center;gap:4px;background:#12bfa0;color:#fff;border-color:#12bfa0}

/* Compact game polish: preserve the layout while improving density and hierarchy. */
.game-app{--game-surface:#3a3155;--game-border:#796d91;--game-cell:#625875;--game-text:#f8f7fb;background:linear-gradient(180deg,#33276a 0,#2d255c 42%,#28214f 100%);color:var(--game-text);display:flex;flex-direction:column;height:100dvh;overflow:hidden;padding-bottom:0}
.game-app .app-header{padding:4px 2px 8px;border-bottom:1px solid #ffffff14}
.game-app .brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:750;letter-spacing:-.2px}
.game-app .brand img{border-radius:10px;box-shadow:0 5px 14px #120b2d66}
.game-app .metrics{gap:4px;margin-bottom:8px}
.game-app .metric{padding:8px 7px;background:#493d68;border-color:#81739a;box-shadow:inset 0 1px 0 #ffffff12}
.game-app .metric span{font-size:clamp(10px,2.8vw,14px);color:#eee7fa}
.game-app .metric strong{font-variant-numeric:tabular-nums;font-size:clamp(14px,3.5vw,19px);line-height:1.15}
.game-app .game-layout{gap:4px;flex:1;min-height:0;overflow:hidden;align-items:stretch;grid-template-rows:minmax(0,1fr)}
.game-app .numbers-board{gap:1px;padding:4px;background:#332b4b;border-color:var(--game-border);overflow-y:auto;min-height:0;align-content:start;-webkit-overflow-scrolling:touch}.game-app .numbers-board .letter{position:sticky;top:0;z-index:1}
.game-app .numbers-board .number-cell,.game-app .numbers-board .letter{border-radius:2px;font-variant-numeric:tabular-nums}
.game-app .numbers-board .number-cell{background:var(--game-cell);border-color:#817790;color:#fff}
.game-app .numbers-board .number-cell.active{background:#e85812;border-color:#ff7b32;color:#fff}
.game-app .numbers-board .number-cell.latest{background:#00a94f;border-color:#35d276;box-shadow:inset 0 0 0 2px #b8ffd2}
.game-app .right-side{gap:4px;overflow-y:auto;min-height:0;padding-bottom:12px;-webkit-overflow-scrolling:touch}.game-app .right-side>*{flex-shrink:0}.game-app .right-side .player-panel{flex:none}
.game-app .recent-calls,.game-app .ball-stage,.game-app .auto-control,.game-app .player-panel{background:var(--game-surface);border-color:var(--game-border);box-shadow:inset 0 1px 0 #ffffff10}
.game-app .recent-calls{min-height:52px;padding:5px}
.game-app .recent-ball{background:#3277e8;box-shadow:inset 0 1px 0 #ffffff42;font-variant-numeric:tabular-nums}
.game-app .ball-stage{min-height:106px}
.game-app .call-number{font-variant-numeric:tabular-nums;box-shadow:0 8px 20px #170b2c59}
.game-app .auto-control{min-height:48px;padding:8px 12px}
.game-app .player-panel{display:flex;flex-direction:column;padding:10px 6px}
.game-app .player-panel>strong{display:block;margin-bottom:8px;font-size:17px}
.game-app .player-board{flex:1;grid-template-rows:auto repeat(5,minmax(44px,1fr));gap:1px;margin-top:0;overflow:hidden;border:1px solid #756988;border-radius:5px;background:#756988}
.game-app .player-board .number-cell,.game-app .player-board .letter{height:100%;aspect-ratio:auto;border-radius:2px;font-variant-numeric:tabular-nums}
.game-app .player-board .number-cell{min-height:44px;border:0;background:#e8ebf2;color:#334158}
.game-app .player-board .number-cell.active{background:#07894f;color:#fff;box-shadow:inset 0 0 0 2px #39c982}
.game-app .player-board .number-cell:active{filter:brightness(.9)}
.game-app .player-board .number-cell:focus-visible{position:relative;z-index:1;outline:3px solid #ffd326;outline-offset:-3px}
.game-app .player-board .free{background:#08744a;color:#fff;opacity:1}
.game-app .player-panel .notice{margin:8px 2px 0;min-height:0;font-size:13px;line-height:1.45;text-align:left}
.game-app .actions{gap:6px;margin-top:8px}
.game-app .actions button{min-height:48px;padding:12px 4px;transition:filter .16s ease,transform .16s ease}
.game-app .actions button:active{filter:brightness(.88);transform:scale(.98)}
@media(max-width:380px){.game-app .player-board .number-cell{min-height:40px}.game-app .metric{padding-inline:5px}}

/* Dashboard, wallet, profile, rules, and cartela selection polish. */
.dashboard-app,.selection-app{--surface:#202b40;--surface-raised:#33304f;--surface-soft:#443565;--border:#66537f;--text-soft:#bdc7dc;--brand:#ffd326;--success:#0bc394;background:linear-gradient(180deg,#34276d 0,#29235c 56%,#24204f 100%);color:#fff}
.dashboard-app{padding:16px 16px calc(112px + var(--safe-bottom))}
.dashboard-app .app-header{margin:-16px -16px 0;padding:22px 16px 18px;background:#302568;border-bottom:1px solid #ffffff17}
.dashboard-app .app-header .brand{font-size:18px;letter-spacing:-.2px}
.dashboard-app .app-header .brand img{width:48px;height:48px;box-shadow:0 7px 18px #120b2d66}
.dashboard-app .small-btn{min-width:64px;min-height:44px;border-radius:10px;background:#292440;border-color:#766b8b;font-weight:650}
.dashboard-app .welcome{max-width:420px;margin:36px auto 28px;font-size:clamp(30px,8vw,42px);line-height:1.08;letter-spacing:-1px;text-wrap:balance}
.dashboard-app .stake-panel{margin:0 auto;max-width:460px;padding:22px 16px 18px;border-radius:18px;border-color:#b69a24;background:linear-gradient(180deg,#3d3657,#332d4c);box-shadow:0 16px 36px #160d3652,inset 0 1px #ffffff12}
.dashboard-app .stake-panel h3{margin-bottom:20px;font-size:19px;letter-spacing:-.2px}
.dashboard-app .primary{min-height:52px;border-radius:13px;background:linear-gradient(180deg,#13c7a1,#08b58e);box-shadow:inset 0 1px #ffffff30;font-size:17px;transition:filter .16s ease,transform .16s ease}
.dashboard-app .primary:active{filter:brightness(.9);transform:scale(.99)}
.dashboard-app .primary.secondary{background:linear-gradient(180deg,#6550ff,#5038ed)}
.dashboard-app .more-stakes summary{min-height:48px;border-radius:13px;background:#292440;border-color:#786b8e;color:#e2dcef;transition:background .16s ease}
.dashboard-app .more-stakes[open] summary{background:#332d4c}

.dashboard-app .page-hero{margin:-16px -16px 28px;padding:30px 16px 30px;background:linear-gradient(180deg,#53377a,#473269);border-bottom:1px solid #745c91;border-radius:0}
.dashboard-app .page-hero h1{font-size:clamp(32px,8vw,42px);line-height:1.1;letter-spacing:-1px}
.dashboard-app .total-card,.dashboard-app .account-row{border-color:#735f8c;background:linear-gradient(145deg,#374365,#303a58);box-shadow:inset 0 1px #ffffff10}
.dashboard-app .total-card{padding:20px;border-radius:18px}
.dashboard-app .total-card span{color:var(--text-soft);font-size:17px}
.dashboard-app .total-card strong{font-size:38px;font-variant-numeric:tabular-nums}
.dashboard-app #recent-history:empty,.dashboard-app #recent-history:not(:has(.history-card)){min-height:96px;padding:20px;border:1px dashed #6e6086;border-radius:16px;background:#241f4a;color:#e7e3f2;line-height:1.5}
.dashboard-app .history-card,.dashboard-app .transaction-row{border-color:#66537f;background:linear-gradient(145deg,#232f47,#202a40);box-shadow:inset 0 1px #ffffff0d}
.dashboard-app .history-metrics strong,.dashboard-app .balance-row strong,.dashboard-app .profile-stat>strong{font-variant-numeric:tabular-nums}

.dashboard-app .wallet-tabs{border:1px solid #594b74;background:#333b60;border-radius:14px}
.dashboard-app .wallet-tabs button{min-height:46px;font-size:16px;transition:background .16s ease,color .16s ease}
.dashboard-app .wallet-tabs button.active{background:#526b84;box-shadow:0 4px 12px #11172a40;color:#fff}
.dashboard-app .account-row{min-height:64px;padding:18px;border-radius:18px}
.dashboard-app .badge.verified{border-color:#0ea36d;background:#104e42;color:#1fe19c}
.dashboard-app .balance-row{min-height:104px;padding:22px;border-color:#67557e;background:linear-gradient(145deg,#212d43,#202a3e);box-shadow:inset 0 1px #ffffff0d}
.dashboard-app .balance-row span{color:var(--text-soft)}
.dashboard-app .balance-row strong{font-size:34px}
.dashboard-app #wallet-note,.dashboard-app #payments-mode-note{color:#c9c3dc;line-height:1.45}
.dashboard-app .wallet-actions{gap:10px;margin-top:22px}
.dashboard-app .wallet-actions button{min-height:52px;margin:0;font-size:15px}
.dashboard-app #wallet-balances,.dashboard-app #transactions{padding-bottom:24px}

.dashboard-app .profile-hero{padding-top:28px;padding-bottom:28px}
.dashboard-app .profile-avatar{width:78px;height:78px;border-color:#7f6c99;background:linear-gradient(145deg,#455574,#303c59);box-shadow:0 10px 24px #170e3759}
.dashboard-app .profile-grid{gap:12px}
.dashboard-app .profile-stat{min-height:118px;padding:18px 14px;border-color:#66537f;background:linear-gradient(145deg,#222e45,#202a3e);box-shadow:inset 0 1px #ffffff0d}
.dashboard-app .profile-stat>div{color:var(--text-soft);font-size:14px;font-weight:600}
.dashboard-app .profile-stat>strong{margin-top:22px;font-size:31px}
.dashboard-app .setting-row{min-height:72px;border-color:#66537f;background:linear-gradient(145deg,#222e45,#202a3e)}
.dashboard-app .setting-row>span:first-child{font-size:17px;font-weight:650}
.dashboard-app .profile-support{margin-bottom:28px}
.dashboard-app .support-link{color:#8fc0ff;text-underline-offset:4px}

body:has(.dashboard-app) .bottom-nav,body:has(.selection-app) .bottom-nav{background:#20283b;border-color:#46516a;box-shadow:0 -10px 28px #11142670}
body:has(.dashboard-app) .bottom-nav a,body:has(.selection-app) .bottom-nav a{min-height:60px;color:#b8c2d7;transition:background .16s ease,color .16s ease}
body:has(.dashboard-app) .bottom-nav a.active,body:has(.selection-app) .bottom-nav a.active{background:#2b405b;color:#65b4ff}

/* Cartela selection shares the live player screen's surfaces and compact grid. */
.selection-app{--selection-surface:#3a3155;--selection-border:#796d91;--selection-cell:#625875;padding:12px 10px calc(100px + var(--safe-bottom));background:linear-gradient(180deg,#33276a 0,#2d255c 42%,#28214f 100%)}
.selection-app>.topbar{margin:0 0 10px;padding:4px 2px 8px;background:transparent;border-bottom:1px solid #ffffff14}
.selection-app .selection-back,.selection-app #refresh{min-height:44px;border-radius:6px;background:#332b4b;border-color:var(--selection-border);font-weight:650}
.selection-app .selection-back img{box-shadow:none;border-radius:6px}
.selection-app .selection-meta{top:0;gap:4px;margin:0 0 8px;padding:4px 0 6px;background:#2f265f}
.selection-app .selection-meta div{min-height:64px;padding:8px 7px;border-color:#81739a;border-radius:6px;background:#493d68;box-shadow:inset 0 1px #ffffff12;font-size:12px;color:#eee7fa}
.selection-app .selection-meta strong{margin-top:5px;font-size:19px;line-height:1.15;font-variant-numeric:tabular-nums}
.selection-app .selection-meta .countdown strong{margin:0;font-size:26px;color:#ffd326}
.selection-app #selection-status{min-height:38px;margin:8px 2px;color:#d0c9e4;font-size:13px;line-height:1.45}
.selection-app .cartela-scroll{height:61dvh;padding:4px;border-color:var(--selection-border);border-radius:6px;background:#332b4b;scrollbar-color:#75688e transparent;overscroll-behavior:contain}
.selection-app .cartela-grid{gap:2px}
.selection-app .cartela-grid button{min-height:44px;aspect-ratio:auto;padding:8px 1px;border-color:#817790;border-radius:2px;background:var(--selection-cell);font-size:16px;font-variant-numeric:tabular-nums;box-shadow:none;transition:filter .14s ease,background .14s ease}
.selection-app .cartela-grid button:disabled{background:var(--selection-cell);opacity:1}
.selection-app .cartela-grid button:not(:disabled):hover{background:#746988}
.selection-app .cartela-grid button:not(:disabled):active{filter:brightness(.86)}
.selection-app .cartela-grid button:focus-visible{position:relative;z-index:1;outline:2px solid #ffd326;outline-offset:-2px}
.selection-app .cartela-grid button.taken{background:#e85812;border-color:#ff7b32}
.selection-app .cartela-grid button.selected{background:#07894f;border-color:#39c982;box-shadow:inset 0 0 0 2px #b8ffd2;outline:0}
.selection-app .inline-card{max-width:390px;margin:14px auto;padding:10px 6px;border-color:var(--selection-border);border-radius:6px;background:var(--selection-surface);box-shadow:inset 0 1px #ffffff10}
.selection-app .inline-card h3{margin:0 0 10px;color:#f8f7fb;font-size:17px;line-height:1.3}
.selection-app .inline-card .winning-board{gap:1px;padding:0;grid-template-rows:auto repeat(5,minmax(40px,1fr));border:1px solid #756988;border-radius:5px;background:#756988;overflow:hidden}
.selection-app .inline-card .winner-cell{min-height:40px;border:0;border-radius:2px;background:#e8ebf2;color:#334158;font-size:17px;font-variant-numeric:tabular-nums}
.selection-app .inline-card .winner-cell.winning{background:#08744a;color:#fff;box-shadow:inset 0 0 0 2px #39c982}
.selection-app .inline-card .winning-board .letter{aspect-ratio:auto;min-height:30px;padding:5px 0;border-radius:2px;font-size:14px}
.selection-app>p:last-of-type{margin-bottom:20px;color:#c5bdd8;line-height:1.45}

.rules-dialog.bottom-sheet{background:linear-gradient(180deg,#382f57,#302849);border-color:#796b92;box-shadow:0 -18px 50px #05030cbf}
.rules-dialog .sheet-handle{background:#a9b5ca}
.rules-dialog .topbar{background:#382f57;border-bottom:1px solid #ffffff12}
.rules-dialog .topbar h2{font-size:28px;letter-spacing:-.5px}
.rules-dialog .topbar .small-btn{min-height:44px;border-radius:10px;background:#292440;border-color:#776b8c;font-weight:650}
.rules-dialog .rules-tabs{position:sticky;top:58px;z-index:1;padding:8px 0 10px;background:#382f57}
.rules-dialog .rules-tabs a{min-height:42px;display:inline-flex;align-items:center;border-color:#74658d;border-radius:9px;background:#302849;color:#ffdc38;font-weight:650}
.rules-dialog section>h2{margin-top:22px;font-size:24px}
.rules-dialog article{padding:18px;border-color:#604f79;border-radius:14px;background:linear-gradient(145deg,#223047,#202a40);box-shadow:inset 0 1px #ffffff0d}
.rules-dialog article h3{font-size:18px;line-height:1.35}
.rules-dialog p,.rules-dialog li{line-height:1.7;color:#eef1f7}
.rules-dialog p[lang=am]{color:#ffdb3d}
.rules-dialog button:focus-visible,.rules-dialog a:focus-visible{outline-width:2px;outline-offset:2px}
@media(max-width:380px){.dashboard-app,.selection-app{padding-inline:12px}.dashboard-app .profile-grid{gap:8px}.dashboard-app .profile-stat{padding-inline:10px}.selection-app .cartela-grid{gap:2px}.selection-app .cartela-grid button{min-height:44px;font-size:14px}.rules-dialog{padding-inline:14px}}

/* Player-screen aligned redesign: History, Wallet, Profile, and bottom sheets only. */
#history-tab,#wallet-tab,#profile-tab{--player-bg:#302760;--player-surface:#3a3155;--player-surface-2:#34345b;--player-border:#796d91;--player-cell:#625875;--player-gold:#ffd326;--player-orange:#e85812;--player-green:#07894f;color:#fff}
#history-tab .page-hero,#wallet-tab .page-hero,#profile-tab .page-hero{margin:-16px -16px 12px;padding:18px 16px;background:#302760;border-bottom:1px solid #796d91}
#history-tab .page-hero h1,#wallet-tab .page-hero h1,#profile-tab .page-hero h1{margin:0 0 14px;font-size:28px;line-height:1.1;letter-spacing:-.5px}
#history-tab>h2,#wallet-tab h2,#profile-tab>h2{margin:20px 0 10px;font-size:19px}

#history-tab .total-card{position:relative;overflow:hidden;min-height:92px;padding:15px 16px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface);box-shadow:none}
#history-tab .total-card::before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--player-gold)}
#history-tab .total-card span{color:#e8cfff;font-size:13px;font-weight:700}
#history-tab .total-card strong{margin-top:8px;font-size:32px;color:#fff}
#history-tab #recent-history:empty,#history-tab #recent-history:not(:has(.history-card)){min-height:92px;padding:16px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface);color:#ece7f5;font-size:14px;line-height:1.55}
#history-tab .history-card{padding:14px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface);box-shadow:none}
#history-tab .history-heading h3{font-size:16px}
#history-tab .history-metrics{gap:3px;margin-top:12px}
#history-tab .history-metrics>div{padding:8px 5px;border:1px solid #6f6385;border-radius:5px;background:#332b4b}
#history-tab .history-metrics span{font-size:11px}
#history-tab .history-metrics strong{margin-top:5px;font-size:15px}
#history-tab .badge.verified{background:var(--player-green);border-color:#39c982;color:#fff}
#history-tab .badge.lost{background:#704051;border-color:#a85c71;color:#fff}

#wallet-tab .page-hero .topbar{margin:0 0 10px}
#wallet-tab .page-hero .topbar h1{margin:0}
#wallet-tab #wallet-refresh{width:44px;min-width:44px;border-radius:6px;background:#332b4b;border-color:var(--player-border)}
#wallet-tab .account-row{min-height:54px;margin:0 0 8px;padding:12px 14px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface)}
#wallet-tab .account-row>span:first-child{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
#wallet-tab .badge{border-radius:5px}
#wallet-tab .badge.verified{background:var(--player-green);border-color:#39c982;color:#fff}
#wallet-tab .wallet-tabs{padding:3px;border:1px solid var(--player-border);border-radius:7px;background:#332b4b}
#wallet-tab .wallet-tabs button{min-height:42px;border-radius:5px;font-size:14px;font-weight:700}
#wallet-tab .wallet-tabs button.active{background:var(--player-cell);box-shadow:none}
#wallet-tab .balance-row{min-height:88px;margin:10px 0;padding:16px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface);box-shadow:none}
#wallet-tab .balance-row:first-child,#wallet-tab .balance-row:nth-child(2){border-left:1px solid var(--player-border)}
#wallet-tab .balance-row span{color:#e8cfff;font-size:15px;font-weight:700}
#wallet-tab .balance-row strong{font-size:32px;color:#fff}
#wallet-tab .balance-row strong.green{color:#21dc87}
#wallet-tab #wallet-note{margin:12px 2px;color:#d7d0e5;font-size:13px;line-height:1.5}
#wallet-tab .wallet-actions{gap:6px;margin-top:14px}
#wallet-tab .wallet-actions button{flex-direction:row;justify-content:center;gap:8px;min-height:58px;padding:8px 10px;border:1px solid #39c982;border-radius:7px;background:var(--player-green);box-shadow:none;font-size:13px;line-height:1.15;white-space:nowrap}
#wallet-tab .wallet-actions #transfer-open{border-color:#d2ad48;background:#9a7428}
.telebirr-mark{display:block;position:relative;flex:0 0 auto;width:24px;height:27px;overflow:hidden;padding:0;background:transparent;box-shadow:none}
.telebirr-mark img{display:block;width:90px;max-width:none;height:auto;transform:translate(-9px,-8px)}
#wallet-tab #payments-mode-note{margin:10px 0;padding:10px 12px;border:1px solid var(--player-border);border-radius:5px;background:var(--player-surface);color:#f0edf6;font-size:12px;line-height:1.5}
#wallet-tab #chapa-balance{border-left:1px solid var(--player-border)}
#wallet-tab .transaction-row{padding:12px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface)}

#profile-tab .profile-hero{padding-top:20px;padding-bottom:18px}
#profile-tab .profile-avatar{width:66px;height:66px;margin-bottom:10px;border:3px solid var(--player-gold);background:var(--player-surface);box-shadow:none;font-size:26px}
#profile-tab .profile-hero h1{margin:0;font-size:25px}
#profile-tab .profile-grid{gap:6px}
#profile-tab .profile-stat{min-height:105px;padding:12px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface);box-shadow:none}
#profile-tab .profile-stat:nth-child(1){border-top:4px solid var(--player-gold)}
#profile-tab .profile-stat:nth-child(2){border-top:4px solid #3277e8}
#profile-tab .profile-stat:nth-child(3){border-top:4px solid var(--player-green)}
#profile-tab .profile-stat:nth-child(4){border-top:4px solid #aa40fa}
#profile-tab .profile-stat:nth-child(5){border-top:4px solid var(--player-orange)}
#profile-tab .profile-stat>div{gap:7px;color:#e8cfff;font-size:12px;font-weight:700}
#profile-tab .profile-stat>div img{width:20px;height:20px}
#profile-tab .profile-stat>strong{margin-top:17px;font-size:28px}
#profile-tab .setting-row{min-height:62px;padding:12px 14px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface)}
#profile-tab .setting-row>span:first-child{font-size:15px}
#profile-tab .toggle-switch input:checked+.switch-track{background:var(--player-green)}

.rules-dialog.bottom-sheet{--player-surface:#3a3155;--player-surface-2:#34345b;--player-border:#796d91;--player-gold:#ffd326;--player-orange:#e85812;--player-green:#07894f;background:#302760;border:1px solid var(--player-border);box-shadow:0 -18px 50px #05030cd9}
.rules-dialog .sheet-handle{background:#9d92b1}
.rules-dialog .topbar{background:#302760;border-bottom:1px solid var(--player-border)}
.rules-dialog .topbar h2{font-size:25px}
.rules-dialog .topbar .small-btn{min-height:42px;border-radius:6px;background:#332b4b;border-color:var(--player-border)}
.rules-dialog .rules-tabs{gap:4px;top:56px;background:#302760}
.rules-dialog .rules-tabs a{min-height:40px;border-radius:5px;background:var(--player-surface);border-color:var(--player-border);font-size:13px}
.rules-dialog .rules-tabs a:nth-child(1){border-bottom:3px solid #3277e8}.rules-dialog .rules-tabs a:nth-child(2){border-bottom:3px solid #aa40fa}.rules-dialog .rules-tabs a:nth-child(3){border-bottom:3px solid var(--player-green)}.rules-dialog .rules-tabs a:nth-child(4){border-bottom:3px solid var(--player-orange)}
.rules-dialog section>h2{font-size:21px}
.rules-dialog article{padding:14px;border:1px solid var(--player-border);border-radius:7px;background:var(--player-surface-2);box-shadow:none}
.rules-dialog article h3{font-size:16px}
.rules-dialog p,.rules-dialog li{font-size:13px;line-height:1.65;color:#f0edf6}
.rules-dialog p[lang=am]{color:var(--player-gold)}
#payment-sheet #payment-mode{border-radius:5px;background:#332b4b;color:#e8cfff}
#payment-sheet #payment-form input{border-radius:6px;background:#332b4b;border-color:var(--player-border)}
#payment-sheet .primary,#registration-dialog .primary,.rules-dialog>button.primary{border-radius:7px;background:var(--player-green)}
#payment-sheet .primary.secondary{background:#9a7428}
@media(max-width:380px){#wallet-tab .wallet-actions button{font-size:12px}#history-tab .history-metrics{grid-template-columns:repeat(2,1fr)}.rules-dialog .rules-tabs a{padding-inline:8px}}

/* Payment history uses the player palette with explicit status labels. */
#wallet-tab .transaction-row{border-left:none;box-shadow:none}
#wallet-tab .transaction-row.status-completed{border-left:none}
#wallet-tab .transaction-row.status-failed{border-left:none}
.transaction-heading,.transaction-details{display:flex;align-items:center;justify-content:space-between;gap:12px}
.transaction-heading{align-items:baseline}
.transaction-title{font-size:14px;font-weight:600;line-height:1.4;color:#ece6f7;min-width:0}
.transaction-amount{font-size:27px;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.transaction-amount small{font-size:11px;font-weight:500;color:#c9bfdc}
.transaction-details{margin-top:12px;font-size:11px;color:#c9bfdc;flex-wrap:wrap}
.transaction-status{padding:4px 7px;border-radius:5px;background:#e7b84418;color:#f5cf6b;font-size:11px;font-weight:600}
.status-completed .transaction-status{background:#20cf8618;color:#53e0a3}
.status-failed .transaction-status{background:#f26c7918;color:#ff99a2}
.payment-status-button{margin-top:12px;width:100%;min-height:44px}
#payment-sheet #payment-close{font-size:26px;min-width:44px;line-height:1}
#payment-message:empty{display:none}
#payment-feedback{margin:12px 0;font-size:13px;line-height:1.5}
#payment-sheet #payment-form.hidden,#payment-sheet #payment-waiting.hidden{display:none}
#payment-sheet.payment-is-waiting #payment-close,#payment-sheet.payment-is-waiting #payment-help,#payment-sheet.payment-is-waiting #payment-message{display:none}
#payment-waiting{text-align:center;padding:24px 8px 8px;line-height:1.6}
#payment-waiting-cancel{min-width:120px;margin-top:14px}
.payment-spinner{display:block;width:38px;height:38px;margin:0 auto 18px;border:4px solid #776689;border-top-color:#12bfa0;border-radius:50%;animation:payment-spin .8s linear infinite}
@keyframes payment-spin{to{transform:rotate(360deg)}}
.brand img,.selection-back img{object-fit:contain}
#wallet-tab #bank-transfer-open{width:100%;margin-top:6px;min-height:48px;border-radius:7px;font-size:13px}
#wallet-tab .transaction-row .muted{margin:8px 0 0;font-size:12px;line-height:1.5}
/* Language menu at the top right of every Mini App page. A native select keeps the phone's own picker. */
.language-select{appearance:none;-webkit-appearance:none;min-height:40px;max-width:118px;padding:8px 28px 8px 30px;border:1px solid #766b8b;border-radius:10px;color:#fff;font:inherit;font-size:14px;font-weight:650;line-height:1.2;cursor:pointer;background-color:#292440}
.language-select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9bfdc' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:9px center,right 10px center;background-size:16px,12px}
.language-select:disabled{opacity:.6}
.language-select option{background:#292440;color:#fff}
.dashboard-app .language-select{min-height:44px}
@media(max-width:380px){.language-select{padding-left:10px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right 10px center;background-size:12px}}
.pattern-list{list-style:none;padding:0;display:grid;gap:10px}.pattern-list li{display:flex;align-items:center;gap:12px}
.pattern-card{flex:none;width:56px;height:56px}.pattern-card .off{fill:#4a4068}.pattern-card .on{fill:#00b541}.pattern-card .free{fill:#ffdf13}

/* 2026-11 polish: one set of tokens for every player page, cartela sliders, and calmer surfaces. */
:root{--ink:#f5f3ff;--ink-2:#cdc6ec;--ink-3:#9f97c7;--bg-top:#35297d;--bg-bottom:#1d1746;--tile:#ffffff0f;--tile-2:#ffffff17;--line:#ffffff1c;--line-2:#ffffff30;--gold:#ffd326;--gold-2:#f59e0b;--green:#10b981;--green-2:#059669;--orange:#f97316;--orange-2:#ea580c;--rose:#f43f5e;--blue:#3b82f6;--r-card:16px;--r-ctl:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Ethiopic",Nyala,"Abyssinica SIL",sans-serif;background:#15112e}
body{-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
.dashboard-app,.selection-app,.game-app{color:var(--ink);background:#2a2163}
.muted{color:var(--ink-3)}

/* Header: logo, rules and language share one height and one quiet surface. */
.dashboard-app .app-header,.game-app .app-header{background:transparent;border-bottom:1px solid var(--line)}
.dashboard-app .app-header{padding:14px 16px 12px}
.dashboard-app .app-header .brand img,.game-app .brand img{width:42px;height:42px;border-radius:12px;box-shadow:0 6px 16px #0d082a80}
.brand strong{font-size:17px;font-weight:800;letter-spacing:-.01em}
.topbar .small-btn,.dashboard-app .small-btn,.selection-app .selection-back,.selection-app #refresh,.language-select,.dashboard-app .language-select{min-height:40px;border:1px solid var(--line-2);border-radius:var(--r-ctl);background-color:#ffffff12;font-weight:650;transition:background-color .15s ease}
.topbar .small-btn:active,.language-select:active{background-color:#ffffff24}

/* Bottom navigation: a dark glass bar with a pill for the open page. */
.bottom-nav,body:has(.dashboard-app) .bottom-nav,body:has(.selection-app) .bottom-nav{background:#171334eb;border-top:1px solid var(--line);box-shadow:0 -12px 30px #0a071f80;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.bottom-nav a,body:has(.dashboard-app) .bottom-nav a,body:has(.selection-app) .bottom-nav a{min-height:58px;color:var(--ink-3);border-radius:14px}
.bottom-nav a img{opacity:.7}
.bottom-nav a.active,body:has(.dashboard-app) .bottom-nav a.active,body:has(.selection-app) .bottom-nav a.active{background:#ffffff14;color:#fff}
.bottom-nav a.active img{opacity:1;filter:brightness(0) invert(1)}

/* Lobby */
.dashboard-app .welcome{margin:34px auto 10px;font-size:clamp(30px,8.6vw,40px);font-weight:800;line-height:1.12;letter-spacing:-.02em}
.lobby-sub{max-width:330px;margin:0 auto 24px;color:var(--ink-2);font-size:15px;line-height:1.55;text-align:center;text-wrap:balance}
.dashboard-app .stake-panel{max-width:440px;padding:20px 16px 16px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile);box-shadow:none}
.dashboard-app .stake-panel h3{margin:0 0 16px;color:var(--ink-2);font-size:16px;font-weight:700}
.stake-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stake-tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:112px;padding:14px;border:0;border-radius:18px;background:linear-gradient(160deg,#34d399,#059669);box-shadow:0 10px 24px #05966959,inset 0 1px #ffffff40;color:#fff;text-align:left;transition:transform .15s ease,filter .15s ease}
.stake-tile.secondary{background:linear-gradient(160deg,#818cf8,#4f46e5);box-shadow:0 10px 24px #4f46e559,inset 0 1px #ffffff40}
.stake-tile:active{transform:scale(.97);filter:brightness(.95)}
.stake-amount{margin-top:auto;font-size:38px;font-weight:800;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stake-amount small{margin-left:4px;font-size:15px;font-weight:700;letter-spacing:0;opacity:.9}
.stake-go{position:absolute;top:12px;right:12px;padding:6px;width:32px;height:32px;border-radius:50%;background:#ffffff2e}
.dashboard-app .more-stakes{margin-top:12px}
.dashboard-app .more-stakes summary{min-height:46px;border:1px solid var(--line-2);border-radius:14px;background:#ffffff0d;color:var(--ink-2)}
.dashboard-app .more-stakes[open] summary{background:#ffffff14}
.extra-stakes.stake-grid{padding-top:10px}

/* History, wallet and profile share the page heading and card surfaces. */
#history-tab .page-hero,#wallet-tab .page-hero,#profile-tab .page-hero{margin:0 -16px 12px;padding:14px 16px 12px;background:#140b33;border-bottom:none}
#history-tab .page-hero h1,#wallet-tab .page-hero h1,#profile-tab .page-hero h1{font-size:22px;font-weight:800;letter-spacing:-.02em}
#history-tab>h2,#wallet-tab h2,#profile-tab>h2{margin:14px 2px 8px;color:var(--ink-2);font-size:14px;font-weight:700}
#history-tab .total-card{min-height:0;padding:11px 14px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#history-tab .total-card::before{display:none}
#history-tab .total-card span{color:var(--ink-2);font-size:12px}
#history-tab .total-card strong{margin-top:4px;font-size:26px;font-weight:800;font-variant-numeric:tabular-nums}
#history-tab #recent-history:empty,#history-tab #recent-history:not(:has(.history-card)){border:1px dashed var(--line-2);border-radius:var(--r-card);background:var(--tile);color:var(--ink-2)}
#history-tab .history-card{padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#history-tab .history-card .muted{margin:4px 0 0;font-size:11px}
#history-tab .history-metrics{gap:4px}
#history-tab .history-metrics>div{padding:5px 7px;border:0;border-radius:8px;background:#ffffff0d}
#history-tab .history-metrics span{color:var(--ink-3)}
#history-tab .badge,#wallet-tab .badge{border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700}
#history-tab .badge.verified,#wallet-tab .badge.verified{background:#10b98126;border-color:#10b98166;color:#6ee7b7}
#history-tab .badge.lost{background:#f43f5e1f;border-color:#f43f5e59;color:#fda4af}

#wallet-tab #wallet-refresh{border-radius:var(--r-ctl);background:#ffffff12;border-color:var(--line-2)}
#wallet-tab .account-row{border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#wallet-tab .wallet-tabs{margin:14px 0 0;padding:4px;border:1px solid var(--line);border-radius:14px;background:#0000002e}
#wallet-tab .wallet-tabs button{border-radius:10px;color:var(--ink-3)}
#wallet-tab .wallet-tabs button.active{background:#ffffff1f;color:#fff}
#wallet-tab .balance-row{min-height:0;margin:7px 0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#wallet-tab .balance-row span{color:var(--ink-2);font-size:13px}
#wallet-tab .balance-row strong{font-size:22px;font-variant-numeric:tabular-nums}
#wallet-tab .balance-row.balance-main{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:14px 16px;border-color:#7c3aed66;background:#3a2d8f;box-shadow:inset 0 1px #ffffff1a}
#wallet-tab .balance-main>span{color:#e9e4ff}
#wallet-tab .balance-main strong{font-size:34px;font-weight:800;line-height:1;letter-spacing:-.02em}
#wallet-tab .balance-main strong span{color:#fff;font-size:inherit}
#wallet-tab .balance-main small{font-size:14px;font-weight:700;color:#e9e4ff}
#wallet-tab .balance-row strong.green{color:#34d399}
#wallet-tab .wallet-actions{gap:8px}
#wallet-tab .wallet-actions button{min-height:48px;border:0;border-radius:12px;background:var(--gold);color:#1b1340;font-size:15px;font-weight:700;letter-spacing:.01em}
#wallet-tab #wallet-balances,#wallet-tab #transactions{margin-top:16px}
#wallet-tab #wallet-balances .stack,#wallet-tab #transactions{gap:0}
#wallet-tab .wallet-actions #transfer-open,#wallet-tab .wallet-actions #manual-cashout-open{background:var(--tile);border:1px solid var(--line);color:#fff}
#wallet-tab .transaction-row{border:none;border-bottom:1px solid var(--line);border-radius:0;background:none;padding:14px 16px}
#wallet-tab .transaction-row.status-completed{border-left:none}
#wallet-tab .transaction-row.status-failed{border-left:none}

#profile-tab .profile-hero{padding-top:14px;text-align:center}
#profile-tab .profile-account-row{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:6px}
#profile-tab .profile-account-row span:first-child{font-size:13px;color:var(--ink-2);font-variant-numeric:tabular-nums}
#profile-tab .badge{border-radius:999px;padding:3px 9px;font-size:11px;font-weight:700;border:1px solid transparent}
#profile-tab .badge.verified{background:#10b98126;border-color:#10b98166;color:#6ee7b7}
#profile-tab .profile-avatar{width:56px;height:56px;border:0;background:linear-gradient(145deg,var(--gold),var(--gold-2));color:#3b2600;font-size:22px;font-weight:800;box-shadow:0 0 0 3px #ffd32633,0 8px 18px #0d082a80}
#profile-tab .profile-hero h1{margin-top:3px;font-size:19px}
#profile-tab .profile-grid{gap:7px}
#profile-tab .profile-stat,#profile-tab .profile-stat:nth-child(n){min-height:0;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#profile-tab .profile-stat>div{color:var(--ink-2);font-size:12px}
#profile-tab .profile-stat>div img{padding:6px;width:30px;height:30px;border-radius:10px;background:#ffffff14}
#profile-tab .profile-stat:nth-child(1)>div img{background:#ffd32629}#profile-tab .profile-stat:nth-child(2)>div img{background:#3b82f62e}#profile-tab .profile-stat:nth-child(3)>div img{background:#10b9812e}#profile-tab .profile-stat:nth-child(4)>div img{background:#a855f72e}#profile-tab .profile-stat:nth-child(5)>div img{background:#f973162e}
#profile-tab .profile-stat>strong{margin-top:8px;font-size:22px;font-weight:800}
#profile-tab .setting-row{border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
#profile-tab .toggle-switch input:checked+.switch-track{background:var(--green)}

/* Cartela selection */
.selection-app>.topbar{border-bottom:1px solid var(--line)}
.selection-app .selection-meta{gap:6px;margin:0 -10px 8px;padding:8px 10px;background:#2c2270d9;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.selection-app .selection-meta div{min-height:62px;border:1px solid var(--line);border-radius:12px;background:#ffffff12;box-shadow:none;color:var(--ink-2);font-size:12px;font-weight:650}
.selection-app .selection-meta strong{font-size:18px;color:#fff;font-weight:800}
.selection-app .selection-meta .countdown{border-color:#ffd32659;background:#ffd3261a}
.selection-app .selection-meta .countdown strong{font-size:24px;color:var(--gold)}
.selection-app #selection-status{min-height:0;margin:4px 2px 8px;color:var(--ink-2)}
.cartela-legend{display:flex;flex-wrap:wrap;gap:14px;margin:0 2px 8px;padding:0;list-style:none;color:var(--ink-3);font-size:12px}
.cartela-legend li{display:flex;align-items:center;gap:6px}
.cartela-legend .swatch{width:12px;height:12px;border-radius:4px;background:#ffffff26;border:1px solid var(--line-2)}
.cartela-legend .swatch.taken{background:var(--orange-2);border-color:var(--orange)}
.cartela-legend .swatch.selected{background:var(--green);border-color:#6ee7b7}
.selection-app .cartela-scroll{padding:6px;border:1px solid var(--line);border-radius:var(--r-card);background:#0000002e}
.selection-app .cartela-grid{gap:4px}
.selection-app .cartela-grid button{min-height:42px;border:1px solid var(--line);border-radius:8px;background:#ffffff14;font-size:15px;font-weight:700}
.selection-app .cartela-grid button:disabled{background:#ffffff14}
.selection-app .cartela-grid button:not(:disabled):hover{background:#ffffff24}
.selection-app .cartela-grid button.taken{background:var(--orange-2);border-color:var(--orange);color:#fff}
.selection-app .cartela-grid button.selected{background:var(--green-2);border-color:#6ee7b7;box-shadow:inset 0 0 0 1px #6ee7b7}
.selection-app .cartela-grid button.pending{background:#f59e0b;border-color:#fcd34d;color:#3b2600;animation:cartela-pending .8s ease-in-out infinite alternate}
@keyframes cartela-pending{to{filter:brightness(1.15)}}
@media(prefers-reduced-motion:reduce){.selection-app .cartela-grid button.pending{animation:none}}
.selection-app .cartela-scroll:has(+.inline-card:not(.hidden)){height:40dvh}
.selection-app .inline-card{max-width:360px;padding:12px 10px 10px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile)}
.selection-app .inline-card .card-head h3{margin:0;font-size:16px;color:#fff}
.selected-total{margin:10px 0 0;color:var(--ink-2);font-size:13px;font-weight:650;text-align:center;font-variant-numeric:tabular-nums}
.selection-app .inline-card .winning-board{border-radius:10px}
.selection-app .inline-card .winner-cell{min-height:38px}
.selection-app .inline-card .winner-cell.winning{background:var(--green-2);box-shadow:none;font-size:12px}
.cartela-toast{border-radius:12px}

/* Cartela slider, shared by the selection preview and the live game. */
.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 8px}
.card-count{padding:3px 9px;border-radius:999px;background:#ffffff17;color:var(--ink-2);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.card-count:empty{display:none}
.card-slider{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;border-radius:10px}
.card-slider::-webkit-scrollbar{display:none}
.card-slider:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.card-slide{flex:0 0 100%;min-width:0;scroll-snap-align:center;scroll-snap-stop:always}
.card-dots{display:flex;justify-content:center;gap:6px;margin-top:10px}
.card-dots:empty{display:none}
.card-dots button{width:7px;height:7px;padding:0;border:0;border-radius:999px;background:#ffffff40;transition:width .2s ease,background .2s ease}
.card-dots button.active{width:20px;background:var(--gold)}
@media(prefers-reduced-motion:reduce){.card-dots button{transition:none}}

/* Live game */
.game-app .metrics{gap:5px}
.game-app .metric{padding:7px 7px 6px;border:1px solid var(--line);border-radius:10px;background:#ffffff12;box-shadow:none}
.game-app .metric span{color:var(--ink-2);font-size:clamp(10px,2.7vw,13px);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-app .metric strong{font-size:clamp(14px,3.6vw,18px);font-weight:800}
.game-app .numbers-board{gap:2px;padding:5px;border:1px solid var(--line);border-radius:12px;background:#0000002e}
.game-app .numbers-board .number-cell,.game-app .numbers-board .letter{border-radius:5px}
.game-app .numbers-board .number-cell{background:#ffffff14;border-color:#ffffff10;color:#ece9fb}
.game-app .numbers-board .number-cell.active{background:var(--orange-2);border-color:var(--orange);color:#fff}
.game-app .numbers-board .number-cell.latest{background:var(--green-2);border-color:#6ee7b7;box-shadow:0 0 0 2px #6ee7b799}
.game-app .recent-calls,.game-app .ball-stage,.game-app .auto-control,.game-app .player-panel{border:1px solid var(--line);background:#ffffff0f;box-shadow:none}
.game-app .recent-calls,.game-app .ball-stage,.game-app .player-panel{border-radius:12px}
.game-app .ball-stage{background:radial-gradient(60% 70% at 50% 50%,#ffd32626 0,#ffd32600 70%),#ffffff0a}
.game-app .call-number{border-color:var(--gold);color:#6d28d9;box-shadow:0 0 0 6px #ffd3261f,0 10px 24px #0d082a80}
.game-app .player-panel{flex:none;padding:10px 7px}
.game-app .player-panel .card-head strong{font-size:15px}
.game-app .player-board{flex:none;grid-template-rows:none;gap:2px;border:0;border-radius:10px;background:transparent}
.game-app .player-board .letter{height:auto;padding:4px 0;border-radius:6px;font-size:13px}
.game-app .player-board .number-cell{height:auto;min-height:0;aspect-ratio:1;border-radius:6px;background:#f1f0fa;font-size:clamp(12px,3.4vw,15px);font-weight:750}
.game-app .player-board .number-cell.active{background:var(--green-2);box-shadow:inset 0 0 0 2px #6ee7b7}
.game-app .player-board .free{background:var(--green-2);font-size:10px}
.game-app .actions{grid-template-columns:1fr 1fr 2fr;gap:8px}
.game-app .actions button{min-height:52px;border-radius:14px;font-size:16px;font-weight:800}
.game-app .actions .leave{background:#ffffff12;border:1px solid #f43f5e73;color:#fda4af}
.game-app .actions .refresh{background:#ffffff12;border:1px solid var(--line-2);color:var(--ink)}
.game-app .actions .bingo{background:linear-gradient(160deg,#fde047,#f59e0b);color:#3b2600;font-size:20px;letter-spacing:.02em;box-shadow:0 10px 24px #f59e0b4d,inset 0 1px #ffffff80}
.game-app .actions .bingo:disabled{filter:grayscale(.6)}
#result{border-radius:22px;border:1px solid #ffd32659;background:linear-gradient(180deg,#3b2f86,#251d5a);box-shadow:0 0 0 100vmax #0b0820c4,0 24px 60px #000a}
.winner-chip{background:#ffffff14;border-color:var(--line-2)}
#winning-card{border-color:var(--line);background:#ffffff0d;border-radius:var(--r-card)}
.winner-cell.winning,.winner-cell.called.winning{background:var(--green-2)}
.winner-cell.called{background:var(--orange-2)}
.game-app .metric strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}
.game-app .metric:first-child strong{font-size:clamp(12px,3.3vw,17px)}
.game-app #recent{gap:3px}
.game-app .recent-ball{width:clamp(26px,7vw,38px);height:clamp(26px,7vw,38px);white-space:nowrap;letter-spacing:-.03em;font-size:clamp(8px,2.2vw,12px)}
.game-app .call-number{white-space:nowrap;font-size:clamp(22px,6.6vw,28px);letter-spacing:-.03em}

/* 2026-11 night theme for adult (21+) players: deep violet-black, neon pink/cyan/gold glows, heavier
   type and short, purposeful motion. Every animation stops under prefers-reduced-motion. */
:root{--bg-top:#1a0f45;--bg-bottom:#0c0720;--pink:#ec4899;--pink-2:#db2777;--violet:#8b5cf6;--cyan:#22d3ee;--tile:#ffffff0d;--tile-2:#ffffff17;--line:#ffffff1a;background:#0c0720}
.dashboard-app,.selection-app,.game-app{background:#140b33}
.gold{background:none;-webkit-background-clip:unset;background-clip:unset;color:var(--gold)}

/* Lobby hero */
.lobby-hero{position:relative;text-align:center;padding-top:28px}
.dashboard-app .welcome{margin:10px auto 10px;font-weight:900;text-shadow:0 6px 30px #8b5cf666}
.age-note{max-width:340px;margin:18px auto 0;color:var(--ink-3);font-size:12px;line-height:1.5;text-align:center}

/* Stake tiles: one color per stake, a soft glow and the live player count. */
.dashboard-app .stake-panel{border:1px solid var(--line);border-radius:var(--r-card);background:var(--tile);box-shadow:none}
.stake-tile{min-height:118px;overflow:hidden;isolation:isolate}
.stake-tile::after{content:"";position:absolute;inset:-40% -20% auto auto;width:120px;height:120px;border-radius:50%;background:#ffffff26;z-index:-1}
.stake-tile.stake-10{background:linear-gradient(150deg,#0e7490,#1d4ed8);box-shadow:0 12px 28px #1d4ed866,inset 0 1px #ffffff40}
.stake-tile.stake-20{background:linear-gradient(150deg,#db2777,#7c3aed);box-shadow:0 12px 28px #db277766,inset 0 1px #ffffff40}
.stake-tile.stake-50{background:linear-gradient(150deg,#fbbf24,#f97316);box-shadow:0 12px 28px #f9731666,inset 0 1px #ffffff66;color:#2a1600}
.stake-tile.stake-50 .stake-go{background:#2a160026}
.stake-tile.stake-100{background:linear-gradient(150deg,#059669,#0f766e);box-shadow:0 12px 28px #0f766e66,inset 0 1px #ffffff40}
.stake-amount{font-weight:900}
.stake-live{display:flex;align-items:center;gap:5px;padding:3px 8px;border-radius:999px;background:#00000038;font-size:11px;font-weight:800}
.stake-live::before{content:"";width:7px;height:7px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 0 #4ade80b3;animation:live-dot 1.6s ease-out infinite}
@keyframes live-dot{70%{box-shadow:0 0 0 6px #4ade8000}100%{box-shadow:0 0 0 0 #4ade8000}}

/* Navigation and headers */
.bottom-nav,body:has(.dashboard-app) .bottom-nav,body:has(.selection-app) .bottom-nav{background:#0e0826eb}
.bottom-nav a.active,body:has(.dashboard-app) .bottom-nav a.active,body:has(.selection-app) .bottom-nav a.active{background:linear-gradient(135deg,#ec489938,#8b5cf638);color:#fff;box-shadow:inset 0 0 0 1px #f472b64d}
#history-tab .page-hero h1,#wallet-tab .page-hero h1,#profile-tab .page-hero h1{font-weight:900}

/* Wallet, history and profile accents */
#wallet-tab .balance-row.balance-main{border-color:var(--line);background:var(--tile);box-shadow:none}
#wallet-tab .wallet-actions button{background:var(--gold);color:#1b1340;box-shadow:none}
#history-tab .total-card{border-color:var(--line);background:var(--tile)}
#profile-tab .profile-avatar{box-shadow:0 0 0 3px #ffd32633,0 0 18px #ffd32630,0 8px 16px #05021499}

/* Cartela selection */
.selection-app .selection-meta{background:#140b33d9}
.selection-app .selection-meta .countdown{border-color:#f472b673;background:#ec48991f}
.selection-app .selection-meta .countdown strong{color:#fbcfe8;text-shadow:0 0 18px #ec4899b3}
.selection-app .cartela-grid button.selected{box-shadow:inset 0 0 0 1px #6ee7b7,0 0 14px #10b98166}
.selection-app .cartela-grid button.bought{animation:bought .6s cubic-bezier(.3,1.6,.5,1)}
@keyframes bought{0%{transform:scale(.7)}60%{transform:scale(1.15)}100%{transform:scale(1)}}
.card-dots button.active{background:linear-gradient(90deg,#ffd326,#f472b6)}

/* Live game */
.game-app .numbers-board .number-cell.active{background:linear-gradient(160deg,#ec4899,#be185d);border-color:#f9a8d4;color:#fff}
.game-app .numbers-board .number-cell.latest{background:#ffd326;border-color:#fff3b0;color:#2a1600;box-shadow:0 0 0 2px #ffd32699,0 0 16px #ffd326b3}
.game-app .recent-ball{background:linear-gradient(160deg,#a78bfa,#6d28d9);box-shadow:inset 0 1px #ffffff59}
.game-app .ball-stage{background:radial-gradient(55% 65% at 50% 50%,#ec489933 0,#ec489900 70%),#ffffff08}
.game-app .call-number{box-shadow:0 0 0 6px #ffd32626,0 0 40px #ec489980,0 10px 24px #05021499}
.game-app .call-number.pop{animation:call-pop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes call-pop{0%{transform:scale(.6) rotate(-12deg)}60%{transform:scale(1.12) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
.game-app .player-board .number-cell.active{animation:daub .35s ease-out}
@keyframes daub{0%{transform:scale(.8)}70%{transform:scale(1.08)}100%{transform:scale(1)}}
.game-app .actions .bingo{background:linear-gradient(160deg,#ffe066,#ffb703 55%,#fb8500);box-shadow:0 0 0 1px #fff3b066,0 12px 30px #ffb70359,inset 0 1px #ffffffa6}
#result{border-color:#f472b673;background:radial-gradient(80% 50% at 50% 0,#ec489940 0,#ec489900 70%),linear-gradient(180deg,#2a1466,#140b33)}
#result h2{background:linear-gradient(90deg,#ffe066,#f472b6);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:900}
.confetti{position:fixed;inset:0;z-index:20;overflow:hidden;pointer-events:none}
.confetti i{position:absolute;top:-16px;width:8px;height:14px;border-radius:2px;animation:confetti-fall 2.5s cubic-bezier(.25,.6,.4,1) forwards}
@keyframes confetti-fall{to{transform:translate(var(--drift),105vh) rotate(var(--spin))}}

@media(prefers-reduced-motion:reduce){.stake-live::before,.selection-app .cartela-grid button.bought,.game-app .call-number.pop,.game-app .player-board .number-cell.active{animation:none}}
.game-app .player-panel h2{margin:18px 0 10px;font-size:18px}
.game-app .player-panel p{margin:0 4px 12px;color:var(--ink-2);font-size:14px;line-height:1.55}
.winner-cell.called{background:linear-gradient(160deg,#ec4899,#be185d);border-color:#f9a8d4}
/* Lobby figures, counted from finished rounds (app.lobby_stats). */
.lobby-stats{display:grid;gap:22px;max-width:440px;margin:16px auto 0;padding:26px 16px;border:1px solid var(--line-2);border-radius:20px;background:linear-gradient(120deg,#ffffff14,#ffffff05 45%,#8b5cf629);box-shadow:0 20px 44px #05021480,inset 0 1px #ffffff14;text-align:center}
.lobby-stats div{display:flex;flex-direction:column;gap:4px}
.lobby-stats strong{font-size:34px;font-weight:800;line-height:1.1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.lobby-stats span{color:#ddd6fe;font-size:15px;font-weight:500}
#wallet-tab .transaction-row.status-refunded{border-left:none}
#wallet-tab .transaction-status{display:none}
.status-refunded .transaction-status{background:#94a3b81f;color:#cbd5e1}
/* Loading: values shimmer until the first answer instead of showing 0 or Guest; tabs fade in. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.is-loading [data-skeleton],.is-loading [data-skeleton] *{color:transparent!important;-webkit-text-fill-color:transparent}
.is-loading [data-skeleton],.skeleton-card,.skeleton-row{background:linear-gradient(90deg,#ffffff0f 25%,#ffffff24 50%,#ffffff0f 75%) 0 0/200% 100%!important;border-color:transparent!important;box-shadow:none!important;animation:skeleton 1.2s linear infinite}
.is-loading [data-skeleton]{border-radius:8px}
.is-loading strong[data-skeleton],.is-loading h1[data-skeleton],.is-loading span[data-skeleton]{display:inline-block;min-width:4ch}
#profile-tab.is-loading .profile-avatar{border-radius:50%}
.skeleton-card{min-height:118px;border-radius:var(--r-card)}
.skeleton-row{min-height:56px;border-radius:0;border-bottom:1px solid #ffffff0a}
@keyframes skeleton{to{background-position:-200% 0}}
.is-loading [data-skeleton].profile-stat,.is-loading [data-skeleton].total-card{border-radius:16px}
.is-loading [data-skeleton].balance-row{border-radius:7px}
.is-loading [data-skeleton] img{opacity:0}
.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 20px 28px;gap:7px}
.empty-state img{opacity:.35;margin-bottom:6px;width:52px;height:52px}
.empty-state strong{font-size:15px;font-weight:700;color:#e8e3f5}
.empty-state p{margin:0;font-size:13px;line-height:1.5;color:#a5b4c9;max-width:220px}
.tab-enter{animation:tab-in .2s ease-out}
@keyframes tab-in{from{opacity:0;transform:translateY(6px)}}
.stake-tile.loading .stake-go{color:transparent;border:3px solid #ffffff59;border-top-color:#fff;background:none;animation:payment-spin .7s linear infinite}
.stake-tile.loading{filter:brightness(.92)}
body:has(.stake-tile.loading) .stake-tile:not(.loading){opacity:.6;pointer-events:none}
@media(prefers-reduced-motion:reduce){.is-loading [data-skeleton],.skeleton-card,.skeleton-row,.tab-enter,.stake-tile.loading .stake-go{animation:none}}
.selection-app .cartela-grid.locked button{opacity:.5;pointer-events:none}
.selection-app .cartela-grid.locked button.selected{opacity:1}
.selection-app .cartela-grid.capped button:not(.selected):not(.taken){opacity:.4}

/* Space for the iPhone home bar. Telegram's WebView reports 0 for env(); its own value arrives as
   --tg-safe-area-inset-bottom (Bot API 8.0), so the bottom menu, the sheets and the page end clear it. */
:root{--safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px))}
.rules-dialog.bottom-sheet{padding-bottom:calc(20px + var(--safe-bottom));max-height:calc(min(88dvh,var(--tg-viewport-stable-height,100dvh)) - 12px)}
dialog::backdrop{background:#05030cb3;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}

/* Bottom sheets: registration, How to Play and Telebirr payments share one design (night theme, a gold,
   violet or green badge, a round close button, soft cards and full-width buttons). Later than the older
   .rules-dialog and #payment-* rules, and more specific where those use ids. */
.rules-dialog.bottom-sheet.app-sheet{padding:10px 18px calc(22px + var(--safe-bottom));border-radius:26px 26px 0 0;border:1px solid #ffffff1f;border-bottom:0;background:#221a4b;box-shadow:0 -24px 60px #05030ce6;color:#f3f0fb;scroll-behavior:smooth}
@media(min-width:521px){.rules-dialog.bottom-sheet.app-sheet{border-bottom:1px solid #ffffff1f}}
.app-sheet .sheet-handle{width:40px;height:5px;margin:0 auto 16px;background:#ffffff47}
.sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.sheet-head h2{flex:1;min-width:0;margin:0;font-size:21px;line-height:1.25;letter-spacing:-.3px;color:#fff}
.sheet-badge{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:14px}
.sheet-badge.is-gold{color:#1b1340;background:#f5a524}
.sheet-badge.is-violet{color:#fff;background:#6d4ae8}
.sheet-badge.is-green{color:#fff;background:#059669}
.sheet-close,#payment-sheet #payment-close.sheet-close{display:grid;place-items:center;flex:none;width:38px;height:38px;min-width:0;min-height:0;padding:0;border:1px solid #ffffff24;border-radius:50%;background:#ffffff14;color:#e9e4f7;font-size:inherit;cursor:pointer;transition:background-color .15s}
.sheet-close:hover,.sheet-close:active{background:#ffffff26}
.app-sheet p,.app-sheet li{font-size:14px;line-height:1.6;color:#ddd6f3}
.sheet-note{margin:0 0 16px;padding:12px 14px;border-radius:12px;border:1px solid #ffffff0f;background:#0000002e;font-size:13px!important;line-height:1.55!important;color:#bdb5d6!important}
.sheet-note.has-icon{display:flex;align-items:flex-start;gap:10px}
.sheet-note svg{flex:none;margin-top:2px;color:#9d92c4}
.sheet-actions{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.sheet-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;padding:12px 16px;border-radius:14px;border:1px solid transparent;font:inherit;font-size:16px;font-weight:700;text-decoration:none;cursor:pointer;transition:transform .12s,filter .12s}
.sheet-btn:active{transform:scale(.98)}
.sheet-btn:disabled{opacity:.6;cursor:default;transform:none}
.sheet-btn.is-telegram{color:#fff;background:#1f93d8}
.sheet-btn.is-primary{color:#1b1340;background:var(--gold)}
.sheet-btn.is-ghost{color:#e9e4f7;background:#ffffff0f;border-color:#ffffff26}

/* Registration: numbered steps. */
.register-sheet .register-lead{margin:0 0 14px;font-size:15px;line-height:1.55;color:#ddd6f3}
.register-steps{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:8px}
.register-sheet .register-steps li{display:flex;align-items:flex-start;gap:12px;margin:0;padding:12px 14px;border:1px solid #ffffff14;border-radius:14px;background:#ffffff0a;font-size:14px;line-height:1.5;color:#f3f0fb}
.step-num{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#5b46e8;color:#fff;font-size:13px;font-weight:700}
.register-steps a{color:#7cc4ff;font-weight:700;text-decoration:none;border-bottom:1px solid #7cc4ff66}
.register-sheet .sheet-note{margin-bottom:18px}

/* How to Play: the header and section tabs stay at the top while the rules scroll beneath them. */
.rules-dialog.bottom-sheet.app-sheet.rules-sheet{padding-top:0}
.sheet-top{position:sticky;top:0;z-index:3;margin:0 -18px 6px;padding:10px 18px 12px;background:#2c2260f0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid #ffffff12}
.sheet-top .sheet-head{margin-bottom:12px}
.sheet-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;border-radius:12px;border:1px solid #ffffff12;background:#00000038}
.sheet-tabs a{display:flex;align-items:center;justify-content:center;min-height:36px;padding:6px 4px;border-radius:9px;color:#bdb5d6;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background-color .15s,color .15s}
.sheet-tabs a.is-active{color:#1b1340;background:#f5a524}
.rules-sheet .rules-section{scroll-margin-top:164px}
.rules-sheet .rules-section>h2{margin:18px 0 10px;font-size:17px;letter-spacing:-.2px;color:#ffd326}
.rules-sheet article{margin:0;padding:14px 0;border:none;border-top:1px solid #ffffff14;background:none;border-radius:0;box-shadow:none}
.rules-sheet article:first-of-type{border-top:none}
.rules-sheet article h3{margin:0 0 6px;font-size:15px;line-height:1.35;color:#fff}
.rules-sheet article h3:not(:first-child){margin-top:16px}
.rules-sheet article p{margin:0 0 8px}
.rules-sheet article>:last-child{margin-bottom:0}
.rule-list{list-style:none;margin:8px 0 10px;padding:0;display:flex;flex-direction:column;gap:8px}
.app-sheet .rule-list li{position:relative;padding-left:28px}
.rule-list li::before{content:"";position:absolute;left:0;top:2px;width:18px;height:18px;border-radius:50%;font-size:11px;font-weight:800;line-height:18px;text-align:center}
.rule-list.is-good li::before{content:"\2713";color:#34d399;background:#10b98126}
.rule-list.is-bad li::before{content:"\2715";color:#fb7185;background:#f43f5e26}
.rule-list.is-tips li::before{top:8px;left:6px;width:7px;height:7px;background:#ffd326;box-shadow:0 0 8px #ffd32699}
.rules-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.rules-facts div{padding:10px 12px;border-radius:12px;border:1px solid #ffffff0f;background:#00000029}
.rules-facts strong{display:block;font-size:12px;font-weight:600;color:#a99fd0}
.rules-sheet .rules-facts p{margin:2px 0 0;font-size:14px;font-weight:650;line-height:1.4;color:#fff}
.rules-sheet .pattern-list{margin:10px 0;gap:8px}
.rules-sheet .pattern-list li{padding:10px 12px;border-radius:12px;border:1px solid #ffffff0f;background:#00000029}
.rules-sheet .pattern-list strong{color:#fff}
.rules-sheet .pattern-card{width:48px;height:48px}
.rules-sheet .pattern-card .off{fill:#ffffff1f}
.rules-sheet .pattern-card .on{fill:#ffd326}
.rules-sheet .pattern-card .free{fill:#ec4899;stroke:none}
.rules-sheet .sheet-actions{margin-top:14px}

/* Telebirr payments. */
#payment-form.sheet-form{display:flex;flex-direction:column;gap:14px;margin:0 0 6px}
.sheet-field{display:flex;flex-direction:column;gap:6px}
#payment-form .sheet-field label{font-size:13px;font-weight:650;color:#cfc8ea}
#payment-sheet #payment-form .sheet-field input{width:100%;min-height:52px;padding:12px 14px;border:1px solid #ffffff24;border-radius:14px;background:#00000038;color:#fff;font:inherit;font-size:16px}
#payment-sheet #payment-form .sheet-field input::placeholder{color:#8f86b5}
#payment-sheet #payment-form .sheet-field input:focus,#payment-sheet #payment-form .sheet-field input:focus-visible{outline:none;border-color:#a78bfa;box-shadow:0 0 0 3px #8b5cf640}
#payment-form .sheet-btn{margin-top:4px}
.sheet-status{margin:10px 0 0;font-size:13px!important;line-height:1.5;color:#fcd34d!important}
#payment-waiting.sheet-waiting{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:4px;padding:22px 16px 16px;border-radius:16px;border:1px solid #ffffff12;background:#0000002e;text-align:center;line-height:1.55}
#payment-waiting.sheet-waiting p{margin:0}
#payment-waiting-cancel.sheet-btn{min-width:0;margin:0}

/* Bottom menu: the open page is marked by a gold stripe along the top and a gold icon and label, with no
   card or gradient behind it. Icons are masks of the Lucide files, so they take the label's colour. */
.bottom-nav a,body:has(.dashboard-app) .bottom-nav a,body:has(.selection-app) .bottom-nav a{position:relative;border-radius:0;background:none;box-shadow:none;color:var(--ink-3);transition:color .16s ease}
.bottom-nav a:hover{color:var(--ink-2)}
.bottom-nav a.active,body:has(.dashboard-app) .bottom-nav a.active,body:has(.selection-app) .bottom-nav a.active{background:none;box-shadow:none;color:var(--gold)}
.bottom-nav a.active::before{content:"";position:absolute;top:-6px;left:50%;width:36px;height:3px;transform:translateX(-50%);border-radius:0 0 4px 4px;background:var(--gold);box-shadow:0 2px 10px #ffd32673}
.nav-icon{display:block;width:22px;height:22px;background-color:currentColor;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.nav-icon-gamepad-2{--icon:url(/static/icons/gamepad-2.svg)}
.nav-icon-history{--icon:url(/static/icons/history.svg)}
.nav-icon-wallet{--icon:url(/static/icons/wallet.svg)}
.nav-icon-user-round{--icon:url(/static/icons/user-round.svg)}

/* On phones, every page but the home page shows its content about 12% smaller, and the called-numbers board of a
   live round uses wider, shorter cells (its height follows the screen width, which zoom does not change), so the
   wallet, the cartela board and a live round fit a medium phone above the bottom menu. Headers, the menu and the
   bottom sheets keep their size: iPhones zoom the page into a text box whose text is under 16px. */
@media(max-width:430px){
#history-tab,#wallet-tab,#profile-tab,.selection-app>:not(.topbar):not(.bottom-nav),.game-app>:not(.app-header){zoom:.88}
.game-app .numbers-board .number-cell,.game-app .numbers-board .letter{aspect-ratio:1.15}
}
.game-app{padding-bottom:calc(92px + var(--safe-bottom))}
.game-app .metric small{display:block;margin-top:1px;color:#c4b5fd;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.winner-chip.is-house{background:#8b5cf633;border-color:#c4b5fd}
/* The Derash on the cartela page: the prize so far, updated as cartelas are picked. */
.derash-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 10px;padding:9px 14px;border:1px solid #ffd32659;border-radius:12px;background:linear-gradient(90deg,#ffd32624,#ffd32608)}
.derash-strip>span{color:var(--ink-2);font-size:13px;font-weight:700;letter-spacing:.02em}
.derash-strip>span small{display:block;margin-top:2px;color:var(--ink-2);font-size:11.5px;font-weight:700;letter-spacing:0}
.derash-strip strong{color:var(--gold);font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.derash-strip small{color:var(--ink-2);font-size:12px;font-weight:700}
.derash-strip.bump strong{animation:derash-bump .45s ease}
@keyframes derash-bump{50%{transform:scale(1.12)}}
@media(prefers-reduced-motion:reduce){.derash-strip.bump strong{animation:none}}
/* Several cartelas show at once, one under the other, each with its number (cartela and game pages). */
.card-stack{display:flex;flex-direction:column;gap:14px}
.card-stack .card-slide{flex:none}
.game-app .game-layout{align-items:stretch}
.card-stack-title{margin:0 2px 6px;color:var(--ink-2);font-size:13px;font-weight:700}
