/* The board and hand share the main working surface. */
.table-active .table-layout{grid-template-columns:minmax(145px,12fr) minmax(0,69fr) minmax(215px,19fr)}
.table-main{display:grid;grid-template-rows:minmax(0,1fr) clamp(115px,20vh,265px);gap:12px;min-height:0;min-width:0}
.table-active .table-sidebar{display:flex;flex-direction:column;gap:12px}
.table-active .opponent-cards{flex:0 0 auto;padding:12px}
.table-active .table-communication{flex:0 1 auto;max-height:70%;min-height:38px}
.table-active .table-communication.collapsed{flex:0 0 38px}
.table-active .table-rail-tabs{flex:0 0 38px;border-color:#45617055}
.table-active .table-rail-tabs button[aria-pressed=true]{background:#214252;color:#e6f1ef}
.table-active .table-events summary{cursor:pointer;padding:8px 0;color:#d3e4e8;font-weight:650}
.table-active .table-events li{font-size:14px}
.table-active .table-main>.table-hand{padding:8px 18px 10px;border:1px solid #789caa40;border-top:2px solid #7ccaba70;border-radius:10px;overflow:visible;background:#0b1e2ce8}
.table-active .table-main .table-hand-heading{flex:0 0 25px;font-size:14px}
.table-active .table-main .table-hand-cards{display:flex;flex-wrap:nowrap;gap:clamp(8px,1.1vw,26px);align-items:center;justify-content:center;min-height:0;padding:6px 0 0}
.table-active .table-main .table-hand-cards .table-card{height:100%;width:auto;max-width:calc((100% - 48px)/7);max-height:100%;aspect-ratio:63/88;flex:0 1 auto}
.table-active .table-main .table-hand-cards .table-card:hover,.table-active .table-main .table-hand-cards .table-card:focus-visible{transform:translateY(-12px) scale(1.13);z-index:8}
.table-active .table-main .table-card b{font-size:clamp(11px,.8vw,20px)!important;letter-spacing:0}
.table-active .auto-public{grid-template-rows:minmax(0,1.1fr) minmax(0,.85fr) minmax(0,.55fr)}
.table-active .opponent .auto-public{grid-template-rows:minmax(0,.55fr) minmax(0,.85fr) minmax(0,1.1fr)}
.table-active .auto-player .auto-piles{--pile-height:clamp(23px,calc((80dvh - 390px)/6),88px)}
.table-active .auto-don small{display:block;font-size:12px}
.table-active .table-rail{overflow:hidden;gap:10px}
.table-active .table-detail{flex:1 1 0;min-height:90px}
.table-active .table-detail>h3{font-size:14px;margin:4px 0}
.table-active .table-detail .table-stats{font-size:12px!important}
.table-active .table-detail #table-text{font-size:12px;padding:3px}
.table-active #table-actions:empty{display:none}
.table-active #table-actions h3,.table-active .table-hint{display:none}
.table-active #table-actions,.table-active .auto-prompt{padding:12px;flex:0 0 auto}
.table-active .auto-prompt h3{font-size:16px;margin:0 0 10px}
.table-active .auto-prompt p{font-size:14px;margin:8px 0}
.table-active .table-card-actions{display:flex;gap:8px}
.table-active #match-table .table-card-actions .button,.table-active #match-table .auto-prompt .button{font-size:14px;min-height:40px;width:100%}
.table-active .table-card-actions select{font-size:14px;padding:7px}
.action-summary{font-size:14px;color:#afc9d0}
.table-active .turn-controls{display:flex;flex-direction:column;gap:5px}
.draw-status{font-size:12px;color:#a8c0c7;text-align:center}
.battle-steps{display:flex;list-style:none;padding:0;margin:0 0 12px;gap:3px}
.battle-steps li{flex:1;font-size:12px;color:#9eb4bf;border-bottom:2px solid #44606d;padding:5px 0;text-align:center}
.battle-steps li[aria-current]{color:#9cf1dc;border-color:#9cf1dc;font-weight:700}
.combatants{display:grid;grid-template-columns:1fr 22px 1fr;align-items:center;text-align:center;gap:6px}
.combatants>div{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.combatants img{height:clamp(45px,8vh,112px);max-width:100%;object-fit:contain;border-radius:4px}
.combatants b{font-size:clamp(20px,1.7vw,38px);line-height:1.1;color:#f4dfaa}
.combatants small{font-size:12px;color:#b9cbd2}
.counter-needed{text-align:center;color:#e6d3a8!important}
.table-active .table-card.attack-target{outline:2px solid #7fdfcc!important}
.table-active .table-card.attack-chosen{outline:3px solid #ffb677!important}
.table-active .table-card.effect-source{box-shadow:0 0 0 3px #ddb46e,0 0 18px #ddb46e66}
.card-modifier[title]{cursor:help}
.counter-preview{font-size:12px;color:#a0efd6;margin:7px 0 0}
.table-active #match-table .auto-don .don-card{margin-right:-8px}
.table-active .opponent-cards .table-hand-heading{display:block;line-height:1.5;letter-spacing:0}
.table-active .opponent-cards .table-hand-heading>span{display:block}
@media(min-height:1000px){.table-active #match-table .auto-don .don-card{margin-right:-18px}}
@media(max-width:1400px){.table-active .table-layout{grid-template-columns:140px minmax(0,1fr) 230px;gap:8px}.table-main{gap:8px}.table-active .auto-player{padding:5px 8px!important}.table-active .auto-public{gap:5px 8px}.table-active .auto-don{padding:2px 5px;gap:8px}.table-active .auto-don>span{font-size:10px}.table-active .auto-don small{font-size:10px}.table-active .auto-don>span strong{font-size:17px}.table-active .auto-characters{gap:10px;padding:4px 6px}.table-active .table-player-heading strong{font-size:11px!important}.table-active .table-player-heading>span{font-size:10px!important}.table-active .table-main .table-hand-heading{font-size:12px}.table-active .table-main .table-hand-cards{gap:8px}.table-active .table-detail{padding:7px}.table-active .auto-prompt,.table-active #table-actions{padding:8px}}
@media(max-height:800px){.table-active .auto-prompt h3{font-size:14px;margin-bottom:5px}.battle-steps{margin-bottom:5px}.combatants img{height:40px}.table-active .auto-prompt p{font-size:12px;margin:5px 0}.table-active #match-table .table-card-actions .button,.table-active #match-table .auto-prompt .button{min-height:32px}.table-active .auto-player .table-player-heading{flex-basis:18px;min-height:18px}.table-active .table-detail>h3,.table-active .table-detail .table-stats{display:none}}
@media(max-width:1000px){.table-active .table-layout{grid-template-columns:minmax(0,1fr) 205px}.table-active .table-sidebar{display:none}.table-main{grid-column:1;grid-row:1}.table-active .table-rail{grid-column:2;grid-row:1}.table-active .opponent-hand{display:flex;position:absolute;top:4px;left:35%;height:17px;padding:0}.table-active .auto-stage{display:flex}.table-active .auto-don small{font-size:9px}}
@media(max-width:600px){.table-active .table-layout{grid-template-columns:minmax(0,1fr) 140px}.table-active .table-main>.table-hand{padding:5px}.table-active .table-main .table-hand-cards{gap:3px}.table-active .table-main .table-card b{font-size:8px!important}.table-active .auto-don>span{font-size:8px}.table-active .auto-don small{display:none}.table-active #match-table .table-card-actions .button,.table-active #match-table .auto-prompt .button{font-size:12px}.battle-steps li{font-size:9px}.combatants small{font-size:10px}.table-active .table-card-actions select{font-size:12px}.table-active .table-main .table-hand-heading{font-size:10px}.table-active .auto-prompt h3{font-size:12px}.action-summary{font-size:12px}}
@media(prefers-reduced-motion:reduce){.table-active .table-main .table-hand-cards .table-card:hover{transform:none}}
