:root{--onca-bg:#10141c;--onca-panel:#1a202a;--onca-line:#303947;--onca-text:#eef2f7;--onca-muted:#9aa6b8;--onca-accent:#ff6375;color-scheme:dark}
:root[data-theme="light"]{--onca-bg:#f5f6fa;--onca-panel:#fff;--onca-line:#e1e5ee;--onca-text:#202735;--onca-muted:#758197;--onca-accent:#e43146;color-scheme:light}
html,body{min-width:0;background:var(--onca-bg)!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif}
.onca-topbar{display:flex;align-items:center;gap:24px;min-height:76px;padding:12px max(20px,calc((100vw - 1180px)/2));border-bottom:1px solid var(--onca-line);background:var(--onca-panel);color:var(--onca-text)}
.onca-game-brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;white-space:nowrap;font-size:14px;font-weight:800}.onca-game-brand img{display:block;width:132px;height:44px;object-fit:contain}
.onca-topbar nav{display:flex;gap:5px;margin-left:auto}.onca-topbar nav a,.onca-user a{padding:9px 11px;color:var(--onca-muted);text-decoration:none;border-radius:8px;white-space:nowrap;font-size:13px;font-weight:700}.onca-topbar nav a[aria-current="page"]{background:color-mix(in srgb,var(--onca-accent) 12%,transparent);color:var(--onca-accent)}
.onca-user{display:flex;align-items:center;gap:5px}.onca-user a{color:var(--onca-text)}.onca-user button{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--onca-line);border-radius:9px;color:var(--onca-text);background:var(--onca-panel);cursor:pointer;font-size:18px}
.onca-game-note{padding:12px 20px 2px;text-align:center;color:var(--onca-muted);font-size:11px;line-height:1.6}.game{padding-top:14px;padding-bottom:36px}.top{color:var(--onca-text);background:var(--onca-panel)!important;border-color:var(--onca-line)!important}.top .brand{font-size:18px}
:root[data-theme="dark"]{--panel:#1a202a;--line:#303947;--muted:#9aa6b8}.table{color:#fff}.table:after{width:43%;height:30%;opacity:.25;background-position:center!important}.bet-panel,.controls,.history,.hall{background:var(--onca-panel)!important;border-color:var(--onca-line)!important}.history-list.live-board-root{background:var(--onca-bg)!important}.notice{line-height:1.6}.hall-head{color:var(--onca-text)}
button:focus-visible,a:focus-visible{outline:3px solid var(--onca-accent);outline-offset:3px}.toast{max-width:calc(100vw - 24px);text-align:center;line-height:1.5}html[data-theme="light"] .toast{background:#fff;color:#202735;border-color:#d8deea}
.chips .chip:nth-child(1){background-image:url('assets/chip1.webp')}.chips .chip:nth-child(2){background-image:url('assets/chip2.webp')}.chips .chip:nth-child(3){background-image:url('assets/chip3.webp')}.chips .chip:nth-child(4){background-image:url('assets/chip4.webp')}.chips .chip:nth-child(5){background-image:url('assets/chip5.webp')}.table #statusLabel{color:#f8d979!important}
@media(max-width:800px){.onca-topbar{gap:10px;min-height:66px;padding:10px 14px}.onca-game-brand span{display:none}.onca-game-brand img{width:108px;height:36px}.onca-topbar nav{gap:0}.onca-topbar nav a{padding:8px;font-size:12px}.onca-topbar nav a:first-child{display:none}.onca-user{gap:1px}.onca-user a{padding:8px 4px;max-width:86px;overflow:hidden;text-overflow:ellipsis;font-size:12px}.onca-user button{width:30px;height:30px}.onca-game-note{padding:9px 12px 0;font-size:10px}.game{padding:9px 8px 28px}.top .brand{font-size:14px}.top .rules-btn{font-size:11px}.gallery-track{transform:translate3d(var(--road-x,-50%),0,0)!important}.hall-head{flex-wrap:wrap}.hall-list{grid-template-columns:1fr}}
@media(max-width:360px){.onca-topbar{gap:5px;padding:9px 8px}.onca-game-brand img{width:94px;height:32px}.onca-topbar nav a{padding:7px 6px}.top{gap:6px}.top .rules-btn{padding:7px}}

/* Original source GIF level badges retain their native animation and admin aspect ratio. */
.game-member,.hall-user .game-member,.row .game-member,.live-bet-cell .game-member{display:inline-flex;align-items:center;gap:4px;max-width:100%;vertical-align:middle}
.game-member>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-level-icon{display:inline-block;flex:0 0 auto;width:22px;height:16px;object-fit:contain;vertical-align:middle}
.game-level-icon.is-admin{width:auto;height:16px;aspect-ratio:23/25}

/* Fit the embedded game width and report content height without a viewport loop. */
body { min-height: 0; }
@media(max-width:360px){.onca-topbar{flex-wrap:wrap}.onca-user{margin-left:auto}}
@media(max-width:600px){
.top{display:grid;grid-template-columns:minmax(0,1fr) auto;height:auto;min-height:60px;padding:10px;gap:8px}
.top .brand{grid-area:1/1}.top .rules-btn{grid-area:1/2}.top .wallet{grid-area:2/2}.top-spacer{display:none}
}

.bet-panel .chips{flex-wrap:wrap;overflow:visible;gap:6px}

.hands{grid-template-columns:repeat(2,minmax(0,1fr));gap:8%}
.hand,.cards{min-width:0}
.cards{gap:4px;align-items:flex-start}
.cards .card{flex:0 1 63px;min-width:0;height:auto;aspect-ratio:63/88}
@media(max-width:800px){.hands{gap:4%}.cards .card{flex-basis:48px;aspect-ratio:48/69}}
