/* Silver phone-case finish with flowing blue/red strokes. Game pieces keep their own colours. */
:root{--bg:#f3f5fb;--bg-2:#e9edf8;--surface:#fff;--surface-2:#f5f7fe;--surface-3:#e9eefb;--text:#15233e;--text-2:#52617b;--text-3:#66758d;--brand:#214fce;--brand-2:#173da6;--brand-3:#142e78;--brand-soft:#e9efff;--danger:#ce2847;--danger-2:#aa203a;--danger-soft:#ffedf1;--border:#dce3f1;--border-strong:#b7c5df;--red-accent:#e33756;--blue-accent:#285bdf;--shadow-sm:0 4px 18px #1e3f7910;--shadow-md:0 12px 30px #21467418;--header-height:76px}
html[data-theme='dark']{--bg:#10182c;--bg-2:#151f37;--surface:#19243c;--surface-2:#202e49;--surface-3:#273858;--text:#f1f4ff;--text-2:#bdc9e2;--text-3:#a7b7d5;--brand:#416ce1;--brand-2:#abc2ff;--brand-3:#8faaff;--brand-soft:#263d70;--border:#354765;--border-strong:#526c94;--danger:#ef5773;--danger-2:#ff8196;--danger-soft:#4b263c;--red-accent:#fa6d86;--blue-accent:#7a9dff}
body{background:var(--bg);background-image:radial-gradient(ellipse at 95% 0,#e3375608,transparent 36%),radial-gradient(ellipse at 0 50%,#285bdf08,transparent 38%)}
button,input,select{font:inherit}button{white-space:nowrap}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--blue-accent);outline-offset:3px}
.btn-primary,.btn-primary:hover:not(:disabled),html[data-theme='dark'] .btn-primary{background:#204c91;color:#fff;border-color:#285a9b}
.btn-primary:hover:not(:disabled),html[data-theme='dark'] .btn-primary:hover:not(:disabled){background:#173d79;border-color:#4775b7;color:#fff;box-shadow:0 5px 14px #183d7c28}
.btn-gold,.btn-danger{background:#9a2b48;color:#fff;border-color:#ad405a}.btn-gold:hover:not(:disabled),.btn-danger:hover:not(:disabled){background:#80253e;color:#fff}
:is(.btn-primary,.btn-gold,.btn-danger){position:relative;isolation:isolate;overflow:hidden;border-radius:11px;box-shadow:inset 0 1px #ffffff38;transition:background-color .16s,border-color .16s,box-shadow .16s}
:is(.btn-primary,.btn-gold,.btn-danger)::before{content:'';position:absolute;top:-30%;bottom:-30%;right:3px;width:28px;z-index:-1;pointer-events:none;transform:skewX(-24deg);background:linear-gradient(90deg,#79bbff66,#eaf2ff99 42%,#d9426599 47%,#e8567b80);opacity:.22}
:is(.btn-primary,.btn-gold,.btn-danger)::after{content:none}
:is(.btn-primary,.btn-gold,.btn-danger):disabled,html[data-theme='dark'] .btn-primary:disabled{background:var(--dis-bg);color:var(--dis-text);border-color:var(--dis-border);box-shadow:none}
:is(.btn-primary,.btn-gold,.btn-danger):disabled::before{opacity:0}.quick-create[aria-busy='true']{cursor:progress}
.ui-line-icon{display:block;width:20px;height:20px;min-width:20px;flex:0 0 20px;object-fit:contain;pointer-events:none}
.btn-icon,.btn-icon-18{width:20px!important;height:20px!important;min-width:20px;flex:0 0 20px;object-fit:contain}
.btn-primary,.btn-gold,.btn-sm,.chat-send-btn,.chat-send-round,.drawer-close,.panel-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap}
.bga-header{isolation:isolate;border-bottom:1px solid #c4cedc;background:#edf1f7;box-shadow:0 2px 14px #344b6d0d}
.bga-header::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(118deg,#fbfcff 0%,#dce4ee 30%,#f7faff 58%,#c7d8ef80 76%,#f4e2e8 100%)}
.bga-header::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(121deg,transparent 70%,#92bce166 73%,#c6e4fb99 76%,#eaf2f7 78%,#da5a7966 81%,#ef9bac55 84%,transparent 88%);border-bottom:2px solid #b9c7dd}
html[data-theme='dark'] .bga-header{background:#1b283e;border-bottom-color:#51617b}
html[data-theme='dark'] .bga-header::before{background:linear-gradient(118deg,#18243a,#2b3c56 58%,#3d3049)}
html[data-theme='dark'] .bga-header::after{opacity:.28}
.bga-header-inner{height:var(--header-height);min-height:var(--header-height);padding:10px 24px;gap:20px;flex-wrap:nowrap;max-width:1680px}
.bga-logo{min-width:0}.bga-logo-icon{width:34px!important;height:34px!important;flex:0 0 34px;background:var(--brand-soft)}.bga-logo-text{color:var(--text)}
.bga-nav{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0;overflow-x:auto;scrollbar-width:none}.bga-nav-item{white-space:nowrap;min-height:38px;flex-shrink:0}
.bga-nav-item.active{background:var(--brand-soft);color:var(--brand-2);box-shadow:inset 0 -2px var(--red-accent)}
.bga-user{flex:none;margin-left:auto}.net-dot{flex:0 0 7px;width:7px;height:7px}
.bga-main{max-width:1680px;min-width:0;align-items:stretch}.bga-content{max-width:none;padding:30px;min-width:0}
.bga-sidebar{width:202px;min-width:202px;padding:24px 12px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border)}
.sidebar-title{padding:0 12px;letter-spacing:.12em}.sidebar-item{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:12px;width:100%;padding:12px;margin:4px 0;border:1px solid transparent;background:transparent;box-shadow:none;text-align:left;white-space:nowrap;color:var(--text-2);font-weight:500}
.sidebar-item>.ui-line-icon{color:var(--blue-accent)}.sidebar-item.active{background:var(--brand-soft);color:var(--brand-2);border-color:var(--border);box-shadow:inset 3px 0 var(--red-accent);font-weight:700}.sidebar-item.active>.ui-line-icon{color:var(--red-accent)}
.sidebar-item:hover{background:var(--surface-2);box-shadow:none}.sidebar-item span{overflow:hidden;text-overflow:ellipsis}
.hero{background:#e9eef5;border:1px solid #d1dae7;border-radius:25px;box-shadow:0 12px 28px #344b6d0b,inset 0 1px #ffffff;min-height:170px;color:#192d50}
.hero::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(113deg,#fbfcff 0%,#e0e7f0 36%,#f8faff 55%,#d4dde9 80%,#edf2f8 100%)}
.hero::after{content:'';position:absolute;inset:-50% -10%;width:auto;height:auto;z-index:-1;transform:rotate(-5deg);font-size:0;pointer-events:none;background:linear-gradient(124deg,transparent 48%,#9cc9ed55 50%,#69a6d9a8 54%,#adcff0bb 57%,#f2f7fdcc 60%,#c2d1e9a6 62%,#de526d99 64%,#ed8b9d88 68%,#e4cbd855 71%,transparent 75%);mask-image:radial-gradient(ellipse at 72% 50%,#000 30%,transparent 66%)}
.hero h1{color:#192d50}.hero p{color:#4d607a}.hero .eyebrow{color:#9b304c}
html[data-theme='dark'] .hero{border-color:#3d4f6b;background:#1c2b43}html[data-theme='dark'] .hero::before{background:linear-gradient(113deg,#1b2b43,#30405c 65%,#26344c)}html[data-theme='dark'] .hero::after{opacity:.45}html[data-theme='dark'] .hero h1{color:#f3f6ff}html[data-theme='dark'] .hero p{color:#c4d0e6}html[data-theme='dark'] .hero .eyebrow{color:#f5a3b5}
.game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;min-width:0;margin-top:20px}.game-card{display:flex;flex-direction:column;min-width:0;height:100%;border-color:var(--border);box-shadow:var(--shadow-sm)}
.game-card .g-body{display:flex;flex-direction:column;flex:1;min-width:0;gap:8px}.game-card .g-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-card .g-meta{white-space:nowrap;color:var(--text-2)}
.game-card .g-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;line-height:1.75;min-height:5.25em;margin:0}
.game-card>.quick-create{flex:none;width:calc(100% - 32px);min-height:38px;margin:0 16px 16px!important}.game-card[data-selected='true']{border-color:var(--blue-accent);box-shadow:0 0 0 2px var(--brand-soft)}
.room-options{position:sticky;top:calc(var(--header-height) + 8px);z-index:35;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 16px;padding:0;background:var(--surface);border:0;border-radius:13px;max-width:100%}
.room-setting-tile{display:flex;align-items:center;gap:12px;min-width:0;min-height:66px;padding:12px 18px;border:1px solid var(--border);border-radius:13px;background:var(--surface-2);cursor:pointer;color:var(--text)}
.room-setting-tile:has(input:checked){border-color:var(--blue-accent);background:var(--brand-soft)}.room-setting-tile:focus-within{outline:2px solid var(--blue-accent);outline-offset:2px}.room-setting-tile>.ui-line-icon{color:var(--brand-2);flex-shrink:0}.room-setting-copy{display:grid;gap:3px;min-width:0}.room-setting-copy b{font-size:14px}.room-setting-copy small{font-size:11px;color:var(--text-2);white-space:nowrap}.room-setting-tile input{order:3;margin:0 0 0 auto;width:17px;height:17px;accent-color:#245ca1;flex:0 0 17px}
.room-code{color:var(--brand-2);background:var(--brand-soft);border-color:var(--border);font-variant-numeric:tabular-nums;letter-spacing:.12em}
.passcode-modal{max-width:390px;width:calc(100vw - 36px)}.passcode-modal>.ui-line-icon{color:var(--brand)}.passcode-modal h2{font-size:22px;margin:16px 0 10px}.passcode-modal p{font-size:13px;color:var(--text-2);line-height:1.8}.passcode-input{width:100%;font-size:32px;text-align:center;letter-spacing:.5em;padding:12px 0 12px .5em;font-variant-numeric:tabular-nums}.passcode-modal .passcode-error{min-height:24px;color:var(--danger-2);margin:7px 0}.passcode-actions{display:flex;justify-content:flex-end;gap:10px}
.filter-bar{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;scrollbar-width:thin}.filter-btn{flex:none}.page-header{flex-wrap:nowrap;min-width:0}.page-header>div:first-child{min-width:0}.page-header>.row{flex-wrap:nowrap;flex:none}
.room-header{flex-wrap:nowrap;padding:16px 22px;gap:12px}.room-title-section{min-width:0;flex-wrap:nowrap}.room-game-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-status{white-space:nowrap;flex:none}.room-header>.row{flex-wrap:nowrap;flex-shrink:0;gap:8px}
.room-header .btn-sm{min-height:36px;padding:7px 12px}.room-table-id{color:var(--brand-2);flex:none}.room-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;background:var(--surface-2);padding:12px 22px}.room-actions>*{flex-shrink:0}.room-actions select{max-width:160px}
.room-main{flex-direction:row;min-width:0}.room-main .game-area{align-items:flex-start;background-color:#142847;padding:22px;min-width:0}.side-panel{width:280px;background:var(--surface);border-left:1px solid var(--border)}
.panel-header{background:var(--surface-2);color:var(--text-2)}.player-item{gap:10px}.player-item.host{background:var(--brand-soft)}.chat-input-area{align-items:center;flex-wrap:nowrap;gap:6px}.chat-input{min-width:0;width:0;flex:1}.chat-send-btn{white-space:nowrap;padding:6px 9px}.chat-send-btn .ui-line-icon{width:16px;height:16px;flex-basis:16px;min-width:16px}
.room-header,.room-actions,.side-panel{color:var(--text)}.overlay{z-index:300}.panel-toggle,.panel-scrim,.drawer-heading{display:none}
.community-layout{min-width:0}.community-sidebar{min-width:0}.search-bar{min-width:0}.filter-search{min-width:0}
@media(min-width:881px) and (max-width:1250px){.game-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.bga-content{padding:24px}.bga-sidebar{width:180px;min-width:180px}.bga-header-inner{gap:14px}.room-header .room-status{display:none}.side-panel{width:250px}}
@media(max-width:880px){
  :root{--header-height:64px}.bga-main{display:flex;flex-direction:column}.bga-content{width:100%;padding:20px 14px}.bga-header-inner{height:var(--header-height);min-height:var(--header-height);padding:8px 12px;gap:8px}
  .bga-logo-text,.bga-user-info{display:none}.bga-nav{flex:1;gap:2px}.bga-nav-item{font-size:12px;padding:7px 8px;min-height:36px}.bga-user{margin-left:auto}.bga-logo-icon{width:32px!important;height:32px!important;flex-basis:32px}.bga-avatar{width:32px;height:32px}
  .panel-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:36px;padding:6px;min-height:36px;flex:0 0 34px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--brand-2)}
  .panel-toggle[aria-expanded='true']{background:var(--brand-soft);border-color:var(--blue-accent)}
  .bga-main .bga-sidebar{display:none;position:fixed;top:calc(var(--header-height) + 12px);bottom:12px;left:12px;width:min(252px,calc(100vw - 24px));min-width:0;padding:14px;border:1px solid var(--border-strong);border-radius:16px;background:var(--surface);z-index:120;box-shadow:0 16px 50px #0b1f493d;overflow:auto;flex-direction:column;gap:0}
  #app.nav-open .bga-main .bga-sidebar{display:flex}.bga-sidebar .sidebar-section{display:block;flex:none;margin-bottom:16px}.bga-sidebar .sidebar-title{display:block;margin:16px 0 8px}.bga-sidebar .sidebar-item{width:100%;display:grid;margin:4px 0}
  .drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:4px 3px 12px;border-bottom:1px solid var(--border);color:var(--text)}
  .drawer-close{width:32px;height:32px;padding:5px;background:var(--surface-2);border:1px solid var(--border);color:var(--brand-2)}
  .nav-open .panel-scrim,.chat-open .panel-scrim{display:block;position:fixed;inset:var(--header-height) 0 0;background:#09173565;border:0;border-radius:0;z-index:110;padding:0;box-shadow:none;backdrop-filter:blur(3px)}
  .nav-open .bga-header,.chat-open .bga-header{z-index:130}
  .hero{padding:25px 22px;min-height:145px;margin-bottom:20px;border-radius:20px}.hero h1,.hero p{max-width:100%}.hero h1{font-size:27px}.hero p{font-size:12px}.hero::after{opacity:.75;inset:-30% -50%}
  .game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game-card .g-body{padding:13px 12px}.game-card .g-name{font-size:15px}.game-card .g-desc{font-size:12px}.game-card>.quick-create{margin:0 12px 12px!important;width:calc(100% - 24px)}
  .room-options{top:calc(var(--header-height) + 6px);gap:10px}.room-setting-tile{padding:12px 10px;gap:7px;min-height:64px}.room-setting-copy small{font-size:10px}.room-setting-copy b{font-size:13px}.room-setting-tile>.ui-line-icon{width:17px;height:17px;min-width:17px;flex-basis:17px}
  .room-header{padding:12px;gap:8px}.room-title-section{gap:8px;flex:1}.room-header .room-status{display:none}.room-header>.row{gap:6px}.room-header .btn-sm{padding:6px 8px;gap:5px;font-size:12px}.room-game-name{font-size:14px}.room-table-id{font-size:10px;padding:7px}
  .room-actions{padding:10px 12px;gap:8px}.room-actions button{white-space:nowrap}.room-main{flex-direction:row}.room-main .game-area{width:100%;padding:18px 10px;min-height:60vh}
  .room-main .side-panel{display:none;position:fixed;top:calc(var(--header-height) + 12px);bottom:12px;right:12px;width:min(340px,calc(100vw - 24px));border:1px solid var(--border-strong);border-radius:16px;z-index:120;box-shadow:0 16px 50px #0b1f493d;overflow:hidden;flex-direction:column;background:var(--surface)}
  .chat-open .room-main .side-panel{display:flex}.side-panel>.drawer-heading{padding:12px}.side-panel>.panel-section:first-of-type{max-height:34vh;overflow:auto;flex:none}.side-panel .players-list{max-height:26vh;overflow:auto}.side-panel .chat-area{flex:1;min-height:0}.side-panel .chat-messages{flex:1;max-height:none;overflow:auto;min-height:0}
  .page-header{gap:10px;align-items:center}.page-header .page-subtitle{font-size:12px}.page-header .page-title{font-size:23px}.page-header>.btn-primary{padding:8px 12px}.community-layout{display:grid;grid-template-columns:1fr}.community-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
@media(max-width:480px){.bga-header-inner{gap:6px;padding:8px 10px}.bga-nav-item{padding:7px 6px}.net-dot{display:none}.card{padding:13px}.hero h1{font-size:25px}.room-header .btn-gold .ui-line-icon,.room-header .btn-sm .ui-line-icon{width:16px;height:16px;min-width:16px;flex-basis:16px}.room-header .btn-sm{font-size:11px;gap:4px}.room-header .room-game-name{max-width:82px}.room-header>.row{gap:5px}.room-header .chat-toggle{width:32px;flex-basis:32px;padding:5px}.room-options-title{gap:6px}.room-options{border-radius:10px}}
@media(prefers-reduced-motion:reduce){.panel-scrim,.bga-sidebar,.side-panel,.btn-primary,.btn-gold,.btn-danger{transition:none}}

/* Poster art is displayed edge-to-edge without product boxes or oversized single tokens. */
.catalogue-cover .cover-backdrop{object-position:center 42%;filter:saturate(1.04);transform:none}.catalogue-cover:hover .cover-backdrop{transform:scale(1.035)}.cover-shade{background:linear-gradient(180deg,#07152605 0%,#07152608 20%,#07152640 45%,#071526bd 100%)}.catalogue-cover .cover-brand-copy{inset:20% 8% 6%;justify-content:center}.game-card>.game-cover{height:180px;min-height:180px}
@media(max-width:700px){.game-card>.game-cover{height:145px;min-height:145px}.catalogue-cover .cover-brand-copy{inset:14% 6% 6%}}
/* Completed-game replay: familiar board, read-only controls and every hand face up. */
.replay-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}.replay-item{min-width:0;display:flex;flex-direction:column;gap:10px;overflow:hidden}.replay-item h3,.replay-item p{margin:0}.replay-item p{font-size:12px;overflow-wrap:anywhere}.replay-item button{margin-top:auto}.replay-cover{width:100%;height:135px;object-fit:cover;border-radius:10px}.replay-viewer{scroll-margin-top:calc(var(--header-height) + 12px);padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}.replay-viewer[hidden]{display:none}.replay-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.replay-heading h2{font-size:20px;margin:0}.replay-heading p{margin:6px 0;font-size:12px}.replay-heading>button{flex:none}.replay-result{font-size:12px;color:var(--brand-2);padding:8px 0}.replay-controls{display:flex;align-items:center;gap:8px;overflow-x:auto;flex-wrap:nowrap;padding:12px 0}.replay-controls>*{flex-shrink:0}.replay-controls button{min-height:36px;padding:8px 12px}.replay-controls select{padding:8px;min-height:36px;max-width:165px}.replay-step{margin-left:auto;font-size:12px;white-space:nowrap}.replay-viewer>input[type='range']{width:100%;accent-color:var(--brand);padding:0;margin:6px 0;min-height:22px;cursor:pointer}.replay-description{font-size:12px;color:var(--text-2)}.replay-board{padding:22px;border-radius:13px;background:#18324b;overflow:auto;min-width:0;position:relative}.replay-board>div{min-width:0;width:100%}.replay-board button:disabled{opacity:1}.replay-open-hands{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}.replay-open-hands>h3,.replay-hidden{grid-column:1/-1;margin:0}.replay-player-hand{padding:14px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;min-width:0}.replay-player-hand h4{font-size:13px;margin:0 0 10px}.replay-player-hand p{font-size:12px;overflow-wrap:anywhere}.replay-hand-cards{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}.replay-card{position:relative;width:64px;display:flex;flex-direction:column;align-items:center;flex:none;gap:4px}.replay-card>img,.replay-card>svg{display:block;width:64px;height:90px;object-fit:contain;border-radius:5px}.replay-card small{font-size:10px;text-align:center;line-height:1.4;color:var(--text)}.replay-role{color:var(--danger-2);font-weight:700}.replay-hidden{border:1px solid var(--border);border-radius:10px;padding:12px;font-size:12px;max-width:100%;overflow:hidden}.replay-hidden summary{cursor:pointer}.replay-hidden pre{max-height:300px;overflow:auto;color:var(--text-2);white-space:pre-wrap;overflow-wrap:anywhere}.replay-player-hand .mj-tile.sm{width:34px;height:48px}.replay-board .hand{pointer-events:none}
@media(max-width:1000px){.replay-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.replay-viewer{padding:14px}.replay-heading h2{font-size:16px}.replay-heading>button{padding:8px;font-size:12px}.replay-open-hands{grid-template-columns:1fr}.replay-board{padding:12px 7px}.replay-card{width:56px}.replay-card>img,.replay-card>svg{width:56px;height:78px}.replay-item{padding:12px}.replay-cover{height:100px}.replay-controls{gap:6px}.replay-controls button{font-size:12px;padding:7px 10px}}
/* Layered cobalt, oxblood and silver across the shared interface. */
:root{--blue-deep:#18365f;--blue-mid:#2c65ac;--red-deep:#762b49;--red-mid:#b8395f;--overlap:#60446f}
body{background-image:radial-gradient(ellipse at 0 4%,#3773c514,transparent 48%),radial-gradient(ellipse at 100% 18%,#c2385c13,transparent 46%),linear-gradient(130deg,#f3f6fc,#eef1f9 60%,#f7eef3)}
html[data-theme='dark'] body{background-image:radial-gradient(ellipse at 0 4%,#2b60aa24,transparent 48%),radial-gradient(ellipse at 100% 18%,#aa2d5320,transparent 46%),linear-gradient(130deg,#101a2d,#171b32 65%,#25192d)}
.bga-header::before{background:linear-gradient(110deg,#f3f7ff 0%,#d9e5f5 35%,#eef1f9 59%,#dfcddf 80%,#edc8d1 100%)}
.bga-header::after{background:linear-gradient(122deg,transparent 64%,#508cd244 68%,#6d9fdb80 72%,#b0c8eab3 76%,#dfdceae6 78%,#b7527680 81%,#d4587c66 86%,transparent 92%);border-bottom:2px solid #b6c6df}
.hero{border-color:#c9d2e5;box-shadow:0 12px 32px #263c7414,inset 0 1px #fff}
.hero::before{background:radial-gradient(ellipse at 80% 80%,#a8446738,transparent 58%),radial-gradient(ellipse at 68% 10%,#3175c93d,transparent 50%),linear-gradient(110deg,#f4f7fd 8%,#e4ebf6 41%,#d1ddf0 70%,#ead5e2)}
.hero::after{inset:-48% -8%;background:linear-gradient(124deg,transparent 46%,#3c7fc780 49%,#3372bdc4 53%,#a3bee7cc 57%,#e2e7f4b3 59%,#72517f88 62%,#b82d5a9c 65%,#df6b8c7d 69%,transparent 76%);mask-image:radial-gradient(ellipse at 73% 50%,#000 30%,transparent 70%)}
html[data-theme='dark'] .hero::before{background:radial-gradient(ellipse at 85% 80%,#96345d70,transparent 62%),linear-gradient(110deg,#1b2b43,#2b4266 62%,#4c2b4b)}
html[data-theme='dark'] .hero::after{opacity:.65}
.sidebar-item.active,.bga-nav-item.active{background-image:linear-gradient(110deg,#e5eeff 0%,#e7eaf7 65%,#f2dfe9 100%)}
html[data-theme='dark'] .sidebar-item.active,html[data-theme='dark'] .bga-nav-item.active{background-image:linear-gradient(110deg,#243e6a,#35365c 70%,#532c50)}
.btn-primary,html[data-theme='dark'] .btn-primary{background-color:#204c91;background-image:linear-gradient(112deg,#193e7a 0%,#285ba2 56%,#3a4b88 81%,#752d52 100%)}
.btn-primary:hover:not(:disabled),html[data-theme='dark'] .btn-primary:hover:not(:disabled){background-color:#173d79;background-image:linear-gradient(112deg,#16346a,#224f90 56%,#672749)}
.btn-gold,.btn-danger{background-image:linear-gradient(112deg,#83243f,#a12e4f 57%,#69416d 83%,#36457a)}
:is(.btn-primary,.btn-gold,.btn-danger)::before{width:35%;opacity:.16}
:is(.btn-primary,.btn-gold,.btn-danger):disabled,html[data-theme='dark'] .btn-primary:disabled{background-image:none}
.room-header{background-image:linear-gradient(110deg,#2b5d9f08,transparent 50%,#a83b5d0b);border-bottom:1px solid var(--border)}
.room-actions{border-bottom:1px solid var(--border);background-image:linear-gradient(110deg,#2b5d9f09,transparent 62%,#a83b5d09)}
.room-actions>button{display:inline-flex;align-items:center;justify-content:center;gap:7px}.room-actions .ui-line-icon{width:17px;height:17px;min-width:17px;flex-basis:17px}
.room-main .game-area,.replay-board{color:#edf3ff;background-position:center;background-size:cover;background-repeat:no-repeat}
.game-area[data-table='dark'] .game-board-placeholder h3{color:#f1f5ff}.game-area[data-table='dark'] .game-board-placeholder p{color:#c1cfe6}
.game-area[data-table='dark'] .section-title,.game-area[data-table='dark'] .dim{color:#c7d4eb}
.side-panel .panel-header{background-image:linear-gradient(110deg,#2b5d9f0a,transparent 55%,#a83b5d0a)}.player-item.host{background-image:linear-gradient(115deg,#2d69bc0f,#9140690c)}
.player-avatar .crown,.avatar .crown{display:grid;place-items:center;width:18px;height:18px;padding:2px;background:linear-gradient(130deg,#174f98,#6f3457);color:#fff;border:1px solid #e5ebf5;border-radius:6px;box-shadow:0 2px 5px #09182d33}
.player-avatar .ready-check,.avatar .check{display:grid;place-items:center;width:16px;height:16px;padding:2px;background:#2156a1;color:#fff;border:1px solid #e5ebf5;border-radius:50%}
.crown .ui-line-icon,.ready-check .ui-line-icon,.avatar .check .ui-line-icon{width:12px;height:12px;min-width:12px;flex-basis:12px}
.emoji-toggle{display:inline-flex;align-items:center;justify-content:center;color:var(--brand-2);background:var(--surface-2)}.emoji-toggle .ui-line-icon{width:19px;height:19px;min-width:19px}
.mb-side-panel{background:#132841ed;border-color:#45627f66;color:#edf3ff;box-shadow:0 6px 18px #02081725}.mb-player-strip b{color:#f1f5ff}.mb-player-strip>span{color:#c7d4eb}
.game-area .phase-banner{background:linear-gradient(112deg,#e6edf9,#e8e8f4 68%,#eedee9);color:#243650;border:1px solid #b6c9e0}.game-area .phase-banner.phase-night{background:linear-gradient(112deg,#1c355c,#3d2846);color:#edf3ff;border-color:#55617e}
.card-cn-name{font-family:'Table Catalogue Cursive','STXingkai','KaiTi',cursive;font-weight:400;font-size:clamp(14px,1.35vw,18px);line-height:1.35;letter-spacing:.035em;-webkit-text-stroke:2.5px #fff}.card-detail-visual .card-cn-name{font-size:20px}
.replay-card small{font-family:'Table Catalogue Cursive','STXingkai','KaiTi',cursive;font-size:13px}
@media(max-width:700px){.card-cn-name{font-size:14px}.room-actions .ui-line-icon{width:16px;height:16px;min-width:16px;flex-basis:16px}.hero::after{inset:-30% -50%}}
/* Photographic materials with deterministic, accessible game geometry. */
.board[data-material]{background-image:var(--surface-art);background-size:cover;background-position:center;isolation:isolate;gap:0;padding:12px;border:1px solid #9cabc988;box-shadow:0 18px 32px #02081566,inset 0 0 0 3px #e6d5aa28}
.board[data-game='tictactoe']{aspect-ratio:1;grid-template-columns:repeat(3,minmax(0,1fr))}.board[data-game='tictactoe'] .cell{background:#10274755;border:1px solid #e8cf9455;border-radius:4px}.board[data-game='tictactoe'] .cell:hover:not(:disabled){background:#4c6d9655}
.board[data-game='connect4']{aspect-ratio:7/6;padding:12px;gap:5px;border-radius:14px}.board[data-game='connect4'] .cell{border-radius:50%;background:radial-gradient(circle,#0a182a 0%,#0c2037 64%,#52749d 68%,#12355b 76%);border:0;box-shadow:inset 0 3px 8px #0008;aspect-ratio:1;min-width:0}
.board[data-game='gomoku']{aspect-ratio:1;padding:14px;gap:0;border-radius:8px;position:relative}.board[data-game='gomoku'] .cell{position:relative;border:0;border-radius:0;background-color:transparent;aspect-ratio:1;min-width:0}.gomoku-grid{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}.board[data-game='gomoku'] .cell:hover:not(:disabled){background-color:#fff3c533}.board[data-material] .cell .piece{display:block;width:88%;height:88%;object-fit:contain;z-index:1}.board[data-game='gomoku'] .cell .piece{width:86%;height:86%}.board[data-material] .cell.win{outline:2px solid #ffe3a7;outline-offset:-2px}
.pw-cell.on[data-material]{background-image:var(--surface-art)!important;background-size:75px 75px!important;border:1px dashed #eadbc599!important}.pw-shape{display:flex;align-items:center;justify-content:center;min-height:62px}.pw-shape>.pw-px{display:none}.pw-authentic-patch{display:block;max-width:100%;width:auto;height:68px;filter:drop-shadow(0 2px 2px #0005)}.pw-shape .pw-authentic-patch{min-width:32px;max-width:125px}.pw-opp [data-material]{background-image:var(--surface-art)!important;background-size:60px 60px!important}
.mj-symbol[data-material]{background-color:#faf7eb;background-image:var(--surface-art);background-size:100% 100%;background-position:center;border:0;padding:2px 3px 5px;box-shadow:0 2px 4px #020c1a44;filter:none}.mj-symbol-back[data-material]{font-size:0;color:transparent}.mj-symbol-back[data-material] .mj-ink{display:none}
.dm-symbol[data-material]{position:relative;isolation:isolate;background:transparent;box-shadow:none;overflow:hidden;padding:5px}.dm-symbol[data-material]::before{content:'';position:absolute;inset:0;background-image:var(--surface-art);background-size:100% 100%;background-repeat:no-repeat;z-index:-1}.dm-symbol.horizontal[data-material]::before{inset:auto;left:25%;top:-50%;width:50%;height:200%;transform:rotate(90deg)}.dm-symbol[data-material] .dm-symbol-half{background:none}.dm-symbol[data-material] .dm-pip{font-size:clamp(6px,.8vw,10px);color:#243545}
.u-material-face{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:inherit;isolation:isolate}.u-material-face>.face-img,.u-material-face>svg{width:100%;height:100%;display:block;object-fit:fill}.u-material-face::after,.replay-card[data-material]::after{content:'';position:absolute;inset:0;background-image:var(--surface-art);background-size:cover;mix-blend-mode:multiply;opacity:.2;pointer-events:none;border-radius:inherit}.replay-card[data-material]::after{height:90px}
.escape-room-emblem{position:absolute;top:8%;right:8%;display:grid;place-items:center;min-width:22px;min-height:22px;padding:3px;border-radius:6px;font:20px/1 Georgia,'Segoe UI Symbol',serif;color:#f7e4bd;background:#102135cc;border:1px solid #dae3ef66;box-shadow:0 2px 8px #0005;pointer-events:none}.escape-room[data-kind='exit'] .escape-room-emblem{color:#b6ffdf;background:#123d38dd}.escape-room:is([data-kind='acid'],[data-kind='mortal'],[data-kind='trapped']) .escape-room-emblem{color:#ffcda3;background:#5f2227dd}
@media(max-width:700px){.board[data-material]{padding:8px}.board[data-game='connect4']{gap:4px}.board[data-game='gomoku']{padding:10px}.escape-room-emblem{font-size:15px;min-width:18px;min-height:18px;padding:2px}.dm-symbol[data-material]{padding:3px}}

.replay-domino-card{width:46px;height:88px}.replay-domino-card>.dm-symbol{width:46px;height:88px}
/* Unified card interaction: unobstructed artwork, calm selection, radial fan lift. */
.card-cn-name{display:none!important}
:is(.card-uno,.card-kt,.card-mb,.real-card,.uno-top,.kt-pile,.dm-tile,.dm-tile-btn,.card-detail-visual,.replay-card>img){border-radius:12px;outline:none;overflow:hidden}
:is(.card-uno,.card-kt,.card-mb).playable{outline:none;box-shadow:0 5px 14px #02081555,inset 0 0 0 1px #d3e2f555}
.real-card:hover{box-shadow:0 0 0 1px #a4c9ef99,0 12px 22px #0006}.real-card.is-atk,.mb-creature.is-atk{outline:none;box-shadow:0 0 0 2px #7cb9eb,0 0 0 5px #416d9e40,0 9px 20px #0006}
.fan-hand>button:hover,.fan-hand>button:focus-visible,.mb-real-hand.fan-hand>button:hover,.mb-real-hand.fan-hand>button:focus-visible{transform:translateY(var(--fan-lift,0px)) rotate(var(--fan-angle,0deg)) translateY(-30px) scale(1.12);z-index:100!important}
:is(.card-uno,.card-kt,.card-mb).card-unplayable,.fan-hand>.card-unplayable,.fan-hand>.dim,.card-uno.dim,.dm-tile-btn.dimmed{opacity:1;filter:grayscale(.85) brightness(.63) saturate(.5);cursor:default}
:is(.card-uno,.card-kt,.card-mb,.dm-tile-btn)[aria-disabled='true']{opacity:1}
:is(.card-uno,.card-kt,.card-mb,.dm-tile-btn):focus-visible{outline:2px solid #91c8f3;outline-offset:4px}
.card-detail-visual{filter:none!important;opacity:1!important;border-radius:12px}.card-detail-visual img,.card-detail-visual svg{border-radius:12px}
.escape-grid{border-color:#7999bc66}.escape-room,.escape-room.adjacent:not(:disabled){border-color:#82b2dd88}.escape-room.adjacent:not(:disabled){box-shadow:0 0 0 1px #74a9d33d,0 4px 10px #0005}.escape-room-label{color:#e7eef8}.escape-room.hidden .escape-room-label{color:#b8cde6}
.board[data-material] .cell.win{outline-color:#8fcef4}.pw-patch.is-picked{border-color:#79b4e8;box-shadow:0 0 0 2px #5283b555 inset}.pw-patch:disabled{opacity:1;filter:grayscale(.8) brightness(.66)}
.game-area :is(button,.real-card,.card-uno,.card-kt,.card-mb):focus-visible{outline-color:#91c8f3}
.afk-banner{background:linear-gradient(115deg,#e4edf9,#ece8f2);border:1px solid #b6c7e1;border-left:3px solid #537fb8;color:#284f7a}.afk-dot{background:#537fb8}html[data-theme='dark'] .afk-banner{background:linear-gradient(115deg,#1d344f,#3b2b43);color:#b7d4f4;border-color:#4b6484}
.game-area .pw-patch .dim,.game-area .az-factory>.dim{color:var(--text-2)}.game-area .mj-river:not(.is-turn) .mj-river-name{color:#bbcee5}.game-area .mj-river.is-turn .mj-river-name{color:var(--text)}
.az-factory .az-tile:disabled,.az-center .az-tile:disabled{opacity:1;filter:grayscale(.8) brightness(.65)}.az-tile.is-picked{outline-color:#7ab9ee}.mj-tile.is-drawn::after{background:#5798d0}.mj-tile.is-last{outline-color:#7ab9ee}
.turn-draft{position:relative;z-index:5;display:flex;align-items:center;gap:10px;padding:12px 14px;margin:12px 0;border:1px solid #7da5cf88;border-radius:12px;background:linear-gradient(112deg,#e5edf9,#ece8f2);color:#1f3656;box-shadow:0 4px 16px #06162c22}.turn-draft-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}.turn-draft strong{font-size:13px}.turn-draft-copy>span{font-size:11px;color:#4e6280}.turn-draft button{flex:none;min-height:36px;padding:8px 12px;white-space:nowrap}.draft-picked{box-shadow:0 0 0 2px #81bfee,0 0 0 5px #598bc544!important}.pw-cell.draft-placement{background:#81b7df88;outline:1px dashed #dcecff;outline-offset:-3px}.turn-draft .draft-undo{color:#244b7b;background:#fff;border-color:#a8bdd5}.game-area .az-tile.card-unplayable{opacity:1;filter:grayscale(.85) brightness(.65)}
@media(max-width:500px){.turn-draft{flex-wrap:wrap;padding:10px}.turn-draft-copy{flex-basis:100%}.turn-draft button{flex:1}}
.room-main .game-area{flex-direction:column;justify-content:flex-start;align-items:center}.game-stage{flex-shrink:0}.turn-draft-host{position:sticky;bottom:0;z-index:30;width:100%;max-width:900px;flex-shrink:0;margin-top:auto}.turn-draft-host:empty{margin:0}.turn-draft-host .turn-draft{box-shadow:0 8px 28px #020d2866}
.pw-patch.card-unplayable{opacity:1;filter:grayscale(.8) brightness(.68)}.az-line.card-unplayable{opacity:1;filter:grayscale(.75) brightness(.72)}button.mj-tile:disabled .mj-symbol{filter:grayscale(.7) brightness(.7)}
.net-bar{background:linear-gradient(110deg,#224c82,#4b3565 60%,#9a2d4e)}.uno-table{background:linear-gradient(115deg,#152f50f0,#233b60eb 66%,#482b4de8);border:1px solid #6c92bf44;box-shadow:inset 0 1px 7px #a3c9ee15,0 8px 20px #0003}
