/* Board gestures share the arena's typography, faction colors and object shapes. */
body[data-mode=match] [data-drag-source=ready]{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}body[data-mode=match] [data-drag-source=blocked]{touch-action:none}body.is-dragging{user-select:none;-webkit-user-select:none;cursor:grabbing}body.is-dragging [data-drag-source]{cursor:grabbing}.drag-origin{opacity:.38!important}.drag-ghost{position:fixed;z-index:100;pointer-events:none;filter:drop-shadow(0 16px 20px #030d19aa);transform:rotate(-3deg) scale(1.06);transform-origin:50% 60%}.drag-ghost>*{width:100%!important;height:100%!important;pointer-events:none;margin:0}.drag-ghost .realm-piece{height:100%}.drag-ghost .resource-number{display:none}.drag-aim{position:fixed;inset:0;width:100%;height:100%;z-index:98;pointer-events:none;overflow:visible}.drag-feedback{position:fixed;z-index:102;left:50%;bottom:26px;transform:translateX(-50%);width:max-content;max-width:min(680px,calc(100vw - 30px));padding:12px 18px;background:#102c3cf5;color:#f4efdd;border:1px solid #9ed1cc;border-radius:12px;box-shadow:0 9px 40px #020b16a6;font-size:14px;font-weight:650;pointer-events:none;text-align:center}.drag-feedback[data-valid=true]{border-color:#ffd28b;color:#ffdc9b}.drag-feedback[data-valid=false]{color:#cbdee5}.drop-legal{outline:2px dashed #9ce4d6!important;outline-offset:5px;box-shadow:0 0 24px #72dccc20;border-radius:12px}.drop-hover{outline:3px solid #ffd387!important;box-shadow:0 0 25px #ffb64035!important}.drop-invalid{outline:2px dashed #e48c85!important;outline-offset:4px;border-radius:12px}.drop-legal[data-drop-label]::before{content:attr(data-drop-label);position:absolute;z-index:9;top:-13px;left:50%;transform:translateX(-50%);font:750 11px/1.35 var(--font);max-width:240px;width:max-content;background:#123642f5;border:1px solid #99ddd1aa;color:#d8fff3;padding:4px 9px;border-radius:6px;white-space:normal;pointer-events:none;box-shadow:0 4px 15px #06151f77}.drop-hover[data-drop-label]::before{background:#664a1ef5;color:#fff0ca;border-color:#ffd387}.player-bar.drop-legal{position:relative}.drag-paying .node-core{box-shadow:0 0 0 3px #ffe0a5,0 0 25px #ffc25899}.has-plan .piece-visual{filter:drop-shadow(0 0 7px #ffbd4588)}.has-plan .piece-name{border:1px solid #ffd28c}.gesture-cue{font-size:12px;color:#def0e9;background:#132f3ce0;border:1px solid #8bbab43b;border-radius:8px;padding:7px 13px;margin:0;text-align:center;line-height:1.55}.gesture-instruction{font-size:13px;color:#e0e9df;line-height:1.7}.alternative-controls{font-size:12px;margin:11px 0;color:#b8d1d9;border-top:1px solid #93b8bf24;padding-top:9px}.alternative-controls>summary{cursor:pointer;min-height:34px;display:list-item;line-height:1.6;color:#a8cbd1}.alternative-controls[open]>summary{margin-bottom:10px}.drag-plan-list{padding:0;margin:10px 0;list-style:none;display:grid;gap:6px}.drag-plan-list:empty{display:none}.drag-plan-list>li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;background:#28475499;border:1px solid #acc5bb33;border-radius:7px;font-size:11px}.drag-plan-list button{border:0;background:none;color:#ffd69a;min-width:30px;min-height:30px;font-size:19px}.drag-choice-dialog{width:min(480px,calc(100% - 24px));padding:30px}.drag-choice-options{display:grid;gap:10px;margin-top:20px}.drag-choice-options>button{min-height:48px;text-align:left;padding:11px 15px;font-size:14px}.decision-rail>#stack{flex-shrink:0;padding:0 12px;max-height:140px;margin:8px 0}.decision-rail>#stack:empty{display:none}.decision-rail>#stack .stack-entry{font-size:12px}.decision-rail>#stack .stack-entry small{font-size:10px}.decision-rail>#stack .stack-order{font-size:8px}.decision-rail>#stack:has(>.empty-stack[hidden]){margin:0;padding:0}.resource-zone.drop-legal{min-height:60px}.own-battlefield.drop-legal{background:#4ae3bd09}.resource-zone.own.drop-legal{background:#ffbc4a0a}
@media(min-width:901px){body[data-mode=match] .arena-grid{padding:8px 16px 0;gap:18px}body[data-mode=match] .arena{height:calc(100svh - 156px);min-height:0;grid-template-rows:100px minmax(230px,1fr) 24px minmax(230px,1fr) 100px 112px;row-gap:3px}body[data-mode=match] .arena-footer{height:28px;min-height:28px}body[data-mode=match] .turn-zone{width:min(620px,100%)}body[data-mode=match] .decision-rail{max-height:calc(100svh - 136px)}body[data-mode=match] .hand-card{height:104px}body[data-mode=match] .hand-label{margin-bottom:3px}body[data-mode=match] .opponent-battlefield .creatures{transform:none}body[data-mode=match] .creatures{padding-top:23px;padding-bottom:8px}body[data-mode=match] .resource-zone{overflow:visible}body[data-mode=match] .resource{flex-basis:64px}}
@media(min-width:901px) and (max-height:940px){body[data-mode=match]{--unit:146px}body[data-mode=match] .arena{grid-template-rows:78px minmax(194px,1fr) 24px minmax(194px,1fr) 78px 100px}body[data-mode=match] .creatures{min-height:194px;padding:20px 10px 4px;gap:18px}body[data-mode=match] .unit{height:170px}body[data-mode=match] .piece--unit .piece-visual{width:124px;height:124px}body[data-mode=match] .piece--unit .piece-identity{margin-top:10px;max-width:150px}body[data-mode=match] .piece--unit .piece-name{font-size:12px;padding:4px 8px}body[data-mode=match] .piece-keywords .dr-keyword{font-size:9px;padding:2px 5px}body[data-mode=match] .piece-strength{width:34px;height:34px;bottom:-5px}body[data-mode=match] .piece-strength>b{font-size:23px}body[data-mode=match] .piece-status{font-size:9px;padding:2px 5px}body[data-mode=match] .resource{height:52px;flex-basis:56px}body[data-mode=match] .node-core{width:43px;height:43px}body[data-mode=match] .node-output{font-size:14px}body[data-mode=match] .node-element{height:18px}body[data-mode=match] .node-element .dr-icon{width:18px;height:18px}body[data-mode=match] .node-state{font-size:8px}body[data-mode=match] .node-connection{top:22px}body[data-mode=match] .hand-card{height:94px}body[data-mode=match] .piece--hand .piece-name{font-size:12px}body[data-mode=match] .inspect-hero{height:130px}body[data-mode=match] .inspect-title h2{font-size:25px}body[data-mode=match] .inspect-body{padding:12px 16px}body[data-mode=match] .inspect-prices>span{padding:8px 0}body[data-mode=match] .payment-receipt{padding:12px 15px}body[data-mode=match] .payment-heading strong{font-size:14px}body[data-mode=match] .gesture-cue{font-size:11px;padding:5px 10px}body[data-mode=match] .opponent-hand{display:none}}
@media(min-width:901px) and (max-height:790px){body[data-mode=match]{--unit:126px}body[data-mode=match] .arena{grid-template-rows:64px minmax(156px,1fr) 22px minmax(156px,1fr) 64px 90px}body[data-mode=match] .creatures{min-height:156px;padding:20px 8px 2px;gap:15px}body[data-mode=match] .unit{height:134px}body[data-mode=match] .piece--unit .piece-visual{width:96px;height:96px}body[data-mode=match] .piece--unit .piece-identity{margin-top:8px;max-width:130px}body[data-mode=match] .piece--unit .piece-name{font-size:11px;max-width:130px;padding:3px 6px}body[data-mode=match] .piece-keywords{margin-top:3px}body[data-mode=match] .piece-strength{width:28px;height:28px}body[data-mode=match] .piece-strength>b{font-size:19px}body[data-mode=match] .piece-status{font-size:8px;bottom:5px}body[data-mode=match] .resource{height:42px;flex-basis:45px}body[data-mode=match] .node-core{width:34px;height:34px}body[data-mode=match] .node-element{height:15px}body[data-mode=match] .node-element .dr-icon{width:14px;height:14px}body[data-mode=match] .node-output{font-size:11px}body[data-mode=match] .node-state{font-size:7px;bottom:-2px}body[data-mode=match] .node-connection{top:16px}body[data-mode=match] .node-reactive{width:17px;height:17px;font-size:12px;top:-3px;right:-4px}body[data-mode=match] .resource-number{font-size:8px;min-width:18px;height:15px;line-height:13px;right:0;top:-3px}body[data-mode=match] .resources{gap:12px;padding:3px 4px}body[data-mode=match] .mana-budget{font-size:10px;min-height:17px;gap:4px 9px}body[data-mode=match] .mana-budget>span{font-size:9px}body[data-mode=match] .hand-card{height:84px}body[data-mode=match] .piece--hand .piece-name{font-size:11px}body[data-mode=match] .hand-card .dr-pip{width:17px;min-width:17px;height:17px;font-size:10px}body[data-mode=match] .hand-label{font-size:10px}body[data-mode=match] .gesture-cue{font-size:10px;padding:4px 8px}body[data-mode=match] .portrait{width:48px;height:48px}body[data-mode=match] .identity strong{font-size:15px}body[data-mode=match] .identity small{font-size:9px}body[data-mode=match] .player-bar{width:158px}body[data-mode=match] .opponent .identity small{max-width:100px}body[data-mode=match] .counter.library>strong{font-size:27px}body[data-mode=match] .counter.library{padding:6px 8px}body[data-mode=match] .counter b{font-size:11px}body[data-mode=match] .inspect-hero{height:110px}body[data-mode=match] .inspect-title h2{font-size:24px}body[data-mode=match] .rules-text{font-size:12px}body[data-mode=match] .match-panel{padding:12px 16px}body[data-mode=match] .gesture-instruction{font-size:12px}body[data-mode=match] .primary{min-height:48px;font-size:19px}}
@media(max-width:900px){.drag-feedback{font-size:12px;bottom:20px}.decision-rail>.recent-play{border-radius:0}.gesture-cue{font-size:11px}body[data-mode=match] .turn-zone{height:auto;min-height:24px}}
@media(max-width:600px){.drag-feedback{bottom:91px;padding:10px 13px;font-size:12px;max-width:calc(100vw - 24px)}.drag-ghost{transform:rotate(-3deg) scale(.92)}.drop-legal[data-drop-label]::before{font-size:9px;top:-13px;max-width:170px}.alternative-controls>summary{min-height:40px}.gesture-instruction{font-size:13px}.drag-choice-dialog{padding:28px 22px}.drag-plan-list>li{font-size:12px}body[data-mode=match] .turn-zone{min-height:30px}body[data-mode=match] .gesture-cue{font-size:11px}}
@media(min-width:901px){body[data-mode=match] .arena{grid-template-columns:180px minmax(0,1fr)}body[data-mode=match] .player-bar{width:100%;min-width:0}body[data-mode=match] .identity{gap:8px;min-width:0}body[data-mode=match] .identity>div:last-child{min-width:0}body[data-mode=match] .identity strong,body[data-mode=match] .identity small{overflow:hidden;text-overflow:ellipsis;max-width:100%}body[data-mode=match] .portrait{flex-shrink:0}}
@media(min-width:901px) and (max-width:1190px){body[data-mode=match] .arena{grid-template-columns:150px minmax(0,1fr)}}
#combat-lines .attack-line{fill:none;stroke:#ffc56c;stroke-width:2.5;opacity:.85}#combat-lines .intercept-line{fill:none;stroke:#94e2dc;stroke-width:2.5;stroke-dasharray:6 5;opacity:.9}
body[data-mode=match] .piece--unit .piece-name{margin-bottom:0}
.drop-legal{position:relative}
body[data-mode=match] .creatures{justify-content:safe center}
@media(min-width:901px) and (max-height:790px){body[data-mode=match] .creatures{padding-top:16px}body[data-mode=match] .unit{height:138px}body[data-mode=match] .piece--unit .piece-visual{width:90px;height:90px}body[data-mode=match] .piece--unit .piece-identity{margin-top:4px}body[data-mode=match] .piece--unit .piece-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body[data-mode=match] .piece-keywords .dr-keyword{line-height:1}}
@media(prefers-reduced-motion:reduce){.drag-ghost{transform:none}.drop-legal,.drop-hover{transition:none}}
