/* Defense cards occupy a viewport layer and never a field/hand grid track.
   Retain the shared pair shell until the next native presentation resets the
   host classes; cancelling its cards must not revive legacy mode animations. */
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  transform: none !important;
  pointer-events: none !important;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-panel {
  position: absolute !important;
  inset: clamp(20px, 10vh, 86px) auto auto 50% !important;
  width: min(88vw, 900px) !important;
  padding: 12px 16px !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: translateX(-50%) !important;
  opacity: 1 !important;
  animation: none !important;
  z-index: 3;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-main {
  font-size: clamp(24px, 4.8vw, 58px) !important;
  line-height: 1.1 !important;
  letter-spacing: .1em !important;
  margin: 7px 0 !important;
  animation: none !important;
  transform: none !important;
  filter: none !important;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-kicker {
  font-size: clamp(10px, 1.2vw, 14px) !important;
  letter-spacing: .22em !important;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-sub {
  font-size: clamp(11px, 1.5vw, 17px) !important;
  letter-spacing: .06em !important;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) :is(.duel-symbol,.duel-flash,.duel-scanlines,.theme-special-fx),
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-panel::before,
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-panel::after {
  display: none !important;
}
#duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-vignette {
  background: radial-gradient(ellipse at 50% 52%,rgba(15,20,17,.48),rgba(4,7,7,.9)) !important;
  opacity: 1 !important;
  animation: none !important;
}
.v305-defense-tableau {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  contain: layout paint;
}
.v305-defense-tableau > .v305-defense-card {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border: 2px solid #dac495;
  border-radius: calc(var(--v305-defense-width) * .065) !important;
  color: #17191b;
  background: linear-gradient(125deg,#fffef8,#f6f1e5 65%,#e5dbc2);
  box-shadow: 0 18px 28px #0008, inset 0 0 0 2px #fffb;
  transform-origin: 50% 50% !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  transition: none !important;
  animation: none !important;
  font-family: Georgia,"Times New Roman",serif;
  font-size: calc(var(--v305-defense-width) * .28) !important;
  text-align: center;
  will-change: transform;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none !important;
}
.v305-defense-tableau > .v305-defense-card.is-red { color: #a72431 !important; }
.v305-defense-card .v305-card-corner {
  position: absolute;
  top: 7%;
  left: 9%;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: inherit;
  font: 700 calc(var(--v305-defense-width) * .2)/.97 Georgia,"Times New Roman",serif;
  text-shadow: 0 1px 2px #fff9;
  z-index: 3;
}
.v305-defense-card .v305-card-corner b,
.v305-defense-card .v305-card-corner i { font: inherit; }
.v305-defense-card .v305-card-corner.is-bottom {
  inset: auto 9% 7% auto;
  transform: rotate(180deg);
}
.v305-defense-card .v305-card-pip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 calc(var(--v305-defense-width) * .56)/1 Georgia,"Times New Roman",serif;
  color: inherit;
  z-index: 1;
}
.v305-defense-card.is-joker .v305-card-corner { font-size: calc(var(--v305-defense-width) * .125); }
.v305-defense-card.is-joker .v305-card-pip { color: #40324c; }
@media (max-height: 480px) {
  #duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-panel { inset-block-start: 10px !important; padding: 4px !important; }
  #duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-main { font-size: clamp(18px, 5vh, 30px) !important; margin: 3px 0 !important; }
  #duel-cinematic:is(.v305-defense-cards,.v306-pair-defense) .duel-sub { font-size: 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .v305-defense-tableau > .v305-defense-card { will-change: auto; }
}
