.arena--duel .deck-stack[aria-haspopup]:disabled { cursor: default; opacity: 1; }
.arena--duel .deck-stack[data-deck-look] {
  border-color: #98efd9;
  outline: 2px solid #98efd9;
  outline-offset: 1px;
  box-shadow: 0 0 13px #6af4d66b;
}
.arena--duel .deck-stack[aria-haspopup]:focus-visible { outline: 2px solid #aff7e6; outline-offset: 2px; }
.arena--duel #table .field-showdown .deck-look-open,
.arena--duel #table .selection-actions .deck-look-open {
  border-color: #7bdac7;
  background: #224941;
  color: #ddfff7;
}

:is(#deck-look-dialog, #rune-actions-dialog) {
  width: min(760px, calc(100% - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: clamp(12px, 3vw, 24px);
  overflow: auto;
  border: 1px solid #54697c;
  border-radius: 14px;
  background: #131b26;
  color: #edf3f9;
  box-shadow: 0 20px 60px #060912a6;
}
:is(#deck-look-dialog, #rune-actions-dialog)::backdrop { background: #080b16b5; }
#rune-actions-dialog { width: min(420px, calc(100% - 20px)); }
.deck-look-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.deck-look-header h2 { margin: 0; font: 700 clamp(20px, 4vw, 30px)/1.15 Georgia, serif; color: #f8e0ac; }
.deck-look-header h2:focus { outline: none; }
.deck-look-header .btn { min-width: 38px; min-height: 38px; padding: 0; font-size: 21px; }
.deck-look-source { margin: 0 0 3px; color: #9de8d6; font-weight: 700; font-size: .82rem; }
:is(#deck-look-summary, #rune-actions-hint) { margin: 8px 0 14px; color: #d0deeb; font-size: .9rem; line-height: 1.4; }
.deck-look-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(135px, 43%), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deck-look-card { display: flex; flex-direction: column; min-width: 0; gap: 6px; padding: 7px; border: 1px solid #516071; border-radius: 8px; background: #1b2633; }
.deck-look-card[data-recycle] { border-color: #d9a678; background: #322921; }
.deck-look-position { color: #a7f2de; font-size: .76rem; font-weight: 700; text-align: center; }
.deck-look-card[data-recycle] .deck-look-position { color: #ffce9a; }
.deck-look-preview {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  width: 100%;
  padding: 0 2px 4px;
  color: #f2f5fa;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: zoom-in;
}
.deck-look-preview:hover, #deck-look-dialog button:focus-visible { outline: 2px solid #a8eee0; outline-offset: 1px; }
.deck-look-face {
  display: grid;
  width: min(100%, 172px);
  aspect-ratio: 2.5 / 3.5;
  border: 1px solid #57748b;
  border-radius: 6px;
  overflow: hidden;
  background: #132334;
}
.deck-look-face > * { grid-area: 1 / 1; }
.deck-look-art-placeholder, .deck-look-face .card-fallback {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #c4d6e6;
  overflow-wrap: anywhere;
}
.deck-look-face .card-fallback { background: #132334; }
.deck-look-art {
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  visibility: hidden;
}
.deck-look-face[data-loaded] .deck-look-art { visibility: visible; }
.deck-look-face[data-loaded] .deck-look-art-placeholder { visibility: hidden; }
.deck-look-name { font-size: .87rem; line-height: 1.25; overflow-wrap: anywhere; }
.deck-look-card-controls { display: grid; gap: 4px; margin-top: auto; }
.deck-look-card-controls > .btn, .deck-look-card > .btn { min-height: 38px; padding-inline: 6px; white-space: normal; }
.deck-look-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.deck-look-actions:empty, .deck-look-cards:empty { display: none; }
.deck-look-confirm { min-height: 42px; background: #f0cd83; border-color: #f0dba9; color: #241b12; white-space: normal; }
.deck-look-confirm:not(:disabled):hover { background: #fae0aa; }
:is(#deck-look-error, #rune-actions-error) { margin: 9px 0 0; color: #ffb6a7; text-align: center; }
