/* V1.28Beta · Landmark cards
   A landmark belongs to one character position, remains in play, and can be
   inspected without competing with the character card's targeting action. */

.landmark-slot {
  --landmark-accent: #76e7ff;
  appearance: none;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  width: clamp(58px, 5.1vw, 72px);
  aspect-ratio: 3 / 4;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  overflow: hidden;
  color: #eefbff;
  border: 1px solid color-mix(in srgb, var(--landmark-accent) 62%, #17243a 38%);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 24, 42, 0.9), rgba(3, 8, 16, 0.96)),
    #06101e;
  box-shadow:
    inset 0 0 0 1px rgba(238, 251, 255, 0.05),
    inset 0 0 22px rgba(118, 231, 255, 0.09),
    0 10px 24px rgba(0, 0, 0, 0.38);
  font: inherit;
  text-align: left;
  isolation: isolate;
}

.landmark-slot::before,
.landmark-slot::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.landmark-slot::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(0deg, rgba(2, 7, 14, 0.96), transparent 58%);
}

.landmark-slot::after {
  inset: 3px;
  border: 1px solid rgba(197, 244, 255, 0.18);
  border-radius: 5px;
}

.landmark-slot > i {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background:
    linear-gradient(180deg, transparent 48%, rgba(1, 5, 12, 0.92)),
    var(--landmark-art, none) center / cover no-repeat;
  filter: saturate(0.92) contrast(1.04);
}

.landmark-slot > span,
.landmark-slot > strong,
.landmark-slot > small,
.landmark-slot > .landmark-state {
  position: relative;
  z-index: 3;
  min-width: 0;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.86);
}

.landmark-slot > span {
  align-self: start;
  justify-self: start;
  padding: 2px 4px;
  color: #bff5ff;
  border: 1px solid rgba(118, 231, 255, 0.36);
  border-radius: 999px;
  background: rgba(3, 15, 29, 0.82);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
}

.landmark-slot > strong {
  align-self: end;
  display: -webkit-box;
  overflow: hidden;
  color: #fff4c8;
  font-size: 10px;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.landmark-slot > small {
  display: none;
}

.landmark-slot > .landmark-state {
  position: absolute;
  z-index: 4;
  top: 6px;
  right: 6px;
  padding: 2px 4px;
  color: #06111c;
  border: 1px solid rgba(223, 253, 255, 0.72);
  border-radius: 999px;
  background: #8eefff;
  box-shadow: 0 0 10px rgba(118, 231, 255, 0.5);
  font-size: 7px;
  font-weight: 950;
  line-height: 1;
}

.landmark-slot > .landmark-state.cooldown {
  color: #fff0d0;
  border-color: rgba(255, 190, 112, 0.6);
  background: rgba(45, 23, 11, 0.92);
  box-shadow: 0 0 10px rgba(255, 145, 61, 0.28);
}

.landmark-slot.active-landmark.filled {
  border-color: color-mix(in srgb, var(--landmark-accent) 78%, #fff0b5 22%);
}

.landmark-slot.filled {
  cursor: pointer;
}

.landmark-slot.filled:hover,
.landmark-slot.filled:focus-visible {
  z-index: 12 !important;
  outline: none;
  border-color: #d9faff;
  box-shadow:
    inset 0 0 0 1px rgba(238, 251, 255, 0.1),
    inset 0 0 24px rgba(118, 231, 255, 0.18),
    0 0 0 2px rgba(118, 231, 255, 0.16),
    0 14px 30px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(118, 231, 255, 0.22);
}

.landmark-slot:not(.filled) {
  place-content: center;
  grid-template-rows: auto auto;
  gap: 6px;
  opacity: 0.62;
  border-style: dashed;
  background:
    radial-gradient(circle at 50% 42%, rgba(118, 231, 255, 0.08), transparent 54%),
    rgba(3, 10, 19, 0.82);
}

.landmark-slot:not(.filled) > span,
.landmark-slot:not(.filled) > strong {
  justify-self: center;
  align-self: center;
  color: #8da9bb;
  text-align: center;
}

.landmark-slot:not(.filled) > strong {
  font-size: 9px;
}

html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .combatant.combatant > .duel-landmark.duel-landmark {
  position: absolute !important;
  z-index: 7 !important;
  height: clamp(77px, 6.8vw, 96px) !important;
  top: auto !important;
  bottom: 10px !important;
  transform: none !important;
}

html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .you-combatant.you-combatant > .duel-landmark.duel-landmark {
  left: var(--combatant-pad, 10px) !important;
  right: auto !important;
}

html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .opponent-combatant.opponent-combatant > .duel-landmark.duel-landmark {
  right: var(--combatant-pad, 10px) !important;
  left: auto !important;
}

.seat-fighter > .team-landmark {
  position: absolute;
  z-index: 8;
  top: 8px;
  right: 8px;
  width: clamp(34px, 3vw, 44px);
  padding: 4px;
  border-radius: 6px;
}

.seat-fighter > .team-landmark > span {
  padding: 2px 3px;
  font-size: 6px;
}

.seat-fighter > .team-landmark > strong {
  font-size: 7px;
}

.landmark-slot.compact.active-landmark > span {
  display: none;
}

.seat-fighter > .team-landmark:not(.filled) {
  opacity: 0.42;
}

.battle.identity-battle .seat-ring[data-seats="10"] .seat-fighter > .team-landmark {
  top: 5px;
  right: 5px;
  width: 30px;
  padding: 3px;
}

.battle.identity-battle .seat-ring[data-seats="10"] .seat-fighter > .team-landmark > strong {
  display: none;
}

.opportunity-card.landmark-card {
  border-color: rgba(118, 231, 255, 0.56);
  box-shadow:
    inset 0 0 30px rgba(118, 231, 255, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.opportunity-card.landmark-card .opportunity-category,
.opportunity-card.landmark-card .opportunity-copy > em {
  color: #bff5ff;
}

.artifact-preview-popover.landmark-preview {
  border-color: rgba(118, 231, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(219, 249, 255, 0.08), rgba(4, 7, 12, 0.98)),
    radial-gradient(circle at 50% 0%, rgba(118, 231, 255, 0.22), transparent 48%),
    rgba(4, 9, 17, 0.98);
}

.artifact-preview-popover.landmark-preview .artifact-preview-art {
  aspect-ratio: 4 / 5;
  min-height: 0;
  background:
    linear-gradient(180deg, transparent 68%, rgba(0, 0, 0, 0.66)),
    var(--artifact-preview-art, none) center / contain no-repeat,
    radial-gradient(circle at 50% 36%, rgba(118, 231, 255, 0.16), transparent 58%),
    #04070c;
}

.artifact-preview-popover.landmark-preview .artifact-preview-kicker {
  color: #9fedff;
}

.artifact-preview-popover.landmark-preview.has-active-action {
  pointer-events: auto;
}

.artifact-preview-action {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: #07131d;
  border: 1px solid rgba(216, 252, 255, 0.8);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 55%),
    linear-gradient(135deg, #91efff, #56bdd8);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 18px rgba(118, 231, 255, 0.2);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.artifact-preview-action:hover:not(:disabled),
.artifact-preview-action:focus-visible:not(:disabled) {
  outline: none;
  filter: brightness(1.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    0 0 24px rgba(118, 231, 255, 0.4);
}

.artifact-preview-action:disabled {
  color: #90a8b4;
  border-color: rgba(151, 177, 191, 0.26);
  background: rgba(12, 24, 33, 0.9);
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 899px) {
  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .combatant.combatant > .duel-landmark.duel-landmark {
    width: 44px;
    height: 59px !important;
    top: auto !important;
    bottom: 5px !important;
    transform: none !important;
    padding: 4px;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .you-combatant.you-combatant > .duel-landmark.duel-landmark {
    left: 5px !important;
    right: auto !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .opponent-combatant.opponent-combatant > .duel-landmark.duel-landmark {
    right: 5px !important;
    left: auto !important;
  }

  .duel-landmark > span {
    padding: 2px 3px;
    font-size: 6px;
  }

  .duel-landmark > strong {
    font-size: 7px;
  }

  .duel-landmark > .landmark-state {
    top: 4px;
    right: 4px;
    padding: 1px 3px;
    font-size: 5px;
  }

  .seat-fighter > .team-landmark {
    top: 6px;
    right: 6px;
    width: 34px;
  }
}

@media (max-width: 520px) {
  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app #battle#battle.battle:not([hidden]) .combatant.combatant > .duel-landmark.duel-landmark {
    width: 38px;
    height: 51px !important;
    top: auto !important;
    bottom: 4px !important;
    transform: none !important;
  }

  .artifact-preview-popover.landmark-preview .artifact-preview-art {
    aspect-ratio: 1 / 1;
  }

  .duel-landmark.active-landmark > span {
    display: none;
  }
}

/* Desktop/tablet duel field: landmarks occupy the open ground outside each
   combatant instead of sitting as a tiny badge inside the status panel. */
@media (min-width: 721px) {
  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) {
    --duel-field-landmark-width: clamp(100px, 12vw, 124px);
    --duel-field-landmark-gap: clamp(16px, 2vw, 24px);
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighters.fighters,
  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .combatant.combatant {
    overflow: visible !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .combatant.combatant > .duel-landmark.duel-landmark {
    width: var(--duel-field-landmark-width) !important;
    height: auto !important;
    min-width: var(--duel-field-landmark-width) !important;
    min-height: 0 !important;
    max-width: var(--duel-field-landmark-width) !important;
    max-height: none !important;
    aspect-ratio: 2 / 3 !important;
    top: 50% !important;
    bottom: auto !important;
    padding: 9px !important;
    border-width: 2px !important;
    border-radius: 11px !important;
    transform: translateY(-50%) !important;
    z-index: 18 !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .you-combatant.you-combatant > .duel-landmark.duel-landmark {
    left: var(--duel-landmark-field-left, calc((var(--duel-field-landmark-width) + var(--duel-field-landmark-gap)) * -1)) !important;
    right: var(--duel-landmark-field-right, auto) !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .opponent-combatant.opponent-combatant > .duel-landmark.duel-landmark {
    left: var(--duel-landmark-field-left, auto) !important;
    right: var(--duel-landmark-field-right, calc((var(--duel-field-landmark-width) + var(--duel-field-landmark-gap)) * -1)) !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .duel-landmark.duel-landmark > span {
    padding: 3px 6px !important;
    font-size: 9px !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .duel-landmark.duel-landmark > strong {
    font-size: clamp(13px, 1.45vw, 16px) !important;
    line-height: 1.08 !important;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .duel-landmark.duel-landmark.filled > small {
    align-self: end;
    display: -webkit-box;
    margin-top: 3px;
    overflow: hidden;
    color: #d9f8ff;
    font-size: clamp(8px, 0.82vw, 10px);
    font-weight: 800;
    line-height: 1.16;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html body:not(.maintenance-mode) #appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .duel-landmark.duel-landmark > .landmark-state {
    top: 9px !important;
    right: 9px !important;
    padding: 3px 6px !important;
    font-size: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landmark-slot.filled:hover,
  .landmark-slot.filled:focus-visible {
    transform: none;
  }
}
