/* Quiet play table: full portrait cards and information sheets on every device. */
:root{color-scheme:light;--paper:#f2f4f6;--ink:#283441;--muted:#697784;--line:#d7dde3;--red:#34759d;--red-light:#e8f2f8;--green:#548876;--dark:#eef1f4;background:var(--paper)}
body{color:var(--ink);background:#f2f4f6}button{background:#fff;border-color:#d1d9e0;color:#344454;box-shadow:none;border-radius:5px}button:hover:not(:disabled){background:#edf3f7;border-color:#8da6b9}button.primary{background:#397a9e;border-color:#397a9e;color:#fff;text-shadow:none;box-shadow:none}button.primary:hover:not(:disabled){background:#2f6583;border-color:#2f6583}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline-color:#337da6}
.topbar{background:#fff;border-color:#dce2e7;box-shadow:none}.brand{color:#34495c}.brand-mark{background:#496c82;border:0;box-shadow:none}.connection:before{background:#70a68c}.connection.offline:before{background:#c96b64}
.welcome{background:#f9fafb;border:1px solid #dce2e7;color:#34495c;box-shadow:none}.welcome .eyebrow{color:#6c8b9c}.welcome p:not(.eyebrow),.welcome>small{color:#687d8a}.game-guide{background:#f8fafb;border:0;border-left:2px solid #8bb5cc;border-radius:2px;color:#435d6e;box-shadow:none}.guide-icon{color:#6c94ab}.game-guide p{color:#718391}.phase-label{background:#eaf1f5;border-color:#cad9e3;color:#4a6c81}.control-indicator,.control-indicator.seat-1{background:#eaf1f6;border-color:#cbdbe5;color:#4d7087}.runtime-status{background:#edf4f8;border-color:#c5d9e4;color:#45667a}
.compact-play .topbar{min-height:42px;padding:5px 12px;gap:9px;flex-wrap:nowrap}.compact-play .brand{font-size:16px;gap:6px}.compact-play .brand-mark{width:27px;height:27px;font-size:12px}.compact-play .room-title{display:block;flex:1;padding-left:12px;min-width:0}.compact-play .room-title strong{font-size:10px;max-width:240px}.compact-play .room-title>span{display:none}.compact-play .topbar button{min-height:30px;font-size:11px;padding:4px 9px}
.compact-play .workspace{padding:5px 14px 3px;max-width:1280px;margin:0 auto;display:flex;min-height:0;width:100%}.compact-play .table-area{width:100%;max-width:none;min-height:0;gap:4px;margin:0}.compact-play .table-heading{min-height:25px;display:flex;flex-wrap:nowrap;gap:7px}.compact-play .table-heading h1{font:600 11px var(--mono);white-space:nowrap}.compact-play .table-heading .phase-label{display:none}.compact-play .table-heading .phase-track{display:flex;gap:2px;flex:0 1 330px;max-width:330px;margin:0 0 0 auto;min-width:0}.compact-play .phase-track li{padding:4px 8px;border:0;border-radius:3px;background:transparent;color:#8b98a3;font-size:9px;white-space:nowrap}.compact-play .phase-track li.current{background:#e0edf4;color:#2d6e95;font-weight:700}
.compact-play .compact-tools{display:flex;gap:5px;order:1;flex-shrink:0;justify-content:flex-end}.compact-play .compact-tools button{flex:0 0 auto;min-height:27px;font-size:10px;padding:4px 12px;background:#f9fafb;border-color:#d8e0e7;color:#607586}.compact-play .compact-tools button[aria-pressed="true"]{background:#e4eff5;color:#316a8c;border-color:#9cbdd1}.compact-play #compact-evaluation-value{color:#527b92;font-size:10px}.compact-play .game-guide{min-height:23px;padding:3px 7px;gap:5px}.compact-play .game-guide strong{font-size:10px;line-height:1.4}.compact-play .game-guide p{display:none}.compact-play .guide-icon{font-size:12px}
.compact-play .arena{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 10px minmax(0,1fr);gap:2px;padding:4px 8px;background:#fff;border:1px solid #dce2e7;border-radius:5px;color:#3e5262;box-shadow:none;min-height:0}
.compact-play .player-board{--side:#6387a0;display:grid;padding:3px 8px;grid-template-rows:25px minmax(0,1fr) minmax(0,.72fr);gap:3px;min-height:0;border:0;background:transparent;border-radius:0}.compact-play .player-board.cpu{--side:#b18383;grid-template-rows:25px minmax(0,.72fr) minmax(0,1fr)}.compact-play .player-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:14px 10px;align-items:center;gap:0 7px;margin:0}.compact-play .player-name{font-size:10px;color:#4b5e6d;gap:4px}.compact-play .player-name i{background:var(--side);width:5px;height:5px}.compact-play .role,.compact-play .opponent-hand{font-size:9px;color:#87939f}
.compact-play .life{gap:3px;margin:0}.compact-play .life small{color:#82919e;font-size:7px}.compact-play .life strong{font-size:13px;color:#425e72;margin-left:3px}.compact-play .player-board .life-pip{width:7px;height:12px;background:#f6f7f8;border-color:#ccd7df;border-radius:2px;box-shadow:none;transform:skew(-8deg)}.compact-play .player-board .life-pip.filled{background:var(--side);border-color:var(--side)}.compact-play .ap{color:#6d8290;gap:3px;font-size:9px}.compact-play .ap small{font-size:8px}.compact-play .ap strong{font-size:10px;color:#526e80}.compact-play .ap i{background:#f0f4f6;border-color:#d2dce3;width:7px;height:9px;border-radius:2px}.compact-play .ap i.ready{background:#88aabd;border-color:#88aabd}.compact-play .piles{font-size:8px;gap:9px;color:#7d8d98;grid-column:1/-1;justify-content:flex-end}.compact-play .piles button{font-size:8px;color:#6d8291;min-height:12px;padding:0;background:none}
.compact-play .lane{margin:0;display:flex;flex-direction:column;min-height:0;padding:0 5px 2px;background:#f5f7f9;border-radius:3px}.compact-play .lane-label{font-size:8px;line-height:11px;margin:0 0 2px;color:#8b9aa5;flex-shrink:0}.compact-play .lane-label>span:last-child{color:#96a3ad}.compact-play .slots{container-type:size;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:680px;flex:1;min-height:0;gap:8px;margin:0 auto;align-items:stretch}
/* Row height reserves portrait targets before image loading begins. */
.compact-play .slot,.compact-play .slot.has-card-art,.compact-play .slot.is-target{width:min(100%,calc((100cqh - 14px)*63/94));height:100%;max-width:138px;min-width:0;min-height:0;justify-self:center;position:relative;padding:2px;border:1px solid #c5d0d9;border-radius:3px;background:#fff;color:#405b6c;box-shadow:none;overflow:hidden}.compact-play .slot.empty{background:#f0f3f6;border:1px dashed #d0dbe3;color:#b1bec8}.compact-play .slot:hover:not(:disabled){background:#eef5f9;border-color:#83a8bf}.compact-play .slot.has-card-art>.card-art{position:absolute;inset:0 0 14px;width:100%;height:calc(100% - 14px);object-fit:contain;object-position:center;opacity:1;transform:none}.compact-play .slot.has-card-art:before{display:none}
.compact-play .slot.has-card-art>.card-top,.compact-play .slot.has-card-art>.card-name{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.compact-play .slot.has-card-art>.card-bottom{position:absolute;left:2px;right:2px;bottom:0;height:13px;display:flex;align-items:center;justify-content:space-between;gap:1px;color:#455b6c;background:#fff}.compact-play .slot .bp{font:700 11px var(--mono);color:#344e60;text-shadow:none;letter-spacing:-.4px}.compact-play .slot .bp small{font-size:6px;color:#8095a2;margin-right:1px}.compact-play .slot .card-state{display:block;font-size:6px;letter-spacing:-.4px;color:#8293a0}.compact-play .slot.rested .card-state{color:#a18672}.compact-play .slot.has-card-art.rested>.card-art{transform:none;filter:saturate(.6) brightness(.93)}
.compact-play .slot:not(.has-card-art) .card-name{font-size:9px;margin:2px 0}.compact-play .slot:not(.has-card-art) .cost{width:13px;height:13px;font-size:8px;border-color:#9eb4c2;color:#53768c}.compact-play .slot.is-target,.compact-play .slot.empty.is-target{background:#e8f4fa;border-color:#61a7d0;box-shadow:0 0 0 1px #61a7d044;color:#5a9bc2}.compact-play .slot.selected{border-color:#2e90c7;box-shadow:0 0 0 2px #2e90c7}.compact-play .slot.attacker,.compact-play .slot.remove-selected{border-color:#c46f6c;box-shadow:0 0 0 2px #c46f6c55}.compact-play .slot.has-card-art .target-badge{position:absolute;top:2px;left:1px;right:1px;bottom:auto;width:auto;max-width:100%;padding:2px 0;background:#e9f7ff;color:#2d7ba7;font-size:7px;z-index:3;border-radius:2px}.compact-play .slot.has-card-art .under{position:absolute;top:auto;bottom:15px;left:1px;max-width:100%;font-size:6px;color:#476a82;background:#fffffff0}.compact-play .empty-number{font-size:10px;opacity:.6}
.compact-play .arena-divider{height:10px;min-height:0;padding:0;gap:8px}.compact-play .arena-divider>span{height:1px;background:#e0e6eb}.compact-play .arena-divider strong{font-size:7px;line-height:10px;color:#9ba8b1;letter-spacing:.5px}
.compact-play .hand-section,.compact-play .pending-section{padding:4px 8px 1px;border:0;border-radius:0;background:none;margin:0}.compact-play .section-line{margin:0 0 3px;min-height:13px}.compact-play .section-line h2,.compact-play #hand-owner{font-size:10px;color:#627b8c}.compact-play .section-line h2>span,.compact-play .section-line>span{font-size:9px;color:#8c9ca7}.compact-play .hand,.compact-play.many-hand-cards #hand{display:flex;flex-wrap:nowrap;justify-content:center;align-items:flex-end;gap:5px;padding-top:3px;min-height:0}
.compact-play .hand>.hand-card,.compact-play.many-hand-cards #hand>.hand-card{flex:0 1 78px;max-width:78px;width:auto;height:clamp(75px,12.5dvh,132px);min-height:0;padding:0 0 12px;border:1px solid #c2cdd6;border-radius:3px;background:#fff;box-shadow:0 1px 3px #273c4c15;transition:transform .12s,border-color .12s;touch-action:none}.compact-play .hand-card.has-card-art>.card-art{position:absolute;inset:0 0 12px;width:100%;height:calc(100% - 12px);object-fit:contain;object-position:center}.compact-play .hand-card.has-card-art>.card-name{position:absolute;left:2px;right:2px;bottom:0;line-height:11px;font-size:8px;color:#627581;background:#fff;text-shadow:none}.compact-play .hand>.hand-card.can-act{border-color:#76a9c6;box-shadow:0 -2px #76a9c633}.compact-play .hand>.hand-card.selected{border-color:#238bc6;box-shadow:0 0 0 2px #238bc6;transform:translateY(-3px);z-index:2}.compact-play .hand-card.has-card-art .count{top:1px;right:1px;font-size:8px;padding:1px 3px;background:#fff;color:#617684;border:1px solid #c2d3de;border-radius:2px;z-index:3}.compact-play .hand-card.has-card-art .hand-badge.usable{top:1px;left:1px;font-size:6px;padding:1px 2px;background:#eff8fd;color:#427a9c}.compact-play .hand .drag-grip{width:20px;height:20px;bottom:13px;right:1px;background:#eff5f9e8;color:#7995a6;box-shadow:none;font-size:15px;border-radius:2px}.compact-play .hand-card:not(.has-card-art) .card-name{font-size:9px;color:#536d80}.compact-play .hand-card:not(.has-card-art) .bp{font-size:11px}
.compact-play .action-dock{position:static;padding:5px 14px max(5px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dde4e9;box-shadow:none;backdrop-filter:none}.compact-play .dock-inner{max-width:1252px;min-height:32px;margin:0 auto;gap:7px;align-items:stretch}.compact-play .dock-inner>.primary{min-height:35px;min-width:135px;max-width:48%;font-size:12px;padding:6px 14px;border-radius:4px}.compact-play .dock-options{max-height:88px;align-items:stretch;gap:5px}.compact-play .dock-options button{min-height:33px;flex:0 1 auto;font-size:11px;padding:4px 10px}
.compact-play .drag-effect-source,.compact-play .compact-reveal,.compact-play .drag-status{background:#edf5fa;color:#426f89;border-color:#a9c7d9;box-shadow:none}.compact-play .drag-use-zone{background:#e8f5fcee;color:#3c789d;border-color:#82b5d2}.drop-allowed{outline-color:#77b2d3!important;box-shadow:none!important}.drop-hover{outline-color:#368ab9!important;background-color:#dceef9!important;box-shadow:0 0 0 2px #77b2d344!important}.player-head.drop-allowed{background:#eef6fa}
.compact-panel[open]{max-width:650px;width:calc(100% - 24px);max-height:84dvh;margin:auto;border-radius:8px;box-shadow:0 14px 60px #233b5140}.compact-panel-tabs [aria-pressed="true"]{background:#e4f1f8;border-color:#8db7cf;color:#396e8e}.compact-panel .sidebar{padding:0}.compact-panel .panel{background:#fff;border:0;padding:5px}.compact-panel .card-detail{grid-template-columns:155px minmax(0,1fr)}.compact-panel .art-preview>.card-art{height:220px}.compact-panel .art-preview{background:#f5f7f9;border-color:#d2dfe8}.compact-panel .art-preview>span{background:#edf3f7;color:#6b8798}.compact-panel .detail-text{font-size:12px;color:#596f80}.compact-panel .detail-numbers span{color:#5d7b8e;border-color:#cfdee8;background:#f5f9fb}
@media(hover:hover){.compact-play .hand>.hand-card:hover:not(:disabled){transform:translateY(-4px);border-color:#5b9fc7;z-index:3}}
@media(min-width:1000px){.compact-play .table-area{position:relative}.compact-play .compact-tools{position:absolute;top:0;right:0;z-index:2;height:25px;align-items:center}.compact-play .compact-tools button{min-height:24px;font-size:9px;padding:3px 8px}.compact-play .table-heading{padding-right:290px}.compact-play .room-title strong{max-width:320px}.compact-play .slots{max-width:740px;gap:22px}.compact-play .hand>.hand-card{flex-basis:86px;max-width:86px}.compact-play .slot .bp{font-size:12px}}
@media(max-width:600px){.compact-play .topbar{padding:3px 6px;min-height:34px;gap:4px}.compact-play .brand{font-size:12px}.compact-play .brand-mark{height:23px;width:23px;font-size:10px}.compact-play .room-title{display:none}.compact-play .topbar button{font-size:9px;min-height:27px;padding:3px 5px}.compact-play .workspace{padding:3px 4px}.compact-play .table-heading{flex-wrap:wrap;gap:3px;min-height:23px}.compact-play .table-heading h1{font-size:10px}.compact-play .table-heading .phase-track{flex:0 0 100%;max-width:none;margin:0}.compact-play .phase-track li{font-size:8px;padding:2px 4px}.compact-play .compact-tools{justify-content:flex-end;gap:4px}.compact-play .compact-tools button{font-size:9px;padding:3px 9px;min-height:26px}.compact-play .game-guide{min-height:21px;padding:2px 5px}.compact-play .game-guide strong{font-size:9px}.compact-play .arena{padding:3px;gap:1px}.compact-play .player-board{padding:2px 3px;grid-template-rows:25px minmax(0,1fr) minmax(0,.72fr)}.compact-play .player-board.cpu{grid-template-rows:25px minmax(0,.72fr) minmax(0,1fr)}.compact-play .player-name{font-size:9px}.compact-play .role,.compact-play .opponent-hand{font-size:7px}.compact-play .life strong{font-size:11px}.compact-play .life-pip{width:5px!important;height:10px!important}.compact-play .piles,.compact-play .piles button{font-size:7px}.compact-play .lane{padding:0 2px 1px}.compact-play .lane-label{font-size:7px;line-height:10px;margin-bottom:1px}.compact-play .lane-label>span:last-child{font-size:6px}.compact-play .slots{gap:4px}.compact-play .slot .bp{font-size:10px}.compact-play .slot .card-state{font-size:5px}.compact-play .section-line>span{font-size:7px}.compact-play .hand-section,.compact-play .pending-section{padding:2px 2px 0}.compact-play .hand{gap:3px}.compact-play .hand>.hand-card{height:clamp(70px,11dvh,105px)}.compact-play .action-dock{padding:4px 6px max(4px,env(safe-area-inset-bottom))}.compact-play .dock-inner>.primary{min-height:35px;min-width:120px;font-size:11px}.compact-panel .card-detail{grid-template-columns:105px minmax(0,1fr)}.compact-panel .art-preview>.card-art{height:150px}}
@media(min-width:601px) and (max-width:950px) and (max-height:500px){.compact-play .topbar{min-height:32px;padding:3px 7px}.compact-play .room-title{display:none}.compact-play .workspace{padding:3px 6px}.compact-play .table-heading,.compact-play.solo-play .table-heading{display:none}.compact-play .compact-tools{position:static;height:auto;justify-content:flex-end}.compact-play .compact-tools button{min-height:22px;font-size:9px;padding:2px 9px}.compact-play .game-guide{min-height:20px;padding:2px 5px}.compact-play .game-guide strong{font-size:9px;line-height:1.2}.compact-play .arena{grid-template-columns:minmax(0,1fr) 8px minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:3px;gap:2px}.compact-play .player-board,.compact-play .player-board.cpu{grid-template-rows:24px minmax(0,1fr) minmax(0,1fr);padding:2px}.compact-play .arena-divider{height:100%;writing-mode:vertical-rl;overflow:hidden}.compact-play .arena-divider>span{display:none}.compact-play .lane-label{font-size:7px;line-height:9px}.compact-play .slot .bp{font-size:9px}.compact-play .slot .card-state{font-size:5px}.compact-play .hand>.hand-card{height:55px;flex-basis:45px;max-width:45px}.compact-play .section-line{min-height:11px;margin:0}.compact-play .hand{padding-top:0}.compact-play .hand-card.has-card-art>.card-name{font-size:7px}.compact-play .action-dock{padding:3px 6px}.compact-play .dock-inner>.primary{min-height:30px;min-width:110px;font-size:10px}.compact-play .dock-options button{min-height:28px;font-size:9px}}
.compact-play[data-phase="DAMAGE"] #opponent-board .player-board{grid-template-rows:52px minmax(0,.72fr) minmax(0,1fr)}.compact-play[data-phase="DAMAGE"] #opponent-board .life-pip.can-act{width:28px!important;height:30px!important;border:2px solid #58a0c9;background:#e7f4fc;box-shadow:none}
@media(prefers-reduced-motion:reduce){.compact-play .hand>.hand-card{transition:none;transform:none!important}}
/* Keep the four positions close together and let the illustration fill its portrait. */
.compact-play .slots{max-width:440px;gap:14px}
.compact-play .slot,.compact-play .slot.has-card-art,.compact-play .slot.is-target{width:min(100%,calc(100cqh*63/94));min-width:44px}
.compact-play .slot.has-card-art>.card-art{inset:0;width:100%;height:100%;object-fit:contain}
.compact-play .slot.has-card-art>.card-bottom{background:transparent;justify-content:flex-end}
.compact-play .slot.has-card-art .bp{margin-left:auto;padding:1px 2px;background:#fffffff2;border-radius:2px;font-size:10px}
.compact-play .slot.has-card-art .card-state{position:absolute;left:0;bottom:14px;padding:1px 2px;border-radius:2px;background:#fffffff0;font-size:6px}
@media(max-width:600px){.compact-play .slots{max-width:340px;gap:5px}}
.compact-play.many-hand-cards #hand{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.compact-play.many-hand-cards #hand>.hand-card{width:100%;max-width:none;height:clamp(55px,8dvh,85px)}

/* Video reference: a compact tabletop, with empty positions revealed only when legal. */
.compact-play .arena{position:relative;width:100%;max-width:920px;align-self:center;border:0;border-radius:3px;padding:4px 12px;background:#fff;box-shadow:0 1px 4px #344a5a0c}
.compact-play .player-board{position:relative;padding:3px 8px}
.compact-play .lane{background:none;border-radius:0;border-bottom:1px solid #edf1f4;padding-bottom:3px}
.compact-play .lane-label{color:#a2afb9}.compact-play .lane-label>span:last-child{color:#adb8c1}
.compact-play .slots{max-width:380px;gap:6px}
.compact-play .slot.has-card-art{border-color:transparent;background:none;box-shadow:none;overflow:visible}
.compact-play .slot.has-card-art>.card-art{filter:drop-shadow(0 1px 2px #233b5126)}
.compact-play .slot.has-card-art.rested>.card-art{filter:saturate(.65) drop-shadow(0 1px 2px #233b5126);transform:rotate(-6deg)}
.compact-play .slot.empty:not(.is-target):not(.drop-allowed):not(.drop-hover){border-color:transparent;background:none;box-shadow:none;color:transparent}
.compact-play .slot.empty:not(.is-target):not(.drop-allowed):not(.drop-hover) .empty-number{visibility:hidden}
.compact-play .slot.empty.is-target{border-color:#89bad5;background:#eaf5fb80;box-shadow:inset 0 0 0 1px #89bad526}
.compact-play .slot.empty.is-target .empty-number{font-size:0}.compact-play .slot.empty.is-target .empty-number:after{content:"＋";font-size:19px;color:#74a8c6}
.compact-play .slot.has-card-art.is-target{border-color:#73b5d9;box-shadow:0 0 0 1px #73b5d950}
.compact-play .slot.has-card-art.selected{border-color:#308dbd;box-shadow:0 0 0 2px #308dbd}
.compact-play .slot.has-card-art.attacker{border-color:#c47770;box-shadow:0 0 0 2px #c4777066}
.compact-play .slot.has-card-art.remove-selected{border-color:#c47770;box-shadow:0 0 0 2px #c4777066}
.compact-play .slot.has-card-art .target-badge{background:#eff9ffed;color:#397fa4;font-weight:600}
.compact-play .hand-section{max-width:920px;width:100%;align-self:center;padding:5px 12px 1px}
.compact-play #hand{padding-top:7px;gap:0}
.compact-play #hand>.hand-card{z-index:var(--hand-order,0);background:none;border-color:transparent;box-shadow:0 1px 4px #283e5022;border-radius:2px}
.compact-play #hand>.hand-card+.hand-card{margin-left:-10px}
.compact-play #hand>.hand-card:has(.count){box-shadow:2px -2px #e1e7ec,3px -3px #bdcbd5,0 1px 4px #283e5022}
.compact-play #hand>.hand-card.can-act{border-color:#a8c9dd;box-shadow:0 -2px #91bdd548,0 1px 4px #283e5022}
.compact-play #hand>.hand-card.selected{z-index:30;border-color:#2789bf;outline:1px solid #2789bf;box-shadow:0 1px 5px #2789bf33;transform:translateY(-5px)}
.compact-play #hand>.hand-card:focus-visible{z-index:50}
.compact-play.many-hand-cards #hand{gap:3px}.compact-play.many-hand-cards #hand>.hand-card+.hand-card{margin-left:0}
.piles .card-art{display:none;position:absolute;inset:0;width:100%;height:calc(100% - 13px);object-fit:contain}
.compact-play .pile-label{position:static}.compact-play .pile-stack{position:relative}
.compact-play .arena-divider>span{background:#e7edf2}.compact-play .arena-divider strong{font-size:7px;color:#adbac4}
.table-card-peek{position:fixed;right:12px;top:96px;z-index:20;width:clamp(170px,16vw,225px);padding:8px;background:#fffffff7;border:1px solid #d4dfe7;border-radius:5px;box-shadow:0 7px 25px #1e354622;pointer-events:none}
.table-card-peek .peek-art{display:block;width:100%;height:min(43dvh,340px);object-fit:contain}
.table-card-peek p{font-size:12px;line-height:1.6;margin:7px 1px 0;color:#4d6577;overflow-wrap:anywhere}
.compact-panel::backdrop{background:#17233066;backdrop-filter:blur(1px)}
@media(hover:hover){.compact-play #hand>.hand-card:hover:not(:disabled){z-index:40;transform:translateY(-7px);border-color:#5e9fc3}}
@media(min-width:1000px) and (min-height:600px){
  .compact-play .player-head{position:static}.compact-play .player-board>.lane{margin-left:70px;margin-right:70px;padding-left:4px;padding-right:4px}
  .compact-play .slots{margin-left:8px;margin-right:auto;max-width:380px}
  .compact-play .player-head .piles{position:absolute;right:4px;top:31px;grid-column:auto;display:grid;grid-template-columns:50px;justify-content:center;gap:7px;width:54px;font-size:9px;z-index:3}
  .compact-play .deck-stack,.compact-play .player-head .pile-stack{position:relative;display:flex;align-items:flex-end;justify-content:center;width:48px;height:65px;min-height:0;padding:0 0 1px;border:1px solid #c3d0da;border-radius:3px;background:#f3f6f9;color:#758b9d;text-decoration:none;font-size:8px;line-height:12px;isolation:isolate}
  .compact-play .deck-stack{background:#e7eff5;box-shadow:2px 2px #d9e3ea,3px 3px #c1d0dc}
  .compact-play .deck-stack:before{content:"UA";position:absolute;inset:3px 3px 15px;display:grid;place-items:center;border:1px solid #b8ccdb;color:#9cb5c7;font:700 15px var(--mono);transform:rotate(-8deg)}
  .compact-play .player-head .pile-stack:before{content:"—";position:absolute;inset:4px 3px 15px;display:grid;place-items:center;color:#c0ccd6;border:1px dashed #d6e0e8}
  .compact-play .player-head .pile-stack.has-card-art:before{display:none}.compact-play .player-head .pile-stack.has-card-art>.card-art{display:block}
  .compact-play .pile-label{position:absolute;bottom:0;left:0;right:0;text-align:center;line-height:12px;background:#ffffffde;color:#738b9d;z-index:1}
  .compact-play .player-head .pile-stack[data-pile="removed"]{height:22px;background:transparent;border:0;font-size:8px}.compact-play .player-head .pile-stack[data-pile="removed"]:before,.compact-play .player-head .pile-stack[data-pile="removed"]>.card-art{display:none}
  .compact-play .player-head .pile-stack[data-pile="removed"][data-count="0"]{display:none}
}
@media(min-width:1000px){
  .compact-panel[data-panel="card"][open]{margin:0 0 0 auto;width:350px;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border-right:0}
  .compact-panel[data-panel="card"] .card-detail{display:flex;flex-direction:column;gap:7px}
  .compact-panel[data-panel="card"] .card-detail>.art-preview{width:100%;margin:2px 0 4px}
  .compact-panel[data-panel="card"] .art-preview>.card-art{height:min(46dvh,400px)}
  .compact-panel[data-panel="card"] .detail-name{font-size:18px}.compact-panel[data-panel="card"] .detail-text{font-size:12px}
}
@media(max-width:600px){.compact-play .arena{padding:3px 4px}.compact-play .player-board{padding:2px 3px}.compact-play .hand-section{padding:4px 3px 1px}.compact-play #hand>.hand-card+.hand-card{margin-left:-6px}.compact-play .slots{max-width:330px}.table-card-peek{display:none}}
@media(min-width:601px) and (max-width:950px) and (max-height:500px){.compact-play .arena{padding:3px 4px}.compact-play .player-board{padding:2px}.compact-play .hand-section{padding:2px 3px 0}.compact-play #hand{padding-top:3px}.compact-play #hand>.hand-card+.hand-card{margin-left:-5px}}
@media(prefers-reduced-motion:reduce){.compact-play #hand>.hand-card{transition:none;transform:none!important}}
.compact-play .slot.empty.is-target .target-badge{color:#407b9d;background:#eef8fc;font-size:7px;line-height:10px;white-space:nowrap;left:50%;right:auto;bottom:0;top:auto;width:max-content;max-width:none;transform:translateX(-50%);padding:1px 3px;border-radius:2px}
.table-feedback{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:7;max-width:70%;padding:7px 12px;border:1px solid #dce6ed;border-radius:4px;box-shadow:0 3px 14px #233b511a;background:#ffffffed;color:#4a7087;font-size:11px;line-height:1.6;text-align:center;pointer-events:none;overflow-wrap:anywhere}
@media(max-width:600px){.table-feedback{max-width:85%;font-size:10px;padding:5px 8px}}

/* Give the four fixed positions more card area without adding page scrolling. */
.compact-play .arena,.compact-play .hand-section{max-width:720px}
.compact-play .table-area{gap:3px}
.compact-play .arena{padding:2px 8px;gap:0;grid-template-rows:minmax(0,1fr) 6px minmax(0,1fr)}
.compact-play .arena-divider{height:6px}.compact-play .arena-divider strong{line-height:6px}
.compact-play .player-board{padding:1px 4px;gap:1px}
.compact-play .lane{padding-bottom:1px}
.compact-play .slots{max-width:460px;gap:4px}
.compact-play .hand-section{padding-top:3px}
@media(min-width:1000px) and (min-height:600px){
  .compact-play .player-board{grid-template-rows:22px minmax(0,1fr) minmax(0,.85fr)}
  .compact-play .player-board.cpu{grid-template-rows:22px minmax(0,.85fr) minmax(0,1fr)}
  .compact-play .player-board>.lane{position:relative;margin-left:0;margin-right:60px;padding-left:66px;padding-right:0}
  .compact-play .lane-label{position:absolute;left:0;top:50%;transform:translateY(-50%);width:60px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:0;line-height:12px}
  .compact-play .lane-label>span:last-child{font-size:7px;line-height:11px;overflow-wrap:anywhere}
  .compact-play .slots{margin-left:0;margin-right:auto;max-width:460px}
}
@media(max-width:600px){
  .compact-play .table-heading{flex-wrap:nowrap;min-height:23px;gap:4px}
  .compact-play .table-heading .phase-track{display:none}
  .compact-play .table-heading .phase-label{display:inline-flex;margin-left:auto;white-space:nowrap;padding:3px 5px;font-size:8px}
  .compact-play .arena{padding:1px 2px}
  .compact-play .player-board{padding:1px 2px}
  .compact-play .lane{padding:0 1px 1px}
  .compact-play .lane-label{line-height:9px;margin-bottom:0}
  .compact-play .slots{max-width:none;gap:3px}
  .compact-play .hand-section{padding:2px 3px 1px}
}
@media(min-width:601px) and (max-width:950px) and (max-height:500px){
  .compact-play .arena{grid-template-columns:minmax(0,1fr) 6px minmax(0,1fr);grid-template-rows:minmax(0,1fr);max-width:none;padding:1px 2px}
  .compact-play .arena-divider{height:100%}
  .compact-play .player-board,.compact-play .player-board.cpu{padding:1px;gap:1px}
  .compact-play .lane{padding:0 2px 1px}
  .compact-play .lane-label{margin-bottom:0}
  .compact-play .hand>.hand-card{height:50px}
}

/* A readable table scale, keeping the hand below the battlefield. */
@media(min-width:601px) and (min-height:501px){
  .compact-play .topbar{min-height:48px;padding:6px 14px}
  .compact-play .brand{font-size:20px}.compact-play .brand-mark{width:32px;height:32px;font-size:14px}
  .compact-play .topbar button{min-height:34px;font-size:13px;padding:5px 11px}
  .compact-play .room-title strong{font-size:12px}
  .compact-play .table-heading{min-height:32px}.compact-play .table-heading h1{font-size:14px}
  .compact-play .phase-track li{font-size:11px;padding:5px 8px}
  .compact-play .compact-tools button{min-height:30px;font-size:11px;padding:5px 10px}
  .compact-play #compact-evaluation-value{font-size:12px}
  .compact-play .game-guide{min-height:29px;padding:4px 8px}.compact-play .game-guide strong{font-size:12px}
  .compact-play .player-name{font-size:12px}.compact-play .role,.compact-play .opponent-hand{font-size:10px}
  .compact-play .life strong{font-size:16px}.compact-play .life small{font-size:9px}
  .compact-play .ap small{font-size:10px}.compact-play .ap strong{font-size:12px}
  .compact-play .player-board .life-pip{width:8px;height:14px}
  .compact-play .piles,.compact-play .piles button{font-size:10px}
  .compact-play .lane-label{font-size:10px;line-height:13px}
  .compact-play .slot.has-card-art .bp{font-size:12px}.compact-play .slot.has-card-art .card-state{font-size:8px;bottom:17px}
  .compact-play .section-line h2,.compact-play #hand-owner{font-size:12px}.compact-play .section-line>span{font-size:10px}
  .compact-play .dock-inner>.primary{min-height:42px;min-width:160px;font-size:14px}
  .compact-play .dock-options button{min-height:40px;font-size:13px}
  .table-card-peek{width:clamp(210px,19vw,270px)}.table-card-peek p{font-size:14px}
}
@media(min-width:1000px) and (min-height:600px){
  .compact-play .table-area{position:relative;gap:3px}
  .compact-play .table-heading{width:280px;padding-right:0;min-height:32px;gap:6px;flex-wrap:nowrap}
  .compact-play .table-heading .phase-track{display:none}
  .compact-play .table-heading .phase-label{display:inline-flex;margin-left:auto;white-space:nowrap;font-size:11px;padding:4px 7px}
  .compact-play.solo-play .table-heading{width:410px}
  .compact-play .compact-tools{height:32px}
  .compact-play .game-guide{position:absolute;top:0;left:290px;right:340px;min-height:32px;max-height:32px;margin:0;padding:3px 7px;overflow:hidden}
  .compact-play.solo-play .game-guide{left:420px}
  .compact-play .game-guide>div{min-width:0}.compact-play .game-guide strong{font-size:11px;line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  .compact-play .arena,.compact-play .hand-section{width:100%;max-width:900px}
  .compact-play .player-board{grid-template-rows:20px minmax(0,1fr) minmax(0,.85fr)}
  .compact-play .player-board.cpu{grid-template-rows:20px minmax(0,.85fr) minmax(0,1fr)}
  .compact-play .player-head{grid-template-rows:20px}
  .compact-play .player-board>.lane{padding-left:82px;margin-right:68px}
  .compact-play .lane-label{width:76px;line-height:14px;gap:6px}
  .compact-play .lane-label>span:last-child{font-size:9px;line-height:13px}
  .compact-play .slots{max-width:500px;margin-left:auto;margin-right:auto;gap:5px}
  .compact-play .player-head .piles{top:27px;width:60px;grid-template-columns:54px;gap:7px}
  .compact-play .deck-stack,.compact-play .player-head .pile-stack{width:54px;height:clamp(40px,8dvh,64px);font-size:10px}
  .compact-play .pile-label{font-size:10px;line-height:14px}
  .compact-play .hand-section{position:relative;min-height:0;height:clamp(108px,17dvh,182px);padding:5px 8px 2px 90px;display:flex;align-items:stretch}
  .compact-play .hand-section .section-line{position:absolute;left:8px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:flex-start;width:75px;margin:0;gap:4px}
  .compact-play .hand-section .section-line>span{display:none}
  .compact-play #hand{flex:1;min-width:0;height:100%;padding-top:5px;gap:0}
  .compact-play #hand>.hand-card{flex:0 1 96px;max-width:96px;height:100%;min-height:0;padding-bottom:16px}
  .compact-play #hand>.hand-card+.hand-card{margin-left:-8px}
  .compact-play #hand>.hand-card.has-card-art>.card-art{height:calc(100% - 16px);inset:0 0 16px}
  .compact-play #hand>.hand-card.has-card-art>.card-name{font-size:11px;line-height:15px}
  .compact-play .hand-card.has-card-art .count{font-size:10px}.compact-play .hand-card.has-card-art .hand-badge.usable{font-size:8px}
  .compact-play.many-hand-cards #hand{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:4px;align-items:stretch}
  .compact-play.many-hand-cards #hand>.hand-card{width:100%;max-width:none;height:100%;margin-left:0}
  .compact-play .hand .drag-grip{bottom:17px;width:24px;height:24px}
}
@media(max-width:600px){
  .compact-play .topbar button{font-size:10px;min-height:30px}
  .compact-play .table-heading h1{font-size:11px}.compact-play .table-heading .phase-label{font-size:9px}
  .compact-play .compact-tools button{font-size:10px;min-height:30px}
  .compact-play .game-guide strong{font-size:10px}
  .compact-play .player-name{font-size:10px}.compact-play .role,.compact-play .opponent-hand{font-size:8px}
  .compact-play .life strong{font-size:13px}.compact-play .ap strong{font-size:11px}
  .compact-play .piles,.compact-play .piles button{font-size:8px}
  .compact-play .lane-label{font-size:8px}.compact-play .lane-label>span:last-child{font-size:7px}
  .compact-play .dock-inner>.primary{min-height:40px;font-size:12px}
  .compact-play .dock-options button{min-height:38px;font-size:12px}
}

/* Context controls live beside the hand, leaving no permanent footer strip. */
.compact-play .hand-section,.compact-play .pending-section{display:flow-root}
.compact-play .hand-section>.section-line,.compact-play .pending-section>.section-line{float:left;min-height:14px;max-width:90px;margin:0 0 3px;align-items:center}
.compact-play .has-table-controls>.section-line{min-height:36px}
.compact-play .hand-section>.section-line>span,.compact-play .pending-section>.section-line>span{display:none}
.compact-play .hand-section>.hand,.compact-play .pending-section>.hand{clear:both}
.compact-play .hand-section>.action-dock,.compact-play .pending-section>.action-dock{position:static;float:right;width:max-content;max-width:calc(100% - 95px);padding:0;margin:0 0 3px;background:none;border:0;box-shadow:none;backdrop-filter:none}
.compact-play .action-dock .dock-inner{min-height:0;width:auto;max-width:100%;gap:4px;align-items:stretch}
.compact-play .action-dock .dock-options{flex:0 1 auto;gap:4px;max-height:none;overflow:visible}
.compact-play .action-dock .dock-options button{flex:0 1 auto;min-height:32px;font-size:11px;line-height:1.35;padding:4px 7px}
.compact-play .action-dock .dock-inner>.primary{min-height:34px;min-width:104px;max-width:none;padding:5px 9px;font-size:12px;margin:0}
@media(min-width:1000px) and (min-height:600px){
  .compact-play .hand-section{display:flex}
  .compact-play .hand-section.has-table-controls{padding-right:164px}
  .compact-play .hand-section>.section-line{min-height:0;max-width:75px;float:none}
  .compact-play .hand-section>.action-dock{position:absolute;float:none;top:auto;bottom:5px;left:auto;right:8px;width:148px;max-width:148px;margin:0}
  .compact-play .hand-section>.action-dock .dock-inner,.compact-play .hand-section>.action-dock .dock-options{flex-direction:column;align-items:stretch}
  .compact-play .hand-section>.action-dock .dock-options button{min-height:30px;width:100%}
  .compact-play .hand-section>.action-dock .dock-inner>.primary{min-width:0;width:100%;min-height:34px}
}

/* Separate the ability decision from its legal targets; no game rules are inferred. */
.table-choice-panel{order:3;flex-shrink:0;width:100%;max-width:900px;align-self:center;max-height:min(190px,30dvh);overflow:auto;padding:8px 10px;background:#f2f8fc;border:1px solid #8fb9d2;border-left:4px solid #277eae;border-radius:5px;color:#315c76}
.choice-title{font-size:13px;line-height:1.5}.choice-hint{font-size:11px;line-height:1.5;margin:2px 0 5px;overflow-wrap:anywhere}
.choice-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px}
.choice-options .choice-option{min-height:38px;padding:7px 10px;font-size:12px;line-height:1.5;text-align:left;white-space:normal;border:1px solid #77a9c7;background:#fff;color:#2c5c79}
.choice-option-row{display:flex;gap:4px;min-width:0}.choice-option-row>.choice-option{flex:1;min-width:0}.choice-option-row>.choice-inspect{flex:0 0 auto;font-size:10px;padding:4px 7px;color:#4e7892}
.choice-options .choice-option:hover:not(:disabled){background:#dceef9;border-color:#217bab}
.choice-card-text summary{font-size:11px;line-height:1.6;cursor:pointer;color:#356d90}
.choice-card-text{margin:3px 0 6px}.choice-card-text p{font-size:11px;line-height:1.6;margin:4px 0;white-space:pre-line}
.compact-play .slot.is-target{outline:2px solid #3e95c2;outline-offset:1px}
.compact-play .slot.is-target .target-badge{font-size:10px!important;font-weight:700;padding:3px 4px;background:#277eae!important;color:#fff!important;line-height:1.2}
.compact-play .slot.choice-target{outline:3px solid #1184bd;outline-offset:2px;box-shadow:0 0 0 5px #78c0e855!important}
.compact-play.has-target-choice .player-board{gap:5px}
.compact-play .slot.choice-muted{opacity:.35;filter:grayscale(.5)}
.compact-play .slot.choice-target:hover:not(:disabled),.compact-play .slot.choice-target:focus-visible{outline-color:#d78a23;box-shadow:0 0 0 6px #efbb5955!important}
.compact-play .slot.choice-source{outline:3px solid #d39132;outline-offset:2px}
.compact-play.has-hand-choice .hand-card.can-act{outline:2px solid #1682b9;outline-offset:1px}
.compact-play.has-hand-choice .hand-card.can-act .hand-badge{font-size:9px;background:#277eae;color:#fff}
.compact-play.has-hand-choice .hand-card:not(.can-act){opacity:.45}
@media(max-width:600px){.table-choice-panel{padding:6px 7px;max-height:29dvh}.choice-title{font-size:12px}.choice-hint{font-size:10px}.choice-options{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.choice-options:has(.choice-inspect){grid-template-columns:1fr}.choice-options .choice-option{font-size:11px;min-height:34px}.compact-play .slot.is-target .target-badge{font-size:9px!important;padding:2px 3px}}
@media(min-width:601px) and (max-width:950px) and (max-height:500px){
  .compact-play.has-choice-panel .game-guide{display:none}
  .table-choice-panel{max-height:86px;padding:4px 6px}
  .choice-title,.choice-card-text{display:none}.choice-hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .compact-play.has-target-choice .drag-effect-source{min-height:24px;padding-top:0;padding-bottom:0}.compact-play.has-target-choice .drag-effect-source>.card-art{height:20px}
}
@media(max-height:700px){
  .compact-play.has-target-choice .hand-section{height:30px;min-height:30px;padding:4px 8px;display:flex;align-items:center}
  .compact-play.has-target-choice #hand{display:none}
  .compact-play.has-target-choice .hand-section>.section-line{position:static;float:none;transform:none;width:auto;max-width:none;min-height:0;margin:0;flex-direction:row;gap:8px}
  .compact-play.has-target-choice .hand-section>.section-line:after{content:"対象を選ぶと手札を表示";font-size:10px;font-weight:400;color:#6f8797}
}
@media(max-width:600px) and (max-height:700px){
  .compact-play.has-target-choice .table-choice-panel{padding-top:4px;padding-bottom:4px}
  .compact-play.has-target-choice .drag-effect-source{min-height:24px;padding-top:0;padding-bottom:0}
  .compact-play.has-target-choice .drag-effect-source>.card-art{height:20px}
  .compact-play.has-target-choice .drag-effect-source .drag-grip{width:20px;height:20px;bottom:2px}
}

/* Keep the original source controls and choices together, outside the play field. */
.table-choice-rail{order:6;flex-shrink:0;display:flex;flex-direction:column;gap:5px;min-height:0;width:100%;max-width:900px;align-self:center}
.table-choice-rail>.table-choice-panel{order:2;width:100%;max-width:none;align-self:stretch}
.compact-play .table-choice-rail>.drag-effect-source,.compact-play .table-choice-rail>.compact-reveal{order:0;flex-shrink:0;width:100%;margin:0}
@media(min-width:1280px){
  .table-choice-rail{position:fixed;top:100px;left:calc(50% + 462px);width:min(280px,calc((100vw - 900px)/2 - 24px));max-width:none;max-height:calc(100dvh - 120px);overflow:auto;align-self:auto;z-index:8}
  .table-choice-rail>.table-choice-panel{max-height:none;overflow:visible;box-shadow:0 3px 14px #28495f12}
  .table-choice-rail .choice-options{grid-template-columns:minmax(0,1fr)}
  .table-choice-rail .choice-option-row{flex-wrap:wrap}
  .table-choice-rail .choice-option-row>.choice-option{flex-basis:100%}
  .table-choice-rail .choice-option-row>.choice-inspect{margin-left:auto}
  .compact-play .table-choice-rail>.drag-effect-source,.compact-play .table-choice-rail>.compact-reveal{min-height:82px;padding:8px 30px 8px 60px;font-size:11px;line-height:1.5;text-align:left}
  .compact-play .table-choice-rail>.drag-effect-source>.card-art,.compact-play .table-choice-rail>.compact-reveal>.card-art{left:8px;top:8px;width:43px;height:64px;object-fit:contain}
}
.compact-play #compact-reveal[data-trigger-kind]{flex-direction:column;align-items:flex-start;justify-content:center;gap:4px}
.trigger-kind-badge{display:block;max-width:100%;padding:3px 6px;border:1px solid #80b6d3;border-radius:4px;background:#dceffb;color:#245e80;font-size:12px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:anywhere}

/* CPU action playback shares the outside-board information rail. */
.cpu-playback-panel{order:-1;flex-shrink:0;padding:10px 12px;border:1px solid #4287c0;border-radius:8px;background:#102d42;color:#edf7ff;box-shadow:0 4px 14px #0003}
.cpu-playback-panel strong{font-size:12px;color:#8fd4ff}.cpu-playback-panel p{font-size:13px;line-height:1.55;margin:6px 0;overflow-wrap:anywhere}.cpu-playback-panel button.outline{min-height:32px;font-size:12px;color:#edf7ff;border-color:#83bedf;background:#173e58;opacity:1}.cpu-playback-panel button.outline:hover{background:#245772}
@media(max-width:1279px){.cpu-playback-panel{display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:6px 10px}.cpu-playback-panel p{grid-column:1;margin:0}.cpu-playback-panel button{grid-column:2;grid-row:1/3;align-self:center}}
