/* Shared visual system. Outcome, price and balance logic stay on the server. */
:root,:root[data-theme="dark"]{--bg:#0b1522;--bg2:#101e2e;--card:#152739;--card2:#1c3044;--line:#30485c;--muted:#a7b9c9;--text:#f1f7fc;--brand:#63d6ff;--brand2:#258ad9;--shadow:0 16px 40px #0003;--radius:20px;--studio-edge:#ffffff0d}
:root[data-theme="light"]{--bg:#eef4fa;--bg2:#e4edf5;--card:#fff;--card2:#f2f7fb;--line:#cbdbe8;--muted:#50687a;--text:#122b40;--brand:#0875ad;--brand2:#075d96;--shadow:0 12px 32px #173b5512;--studio-edge:#fff}
body{background:var(--bg);color:var(--text);font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.num,.money,.odd,.odds,.fm-odds,.lv3-odds{font-variant-numeric:tabular-nums lining-nums}
.card,.p128-menu-group,.p128-stats,.p128-profile,.pay-history-entry{border-color:var(--line);box-shadow:inset 0 1px var(--studio-edge),var(--shadow)}
.btn{min-height:46px;border-radius:14px;font-weight:700;transition:background-color .18s,box-shadow .18s,transform .18s}
.btn:active:not(:disabled){transform:translateY(1px) scale(.985)}
.btn:disabled{cursor:default;box-shadow:none}
.inp{min-height:48px;background:var(--bg2);border:1px solid var(--line);border-radius:14px;color:var(--text)}
.sheet{border:1px solid var(--line);box-shadow:0 -20px 70px #0005}
.sheet h3,.p128-section-head h2{letter-spacing:-.03em}
.p128-page-title{padding-block:14px 20px}.p128-page-title h1{font-size:clamp(26px,6vw,36px);line-height:1.4;letter-spacing:-.04em}
.p128-page-title small,.p128-section-head small{color:var(--muted);letter-spacing:.12em}
.p128-wallet{border-radius:26px;border:1px solid #72dfff44;box-shadow:0 18px 48px #03172733,inset 0 1px #ffffff20;background:radial-gradient(ellipse at 0 0,#21769966,transparent 65%),linear-gradient(125deg,#153f56,#0c2036);color:#edfaff}
.p128-wallet strong,.p128-wallet b{font-variant-numeric:tabular-nums}
.p128-wallet .btn{min-height:50px}.p128-profile{border-radius:24px;overflow:hidden}
.p128-menu-link{min-height:72px}.p128-menu-icon{border-radius:15px}
.p128-stats-grid>div{padding:16px 12px;border-radius:15px;background:var(--bg2)}
.p128-stats-grid strong{font-size:24px;letter-spacing:-.03em}
.p128-shortcuts>a{min-height:70px;border-radius:18px;border:1px solid var(--line);background:var(--card)}
.p128-slide-art{filter:drop-shadow(0 12px 20px #0005)}
.p128-slide-art.art-multisport146{background-image:url('../img/sports146.svg');background-size:contain;background-position:center;background-repeat:no-repeat}
.ms146-price{display:block;font-size:24px;font-variant-numeric:tabular-nums}
.ms146-teams{direction:ltr;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.ms146-teams>div{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}
.ms146-teams small{color:var(--win);font-size:13px}.ms146-vs{font-size:clamp(16px,4vw,22px);font-weight:800;white-space:nowrap;border:0;padding:4px}
.ms146-crest{display:grid;place-items:center;width:56px;height:56px;color:var(--brand);font-size:26px;font-weight:800;background:transparent}
.ms146-crest img{max-width:52px;max-height:52px;object-fit:contain;filter:drop-shadow(0 3px 5px #0002)}
.ms146-race{display:flex;flex-direction:column;gap:8px;padding:24px 0}.ms146-race b{font-size:22px}.ms146-race span{font-size:15px;color:var(--muted)}
.ms146-picks{direction:ltr}.ms146-picks button{direction:auto;white-space:normal;overflow-wrap:anywhere}
.p128-slider{border-radius:26px;isolation:isolate;box-shadow:0 20px 45px #06142626}
.p128-slider-footer button{min-width:44px;min-height:44px}
.p128-home .p128-slider-footer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}
.p128-home .p128-slider-footer .dots{display:flex;min-width:0;gap:2px;justify-content:space-between}
.p128-home .p128-slider-footer .dots button{min-width:0;width:auto;flex:1;min-height:44px;display:grid;place-items:center}
.odd,.fm-odds>button,.lv3-odds>button{border-radius:14px;border-color:var(--line);font-variant-numeric:tabular-nums}
.odd{min-height:56px}.odd b,.odd strong{font-size:20px;font-weight:800}
.odd:focus-visible{outline-offset:-4px}.match,.match126{border-radius:22px}
.ad-nav{gap:8px;padding-block:10px}.ad-nav a,.ad-nav button{min-height:44px;border-radius:12px}
.bank-admin-row,.pay-history-entry{border-radius:16px;margin-block:10px;padding:16px}
.pay-history-entry small,.pay-history-entry time{font-size:13px;color:var(--muted)}
.pay-history-entry b{font-variant-numeric:tabular-nums}
.cp142-card{border-radius:22px}.cp142-card p{line-height:1.9}
.gf-console{padding:10px 14px;margin-block:8px;border-radius:17px}
.ms146-nav{display:flex;gap:8px;overflow-x:auto;padding:8px 0 16px;scrollbar-width:thin}
.ms146-nav a{flex:none;display:flex;align-items:center;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:14px;color:var(--muted);background:var(--card);text-decoration:none;font-size:14px;font-weight:700}
.ms146-nav a[aria-current]{color:var(--text);border-color:var(--brand);box-shadow:inset 0 -3px var(--brand)}
.ms146-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 20px}.ms146-heading h1{margin:0;font-size:28px}.ms146-heading small,.ms146-updated{font-size:13px;color:var(--muted)}
.ms146-heading label{font-size:13px;color:var(--muted);max-width:48%}.ms146-date{display:block;width:100%;margin-top:4px;font-size:14px}
.ms146-empty{padding:24px 18px}.ms146-empty p{color:var(--muted);font-size:14px}.ms146-match{padding:18px;margin-bottom:14px}.ms146-league{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}
.ms146-teams{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;text-align:center;padding:25px 0}.ms146-teams b{font-size:16px;overflow-wrap:anywhere}.ms146-vs{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:30px;padding:5px 8px}.ms146-match time{font-size:14px;color:var(--muted)}.ms146-market-note{padding:12px;background:var(--bg2);border-radius:12px;color:var(--muted);font-size:14px;margin:12px 0 0}
.gf-top{min-height:32px}.gf-steps{margin:6px 0 0}.gf-hint{margin:6px 0 0;font-size:14px;line-height:1.65}
.bj139-terms{padding:12px 16px;font-size:13px;line-height:1.8;margin-block:8px}
.bj139-terms summary{min-height:32px;display:flex;align-items:center}
.ui-game[data-game="bj"] .bj134 .bjx-t{padding-top:48px!important}
.bj134 .bjx-mid{height:76px}.bj134 .bjx-emb{margin-top:10px;width:48px;height:48px}
/* Game rooms use a private dark palette so table labels remain legible in either app theme. */
[data-game][data-room]{--room-light:#85ddff;--room-floor:#0a2032;--room-ceiling:#17354c;--room-border:#49768a;--room-ink:#f2f9ff}
[data-game][data-room="emerald"],[data-game][data-room="persian"]{--room-floor:#073c33;--room-ceiling:#0d5648;--room-border:#a08750;--room-light:#c6e7b1}
[data-game][data-room="jungle"]{--room-floor:#063b3b;--room-ceiling:#155a50;--room-border:#4d9c8c;--room-light:#71f3c6}
[data-game][data-room="ruby"],[data-game][data-room="temple"]{--room-floor:#35142c;--room-ceiling:#54283c;--room-border:#ba8b57;--room-light:#ffcd8e}
[data-game][data-room="neon"],[data-game][data-room="cosmos"]{--room-floor:#171733;--room-ceiling:#302450;--room-border:#77659d;--room-light:#c3a3ff}
[data-game][data-room="country"],[data-game][data-room="racetrack"]{--room-floor:#19372d;--room-ceiling:#314d37;--room-border:#947a51;--room-light:#ffd994}
[data-game][data-room="walnut"]{--room-floor:#38281e;--room-ceiling:#593d29;--room-border:#b59162;--room-light:#f5d4a8}
[data-game][data-room="marble"]{--room-floor:#173137;--room-ceiling:#28454b;--room-border:#739896;--room-light:#c4ede0}
[data-game] .room-surface{position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--room-border);border-radius:24px;background-color:var(--room-floor);background-image:radial-gradient(ellipse at 50% 0,#ffffff0d,transparent 65%),linear-gradient(155deg,var(--room-ceiling),var(--room-floor));box-shadow:inset 0 0 0 5px #00000012,inset 0 1px #ffffff18,0 16px 30px #0003;color:var(--room-ink)}
[data-game] .room-surface::after{content:"";position:absolute;inset:8px;border:1px solid #ffffff0b;border-radius:18px;pointer-events:none;z-index:0}
[data-game] .stage.room-surface,[data-game] .pk3-table.room-surface{--text:#f2f9ff;--muted:#bfd2df;--line:#4d6c7d;--card:#153346;--card2:#214155;--bg2:#0e2734;--bg:#102334}
[data-game] .bj-st,[data-game] .mines-st{border-radius:20px}
[data-game="bj"] .room-surface{background-image:radial-gradient(ellipse at 50% 30%,#216956,#073b32 75%);border:3px solid #756443;box-shadow:inset 0 0 0 4px #162f27,inset 0 0 50px #001c15,0 18px 35px #0004}
[data-game="mines"] .mines-grid{gap:8px;padding:12px;background:linear-gradient(155deg,#133d45,#08232d);border-radius:22px;box-shadow:inset 0 1px #ffffff17}
[data-game="mines"] .mines-grid button{border-radius:15px;box-shadow:inset 0 1px #ffffff20,0 4px 8px #0002;transition:transform .16s,background .16s,box-shadow .16s}
[data-game="mines"] .mines-grid button:active:not(:disabled){transform:scale(.94)}
[data-game] .g-hist{scrollbar-width:thin}
@media(max-width:380px){.btn{padding-inline:12px}.p128-wallet{border-radius:22px}[data-game] .room-surface{border-radius:19px}[data-game="mines"] .mines-grid{gap:6px;padding:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
