.arena--duel #card-context .duel-inspector-intro { align-items: center; }
.arena--duel #card-context .duel-inspector-intro strong {
  font: 700 14px/1.2 "Segoe UI", sans-serif;
  color: #f3f3fa;
}
.arena--duel #card-context .context-close { min-height: 30px; font-size: 11px; }
.arena--duel #card-context .placement-hint { color: #cfdef0; }
.arena--duel .duels-destination-choices { display: flex; flex-wrap: wrap; gap: 4px; }
.arena--duel .duels-destination-option.btn {
  flex: 0 1 auto;
  min-height: 32px;
  padding: 3px 7px;
  border-color: #8cdcf193;
  background: #1a3247;
}
.arena--duel .duels-destination-option.btn:hover { background: #2b526a; }
.arena--duel #group-move:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: #6bb5ab;
  background: #173b3d;
  color: #d6fff1;
  font-weight: 750;
}
.arena--duel #group-move:not(:disabled):hover,
.arena--duel #group-move[aria-pressed="true"] { background: #24575a; border-color: #a6f8e5; }
#group-move kbd {
  display: none;
  padding: 1px 3px;
  border: 1px solid #9bdcd965;
  border-radius: 3px;
  color: #c2efe7;
  font: inherit;
  font-size: .86em;
  white-space: nowrap;
}
@media (min-width: 1250px) and (hover: hover) and (pointer: fine) {
  #group-move[aria-pressed="false"] kbd { display: inline; }
}
@media (pointer: coarse) {
  .arena--duel #group-move { min-height: 44px; }
}
.group-move-status {
  display: grid;
  gap: 2px;
  color: #d8e9ed;
  line-height: 1.35;
}
.group-move-status strong { color: #b6fbe7; }
.arena--duel #table .game-card[data-group-eligible="true"] { cursor: pointer; }
.arena--duel #table .game-card[data-group-picked] {
  outline: 2px solid #b0ffe6;
  outline-offset: 1px;
}
.arena--duel #table .game-card[data-group-picked]::after {
  content: "✓";
  position: absolute;
  z-index: 3;
  inset: 3px 3px auto auto;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #e5fff7;
  border-radius: 50%;
  background: #a9ffe0;
  color: #0c2824;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}
.arena--duel #table[data-group-moving] .destination.is-legal {
  outline: 2px solid #9aefd9;
  outline-offset: -2px;
}
.arena--duel #table[data-group-moving] .destination-cue {
  background: #a9f6de;
  border-color: #e2fff6;
  color: #102d28;
}
.arena--duel #table .rune[data-rune-actions] { cursor: pointer; }
.arena--duel #table .rune[data-rune-actions]:is(:hover, :focus-visible) { outline: 2px solid #a4ffe7; outline-offset: 2px; }
.arena--duel #table .rune.is-target {
  outline: 1px solid #83c5df;
  outline-offset: -2px;
  cursor: pointer;
}
.arena--duel #table .rune.is-target:is([data-exhausted="true"], :hover, :focus-visible) {
  outline: 2px solid #b1f0ff;
  outline-offset: -2px;
  opacity: 1;
}
.arena--duel #table .rune[data-rune-picked] {
  outline: 2px solid #ffda90;
  outline-offset: -2px;
  opacity: 1;
}
.rune[data-rune-picked]::after {
  content: "✓" / "";
  position: absolute;
  inset: auto 2px 2px auto;
  padding: 0 3px;
  border-radius: 3px;
  color: #201507;
  background: #ffda90;
  line-height: 1.2;
}
.arena--duel #table #selection-actions:is([data-rune-choice], [data-board-choice]) {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  padding: 2px;
  border: 0;
  text-align: center;
  background: transparent;
  box-shadow: none;
}
.arena--duel #table #selection-actions[data-rune-choice] .setup-hint { flex-basis: 100%; }
.arena--duel #table #selection-actions:is([data-rune-choice], [data-board-choice]) .btn { min-height: 32px; }
.duel-chain-effect { display: block; margin-top: 3px; color: #e0e7f1; font-size: 10px; line-height: 1.25; }
.damage-allocation-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.damage-amount {
  width: 62px;
  min-height: 33px;
  padding: 4px 7px;
  border: 1px solid #83c5df;
  border-radius: 5px;
  color: #eaf7ff;
  background: #101e2c;
}
.arena--duel #table .game-card[data-damage-recipient] { outline: 2px solid #fbc377; outline-offset: 2px; }
.arena--duel #table .combat-damage-cue {
  position: absolute;
  inset: auto 2px 15px;
  justify-self: center;
  max-inline-size: 100%;
  padding: 2px 4px;
  border-radius: 3px;
  color: #291a0e;
  background: #ffdfa0;
  box-shadow: 0 1px 4px #080b12d9;
  font-size: clamp(8px, .78vw, 12px);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
}
.arena--duel #table :is(.combat-damage-list, .duels-target-picker) > summary {
  display: list-item;
  width: fit-content;
  cursor: pointer;
}
.arena--duel #table .combat-damage-options { display: grid; gap: 4px; margin-top: 4px; }
.arena--duel #table .combat-damage-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
.arena--duel #table .destination[data-spell-destination-picked] {
  outline: 2px solid #91d6e8;
  outline-offset: -2px;
}
.rune-choice-progress { color: #b9d8e9; font-size: .78rem; }
@media (max-width: 680px) {
  .arena--duel #table .arena-player:has(button.rune[data-card]) {
    grid-template-areas: "base base" "resources resources";
  }
  .arena--duel #table .arena-opponent:has(button.rune[data-card]) {
    grid-template-areas: "hand hand" "base base" "resources resources";
  }
  .arena--duel #table .resource-row:has(button.rune[data-card]) > .runes {
    flex-wrap: wrap;
    gap: 5px;
  }
  .arena--duel #table .resource-row:has(button.rune[data-card]) .rune { width: clamp(24px, 8vw, 34px); }
}
@media (pointer: coarse) {
  .arena--duel #table #selection-actions[data-rune-choice] .btn { min-height: 40px; }
}
.arena--duel #table .resource-count:has(.floating-resources:not([hidden])) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.floating-resources:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.floating-resources-label { color: #bee9dc; font-size: .82em; }
.floating-resource {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 17px;
  padding: 1px 4px;
  border: 1px solid #71b9a68a;
  border-radius: 4px;
  color: #e5fff6;
  background: #163d37;
  font-size: 10px;
  font-weight: 750;
}
.floating-resource .card-rule-glyph { margin: 0; }
#rune-actions { justify-content: stretch; }
#rune-actions .btn { flex: 1 1 100%; min-height: 42px; white-space: normal; }
@media (max-width: 680px) {
  .arena--duel #table .resource-count:has(.floating-resources:not([hidden])) { grid-column: 1 / -1; padding: 0 1px; }
}
@media (min-width: 681px) and (max-height: 759px), (min-width: 681px) and (max-width: 1049px) {
  .arena--duel #table .resource-count:has(.floating-resources:not([hidden])) { inset: auto 2px 2px auto; translate: none; padding: 1px 3px; }
}
.arena--duel #table #card-context > .duels-target-picker { display: grid; grid-column: 1 / -1; gap: 4px; min-width: 0; }
.arena--duel .duels-target-picker .placement-hint { margin: 0; }
.arena--duel .duels-target-list {
  display: grid;
  gap: 4px;
  max-height: min(26dvh, 177px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.arena--duel .duels-target-picker .duels-target-choice {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: 4px 7px;
  text-align: left;
  white-space: normal;
}
.arena--duel .duels-target-art { width: 22px; height: 31px; object-fit: contain; flex: 0 0 auto; border-radius: 2px; }
.arena--duel .duels-target-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.arena--duel .duels-target-copy strong { font-size: 12px; }
.arena--duel .duels-target-copy small, .arena--duel .cast-repeat { color: #c4d7e7; font-size: 11px; }
.arena--duel .card-might[data-might-change="raised"] { color: #bafbe1; border: 1px solid #499d82; background: #133529; }
.arena--duel .card-might[data-might-change="lowered"] { color: #ffd0c4; border: 1px solid #b15f50; background: #421e21; }
.arena--duel .card-combat-badge {
  position: absolute;
  z-index: 1;
  inset: 3px auto auto 3px;
  display: grid;
  place-items: center;
  width: clamp(17px, 1.5vw, 22px);
  aspect-ratio: 1;
  border: 1px solid #ffd1cb;
  border-radius: 6px;
  color: white;
  background: #ab263c;
  box-shadow: 0 1px 4px #070d15c4;
  pointer-events: none;
}
.arena--duel .game-card:has(.equipment-marker--host) .card-combat-badge { inset-block-start: 19px; }
.arena--duel .card-combat-badge[data-role="defense"] { border-color: #b4e8ff; background: #145f9a; }
.arena--duel .card-combat-badge svg {
  width: 75%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.duels-playback-setting { display: grid; gap: 4px; padding: 3px 6px; color: #dfdce5; font-size: 11px; }
.duels-playback-setting select { width: 100%; color: #f4f1f4; background: #2b2933; border: 1px solid #625c6b; border-radius: 4px; padding: 4px; }
.table-sound-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; }
.table-sound-button span { color: #aeb8c6; font-size: .85em; }
.table-sound-button[aria-pressed="true"] span { color: #a9e5d3; }
.table-sound-level { display: grid; gap: 4px; padding: 4px 6px; color: #dfdce5; font-size: 11px; }
.table-sound-level input { width: 100%; height: 24px; margin: 0; accent-color: #f2ce87; }
#chain-pacing-hint { color: #c3bdca; line-height: 1.3; font-weight: 400; }
@media (min-width: 720px) {
  #deck-setup.duel-setup:not([data-mode="playground"]) .setup-match-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 601px) and (max-width: 719px) {
  #setup-chain-pacing { grid-column: 1 / -1; }
}

@media (min-width: 901px) and (min-height: 740px) {
  html:has(#match-app:not([hidden])) { overflow: clip; }
}

@media (max-width: 680px) {
  .arena--duel #table .duels-destination-option.btn { min-height: 38px; }
}
:is(#trigger-order-dialog, #card-choice-dialog) {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vh, 32px) clamp(10px, 3vw, 40px);
  overflow: auto;
  color: #f6f6fb;
  background: transparent;
  border: 0;
}
:is(#trigger-order-dialog, #card-choice-dialog)[open] {
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  gap: clamp(12px, 2vh, 24px);
  justify-items: center;
}
:is(#trigger-order-dialog, #card-choice-dialog)::backdrop {
  background: #0b0a14aa;
  backdrop-filter: blur(5px);
}
.trigger-order-heading, .trigger-order-controls {
  width: fit-content;
  max-width: 100%;
  padding: 12px 18px;
  border: 1px solid #b3b7d838;
  border-radius: 16px;
  background: #0e111ae8;
}
.trigger-order-heading h2 { margin: 0; font-size: clamp(18px, 2vw, 24px); }
.trigger-order-heading h2:focus { outline: none; }
.trigger-order-heading p { margin: 5px 0 0; color: #c3c6d4; font-size: 14px; }
.trigger-order-stage { align-self: center; width: min(100%, 940px); }
#trigger-order-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 22px);
}
.trigger-order-card {
  position: relative;
  box-sizing: border-box;
  display: grid;
  align-content: end;
  gap: 5px;
  width: clamp(116px, 18vw, 176px);
  padding: 0 0 10px;
  color: inherit;
  background: #10131de8;
  border: 1px solid #b3b7d84d;
  border-radius: 12px;
  box-shadow: 0 12px 30px #0007;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease;
}
.trigger-order-card[data-landscape] { width: clamp(142px, 22vw, 226px); }
.trigger-order-card:not(:disabled):is(:hover, :focus-visible, [aria-expanded="true"]) {
  transform: translateY(-6px);
  border-color: #f4d19a;
  outline: 2px solid #f4d19a70;
}
.trigger-order-card:disabled { cursor: wait; }
.trigger-order-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 5 / 7;
  border-radius: 11px 11px 0 0;
  background: radial-gradient(ellipse at 50% 36%, #34324d, #171d2c);
  padding: 0;
}
.trigger-order-card[data-landscape] .trigger-order-art { aspect-ratio: 7 / 5; }
.trigger-order-image { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 11px 11px 0 0; }
.trigger-order-art .card-fallback { padding: 12px; color: #eee4f7; font-size: 16px; }
.trigger-order-count {
  position: absolute;
  inset: 7px 7px auto auto;
  padding: 2px 7px;
  border: 1px solid #ecc58f9c;
  border-radius: 20px;
  background: #12101ae8;
  color: #ffe0ad;
  font-weight: 700;
}
.trigger-order-name, .trigger-order-summary { padding-inline: 8px; }
.trigger-order-name { font-size: 14px; }
.trigger-order-summary { color: #d2d5e3; font-size: 12px; line-height: 1.35; }
#trigger-order-options:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.trigger-order-controls { display: flex; flex-wrap: wrap; justify-content: center; align-self: end; gap: 8px; }
:is(#trigger-order-error, #card-choice-error) { flex-basis: 100%; margin: 0; color: #ffb5b5; font-size: 13px; }

.card-choice-stage { align-self: center; display: grid; gap: 14px; width: min(100%, 920px); }
#card-choice-options { display: flex; justify-content: center; align-items: start; flex-wrap: wrap; gap: clamp(8px, 2vw, 20px); }
#card-choice-options .trigger-order-card { width: clamp(126px, 18vw, 196px); min-width: 0; }
#card-choice-options .trigger-order-card[data-landscape] { width: clamp(142px, 22vw, 226px); }
#card-choice-options .trigger-order-card[aria-pressed="true"] {
  border-color: #9ae0d5;
  outline: 2px solid #9ae0d5bb;
  background: #19292f;
}
#card-choice-progress { color: #a1e4da; font-weight: 700; }
#card-choice-dialog[data-rune-selection] #card-choice-options .trigger-order-card {
  position: relative;
  width: clamp(96px, 12vw, 146px);
}
#card-choice-dialog[data-rune-selection] .trigger-order-controls {
  position: sticky;
  bottom: 0;
}
#card-choice-dialog[data-rune-selection] .trigger-order-card[aria-pressed="true"]::after {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #0d241e;
  background: #a1e4da;
  content: "✓";
  font-weight: 700;
}
#card-choice-search {
  justify-self: center;
  width: min(100%, 360px);
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #b3b7d84d;
  border-radius: 8px;
  color: inherit;
  background: #111521;
  font: inherit;
}
#card-choice-dialog[data-many-choices] #card-choice-options {
  align-content: start;
  max-height: min(55dvh, 560px);
  padding: 8px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#card-choice-dialog[data-many-choices] #card-choice-options .trigger-order-card {
  width: clamp(98px, 12vw, 142px);
}
#card-choice-empty { margin: 0; text-align: center; }
#card-choice-details {
  justify-self: center;
  width: min(100%, 640px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #b3b7d84d;
  border-radius: 12px;
  background: #0e111af5;
}
#card-choice-details h3, #card-choice-details p { margin: 0; }
#card-choice-type { color: #cad4e0; font-size: 13px; }
#card-choice-rules { grid-column: 1 / -1; white-space: pre-wrap; line-height: 1.45; overflow-wrap: anywhere; }
#card-choice-dialog :is(.btn, input):focus-visible { outline: 2px solid #9ae0d5; outline-offset: 2px; }
.card-choice-other { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@media (min-width: 350px) and (max-width: 600px) {
  #card-choice-options .trigger-order-card:not([data-landscape]) { width: clamp(94px, 28vw, 126px); }
}
@media (prefers-reduced-motion: reduce) {
  .trigger-order-card { transition: none; }
}

.arena--duel #table .placement-description {
  display: block;
  font-size: .85em;
  font-weight: 500;
  line-height: 1.2;
}

.arena--duel #table .rune[data-payment-preview] {
  outline: 2px solid #89def7;
  outline-offset: 2px;
}

.arena--duel #table .rune:is([data-payment-preview="recycle"], [data-payment-preview="both"]) {
  outline-color: #ffce7d;
}

.arena--duel #table .rune-payment-cue {
  position: absolute;
  z-index: 2;
  inset: auto auto 2px 50%;
  translate: -50% 0;
  padding: 1px 3px;
  border-radius: 3px;
  background: #121a29f4;
  color: #f9eacf;
  font-size: 8px;
  white-space: nowrap;
  pointer-events: none;
}
