/* AGENT_TARGET: night-sky-route-styles — evening route cohesion surface */

.night-route-modal {
  position: fixed;
  inset: 0;
  z-index: 10164;
  display: grid;
  place-items: center;
  padding: 16px;
}

.night-route-modal[hidden] {
  display: none;
}

.night-route-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 62, 0.66);
  backdrop-filter: blur(4px);
}

.night-route-shell {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(1080px, calc(100vw - 24px));
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 15px;
  border: 3px solid #91d8f6;
  border-radius: 12px;
  background: #fffdf7;
  color: #24294e;
  box-shadow: 0 24px 70px rgba(26, 31, 62, 0.36);
}

.night-route-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  min-width: 44px;
  min-height: 44px;
  border: 2px solid rgba(36, 41, 78, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #663d86;
  font: 900 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.night-route-header {
  width: min(720px, calc(100% - 56px));
  padding: 2px 4px 0;
}

.night-route-header span,
.night-route-card small {
  display: block;
  color: #663d86;
  font:
    900 12px/1.2 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.night-route-header h2 {
  margin: 3px 0;
  color: #24294e;
  font:
    900 25px/1.08 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

.night-route-header p,
.night-route-card p,
.night-route-finale span {
  margin: 0;
  color: #5c6276;
  font: 800 13px/1.34 "Trebuchet MS", Arial, sans-serif;
}

.night-route-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.night-route-card {
  display: grid;
  grid-template-rows: auto minmax(114px, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 2px solid rgba(36, 41, 78, 0.14);
  border-radius: 8px;
  background: #fff;
}

.night-route-card.current {
  border-color: #d7a436;
  background: #fff8ea;
}

.night-route-card.visited {
  background: #edf9f4;
}

.night-route-picture {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 7px;
  background: #24294e;
}

.night-route-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.night-route-copy {
  display: grid;
  gap: 5px;
}

.night-route-card h3 {
  margin: 0;
  color: #24294e;
  font:
    900 18px/1.12 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}

.night-route-card button,
.night-route-finale button {
  min-height: 46px;
  border: 2px solid rgba(36, 41, 78, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #24294e;
  font:
    900 12px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
}

.night-route-card.current button,
.night-route-finale button {
  border-color: #d7a436;
  background: #ffdf8d;
}

.night-route-finale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(36, 41, 78, 0.13);
  border-radius: 8px;
  background: #f2fbff;
}

.night-route-finale strong {
  color: #1c5d84;
  font:
    900 18px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}

.night-route-finale button {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 128px;
}

.night-route-close:focus-visible,
.night-route-card button:focus-visible,
.night-route-finale button:focus-visible {
  outline: 3px solid rgba(102, 61, 134, 0.72);
  outline-offset: 3px;
}

@media (max-width: 840px) {
  .night-route-modal {
    align-items: start;
    padding: 8px;
  }
  .night-route-shell {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 10px;
    border-radius: 10px;
  }
  .night-route-header {
    width: calc(100% - 56px);
  }
  .night-route-header h2 {
    font-size: 21px;
  }
  .night-route-rail,
  .night-route-finale {
    grid-template-columns: 1fr;
  }
  .night-route-card {
    grid-template-rows: auto auto auto;
  }
  .night-route-finale button {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }
}
