#land-fighting-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg-deep, #050a08) 92%, black);
  backdrop-filter: blur(8px);
  padding: 12px;
}

#land-fighting-root.is-open {
  display: flex;
  z-index: 13000;
}

body.lf-open #land-fighting-root.is-open {
  z-index: 13000;
}

body.lf-open {
  overflow: hidden;
}

.lf-panel {
  width: min(980px, 100%);
  max-height: 96vh;
  overflow: auto;
  border: 1px solid var(--border, rgba(74, 222, 128, 0.28));
  border-radius: var(--radius, 14px);
  background: color-mix(in srgb, var(--bg-glass, rgba(8, 28, 18, 0.92)) 88%, black);
  box-shadow: 0 0 40px var(--green-glow, rgba(34, 197, 94, 0.15));
}

.lf-panel.lf-panel--fighters {
  width: min(1220px, 100%);
  max-height: 96vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lf-panel.lf-panel--fighters .lf-body {
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.lf-panel.lf-panel--fighters .lf-screen[data-screen="fighters"],
.lf-panel.lf-panel--fighters .lf-screen[data-screen="intro"] {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 100%;
  padding-bottom: 4px;
}

.lf-actions--intro {
  justify-content: center;
  margin-top: 14px;
}

.lf-intro-lead {
  margin: 0 0 12px;
  text-align: center;
  color: var(--text, #e2f5ea);
  font-size: 15px;
}

.lf-intro-lands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}

.lf-intro-land {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: #0b1020;
}

.lf-intro-land img {
  display: block;
  width: 100%;
  height: min(32vh, 280px);
  object-fit: cover;
  object-position: center;
  background: #0b1020;
}

.lf-intro-land figcaption {
  padding: 8px 10px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #f3e8ff;
}

@media (max-width: 720px) {
  .lf-intro-lands {
    grid-template-columns: 1fr;
  }
}
.lf-fighter-grid .lf-face-dragons {
  display: none;
}

.lf-panel.lf-panel--fighters .lf-fighter-grid {
  margin-bottom: 6px;
}

.lf-panel.lf-panel--fighters .lf-vs-mid .lf-vs-logo,
.lf-panel.lf-panel--fighters .lf-vs-mid .lf-vs-logo--card {
  max-height: 120px;
}

.lf-header {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 2.2fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border, rgba(74, 222, 128, 0.22));
  flex: 0 0 auto;
}

.lf-header-mid {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lf-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  min-width: 0;
}

.lf-fights {
  font-size: 13px;
  color: var(--text-dim, #a7f3c8);
}

.lf-fights strong {
  color: var(--green-400, #4ade80);
  font-size: 18px;
}

.lf-phase-clock {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fbbf24;
}

.lf-header-msg,
.lf-message.lf-header-msg {
  margin: 0;
  padding: 0 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-dim, #a7f3c8);
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.lf-header-msg:empty,
.lf-message.lf-header-msg:empty {
  display: none;
}

.lf-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  z-index: 5;
}
#lf-header-start {
  white-space: nowrap;
  padding: 10px 18px;
  position: relative;
  z-index: 80;
  pointer-events: auto;
}
.lf-close {
  border: 1px solid var(--border, rgba(74, 222, 128, 0.28));
  background: var(--box-fill, rgba(6, 18, 12, 0.38));
  color: var(--text, #e2f5ea);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  justify-self: end;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lf-close:hover {
  color: var(--green-400, #4ade80);
  box-shadow: 0 0 10px var(--green-glow, rgba(74, 222, 128, 0.35));
}

.lf-body {
  padding: 16px;
}

.lf-screen {
  display: none;
}

.lf-screen.is-active {
  display: block;
}

.lf-message {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.lf-message--error {
  color: #fca5a5;
  font-weight: 700;
}

.lf-message--warn {
  color: #fde047;
}

.lf-message--ok {
  color: #86efac;
}

.lf-land-stage {
  min-height: 0;
  height: auto;
  aspect-ratio: 800 / 450;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #051a10;
  position: relative;
}

.lf-land-stack {
  position: absolute;
  inset: 0;
}

.lf-land-terrain-layer,
.lf-land-building-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

.lf-land-terrain-layer {
  background-size: cover;
  background-position: center center;
}

.lf-land-building-layer {
  background-size: contain;
  background-position: center bottom;
  z-index: 1;
}

.lf-land-stack img,
.lf-land-stage .lf-land-img,
.lf-land-terrain-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.08s ease-out, opacity 0.08s ease-out;
}

.lf-land-building-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.lf-land-stage--spin img,
.lf-land-stage--spin .lf-land-img,
.lf-land-stage--spin .lf-land-stack {
  transform: scale(0.98);
  opacity: 0.92;
}

.lf-land-fallback {
  padding: 40px;
  font-size: 20px;
  color: var(--green-400);
}

.lf-land-actions {
  margin-top: 12px;
}

.lf-land-bonus-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.lf-land-bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.lf-land-bonus-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  color: inherit;
  background: rgba(5, 26, 16, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.lf-land-bonus-card:hover,
.lf-land-bonus-card:focus-visible {
  border-color: #fde047;
  box-shadow: 0 0 14px rgba(253, 224, 71, 0.35);
  transform: translateY(-1px);
}

.lf-land-bonus-card.is-selected {
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(253, 224, 71, 0.55);
}

.lf-land-bonus-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.lf-land-bonus-cost {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #fde047;
}

.lf-land-bonus-effect {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: #86efac;
}

.lf-land-bonus-empty {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.lf-land-bonus-art {
  height: 108px;
  width: 100%;
  margin: 0 auto 8px;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 20, 14, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.14);
  border-radius: 10px;
  overflow: hidden;
}

.lf-land-bonus-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 92px;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
  transform: none;
  background: transparent;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.lf-fight-splash[hidden] {
  display: none !important;
}

.lf-fight-splash {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.lf-fight-splash.is-active {
  animation: lf-splash-fade 0.45s ease 1.45s forwards;
}

.lf-fight-splash-text {
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(52px, 14vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #ef4444;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(239, 68, 68, 0.85),
    0 3px 0 #991b1b,
    0 6px 0 #7f1d1d,
    0 10px 22px rgba(0, 0, 0, 0.75);
  animation: lf-fight-pop 0.28s cubic-bezier(0.2, 1.1, 0.3, 1);
}

.lf-fight-splash-text--finish {
  font-size: clamp(36px, 10vw, 72px);
  color: #dc2626;
}

@keyframes lf-fight-pop {
  0% {
    transform: scale(0.35);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes lf-splash-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.lf-hud-name {
  font-size: 11px;
  font-weight: 700;
  color: #ecfccb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lf-hud-name--cpu {
  text-align: right;
}

.lf-battle-controls-top {
  margin: 0 0 8px;
  padding: 6px 12px;
  text-align: center;
  font-size: 11px;
  color: #d9f99d;
  background: rgba(5, 26, 16, 0.72);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  line-height: 1.4;
}

.lf-fighter-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

/* Compact entry: free hero | Visions of Verico | Dragonbot */
.lf-fighter-grid.lf-fighter-vs {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.15fr) minmax(120px, 1fr);
  grid-template-areas:
    "hero mid bot"
    "faces faces faces";
  gap: 8px 16px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto 6px;
  padding: 8px 6px 2px;
  overflow: visible;
}
.lf-vs-toast {
  position: absolute;
  z-index: 6;
  top: 42%;
  max-width: 148px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.lf-vs-toast.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.lf-vs-toast--left {
  left: 4%;
  right: auto;
  color: #052e16;
  background: linear-gradient(160deg, #bbf7d0, #4ade80);
  border: 1px solid rgba(22, 101, 52, 0.45);
}
.lf-vs-toast--right {
  right: 4%;
  left: auto;
  color: #fef9c3;
  background: linear-gradient(160deg, #14532d, #052e16);
  border: 1px solid rgba(250, 204, 21, 0.45);
}
@media (max-width: 720px) {
  .lf-vs-toast {
    max-width: 42%;
    font-size: 10px;
    top: 8px;
  }
  .lf-vs-toast--left { left: 2%; }
  .lf-vs-toast--right { right: 2%; }
}
.lf-vs-slot--hero { grid-area: hero; }
.lf-vs-slot--bot { grid-area: bot; }
.lf-face-dragons {
  grid-area: faces;
  min-width: 0;
  overflow: hidden;
}
.lf-face-dragons__head {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #86efac;
  margin: 0 0 4px;
}
.lf-face-dragons__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
}
.lf-raid-worker-card.is-greyed {
  border-color: rgba(100, 116, 139, 0.4);
  box-shadow: none;
  opacity: 0.9;
}
.lf-raid-worker-card.is-greyed img {
  filter: grayscale(1) brightness(0.52);
}
.lf-raid-worker-card.is-varicor {
  border-color: rgba(74, 222, 128, 0.7);
}
.lf-face-dragons .lf-raid-worker-card__art {
  max-width: 48px;
  max-height: 58px;
}
.lf-vs-mid {
  grid-area: mid;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lf-vs-slot--bot { grid-area: bot; }
.lf-vs-mid .lf-vs-logo {
  width: min(100%, 280px);
  max-height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px var(--green-glow, rgba(74, 222, 128, 0.25)));
}
.lf-vs-mid .lf-vs-logo--card {
  width: auto;
  max-width: min(100%, 150px);
  max-height: 210px;
  object-fit: contain;
  border-radius: 8px;
}
.lf-vs-or {
  display: none !important;
}
.lf-vs-magic-inline {
  width: 100%;
  margin-top: 2px;
  padding: 8px 4px 0;
  border-top: 1px solid rgba(74, 222, 128, 0.18);
}
.lf-magic-spells--inline.lf-magic-row-grid {
  gap: 6px;
  margin-top: 0;
}
.lf-magic-spells--inline .lf-magic-row-label {
  margin: 0 0 2px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.lf-magic-spells-row--inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
}
.lf-fighter-vs .lf-magic-btn--entry {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(74, 222, 128, 0.35));
  background: var(--box-fill-strong, rgba(3, 18, 12, 0.85));
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.lf-fighter-vs .lf-magic-btn--entry:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lf-fighter-vs .lf-magic-btn--entry:not(:disabled):hover {
  border-color: #86efac;
  transform: scale(1.06);
}
.lf-fighter-vs .lf-magic-btn--entry.is-selected {
  border-color: var(--green-400, #4ade80);
  box-shadow: 0 0 0 1px var(--border), 0 0 14px var(--green-glow);
}
.lf-fighter-vs .lf-magic-btn--entry .lf-magic-icon,
.lf-fighter-vs .lf-magic-btn--entry img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  border-radius: 50%;
}
.lf-vs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  padding: 12px 10px 14px;
  border: 1px solid var(--border, rgba(74, 222, 128, 0.28));
  border-radius: 14px;
  background: var(--box-fill, rgba(4, 20, 12, 0.72));
  color: var(--text, #ecfdf5);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.lf-vs-slot--hero .lf-vs-card {
  background: color-mix(in srgb, var(--box-fill, rgba(4, 20, 12, 0.55)) 55%, transparent);
  box-shadow: none;
}
.lf-vs-card:hover:not(.is-locked),
.lf-vs-card:focus-visible:not(.is-locked) {
  border-color: var(--green-400, #86efac);
  outline: none;
}
.lf-vs-slot--hero .lf-vs-card:hover:not(.is-locked),
.lf-vs-slot--hero .lf-vs-card:focus-visible:not(.is-locked),
.lf-vs-slot--hero .lf-vs-card.is-selected {
  box-shadow: none;
  transform: none;
  border-color: var(--border);
}
.lf-vs-slot--bot .lf-vs-card:hover:not(.is-locked),
.lf-vs-slot--bot .lf-vs-card:focus-visible:not(.is-locked) {
  box-shadow: 0 0 22px var(--green-glow);
  transform: translateY(-2px);
}
.lf-vs-card.is-selected {
  border-color: var(--green-400, #4ade80);
}
.lf-vs-slot--bot .lf-vs-card.is-selected {
  box-shadow: 0 0 0 2px var(--border), 0 0 28px var(--green-glow);
}
.lf-vs-card.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.lf-vs-card img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(2, 12, 9, 0.5);
}
.lf-vs-card--logo img {
  max-height: 200px;
  object-fit: contain;
  background: #000;
  border-radius: 50%;
}
.lf-vs-side {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #86efac;
}
.lf-vs-name {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.lf-vs-fee {
  font-size: 12px;
  color: #fde68a;
}
.lf-vs-hover-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(2, 10, 8, 0.96);
  border: 1px solid rgba(134, 239, 172, 0.45);
  color: #ecfdf5;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.lf-vs-card:hover .lf-vs-hover-tip,
.lf-vs-card:focus-visible .lf-vs-hover-tip {
  display: block;
}
.lf-vs-fee--free {
  color: #86efac;
}
.lf-vs-lock {
  font-size: 11px;
  color: #fca5a5;
  text-align: center;
}
.lf-vs-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #a7f3c8;
}
@media (max-width: 720px) {
  .lf-fighter-grid.lf-fighter-vs {
    grid-template-columns: 1fr;
    grid-template-areas:
      "mid"
      "hero"
      "bot"
      "faces";
  }
  .lf-vs-mid .lf-vs-logo,
  .lf-vs-mid .lf-vs-logo--card { max-height: 160px; }
}


.lf-fighter-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lf-fighter-slot.is-selected .lf-fighter-card {
  border-color: #86efac;
  box-shadow: 0 0 20px rgba(134, 239, 172, 0.7), 0 0 40px rgba(74, 222, 128, 0.35);
}

.lf-fighters-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
}

.lf-magic-row {
  display: none;
}

.lf-hero-magic-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px dashed rgba(74, 222, 128, 0.22);
  border-radius: 8px;
  background: rgba(5, 26, 16, 0.45);
}

.lf-hero-magic-slot img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lf-hero-magic-empty {
  color: rgba(134, 239, 172, 0.35);
  font-size: 14px;
}

.lf-magic-picker {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 12px;
  background: rgba(5, 26, 16, 0.55);
}

.lf-magic-picker-label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  color: #d9f99d;
  line-height: 1.4;
}

.lf-magic-picker-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.lf-magic-btn {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 6px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 10px;
  background: rgba(5, 26, 16, 0.82);
  cursor: pointer;
}

.lf-magic-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lf-magic-picker.is-active .lf-magic-btn:disabled,
.lf-magic-row-grid.is-active .lf-magic-btn:disabled {
  opacity: 1;
  cursor: pointer;
}

.lf-magic-row-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 222, 128, 0.18);
}

.lf-magic-row-label {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  text-align: center;
  font-size: 11px;
  color: #d9f99d;
  line-height: 1.4;
}

.lf-magic-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.lf-magic-row-grid .lf-magic-btn {
  width: 100%;
  max-width: 68px;
  height: 68px;
  margin: 0 auto;
}

.lf-magic-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lf-magic-btn.is-selected {
  border-color: #fde047;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.45);
}

.lf-magic-cost {
  position: absolute;
  right: -3px;
  bottom: -5px;
  min-width: 14px;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  color: #052e16;
  background: #fde047;
  border-radius: 999px;
}

.lf-fighter-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 40;
  padding: 10px 8px 12px;
  background: linear-gradient(180deg, transparent, rgba(4, 14, 10, 0.92) 28%, rgba(4, 14, 10, 0.98));
  pointer-events: auto;
}
.lf-fighter-actions[hidden] {
  display: none !important;
}
#lf-fighter-continue {
  pointer-events: auto;
  position: relative;
  z-index: 41;
}

#lf-fighter-continue.is-pay-fail {
  box-shadow: 0 0 0 2px #f87171, 0 0 18px rgba(248, 113, 113, 0.45);
}

.lf-hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.lf-magic-meter {
  display: none !important;
}

.lf-combo-counter {
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fde047;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 999px;
}

.lf-battle-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lf-gamepad-status {
  margin: 8px auto 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #cbd5e1;
}

.lf-gamepad-status[data-state='on'] {
  color: #86efac;
}

.lf-gamepad-status[data-state='wait'] {
  color: #fde047;
}

.lf-fighter-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  color: inherit;
  background: rgba(5, 26, 16, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.lf-fighter-card:hover:not(.is-locked),
.lf-fighter-card:focus-visible:not(.is-locked) {
  border-color: #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.45), 0 0 32px rgba(74, 222, 128, 0.2);
  transform: translateY(-2px);
}

.lf-fighter-card.is-selected {
  border-color: #86efac;
  box-shadow: 0 0 20px rgba(134, 239, 172, 0.7), 0 0 40px rgba(74, 222, 128, 0.35);
}

.lf-fighter-card.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.85);
}

.lf-fighter-lock {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #fca5a5;
}

.lf-fighter-sps {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: #fde047;
}

.lf-fighter-card.is-dragonbot {
  border-color: rgba(74, 222, 128, 0.45);
}

.lf-fighter-card.is-dragonbot:hover {
  border-color: #86efac;
  box-shadow: 0 0 22px rgba(134, 239, 172, 0.65), 0 0 44px rgba(74, 222, 128, 0.3);
}

.lf-fighter-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
}

.lf-fighter-name {
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.lf-fighter-el {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.lf-fighter-meta {
  display: block;
  font-size: 9px;
  color: #86efac;
  margin-top: 4px;
  line-height: 1.3;
}

.lf-land-layout,
.lf-battle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
}

.lf-layer-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.lf-layer-preview h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.lf-preview-note {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.lf-preview-card {
  margin-bottom: 10px;
}

.lf-preview-card:last-child {
  margin-bottom: 0;
}

.lf-preview-title {
  display: block;
  font-size: 11px;
  color: #86efac;
  margin-bottom: 6px;
}

.lf-preview-img {
  width: 100%;
  aspect-ratio: 800 / 450;
  height: auto;
  min-height: 96px;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a1628;
  display: block;
}

.lf-preview-img--building {
  object-fit: contain;
  object-position: center bottom;
  background: linear-gradient(180deg, #1a2430 0%, #0a1628 100%);
}

.lf-preview-img.is-empty {
  opacity: 0.35;
}

.lf-preview-card small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.35;
}

.lf-battle-wrap {
  position: relative;
  min-width: 0;
}

.lf-battle-stage {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 800 / 450;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a1628;
}
.lf-screen[data-screen="battle"].is-preparing .lf-board-rail,
.lf-screen[data-screen="battle"].is-preparing .lf-card-battle-ui,
.lf-screen[data-screen="battle"].is-preparing #lf-canvas {
  visibility: hidden;
}
.lf-battle-stage.is-preparing::before {
  content: "Loading fight…";
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--green-400, #86efac);
  text-shadow: 0 0 18px var(--green-glow, rgba(74, 222, 128, 0.7));
  background: color-mix(in srgb, var(--bg-deep, #050a08) 78%, transparent);
}

.lf-battle-terrain {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: transparent;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.lf-battle-terrain.is-missing {
  display: none;
}

.lf-battle-terrain-img,
.lf-battle-building-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.lf-battle-terrain-img {
  object-fit: cover;
  object-position: center center;
}

.lf-battle-building-img {
  object-fit: contain;
  object-position: center bottom;
  z-index: 1;
}

.lf-battle-building {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: transparent;
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  pointer-events: none;
}

.lf-battle-building.is-hidden {
  display: none;
}

.lf-battle-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.12) 55%, rgba(5, 46, 22, 0.28) 100%);
  pointer-events: none;
}

@keyframes lf-bg-drift {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.08) translate3d(-1%, 0.3%, 0);
  }
}

@keyframes lf-building-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-0.6%, 0, 0);
  }
}

#lf-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent !important;
  pointer-events: auto;
}

.lf-hud {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: start;
  pointer-events: none;
}

.lf-timer {
  align-self: center;
  padding-top: 2px;
  font-weight: 700;
  font-size: 18px;
  color: #fde047;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  min-width: 2.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.lf-timer.is-low {
  color: #fca5a5;
}
.lf-timer.is-ready {
  color: #86efac;
  min-width: 3.4em;
}
.lf-timer.is-ready::before {
  content: 'Ready ';
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bbf7d0;
}
.lf-timer.is-wait {
  color: rgba(236, 253, 245, 0.4);
  letter-spacing: 0.18em;
}

.lf-battle-land-label {
  margin: 0;
  padding: 4px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.78);
  border: 1px solid rgba(74, 222, 128, 0.42);
  border-radius: 8px;
  max-width: min(560px, 92vw);
  white-space: normal;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.lf-battle-land-label:empty {
  display: none;
}

.lf-hud-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.lf-hud-side--cpu {
  align-items: flex-end;
}

.lf-hud-side--cpu .lf-hp {
  align-self: stretch;
  width: 100%;
}

.lf-hp {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.lf-hp span {
  display: block;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  background: linear-gradient(90deg, var(--green-700, #15803d), var(--green-400, #4ade80));
  width: 0%;
  transition: width 0.12s linear;
}

.lf-hp--cpu span {
  margin-left: auto;
  background: linear-gradient(90deg, #b91c1c, #f87171);
}

.lf-controls-help {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.lf-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.lf-actions .btn {
  cursor: pointer;
}

.dragon-slot.unlocked.can-fight::after,
.play-card.unlocked-card.can-fight::after {
  content: '⚔';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .lf-land-layout,
  .lf-battle-layout {
    grid-template-columns: 1fr;
  }

  .lf-layer-preview {
    order: -1;
  }
}

.dragon-slot,
.play-card {
  position: relative;
}

/* —— Stack card combat fan / battle UI —— */
.lf-battle-wrap--cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-card-battle-ui {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-ability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  justify-content: center;
}

.lf-ability-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(5, 26, 16, 0.75);
  color: #d9f99d;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.lf-ability-chip--dragon {
  border-color: rgba(192, 132, 252, 0.55);
  color: #e9d5ff;
  background: rgba(46, 16, 64, 0.7);
}

.lf-battle-log {
  max-height: 72px;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.18);
  background: rgba(2, 12, 9, 0.55);
  font-size: 11px;
  color: rgba(236, 253, 245, 0.82);
  line-height: 1.4;
}

.lf-battle-log__line + .lf-battle-log__line {
  margin-top: 2px;
  opacity: 0.85;
}

.lf-hand-fan {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 168px;
  padding: 18px 12px 8px;
  perspective: 900px;
  overflow: visible;
}

.lf-hand-fan--two-rows {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 272px;
  padding: 8px 6px 10px;
}

.lf-hand-fan__row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

.lf-hand-fan--two-rows .lf-hand-card {
  width: 88px;
  height: 124px;
  transform-origin: 50% 100%;
}

.lf-hand-fan__row .lf-hand-card {
  margin-left: var(--hand-overlap, -12px);
}

.lf-hand-fan__row .lf-hand-card:first-child {
  margin-left: 0;
}

.lf-hand-empty {
  margin: 0;
  padding: 16px;
  color: rgba(217, 249, 157, 0.7);
  font-size: 12px;
}

.lf-hand-card {
  --fan-rot: 0deg;
  --fan-y: 0px;
  position: relative;
  width: 104px;
  height: 148px;
  margin: 0 -22px;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateY(var(--fan-y)) rotate(var(--fan-rot));
  transform-origin: 50% 120%;
  transition: transform 0.18s ease, filter 0.18s ease;
  cursor: default;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
}

.lf-hand-card.is-playable {
  cursor: pointer;
}

.lf-hand-card:hover,
.lf-hand-card:focus-visible,
.lf-hand-card.is-playable:hover,
.lf-hand-card.is-playable:focus-visible {
  margin-bottom: 0 !important;
  /* Keep seat transform stable — face layer does the lift. */
  z-index: 40 !important;
  outline: none;
}

.lf-hand-card:disabled {
  cursor: default;
}

.lf-hand-card.is-wait-turn,
.lf-hand-fan.is-wait-turn .lf-hand-card {
  filter: brightness(0.58) saturate(0.82) drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
}

.lf-field-faces.is-wait-turn .lf-field-face,
.lf-battle-stage.is-wait-turn .lf-field-face {
  filter: brightness(0.62) saturate(0.85);
}

.lf-hand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(236, 253, 245, 0.35);
  background: #0b1b14;
  display: block;
}

.lf-hand-card--dragon img {
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35);
}

.lf-hand-card__name {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 22px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(2, 12, 9, 0.72);
  color: #ecfdf5;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-hand-card__atk,
.lf-hand-card__hp {
  position: absolute;
  bottom: 4px;
  min-width: 24px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #0b1220;
  text-align: center;
}

.lf-hand-card__atk {
  left: 4px;
  background: #fbbf24;
}

.lf-hand-card__hp {
  right: 4px;
  background: #4ade80;
}

.lf-hand-card__tag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(88, 28, 135, 0.88);
  color: #f3e8ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lf-field-faces {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}

.lf-field-face {
  position: absolute;
  width: 118px;
  height: 168px;
  margin: 0;
  transform-origin: center center;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45));
}

.lf-field-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(236, 253, 245, 0.45);
  background: #0b1b14;
  display: block;
}

.lf-field-face--dragon img {
  border-color: rgba(192, 132, 252, 0.75);
}

.lf-field-face__name {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 22px;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(2, 12, 9, 0.78);
  color: #ecfdf5;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-field-face__atk,
.lf-field-face__hp {
  position: absolute;
  bottom: 6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #4ade80;
  color: #0b1220;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-field-face__atk { left: 6px; }
.lf-field-face__hp { right: 6px; padding: 0 6px; }

.lf-battle-wrap--cards .lf-controls-help,
.lf-battle-wrap--cards #lf-connect-pad {
  display: none !important;
}

.lf-battle-wrap--cards .lf-battle-actions {
  justify-content: center;
  gap: 10px;
}

.lf-battle-wrap--cards .lf-gamepad-status {
  text-align: center;
  font-size: 11px;
  color: rgba(217, 249, 157, 0.78);
}

@media (max-width: 720px) {
  .lf-hand-card {
    width: 86px;
    height: 122px;
    margin: 0 -18px;
  }
  .lf-hand-fan {
    min-height: 140px;
  }
}
.lf-hand-card.is-dragging{opacity:.35}.lf-battle-stage.is-drop-target{outline:2px dashed rgba(255,255,255,.7);outline-offset:-8px;box-shadow:inset 0 0 48px rgba(255,255,255,.14)}.lf-hand-fan.is-drag-active .lf-hand-card.is-playable{cursor:grab}

/* Fullscreen wide battle - fill the monitor */
#land-fighting-root:has(.lf-panel--battle-full),
#land-fighting-root.is-battle-full {
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  background: var(--bg-deep, #050a08) !important;
}
.lf-panel.lf-panel--battle-full {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: var(--bg-deep, #050a08) !important;
}
.lf-panel.lf-panel--battle-full .lf-header {
  padding: 8px 14px !important;
  min-height: 52px;
  margin-bottom: 8px;
}
.lf-panel.lf-panel--battle-full .lf-header-msg {
  font-size: 12px !important;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}
.lf-panel.lf-panel--battle-full .lf-battle-land-label {
  margin: 0 !important;
  font-size: 11px !important;
  padding: 3px 10px !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  max-width: min(560px, 92vw);
}
.lf-panel.lf-panel--battle-full .lf-body {
  height: calc(100% - 60px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 8px 8px 2px !important;
}
.lf-panel.lf-panel--battle-full .lf-screen.is-active[data-screen="battle"] {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Hide combat chat log + chrome for a seamless plate (same footprint as fatality video) */
.lf-panel.lf-panel--battle-full #lf-battle-log,
.lf-panel.lf-panel--battle-full .lf-battle-log,
.lf-panel.lf-panel--battle-full #lf-ability-strip,
.lf-panel.lf-panel--battle-full .lf-ability-strip,
.lf-panel.lf-panel--battle-full #lf-gamepad-status,
.lf-panel.lf-panel--battle-full .lf-gamepad-status,
.lf-panel.lf-panel--battle-full #lf-battle-controls-top,
.lf-panel.lf-panel--battle-full .lf-battle-controls-top {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-header .lf-battle-land-label {
  flex: 0 0 auto;
}
.lf-panel.lf-panel--battle-full .lf-battle-layout {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  grid-template-columns: none !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-wrap--cards {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: none !important;
  gap: 6px !important;
  /* Side letterbox around the 16:9 plate only — hand stays edge-to-edge below */
  background: var(--bg-deep, #020a07);
}
/* Always hide combat script/log/ability strip in land arena (blocks hand + plate) */
#land-fighting-root #lf-battle-log,
#land-fighting-root .lf-battle-log,
#land-fighting-root #lf-ability-strip,
#land-fighting-root .lf-ability-strip,
#land-fighting-root #lf-gamepad-status,
#land-fighting-root .lf-gamepad-status,
#land-fighting-root #lf-battle-controls-top,
#land-fighting-root .lf-battle-controls-top {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  border: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/*
 * Play plate + fatality video: one true 16:9 film gate, centered.
 * Not full viewport width (that stretched wider than 16:9 and looked zoomed).
 * Bottom hand row stays full width separately.
 */
.lf-panel.lf-panel--battle-full .lf-battle-stage {
  /* Fixed 16:9 film gate — ability videos overlay this exact box */
  --lf-plate-max-h: min(58vh, 640px);
  --lf-plate-max-w: min(1138px, calc(100vw - 280px));
  flex: 0 0 auto !important;
  width: min(var(--lf-plate-max-w), calc(var(--lf-plate-max-h) * 16 / 9)) !important;
  height: min(var(--lf-plate-max-h), calc(var(--lf-plate-max-w) * 9 / 16)) !important;
  max-width: var(--lf-plate-max-w) !important;
  max-height: var(--lf-plate-max-h) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  margin: 6px auto 0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(74, 222, 128, 0.2) !important;
  overflow: hidden !important;
  background: #04140c !important;
  position: relative !important;
  align-self: center !important;
}
/* Land bg + canvas + fatality all fill the SAME plate (same box, same cover) */
.lf-panel.lf-panel--battle-full .lf-battle-terrain,
.lf-panel.lf-panel--battle-full .lf-battle-building,
.lf-panel.lf-panel--battle-full .lf-battle-terrain-img,
.lf-panel.lf-panel--battle-full .lf-battle-building-img,
.lf-panel.lf-panel--battle-full #lf-canvas,
.lf-panel.lf-panel--battle-full #lf-boss-cinematic,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-fullscreen,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-on {
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  /* Same framing for land + video inside the 16:9 gate */
  object-fit: cover !important;
  object-position: center center !important;
  background-size: cover !important;
  background-position: center center !important;
}
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-fullscreen {
  background: transparent !important;
  /* Stay locked to stage — never break out to viewport */
  position: absolute !important;
  z-index: 9 !important;
}
.lf-panel.lf-panel--battle-full .lf-card-battle-ui {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: none !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Hand: larger cards fanned across full bottom width */
.lf-panel.lf-panel--battle-full .lf-card-battle-ui {
  padding-bottom: 14px !important;
  margin-bottom: 0 !important;
  margin-top: auto !important;
  overflow: visible !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-fan,
.lf-hand-fan {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 178px !important;
  padding: 10px 1% 18px !important;
  margin: 0 !important;
  /* No scrollbars — cards share the row and shrink/overlap to fit */
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-fan::-webkit-scrollbar,
.lf-hand-fan::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-actions {
  position: relative;
  z-index: 200;
  flex: 0 0 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  pointer-events: auto;
}
.lf-panel.lf-panel--battle-full .lf-gamepad-status {
  display: none !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-card,
.lf-hand-card {
  flex: 0 0 auto !important;
  min-width: 96px !important;
  width: 104px !important;
  max-width: 104px !important;
  height: 150px !important;
  min-height: 150px !important;
  aspect-ratio: auto !important;
  margin: 0 var(--hand-overlap, -8px) 0 0 !important;
  border-radius: 12px !important;
  overflow: visible !important;
  transform: translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg)) !important;
  transform-origin: 50% 100% !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  contain: none;
  transition: none !important;
  will-change: auto;
}
.lf-panel.lf-panel--battle-full .lf-hand-card img,
.lf-hand-card img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  border: 2px solid rgba(236, 253, 245, 0.45) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.5) !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-card--dragon img,
.lf-hand-card--dragon img {
  border-color: rgba(192, 132, 252, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(168,85,247,0.5), 0 8px 20px rgba(0,0,0,0.55) !important;
}
.lf-hand-card:hover,
.lf-hand-card:focus-visible,
.lf-hand-card.is-playable:hover,
.lf-hand-card.is-playable:focus-visible {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  z-index: 80 !important;
  filter: none;
  /* Do not move the hit-box — prevents edge bounce and sideways slide. */
}
@media (max-width: 1100px) {
  .lf-panel.lf-panel--battle-full .lf-hand-card,
  .lf-hand-card {
    width: 96px !important;
    min-width: 90px !important;
    max-width: 96px !important;
    height: 140px !important;
    min-height: 140px !important;
  }
}
@media (max-width: 720px) {
  .lf-panel.lf-panel--battle-full .lf-hand-card,
  .lf-hand-card {
    width: 88px !important;
    min-width: 82px !important;
    max-width: 88px !important;
    height: 128px !important;
    min-height: 128px !important;
  }
  .lf-hand-fan { min-height: 160px !important; }
}
/* Land ownership ticks */
.lf-land-bonus-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  align-items: stretch;
}
.lf-land-bonus-card {
  position: relative;
  min-height: 0;
}
.lf-land-bonus-card.is-owned {
  border-color: #4ade80 !important;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}
.lf-land-bonus-card.is-missing {
  opacity: 0.72;
  border-color: rgba(248, 113, 113, 0.45) !important;
  filter: grayscale(0.25);
}
.lf-land-bonus-mark {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.lf-land-bonus-mark--yes {
  background: #16a34a;
  color: #ecfdf5;
}
.lf-land-bonus-mark--no {
  background: #b91c1c;
  color: #fee2e2;
}
.lf-land-bonus-card .lf-land-bonus-art {
  height: 88px;
}
.lf-land-bonus-card#lf-bonus-keep,
.lf-land-bonus-card[data-bonus-id="keep"] {
  grid-column: auto;
}

/* Five plot cards: art + tick/X only */
.lf-land-bonus-grid {
  grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
  max-width: 720px;
  margin: 0 auto 12px;
}
.lf-land-bonus-card--art-only {
  padding: 8px 6px 10px !important;
}
.lf-land-bonus-card--art-only .lf-land-bonus-art {
  height: 120px !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.lf-land-bonus-card--art-only .lf-land-bonus-img {
  max-height: 110px !important;
  max-width: 100% !important;
}
.lf-land-bonus-card--art-only .lf-land-bonus-name,
.lf-land-bonus-card--art-only .lf-land-bonus-cost,
.lf-land-bonus-card--art-only .lf-land-bonus-effect {
  display: none !important;
}
.lf-land-bonus-hint {
  display: none !important;
}
@media (max-width: 720px) {
  .lf-land-bonus-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr)) !important;
  }
}

/* Armed magic bar + finish him */
.lf-armed-magic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  font-size: 12px;
  color: #d9f99d;
}
.lf-armed-magic img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.5));
}
.lf-finish-btn {
  background: linear-gradient(180deg, #facc15, #ea580c) !important;
  color: #111 !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: lf-finish-pulse 0.9s ease-in-out infinite alternate;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.55);
}
.lf-finish-btn:disabled {
  animation: none;
  opacity: 0.35;
  box-shadow: none;
}
@keyframes lf-finish-pulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.05); filter: brightness(1.12); }
}
.lf-fight-splash--finish .lf-fight-splash-text--finish,
.lf-fight-splash--phase .lf-fight-splash-text {
  color: #facc15;
  text-shadow: 0 0 24px rgba(250, 204, 21, 0.9), 0 4px 0 #7c2d12;
  font-size: clamp(42px, 8vw, 72px);
  letter-spacing: 0.12em;
}
.lf-fight-splash--phase {
  background: rgba(0, 0, 0, 0.28);
}

/* Boss Opus special overlay — aligns to battle stage; fades over canvas boss */
.lf-battle-stage {
  position: relative;
}
.lf-boss-cinematic {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  /* Match land plate exactly — cover fills the stage gate (16:9) like terrain */
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  transition: opacity 0.12s linear;
  will-change: opacity, transform;
  filter: none;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  backface-visibility: hidden;
}
.lf-boss-cinematic.is-card-origin,
.lf-boss-cinematic.is-card-exit {
  z-index: 8;
  background: rgba(2, 12, 9, 0.25);
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(74, 222, 128, 0.55), 0 10px 28px rgba(0, 0, 0, 0.55);
  object-fit: cover;
}
.lf-boss-cinematic.is-fullscreen {
  z-index: 9;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  /* Identical frame to land terrain inside .lf-battle-stage */
  object-fit: cover !important;
  object-position: center center !important;
}
.lf-boss-cinematic.is-on {
  z-index: 9;
}
.lf-boss-cinematic.is-impact {
  filter: none;
  box-shadow: none;
}
/* Black-plate clips — land shows through, but not 100% clear */
.lf-boss-cinematic.is-plate.is-fullscreen:not(.is-solid-plate) {
  mix-blend-mode: screen;
  background: transparent !important;
  filter: brightness(0.88) contrast(1.06) saturate(1.04);
}
/* End-half dragon plates: knock out the black, keep the dragon brighter */
.lf-boss-cinematic.is-plate.is-end-half:not(.is-solid-plate) {
  mix-blend-mode: screen;
  background: transparent !important;
  filter: brightness(1.12) contrast(1.14) saturate(1.18);
}
/* Solid plates stay opaque without a black flash behind the first frame */
.lf-boss-cinematic.is-solid-plate,
.lf-boss-cinematic.is-solid-plate.is-fullscreen,
.lf-boss-cinematic.is-solid-plate.is-card-origin,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-solid-plate,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-solid-plate.is-fullscreen {
  mix-blend-mode: normal !important;
  background: transparent !important;
  filter: brightness(0.9) contrast(1.08) saturate(1.04);
}
/* Keep HUD/hand above plate */
.lf-battle-stage .lf-hud,
.lf-battle-stage .lf-fight-splash {
  z-index: 8;
}
.lf-fighter-vs .lf-magic-row-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.lf-fighter-vs .lf-magic-row-label {
  margin: 0;
  font-size: 11px;
  color: #d9f99d;
  text-align: center;
}
.lf-fighter-vs .lf-magic-row-grid > .lf-magic-cell {
  display: inline-flex;
}
.lf-fighter-vs .lf-magic-row-grid {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
.lf-fighter-vs .lf-magic-row-label {
  flex: 1 0 100%;
}

/* === Arena polish 2026-08 polish pass === */
/* superseded by pass 4 strip */
.lf-land-bonus-grid.lf-land-bonus-strip .lf-land-bonus-card--art-only {
  flex: 0 0 auto;
  width: 72px;
  min-width: 68px;
  padding: 4px 4px 6px !important;
  border-radius: 10px;
}
.lf-land-bonus-grid.lf-land-bonus-strip .lf-land-bonus-card--art-only .lf-land-bonus-art {
  height: 48px !important;
}
.lf-land-bonus-grid.lf-land-bonus-strip .lf-land-bonus-card--art-only .lf-land-bonus-img {
  max-height: 44px !important;
}
.lf-land-bonus-mark {
  width: 18px !important;
  height: 18px !important;
  font-size: 11px !important;
  top: 3px !important;
  right: 3px !important;
}
.lf-land-bonus-pct {
  display: block;
  margin-top: 2px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #86efac;
  letter-spacing: 0.02em;
}
.lf-land-bonus-card.is-missing .lf-land-bonus-pct {
  color: rgba(248, 113, 113, 0.85);
}
.lf-land-bonus-total {
  display: none !important;
  flex: 1 0 100%;
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: #bbf7d0;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
}

.lf-vs-currency {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: end;
  column-gap: 6px;
  width: 100%;
  margin: 4px 0 2px;
  padding: 0 2px;
  box-sizing: border-box;
}
.lf-vs-currency-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.lf-vs-currency-side--hero {
  align-items: flex-start;
  text-align: left;
  justify-self: start;
}
.lf-vs-currency-side--bot {
  align-items: flex-end;
  text-align: right;
  justify-self: end;
}
.lf-vs-currency-item--crystal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 44px;
}
.lf-vs-currency-item--crystal .lf-vs-currency-icon {
  width: 40px;
  height: 40px;
  align-self: center;
}
.lf-vs-currency-item--crystal .lf-vs-currency-name {
  min-height: 0;
  max-width: 76px;
  font-size: 8px;
}
.lf-vs-currency-item--mid {
  min-width: 72px;
}
.lf-vs-currency-item {
  display: grid;
  grid-template-rows: 56px 1.15em auto;
  align-items: end;
  justify-items: center;
  min-width: 112px;
  gap: 4px;
}
.lf-vs-currency-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  align-self: end;
  filter: drop-shadow(0 0 10px var(--green-glow, rgba(74, 222, 128, 0.35)));
}
.lf-vs-currency-icon--glint {
  width: 56px;
  height: 56px;
}
.lf-vs-currency-amt {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #ecfdf5);
  line-height: 1.1;
  height: auto;
}
.lf-vs-currency-name {
  font-size: 9px;
  color: var(--text-dim, rgba(167, 243, 200, 0.75));
  line-height: 1.2;
  min-height: 0;
  max-width: none;
}
.lf-vs-currency-fee {
  font-size: 9px;
  font-weight: 700;
  color: #fde68a;
  line-height: 1.2;
}
.lf-vs-currency-side.is-free .lf-vs-currency-amt,
.lf-vs-currency-side.is-free .lf-vs-currency-fee {
  color: #86efac;
}
.lf-vs-currency-item.lf-vs-currency-item--crystal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 44px;
  grid-template-rows: none;
}
.lf-vs-glint-pct {
  display: block;
  margin-top: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text, #ffffff);
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.lf-glint-win {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lf-glint-win.is-show {
  opacity: 1;
}

.lf-draw-phase {
  position: fixed;
  inset: 0;
  z-index: 11950;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lf-draw-phase.is-show {
  opacity: 1;
}
.lf-draw-phase__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 240px;
  padding: 22px 30px 18px;
  border-radius: 16px;
  background: rgba(4, 16, 12, 0.94);
  border: 1px solid rgba(134, 239, 172, 0.5);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.28);
}
.lf-draw-phase__title {
  font-size: 26px;
  letter-spacing: 0.14em;
  color: #ecfdf5;
}
.lf-draw-phase__sub {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.85);
}
.lf-draw-phase__count {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86efac;
}
.lf-glint-win__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 220px;
  padding: 22px 28px 20px;
  border-radius: 16px;
  background: rgba(4, 16, 12, 0.94);
  border: 1px solid rgba(134, 239, 172, 0.5);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.28);
  animation: lf-glint-pop 0.45s ease;
}
.lf-glint-win__icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(134, 239, 172, 0.55));
}
.lf-glint-win__title {
  font-size: 28px;
  letter-spacing: 0.18em;
  color: #ecfdf5;
}
.lf-glint-win__amt {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}
.lf-glint-win__sub {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.75);
}
@keyframes lf-glint-pop {
  0% { transform: scale(0.72); opacity: 0; }
  70% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}

.lf-magic-row-label {
  color: #bbf7d0 !important;
  letter-spacing: 0.04em;
}
.lf-fighter-vs .lf-magic-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(3, 18, 12, 0.7);
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.lf-fighter-vs .lf-magic-btn img,
.lf-magic-icon {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  filter: contrast(1.12) saturate(1.15) brightness(1.05);
}
.lf-fighter-vs .lf-magic-btn.is-selected {
  border-color: #4ade80 !important;
  box-shadow:
    0 0 0 2px rgba(74, 222, 128, 0.45),
    0 0 18px rgba(74, 222, 128, 0.75),
    0 0 36px rgba(34, 197, 94, 0.45) !important;
  transform: scale(1.08);
}
.lf-fighter-vs .lf-magic-cost {
  display: block !important;
  min-width: 12px;
  font-size: 7px;
  padding: 0 2px;
  right: -6px;
  bottom: -4px;
}

.lf-land-strip__side--citadel {
  cursor: pointer;
}
.lf-land-strip__side--citadel.is-paying {
  opacity: 0.7;
}
.lf-land-strip__side--citadel.is-paid .lf-land-strip__thumb-fee,
.lf-land-strip__stage.is-paid + #lf-land-strip-label {
  color: #052e16;
}
.lf-land-strip__side--citadel.is-paid .lf-land-strip__thumb-fee {
  background: #4ade80;
  color: #052e16;
}

.lf-armed-magic {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.lf-armed-magic-hint {
  font-size: 11px;
  color: rgba(217, 249, 157, 0.75);
}
#lf-finish-him-armed {
  margin-left: 4px;
}

.lf-result-title--win {
  color: #ecfdf5;
  text-shadow: 0 0 22px rgba(74, 222, 128, 0.65);
  letter-spacing: 0.08em;
}
.lf-result-title--lose {
  color: #fecaca;
  text-shadow: 0 0 16px rgba(248, 113, 113, 0.45);
}
.lf-screen[data-screen="result"] #lf-result-body {
  max-width: 420px;
  margin: 0 auto 16px;
  color: rgba(236, 253, 245, 0.9);
  line-height: 1.45;
}

.lf-result-summary__text {
  margin: 0 0 10px;
}

.lf-result-survivors {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.lf-result-survivors__title {
  color: #fde047;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}

.lf-result-survivors__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: min(520px, 88vw);
}

.lf-result-survivor-card {
  width: 54px;
  height: 76px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(253, 224, 71, 0.75);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.32), 0 6px 12px rgba(0, 0, 0, 0.45);
}

.lf-result-survivor-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Top-bar dragon logo: finish damage tip */
.lf-finish-tip-host {
  position: relative;
}
.lf-finish-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(280px, 72vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: linear-gradient(180deg, rgba(6, 28, 18, 0.96), rgba(2, 12, 9, 0.98));
  color: #d1fae5;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(74, 222, 128, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 80;
}
.lf-finish-tip strong { color: #86efac; }
.lf-finish-tip-host:hover .lf-finish-tip,
.lf-finish-tip-host:focus-within .lf-finish-tip {
  opacity: 1;
  transform: translateY(0);
}

/* === Pass 4: ownership strip + magic board rails === */
.lf-land-bonus-grid.lf-land-bonus-strip {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 10px !important;
  overflow: visible !important;
  padding: 0 !important;
}
.lf-land-bonus-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0 4px;
}
.lf-land-bonus-head-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(167, 243, 200, 0.8);
}
.lf-land-bonus-head-total {
  font-size: 13px;
  font-weight: 800;
  color: #86efac;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.45);
}
.lf-land-bonus-row {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100%;
  overflow: visible !important;
}
.lf-land-bonus-row .lf-land-bonus-card--art-only {
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
  padding: 6px 4px 8px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lf-land-bonus-row .lf-land-bonus-art {
  height: 56px !important;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-land-bonus-row .lf-land-bonus-img {
  max-height: 52px !important;
  max-width: 100% !important;
  object-fit: contain;
}
.lf-land-bonus-mini {
  font-size: 9px;
  color: rgba(167, 243, 200, 0.65);
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lf-land-bonus-pct {
  font-size: 12px !important;
  font-weight: 800;
  color: #86efac;
}
.lf-land-bonus-card.is-missing .lf-land-bonus-pct {
  color: rgba(248, 113, 113, 0.9);
}
.lf-land-bonus-mark--no {
  background: #b91c1c !important;
  color: #fee2e2 !important;
}
.lf-land-bonus-total { display: none !important; }
.lf-land-actions { overflow: visible !important; }

.lf-magic-spells-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px auto 0;
}
.lf-magic-btn--square {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  border-radius: 12px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(74, 222, 128, 0.4) !important;
  background: rgba(2, 14, 10, 0.85) !important;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.18);
}
.lf-magic-square {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  border: none !important;
  background: transparent !important;
  box-sizing: border-box;
  padding: 0;
}
.lf-magic-btn--square img.lf-magic-icon {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain !important;
  image-rendering: auto;
  filter: none !important;
  margin: 0 auto;
  display: block;
}
.lf-magic-btn--square.is-selected,
.lf-magic-btn--square.is-armed {
  border-color: #4ade80 !important;
  box-shadow:
    0 0 0 2px rgba(74, 222, 128, 0.55),
    0 0 18px rgba(74, 222, 128, 0.7),
    0 0 36px rgba(34, 197, 94, 0.4) !important;
  transform: scale(1.06);
}
.lf-magic-btn--square.is-ready {
  animation: lf-magic-ready 0.9s ease-in-out infinite alternate;
}
@keyframes lf-magic-ready {
  from { box-shadow: 0 0 12px rgba(74,222,128,0.45); }
  to { box-shadow: 0 0 28px rgba(74,222,128,0.9), 0 0 48px rgba(34,197,94,0.45); }
}

.lf-board-rail,
.lf-board-rail--side {
  position: relative !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* Volley gap — centre strip holds draw pile / graveyard + firing wheels */
.lf-rail-volley-gap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 148px;
  margin: 6px 0 4px;
  padding: 0 2px 4px;
  position: relative;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.lf-rail-gap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 4px;
  padding: 0 2px;
  flex: 0 0 auto;
}
.lf-rail-gap-head strong {
  color: #fde047;
  font-size: 10px;
}
.lf-rail-volley-gap--right .lf-rail-gap-head strong {
  color: #cbd5e1;
}
.lf-rail-gap-stack {
  position: relative;
  width: 100%;
  min-height: 128px;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  padding: 6px 0 22px;
}
.lf-rail-volley-gap--right .lf-rail-gap-stack {
  overflow: hidden;
  padding-top: 10px;
}
.lf-rail-gap-stack .lf-draw-stack,
.lf-rail-gap-stack .lf-gy-stack {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}
/* Volley wheels — bottom board corners, half clipped by arena frame */
.lf-battle-stage .lf-volley-hub--board {
  position: absolute;
  z-index: 6;
  width: 88px;
  max-width: none;
  margin: 0;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--left {
  left: -44px;
  bottom: -44px;
  top: auto;
  transform: none;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--right {
  right: -44px;
  bottom: -44px;
  left: auto;
  top: auto;
  transform: none;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--left .lf-volley-hub__ring {
  border-color: rgba(74, 222, 128, 0.9);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5), inset 0 0 10px rgba(74, 222, 128, 0.12);
  animation: lf-volley-corner-pulse-green 1.15s ease-in-out infinite;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--left .lf-volley-hub__ring--inner {
  border-color: rgba(134, 239, 172, 0.75);
  animation: lf-volley-corner-pulse-green 1.15s ease-in-out infinite;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--right .lf-volley-hub__ring {
  border-color: rgba(241, 245, 249, 0.92);
  box-shadow: 0 0 22px rgba(226, 232, 240, 0.58), inset 0 0 12px rgba(148, 163, 184, 0.14);
  animation: lf-volley-corner-pulse-green 1.15s ease-in-out infinite;
}
.lf-battle-stage .lf-volley-hub--board.lf-volley-hub--right .lf-volley-hub__ring--inner {
  border-color: rgba(226, 232, 240, 0.82);
  animation: lf-volley-corner-pulse-green 1.15s ease-in-out infinite;
  filter: grayscale(0.15) brightness(1.08);
}
.lf-battle-stage .lf-volley-hub--board.is-idle-ring .lf-volley-hub__cards {
  opacity: 0;
  visibility: hidden;
}
.lf-battle-stage .lf-volley-hub--board.is-ready .lf-volley-hub__cards,
.lf-battle-stage .lf-volley-hub--board.is-spinning .lf-volley-hub__cards,
.lf-battle-stage .lf-volley-hub--board.is-firing .lf-volley-hub__cards {
  opacity: 1;
  visibility: visible;
}
.lf-battle-stage .lf-volley-hub--board .lf-volley-hub__eyes,
.lf-battle-stage .lf-volley-hub--board .lf-volley-hub__eyes--gray {
  opacity: 1;
  visibility: visible;
}
.lf-battle-stage .lf-volley-hub--board.is-firing .lf-volley-hub__ring {
  animation: lf-volley-pulse 0.42s ease-in-out infinite alternate;
}
.lf-battle-stage .lf-volley-hub--board.is-firing .lf-volley-hub__ring--inner {
  animation: lf-volley-spin 6s linear infinite;
}
.lf-battle-stage .lf-volley-hub--board .lf-volley-hub__wheel {
  width: 88px;
  height: 88px;
}
.lf-battle-stage .lf-volley-hub--board .lf-volley-hub__label {
  display: none;
}
.lf-battle-stage .lf-volley-hub--board .lf-hub-eye img {
  filter: sepia(0.2) saturate(1.6) hue-rotate(95deg) brightness(1.15) drop-shadow(0 0 6px rgba(74, 222, 128, 0.85));
}
.lf-battle-stage .lf-volley-hub--board .lf-hub-boss-ability {
  position: absolute;
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(74, 222, 128, 0.55);
}
.lf-battle-stage .lf-volley-hub--board .lf-hub-boss-ability--spent {
  opacity: 0.72;
}
.lf-volley-hub {
  position: relative;
  left: auto;
  top: auto;
  width: 72px;
  max-width: calc(100% - 2px);
  height: auto;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  margin: 0 auto;
  overflow: visible;
}
.lf-volley-hub.is-visible {
  opacity: 1;
}
.lf-volley-hub.is-firing .lf-volley-hub__ring {
  animation: lf-volley-pulse 0.55s ease-in-out infinite alternate;
}
.lf-volley-hub__wheel {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  overflow: visible;
}
.lf-volley-hub__ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(148, 163, 184, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.45), inset 0 0 12px rgba(148, 163, 184, 0.12);
  overflow: visible;
}
.lf-volley-hub__ring--inner {
  inset: 14px;
  border-width: 1.5px;
  opacity: 0.75;
}
.lf-volley-hub--left .lf-volley-hub__ring {
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.45), inset 0 0 10px rgba(251, 191, 36, 0.1);
}
.lf-volley-hub--left.is-magic .lf-volley-hub__ring {
  border-color: rgba(74, 222, 128, 0.92);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.55), inset 0 0 10px rgba(74, 222, 128, 0.15);
}
.lf-volley-hub--left.is-magic:not(.is-spinning) .lf-volley-hub__ring {
  animation: lf-volley-pulse 0.85s ease-in-out infinite alternate;
}
.lf-volley-hub--left .lf-volley-hub__ring--inner,
.lf-volley-hub--left.is-magic .lf-volley-hub__ring--inner,
.lf-volley-hub--left.is-magic.is-spinning .lf-volley-hub__ring--inner {
  animation: lf-volley-spin 8s linear infinite;
}
.lf-volley-hub--left.is-spinning .lf-volley-hub__ring--inner,
.lf-volley-hub--left.is-magic.is-spinning .lf-volley-hub__ring--inner {
  animation: lf-volley-spin 6s linear infinite;
}
.lf-volley-hub__label {
  margin-top: 6px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.88);
  white-space: nowrap;
}
.lf-volley-hub--right .lf-volley-hub__ring {
  border-color: rgba(148, 163, 184, 0.88);
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.42), inset 0 0 10px rgba(148, 163, 184, 0.1);
}
.lf-volley-hub--right.is-firing .lf-volley-hub__ring,
.lf-volley-hub--right.is-spinning .lf-volley-hub__ring {
  animation: lf-volley-pulse 0.55s ease-in-out infinite alternate;
}
.lf-volley-hub--right.is-ready:not(.is-firing) .lf-volley-hub__ring {
  animation: lf-volley-pulse 0.9s ease-in-out infinite alternate;
}
.lf-volley-hub--right .lf-volley-hub__ring--inner {
  animation: lf-volley-spin 8s linear infinite;
}
.lf-volley-hub--right.is-spinning .lf-volley-hub__ring--inner {
  animation: lf-volley-spin 6s linear infinite;
}
.lf-volley-hub--left .lf-volley-hub__label {
  color: rgba(253, 224, 71, 0.92);
}
.lf-volley-hub--right .lf-volley-hub__label {
  color: rgba(203, 213, 225, 0.9);
}
.lf-volley-hub__cards,
.lf-volley-hub__eyes {
  position: absolute;
  inset: 0;
}
.lf-volley-hub__cards img,
.lf-volley-hub__eyes img {
  position: absolute;
  width: 28px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(203, 213, 225, 0.55);
  filter: grayscale(1) brightness(0.78);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.lf-gy-hub-card--idle {
  opacity: 0.82;
}
.lf-gy-hub-card--firing {
  filter: grayscale(0.35) brightness(0.95);
  border-color: rgba(148, 163, 184, 0.85);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.45);
}
.lf-volley-hub__eyes img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.15);
  border-color: rgba(251, 191, 36, 0.75);
  animation: lf-hub-eye-glow 1.4s ease-in-out infinite alternate;
}
.lf-volley-hub__eyes--gray img,
.lf-volley-hub__eyes.lf-volley-hub__eyes--gray img {
  filter: brightness(1.12) drop-shadow(0 0 8px rgba(74, 222, 128, 0.85));
  border-color: rgba(74, 222, 128, 0.65);
  animation: lf-hub-ability-glow 1.4s ease-in-out infinite alternate;
}
.lf-volley-hub__eyes img.lf-hub-magic {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: none;
}
@keyframes lf-hub-eye-glow {
  from { transform: translate(-50%, -50%) scale(0.9); filter: sepia(1) saturate(3.5) hue-rotate(5deg) brightness(1.1) drop-shadow(0 0 4px rgba(251, 191, 36, 0.75)); }
  to { transform: translate(-50%, -50%) scale(1.08); filter: sepia(1) saturate(4.5) hue-rotate(8deg) brightness(1.35) drop-shadow(0 0 10px rgba(254, 240, 138, 1)); }
}
@keyframes lf-hub-eye-glow-gray {
  from { transform: translate(-50%, -50%) scale(0.9); filter: grayscale(1) brightness(0.65) drop-shadow(0 0 3px rgba(148, 163, 184, 0.7)); }
  to { transform: translate(-50%, -50%) scale(1.08); filter: grayscale(0.85) brightness(0.92) drop-shadow(0 0 9px rgba(203, 213, 225, 0.95)); }
}
@keyframes lf-hub-ability-glow {
  from { transform: translate(-50%, -50%) scale(0.92); filter: brightness(1.05) drop-shadow(0 0 5px rgba(74, 222, 128, 0.7)); }
  to { transform: translate(-50%, -50%) scale(1.08); filter: brightness(1.25) drop-shadow(0 0 12px rgba(134, 239, 172, 1)); }
}
@keyframes lf-volley-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes lf-volley-pulse {
  from { transform: scale(1); opacity: 0.82; }
  to { transform: scale(1.06); opacity: 1; }
}
@keyframes lf-volley-corner-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.28; }
  50% { transform: scale(1.08); opacity: 0.62; }
}
@keyframes lf-volley-corner-pulse-green {
  0%, 100% { transform: scale(0.96); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.95; }
}
@keyframes lf-volley-corner-pulse-grey {
  0%, 100% { transform: scale(0.96); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.95; }
}

.lf-battle-stage.is-volley-gap {
  overflow: visible !important;
}
.lf-battle-stage.is-volley-gap #lf-canvas {
  overflow: visible;
}

.lf-board-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: linear-gradient(180deg, rgba(6, 32, 20, 0.85), rgba(2, 12, 8, 0.92));
  box-shadow: inset 0 0 18px rgba(74, 222, 128, 0.08);
  min-height: 0;
}
.lf-rail-note {
  font-size: 9px;
  text-align: center;
  color: rgba(167, 243, 200, 0.55);
  line-height: 1.3;
}
.lf-battle-magic-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.lf-rail-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86efac;
  text-align: center;
}
.lf-rail-magic-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.lf-board-rail .lf-magic-btn--square {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
}
.lf-board-rail .lf-magic-square,
.lf-board-rail .lf-magic-btn--square img.lf-magic-icon {
  width: 38px !important;
  height: 38px !important;
}
.lf-magic-spell-cast {
  width: 100%;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  padding: 8px 6px !important;
  background: linear-gradient(180deg, #4ade80, #16a34a) !important;
  color: #052e16 !important;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.55);
}
.lf-magic-spell-cast:disabled {
  opacity: 0.35;
  box-shadow: none;
}
.lf-hand-fan { overflow: visible !important; }
@media (max-width: 900px) {
  .lf-battle-board {
    grid-template-columns: minmax(56px, 72px) minmax(0, 1fr) minmax(68px, 88px);
  }
  .lf-land-bonus-row { gap: 6px !important; }
}

/* === Pass 5: magic left / specials right / header logo === */
.lf-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lf-header-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.55));
  flex: 0 0 auto;
}

.lf-board-rail--left {
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
}
.lf-board-rail--right {
  justify-content: flex-start;
  overflow-y: auto;
}
.lf-ability-icon-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 8px !important;
  width: 100%;
}
.lf-ability-icon-btn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.lf-ability-icon-face {
  display: flex;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: #020a06;
}
.lf-ability-icon-face img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin: 0 auto;
}
.lf-ability-icon-btn.is-ready:not(.is-used) .lf-ability-icon-face {
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.55),
    0 0 16px rgba(74, 222, 128, 0.55);
}
.lf-ability-icon-btn.is-selected:not(.is-used) .lf-ability-icon-face,
.lf-ability-icon-btn.is-flash:not(.is-used) .lf-ability-icon-face {
  animation: lf-ability-flash 0.85s ease-in-out infinite alternate;
  border-color: #4ade80;
}
@keyframes lf-ability-flash {
  from { box-shadow: 0 0 10px rgba(74,222,128,0.4); filter: brightness(1); }
  to { box-shadow: 0 0 26px rgba(74,222,128,0.95), 0 0 40px rgba(34,197,94,0.4); filter: brightness(1.15); }
}
.lf-ability-icon-btn.is-turn-locked:not(.is-used) {
  opacity: 0.42 !important;
  filter: grayscale(0.75) !important;
  cursor: not-allowed !important;
}
.lf-ability-icon-btn.is-turn-locked:not(.is-used) .lf-ability-icon-face {
  box-shadow: none !important;
  border-color: rgba(74, 222, 128, 0.2) !important;
}
.lf-ability-icon-btn.is-boss-ability:not(.is-used):not(.is-spent) .lf-ability-icon-face {
  border-color: rgba(74, 222, 128, 0.65);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.45);
}
.lf-ability-icon-btn.is-boss-ability:hover:not(.is-used):not(.is-spent) {
  transform: none;
  filter: none;
}
.lf-ability-icon-btn.is-used:hover,
.lf-ability-icon-btn.is-spent:hover {
  transform: none !important;
  filter: grayscale(1) brightness(0.45) !important;
}

.lf-ability-icon-btn.is-used,
.lf-ability-icon-btn.is-spent,
.lf-ability-icon-btn:disabled.is-used {
  cursor: default !important;
  filter: grayscale(1) brightness(0.48) !important;
  opacity: 0.62 !important;
  pointer-events: none;
}
.lf-ability-icon-btn.is-used .lf-ability-icon-face,
.lf-ability-icon-btn.is-spent .lf-ability-icon-face {
  box-shadow: none !important;
  border-color: rgba(100, 116, 139, 0.55) !important;
  animation: none !important;
  filter: grayscale(1) brightness(0.55) !important;
}
.lf-ability-icon-btn.is-used.is-flash,
.lf-ability-icon-btn.is-used.is-ready,
.lf-ability-icon-btn.is-spent.is-flash,
.lf-ability-icon-btn.is-spent.is-ready {
  animation: none !important;
  filter: grayscale(1) brightness(0.48) !important;
}
.lf-ability-icon-btn.is-coming-soon {
  cursor: default;
  filter: grayscale(0.85) brightness(0.55);
}
.lf-ability-icon-btn.is-burn-locked {
  cursor: default;
  filter: grayscale(0.7) brightness(0.6);
}
.lf-ability-icon-face.is-burn-locked {
  position: relative;
}
.lf-burn-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fde047;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 8px;
}
.lf-coming-soon {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

.lf-battle-specials-rail {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.lf-rail-title--bot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.lf-rail-bot-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.45));
}
.lf-specials-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.lf-specials-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(2, 14, 10, 0.72);
  cursor: help;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lf-specials-row:hover {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}
.lf-specials-name {
  font-size: 10px;
  color: #ecfdf5;
  line-height: 1.2;
}
.lf-specials-dmg {
  font-size: 11px;
  font-weight: 800;
  color: #86efac;
  flex: 0 0 auto;
}
.lf-specials-row.is-coming-soon {
  opacity: 0.55;
  filter: grayscale(0.6);
}
.lf-ability-tip {
  position: fixed;
  z-index: 99999;
  max-width: 268px;
  padding: 11px 14px 11px 16px;
  border-radius: 10px;
  border: 1px solid rgba(110, 231, 160, 0.45);
  background: linear-gradient(180deg, rgba(8, 32, 22, 0.98), rgba(3, 14, 11, 0.99));
  color: #d1fae5;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.58), 0 0 18px rgba(74, 222, 128, 0.16);
  pointer-events: none !important;
}
.lf-ability-tip.lf-ability-tip--right {
  border-left: 3px solid rgba(74, 222, 128, 0.85);
}
.lf-ability-tip.lf-ability-tip--left {
  border-right: 3px solid rgba(74, 222, 128, 0.85);
}
.lf-ability-tip.lf-ability-tip--rich {
  max-width: 280px;
  padding: 12px 14px;
}
.lf-ability-tip.lf-ability-tip--rich strong,
.lf-help-tip__title {
  display: block;
  color: #86efac;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.lf-ability-tip.lf-ability-tip--rich p {
  margin: 0 0 8px;
  color: #bbf7d0;
}
.lf-ability-tip.lf-ability-tip--rich p:last-child {
  margin-bottom: 0;
}
.lf-volley-hub__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  z-index: 8;
  pointer-events: none;
  border-radius: 50%;
}
.lf-volley-hub__eyes {
  z-index: 4;
}
.lf-hub-core-magic {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  background: radial-gradient(circle, rgba(6, 28, 18, 0.55), rgba(2, 12, 9, 0.92));
  box-shadow: 0 0 12px var(--lf-magic-glow, #4ade80), 0 0 22px var(--lf-magic-glow, #4ade80);
  filter: drop-shadow(0 0 8px var(--lf-magic-glow, #4ade80)) brightness(1.18);
  animation: lf-hub-core-glow 1.15s ease-in-out infinite alternate;
}
.lf-hub-core-magic.is-armed {
  animation-duration: 0.7s;
}
@keyframes lf-hub-core-glow {
  from {
    transform: scale(0.94);
    filter: drop-shadow(0 0 6px var(--lf-magic-glow, #4ade80)) brightness(1.08);
  }
  to {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px var(--lf-magic-glow, #4ade80)) brightness(1.32);
  }
}
.lf-volley-hub__core.is-glowing {
  box-shadow: 0 0 16px var(--lf-magic-glow, #4ade80);
}
.lf-rail-note--grave {
  margin-top: 6px;
  font-size: 8px;
  opacity: 0.65;
}

/* slightly wider rails for ability icons */
.lf-battle-board {
  grid-template-columns: minmax(78px, 110px) minmax(0, 1fr) minmax(110px, 140px) !important;
}

/* === Pass 6: magic left + abilities right + HTML graveyard === */
.lf-board-rail--left {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 28px !important;
}
.lf-element-magic-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
}
.lf-board-rail--left .lf-magic-btn--square {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
}
.lf-board-rail--left .lf-magic-square,
.lf-board-rail--left .lf-magic-icon {
  width: 36px !important;
  height: 36px !important;
}
.lf-battle-graveyard {
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(74, 222, 128, 0.2);
}
.lf-gy-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 6px;
  padding: 0 2px;
}
.lf-gy-stack {
  position: relative;
  width: 100%;
  max-width: 148px;
  min-height: 124px;
  max-height: 136px;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.lf-rail-gap-stack .lf-gy-card {
  width: 96px;
  height: 124px;
  margin-top: -121px;
}
.lf-rail-gap-stack .lf-gy-card:first-child {
  margin-top: 0;
}
.lf-rail-gap-stack .lf-gy-card:last-child {
  z-index: 3;
}
.lf-gy-stack::-webkit-scrollbar { display: none; }
.lf-gy-card {
  position: relative;
  width: 92px;
  height: 128px;
  margin: 0 auto;
  margin-top: -121px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(74, 222, 128, 0.55);
  filter: saturate(0.85) brightness(0.95);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35), 0 4px 12px rgba(0,0,0,0.45);
  transition: transform 0.18s ease, filter 0.18s ease, margin-top 0.18s ease;
  background: #0b1220;
}
.lf-gy-card:first-child { margin-top: 0; }
.lf-gy-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lf-gy-card-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4px 3px;
  font-size: 8px;
  text-align: center;
  color: #e2e8f0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-gy-stack:hover .lf-gy-card { margin-top: -121px; }
.lf-gy-stack:hover .lf-gy-card:first-child { margin-top: 0; }
.lf-gy-card:hover {
  filter: grayscale(0.35) brightness(0.95);
  transform: none;
  z-index: 40 !important;
  border-color: rgba(74, 222, 128, 0.55);
}
.lf-battle-abilities-rail { width: 100%; }
.lf-board-rail--right .lf-ability-icon-col { gap: 7px !important; }
.lf-board-rail--right .lf-ability-icon-btn,
.lf-board-rail--right .lf-ability-icon-face {
  width: 54px;
  height: 54px;
}
.lf-ability-icon-face.is-soon { position: relative; }
.lf-ability-icon-face.is-soon img {
  opacity: 0.35;
  filter: grayscale(1);
}
.lf-ability-icon-face.is-soon .lf-coming-soon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 6, 0.55);
  font-size: 8px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
  padding: 4px;
}
.lf-battle-board {
  grid-template-columns: minmax(100px, 128px) minmax(0, 1fr) minmax(78px, 110px) !important;
}

/* === Pass 7: symmetric rails + stack HP segs + hand safety === */
.lf-battle-board {
  display: grid !important;
  grid-template-columns: minmax(118px, 128px) minmax(0, 1fr) minmax(118px, 128px) !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
}
.lf-board-rail,
.lf-board-rail--side {
  width: 100% !important;
  max-width: 128px !important;
  min-width: 118px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 4px 12px !important;
  box-sizing: border-box !important;
}
.lf-rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  position: relative;
  z-index: 10;
}
.lf-rail-card-slot {
  flex: 0 0 auto;
  position: relative;
  z-index: 4;
}
.lf-board-rail .lf-rail-magic-btn,
.lf-board-rail .lf-magic-btn--square {
  position: relative;
  z-index: 12;
  pointer-events: auto;
}
.lf-board-rail .lf-rail-magic-btn.is-armed,
.lf-board-rail .lf-rail-magic-btn.is-ready,
.lf-board-rail .lf-rail-magic-btn.is-selected {
  pointer-events: auto !important;
  z-index: 14 !important;
  cursor: pointer !important;
}
.lf-battle-magic-rail {
  position: relative;
  z-index: 12;
  pointer-events: auto;
}
.lf-element-magic-col,
.lf-ability-icon-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100%;
}
.lf-board-rail .lf-magic-btn--square,
.lf-board-rail .lf-ability-icon-btn,
.lf-board-rail .lf-ability-icon-face {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
}
.lf-board-rail .lf-magic-square,
.lf-board-rail .lf-magic-icon {
  width: 34px !important;
  height: 34px !important;
}

.lf-rail-magic-btn.is-dimmed,
.lf-rail-magic-btn.is-inactive {
  opacity: 0.28 !important;
  filter: grayscale(0.92) brightness(0.38) !important;
  pointer-events: none;
}
.lf-rail-magic-btn.is-dimmed .lf-magic-square,
.lf-rail-magic-btn.is-inactive .lf-magic-square {
  border-color: rgba(71, 85, 105, 0.45) !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Armed magic always glows on the battle rail when purchased */
.lf-rail-magic-btn.is-armed .lf-magic-square,
.lf-rail-magic-btn.is-selected .lf-magic-square,
.lf-magic-btn--square.is-armed,
.lf-magic-btn--square.is-selected {
  border-color: #4ade80 !important;
  box-shadow:
    0 0 0 2px rgba(74, 222, 128, 0.55),
    0 0 18px rgba(74, 222, 128, 0.75),
    0 0 32px rgba(34, 197, 94, 0.45) !important;
  filter: none !important;
  opacity: 1 !important;
}
.lf-rail-magic-btn.is-ready,
.lf-rail-magic-btn.is-ready .lf-magic-square {
  animation: lf-magic-ready 0.85s ease-in-out infinite alternate;
  filter: none !important;
  opacity: 1 !important;
}
.lf-rail-magic-btn.is-ready .lf-magic-square {
  border-color: #fbbf24 !important;
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.85),
    0 0 22px rgba(74, 222, 128, 0.95),
    0 0 40px rgba(250, 204, 21, 0.55) !important;
}
.lf-rail-magic-btn.is-armed:not(.is-ready) .lf-magic-square {
  border-color: #4ade80 !important;
}

/* Matching foot cards under each rail */
.lf-rail-card-slot {
  flex: 0 0 auto !important;
  width: 96px !important;
  min-height: 132px !important;
  margin-top: auto !important;
  border-top: 1px solid rgba(74, 222, 128, 0.2);
  padding-top: 8px;
}
.lf-battle-graveyard {
  margin-top: 0 !important;
  width: 96px !important;
}
.lf-gy-stack {
  min-height: 124px !important;
  max-height: 136px !important;
  width: 96px !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  padding: 0 !important;
  position: relative;
}
.lf-gy-card {
  width: 92px !important;
  height: 126px !important;
  margin-top: -121px !important;
}
.lf-gy-card:first-child { margin-top: 0 !important; }
.lf-coming-card {
  width: 92px;
  height: 126px;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px dashed rgba(74, 222, 128, 0.4);
  background:
    linear-gradient(180deg, rgba(6, 28, 18, 0.9), rgba(2, 10, 8, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 18px rgba(74, 222, 128, 0.08);
}
.lf-coming-card-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  text-align: center;
  padding: 0 6px;
}
.lf-coming-card-sub {
  font-size: 9px;
  color: rgba(134, 239, 172, 0.55);
  text-align: center;
}

/* Stack HP segments */
.lf-hp.lf-hp--stack {
  position: relative;
  height: 16px;
  overflow: visible;
  background: rgba(0, 0, 0, 0.5);
}
.lf-hp-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
}
.lf-hp-segments {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
  gap: 2px;
  padding: 1px;
}
.lf-hp-seg {
  position: relative;
  min-width: 6px;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-sizing: border-box;
}
.lf-hp-seg i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-700, #15803d), var(--green-400, #4ade80));
  transition: width 0.12s linear;
}
.lf-hp-seg.is-front {
  border-color: #86efac;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}
.lf-hp-seg.is-dead {
  opacity: 0.35;
  filter: grayscale(1);
}
.lf-hp-seg.is-dead i { width: 0% !important; }
.lf-hp-seg em {
  display: none;
}

/* Protect hand + fire button from clipping */
.lf-card-battle-ui {
  padding-bottom: 10px !important;
  min-height: 0;
}
.lf-panel.lf-panel--battle-full .lf-hand-fan,
.lf-hand-fan {
  min-height: 196px !important;
  max-height: none !important;
  padding-bottom: 40px !important;
  overflow: visible !important;
}
.lf-battle-actions {
  position: relative;
  z-index: 90;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
.lf-gamepad-status {
  font-size: 10px !important;
  margin: 0 0 2px !important;
  max-height: 1.2em;
  overflow: hidden;
}
@media (max-height: 820px) {
  .lf-panel.lf-panel--battle-full .lf-battle-stage {
    --lf-plate-max-h: min(50vh, 520px) !important;
  }
  .lf-panel.lf-panel--battle-full .lf-hand-fan,
  .lf-hand-fan {
    min-height: 150px !important;
    max-height: none !important;
  }
  .lf-rail-card-slot,
  .lf-battle-graveyard {
    min-height: 110px !important;
  }
  .lf-gy-stack { max-height: 112px !important; min-height: 100px !important; }
  .lf-coming-card, .lf-gy-card {
    height: 108px !important;
    width: 80px !important;
  }
}

/* === Pass 8: reserve deck left / graveyard right / magic spent state === */
.lf-rail-top {
  overflow: visible !important;
  padding-top: 4px;
}
.lf-element-magic-col,
.lf-battle-magic-rail {
  overflow: visible !important;
}
.lf-board-rail .lf-magic-btn--square img.lf-magic-icon {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain !important;
  filter: none !important;
}
.lf-board-rail .lf-magic-square {
  border: none !important;
  background: transparent !important;
  overflow: hidden;
}
.lf-rail-magic-btn.is-used,
.lf-rail-magic-btn.is-used .lf-magic-square {
  animation: none !important;
  filter: grayscale(1) brightness(0.55) !important;
  opacity: 0.72 !important;
  box-shadow: none !important;
  border-color: rgba(100, 116, 139, 0.55) !important;
  cursor: default !important;
}
.lf-battle-draw-pile {
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(74, 222, 128, 0.2);
}
.lf-draw-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 6px;
  padding: 0 2px;
}
.lf-draw-stack {
  min-height: 128px;
  max-height: 128px;
  height: 128px;
  width: 100%;
  max-width: 104px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-draw-stack-wrap {
  position: relative;
  width: 96px;
  height: 124px;
}
.lf-draw-stack.is-stacked::before,
.lf-draw-stack.is-stacked::after {
  content: '';
  position: absolute;
  width: 96px;
  height: 124px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(68, 48, 28, 0.95), rgba(38, 26, 14, 0.98));
  border: 1px solid rgba(120, 90, 50, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.lf-draw-stack.is-stacked::before {
  transform: translate(-3px, -4px) rotate(-2deg);
  z-index: 0;
  opacity: 0.72;
}
.lf-draw-stack.is-stacked::after {
  transform: translate(3px, -2px) rotate(1.5deg);
  z-index: 0;
  opacity: 0.55;
}
.lf-draw-card--facedown {
  position: relative;
  z-index: 2;
  left: auto;
  bottom: auto;
  transform: none;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  cursor: default;
  width: 96px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
  box-shadow: none;
}
.lf-draw-card--facedown .lf-varicor-back {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.lf-draw-card--facedown img.lf-varicor-back {
  border: none;
}
.lf-deck-magic {
  position: absolute;
  width: 15px;
  height: 15px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.lf-deck-magic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.lf-deck-eye {
  position: absolute;
  width: 13px;
  height: 13px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
  animation: lf-deck-eye-glow 1.15s ease-in-out infinite alternate;
}
.lf-deck-eye img {
  width: 220%;
  height: 220%;
  object-fit: cover;
  object-position: center center;
  margin: -60%;
  display: block;
}
@keyframes lf-deck-eye-glow {
  from { transform: scale(0.92); }
  to { transform: scale(1.08); }
}
.lf-volley-hub__eyes img.lf-hub-eye--tint {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  animation: none;
  z-index: 7;
}
.lf-hand-card--fly {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55), 0 0 16px rgba(74,222,128,0.35);
}
.lf-draw-card--empty {
  opacity: 0.42;
}
.lf-draw-card--empty .lf-draw-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f8fafc;
  text-shadow: 0 0 8px rgba(0,0,0,0.95), 0 1px 0 #000;
  z-index: 3;
}
.lf-draw-card--empty .lf-varicor-back {
  filter: grayscale(1) brightness(0.55) contrast(1.05);
  opacity: 0.72;
}
.lf-volley-hub__eyes img.lf-hub-spell {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: contain;
  background: radial-gradient(circle, rgba(6, 28, 18, 0.7), rgba(2, 12, 9, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.4);
  filter: none !important;
  animation: lf-hub-spell-glow 1.2s ease-in-out infinite alternate;
}
@keyframes lf-hub-spell-glow {
  from { transform: translate(-50%, -50%) scale(0.92); }
  to { transform: translate(-50%, -50%) scale(1.08); }
}
#lf-start-fight,
#lf-resolve-turn {
  position: relative;
  z-index: 500;
  min-width: 168px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #052e16;
  background: linear-gradient(180deg, #86efac, #22c55e);
  border: 1px solid #bbf7d0;
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.5);
  pointer-events: auto;
}
#lf-start-fight:disabled,
#lf-resolve-turn:disabled {
  opacity: 0.42;
  filter: grayscale(0.35);
  box-shadow: none;
  animation: none;
}
#lf-start-fight.is-play-ready,
#lf-resolve-turn.is-play-ready {
  animation: lf-play-pulse 1.15s ease-in-out infinite;
}
@keyframes lf-play-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.45);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 28px rgba(74, 222, 128, 0.95), 0 0 46px rgba(34, 197, 94, 0.4);
  }
}
.lf-screen[data-screen="result"].is-victory-sequence {
  animation: lf-result-gray-in 1.2s ease forwards;
}
@keyframes lf-result-gray-in {
  0% { filter: none; }
  100% { filter: grayscale(0.55) brightness(0.72); }
}
.lf-result-title.lf-victory-blood {
  position: relative;
  overflow: visible;
}
.lf-result-title.lf-victory-blood::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 100%;
  height: 48px;
  background:
    radial-gradient(ellipse 8px 14px at 15% 0%, rgba(185, 28, 28, 0.95), transparent 70%),
    radial-gradient(ellipse 6px 12px at 45% 0%, rgba(127, 29, 29, 0.9), transparent 70%),
    radial-gradient(ellipse 7px 16px at 72% 0%, rgba(220, 38, 38, 0.85), transparent 70%),
    radial-gradient(ellipse 5px 10px at 88% 0%, rgba(153, 27, 27, 0.8), transparent 70%);
  animation: lf-victory-blood-drip 2s ease-in forwards;
  pointer-events: none;
}
@keyframes lf-victory-blood-drip {
  0% { opacity: 0; transform: translateY(-6px) scaleY(0.2); }
  20% { opacity: 1; }
  100% { opacity: 0.85; transform: translateY(28px) scaleY(1.2); }
}
.lf-magic-icon {
  object-fit: contain !important;
  object-position: center center !important;
}
.lf-battle-draw-pile {
  width: 92px !important;
  min-height: auto !important;
  overflow: visible !important;
}
.lf-hand-card--flip-in {
  animation: lf-card-arrive 0.42s ease-out;
}
@keyframes lf-card-arrive {
  0% { opacity: 0.2; filter: brightness(1.55) drop-shadow(0 0 14px #fff); }
  100% { opacity: 1; }
}
.lf-draw-travel {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  will-change: left, top, width, height;
  transition:
    left 0.32s cubic-bezier(0.22, 0.7, 0.2, 1),
    top 0.32s cubic-bezier(0.22, 0.7, 0.2, 1),
    width 0.32s cubic-bezier(0.22, 0.7, 0.2, 1),
    height 0.32s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.lf-draw-travel--face .lf-draw-travel__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transform: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
}
.lf-draw-travel__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.26s ease, filter 0.18s ease, opacity 0.16s ease;
}
.lf-draw-travel.is-flip .lf-draw-travel__inner {
  transform: rotateY(180deg);
}
.lf-draw-travel__back,
.lf-draw-travel__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
}
.lf-draw-travel__face {
  transform: rotateY(180deg);
}
.lf-draw-travel.is-glow .lf-draw-travel__inner {
  filter: brightness(1.42) drop-shadow(0 0 16px #fff) drop-shadow(0 0 28px rgba(255, 255, 255, 0.7));
}
.lf-draw-travel__orb {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e2e8f0 38%, rgba(255, 255, 255, 0.2) 68%, transparent 76%);
  box-shadow: 0 0 16px #fff, 0 0 34px rgba(255, 255, 255, 0.75);
  transition: opacity 0.14s ease;
}
.lf-draw-travel.is-orb .lf-draw-travel__inner {
  opacity: 0;
}
.lf-draw-travel.is-orb .lf-draw-travel__orb {
  opacity: 1;
}
.lf-draw-stack.is-drawing .lf-draw-card--facedown,
.lf-draw-card--facedown.is-drawing {
  filter: brightness(1.22) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}
.lf-hand-fan.is-receiving {
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.2);
}
.lf-hand-fan.is-receiving .lf-hand-card {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}
.lf-rail-magic-btn,
.lf-board-rail .lf-magic-btn--square {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.lf-magic-square {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto;
}
.lf-board-rail .lf-magic-icon {
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
  margin: 0 auto;
}
.lf-ability-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto;
}
.lf-ability-icon-face {
  margin: 0 auto;
}
.lf-ability-icon-face img {
  width: 88% !important;
  height: 88% !important;
  object-fit: contain !important;
  object-position: center center !important;
}
.lf-draw-card {
  position: relative;
  width: 92px;
  height: 126px;
  margin-top: -100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(2, 14, 10, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
}
.lf-draw-card:first-child { margin-top: 0; }
.lf-draw-card img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  display: block;
}
.lf-draw-card-name {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: #d1fae5;
  padding: 4px;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-draw-card--dragon {
  border-color: rgba(192, 132, 252, 0.55);
}
.lf-draw-card--varicor {
  border-color: rgba(134, 239, 172, 0.35);
  opacity: 0.95;
}
.lf-draw-card--varicor img {
  object-fit: cover;
  object-position: center top;
}
.lf-draw-empty {
  font-size: 9px;
  color: rgba(148, 163, 184, 0.7);
  text-align: center;
  margin: 24px 0 0;
}
.lf-gy-card {
  background: rgba(15, 23, 20, 0.92);
}
.lf-gy-card--fallen {
  position: relative;
  filter: grayscale(0.55) brightness(0.82);
  border-color: rgba(100, 116, 139, 0.55) !important;
  opacity: 0.92;
}
.lf-gy-card--fallen img {
  opacity: 0.88;
  background: rgba(15, 23, 20, 0.9);
}
.lf-gy-card-atk {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(2, 8, 6, 0.85);
  padding: 1px 4px;
  border-radius: 4px;
}
.lf-gy-card-ability {
  position: absolute;
  bottom: 22px;
  left: 4px;
  right: 4px;
  max-width: calc(100% - 8px);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(2, 8, 6, 0.88);
  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
.lf-rail-gap-head {
  position: relative;
  z-index: 3;
  padding: 4px 2px 8px;
  overflow: hidden;
}
.lf-board-rail--right .lf-battle-graveyard {
  margin-top: auto !important;
}

/* Built-in DragonBot Arena (no SL land deed) */
.lf-land-stack--builtin {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(251, 191, 36, 0.12);
}
.lf-land-terrain-img--builtin {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}
.lf-builtin-land-fee {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 12, 9, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
  pointer-events: none;
}
.lf-builtin-land-fee strong {
  font-size: 14px;
  font-weight: 800;
  color: #fde047;
  letter-spacing: 0.03em;
}
.lf-builtin-land-fee span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a7f3d0;
}
.lf-land-bonus-grid--builtin {
  display: block !important;
  width: 100%;
  padding: 0 4px;
}
.lf-builtin-land-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.45;
  color: #d1fae5;
  background: rgba(6, 28, 18, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  text-align: center;
}
.lf-builtin-land-note strong {
  color: #fde047;
}
.lf-screen[data-screen="intro"] .lead {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(167, 243, 208, 0.88);
  max-width: 52ch;
  margin: 0 auto 12px;
}

/* Compact land strip on fighter entry screen */
.lf-land-strip {
  max-width: 920px;
  margin: 0 auto 10px;
  padding: 8px 10px 10px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 28, 18, 0.72), rgba(2, 12, 8, 0.78));
  box-shadow:
    inset 0 0 16px rgba(74, 222, 128, 0.08),
    0 0 20px rgba(74, 222, 128, 0.12);
  animation: lf-strip-glow 3s ease-in-out infinite;
  position: relative;
}
.lf-land-strip.is-map-scan {
  z-index: 30;
  animation: none;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow:
    inset 0 0 24px rgba(251, 191, 36, 0.1),
    0 0 32px rgba(251, 191, 36, 0.22);
  min-height: min(68vh, 560px);
  padding-bottom: 8px;
}
.lf-land-strip.is-map-scan .lf-land-strip__head {
  flex-shrink: 0;
}
.lf-land-strip.is-map-scan .lf-land-strip__row--dual,
.lf-land-strip.is-map-scan .lf-land-strip__bonus,
.lf-land-strip.is-map-scan .lf-land-flip,
.lf-land-strip.is-map-scan .lf-land-outcome,
.lf-land-strip.is-map-scan .lf-raid-workers,
.lf-land-strip.is-map-scan #lf-raid-loading {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.lf-land-strip.is-map-scan .lf-land-strip__row--dual {
  filter: none;
}
.lf-land-strip__center--own.is-scan-focus .lf-land-strip__stage,
.lf-land-strip__center--raid.is-scan-focus .lf-land-strip__stage {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.45);
  transform: scale(1.04);
}
.lf-land-strip__center--own.is-scan-focus,
.lf-land-strip__center--raid.is-scan-focus {
  opacity: 1 !important;
  filter: none !important;
}

@keyframes lf-strip-glow {
  0%, 100% { border-color: rgba(74, 222, 128, 0.28); box-shadow: inset 0 0 12px rgba(74, 222, 128, 0.06), 0 0 16px rgba(74, 222, 128, 0.1); }
  50% { border-color: rgba(74, 222, 128, 0.48); box-shadow: inset 0 0 20px rgba(74, 222, 128, 0.12), 0 0 28px rgba(74, 222, 128, 0.2); }
}
.lf-land-strip__head {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86efac;
  text-align: center;
  margin-bottom: 6px;
}
.lf-land-strip__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  gap: 8px;
  align-items: center;
}
.lf-land-strip__row--dual,
.lf-land-strip__row--tri {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  justify-content: center;
  gap: 18px;
  overflow: visible;
}
.lf-land-strip__raid-hold {
  display: none !important;
}
.lf-land-strip__end .lf-land-strip__thumb img {
  width: 100%;
  height: min(32vh, 260px);
  object-fit: cover;
  border-radius: 8px;
}
.lf-land-strip__end .lf-land-strip__thumb-name,
.lf-land-strip__end .lf-land-strip__thumb-bonus {
  font-size: 13px;
}
.lf-land-strip__end .lf-land-strip__thumb-fee {
  font-size: 12px;
}
.lf-land-strip__row--dual.is-flip-settled .lf-land-strip__vs {
  animation: none;
  opacity: 0.55;
  font-size: 18px;
  padding: 4px 10px;
}
.lf-land-strip__row--dual.is-flip-duel .lf-land-strip__stage {
  height: min(28vh, 220px);
  max-width: none;
  width: 100%;
}
.lf-land-strip__vs {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 6;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #fde047;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.95), 0 0 32px rgba(74, 222, 128, 0.55);
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(251, 191, 36, 0.75);
  background: rgba(20, 15, 5, 0.92);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.45);
  pointer-events: none;
  animation: lf-vs-pulse 0.7s ease-in-out infinite;
}
.lf-land-strip__vs[hidden] {
  display: none !important;
}
@keyframes lf-vs-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.92; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
.lf-land-strip__center.is-flip-highlight .lf-land-strip__stage {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.42);
  transform: scale(1.04);
}
.lf-land-strip__center-tag {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86efac;
  text-align: center;
  margin-bottom: 2px;
}
.lf-land-strip__center-tag--raid {
  color: #fde047;
}
.lf-land-strip__center--raid.is-locked {
  opacity: 0.45;
}
.lf-land-strip__center--raid.is-locked .lf-land-strip__stage {
  filter: grayscale(0.65);
  border-style: dashed;
}
.lf-land-strip__center--raid.is-active .lf-land-strip__stage--raid {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.25);
}
.lf-land-strip__center--raid.is-done .lf-land-strip__center-tag--raid {
  color: #4ade80;
}
.lf-land-strip__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.lf-land-strip__stage {
  box-sizing: border-box;
  flex: 0 0 auto;
  justify-self: center;
  width: 100%;
  max-width: none;
  height: min(28vh, 220px);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(74, 222, 128, 0.45);
  background: #0a1628;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.15);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.lf-land-strip__stage--spin {
  transform: scale(1.03);
  border-color: rgba(251, 191, 36, 0.65);
}
.lf-land-strip__frame-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.lf-land-strip__frame-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #ecfdf5;
  padding: 4px;
  text-align: center;
}
.lf-land-strip__frame-fallback--map {
  color: #fde047;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(20, 15, 5, 0.65);
}
.lf-land-strip__label {
  font-size: 9px;
  font-weight: 700;
  color: #fde047;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lf-land-strip__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  background: rgba(2, 8, 6, 0.65);
}
.lf-land-strip__thumb--premium {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.12);
}
.lf-land-strip__thumb img {
  width: 100%;
  height: min(22vh, 180px);
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
.lf-land-strip__thumb-name {
  font-size: 8px;
  font-weight: 800;
  color: #d1fae5;
  text-align: center;
  line-height: 1.2;
}
.lf-land-strip__thumb-bonus {
  font-size: 8px;
  font-weight: 800;
  color: #4ade80;
}
.lf-land-strip__thumb-fee {
  font-size: 7px;
  color: #94a3b8;
  text-align: center;
}
.lf-land-strip__thumb-fee--free {
  color: #86efac;
}
.lf-land-strip__bonus {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(74, 222, 128, 0.18);
}
.lf-land-strip__bonus-head {
  text-align: center;
  margin-bottom: 4px;
}
.lf-land-strip__bonus-head.is-penalty .lf-land-strip__bonus-title {
  color: #fca5a5;
}
.lf-land-strip__bonus-head.is-bonus .lf-land-strip__bonus-title {
  color: #fde047;
}
.lf-land-strip__bonus-title {
  font-size: 10px;
  font-weight: 800;
  color: #fde047;
}
.lf-land-strip__bonus-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.lf-land-strip__bonus-chip {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
}
.lf-land-strip__bonus-chip.is-owned {
  border-color: rgba(74, 222, 128, 0.55);
  color: #86efac;
  background: rgba(6, 46, 22, 0.55);
}
.lf-land-strip__bonus-note {
  margin: 4px 0 0;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(167, 243, 208, 0.85);
  text-align: center;
}
@media (max-width: 640px) {
  .lf-land-strip__row {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
  }
  .lf-land-strip__row--dual {
    grid-template-columns: 56px 100px 100px 56px;
    gap: 4px 6px;
  }
  .lf-land-strip__thumb img {
    width: 60px;
    height: 34px;
  }
  .lf-land-strip__stage {
    max-width: 100px;
    width: 100px;
    height: 48px;
  }
}

.lf-load-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 1rem;
}

.lf-load-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(74, 222, 128, 0.15);
  border-top-color: #4ade80;
  border-radius: 50%;
  animation: lf-spin 0.75s linear infinite;
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

.lf-load-msg {
  font-size: 0.85rem;
  color: #a7f3c8;
  letter-spacing: 0.04em;
}

@keyframes lf-spin {
  to { transform: rotate(360deg); }
}

.lf-land-strip__side {
  position: relative;
}

.lf-land-strip__side-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) scale(0.96);
  z-index: 30;
  min-width: 160px;
  max-width: 200px;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: rgba(4, 14, 9, 0.96);
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-size: 0.62rem;
  line-height: 1.35;
  color: #d1fae5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

.lf-land-strip__side-tip strong {
  color: #4ade80;
  display: block;
  margin-bottom: 0.15rem;
}

.lf-land-strip__side-tip-sub {
  display: block;
  margin-top: 0.2rem;
  color: rgba(167, 243, 208, 0.82);
  font-size: 0.58rem;
}

.lf-land-strip__side:hover .lf-land-strip__side-tip,
.lf-land-strip__side:focus-within .lf-land-strip__side-tip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.lf-land-strip__result {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}

.lf-land-strip__result.is-win {
  color: #4ade80;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
}

.lf-land-strip__result.is-lose {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.35);
}

.lf-land-strip__post {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn--sm {
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

/* Dual land strip — cross-region raid row */
.lf-land-strip__raid {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(74, 222, 128, 0.2);
}
.lf-land-strip__head--raid {
  color: #fde047;
  margin-bottom: 4px;
}
.lf-land-strip__row--raid {
  opacity: 1;
  transition: opacity 0.35s ease;
}
.lf-land-strip__raid.is-disabled {
  opacity: 0.45;
}
.lf-land-strip__raid.is-disabled .lf-land-strip__stage {
  filter: grayscale(0.7);
}
.lf-land-strip__side--locked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-style: dashed;
  opacity: 0.55;
}
.lf-land-strip__lock-label {
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  color: rgba(134, 239, 172, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lf-land-strip.is-expanded {
  transform: scale(1.02);
  z-index: 20;
  position: relative;
}
.lf-land-strip.is-flip-active {
  z-index: 40;
  min-height: 280px;
  overflow: visible !important;
  padding-bottom: 18px;
}
.lf-land-strip.is-flip-active .lf-land-flip {
  position: absolute;
  inset: 8px 6px 6px;
  z-index: 80;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: lf-flip-enter 0.28s ease-out both;
}
.lf-land-strip.is-flip-active .lf-land-flip__img {
  height: 132px;
}
.lf-land-flip__card.is-flipping .lf-land-flip__card-inner {
  animation: lf-card-flip-pulse 0.34s ease-in-out;
}
@keyframes lf-card-flip-pulse {
  0% { transform: rotateY(0deg) scale(1); }
  40% { transform: rotateY(110deg) scale(1.1); }
  100% { transform: rotateY(0deg) scale(1.05); }
}

/* Land flip duel — home advantage overlay */
.lf-land-flip {
  position: absolute;
  inset: 28px 8px 8px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-land-flip[hidden] {
  display: none !important;
}
.lf-land-flip.is-collapsing {
  animation: lf-flip-exit 0.45s ease-in both;
}
@keyframes lf-flip-enter {
  from { opacity: 0; transform: scale(0.88) translateY(12px); max-height: 0; }
  to { opacity: 1; transform: scale(1) translateY(0); max-height: 280px; }
}
@keyframes lf-flip-exit {
  from { opacity: 1; transform: scale(1); max-height: 280px; }
  to { opacity: 0; transform: scale(0.92); max-height: 0; }
}
.lf-land-flip__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(250, 204, 21, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(6, 28, 18, 0.95), rgba(2, 12, 8, 0.98));
  border: 2px solid rgba(251, 191, 36, 0.55);
  border-radius: 14px;
  box-shadow:
    0 0 40px rgba(251, 191, 36, 0.25),
    inset 0 0 30px rgba(74, 222, 128, 0.08);
}
.lf-land-flip__arena {
  position: relative;
  z-index: 1;
  padding: 12px 10px 14px;
}
.lf-land-flip__title {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fde047;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}
.lf-land-flip__cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lf-land-flip__vs {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #fde047;
  text-shadow:
    0 0 18px #facc15,
    0 0 36px rgba(250, 204, 21, 0.95),
    0 0 64px rgba(74, 222, 128, 0.55);
  flex-shrink: 0;
  animation: lf-vs-big-pulse 0.85s ease-in-out infinite;
}
@keyframes lf-vs-big-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.12); filter: brightness(1.25); }
}
.lf-land-flip__card {
  flex: 1;
  max-width: 220px;
  perspective: 800px;
}
.lf-land-flip__card-inner {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(74, 222, 128, 0.45);
  background: #0a1628;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  transform-style: preserve-3d;
}
.lf-land-flip__card--foe .lf-land-flip__card-inner {
  border-color: rgba(248, 113, 113, 0.5);
}
.lf-land-flip__card.is-highlight .lf-land-flip__card-inner {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.55);
  border-color: rgba(251, 191, 36, 0.85);
}
.lf-land-flip__card.is-flipping .lf-land-flip__card-inner {
  animation: lf-card-flip-pulse 0.34s ease-in-out;
}
@keyframes lf-card-flip-pulse {
  0% { transform: rotateY(0deg) scale(1); }
  40% { transform: rotateY(110deg) scale(1.1); }
  100% { transform: rotateY(0deg) scale(1.05); }
}
.lf-land-flip__card.is-winner .lf-land-flip__card-inner {
  border-color: rgba(74, 222, 128, 0.95);
  box-shadow: 0 0 32px rgba(74, 222, 128, 0.65);
  animation: lf-winner-glow 0.8s ease-in-out infinite alternate;
}
.lf-land-flip__card--foe.is-winner .lf-land-flip__card-inner {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 32px rgba(248, 113, 113, 0.55);
}
@keyframes lf-winner-glow {
  from { box-shadow: 0 0 20px rgba(74, 222, 128, 0.4); }
  to { box-shadow: 0 0 36px rgba(74, 222, 128, 0.75); }
}
.lf-land-flip__img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  display: block;
}
.lf-land-flip__name {
  display: block;
  padding: 4px 6px;
  font-size: 8px;
  font-weight: 700;
  color: #ecfdf5;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.45);
}
.lf-land-flip__result {
  margin-top: 10px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #86efac;
  line-height: 1.45;
}

/* Opponent worker cards row (5 across) */
.lf-raid-workers {
  margin-top: 6px;
  padding: 8px 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: linear-gradient(180deg, rgba(40, 10, 10, 0.55), rgba(10, 5, 5, 0.65));
  animation: lf-workers-in 0.28s ease-out both;
}
@keyframes lf-workers-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lf-raid-workers__head {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fca5a5;
  text-align: center;
  margin-bottom: 6px;
}
.lf-raid-workers__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}
.lf-raid-worker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(100, 116, 139, 0.4);
  background: rgba(2, 8, 6, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
}
.lf-raid-worker-card.is-active {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.35);
  animation: lf-worker-pop 0.28s ease-out both;
}
.lf-raid-worker-card.is-dragon {
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
}
.lf-raid-worker-card.is-barricade {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}
.lf-raid-worker-card,
.lf-raid-worker-card.is-active,
.lf-raid-worker-card.is-greyed {
  cursor: pointer;
}
.lf-raid-worker-card__art {
  position: relative;
}
.lf-raid-worker-card__stack {
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 16px;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  color: #0b1220;
  background: #fde047;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.65);
}
@keyframes lf-worker-pop {
  0% { transform: scale(0.82); opacity: 0; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}
.lf-raid-worker-card__art {
  width: 100%;
  max-width: 52px;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  max-height: 70px;
  border-radius: 4px;
  overflow: hidden;
  background: #0a1628;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}
.lf-raid-worker-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.lf-raid-worker-card__label {
  font-size: 6px;
  font-weight: 700;
  color: #fecaca;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1px;
}
.lf-raid-worker-card__hp {
  font-size: 6px;
  font-weight: 800;
  color: #4ade80;
  line-height: 1.1;
  text-align: center;
}
.lf-raid-worker-card.is-empty .lf-raid-worker-card__hp {
  color: rgba(134, 239, 172, 0.35);
}

@media (max-width: 520px) {
  .lf-land-flip__cards { gap: 6px; }
  .lf-land-flip__img { height: 48px; }
  .lf-raid-workers__row { gap: 4px; }
}

/* Raid loading overlay */
.lf-raid-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(20, 15, 5, 0.75);
  animation: lf-raid-load-pulse 1.2s ease-in-out infinite;
}
.lf-raid-loading[hidden] {
  display: none !important;
}
@keyframes lf-raid-load-pulse {
  0%, 100% { border-color: rgba(251, 191, 36, 0.35); box-shadow: 0 0 8px rgba(251, 191, 36, 0.12); }
  50% { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 0 16px rgba(251, 191, 36, 0.28); }
}
.lf-raid-loading__spin {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(251, 191, 36, 0.25);
  border-top-color: #fde047;
  border-radius: 50%;
  animation: lf-spin 0.65s linear infinite;
  flex-shrink: 0;
}
.lf-raid-loading__msg {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: #fde047;
  letter-spacing: 0.04em;
}

/* Praetoria map scanner overlay — full battle-land takeover */
.lf-praetoria-map {
  position: absolute;
  inset: 30px 6px 6px;
  z-index: 60;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  animation: lf-praetoria-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lf-praetoria-map__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde047;
  background: rgba(4, 12, 10, 0.82);
}
.lf-praetoria-map.is-map-ready .lf-praetoria-map__loading {
  display: none;
}
.lf-praetoria-map:not(.is-map-ready) .lf-praetoria-map__base-img-html,
.lf-praetoria-map:not(.is-map-ready) .lf-praetoria-map__svg-wrap {
  opacity: 0;
}
.lf-praetoria-map.is-map-ready .lf-praetoria-map__base-img-html,
.lf-praetoria-map.is-map-ready .lf-praetoria-map__svg-wrap {
  opacity: 1;
  transition: opacity 0.25s ease;
}
.lf-praetoria-map[hidden] {
  display: none !important;
}
.lf-praetoria-map.is-collapsing {
  animation: lf-praetoria-exit 0.2s ease-in both;
}
@keyframes lf-praetoria-enter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes lf-praetoria-exit {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95) translateY(8px); }
}
.lf-praetoria-map__shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 8px 6px;
  border-radius: 10px;
  border: 2px solid rgba(251, 191, 36, 0.72);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(250, 204, 21, 0.12), transparent 72%),
    linear-gradient(180deg, rgba(3, 12, 10, 0.98), rgba(2, 8, 7, 0.99));
  box-shadow:
    0 0 40px rgba(251, 191, 36, 0.32),
    inset 0 0 32px rgba(74, 222, 128, 0.06);
  min-height: 0;
  width: 100%;
}
.lf-praetoria-map__msg {
  margin: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde047;
  flex-shrink: 0;
}
.lf-praetoria-map__sub {
  margin: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(134, 239, 172, 0.9);
  flex-shrink: 0;
}
.lf-praetoria-map__canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: #040c14;
  position: relative;
  display: block;
}
.lf-praetoria-map__base-img-html {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #040c14;
}
.lf-praetoria-map__svg-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lf-praetoria-map__svg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.lf-praetoria-map__base-img {
  pointer-events: none;
}
.lf-praetoria-map__region {
  transition: opacity 0.14s ease, filter 0.14s ease;
  mix-blend-mode: screen;
}
.lf-praetoria-map__region.is-active {
  filter: url(#lf-praetoria-glow);
  animation: lf-praetoria-pulse 0.55s ease-in-out infinite alternate;
}
.lf-praetoria-map__region.is-locked {
  filter: url(#lf-praetoria-glow);
  animation: none;
}
@keyframes lf-praetoria-pulse {
  from { opacity: 0.32; }
  to { opacity: 0.58; }
}
.lf-praetoria-map__dots {
  pointer-events: none;
}
.lf-praetoria-map__dot circle {
  fill: #0b1f38;
  stroke: #93c5fd;
  stroke-width: 2.4;
  opacity: 0.98;
}
.lf-praetoria-map__dot-label {
  fill: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  font-family: system-ui, sans-serif;
  paint-order: stroke;
  stroke: rgba(8, 18, 32, 0.92);
  stroke-width: 3.5px;
  pointer-events: none;
}
.lf-praetoria-map.is-dot-scan .lf-praetoria-map__dot circle,
.lf-land-strip.is-map-scan .lf-praetoria-map__dot circle {
  opacity: 0.96;
}
.lf-praetoria-map__dot.is-active circle {
  fill: #854d0e;
  stroke: #fde047;
  opacity: 1;
}
.lf-praetoria-map__dot.is-locked circle {
  fill: #14532d;
  stroke: #4ade80;
  opacity: 1;
}
.lf-praetoria-map__legend {
  display: none;
}
.lf-praetoria-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #cbd5e1;
}
.lf-praetoria-map__legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}
.lf-praetoria-map__scanner {
  pointer-events: none;
  transition: transform 0.09s ease-out, opacity 0.12s ease;
}
.lf-praetoria-map__scanner-ring {
  fill: rgba(253, 224, 71, 0.18);
  stroke: #fde047;
  stroke-width: 3;
  filter: url(#lf-praetoria-glow);
  animation: lf-praetoria-scanner-ring 0.42s ease-in-out infinite alternate;
}
.lf-praetoria-map__scanner-core {
  fill: #fde047;
  stroke: #fef08a;
  stroke-width: 2;
  filter: url(#lf-praetoria-glow);
  animation: lf-praetoria-scanner-core 0.35s ease-in-out infinite alternate;
}
.lf-praetoria-map__scanner.is-locked .lf-praetoria-map__scanner-ring {
  fill: rgba(34, 197, 94, 0.22);
  stroke: #4ade80;
  animation: none;
  r: 18;
}
.lf-praetoria-map__scanner.is-locked .lf-praetoria-map__scanner-core {
  fill: #22c55e;
  stroke: #bbf7d0;
  animation: none;
  r: 10;
}
.lf-praetoria-map__scanner-label {
  fill: #fde047;
  font-size: 20px;
  font-weight: 800;
  font-family: system-ui, sans-serif;
  paint-order: stroke;
  stroke: rgba(6, 16, 12, 0.92);
  stroke-width: 5px;
  pointer-events: none;
}
.lf-praetoria-map__scanner.is-locked .lf-praetoria-map__scanner-label {
  fill: #bbf7d0;
}
@keyframes lf-praetoria-scanner-ring {
  from { r: 12; opacity: 0.75; }
  to { r: 17; opacity: 1; }
}
@keyframes lf-praetoria-scanner-core {
  from { r: 7; }
  to { r: 9; }
}

/* Flip outcome banner — hidden (outcome uses header msg + strip result) */
.lf-land-outcome,
.lf-land-outcome[hidden],
.lf-land-outcome.is-own-win,
.lf-land-outcome.is-foe-win {
  display: none !important;
}
.lf-land-strip__center--own.is-flip-winner,
.lf-land-strip__center--raid.is-flip-winner {
  z-index: 5;
  transform: scale(1.06);
}
.lf-land-strip__center--own.is-flip-winner .lf-land-strip__stage,
.lf-land-strip__center--raid.is-flip-winner .lf-land-strip__stage {
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(253, 224, 71, 0.55), 0 0 28px rgba(74, 222, 128, 0.35);
}
.lf-land-strip__center--own.is-flip-winner .lf-land-strip__center-tag::after,
.lf-land-strip__center--raid.is-flip-winner .lf-land-strip__center-tag::after {
  content: ' · hosts';
  color: #fde047;
  font-weight: 800;
}
.lf-land-strip__center--own.is-flip-loser,
.lf-land-strip__center--raid.is-flip-loser {
  opacity: 0.34;
  filter: grayscale(1) brightness(0.7);
  transform: rotate(-8deg) scale(0.9);
  transform-origin: 50% 40%;
  pointer-events: none;
}
.lf-land-strip__center--own.is-flip-loser .lf-land-strip__center-tag,
.lf-land-strip__center--raid.is-flip-loser .lf-land-strip__center-tag {
  color: rgba(148, 163, 184, 0.85);
}
.lf-land-strip__center--own.is-flip-loser .lf-land-strip__center-tag::after,
.lf-land-strip__center--raid.is-flip-loser .lf-land-strip__center-tag::after {
  content: ' · lost';
  color: rgba(148, 163, 184, 0.9);
}
.lf-land-strip__center--own.is-flip-loser .lf-land-strip__stage,
.lf-land-strip__center--raid.is-flip-loser .lf-land-strip__stage {
  border-color: rgba(100, 116, 139, 0.55);
  box-shadow: none;
}
.lf-land-flip__card.is-loser .lf-land-flip__card-inner {
  opacity: 0.38;
  filter: grayscale(0.9);
  border-color: rgba(100, 116, 139, 0.45);
  box-shadow: none;
}
.lf-land-flip.is-settled {
  margin-top: 6px;
  animation: none;
}
.lf-land-flip.is-settled .lf-land-flip__backdrop {
  border-color: rgba(74, 222, 128, 0.35);
}
.lf-land-flip.is-settled.is-foe-win .lf-land-flip__backdrop {
  border-color: rgba(248, 113, 113, 0.4);
}

/* Worker Varicor cards — energy beam into DragonBot */
.lf-worker-beam-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12000;
}
.lf-worker-beam-line {
  position: absolute;
  height: 4px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.15), rgba(74, 222, 128, 0.95), rgba(250, 204, 21, 0.85));
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.75), 0 0 28px rgba(248, 113, 113, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lf-worker-beam-line.is-active {
  opacity: 1;
  animation: lf-worker-beam-pulse 0.65s ease-in-out infinite;
}
@keyframes lf-worker-beam-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}
.lf-worker-beam-fly {
  position: fixed;
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.55);
  transition: left 0.72s cubic-bezier(0.22, 0.85, 0.28, 1), top 0.72s cubic-bezier(0.22, 0.85, 0.28, 1), transform 0.72s ease, opacity 0.72s ease;
  z-index: 12001;
}
.lf-worker-beam-fly.is-flying {
  transform: scale(0.55) rotate(-8deg);
  opacity: 0.85;
}
.lf-raid-worker-card.is-absorbing {
  animation: lf-worker-absorb 0.75s ease-out both;
}
.lf-raid-worker-card.is-absorbed {
  opacity: 0.62;
  filter: grayscale(0.25);
  border-color: rgba(74, 222, 128, 0.45);
}
.lf-vs-card.is-hp-pulse {
  animation: lf-dragonbot-hp-pulse 0.45s ease-out;
}
@keyframes lf-worker-absorb {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(248, 113, 113, 0.35); }
  40% { transform: scale(1.06); box-shadow: 0 0 22px rgba(74, 222, 128, 0.65); }
  100% { transform: scale(0.92); opacity: 0.35; }
}
@keyframes lf-dragonbot-hp-pulse {
  0% { box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { box-shadow: 0 0 28px rgba(74, 222, 128, 0.85); transform: scale(1.04); }
  100% { box-shadow: 0 0 12px rgba(74, 222, 128, 0.35); transform: scale(1); }
}
.lf-raid-worker-card__art img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Magic heal: element icon flies into the HP bar, flashes, becomes a heart */
.lf-magic-heal-fly {
  position: fixed;
  width: 46px;
  height: 46px;
  z-index: 100000;
  pointer-events: none;
  margin: 0;
  transform: scale(0.92) rotate(-12deg);
  transition:
    left 0.5s cubic-bezier(0.22, 0.9, 0.18, 1),
    top 0.5s cubic-bezier(0.22, 0.9, 0.18, 1),
    transform 0.5s cubic-bezier(0.22, 0.9, 0.18, 1),
    filter 0.28s ease;
  filter: drop-shadow(0 0 10px var(--lf-magic-color, #4ade80));
}
.lf-magic-heal-fly__icon,
.lf-magic-heal-fly__heart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.lf-magic-heal-fly__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lf-magic-heal-fly__heart {
  opacity: 0;
  transform: scale(0.35);
  font-size: 34px;
  line-height: 1;
  color: #4ade80;
  text-shadow:
    0 0 10px #fff,
    0 0 16px var(--lf-magic-color, #4ade80),
    0 0 28px #4ade80;
}
.lf-magic-heal-fly.is-flying {
  transform: scale(1.18) rotate(8deg);
}
.lf-magic-heal-fly.is-impact {
  transform: scale(1.62);
  filter:
    drop-shadow(0 0 16px #fff)
    drop-shadow(0 0 26px var(--lf-magic-color, #4ade80));
}
.lf-magic-heal-fly.is-heart .lf-magic-heal-fly__icon {
  opacity: 0;
  transform: scale(0.25);
}
.lf-magic-heal-fly.is-heart .lf-magic-heal-fly__heart {
  opacity: 1;
  transform: scale(1.18);
  animation: lf-magic-heart-pop 0.65s ease-out;
}
.lf-hp.is-magic-heal {
  overflow: visible;
  animation: lf-magic-bar-flash 0.72s ease-out;
  box-shadow:
    0 0 0 2px var(--lf-magic-color, #4ade80),
    0 0 18px var(--lf-magic-color, #4ade80),
    0 0 34px rgba(74, 222, 128, 0.7);
}
.lf-hp.is-magic-heal .lf-hp-seg i,
.lf-hp.is-magic-heal .lf-hp-fill {
  transition: width 0.45s cubic-bezier(0.22, 0.9, 0.2, 1);
  filter: brightness(1.5) saturate(1.35);
}
.lf-magic-heal-pop {
  position: fixed;
  z-index: 100001;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #bbf7d0;
  text-shadow:
    0 0 8px #fff,
    0 0 14px var(--lf-magic-color, #4ade80),
    0 0 22px #4ade80;
  pointer-events: none;
  transform: translate(-50%, 0);
  animation: lf-magic-plus-rise 1.1s ease-out forwards;
}
.lf-magic-heal-spark {
  position: fixed;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  z-index: 100001;
  pointer-events: none;
  background: var(--lf-magic-color, #4ade80);
  box-shadow: 0 0 8px var(--lf-magic-color, #4ade80), 0 0 14px #fff;
  animation: lf-magic-spark 0.62s ease-out forwards;
}
@keyframes lf-magic-bar-flash {
  0% { filter: brightness(1); }
  18% { filter: brightness(2.15); }
  100% { filter: brightness(1); }
}
@keyframes lf-magic-plus-rise {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
  16% { opacity: 1; transform: translate(-50%, -6px) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}
@keyframes lf-magic-heart-pop {
  0% { transform: scale(0.35); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1.12); }
}
@keyframes lf-magic-spark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx, 20px), var(--sy, -20px)) scale(0.2); }
}

/* Restore film-gate plate + hand at the bottom of the screen */
.lf-panel.lf-panel--battle-full {
  height: 100dvh !important;
  max-height: 100dvh !important;
  box-sizing: border-box !important;
  padding-bottom: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-header {
  margin-bottom: 4px !important;
}
.lf-panel.lf-panel--battle-full .lf-body {
  height: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 4px 8px 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-wrap--cards {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  justify-content: flex-start !important;
  gap: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-board {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  align-items: stretch !important;
  padding-bottom: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-board-rail,
.lf-panel.lf-panel--battle-full .lf-board-rail--side {
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-stage {
  --lf-plate-max-h: min(58vh, 640px);
  --lf-plate-max-w: min(1138px, calc(100vw - 280px));
  max-height: var(--lf-plate-max-h) !important;
  min-height: 0 !important;
  margin-top: 6px !important;
}
.lf-panel.lf-panel--battle-full .lf-card-battle-ui {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
  overflow: visible !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-actions {
  position: relative !important;
  z-index: 200 !important;
  flex: 0 0 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-fan,
.lf-hand-fan {
  overflow: visible !important;
  min-height: 148px !important;
  max-height: none !important;
  padding: 8px 1% 12px !important;
}
.lf-panel.lf-panel--battle-full .lf-hand-card,
.lf-panel.lf-panel--battle-full .lf-hand-card.is-playable {
  transform-origin: 50% 100% !important;
}
.lf-panel.lf-panel--battle-full .lf-battle-draw-pile,
.lf-battle-draw-pile {
  padding-bottom: 8px !important;
  margin-bottom: 4px !important;
}
.lf-panel.lf-panel--battle-full .lf-draw-stack,
.lf-draw-stack {
  align-items: flex-start !important;
  padding-bottom: 6px;
}

/* DragonBot fight hand must stay one long playable fan, never a second row. */
.lf-hand-fan,
.lf-hand-fan.lf-hand-fan--two-rows,
.lf-panel.lf-panel--battle-full .lf-hand-fan,
.lf-panel.lf-panel--battle-full .lf-hand-fan.lf-hand-fan--two-rows {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: center !important;
  min-height: 168px !important;
  padding-bottom: 14px !important;
}

.lf-hand-fan__row {
  flex: 0 1 auto !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: center !important;
  max-width: 100% !important;
}

.lf-hand-fan.lf-hand-fan--two-rows .lf-hand-card {
  width: 104px !important;
  height: 150px !important;
}

/* Graveyard: overlapping full mini-cards so the top face is complete */
.lf-rail-volley-gap--right,
.lf-rail-volley-gap--right .lf-rail-gap-stack,
#lf-battle-graveyard {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding-bottom: 4px !important;
}
.lf-gy-stack,
.lf-panel.lf-panel--battle-full .lf-gy-stack {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 92px !important;
  min-height: 124px !important;
  max-height: 136px !important;
  height: 136px !important;
  overflow: hidden !important;
  padding: 0 !important;
}
.lf-gy-card,
.lf-rail-gap-stack .lf-gy-card,
.lf-gy-card:first-child {
  width: 86px !important;
  height: 124px !important;
  min-height: 124px !important;
  max-height: 124px !important;
  margin: 0 auto !important;
  margin-top: -121px !important;
  flex: 0 0 124px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45) !important;
}
.lf-gy-card:first-child {
  margin-top: 0 !important;
}
.lf-gy-card--top,
.lf-gy-card:last-child,
.lf-rail-gap-stack .lf-gy-card:last-child {
  height: 124px !important;
  min-height: 124px !important;
  max-height: 124px !important;
  flex: 0 0 124px !important;
  border-radius: 8px !important;
  z-index: 4 !important;
}
.lf-gy-card img,
.lf-gy-card--fallen img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}
.lf-gy-card--edge .lf-gy-card-name,
.lf-gy-card--edge .lf-gy-card-atk,
.lf-gy-card--edge .lf-gy-card-ability,
.lf-gy-card:not(:last-child) .lf-gy-card-name,
.lf-gy-card:not(:last-child) .lf-gy-card-atk,
.lf-gy-card:not(:last-child) .lf-gy-card-ability {
  display: none !important;
}
.lf-gy-stack:hover .lf-gy-card,
.lf-gy-stack:hover .lf-gy-card:first-child {
  transform: none !important;
}

@media (max-width: 640px) {
  .lf-panel.lf-panel--battle-full .lf-battle-board {
    grid-template-columns: 58px minmax(0, 1fr) 58px !important;
    gap: 4px !important;
  }
  .lf-panel.lf-panel--battle-full .lf-board-rail,
  .lf-panel.lf-panel--battle-full .lf-board-rail--side {
    min-width: 52px !important;
    max-width: 58px !important;
    padding: 6px 2px 8px !important;
  }
}

/* Final arena polish: one playable hand row, symmetric land roll, smoother video plate. */
.lf-panel.lf-panel--battle-full .lf-hand-fan,
.lf-hand-fan {
  display: block !important;
  position: relative !important;
  gap: 0 !important;
  width: 100% !important;
  height: var(--hand-fan-h, 188px) !important;
  min-height: var(--hand-fan-h, 188px) !important;
  max-height: var(--hand-fan-h, 188px) !important;
  overflow: visible !important;
  padding: 8px 2vw 14px !important;
  transform: translateZ(0);
}

.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card,
.lf-hand-fan > .lf-hand-card {
  position: absolute !important;
  left: 50% !important;
  bottom: 14px !important;
  flex: none !important;
  width: var(--hand-card-w, 100px) !important;
  min-width: var(--hand-card-w, 100px) !important;
  max-width: var(--hand-card-w, 100px) !important;
  height: var(--hand-card-h, 148px) !important;
  min-height: var(--hand-card-h, 148px) !important;
  margin: 0 !important;
  transform: translateX(calc(var(--fan-x, 0px) - 50%)) translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg)) !important;
  transform-origin: 50% 112% !important;
}

.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card:hover,
.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card:focus-visible,
.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card.is-playable:hover,
.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card.is-playable:focus-visible,
.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card.is-lifted,
.lf-hand-fan.lf-hand-fan--single-line > .lf-hand-card.is-playable.is-lifted {
  /* Keep exact fan seat — no translate change on hover. */
  transform: translateX(calc(var(--fan-x, 0px) - 50%)) translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg)) !important;
  z-index: 120 !important;
}

.lf-hand-fan__row {
  display: contents !important;
}

.lf-land-strip__row--dual {
  width: 100% !important;
  position: relative !important;
  grid-template-columns: minmax(96px, 1fr) minmax(190px, 270px) minmax(190px, 270px) minmax(96px, 1fr) !important;
  justify-content: stretch !important;
  align-items: center !important;
  gap: 10px clamp(34px, 6vw, 64px) !important;
  overflow: visible !important;
}
.lf-land-strip__row--tri {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.35fr) minmax(180px, 1fr) !important;
  gap: 20px !important;
  align-items: stretch !important;
}

.lf-land-strip__row--dual.is-flip-duel .lf-land-strip__stage {
  width: 100% !important;
  max-width: 270px !important;
  height: 74px !important;
}

.lf-land-strip__center.is-flip-highlight .lf-land-strip__stage {
  animation: lf-land-roll-flash 0.18s ease-out, lf-land-roll-transparent 0.32s ease-in-out;
}

.lf-land-strip__row--dual.is-flip-scrubbing .lf-land-strip__center {
  opacity: 0.42;
  filter: saturate(0.55) brightness(0.62);
  transition: opacity 0.1s ease, filter 0.1s ease, transform 0.1s ease;
}

.lf-land-strip__row--dual.is-flip-scrubbing .lf-land-strip__center.is-flip-highlight {
  opacity: 1;
  filter: saturate(1.45) brightness(1.32);
  transform: scale(1.05);
}

.lf-land-strip__row--dual.is-flip-scrubbing::after {
  content: '';
  position: absolute;
  z-index: 8;
  top: 7px;
  bottom: 22px;
  left: 50%;
  width: min(250px, 26vw);
  pointer-events: none;
  border: 2px solid rgba(253, 224, 71, 0.95);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.26), transparent);
  box-shadow:
    0 0 22px rgba(250, 204, 21, 0.75),
    inset 0 0 28px rgba(255, 255, 255, 0.2);
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.lf-land-strip__row--dual.is-flip-scrubbing.is-flip-own-active::after {
  transform: translateX(calc(-100% - 22px));
  opacity: 1;
}

.lf-land-strip__row--dual.is-flip-scrubbing.is-flip-raid-active::after {
  transform: translateX(22px);
  opacity: 1;
}

.lf-land-flip.is-scrubbing .lf-land-flip__card.is-highlight .lf-land-flip__card-inner {
  animation: lf-card-flip-pulse 0.16s ease-in-out, lf-land-roll-glow 0.28s ease-out;
}

@keyframes lf-land-roll-flash {
  0% { transform: scale(0.98) rotate(-1deg); filter: brightness(0.75); }
  45% { transform: scale(1.08) rotate(1deg); filter: brightness(1.45); }
  100% { transform: scale(1.02); filter: brightness(1); }
}

@keyframes lf-land-roll-transparent {
  0%, 100% { opacity: 0.58; }
  45% { opacity: 1; }
}

@keyframes lf-land-roll-glow {
  0% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { box-shadow: 0 0 32px rgba(251, 191, 36, 0.82), 0 0 54px rgba(74, 222, 128, 0.35); }
  100% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.45); }
}

.lf-boss-cinematic,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic {
  backface-visibility: hidden;
  contain: paint;
  transform: translateZ(0);
  will-change: auto;
}
.lf-boss-cinematic.is-on,
.lf-boss-cinematic.is-fullscreen,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-on,
.lf-panel.lf-panel--battle-full .lf-boss-cinematic.is-fullscreen {
  z-index: 30 !important;
}

/* Stable hand hover: seat + lift pad stay put; face lifts once; no edge bounce. */
.lf-hand-card {
  overflow: visible !important;
  isolation: isolate;
}
.lf-hand-card::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: -32px;
  bottom: -8px;
  z-index: 1;
  pointer-events: auto;
}
.lf-hand-card__face {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  border-radius: inherit;
  transform: translateY(0) scale(1);
  transform-origin: 50% 100%;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: transform;
}
.lf-hand-card__face img,
.lf-hand-card__face .lf-hand-card__name,
.lf-hand-card__face .lf-hand-card__atk,
.lf-hand-card__face .lf-hand-card__hp,
.lf-hand-card__face .lf-hand-card__tag {
  pointer-events: none;
}
.lf-hand-card.is-lifted .lf-hand-card__face,
.lf-hand-card.is-playable.is-lifted .lf-hand-card__face {
  transform: translateY(-12px) scale(1.04);
}
.lf-hand-card.is-lifted {
  z-index: 90 !important;
}
.lf-hand-card.is-deploying .lf-hand-card__face,
.lf-hand-card.is-dragging .lf-hand-card__face {
  transition: none;
}
.lf-land-strip.is-flip-active .lf-land-strip__row--dual {
  filter: brightness(0.72);
}
.lf-land-strip.is-flip-active .lf-land-strip__center.is-flip-highlight {
  filter: none;
  z-index: 5;
}
.lf-vs-slot--bot .lf-vs-card:hover:not(.is-locked),
.lf-vs-slot--bot .lf-vs-card:focus-visible:not(.is-locked) {
  transform: none;
}
.lf-vs-hover-tip {
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  pointer-events: none;
}
.lf-vs-card:hover .lf-vs-hover-tip,
.lf-vs-card:focus-visible .lf-vs-hover-tip {
  opacity: 1;
  visibility: visible;
}
.lf-land-strip__magic {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.lf-land-strip__magic .lf-magic-row-label {
  display: none;
}
.lf-payout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 8px 0 14px;
}
.lf-payout__end,
.lf-payout__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lf-payout__dragon {
  width: 92px;
  height: 128px;
  object-fit: contain;
  border-radius: 8px;
}
.lf-payout__pct {
  color: #f5d76e;
  font-size: 1.15rem;
}
.lf-payout__lvl,
.lf-payout__unit {
  color: #a7f3c8;
  font-size: 0.75rem;
}
.lf-payout__token {
  width: 42px;
  height: 42px;
}
.lf-payout__amt {
  font-size: 2rem;
  color: #fff;
}
