/* SHARDWAKE v0.1.9 — landscape-first combat clarity. */
.duel.targeting .enemy-lane .board-unit:not(.valid-target):not(.chosen-target),
.duel.targeting .enemy-head .hero-box:not(.valid-target){opacity:.34;filter:saturate(.45) brightness(.72);transition:opacity .16s ease,filter .16s ease}
.duel.targeting .enemy-lane .valid-target,
.duel.targeting .enemy-head .valid-target{position:relative;z-index:7;animation:swTargetPulse 1.05s ease-in-out infinite alternate}
.duel.targeting .enemy-lane .valid-target .tcg-card{box-shadow:0 0 0 2px #82e1df,0 0 22px #48cbd566,0 8px 18px #000b}
.duel.targeting .enemy-head .hero-box.valid-target{box-shadow:0 0 0 2px #82e1df,0 0 22px #48cbd566;background:#4ec9d51c}
.duel.targeting .player-lane .board-unit.queued .tcg-card{box-shadow:0 0 0 2px #f4d293,0 0 24px #e8b96c66,0 8px 18px #000c;transform:translateY(-3px)}
.duel .chosen-target .tcg-card{box-shadow:0 0 0 2px #ffd08a,0 0 26px #ffba5b7a,0 9px 20px #000d!important}
.duel .chosen-target .unit-state{font-weight:900;letter-spacing:.08em}
@keyframes swTargetPulse{from{filter:brightness(1)}to{filter:brightness(1.18)}}

@media (orientation:landscape) and (max-height:540px){
  :root{--rail:168px}
  .in-duel .main{overflow:hidden}
  .duel{grid-template-columns:minmax(0,1fr) var(--rail);grid-template-rows:27px minmax(0,1fr) 98px;gap:3px}
  .duel .duel-phase{min-height:27px;height:27px;padding:0 3px;gap:6px}
  .duel .duel-location{max-width:31vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .duel .arena{padding-left:64px;padding-right:5px;grid-template-rows:minmax(0,1fr) 34px minmax(0,1fr)}
  .duel .arena-head{left:3px;width:56px;height:calc((100% - 34px)/2)}
  .duel .hero-crest{width:27px;height:27px}
  .duel .health{font-size:19px}
  .duel .energy,.duel .energy strong{font-size:9px}
  .duel .hero-deck{font-size:6px}
  .duel .arena-lane{grid-template-columns:repeat(5,minmax(0,96px));gap:clamp(5px,1.25vw,12px);padding:5px 0 12px;align-items:center}
  .duel .board-unit{width:100%;max-width:96px;min-width:0}
  .duel .board-unit .tcg-card{width:100%;max-width:none}
  .duel .board-unit .unit-state{font-size:7px;bottom:-11px;max-width:125%}
  .duel .unit-information{width:20px;height:20px;min-width:20px;top:-4px;right:-5px}
  .duel .arena-mid{height:34px;gap:1px}
  .duel .rift-status{min-height:21px;padding:2px 8px;font-size:8px}
  .duel .rift-status b{font-size:16px}.duel .rift-status small{font-size:5.5px}
  .duel .arena-hint{font-size:7px;max-width:min(66vw,520px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .duel .arena-hand{min-height:0;max-height:none;height:98px;padding-top:0}
  .duel .hand-caption{height:18px;flex-basis:18px;padding:0 7px}
  .duel .hand-caption>span:nth-child(2){display:none}
  .duel .hand-view-button{height:18px;min-height:18px}
  .duel .hand-scroll{padding:4px 8px 4px;gap:6px;align-items:flex-end}
  .duel .arena-hand .tcg-card{height:74px;width:auto;flex-basis:auto;aspect-ratio:2/3}
  .duel .arena-hand .tcg-card.selected{transform:translateY(-3px) scale(1.025)}
  .duel .duel-rail{gap:3px}
  .duel .selected-preview{padding:5px;gap:3px;overflow:hidden}
  .duel .preview-art{max-height:29%;min-height:34px}
  .duel .preview-copy h3{font-size:13px;margin:1px 0 3px}
  .duel .preview-copy p{font-size:9px;line-height:1.22;margin:2px 0}
  .duel .preview-keyword{font-size:8px!important}
  .duel .empty-preview{padding:7px}.duel .empty-sigil{font-size:28px}.duel .empty-preview h3{font-size:15px;margin:1px 0}.duel .empty-preview p{font-size:9px;line-height:1.25;margin:3px 0}.duel .rail-affinity{font-size:9px;margin-top:2px}
  .duel .combat-dock{padding:4px;gap:3px}.duel .dock-meta{font-size:6.5px}.duel .dock-meta strong{font-size:11px}.duel .dock-actions{gap:3px}.duel .dock-actions .btn{min-height:30px;font-size:8px;padding:5px}.duel .dock-actions .btn-ghost{min-height:24px;font-size:7px}
}

@media (orientation:landscape) and (min-width:800px) and (max-width:960px) and (max-height:450px){
  .duel .arena-lane{grid-template-columns:repeat(5,minmax(68px,92px));gap:8px}
  .duel .arena-hand .tcg-card{height:76px}
  .duel .selected-preview{border-radius:6px}.duel .combat-dock{border-radius:6px}
}

@media (orientation:landscape) and (max-height:380px){
  :root{--rail:158px}
  .duel{grid-template-rows:25px minmax(0,1fr) 88px}
  .duel .arena{padding-left:58px;grid-template-rows:minmax(0,1fr) 30px minmax(0,1fr)}
  .duel .arena-head{width:51px;height:calc((100% - 30px)/2)}
  .duel .hero-crest{width:24px;height:24px}.duel .health{font-size:17px}
  .duel .arena-mid{height:30px}.duel .rift-status{min-height:19px}
  .duel .arena-lane{padding-top:3px;padding-bottom:10px;gap:6px}
  .duel .arena-hand{height:88px}.duel .arena-hand .tcg-card{height:66px}
  .duel .empty-preview p{display:none}.duel .preview-copy p:not(.preview-keyword){max-height:2.45em;overflow:hidden}
}

@media (prefers-reduced-motion:reduce){.duel.targeting .valid-target{animation:none!important}}
