.epic-stage {
  padding: clamp(0.8rem, 2.5vw, 1.75rem) 0 clamp(2rem, 5vw, 4rem);
}

.epic-layout {
  width: min(100%, 76rem);
}

.epic-panel {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(98, 188, 241, 0.34);
  border-radius: 22px;
  background: rgba(5, 14, 33, 0.97);
  box-shadow: 0 18px 50px rgba(5, 11, 27, 0.44);
  color: #eef8ff;
}

.epic-header {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.epic-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.epic-header p:last-child {
  margin: 0.5rem 0 0;
  color: #bdcee0;
}

.epic-kicker,
.epic-date {
  margin: 0 0 0.15rem;
  color: #6edcff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.epic-status {
  min-height: 1.5rem;
  margin: 1rem auto;
  color: #d5e8f7;
  font-weight: 700;
  text-align: center;
}

.epic-status.is-error {
  color: #ff9d90;
}

.epic-entry {
  display: grid;
  grid-template-columns: minmax(18rem, 1.15fr) minmax(17rem, 0.85fr);
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 68rem;
  margin: 1rem auto 0;
  align-items: start;
}

.epic-entry > * {
  min-width: 0;
}

.epic-entry[hidden] {
  display: none;
}

.epic-media-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 100%;
  border: 2px solid #388eb9;
  border-radius: 20px;
  aspect-ratio: 1;
  background: #020712;
  box-shadow: 0 0 0 2px rgba(68, 185, 238, 0.12),
    0 14px 38px rgba(0, 0, 0, 0.44);
}

.epic-media-stage.is-loading::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(127, 216, 255, 0.35);
  border-top-color: #83dcff;
  border-radius: 50%;
  animation: epic-spin 0.8s linear infinite;
}

.epic-globe,
.epic-fallback {
  display: block;
  width: 100%;
  height: 100%;
  grid-area: 1 / 1;
}

.epic-globe {
  background: #020712;
  cursor: grab;
  touch-action: none;
}

.epic-globe.is-dragging {
  cursor: grabbing;
}

.epic-fallback {
  object-fit: contain;
}

.epic-frame-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(137, 219, 255, 0.48);
  border-radius: 999px;
  background: rgba(3, 15, 36, 0.82);
  color: #dff7ff;
  font-size: 0.72rem;
  font-weight: 700;
}

.epic-button {
  min-height: 44px;
  border: 1px solid #58c9f4;
  border-radius: 10px;
  background: #087eae;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.epic-button:disabled {
  border-color: #536879;
  background: #354656;
  color: #93a6b6;
  cursor: not-allowed;
}

.epic-view-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.epic-button {
  display: inline-flex;
  padding: 0.65rem 0.9rem;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.epic-button-secondary {
  border-color: #829cb0;
  background: #1c344b;
}

.epic-button:hover:not(:disabled),
.epic-button:focus:not(:disabled) {
  border-color: #b5edff;
  background: #0b94c8;
  color: #fff;
  text-decoration: none;
}

.epic-help,
.epic-caveat,
.epic-credit {
  color: #9fb5ca;
  font-size: 0.78rem;
}

.epic-help {
  margin: 0.55rem 0 0;
  text-align: center;
}

.epic-details {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(113, 190, 247, 0.28);
  border-radius: 16px;
  background: rgba(16, 34, 65, 0.92);
}

.epic-flat-map-section {
  max-width: 68rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(113, 190, 247, 0.28);
  border-radius: 18px;
  background: rgba(11, 27, 53, 0.9);
}

.epic-flat-map-header {
  display: grid;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(18rem, 1.28fr);
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
}

.epic-flat-map-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.epic-flat-map-header > p {
  margin: 0;
  color: #b8ccdc;
  line-height: 1.6;
}

.epic-flat-map-stage {
  position: relative;
  aspect-ratio: 1600 / 779;
  overflow: hidden;
  border: 1px solid rgba(121, 207, 246, 0.46);
  border-radius: 14px;
  background: #020712;
  box-shadow: inset 0 0 32px rgba(37, 119, 167, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.28);
}

.epic-flat-map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 779;
}

.epic-flat-map[hidden] {
  display: none;
}

.epic-flat-map-transition {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1000ms linear;
}

.epic-flat-map-transition.is-visible {
  opacity: 1;
}

.epic-flat-map-date-control {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(121, 207, 246, 0.24);
  border-radius: 12px;
  background: rgba(3, 15, 36, 0.72);
}

.epic-flat-map-date-heading {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  justify-content: space-between;
}

.epic-flat-map-date-heading label {
  color: #e6f7ff;
  font-weight: 700;
}

.epic-flat-map-date-heading output {
  color: #7bdcff;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.epic-flat-map-slider-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.65rem;
  align-items: center;
}

.epic-flat-map-date-control input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #48b9e8;
  cursor: pointer;
}

.epic-flat-map-date-control input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.epic-flat-map-play {
  min-width: 5.4rem;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #58c9f4;
  border-radius: 10px;
  background: #087eae;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.epic-flat-map-play:hover:not(:disabled),
.epic-flat-map-play:focus:not(:disabled),
.epic-flat-map-play.is-playing {
  border-color: #b5edff;
  background: #0b94c8;
}

.epic-flat-map-play:disabled {
  border-color: #536879;
  background: #354656;
  color: #93a6b6;
  cursor: not-allowed;
}

.epic-flat-map-date-control p {
  margin: 0.35rem 0 0;
  color: #91a9bd;
  font-size: 0.74rem;
}

.epic-flat-map-status {
  min-height: 1.35rem;
  margin: 0.65rem 0 0;
  color: #9fb5ca;
  font-size: 0.78rem;
  text-align: center;
}

.epic-flat-map-status.is-error {
  color: #ff9d90;
}

.epic-details h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.epic-caption {
  margin: 0.65rem 0 1rem;
  color: #bed0df;
  line-height: 1.65;
}

.epic-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.epic-summary > div {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(109, 190, 242, 0.24);
  border-radius: 10px;
  background: rgba(4, 18, 40, 0.64);
}

.epic-summary dt,
.epic-telemetry dt {
  color: #8facbf;
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.epic-summary dd,
.epic-telemetry dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}

.epic-summary dd {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

#imageName {
  font-size: 0.76rem;
  word-break: break-all;
}

.epic-telemetry {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border: 1px solid rgba(111, 194, 252, 0.25);
  border-radius: 10px;
  background: rgba(4, 18, 40, 0.5);
}

.epic-telemetry summary {
  color: #ccecff;
  font-weight: 700;
  cursor: pointer;
}

.epic-telemetry dl {
  margin: 0.8rem 0 0;
}

.epic-telemetry dl div + div {
  margin-top: 0.65rem;
}

.epic-telemetry dd {
  color: #c5d5e2;
  font-size: 0.75rem;
}

.epic-caveat {
  max-width: 68rem;
  margin: 1.25rem auto 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid #4db8e5;
  background: rgba(18, 38, 68, 0.78);
}

.epic-credit {
  margin: 0.7rem auto 0;
  text-align: center;
}

.epic-credit a {
  color: #75dcff;
  font-weight: 700;
}

.epic-globe:focus-visible,
.epic-flat-map-date-control input:focus-visible,
.epic-flat-map-play:focus-visible,
.epic-button:focus-visible {
  outline: 3px solid #8bdcff;
  outline-offset: 3px;
}

@keyframes epic-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767.98px) {
  .epic-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .epic-flat-map-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .epic-flat-map-date-heading {
    display: grid;
    gap: 0.2rem;
  }

  .epic-flat-map-date-heading output {
    text-align: left;
  }
}

@media (max-width: 479.98px) {
  .epic-panel {
    padding: 0.9rem 0.55rem 1.15rem;
    border-radius: 15px;
  }

  .epic-summary {
    grid-template-columns: 1fr;
  }

  .epic-view-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .epic-media-stage.is-loading::after {
    animation: none;
  }

  .epic-flat-map-transition {
    transition: none;
  }
}
