/* A stable hand and one-screen desktop playmat. */
.nc-back.official-back{display:block;background:#171b19;border:0;border-radius:3px}
.nc-back.official-back:before{display:none}
.nc-back.official-back>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:fill;display:block;filter:none}
.nc-back.official-back.legend-back>img{left:-5.46%;top:-3.53%;width:110.04%;height:109.58%;object-fit:fill}
.hand>.card-stack.hand-initializing{transition:none!important}
.table-is-animating .hand>.card-stack{pointer-events:none;transform:translate(var(--fan-x),var(--fan-y)) rotate(var(--fan-angle))}
.table-is-animating .hand>.card-stack.selected-stack{transform:translate(var(--fan-x),calc(var(--fan-y) - 20px)) rotate(0) scale(1.06)}
.table-is-animating .hand>.card-stack.hand-hovered{transform:translate(var(--fan-x),-25px) rotate(var(--pointer-tilt,0deg)) scale(1.17)}
.game-card[data-cue="sell"],.cue-sell{--cue:#52b9ff;color:#78caff}
.game-card[data-cue="both"],.cue-both{--cue:#ffac4e;color:#ffc17b}
.game-card[data-cue="play"],.cue-play{--cue:#67e3a2;color:#8befb9}
.game-card[data-cue="attack"],.cue-attack{--cue:#ff6c81;color:#ff91a1}
.game-card[data-cue="legend"],.cue-legend{--cue:#c49aff;color:#d4b3ff}
.game-card[data-cue="reaction"]{--cue:#65eff0}
.card-stack .game-card.action-ready{border:2px solid var(--cue);animation:action-edge 1.9s ease-in-out infinite;animation-delay:-.7s}
.card-stack .game-card.selected{outline:1px solid #fff;outline-offset:2px}
@keyframes action-edge{0%,100%{box-shadow:0 0 0 1px color-mix(in srgb,var(--cue),transparent 65%),0 0 5px color-mix(in srgb,var(--cue),transparent 75%)}50%{box-shadow:0 0 0 1px var(--cue),0 0 15px color-mix(in srgb,var(--cue),transparent 45%)}}
.action-key{display:flex;gap:11px;flex-wrap:wrap;font-size:9px;line-height:1.8;padding-top:2px}
.action-key span:before{content:'';display:inline-block;width:5px;height:5px;background:var(--cue);margin-right:4px;border-radius:50%}
.die-token.pickable{border:1px solid #fff47d;animation:die-edge 1.3s ease-in-out infinite;outline-offset:1px}
@keyframes die-edge{0%,100%{box-shadow:0 0 3px #fff24c55;outline-color:#dfd74666}50%{box-shadow:0 0 16px #fff24cbb;outline-color:#fff9a5}}
.fixer-focus .enemy-mat,.fixer-focus .seat,.fixer-focus .opponent-hand,.fixer-focus .hand-zone,.fixer-focus .side-panel,.fixer-focus .friendly-mat>.mat-gigs,.fixer-focus .friendly-mat>.mat-field,.fixer-focus .friendly-mat>.mat-resources,.fixer-focus .friendly-mat>.mat-piles{opacity:.2;pointer-events:none}
.fixer-focus .friendly-mat{border-color:transparent;background:transparent}
.fixer-focus .awaiting-die{border:2px solid #fff371;box-shadow:0 0 30px #ffef4a44;z-index:8;background:#171d19}
.fixer-focus .board-decision{z-index:8;background:#17211ef5;border:1px solid #e5dc5688;padding:15px 20px;font-size:13px;box-shadow:0 10px 35px #0009;pointer-events:none}
.opening-buttons{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s}
.opening-buttons.is-ready{opacity:1;visibility:visible;pointer-events:auto}
.modal:has(.modal-cards){width:min(960px,96vw)}
.decision-shell:has(.modal-cards){width:min(960px,96vw)}
.modal-cards{--card-w:122px;--card-h:171px;display:flex;justify-content:center;gap:12px;overflow:visible;padding:15px 0 5px;margin:12px 0;min-height:195px}
.modal-cards .game-card{width:var(--card-w);height:var(--card-h)}
.modal-cards .card-stack{transition:none!important}
.table-battle .board{position:relative}
@media(min-width:901px){
  body.in-battle{overflow:hidden}
  .table-battle{width:100%;max-width:none;height:100dvh;min-height:0;padding:8px;gap:10px;grid-template-columns:minmax(0,1fr) clamp(280px,24vw,350px)}
  .table-battle .board{display:grid;grid-template-rows:28px minmax(0,1fr) 44px 28px minmax(0,1.12fr) clamp(184px,29vh,250px);height:100%;min-height:0;overflow:hidden}
  .table-battle .seat{padding:3px 12px;min-height:0;grid-row:4}
  .table-battle .seat.opponent{grid-row:1;padding-right:165px}
  .table-battle .seat-name{font-size:11px}.table-battle .resource{font-size:10px;gap:7px}.table-battle .resource b{font-size:16px}
  .table-battle .opponent-hand{position:absolute;top:3px;right:8px;height:22px;gap:2px;padding:0;z-index:1}
  .table-battle .opponent-hand>.nc-back{width:12px;height:19px}.opponent-hand>.note{font-size:8px}
  .table-battle .playmat{--card-w:clamp(72px,11.8vh,108px);--card-h:calc(var(--card-w)*1.4);grid-template-columns:40px minmax(0,1fr) clamp(181px,18vw,250px) 46px;grid-template-rows:40px minmax(0,1fr);gap:5px;padding:5px;margin:0 7px 5px;min-height:0;grid-row:5}
  .table-battle .enemy-mat{--card-w:clamp(64px,10.2vh,96px);grid-row:2}
  .table-battle .mat-gigs{grid-column:2;grid-row:1;min-height:0;display:flex;align-items:center;gap:5px;overflow:hidden}
  .table-battle .mat-gigs>.mat-zone-heading{border:0;display:flex;flex-direction:column;align-items:flex-start;gap:0;flex-shrink:0;padding:3px 5px;font-size:8px}
  .table-battle .mat-gigs .controlled-dice{min-height:0;padding:2px;flex-wrap:nowrap;gap:5px;overflow-x:auto;scrollbar-width:thin}
  .table-battle .zone-empty-note{font-size:8px;padding:0;line-height:1.5}
  .table-battle .mat-fixer{grid-column:1;grid-row:1/3;padding:0}
  .table-battle .fixer-dice{gap:3px;padding:3px 0}.table-battle .mat-fixer>small{display:none}.table-battle .mat-fixer>.mat-zone-heading{min-height:15px;font-size:8px;padding:1px}
  .table-battle .die-token{width:26px;height:26px}.table-battle .table-die .die-value{font-size:17px}.table-battle .table-die.unrolled .die-value{font-size:11px}.table-battle .table-die small{font-size:6px;bottom:3px}.table-battle .used-die-slot{width:25px;height:22px;font-size:9px}.used-die-slot small{display:none}
  .table-battle .mat-field{grid-column:2;grid-row:2;overflow:hidden;display:flex;flex-direction:column;min-height:0}
  .table-battle .mat-zone-heading{min-height:18px;padding:2px 5px;font-size:8px;letter-spacing:.2px}
  .table-battle .field-cards{min-height:0;flex:1;flex-wrap:nowrap;align-items:center;gap:9px;padding:5px 7px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
  .table-battle .field-placeholder{min-height:0;height:100%;font-size:9px}
  .table-battle .mat-resources{grid-column:3;grid-row:1/3;grid-template-columns:1fr;grid-template-rows:1fr 1fr;gap:5px;min-height:0}
  .table-battle .legend-zone{--card-w:clamp(46px,7.2vh,66px);--card-h:calc(var(--card-w)*1.4);display:flex;flex-direction:column;min-height:0}
  .table-battle .legend-slots{min-height:0;padding:2px 4px;gap:3px;align-items:center;flex:1;overflow-x:auto;overflow-y:hidden}
  .table-battle .legend-stack .game-card .card-caption{height:13px;line-height:11px;font-size:6px;padding:1px 2px}.legend-stack .game-card img{height:calc(100% - 13px)}
  .table-battle .eddies-zone{display:flex;flex-direction:column;min-height:0}
  .table-battle .eddie-cards{padding:3px 5px;gap:6px;min-height:0;flex:1;align-items:center;overflow-y:hidden}
  .table-battle .eddie-slot{width:37px;height:56px}.table-battle .eddie-slot.is-spent{width:54px}.table-battle .eddie-card{width:37px;height:52px}.table-battle .eddie-value{font-size:23px;top:5px}.table-battle .eddie-card>small{font-size:7px;height:15px;padding:2px}.eddies-empty{font-size:8px;line-height:1.6}
  .table-battle .mat-piles{grid-column:4;grid-row:1/3;padding:0;gap:7px;justify-content:center}.table-battle .deck-pile,.table-battle .trash-pile{height:65px}.deck-pile>span,.trash-pile>span:last-child{font-size:8px;padding:2px}
  .table-battle .card-stack{height:calc(var(--card-h) + var(--gear-count,0)*16px)}.table-battle .card-stack.is-spent{width:calc(var(--card-h) + var(--gear-count,0)*16px)}.table-battle .card-pose{height:calc(var(--card-h) + var(--gear-count,0)*16px)}.table-battle .under-gear{top:calc(var(--gear-index)*16px)}.table-battle .under-gear>span{height:14px;line-height:12px;font-size:7px}
  .table-battle .card-stack .game-card .card-caption{font-size:8px;height:18px;line-height:14px;padding:2px 3px}.table-battle .card-stack .game-card img{height:calc(100% - 18px)}.table-battle .card-stack .game-card .power{font-size:19px;min-width:24px;bottom:21px}.table-battle .card-stack .game-card .card-state{font-size:7px;padding:2px}
  .table-battle .midline{grid-row:3;min-height:0;padding:4px 12px;gap:8px}.table-battle .phase-title{font-size:12px}.table-battle .turn-info{font-size:10px}.table-battle .midline .primary{padding:7px 12px;font-size:11px}.table-battle .motion-control{flex-direction:row;align-items:center}.table-battle .motion-control select{padding:4px;font-size:9px}
  .table-battle .board-decision{position:absolute;left:15%;top:53%;max-width:65%;border-radius:6px}
  .table-battle .hand-zone{grid-row:6;--card-w:clamp(100px,15.2vh,140px);--card-h:calc(var(--card-w)*1.4);padding:7px 18px 0;min-height:0}
  .table-battle .hand-zone .zone-label{font-size:10px}.table-battle .hand-zone>.row .note{font-size:9px}.table-battle .hand{height:calc(100% - 33px);min-height:0;margin:0;overflow:visible}.table-battle .hand>.card-stack{top:19px}
  .table-battle .hand .game-card .card-caption{font-size:10px;height:22px;line-height:18px}.table-battle .hand .game-card img{height:calc(100% - 22px)}
  .table-battle .side-panel{height:100%;max-height:none;min-height:0;position:relative;top:auto;margin:0;overflow:hidden;gap:7px}.table-battle .inspector{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;padding:18px}.table-battle .inspector .inspect-art{height:clamp(180px,31vh,290px);margin-bottom:9px}.table-battle .inspector h3{font-size:19px}.table-battle .inspector .rules-text{font-size:15px;line-height:1.9}.table-battle .log-drawer{flex-shrink:0}.table-battle .log-list{max-height:25vh}.table-battle .battle-bottom{flex-shrink:0}
  .victory-banner{position:absolute;inset:25% 15% auto;z-index:12;border-radius:6px}
}
@media(min-width:901px) and (max-width:1150px){.table-battle{grid-template-columns:minmax(0,1fr) 255px;gap:7px;padding:5px}.table-battle .playmat{grid-template-columns:34px minmax(0,1fr) 164px 38px;gap:4px;margin:0 4px 4px;padding:4px}.table-battle .legend-zone{--card-w:44px}.table-battle .seat.opponent{padding-right:110px}.opponent-hand>.note{display:none}.table-battle .inspector{padding:12px}.table-battle .inspector .rules-text{font-size:14px}.table-battle .field-cards{gap:7px}}
@media(max-width:900px){.modal-cards{--card-w:clamp(70px,12vw,112px);--card-h:calc(var(--card-w)*1.4);gap:7px;flex-wrap:wrap;min-height:0}.table-battle .board-decision{font-size:11px}.action-key{font-size:8px;gap:7px}.table-battle .hand{height:240px;min-height:240px}.table-battle .hand-zone{--card-w:120px;--card-h:168px}}
@media(prefers-reduced-motion:reduce){.card-stack .game-card.action-ready,.die-token.pickable{animation:none;box-shadow:0 0 0 1px var(--cue,#fff47d)}.opening-buttons{transition:none}}
@media(min-width:901px){
  .table-battle .board{grid-template-rows:28px minmax(0,1fr) 44px 28px minmax(0,1.12fr) clamp(180px,27vh,240px)}
  .table-battle .playmat{--card-w:clamp(65px,10vh,108px)}
  .table-battle .enemy-mat{--card-w:clamp(60px,9vh,96px)}
  .table-battle .field-cards{padding:3px 7px}
  .table-battle .card-stack,.table-battle .card-pose{height:calc(var(--card-h) + var(--gear-count,0)*12px)}
  .table-battle .card-stack.is-spent{width:calc(var(--card-h) + var(--gear-count,0)*12px)}
  .table-battle .under-gear{top:calc(var(--gear-index)*12px)}
  .table-battle .under-gear>span{height:12px;line-height:10px;font-size:6px}
  .table-battle .hand-zone{--card-w:clamp(96px,14vh,140px)}
  .table-battle .hand>.card-stack{top:-4px}
}
