/* Cosmic Buddies — approved cute space concept. Static scenery keeps play fast. */
:root{--bg:#050c22;--panel:#111c3b;--cyan:#37f4d0;--mint:#37f4c2;--purple:#ad90fa;--gold:#ffcf65;--muted:#a5b0d4;--line:#3b507b;color-scheme:dark}
body{background:#03091c;color:#f5f6ff;font-family:'B369 Khmer','Khmer Sangam MN','Noto Sans Khmer',system-ui,sans-serif;font-size:14px}
button{border-color:#40577e;border-radius:12px;background:linear-gradient(135deg,#1c2b51,#0a1531);font-weight:700;min-height:44px;box-shadow:inset 0 1px #c7d7ff0b}button:hover{border-color:#4af6d6}button:disabled{opacity:.48}button:focus-visible{outline-color:#74ffe4}
.primary,.gold,.mint,.purple{background:linear-gradient(120deg,#56ffcc,#1ae8c4);border:1px solid #82ffe3;color:#051e2f;box-shadow:inset 0 1px #e1fff955,0 3px 9px #0003}
small,.muted{color:#a7b6d6}.progress{height:7px;border:1px solid #324a6f;background:#060e27;border-radius:20px;overflow:hidden}.progress i,.progress.purple i{background:linear-gradient(90deg,#13d7c6,#62f6aa);box-shadow:none}.tabs{padding:2px;background:#101b39;border:1px solid #3a5075;border-radius:12px;gap:2px;margin:16px 0}.tabs button{border:0;border-radius:10px;background:none;min-height:44px;font-size:13px;color:#bdc8e6}.tabs button.active{background:linear-gradient(120deg,#54fbd2,#18e7c6);color:#062039;border:0;box-shadow:none}
input,textarea,select{background:#07142f;border-color:#2c476d;min-height:48px;font-size:16px}.badge{background:#102842;border-color:#376d84;color:#61ebdf;font-size:10px}.coin{color:#ffdc80;font-size:13px}.coin:before{width:18px;height:18px;margin-right:4px;color:#fff4b4;background:radial-gradient(circle at 35% 25%,#fff1ad,#ffc449 50%,#cb7d15);border-color:#ffea94;box-shadow:inset 0 0 0 2px #da991f;text-shadow:none;content:'★';font-size:9px}.coin-pill{display:inline-flex;align-items:center;gap:7px;min-height:36px;background:#102348;border:1px solid #3b547d;border-radius:10px;padding:6px 9px;color:#f8f7ff;font-size:13px}.coin-plus{display:grid;place-items:center;background:#4dfad0;color:#052538;width:20px;height:20px;font-size:17px;line-height:1;border-radius:5px}.xp-chip{font-size:10px;color:#b995ff;display:block;white-space:nowrap}
.shell{position:relative;max-width:520px;padding:14px 14px calc(95px + var(--safe));background:linear-gradient(#030a2088,#030b22e8 78%),url('/assets/cosmic-background.webp') center top/cover fixed;border-color:#1d4260;min-height:100dvh}
.shell .topbar{gap:8px;margin-bottom:15px;min-height:42px}.topbar .brand,.brand{font-family:Arial,system-ui,sans-serif;font-style:italic;font-weight:900;letter-spacing:-1.2px;color:#f9fcff;text-shadow:0 2px 0 #284c86;font-size:27px}.brand span{color:#ffd66c;text-shadow:0 2px 0 #874d42}.topbar .icon-button{background:none;border:0;padding:7px;box-shadow:none}.header-settings{width:36px;min-width:36px!important}.cosmic-topbar .coin-pill{margin-left:auto}.cosmic-topbar .brand{font-size:22px}.shell[data-page=home]>.topbar{display:none}
.cosmic-identity{display:flex;gap:8px;align-items:center;border:1px solid #314d76;border-radius:13px;padding:7px;background:linear-gradient(115deg,#142647,#0c1830)}.club-player{border:0;box-shadow:none;background:none;display:flex;align-items:center;gap:9px;margin:0;padding:0;min-width:0;flex:1;text-align:left}.club-player .avatar{width:45px;height:45px}.club-player strong{font:800 15px system-ui}.player-xp{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}.player-xp .progress{flex:1;min-width:50px;max-width:150px;margin:4px 0}.player-xp small{font-size:10px;font-weight:700}.player-xp>span{font-size:8px;color:#a7b4d7;width:100%;text-align:right;line-height:1}.avatar{border:2px solid #65e9fb;background:#253357;box-shadow:0 0 0 2px #3d619530}.lobby-brand{position:relative;display:flex;align-items:center;justify-content:center;height:88px;margin:0;background:url('/assets/cosmic-background.webp') center 35%/cover;border-radius:14px}.lobby-brand .brand{font-size:42px;letter-spacing:-2.5px;transform:rotate(-3deg);text-shadow:0 3px 0 #24417e,0 7px 15px #000a}.lobby-brand .icon-button{position:absolute;right:0;top:5px;min-width:35px;min-height:35px;padding:6px;background:none;border:0}.resume-match{margin:8px 0}
.feature{position:relative;aspect-ratio:2.15;min-height:0;padding:0;border:1px solid #51eddf;border-radius:17px;display:block;overflow:hidden;background:#0a1635 url('/assets/cosmic-hero.webp') center/cover}.feature:before{display:none}.feature-top{display:none}.feature-copy{position:absolute;left:48%;right:12px;top:16px;bottom:10px;display:flex;flex-direction:column;justify-content:center;gap:8px}.feature-copy h1{font-size:0;line-height:0;margin:0}.feature-copy h2{font:850 clamp(20px,5.8vw,28px)/1.12 system-ui;color:#fff;text-shadow:0 2px 8px #000}.feature-copy small{font-size:9px;color:#b4d3dc}.feature .hero-play{display:flex;align-items:center;justify-content:center;gap:16px;margin:0;border-radius:25px;width:100%;max-width:none;min-height:44px;height:44px;font:800 21px/1 system-ui;color:#062538;padding:7px}.hero-play span{font:30px/1 Arial}.modes{gap:8px;margin:11px 0}.mode-card{position:relative;min-height:0;height:auto;aspect-ratio:.95;padding:0;overflow:hidden;border:1px solid #53d6e5;border-radius:14px;background:#0b1b3a;display:flex;align-items:stretch;justify-content:flex-end}.mode-card.eight,.mode-card.practice{background:#0b1b3a;border-color:#53d6e5}.mode-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 38%;opacity:1}.mode-card>div{position:relative;display:flex;align-items:center;justify-content:space-between;padding:8px 8px;width:100%;background:#061a31e0;border-top:1px solid #43aec469;border-radius:0}.mode-card strong{font:750 14px/1.3 system-ui;color:#fff}.mode-card>div>span{font-size:24px;line-height:16px;color:#98fcff}.social-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0}.social-play{gap:8px;padding:9px 8px;min-height:62px;background:linear-gradient(110deg,#192447,#101a35);border-color:#526087;border-radius:12px;display:flex;text-align:left;align-items:center}.social-play .icon{width:29px;height:29px;color:#4edafa;fill:#22c8d722}.social-play:last-child .icon{color:#ffc75d;fill:#eeb64522}.social-play strong{font-size:12px;display:block}.social-play small{font-size:9px;display:block}.club-actions{display:flex;justify-content:center;gap:18px;opacity:1;margin:3px 0}.club-actions button{min-height:36px;font-size:10px;background:none;border:0;color:#a9bfdd;padding:4px}.club-actions .icon{width:17px;height:17px;color:#ffc963}
.nav{width:calc(100% - 24px);max-width:496px;left:50%;transform:translateX(-50%);bottom:calc(8px + var(--safe));border:1px solid #47577e;border-radius:14px;padding:8px 2px 5px;background:linear-gradient(135deg,#162748f8,#081329f8);box-shadow:0 5px 14px #0007;min-height:63px}.nav button{font-size:9px;gap:5px;color:#9cadd1;min-height:44px;border:0;border-radius:10px;background:none;padding:3px;box-shadow:none}.nav button.active{color:#34f4d1;background:none;text-shadow:none}.nav button.active:before{display:none}.nav .icon{width:25px;height:25px;fill:currentColor;stroke-width:1.4}.nav button.active .icon{filter:drop-shadow(0 0 5px #2cf4d433)}
.panel,.empty,.friend,.mission-card,.history-row,.product{border:1px solid #354e76;background:linear-gradient(125deg,#172546cc,#0b1732e6);border-radius:14px;box-shadow:inset 0 1px #a9bdff0b}.section-title{margin:13px 0 12px;gap:8px}.section-title h1,.shell>h1{font:800 24px/1.3 system-ui}.section-title h2{font:800 20px/1.4 system-ui}.section-title .primary{font-size:12px;padding:8px 11px;min-height:44px;display:flex;gap:6px;align-items:center}.section-title .icon{width:18px;height:18px}.text-button{margin:0;background:none;border:0;min-height:44px;box-shadow:none;font-size:12px;color:#45e9e0;padding:6px}.stack{gap:8px}.empty{padding:20px 13px;font-size:12px;line-height:1.8;text-align:center;color:#b8c5df}.friend{padding:8px;gap:9px;display:flex;align-items:center;min-height:70px}.friend .avatar{width:42px;height:42px}.friend .identity strong{font-size:13px}.friend .identity>small{font-size:9px}.friend .identity>br{display:none}.friend-actions{display:flex;gap:4px}.friend-actions button{font-size:11px;min-height:44px;padding:7px 9px}.friend-actions button:first-child:not(.primary){width:34px;min-width:34px;background:none;border:0;padding:4px}.friend-actions button:first-child:not(.primary) .icon{width:19px}.friend-tabs{margin:10px 0}.friend-tabs button{font-size:12px}.friend-list{margin:10px 0}.dot{background:#3ce9b3}.dot.playing{background:#ffc15b}.dot.offline{background:#fa718d}.chat-preview{display:flex;align-items:center;gap:9px;min-height:67px;padding:8px 10px;text-align:left;border:1px solid #273f64;border-radius:12px;background:#111d3be0}.chat-preview .avatar{width:37px;height:37px}.chat-preview strong{font-size:13px}.chat-preview small{font-size:11px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:230px}.chat-preview>span{color:#52f1d8;font-size:24px}.chat-list .chat-preview:last-child{margin-bottom:10px}
.mission-buddy{width:65px;height:65px;object-fit:contain;position:absolute;right:17px;top:65px;pointer-events:none;opacity:.8;border-radius:30px}.shell[data-page=missions]>.tabs{position:relative;margin-bottom:25px;max-width:85%}.mission-card{display:flex;align-items:center;gap:9px;padding:10px 9px;min-height:92px}.mission-art{flex:0 0 48px;width:48px;height:57px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(150deg,#1b3560,#060f27)}.mission-art img{width:100%;height:100%;object-fit:cover;border-radius:9px}.mission-art>.icon{color:#ffc74f;fill:#d19b3022;width:34px;height:34px}.mission-ball{width:37px;height:37px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 30% 25%,#ff8f8f,#e83646 55%,#730b23);font:800 22px Arial;color:#fff;box-shadow:0 2px 5px #000}.mission-main{min-width:0;flex:1}.mission-card h3{font:700 12px/1.4 system-ui}.mission-progress{display:flex;align-items:center;gap:6px;margin:7px 0}.mission-progress .progress{flex:1;margin:0;height:6px}.mission-progress small{font:10px Arial;white-space:nowrap}.mission-card .reward{display:flex;align-items:center;gap:10px;margin:0;font-size:10px}.mission-card .coin{font-size:11px}.mission-card .coin:before{width:14px;height:14px;font-size:7px}.mission-card button{font-size:11px;padding:8px 10px;min-height:44px;min-width:56px}.mission-card.done{border-color:#337f82;background:linear-gradient(125deg,#172b43,#0d1c36)}.daily-card{display:flex;width:100%;align-items:center;gap:10px;margin:14px 0;text-align:left;background:linear-gradient(110deg,#263660,#121b37);padding:12px}.daily-card .icon{width:32px;height:32px;color:#ffca63}.daily-card div{flex:1}.daily-card strong,.daily-card small{display:block}.daily-card>span{font-size:24px;color:#53f3ce}
.profile-head{position:relative;margin:0;padding:20px 13px 13px;border:1px solid #385174;border-radius:17px;background:linear-gradient(90deg,#0d1b3bcc,#0a163555),url('/assets/cosmic-background.webp') center 25%/cover}.profile-head .avatar.big{width:77px;height:77px;border-color:#69e9ff;box-shadow:0 0 0 4px #25457e55}.profile-head h1{font:800 22px/1.4 system-ui}.profile-head .identity>strong{font-size:14px}.profile-head .player-xp{margin-top:5px;gap:5px;flex-wrap:nowrap}.profile-head .player-xp small{font-size:8px}.profile-head>small{display:block;margin-top:8px;font-size:9px}.profile-head .coin-pill{padding:5px 7px;font-size:10px}.profile-head .coin{font-size:11px}.bio{margin-top:5px;font-size:11px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:13px 0;border:1px solid #2c4469;border-radius:12px;background:#0b1734;overflow:hidden}.stat{border:0;border-radius:0;background:none;border-right:1px solid #2c4469;padding:13px 3px;display:flex;flex-direction:column;align-items:center;text-align:center}.stat:last-child{border:0}.stat .icon{width:25px;height:25px;fill:#ffc54b55;color:#ffd368;margin-bottom:7px}.stat strong{font-size:20px;color:#fff;order:3}.stat small{font-size:9px;order:2;color:#c2ceeb}.profile-extra{margin:15px 0;border:1px solid #2f456b;border-radius:12px;background:#0c1830;padding:10px}.profile-extra summary{min-height:44px;display:flex;align-items:center;font-size:12px;color:#a8c5df;cursor:pointer}.profile-extra .stack{margin:10px 0}.profile-extra .achievement{flex:1;padding:8px}.history-row{display:flex;align-items:center;gap:9px;padding:11px 10px;min-height:70px;background:#0b1834}.history-row .identity strong{font-size:12px;color:#50f2d4}.history-row .identity small{font-size:10px}.history-row .coin{font-size:11px}.history-symbol{font-size:22px;width:28px;color:#fa7493}.history-row .delta{font-size:11px}.result-badge.win{color:#4bf4c5}.result-badge.loss{color:#fd778c}
.shop-subtitle{margin:16px 0 10px;font:750 17px system-ui}.shop-grid,.signature-grid,.legacy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.product,.product.signature,.product.signature.cue,.product.cue{grid-column:auto;padding:9px 6px;border-color:#375271;background:linear-gradient(145deg,#0f2741,#0a132e);border-radius:13px;min-width:0}.product h3,.signature-grid .product h3{font:650 10px/1.35 system-ui;text-align:center;color:#fff;min-height:27px}.product .product-price{min-height:23px;margin:2px 0;justify-content:center}.product .coin{font-size:10px}.product .coin:before{width:13px;height:13px;font-size:6px;margin-right:3px}.product .badge{font-size:9px;padding:3px 5px}.product .product-actions{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin-top:3px!important}.product .product-actions button{min-height:44px;padding:6px 5px;font-size:9px;flex:1}.product .product-actions button:disabled{display:none}.table-showcase{height:auto;padding:5px 0}.equipment-art.table-art{width:100%;--art-width:100%!important;max-width:150px}.equipment-showcase{position:relative}.product .cue-showcase{height:155px;min-height:155px;display:flex;align-items:center;justify-content:center;padding:0;overflow:hidden}.product .equipment-art.cue-art:not(.equipment-grip){width:145%;max-width:none;transform:rotate(-64deg);flex:none}.product .equipment-grip{display:none}.equipment-art img{max-width:none!important;margin:0!important}.upgrade-link{background:none;border:0;min-height:44px;font-size:9px;width:100%;padding:4px;color:#51f3d9}.legacy-collection{margin-top:16px;background:#061129;border-color:#2d4569}.legacy-collection summary{padding:10px;min-height:44px;font-size:12px}.legacy-grid{padding:3px 7px 8px}.cosmic-cue-preview{margin-bottom:15px}.shop-note{font-size:11px;line-height:1.8;color:#9fb3d1}.equipment-preview .table-art{width:min(260px,calc(55dvh / 1.68));max-width:260px}.equipment-preview .table-showcase{padding:12px 0}.equipment-preview .cue-showcase,.cosmic-upgrade .cue-showcase{min-height:140px;padding:28px 0;overflow:visible}.equipment-preview .equipment-art.cue-art,.cosmic-upgrade .equipment-art.cue-art{transform:rotate(-16deg);width:100%;max-width:none}.equipment-preview .equipment-grip,.cosmic-upgrade .equipment-grip{display:none}.equipment-modal .equipment-showcase{overflow:visible}.cue-stats{padding:8px 0;gap:8px}.cue-stats>div{border-color:#28416a;background:#0b1e38}.cue-stats strong{font-size:18px;color:#41f3d5}.cue-stats>span{font-size:9px}.upgrade-track{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:14px 0}.cue-detail .upgrade-track span{width:auto;height:50px;min-width:0;display:grid;place-items:center;font:10px/1.6 system-ui;border:1px solid #3a507a;background:#111f40;border-radius:8px;color:#c2d3ee}.upgrade-comparison strong{color:#54f6d1}.cue-detail .panel{padding:12px}.cue-detail .panel>small{font-size:11px}.cosmic-upgrade .panel{background:#0d1a37}.cue-detail .energy{color:#ffd072}
/* A calm full-height arena: the live geometry matches every shop table. */
.game-shell{max-width:550px;background:linear-gradient(#040b20a8,#050e24c9),url('/assets/cosmic-background.webp') center/cover;border-color:#213e59;padding:max(2px,env(safe-area-inset-top,0px)) 5px calc(4px + var(--safe));gap:3px;overflow:hidden}
.game-shell .topbar{min-height:30px;height:30px;flex-shrink:0;margin:0;max-width:none}.game-shell .topbar .brand{font-size:20px;letter-spacing:-.8px}.game-shell .topbar button{min-height:30px;height:30px;min-width:44px;padding:4px}.game-shell .topbar .icon{width:20px;height:20px}.game-shell .topbar:after{display:none}.game-shell .players-bar{border:1px solid #344b77;border-radius:14px;background:linear-gradient(110deg,#152343,#0c1735);padding:4px;gap:4px;min-height:54px;max-height:54px;flex-shrink:0;display:flex;align-items:center;box-shadow:inset 0 1px #b7c6ff11}.game-shell .player-block,.game-shell .player-block.right,.game-shell .player-block.current{flex:1;border:0;border-radius:0;background:none;box-shadow:none;opacity:1;padding:0;gap:5px;min-width:0}.game-shell .player-block:after{display:none}.game-shell .players-bar .avatar{width:32px;height:32px;border:1px solid #b6afff;box-shadow:none}.game-shell .player-block strong{font:750 10px/1.2 system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .match-level{margin:0;gap:3px}.game-shell .match-level small{font-size:7px;color:#b1c8e9}.game-shell .match-level .progress{height:3px;border:0}.game-shell .match-cue{font:7px/1.35 system-ui;white-space:nowrap;color:#50f0cf}.game-shell .match-count{font-size:7px;line-height:1.2;color:#c1cce5}.game-shell .turn-timer{width:43px;height:43px;min-width:43px;border:2px solid #59f5d4;outline:0;box-shadow:0 0 0 2px #20577b;color:#fff;background:#08142b;font:800 17px/1 system-ui}.game-shell .bot-skill{background:linear-gradient(90deg,#39e8cf,#9c6ffc);height:3px}.game-shell .game-objective{font-size:8px;min-height:13px;line-height:1.4;color:#a3c6d9}.game-shell .arena-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:1px;flex:1;min-height:0}.game-shell .arena-meter{background:#0c1833dd;border-color:#334974;border-radius:10px;box-shadow:inset 0 1px #829ec822;padding:7px 3px;height:84%;min-height:150px;gap:3px}.game-shell .arena-meter:before,.game-shell .arena-meter:after{display:none}.game-shell .arena-meter .control-label{font-size:8px;color:#d6e1f5;gap:2px}.game-shell .arena-meter .control-label .icon{width:17px;height:17px;fill:#82dfff44;color:#b2edfa}.game-shell .energy-line{gap:4px}.game-shell .energy-line .vertical-meter{width:14px;border-color:#487196;border-radius:8px;margin-top:6px;background:#030a21;box-shadow:inset 0 0 0 2px #122847}.game-shell .energy-line .vertical-meter i{background:linear-gradient(0deg,#17e2bf,#c7f865);border-radius:6px;box-shadow:none}.game-shell .energy-line strong{font-size:10px;line-height:1.2}.game-shell .energy-line strong small{font-size:8px}.game-shell .energy-line>button{font-size:8px;min-height:44px;color:#6df5d6;width:36px}.game-shell .power-wrap output{font-size:13px;order:1;white-space:nowrap}.game-shell .power-wrap .control-label{order:0}.game-shell .power-wrap .cue-power{order:2;width:23px;border:1px solid #7289a7;border-radius:7px;background:#040a21;box-shadow:inset 0 0 0 2px #1a3049}.game-shell .power-track{inset:5px 1px}.game-shell .cue-power i{background:linear-gradient(180deg,#ffd45b,#ff8160);border-radius:5px}.game-shell .cue-power:after{background:none}.game-shell .power-handle{height:12px;background:#ffc47d;color:#381b2f;border-color:#ffe1b1;font-size:13px;border-radius:3px;box-shadow:none}.game-shell .cue-boost{order:3;font-size:7px;min-height:16px;color:#bdb3e8}.game-shell .power-wrap.pulling{border-color:#ffcc87;box-shadow:0 0 5px #ffc34f44}.game-shell .stage{border-radius:8px}.game-shell .game-status{font-size:7px;background:#07132ad9;border:0;color:#b2ccde;max-width:100%;padding:1px 3px;bottom:0;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .potted-row{background:#07152d;border:1px solid #354d70;border-radius:12px;min-height:29px;padding:3px 7px}.game-shell .potted-label{font:650 9px system-ui;color:#d8e8ef}.game-shell .potted-track{gap:4px}.game-shell .potted-ball{flex-basis:21px;max-width:21px}.game-shell .potted-count{font-size:9px;color:#51f3d7}.game-shell .hand{min-height:49px;padding:1px 5px;gap:5px;justify-content:center}.game-shell .card{height:47px;max-width:64px;border:1px solid #cedbe8;border-radius:5px;background:linear-gradient(120deg,#fff,#eff2f7);font:bold 17px/17px Arial;color:#121929;padding:3px 5px;box-shadow:0 2px 0 #49739c55;animation:none!important;transition:none!important}.game-shell .card.red{color:#ef3d4f}.game-shell .card span:last-child{font:25px/23px Georgia}.game-shell .game-controls.cue-controls{min-height:49px;height:49px;gap:8px;border:1px solid #3e527b;border-radius:12px;background:linear-gradient(125deg,#12264b,#0a1732);box-shadow:none;padding:2px 9px;justify-content:space-between}.game-shell .cue-controls:before{display:none}.game-shell .cue-hint{font-size:7px;line-height:1.5;max-width:120px;color:#9eb9d5}.game-shell .aim-tools{gap:12px;flex:1;justify-content:space-evenly;padding:0;border:0;background:none;align-items:center}.game-shell .aim-tool{flex-direction:row-reverse;gap:6px;flex:0 1 auto}.game-shell .aim-tool .control-label{font-size:10px;white-space:nowrap}.game-shell .spin-ball,.game-shell .aim-circle{width:40px;height:40px;min-width:40px;min-height:44px;margin:0;border-radius:50%;padding:4px}.game-shell .spin-ball{border:1px solid #dae6f5;box-shadow:none;background:radial-gradient(circle at 28% 25%,#fff,#e9e8ee 65%,#8596b4)}.game-shell .aim-circle{border:1px solid #476e9e;box-shadow:none;background:#11213e}.game-shell .aim-circle .icon{width:29px;height:29px;color:#9cb5de}.game-shell .nudge{background:#0c1d37;border-color:#457298}.game-shell .nudge button{min-height:44px}.game-shell .card-count{font-size:9px}
.auth-shell{position:relative;min-height:100dvh;max-width:520px;padding:30px 20px calc(25px + var(--safe));background:linear-gradient(#060c2355,#081128cc),url('/assets/cosmic-background.webp') center/cover}.auth-shell>.brand{font-size:37px;margin:0 auto 16px;text-align:center;color:#fff}.auth-art{height:235px;min-height:0;border:0;box-shadow:none;border-radius:16px;background:linear-gradient(90deg,transparent,#08122c11),url('/assets/cosmic-hero.webp') left center/cover;padding:14px 10px 15px 46%;display:flex;flex-direction:column;justify-content:center}.auth-art>span{font-size:9px;color:#69f6d2;letter-spacing:1px}.auth-art h1{font:800 21px/1.3 system-ui;margin:8px 0}.auth-art small{font-size:9px;color:#afc1e0}.auth-panel{border:1px solid #314c79!important;border-radius:17px;padding:17px!important;background:#0c1731ee!important}.auth-tabs{gap:5px}.auth-tabs button{min-height:44px;background:none;border-color:#3c5681;font-size:12px}.auth-tabs .active{background:#36f1c9;color:#052a37;border-color:#77ffe0}.auth-panel h2{font-size:17px;margin:16px 0}.auth-panel .form-field{margin-bottom:13px}.auth-panel .form-field>span{font-size:11px;color:#acbedc}.auth-panel input{min-height:48px}.auth-panel .bonus{border-color:#3b5979;background:linear-gradient(100deg,#182a41,#101831);padding:12px;gap:12px;border-radius:12px;margin:15px 0}.auth-panel .bonus>span{font-size:30px;color:#ffd368}.auth-panel .bonus strong{font-size:19px;color:#ffd878}.auth-panel .bonus small{font-size:10px}.auth-panel button.primary{min-height:48px}.auth-note{font-size:10px;line-height:1.7;margin-top:12px}.auth-footer{font-size:11px;color:#a6bfda;margin-top:14px}.auth-panel .text-button{font-size:11px;margin:8px auto}.recovery-code{font-size:14px}.check-row{font-size:13px}
dialog{max-width:480px;border:1px solid #49608a;background:linear-gradient(#142442,#08132c);box-shadow:0 25px 80px #000b;border-radius:20px;color:#f2f6ff}dialog::backdrop{background:#02071be6;backdrop-filter:none}dialog h2{font-size:21px}dialog .choices .purple,dialog .choices button{background:linear-gradient(140deg,#1c3961,#0a1731);color:#f7faff;border-color:#467a98}.chat-box .bubble{border-color:#40557d;background:#152746;border-radius:13px}.chat-box .bubble.mine{background:linear-gradient(130deg,#175151,#0c363f);border-color:#287c75}.messages{font-size:13px}.invite-card{background:#13364c;border-color:#426b95}.note{background:#142645;color:#c2d0e8;font-size:12px}.waiting{margin-top:20px}.room-code{color:#4cf7d0}.balance-card{background:linear-gradient(145deg,#234069,#0d1d3c);border-color:#4874a0}.balance-card strong{color:#ffe0a0}.result-modal{padding-top:20px;text-align:center;background:linear-gradient(#0b153266,#08122be8),url('/assets/cosmic-background.webp') center/cover}.result-mascot{width:210px;height:170px;object-fit:contain;margin:0 auto;max-height:26dvh}.result-modal .victory{font:900 37px/1.1 system-ui;color:#ffda79;text-shadow:0 3px 0 #c5823c,0 7px 10px #0006;margin:6px 0 15px}.result-modal .avatar.big{width:56px;height:56px;margin:10px auto}.result-modal h2{font-size:18px}.result-modal .eyebrow{font-size:9px;color:#c8d4ea}.result-modal .levelup-title{font-size:14px;color:#66fad3;margin:7px 0}.result-rewards{background:#10203de8;border:1px solid #3c5b80;border-radius:14px;padding:15px;margin:14px 0}.result-rewards strong{font-size:22px!important}.result-modal .result-rewards .coin{font-size:22px}.result-modal .progress{margin:14px 0 4px}.result-modal>.panel{margin:10px 0!important;padding:8px}.result-modal>.row button{font-size:12px}.confetti{animation-duration:1.8s;animation-iteration-count:1}#toast{border-color:#5ff6d7;background:#102b3cf5;font-size:12px}
@media(max-width:365px){.shell{padding-left:9px;padding-right:9px}.lobby-brand{height:73px}.lobby-brand .brand{font-size:36px}.feature-copy{right:9px;top:10px;bottom:8px;gap:5px}.feature-copy h2{font-size:18px}.feature .hero-play{font-size:18px}.mode-card strong{font-size:12px}.social-play{padding:7px 6px;gap:5px}.social-play strong{font-size:10px}.social-play small{font-size:8px}.cosmic-identity .coin{font-size:11px}.game-shell .arena-stage{grid-template-columns:40px minmax(0,1fr) 40px}.game-shell .match-cue{font-size:6px}.game-shell .player-block strong{font-size:9px}.game-shell .aim-tools{gap:7px}.game-shell .cue-hint{max-width:80px;font-size:6px}.game-shell .aim-tool .control-label{font-size:8px}.game-shell .hand{gap:3px}.product .product-actions button{font-size:8px;padding:4px}.profile-head .avatar.big{width:58px;height:58px}.profile-head h1{font-size:18px}.stat small{font-size:8px}}
@media(max-height:690px){.game-shell .topbar{min-height:26px;height:26px}.game-shell .players-bar{min-height:50px;max-height:50px}.game-shell .card{height:42px}.game-shell .hand{min-height:44px}.game-shell .arena-meter{min-height:110px}.game-shell .energy-line>button{font-size:7px}.auth-art{height:170px}.auth-shell{padding-top:18px}.result-mascot{height:120px}.result-modal .victory{font-size:30px}.result-modal .avatar.big{width:42px;height:42px;margin:5px auto}}
@media(min-width:760px){.shell{max-width:620px;padding:20px 24px 100px}.nav{max-width:570px}.feature{aspect-ratio:2.3}.feature-copy h2{font-size:32px}.mode-card strong{font-size:19px}.social-play strong{font-size:15px}.product h3,.signature-grid .product h3{font-size:13px}.equipment-art.table-art{max-width:200px}.product .cue-showcase{height:205px}.game-shell{max-width:1100px}.game-shell .arena-stage{grid-template-columns:55px minmax(0,1fr) 55px;gap:7px}.game-shell .players-bar{max-width:650px;align-self:center;width:100%}.game-shell .hand,.game-shell .potted-row,.game-shell .game-controls.cue-controls{max-width:570px;width:100%;align-self:center}.game-shell .match-cue{font-size:9px}.game-shell .player-block strong{font-size:12px}.game-shell .arena-meter{max-height:430px}.game-shell .game-objective{font-size:10px}.game-shell .cue-hint{font-size:9px;max-width:220px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Portrait meters remain full finger-width hit areas, independent of slim visual track. */
.game-shell .power-wrap{min-width:44px}.game-shell .cue-hint{overflow:hidden}.legacy-grid{padding:0}.game-shell .spin-ball,.game-shell .aim-circle{width:44px;height:44px;min-width:44px;min-height:44px}
/* Compact lobby discoveries and earned progression. */
.shell.club-lobby .feature .hero-play{background:linear-gradient(120deg,#63ffd3,#21e9c6);color:#042333;border-color:#91ffe9;box-shadow:0 3px 10px #0004}
.cosmic-identity .club-player .identity{flex:1;min-width:0;overflow:visible}.cosmic-identity .player-xp>span{font-size:10px;line-height:1.4;white-space:nowrap}.cosmic-identity .coin-pill{flex-shrink:0}.lobby-brand{height:74px}.lobby-brand .brand{font-size:38px}.lobby-brand .notification-button{left:0;right:auto;top:5px}
.notification-button{position:relative;flex-shrink:0;min-width:44px!important;min-height:44px!important}.notification-button .icon{width:23px;height:23px}.notification-count{display:inline-grid;place-items:center;background:#ff538a;color:white;border:1px solid #ffbad0;border-radius:20px;min-width:17px;height:17px;padding:1px 3px;font:700 9px system-ui}.notification-button .notification-count{position:absolute;top:0;right:0}.notification-count[hidden]{display:none}
.leader-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 5px}.leader-card{display:flex;align-items:center;gap:7px;text-align:left;padding:9px 7px;min-height:63px;border-radius:14px;overflow:hidden}.leader-card.wealth{background:radial-gradient(ellipse at top left,#ffd66a33,transparent 70%),linear-gradient(120deg,#253149,#11182f);border-color:#aa8656}.leader-card.skill{background:radial-gradient(ellipse at top left,#41efcf25,transparent 70%),linear-gradient(120deg,#16354a,#111b36);border-color:#48a5a5}.leader-symbol{font-size:25px}.leader-card>div{flex:1;min-width:0}.leader-card strong{display:block;font-size:11px;line-height:1.5;white-space:nowrap}.leader-card small{display:block;font-size:8px;line-height:1.6}.leader-card>span:last-child{font-size:22px;color:#6ff3dd}.leader-card.wealth strong{color:#ffdb88}.achievement-link{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:44px;background:none;border:0;font-size:11px;padding:6px 8px;color:#bbcaea;box-shadow:none}.achievement-link span{font-size:10px;color:#59e9cf}
.progression-modal{padding:23px 16px;max-height:86dvh;overflow-y:auto}.progression-modal h2{padding-right:30px;margin-bottom:12px}.progression-modal h3{margin:15px 0 10px}.progression-modal>.muted{font-size:12px;line-height:1.7}.login-calendar{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:20px 0}.login-day{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px;border:1px solid #39517a;border-radius:12px;background:#12203d}.login-day.today{border:2px solid #53f3d2;background:#173849}.login-day.claimed{background:#143a36}.login-day strong{font-size:25px}.login-day small{font-size:10px}.login-day span{color:#ffdb8a;font-size:13px;font-weight:800}.login-day b{position:absolute;right:5px;top:4px;color:#63ffcf}.achievement-card{display:flex;align-items:center;gap:9px;padding:12px 9px;background:#11213d;border:1px solid #33496a;border-radius:12px}.achievement-card.earned{border-color:var(--reward-color)}.achievement-card>span{font-size:27px}.achievement-card .identity{flex:1;min-width:0}.achievement-card strong{font-size:12px}.achievement-card small{display:block;font-size:9px;margin:5px 0}.achievement-card button{font-size:10px;padding:7px;min-width:60px}.achievement-card .progress{margin:3px 0}.title-badge{margin:8px 0}
.leaderboard-tabs{margin:9px 0}.leaderboard-tabs button{font-size:11px;padding:6px 3px;flex:1}.leader-row{display:flex;align-items:center;gap:8px;text-align:left;width:100%;padding:9px 7px;border-radius:12px;min-height:66px;background:#11223d}.leader-row.mine{border-color:#4eeace;background:#153641}.leader-position{font:800 14px system-ui;min-width:30px;text-align:center}.leader-row .avatar{width:34px;height:34px}.leader-row .identity{flex:1;min-width:0}.leader-row .identity strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;display:block}.leader-row small{display:block;font-size:9px;margin-top:4px}.leader-score{font-size:13px;color:#66f2d8;white-space:nowrap;text-align:right}.leader-score .coin{font-size:11px}.my-rank{margin:15px 0;padding:10px 0;border-block:1px solid #40547a}.my-rank>small{display:block;margin-bottom:7px}.my-rank p{font-size:12px;line-height:1.7}.notification-row{display:flex;align-items:center;gap:8px;border:1px solid #395579;border-radius:12px;padding:10px 8px;background:#10223e}.notification-row .avatar{width:36px;height:36px}.notification-row .identity{flex:1;min-width:0}.notification-row strong{font-size:12px}.notification-row small{font-size:11px;display:block;margin-top:5px;overflow-wrap:anywhere}.notification-row button{font-size:11px;padding:6px 10px}
@media(max-width:365px){.leader-card{gap:4px;padding:7px 5px}.leader-symbol{font-size:21px}.leader-card strong{font-size:10px}.lobby-brand .brand{font-size:32px}.cosmic-identity .player-xp .progress{min-width:30px}.cosmic-topbar{flex-wrap:wrap}.leader-row{gap:5px}}
/* One steady turn marker; no flashing, card motion, or table overlays. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.game-shell .players-bar{min-height:66px;max-height:66px;padding:3px 4px}
.game-shell .player-block,.game-shell .player-block.right{position:relative;min-height:58px;padding:15px 4px 3px;border:1px solid transparent;border-radius:10px;opacity:.7}
.game-shell .player-block.current{padding:15px 4px 3px;border:1px solid #58f6d4;border-radius:10px;background:linear-gradient(125deg,#17483a80,#11213d);box-shadow:inset 0 0 0 1px #5cffe612;opacity:1}
.game-shell .player-block.current .avatar{border:2px solid #62ffe0;box-shadow:0 0 0 2px #38eeca22}
.game-shell .turn-badge{position:absolute;top:0;left:50%;transform:translateX(-50%);display:flex;gap:3px;align-items:center;justify-content:center;white-space:nowrap;background:#55f4cd;color:#062b2a;border-radius:0 0 6px 6px;padding:1px 6px;font:750 8px/1.5 'Khmer Sangam MN','Noto Sans Khmer',system-ui,sans-serif;max-width:100%}
.game-shell .turn-badge>span{font-size:7px}.game-shell .power-wrap output{font-variant-numeric:tabular-nums}
@media(max-width:365px){.game-shell .turn-badge{font-size:7px;padding:1px 4px}.game-shell .player-block,.game-shell .player-block.right,.game-shell .player-block.current{padding-left:2px;padding-right:2px}}
.brand .release-label{display:block;font:600 9px/1.2 system-ui;letter-spacing:.3px;color:#82f6da;text-shadow:none;text-align:center;margin-top:2px}
.game-shell .topbar{height:38px;min-height:38px}.game-shell .topbar .brand .release-label{font-size:9px}
/* Friends: clear entry consent and rematches inside the existing table. */
.friends-choice-title{margin:18px 0 10px}.friend-fee-card{padding:12px;border:1px solid #3e6084;border-radius:13px;background:#0e223d;text-align:left;margin:10px 0}.friend-fee-card .form-field{margin:0 0 8px}.friend-fee-card .form-field>span{font-size:11px;color:#c8d6ee}.friend-fee-card input{min-height:44px;font-size:16px}.fee-presets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.fee-presets button{padding:3px 1px;min-height:44px;font-size:10px;border-radius:8px}.friend-fee-card>small{display:block;font-size:10px;line-height:1.6;margin-top:7px}.friend-fee-card>small:first-of-type{color:#75ffe0;font-weight:700}
.friend-result-modal{text-align:center;max-height:90dvh;overflow-y:auto}.friend-result-modal .result-mascot{width:86px;height:58px;margin:0 auto}.friend-result-modal .victory{font-size:23px;margin:5px 0 8px}.friend-result-modal>.avatar.big,.friend-result-modal>.avatar.big+h2{display:none}.friend-result-modal .result-rewards{padding:8px;margin:8px 0}.friend-result-modal .result-rewards strong,.friend-result-modal .result-rewards .coin{font-size:17px!important}.friend-result-modal>.panel{display:none}.friend-result-modal .levelup-title{margin:6px 0;font-size:12px}.friend-result-modal>.progress{margin:7px 0 3px}.friend-result-modal>button{margin-top:8px;min-height:44px}.rematch-panel{border-top:1px solid #466382;margin-top:12px;padding-top:8px}.rematch-panel h3{font-size:14px;line-height:1.5;margin:0 0 10px}.rematch-ready{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rematch-ready>div{border:1px solid #345574;border-radius:11px;background:#10263e;display:flex;align-items:center;gap:5px;padding:7px;flex-wrap:wrap}.rematch-ready .avatar{width:29px;height:29px}.rematch-ready strong{font-size:11px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rematch-ready small{width:100%;font-size:10px;color:#adc0d8}.rematch-ready .ready{border-color:#58eac7;background:#103d38}.rematch-ready .ready small{color:#70ffce}.rematch-panel .friend-fee-card{margin:8px 0}.rematch-status{font-size:11px;line-height:1.7;color:#89ecd9;margin:8px 0}.rematch-panel>button{margin:5px 0;min-height:44px}.rematch-panel>small{display:block;font-size:9px;line-height:1.6;margin:6px 0}.friend-join-modal .join-host,.compact-waiting .join-host{display:flex;gap:10px;align-items:center;margin:14px 0;text-align:left}.join-host .avatar{width:45px;height:45px}.join-host strong{display:block;font-size:15px}.join-host small{display:block;font-size:11px;margin-top:4px}.join-fee{padding:16px;border:1px solid #4b8a94;border-radius:14px;background:#123b44;text-align:center;margin:13px 0}.join-fee>small{display:block}.join-fee>strong{display:block;font-size:26px;color:#75ffe0;margin:8px 0}.join-fee>strong .coin{font-size:26px}.friend-join-modal>button{margin-top:9px}.compact-waiting{padding:16px;text-align:left;margin-top:12px}.compact-waiting h1{font-size:20px}.compact-waiting .avatar{margin:0}.compact-waiting .room-code{font-size:24px;letter-spacing:4px;margin:0}.compact-waiting .room-share{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:13px 0}.compact-waiting .room-share button{font-size:11px;display:flex;align-items:center;gap:6px;min-height:44px}.compact-waiting .room-share .icon{width:17px;height:17px}.room-fee-summary{display:flex;gap:10px;align-items:center;justify-content:space-between;color:#59f7d2;font-weight:800}.room-fee-summary small{font-size:10px;font-weight:500}.compact-waiting p.muted{font-size:11px;line-height:1.8;margin:10px 0 0}
@media(max-width:365px){.fee-presets button{font-size:9px}.friend-result-modal{padding:20px 12px}.rematch-ready strong{font-size:10px}.compact-waiting .room-code{font-size:21px;letter-spacing:2px}.room-fee-summary{align-items:flex-start;flex-direction:column;gap:5px}}
.premium-collection{margin:12px 0 22px}.premium-collection>p{color:#91c9dd;font-size:12px;line-height:1.7;margin-bottom:12px}.shop-grid:is(.premium-grid,.limited-grid){grid-template-columns:1fr;gap:14px}:is(.premium-grid,.limited-grid) .product.premium{padding:16px;border-color:var(--item-color);background:radial-gradient(ellipse at 80% 25%,#25417080,transparent 65%),linear-gradient(145deg,#102742,#071128);position:relative;overflow:hidden}:is(.premium-grid,.limited-grid) .product h3{font-size:19px;min-height:0;text-align:left;margin-right:95px}.premium-rarity{position:absolute;top:18px;right:14px;font-size:10px;letter-spacing:1px;color:var(--item-color);border:1px solid var(--item-color);border-radius:8px;padding:4px 7px}:is(.premium-grid,.limited-grid) .product .cue-showcase{height:106px;min-height:106px;padding:14px 4px;overflow:visible}:is(.premium-grid,.limited-grid) .product .equipment-art.cue-art:not(.equipment-grip){width:100%;transform:rotate(-9deg);max-width:none}:is(.premium-grid,.limited-grid) .product .equipment-grip{display:none}:is(.premium-grid,.limited-grid) .product .cue-stats{padding:0 0 10px}:is(.premium-grid,.limited-grid) .product .cue-stats>span{font-size:10px}:is(.premium-grid,.limited-grid) .product .product-price{justify-content:flex-start;min-height:28px}:is(.premium-grid,.limited-grid) .product .coin{font-size:16px}:is(.premium-grid,.limited-grid) .product .coin:before{width:18px;height:18px;font-size:9px}:is(.premium-grid,.limited-grid) .product .product-actions{gap:8px}:is(.premium-grid,.limited-grid) .product .product-actions button{font-size:13px;min-height:46px}:is(.premium-grid,.limited-grid) .upgrade-link{font-size:12px}:is(.premium-grid,.limited-grid) .product .badge{font-size:11px}
.premium-poster{display:block;width:100%;height:auto!important;object-fit:contain;border:1px solid #46619b;border-radius:12px;margin:14px 0 6px!important}:is(.premium-grid,.limited-grid) .product .cue-showcase{height:72px;min-height:72px;padding:10px 4px}.equipment-preview .premium-poster{margin:12px 0!important}
.owned-cues{display:grid;gap:12px;margin:12px 0}.owned-cues .product{padding:14px;position:relative}.owned-cues .product h3{text-align:left;font-size:16px;min-height:0}.owned-cues .product .cue-showcase{height:80px;min-height:80px;overflow:visible;padding:12px 0}.owned-cues .product .equipment-art.cue-art:not(.equipment-grip){width:100%;transform:rotate(-7deg)}.owned-cues .product .equipment-grip{display:none}.owned-cues .product .product-actions button,.owned-cues .upgrade-link{font-size:12px}
/* Readable Khmer text and invitation actions on small portrait screens. */
.shell:not([data-page=home]) .cosmic-topbar{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:6px}
.shell:not([data-page=home]) .cosmic-topbar>.brand{grid-column:2;font-size:22px;min-width:0}
.shell:not([data-page=home]) .cosmic-topbar>.coin-pill{grid-row:2;grid-column:2/-1;justify-self:end;max-width:100%;margin:0;display:flex;align-items:center;gap:8px;min-height:44px}
.shell .section-title{flex-wrap:wrap;align-items:center;line-height:1.7}
#search-form input{flex:1;min-width:0}#search-form>button{flex-shrink:0}
.friend .identity>small{display:block;line-height:1.8;font-size:10px;overflow-wrap:anywhere}
.friend .identity strong>button{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left;line-height:1.65}
.friend-status{margin-top:3px;display:flex!important;align-items:center;gap:5px}.friend-status .dot{margin:0;flex-shrink:0}
.friend-actions{flex-shrink:0}.friend .identity{min-width:0}.friend .avatar{flex-shrink:0}
.game-invites{margin:16px 0 20px}.game-invites .section-title{margin:0 0 10px}.game-invites .section-title>button{font-size:12px;min-height:44px;padding:8px 12px}
.game-invite{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid #416386;border-radius:16px;background:linear-gradient(120deg,#14384b,#101b36)}
.game-invite strong{font-size:14px;white-space:normal;overflow-wrap:anywhere;line-height:1.75}.game-invite small{display:block;line-height:1.8;font-size:11px;margin-top:3px}
.invite-actions{display:flex;gap:6px;flex-shrink:0}.invite-actions button{min-height:44px;font-size:12px;padding:8px 11px}.invite-actions button:not(.primary){color:#c9d9ee;background:#0c1932;border-color:#647294}
.invite-clear-note{display:block;margin-top:10px;line-height:1.9}.friend-list{margin-top:14px}
dialog{overscroll-behavior:contain;scroll-padding:18px;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - var(--safe))}
dialog .dialog-close{position:sticky;top:0;float:right;z-index:3;right:auto;margin:-10px -4px 4px 8px;width:44px;height:44px;background:#0c203eea;border:1px solid #5e9aab;border-radius:13px;color:#d5fffa}
dialog h2,dialog h3,dialog p,dialog .muted{overflow-wrap:anywhere;line-height:1.85}
.result-modal .result-mascot{clear:both}.result-modal .victory{font-family:inherit;line-height:1.7;overflow-wrap:anywhere}
.friend-result-modal{padding:18px 14px;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - var(--safe))}
.friend-result-modal .victory{font-size:23px;line-height:1.8;margin:8px 0}.result-modal .eyebrow{line-height:1.9;overflow-wrap:anywhere}
.rematch-panel h3{line-height:1.9}.rematch-ready{grid-template-columns:repeat(2,minmax(0,1fr))}
.rematch-ready>div{display:grid;grid-template-columns:30px minmax(0,1fr);gap:5px 7px;align-items:center;padding:9px}
.friend-result-modal .rematch-ready .avatar{width:30px;height:30px;margin:0;box-shadow:none}
.rematch-ready strong{font-size:12px;line-height:1.8;white-space:normal;overflow-wrap:anywhere}.rematch-ready small{grid-column:1/-1;width:auto;font-size:11px;line-height:1.9}
.friend-fee-card .form-field>span,.friend-fee-card>small,.rematch-status,.rematch-panel>small{line-height:1.9;overflow-wrap:anywhere}
.friend-result-modal>button.dialog-close{margin-top:-10px}
@media(max-width:365px){.shell:not([data-page=home]) .cosmic-topbar>.brand{font-size:20px}.game-invite{grid-template-columns:minmax(0,1fr);gap:9px}.invite-actions button{flex:1}.fee-presets{grid-template-columns:repeat(3,minmax(0,1fr))}.friend{flex-wrap:wrap}.friend .identity{flex-basis:calc(100% - 60px)}.friend-actions{margin-left:auto}.rematch-ready strong{font-size:11px}}
:is(.premium-grid,.limited-grid) .product h3{margin-right:0;overflow-wrap:anywhere;line-height:1.65}
:is(.premium-grid,.limited-grid) .premium-rarity{position:static;display:inline-block;max-width:100%;margin:5px 0 0;white-space:normal;line-height:1.7}
.shell .panel p,.shell .panel small,.shell .empty{overflow-wrap:anywhere}
/* Five approved table posters remain large enough to browse on touch screens. */
.luxury-collection{margin-bottom:18px}.luxury-collection>.shop-note{margin-bottom:12px}
.shop-grid.luxury-table-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.luxury-table-grid .product.luxury{padding:11px;border-color:var(--item-color);border-radius:16px;background:linear-gradient(145deg,#122b42,#091329)}
.luxury-table-grid .product h3{font-size:15px;line-height:1.7;min-height:0;text-align:left;overflow-wrap:anywhere}
.luxury-table-grid .premium-rarity{position:static;display:inline-block;font-size:8px;letter-spacing:.4px;line-height:1.7;margin-top:5px;padding:3px 5px}
.luxury-table-grid .premium-poster{margin:10px 0!important;border-color:var(--item-color)}
.luxury-table-grid .product-price{justify-content:flex-start;min-height:28px}.luxury-table-grid .coin{font-size:14px}
.luxury-table-grid .product-actions{gap:6px}.luxury-table-grid .product-actions button{font-size:11px;min-height:46px;padding:7px 5px}
@media(max-width:365px){.shop-grid.luxury-table-grid{grid-template-columns:1fr}.luxury-table-grid .product h3{font-size:18px}.luxury-table-grid .premium-rarity{font-size:10px}.luxury-table-grid .product-actions button{font-size:13px}}

/* Khmer clusters need real font weights, clear diacritics and an unembossed outline. */
.result-modal .victory.khmer-title{font-family:'B369 Khmer','Khmer Sangam MN',sans-serif;font-size:28px;font-weight:600;font-synthesis:none;line-height:1.85;letter-spacing:normal;word-spacing:normal;text-shadow:0 2px 8px #0005;overflow-wrap:normal;word-break:normal;margin:10px 0 14px}
.result-modal h2{font-weight:600;padding-right:0;line-height:1.85}
dialog button:not(.dialog-close){line-height:1.8;letter-spacing:normal;word-spacing:normal;font-synthesis:none;white-space:normal;overflow-wrap:normal;word-break:normal}
.result-modal>button:not(.dialog-close),.rematch-panel>button{font-weight:600;min-height:48px;padding:10px 14px;margin-top:10px}
.friend-result-modal .victory.khmer-title{font-size:23px}
@media(max-width:365px){.result-modal .victory.khmer-title{font-size:24px}.friend-result-modal .victory.khmer-title{font-size:21px}}
/* World Tour: direct entry, compact artwork and a permanently visible play action. */
dialog.arena-selector {
  width:min(calc(100% - 20px),480px); height:min(700px,calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
  max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); padding:16px; overflow:hidden; border-radius:24px;
  border:1px solid #647aa8; background:radial-gradient(ellipse at 95% 0,#243862,#0a132d 55%);
  box-shadow:0 24px 90px #020514cc,inset 0 1px #ffffff20;
}
dialog.arena-selector[open] { display:flex; flex-direction:column; gap:8px; }
dialog.arena-selector .dialog-close {
  position:absolute; top:13px; right:12px; float:none; margin:0; width:36px; height:36px;
  min-width:36px; min-height:36px; padding:6px; border:1px solid #526791; border-radius:12px;
  background:#13213b; color:#d8e8fc;
}
.venue-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-right:43px; flex-shrink:0; }
.venue-header>div { min-width:0; }
.venue-header .eyebrow { font:700 8px/1.6 system-ui; letter-spacing:1.5px; color:#7fefdf; }
.venue-header h2 { font:800 20px/1.4 system-ui; padding:0; margin:2px 0 0; letter-spacing:-.6px; }
.venue-header .coin-pill { font-size:11px; padding:7px 8px; min-height:36px; flex-shrink:0; border-radius:12px; }
.venue-header .coin { font-size:11px; }
.venue-mode-tabs { margin:0; padding:3px; gap:4px; background:#050d22; border:1px solid #324568; border-radius:14px; flex-shrink:0; }
.arena-selector .venue-mode-tabs button { font:700 12px/1.4 system-ui; min-height:38px; padding:6px 3px; border:0; border-radius:10px; background:none; color:#a6bad7; }
.arena-selector .venue-mode-tabs button.active { color:#073b45; background:linear-gradient(130deg,#8bffe3,#28e6c6); box-shadow:0 2px 12px #25efd22b; }
.venue-kind-tabs { display:flex; gap:8px; flex-shrink:0; }
.arena-selector .venue-kind-tabs button { min-width:0; flex:1; min-height:36px; padding:5px 8px; display:flex; align-items:center; justify-content:center; gap:7px; font:600 11px/1.5 system-ui; color:#adc2e2; border-radius:11px; background:#13203b; border:1px solid #324568; }
.venue-kind-tabs .icon { width:15px; height:15px; flex-shrink:0; }
.arena-selector .venue-kind-tabs button.active { border-color:#9e8bfa; color:#e5dcff; background:linear-gradient(110deg,#563b9459,#203252); }
.arena-scroll { flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; overscroll-behavior-y:contain; padding-bottom:2px; }
.venue-track { position:relative; display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; padding:1px 0 4px; -webkit-overflow-scrolling:touch; }
.venue-track::-webkit-scrollbar,.venue-fees::-webkit-scrollbar { display:none; }
.venue-track:focus-visible { outline:2px solid #8affe5; outline-offset:-3px; border-radius:18px; }
.venue-card { flex:0 0 100%; min-width:0; scroll-snap-align:center; scroll-snap-stop:always; border:1px solid var(--venue-color); border-radius:18px; background:#111e39; overflow:hidden; box-shadow:inset 0 1px #ffffff20; }
.venue-art { position:relative; height:160px; overflow:hidden; padding:12px 16px; isolation:isolate; color:var(--venue-color); background:radial-gradient(ellipse at 70% 90%,#7296a943,transparent 60%),linear-gradient(120deg,#050e29cc,#10243c66),url('/assets/cosmic-background.webp') center/cover; }
.venue-art:after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(145deg,var(--venue-color),transparent 80%); opacity:.1; }
.venue-art-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.venue-tier { font:700 9px/1.5 system-ui; letter-spacing:1.6px; border:1px solid #ffffff42; border-radius:7px; padding:4px 7px; background:#0511269c; color:var(--venue-color); }
.venue-flag { font-size:21px; line-height:1.2; }
.venue-skyline { position:absolute; left:0; bottom:-4px; width:100%; height:145px; z-index:-1; opacity:.75; }
.venue-card .venue-art h3 { font:850 29px/1.25 system-ui; color:#fff; letter-spacing:-.6px; padding:0; margin:10px 0 3px; text-align:left; text-shadow:0 3px 14px #020816; }
.venue-art p { position:relative; width:calc(100% - 106px); font:600 12px/1.6 system-ui; margin:0; color:var(--venue-color); }
.venue-art img { position:absolute; bottom:0; right:8px; width:109px; height:109px; object-fit:contain; filter:drop-shadow(0 8px 12px #020923); }
.venue-orbit { position:absolute; width:180px; height:38px; bottom:12px; left:16px; border:1px solid var(--venue-color); border-radius:50%; transform:rotate(-8deg); box-shadow:0 0 14px var(--venue-color),inset 0 0 14px #47eaff55; opacity:.5; z-index:-1; }
.venue-record { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 13px; font:500 10px/1.5 system-ui; color:#a4b9d8; background:linear-gradient(110deg,#17233b,#09172c); }
.venue-record>span:first-child { color:#ffe499; }
.venue-record b { font-weight:800; }
.venue-navigation { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0; flex-shrink:0; }
.venue-navigation>span { font-size:10px; color:#bcd1e9; }
.venue-navigation>div { display:flex; gap:5px; align-items:center; }
.arena-selector .venue-navigation button { min-width:36px; width:36px; min-height:36px; font:700 24px/1 system-ui; padding:1px; border:0; background:#1b2c48; border-radius:10px; }
.venue-navigation #venue-position { min-width:42px; text-align:center; font:600 10px/1.6 system-ui; color:#aec8e8; }
.venue-fees { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding:0 1px 3px; overscroll-behavior-x:contain; position:relative; flex-shrink:0; }
.arena-selector .venue-fees button { flex:0 0 auto; min-width:48px; min-height:42px; padding:5px 10px; font:700 12px/1.4 system-ui; border-radius:11px; color:#a5bbd9; background:#101d36; border:1px solid #354a71; }
.arena-selector .venue-fees button.active { background:#183d4b; border-color:var(--selected-venue-color); color:#c1fff0; box-shadow:inset 0 0 0 1px var(--selected-venue-color); }
.venue-details { margin:6px 0 0; color:#a8bbd8; font-size:10px; }
.venue-details summary { cursor:pointer; min-height:30px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:5px 2px; list-style:none; }
.venue-details summary::-webkit-details-marker { display:none; }
.venue-details .icon { width:13px; height:13px; }
.venue-details[open] .icon { transform:rotate(45deg); }
.venue-details p { padding:7px 9px; background:#101e36; border-radius:10px; line-height:1.95; margin:0; }
.arena-footer { flex-shrink:0; border-top:1px solid #475b80; padding-top:10px; background:linear-gradient(#0b162e,#0a142b); }
.venue-money { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:8px; }
.venue-money>div { min-width:0; border:1px solid #3d5377; border-radius:12px; padding:4px 10px; background:#14213c; }
.venue-money .venue-prize { background:linear-gradient(120deg,#392f1d,#1d2942); border-color:#a69055; }
.venue-money small { display:block; font-size:10px; line-height:1.85; color:#a9bedb; }
.venue-money strong { display:block; font:800 20px/1.3 system-ui; color:#fff; }
.venue-money .coin { font-size:20px; }
.venue-prize strong { color:#ffe298; }
.arena-selector .venue-play { min-height:56px; padding:7px 14px; display:flex; align-items:center; gap:10px; border-radius:14px; background:linear-gradient(120deg,#77ffe4,#21dbbe); color:#05383d; border:1px solid #91ffde; box-shadow:0 4px 18px #00edc322,inset 0 1px #ddfff8; }
.venue-play>.icon { width:23px; height:23px; flex-shrink:0; }
.venue-play>span { flex:1; min-width:0; text-align:left; font-size:14px; font-weight:650; line-height:1.7; }
.venue-play small { display:block; font:500 9px/1.5 system-ui; color:#0b5957; }
.venue-play>b { font:800 15px/1.5 system-ui; white-space:nowrap; }
.arena-selector .venue-play:disabled { background:#263752; border-color:#526682; color:#bdcde4; opacity:1; box-shadow:none; }
.venue-play:disabled small { color:#99adc9; }
.venue-footer-links { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:4px; }
.venue-footer-links>small { font-size:9px; line-height:1.9; color:#9bb6d4; }
.arena-selector .venue-footer-links>button { min-height:32px; font:600 10px/1.5 system-ui; padding:5px 0; border:0; background:none; color:#90f6df; text-align:right; }
.arena-selector .venue-recharge { min-height:44px; margin-top:6px; }
.friend-options-header { clear:both; }
.friend-options-header>small { font:700 9px/1.6 system-ui; letter-spacing:1.4px; color:#75f3dd; }
.friend-options-modal #join-form { margin:16px 0; }
.friend-options-modal>button { margin-top:9px; }
@media(max-width:365px) {
  dialog.arena-selector { padding:12px; gap:8px; border-radius:19px; }
  .venue-header { gap:6px; padding-right:39px; }
  .venue-header h2 { font-size:17px; }
  .venue-header .eyebrow { font-size:7px; letter-spacing:1px; }
  .venue-header .coin-pill { padding:5px; }
  .venue-header .coin { font-size:10px; }
  .venue-card .venue-art h3 { font-size:26px; }
  .venue-art { padding:12px; }
  .venue-art p { font-size:11px; }
  .venue-footer-links { gap:5px; }
  .venue-money strong,.venue-money .coin { font-size:19px; }
  .venue-play>b { font-size:13px; }
  .venue-play>span { font-size:12px; }
}
@media(max-height:650px) {
  dialog.arena-selector[open] { gap:7px; }
  .venue-art { height:140px; }
  .venue-card .venue-art h3 { margin-top:6px; }
  .venue-art img { width:87px; height:87px; }
  .venue-record { padding:7px 11px; }
}
@media(prefers-reduced-motion:reduce) { .venue-track,.venue-fees { scroll-behavior:auto; } }

@media(min-height:760px) { .venue-art { height:184px; } }

.venue-kind-tabs button>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
