.international-layout { display:grid; grid-template-columns:285px minmax(0,1fr); gap:24px; align-items:start; }
.chess-controls label { display:block; margin:20px 0 8px; font-size:13px; }
.chess-controls .muted { margin:15px 0; }
.mode-tabs { display:flex; gap:6px; padding:5px; background:#0b1a1255; border:1px solid var(--line); border-radius:12px; }
.mode-tabs button { flex:1; font-size:12px; padding:8px; }
.mode-tabs button[aria-pressed=true] { background:#5c7851!important; color:#f7f2df!important; }
.mode-tabs button[aria-pressed=false] { background:transparent!important; color:var(--muted)!important; border-color:transparent!important; }
.international-table { min-width:0; }
.chess-frame { position:relative; padding:12px; background:linear-gradient(145deg,#765e3c,#3a3222); border:1px solid #a78c5355; border-radius:7px; box-shadow:0 5px 0 #282a1d,0 20px 40px #0004; max-width:640px; margin:14px auto; }
#chessBoard { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); aspect-ratio:1; width:100%; border:1px solid #19291e; }
#chessBoard .chess-square { display:grid; place-items:center; position:relative; border:0!important; border-radius:0!important; aspect-ratio:1; width:100%; min-height:0; padding:0; margin:0; box-shadow:none; transform:none; transition:none!important; }
#chessBoard .light { background:#e7d9b4; color:#48573d; }
#chessBoard .dark { background:#577057; color:#e5d6a8; }
#chessBoard .chess-square:hover { filter:none; }
#chessBoard .chess-square:focus-visible { outline:3px solid #e8ad58!important; outline-offset:-3px; z-index:4; }
.chess-piece { width:89%; height:89%; overflow:visible; position:relative; z-index:2; filter:drop-shadow(0 3px 1.5px #18251955); pointer-events:none; }
.chess-piece.ivory { color:#fff1cd; --piece-outline:#8b7950; --piece-detail:#b09765; }
.chess-piece.obsidian { color:#253a2f; --piece-outline:#14251a; --piece-detail:#89997c; }
.chess-square .rank,.chess-square .file { position:absolute; z-index:1; font:600 10px/1 sans-serif; pointer-events:none; opacity:.8; }
.rank { top:4px; left:4px; }.file { bottom:3px; right:4px; }
.chess-square.last { box-shadow:inset 0 0 0 99px #d7c96644!important; }
.chess-square.selected { box-shadow:inset 0 0 0 3px #f1d483,inset 0 0 0 99px #ecd17d40!important; }
.chess-square.legal::after { content:''; position:absolute; width:24%; height:24%; border-radius:50%; background:#1f473c55; box-shadow:0 0 0 5px #fff4d222; }
.chess-square.capture::after { content:''; position:absolute; inset:5%; border:3px solid #aa493caa; border-radius:50%; z-index:3; pointer-events:none; }
.chess-square.check { background:radial-gradient(ellipse,#d07653,#99583b)!important; }
.chess-seat { display:flex; align-items:center; gap:10px; max-width:640px; margin:auto; padding:9px 8px; border-radius:8px; }
.chess-seat.active { background:#bfcd9710; }
.chess-seat strong { font-size:13px; overflow-wrap:anywhere; }
.chess-seat small { margin-left:auto; font-size:11px; color:var(--muted); white-space:nowrap; }
.seat-stone { width:22px; height:22px; flex-shrink:0; border-radius:50%; border:1px solid #c0c69d44; box-shadow:0 2px 4px #0004; }
.seat-stone.w { background:radial-gradient(circle at 30% 20%,#fff5d5,#dac397); }.seat-stone.b { background:radial-gradient(circle at 30% 20%,#536951,#1f3227); }
#chessBanner { position:absolute; z-index:5; top:50%; left:50%; transform:translate(-50%,-40%) scale(.9); padding:16px 26px; border:1px solid #e1c388; border-radius:5px; background:#813b2aee; color:#f8ebc8; box-shadow:0 15px 40px #0005; font:27px KaiTi,SimSun,serif; opacity:0; pointer-events:none; transition:transform .3s,opacity .25s; text-align:center; width:max-content; max-width:90%; }
#chessBanner.show { opacity:1; transform:translate(-50%,-50%) scale(1); }
.tables { display:grid; gap:10px; max-height:340px; overflow:auto; margin-top:18px; scrollbar-width:thin; font-size:13px; }
.tables .roomItem { overflow-wrap:anywhere; }
.tables .muted { margin:8px 0; }
.tables button { font-size:12px; padding:7px 10px; }


#notice { font-size:13px; color:var(--gold); min-height:20px; }
.draw-request { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px; margin-top:12px; border:1px solid var(--gold); border-radius:8px; font-size:13px; }
.promotion-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:20px 0; }
.promotion-options button { font-size:24px; }
@media(max-width:900px) { .international-layout { grid-template-columns:1fr; } .international-table { order:-1; } .chess-controls { order:1; } .mode-tabs { max-width:360px; } }
@media(max-width:540px) { .international-table { padding:12px!important; }.chess-frame { padding:6px; }.international-table .table-header { gap:7px; }.table-header #status { font-size:17px; } .chess-square .rank,.chess-square .file { font-size:8px; } }

.ai-shell > .mode-tabs { max-width:340px; margin:0 0 24px; }
