
body { min-height:100vh; }
button:disabled { cursor:not-allowed; }
input,select,textarea { min-width:0; }
.app-nav { align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand img { object-fit:contain; }
.app-nav nav { align-items:center; }
.nav-link { background:none; }
.eyebrow { display:block; }
.lobby-intro { display:flex; align-items:center; justify-content:space-between; }
.lobby-intro h1 { margin-bottom:12px; }
.lobby-ornament { line-height:1; padding-right:25px; }
.lobby-columns { display:grid; align-items:start; }
.lobby-main { display:grid; }
.mode-cards { display:grid; }
.mode-card { display:flex; flex-direction:column; align-items:flex-start; text-align:left; }
.mode-card b { font-weight:400; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; }
.lobby-panel .new-game { display:grid; }
.lobby-panel .new-game label { display:flex; flex-direction:column; align-items:stretch; }
.lobby-panel .new-game select,.lobby-panel .new-game input { width:100%!important; padding:8px 10px; }
.lobby-panel .new-game button { width:100%; }
.lobby-panel #modeSelect,.lobby-panel label:has(#modeSelect) { display:none; }
.lobby-status { margin-top:15px; }
.lobby-decks { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; }
.lobby-deck { display:flex; text-align:left; align-items:center; gap:14px; padding:12px; }
.lobby-deck img { width:46px; aspect-ratio:62/87; object-fit:contain; }
.lobby-deck span { display:grid; gap:8px; }
.appearance-panel { display:grid; gap:15px; }
.appearance-panel .eyebrow { margin:0; }
.appearance-panel label:not(.upload-button) { display:grid; }
.appearance-preview { position:relative; aspect-ratio:1.6; margin:4px 0 10px; }
#matPreview { width:100%; height:100%; object-fit:contain; border-radius:5px; }
#sleevePreview { position:absolute; right:14px; bottom:-10px; width:60px; height:84px; object-fit:contain; filter:drop-shadow(0 2px 3px #0008); }
details { color:var(--text-soft); font-size:12px; line-height:1.7; }
summary { cursor:pointer; }
details label { margin-top:12px; }
.upload-buttons { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:4px; }
.upload-button { padding:10px 4px; text-align:center; border:1px dashed var(--line); border-radius:4px; font-size:12px; cursor:pointer; }
.asset-status { overflow-wrap:anywhere; }
.asset-help code { display:block; overflow-wrap:anywhere; color:var(--text-soft); margin:10px 0; }
.room-wait { margin-top:14px; }
.screen-game .app { width:calc(100% - 28px); max-width:1800px; padding-bottom:8px; }
.screen-game .app-nav { display:none; }
.screen-game .brand { font-size:20px; }
.screen-game .brand img { width:34px; height:34px; }
.screen-game .brand small { display:none; }
.screen-game .app-nav nav { margin-left:15px; }
.screen-game .edition-tag { font-size:10px; }
.topbar { padding:8px 12px; border-radius:5px; box-shadow:none; margin:8px 0; }
.topbar button { font-size:11px; padding:6px 10px; flex:none; }
.game-heading { flex-basis:100px; }
.game-heading h1 { font-size:14px; }
.game-layout { --table-width: max(320px,calc((100dvh - 315px)*.85714)); display:grid; grid-template-columns:minmax(0,var(--table-width)) 310px; justify-content:center; gap:14px; align-items:start; height:auto; margin-top:0; }
.field-column { display:flex; flex-direction:column; gap:4px; width:100%; min-width:0; margin:0 auto; }
.game-screen.table-enlarged .game-layout { --table-width:740px; }
.side-column { display:flex; flex-direction:column; gap:10px; max-height:calc(100dvh - 130px); overflow:auto; }
.player-zone { padding:0; border:0; box-shadow:none; background:none; border-radius:0; }
.zone-head { padding:0 2px; margin:0 0 2px; display:flex; justify-content:space-between; align-items:center; min-height:14px; line-height:14px; gap:5px; }
.zone-head h2 { font-size:11px; white-space:nowrap; }
.zone-head span { font-size:10px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.playmat { position:relative; width:100%; aspect-ratio:600/350; border-radius:7px; isolation:isolate; container-type:inline-size; }
.mat-art { position:absolute; inset:0; border-radius:7px; background-size:100% 100%; background-position:center; }
.opponent .playmat { transform:rotate(180deg); }
.mat-zone { position:absolute; border:0; border-radius:2px; margin:0; padding:0; min-width:0; background:transparent; color:#fff; }
.mat-zone h3,.zone-label { position:absolute; margin:0; font-size:max(7px,1.35cqw);   padding:2px 4px; border-radius:2px; top:0; left:0; font-weight:400; z-index:5; pointer-events:none; white-space:nowrap; }
.hide-zone-labels .mat-zone h3,.hide-zone-labels .zone-label { display:none; }
.mat-judgment { left:2.3%; top:12.5%; width:79.7%; height:21.3%; }
.mat-battlefield { left:2.3%; top:36.9%; width:79.7%; height:28.3%; }
.mat-commander { left:3%; top:69.5%; width:10.25%; height:24.65%; z-index:4; }
.mat-hp { left:13.25%; top:75.57%; width:10.25%; height:12.51%; z-index:2; }
.mat-equipment { left:42.4%; top:68%; width:39.7%; height:28.4%; }
.mat-camp { left:85.5%; top:36.9%; width:12.4%; height:28.3%; }
.mat-rest { left:85.5%; top:68%; width:12.4%; height:28.4%; }
.mat-rest:hover { background:#fff1; }
.battlefield { display:flex; flex-wrap:nowrap; align-items:center; height:100%; width:100%; gap:1%; padding:0 1%; max-height:none; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; scrollbar-gutter:auto; }
.battlefield .character-card { position:relative; flex:0 0 auto; height:87%; width:auto; aspect-ratio:62/87; min-height:0; min-width:0; padding:0; display:block; border:0; border-radius:4px; background:none; overflow:visible; }
.card-art { width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.battlefield .character-card.tapped { aspect-ratio:1; opacity:1; transform:none; }
.character-card.tapped>.card-face { position:absolute; width:71.26%; height:100%; left:14.37%; top:0; transform:rotate(90deg); }
.card-face { width:100%; height:100%; position:relative; }
.character-card.cannot-act::before,.character-card.face-down::after { display:none; }
.character-card .character-state { position:absolute; bottom:-2px; left:50%; transform:translateX(-50%); padding:1px 3px; border-radius:3px;   font-size:max(7px,1.2cqw); white-space:nowrap; z-index:4; max-width:160%; overflow:hidden; }
.character-card.lebu-locked { opacity:.85; filter:none; }
.character-card.lebu-locked .character-state { width:auto; min-height:0; border:0; border-radius:2px; }
.character-card .character-title,.character-card .character-meta { display:none; }
.character-card .card-fallback,.card-fallback { display:grid; place-content:center; gap:5px; height:100%; text-align:center; border:1px solid var(--line); border-radius:5px;   font-size:10px; padding:4px; }
.is-clickable { cursor:pointer; }
.character-card.is-clickable { outline:1px solid var(--primary); outline-offset:1px; }
.is-target,.is-targetable,.is-selected,.is-picked { outline:2px solid var(--primary)!important; outline-offset:2px; }
.character-card.is-disabled,.hand-card.is-disabled { opacity:1; }
.hand-card.is-disabled::after { background:none; }
.mat-zone .pile { height:100%; flex-wrap:nowrap; align-items:center; overflow-x:auto; gap:4px; }
.mat-zone .mini-card { height:88%; aspect-ratio:62/87; width:auto; min-width:0; min-height:0; padding:0; background:none; border:0; flex:none; border-radius:4px; }
.mat-equipment .equipment-pile { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3%; overflow:visible; }
.mat-equipment .equipment-card { height:91%; width:100%; position:relative; font-size:8px; }
.mat-equipment .empty { visibility:hidden; }
.mat-zone .empty:not(.equipment-card) {  font-size:8px; opacity:.7; align-self:center; padding:2px; }
.mat-zone .mini-card[data-choice-hint] { display:block; min-height:0; width:auto; max-width:100%; }
.mat-zone .mini-card[data-choice-hint]::before { position:absolute; top:0; left:0; right:auto; min-height:0; max-width:100%; width:auto; padding:2px; font-size:8px; z-index:6; }
.commander-card,.camp-stack,.rest-stack { display:block; width:100%; height:100%; padding:5%; position:relative; }
.commander-card { padding:0; translate:calc(var(--hp-covered,0) * 100%) 0; transition:translate .3s ease,transform .3s ease; filter:drop-shadow(1px 1px 2px #0008); }
.commander-card.inverted { transform:rotate(180deg); }
.mat-hp .hp-track { display:block; position:relative; width:100%; height:100%; padding:0; background:transparent; }
.hp-track .card-art { width:100%; height:100%; }
.hp-track .hp-value { position:absolute; left:0; right:0; top:154%;   font-size:max(8px,1.4cqw); text-align:center; border-radius:2px; white-space:nowrap; }
.deck-health-rule { margin:0 0 8px;  font-size:12px; line-height:1.5; }
@media (prefers-reduced-motion:reduce) {.commander-card { transition:none; }
 }
.camp-stack .pile-count,.mat-rest .pile-count { position:absolute; bottom:1px; left:50%; transform:translateX(-50%); z-index:4; font-size:max(8px,1.5cqw); border-radius:8px; color:#fff;  padding:1px 6px; }
.hp-track { display:flex; gap:5%; height:100%; align-items:center; justify-content:center; flex-wrap:wrap;  font-size:16px; }
.hp-pip { width:12%; height:35%; border-radius:50%; background:var(--primary); border:1px solid var(--line); }
.hp-pip.lost { opacity:.22; }
.hp-track strong { width:100%; font-size:max(8px,1.6cqw); text-align:center; }
.opponent-hand-tray { height:22px; display:flex; gap:10px; align-items:center; justify-content:center; font-size:10px; }
.opponent-hand-tray .hand { display:flex; gap:4px; flex-wrap:nowrap; height:100%; max-height:none; overflow-x:auto; overflow-y:hidden; }
.opponent-hand-tray .hand-card { height:100%; width:16px; flex:0 0 16px; min-height:0; aspect-ratio:62/87; padding:0; border:0; background:none; }
.opponent-hand-tray .hand-card span { display:none; }
.info-strip { gap:5px; grid-template-columns:1.1fr 1.7fr .8fr; }
.info-strip>div { padding:5px 7px; border-radius:3px; gap:2px; min-width:0; }
.info-strip .label { font-size:8px; }
.info-strip strong { font-size:10px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.process-cards { display:flex; gap:3px; }
.process-cards img { height:45px; width:auto; }
.process-cards:empty { display:none; }
#sharedPiles { display:flex; gap:8px; align-items:center; }
.shared-pile { height:42px; width:30px; position:relative; border:1px dashed var(--line); border-radius:3px; }
.shared-pile span { position:absolute; bottom:-2px; left:50%; transform:translateX(-50%); font-size:8px; white-space:nowrap;   padding:1px 2px; }
#deckInfo { display:none; }
.hand-panel { background:transparent; border:0; border-radius:0; padding:3px 0 0; box-shadow:none; overflow:visible; }
.hand-panel .panel-head { margin-bottom:5px; gap:7px; }
.hand-panel h2,.hand-panel .panel-head>span { font-size:10px; }
.hand-panel .subtle { margin-left:auto; }
.hand-panel .hand { flex-wrap:nowrap; gap:5px; overflow-x:auto; align-items:end; padding:3px 3px 7px; }
.hand-panel > .hand .hand-card { width:56px; flex:0 0 56px; height:79px; min-height:0; display:block; padding:0; border:0; background:none; border-radius:4px; }
.hand-panel .hand-card.is-clickable:hover { transform:translateY(-3px); }
.hand-card .hand-index { position:absolute; top:2px; right:2px; padding:1px 3px; color:#fff;  font-size:8px; border-radius:3px; }
.test-panel,.actions-panel,.log-panel { padding:14px; border-radius:5px; box-shadow:none; }
.test-panel h2,.actions-panel h2,.log-panel h2 { font-size:13px; }
.test-panel { order:3; }
.actions-panel { order:1; overflow:visible; display:block; }
.log-panel { order:2; max-height:260px; min-height:130px; }
.log-panel .log-list { max-height:200px; overflow:auto; font-size:11px; }
.actions-panel .panel-head { flex-direction:column; align-items:flex-start; margin-bottom:10px; }
.actions-panel .actionHint,#actionHint { font-size:12px; line-height:1.7; max-height:190px; overflow:auto; }
.actions-panel .action-button { width:100%; font-size:12px; padding:9px; }
.actions-panel .actions { max-height:330px; overflow:auto; }
.test-panel .rest-buttons { display:none; }
.character-tooltip { z-index:1001;   width:300px; }
.character-tooltip img { max-height:300px; width:100%; object-fit:contain; }
.character-tooltip p { max-height:210px; overflow:hidden; }
.builder-screen { width:min(1540px,calc(100% - 72px)); margin:26px auto; }
.deck-modal-panel { display:block; width:100%; max-width:none; height:auto; max-height:none; padding:0; border:0; box-shadow:none; background:none; overflow:visible; }
.deck-modal-panel>.panel-head h2 { font-size:28px; }
.deck-builder { display:grid; grid-template-columns:300px minmax(0,1fr); height:auto; max-height:none; gap:24px; overflow:visible; }
.deck-list-panel {  padding:20px; border:1px solid var(--line); border-radius:6px; max-height:calc(100vh - 220px); overflow:auto; position:sticky; top:18px; display:flex; flex-direction:column; gap:13px; }
.deck-list-panel label { display:grid; gap:6px; font-size:12px; }
.deck-list-panel input,.deck-list-panel select { width:100%; }
.deck-list-panel .deck-toolbar { display:flex; gap:6px; }
.deck-list-panel .deck-toolbar select { min-width:0; flex:1; }
.deck-list-panel .action-button { width:100%; }
.deck-list-panel .deck-toolbar button { width:auto; }
.catalog-panel { min-width:0; overflow:visible; display:block; }
.catalog-filters { display:flex; align-items:end; flex-wrap:wrap; gap:10px; padding:18px;  border:1px solid var(--line); border-radius:6px; margin-bottom:14px; }
.catalog-filters label { display:flex; flex-direction:column; gap:6px; font-size:11px; }
.catalog-filters select { width:108px; font-size:12px; }
.catalog-search { flex-basis:100%; }
.catalog-search input { width:100%; font-size:13px; }
.catalog-filters button { font-size:11px; min-height:36px; }
.result-count { font-size:12px;  margin:15px 0; }
.character-catalog { display:grid; grid-template-columns:repeat(auto-fill,minmax(176px,1fr)); gap:16px; max-height:none; overflow:visible; padding:0; }
.deck-catalog-item {  border:1px solid var(--line); border-radius:6px; padding:8px; display:flex; flex-direction:column; gap:8px; }
.catalog-art-button { width:100%; padding:0; border:0; background:none; aspect-ratio:62/87; position:relative; border-radius:4px; }
.catalog-art-button img { width:100%; height:100%; object-fit:contain; }
.deck-catalog-heading { display:flex; flex-direction:column; align-items:start; gap:3px; }
.deck-catalog-title { font-size:10px; }
.deck-catalog-name { font-size:14px; }
.deck-catalog-meta { font-size:10px; }
.deck-zone-counts { display:grid;gap:6px;margin-top:auto;width:100%;min-width:0; }
.deck-count-controls { display:grid; grid-template-columns:2em minmax(28px,1fr) 2.5em minmax(28px,1fr); gap:4px; align-items:center; justify-self:stretch; }
.deck-count-controls button { width:100%;padding:4px; height:29px; min-height:0; font-size:17px; }
.deck-count-controls span { text-align:center; font-size:12px; }
.deck-count-controls .deck-zone-label { text-align:left;white-space:nowrap;font-weight:500; }
.deck-zone-quantity { white-space:nowrap;font-variant-numeric:tabular-nums; }
.commander-preview { display:flex; gap:12px; align-items:center;  font-size:12px; }
.commander-preview img { width:60px; height:84px; object-fit:contain; }
.selected-deck-cards { display:grid; gap:7px; }
.selected-deck-row { display:flex; gap:8px; align-items:center;  padding:5px; border-radius:4px; }
.selected-deck-row img { width:29px; height:40px; object-fit:contain; }
.selected-deck-row span { flex:1; font-size:11px; }
.selected-deck-row button { padding:3px 6px; font-size:12px; }
.deck-notice { min-height:24px; font-size:12px;  margin-bottom:10px; }
.deck-summary {  font-size:12px; padding:10px 0; border-block:1px solid var(--line); }
.modal {  z-index:1100; }
.card-preview-panel { display:flex; flex-direction:column; gap:14px; align-items:center; max-height:95vh; overflow:auto; padding:20px;  border:1px solid var(--line); border-radius:8px; max-width:min(520px,95vw); }
#cardPreviewImage { max-height:70vh; max-width:100%; object-fit:contain; }
#cardPreviewText { white-space:pre-wrap; font-size:13px; line-height:1.7; }
.public-card-face { position:relative; width:100%; height:100%; container-type:inline-size; isolation:isolate; flex:none; font-family:var(--font-ui,sans-serif); }
.public-card-face.no-art { background:#f4ecd9; border:1px solid #b6a994; border-radius:4px; }
.public-card-identity { display:none; position:absolute; inset:0; pointer-events:none; color:#242422; font-weight:700; line-height:1; }
.identity-overlay>.public-card-identity { display:block; }
.public-card-name { position:absolute; left:22%; top:5%; width:72%; height:20%; display:flex; align-items:center; justify-content:center; background:#f4ecd9; border:1px solid #b6a994; border-radius:2px; font-size:min(20cqw,calc(65cqw / var(--card-name-length,2))); white-space:nowrap; }
.public-card-rank,.public-card-suit { position:absolute; left:4%; width:19%; background:#f4ecd9; display:flex; align-items:center; justify-content:center; font-size:17cqw; }
.public-card-rank { top:3%; height:11%; padding-top:1%; }
.public-card-suit { top:14%; height:12%; padding-bottom:1%; font-size:20cqw; }
.public-card-face[data-color="red"] .public-card-rank,.public-card-face[data-color="red"] .public-card-suit { color:#b61e26; }
.character-tooltip>.public-card-face { width:214px; height:300px; margin:0 auto 8px; }
.process-cards>.public-card-face { height:45px; width:32px; }
.table-status .process-cards>.public-card-face { height:68px; width:48px; }
.process-cards .public-card-face>.card-art { width:100%; height:100%; }
#publicCardPreviewFace { width:min(400px,calc(70dvh * .7126),calc(100vw - 64px)); aspect-ratio:62/87; flex:none; }
.rest-card { display:grid; grid-template-columns:75px minmax(0,1fr); gap:10px;  padding:12px; }
.rest-card img { width:75px; grid-row:span 4; }
.rest-card p { font-size:12px; }
.toast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%); z-index:1200; max-width:90vw;   border-radius:6px; padding:12px 24px; box-shadow:0 4px 20px #0005; font-size:13px; }
/* Three columns: hands,the physical table,and collapsible tools. */
body.screen-game { overflow:hidden; }
.screen-game .app { width:100%; max-width:none; height:100dvh; padding:6px; }
.screen-game .game-screen { display:flex; flex-direction:column; height:100%; min-height:0; }
.screen-game .topbar { flex:0 0 auto; margin:0 0 6px; padding:6px 10px; min-height:40px; gap:8px; }
.screen-game .game-heading { flex:1; display:flex; flex-direction:row; align-items:center; gap:10px; min-width:0; }
.screen-game .game-heading h1 { flex:none; font-size:13px; }
.screen-game .game-heading #statusLine { font-size:11px; max-width:none; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.screen-game .game-layout { flex:1; min-height:0; height:auto; width:100%; display:grid; grid-template-columns:minmax(172px,1fr) minmax(0,min(var(--fit-table-width,65vw),calc(100% - 382px))) minmax(190px,1fr); gap:8px; justify-content:stretch; align-items:stretch; overflow:auto; }
.screen-game .field-column { display:flex; flex-direction:column; min-width:0; min-height:0; width:100%; height:100%; margin:0; gap:6px; overflow:auto; scrollbar-width:thin; }
.screen-game .player-zone { flex:none; width:100%; }
.screen-game .zone-head { height:18px; min-height:18px; margin-bottom:2px; flex-direction:row; align-items:center; }
.screen-game .zone-head h2 { font-size:12px; }
.screen-game .zone-head span { font-size:11px; }
.screen-game .hand-column { height:100%; min-height:0; min-width:0; display:flex; flex-direction:column; gap:10px; padding:12px;  border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.hand-column .panel-head { flex-direction:row; align-items:center; margin:0 0 8px; gap:8px; }
.hand-column h2 { font-size:14px; }
.hand-column .opponent-hand-tray { display:block; height:auto; flex:none; text-align:left; }
.hand-column .opponent-hand-tray .hand { display:flex; flex-wrap:wrap; gap:6px; height:auto; max-height:145px; overflow:auto; padding:4px; align-content:start; }
.hand-column .opponent-hand-tray .hand-card { display:block; flex:0 0 var(--table-card-width,54px); width:var(--table-card-width,54px); height:var(--table-card-height,76px); min-height:0; }
.hand-column .hand-panel { display:flex; flex-direction:column; min-height:0; padding:12px 0 0; border-top:1px solid var(--line); flex:1; overflow:hidden; }
.hand-column .hand-panel h2 { font-size:14px; }
.hand-column #handCount {  font-size:12px; }
.hand-help {  font-size:11px; margin:0 0 10px; }
.hand-column .hand-panel > .hand { flex:1; min-height:0; display:grid; grid-template-columns:repeat(auto-fill,var(--table-card-width,54px)); grid-auto-rows:var(--table-card-height,76px); align-content:start; align-items:start; gap:6px; padding:4px 4px 10px; overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; }
.hand-column .hand-panel > .hand .hand-card { flex:none; width:var(--table-card-width,54px); height:var(--table-card-height,76px); min-height:0; aspect-ratio:62/87; border-radius:4px; }
.hand-column .hand-index { font-size:8px; padding:1px 3px; }
.hand-column #hand>.empty { grid-column:1/-1; }
.screen-game .side-column { display:flex; position:static; height:100%; max-height:none; min-height:0; width:100%; min-width:0; gap:8px; overflow:auto; scrollbar-width:thin; }
.table-status { flex:none; order:0; }
.table-status .info-strip { display:grid; grid-template-columns:1fr; gap:5px; }
.table-status .info-strip>div { display:flex; flex-wrap:wrap; align-items:center; padding:8px 10px; gap:8px; }
.table-status .info-strip .label { font-size:11px; min-width:40px; }
.table-status .info-strip strong { font-size:12px; white-space:normal; overflow-wrap:anywhere; }
.table-status .process-cards img { height:68px; }
.table-status #sharedPiles { gap:12px; }
.table-status .shared-pile { height:54px; width:39px; }
.screen-game .collapsible-panel { display:block; flex:none; min-height:0; max-height:none; padding:0; overflow:hidden; }
.collapsible-panel>summary { display:flex; list-style:none; align-items:center; justify-content:space-between; gap:8px; padding:12px; font-size:14px; font-weight:600;  cursor:pointer; }
.collapsible-panel>summary::-webkit-details-marker { display:none; }
.collapsible-panel>summary:focus-visible { outline:2px solid var(--primary); outline-offset:-3px; }
.fold-label {  font-size:11px; font-weight:400; }
.fold-label::after { content:'展开 ＋'; }
.collapsible-panel[open] .fold-label::after { content:'收起 −'; }
.collapsible-panel .panel-content { padding:0 12px 12px; min-height:0; }
.screen-game .actions-panel .actions { max-height:38vh; overflow:auto; }
.screen-game .actions-panel #actionHint { max-height:100px; }
.screen-game .log-panel[open] { display:flex; flex-direction:column; flex:1; min-height:155px; }
.screen-game .log-panel .panel-content { display:flex; flex-direction:column; flex:1; overflow:hidden; }
.screen-game .log-panel .panel-head { margin:0 0 6px; justify-content:flex-end; }
.screen-game .log-panel .log-list { min-height:0; max-height:none; flex:1; overflow:auto; }
.screen-game .log-panel #copyGameLog { width:auto; padding:4px 8px; font-size:11px; }
.tool-rail { display:none; }
.screen-game .game-screen.table-enlarged .game-layout { grid-template-columns:clamp(180px,20vw,300px) minmax(0,1fr) clamp(200px,22vw,320px); }
.screen-game .game-screen.tools-collapsed .game-layout { grid-template-columns:clamp(180px,22vw,300px) minmax(0,1fr) 44px; }
.tools-collapsed .side-column>:not(.tool-rail) { display:none!important; }
.tools-collapsed .tool-rail { display:flex; flex-direction:column; gap:8px; }
.tool-rail button { padding:12px 8px; font-size:12px; writing-mode:vertical-rl; letter-spacing:4px; min-height:72px; }
@media(max-width:760px) {.screen-game .game-layout { min-width:700px; }
.screen-game .game-screen { overflow-x:auto; }
.screen-game .topbar { min-width:700px; }
.screen-game .game-heading #statusLine { max-width:180px; }
.hand-column .hand-help { font-size:10px; }
}
@media(min-width:1600px) {.game-layout { grid-template-columns:minmax(0,var(--table-width)) 350px; }
 }
@media(max-width:1100px) {.app { width:calc(100% - 36px); }
.lobby-columns { grid-template-columns:minmax(0,1fr) 270px; gap:16px; }
.lobby-panel { padding:18px; }
.mode-card { padding:16px; }
.mode-card strong { font-size:19px; }
.mode-cards { gap:10px; }
.edition-tag { display:none; }
.game-layout { grid-template-columns:minmax(0,1fr) 270px; }
.builder-screen { width:calc(100% - 36px); }
.deck-builder { grid-template-columns:250px minmax(0,1fr); gap:16px; }
 }
@media(max-width:760px) {.app-nav { height:70px; gap:5px; }
.brand { font-size:21px; }
.brand img { width:37px; height:37px; }
.app-nav nav { margin-left:auto; gap:5px; }
.nav-link { font-size:12px; padding:0 6px; }
.brand small { font-size:8px; letter-spacing:1px; }
.lobby-intro { padding:28px 0; }
.lobby-intro h1 { font-size:38px; }
.lobby-ornament { display:none; }
.lobby-columns { grid-template-columns:1fr; }
.appearance-preview { max-width:360px; }
.mode-card { min-height:172px; padding:12px; }
.mode-card strong { font-size:17px; }
.mode-card b { font-size:10px; }
.lobby-intro p { font-size:12px; }
.lobby-panel .new-game { gap:10px; }
.game-layout { display:flex; flex-direction:column; }
.field-column { width:100%; min-width:0; }
.side-column { max-height:none; width:100%; }
.screen-game .app { width:calc(100% - 16px); }
.game-heading { flex-direction:column; align-items:start; gap:2px; }
.topbar { gap:6px; }
.topbar button { font-size:10px; padding:5px; }
.game-heading #statusLine { font-size:9px; max-width:40vw; }
.zone-head,.panel-head { flex-direction:row; }
.deck-builder { display:flex; flex-direction:column; }
.deck-list-panel { max-height:360px; position:static; }
.catalog-filters { padding:12px; gap:8px; }
.catalog-filters select { width:96px; }
.character-catalog { grid-template-columns:repeat(2,minmax(0,1fr)); }
.deck-modal-panel .panel-head { flex-direction:row; }
.deck-catalog-item button { width:auto; }
.rest-card { grid-template-columns:60px minmax(0,1fr); }
.hand-panel .subtle { display:none; }
 }
