:root {
  --ink-0: #f8fbff;
  --ink-1: #dce7ff;
  --ink-2: #aab9e8;
  --bg-0: #090f2a;
  --bg-1: #111a45;
  --bg-2: #18245c;
  --line: rgba(120, 141, 230, 0.48);
  --line-soft: rgba(97, 115, 198, 0.38);
  --gk-pink: #dc41ff;
  --gk-blue: #53c8ff;
  --gk-cyan: #9ae8ff;
  --good: #8df2bc;
  --warn: #ffd989;
  --muted: #6f84cf;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--ink-0);
  background:
    radial-gradient(circle at 10% 8%, rgba(220, 65, 255, 0.2), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(83, 200, 255, 0.2), transparent 34%),
    linear-gradient(155deg, #080d24, #111a45 46%, #0f183f);
  padding: 1.2rem;
}

.scene-glow {
  position: fixed;
  width: 35vw;
  height: 35vw;
  max-width: 440px;
  max-height: 440px;
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.scene-glow-left {
  left: -12vw;
  top: 36vh;
  background: rgba(220, 65, 255, 0.2);
}

.scene-glow-right {
  right: -12vw;
  top: 10vh;
  background: rgba(83, 200, 255, 0.16);
}

.material-symbols-outlined {
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

p {
  margin: 0;
}

.map-header {
  max-width: 1400px;
  margin: 0 auto 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(220, 65, 255, 0.22), transparent 46%),
    radial-gradient(circle at 82% 8%, rgba(83, 200, 255, 0.2), transparent 46%),
    linear-gradient(130deg, rgba(45, 60, 145, 0.92), rgba(26, 39, 105, 0.94));
  box-shadow: inset 0 1px 0 rgba(210, 232, 255, 0.2), 0 18px 40px rgba(3, 9, 28, 0.42);
  padding: 1.2rem 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: #dee7ff;
}

h1 {
  margin-top: 0.25rem;
  font-size: clamp(1.7rem, 3.8vw, 2.7rem);
}

.intro {
  margin-top: 0.55rem;
  max-width: 64ch;
  color: var(--ink-1);
  line-height: 1.6;
  font-size: 0.92rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.pill-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(180, 226, 255, 0.68);
  background: linear-gradient(106deg, rgba(220, 65, 255, 0.86), rgba(105, 122, 255, 0.84));
  padding: 0.52rem 0.84rem;
}

.pill-link-blue {
  background: linear-gradient(106deg, rgba(90, 117, 255, 0.86), rgba(83, 200, 255, 0.84));
}

.pill-link-cyan {
  background: linear-gradient(106deg, rgba(53, 126, 220, 0.86), rgba(86, 212, 255, 0.84));
}

.map-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  grid-template-areas:
    "controls map"
    "detail map"
    "schedule map";
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  padding: 0.92rem;
  background: linear-gradient(165deg, rgba(25, 37, 96, 0.95), rgba(18, 30, 78, 0.95));
  box-shadow: inset 0 1px 0 rgba(203, 231, 255, 0.12), 0 14px 32px rgba(5, 10, 28, 0.35);
}

.panel h2 {
  font-size: 1.02rem;
  margin-bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.controls-panel {
  grid-area: controls;
}

.map-panel {
  grid-area: map;
  display: grid;
  gap: 0.62rem;
  align-content: start;
}

.map-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mode-btn {
  border: 1px solid rgba(122, 150, 236, 0.58);
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(72, 97, 198, 0.72), rgba(52, 76, 170, 0.7));
  color: #e8f1ff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
}

.mode-btn.active {
  border-color: rgba(180, 227, 255, 0.88);
  background: linear-gradient(108deg, rgba(220, 65, 255, 0.86), rgba(83, 200, 255, 0.84));
  box-shadow: 0 0 0 1px rgba(180, 230, 255, 0.4);
}

.official-map-wrap {
  border: 1px solid rgba(95, 121, 214, 0.72);
  border-radius: 0.95rem;
  padding: 0.52rem;
  background: linear-gradient(158deg, rgba(19, 30, 82, 0.92), rgba(17, 28, 75, 0.9));
}

#officialMapFrame {
  width: 100%;
  min-height: 700px;
  border: 0;
  border-radius: 0.72rem;
  background: #0b122d;
}

.official-note {
  margin-top: 0.46rem;
  font-size: 0.8rem;
  color: #c5d8ff;
}

.official-note a {
  color: #9ce3ff;
  font-weight: 700;
}

.tracker-map-wrap {
  display: grid;
  gap: 0.62rem;
}

.detail-panel {
  grid-area: detail;
}

.schedule-panel {
  grid-area: schedule;
  display: grid;
  gap: 0.52rem;
  align-content: start;
}

.filter-grid {
  display: grid;
  gap: 0.48rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4d3ff;
}

input,
select {
  width: 100%;
  border: 1px solid #4359b4;
  border-radius: 0.62rem;
  background: linear-gradient(150deg, #223073, #1b275f);
  color: #f2f6ff;
  font-family: inherit;
  padding: 0.55rem 0.62rem;
}

input::placeholder {
  color: #9eb2ee;
}

input:focus,
select:focus {
  outline: 2px solid rgba(83, 200, 255, 0.48);
  border-color: var(--gk-blue);
}

.btn {
  border: 0;
  border-radius: 0.66rem;
  background: linear-gradient(112deg, var(--gk-pink), #7186ff);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  padding: 0.55rem 0.74rem;
  cursor: pointer;
}

.btn-secondary {
  background: linear-gradient(112deg, rgba(87, 113, 212, 0.86), rgba(73, 95, 183, 0.86));
  border: 1px solid rgba(146, 177, 255, 0.56);
}

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

.summary-grid article {
  border: 1px solid rgba(104, 126, 217, 0.62);
  border-radius: 0.72rem;
  background: linear-gradient(165deg, rgba(38, 50, 124, 0.76), rgba(28, 39, 103, 0.76));
  padding: 0.56rem;
}

.summary-grid p {
  color: var(--ink-2);
  font-size: 0.74rem;
}

.summary-grid strong {
  font-size: 1.1rem;
}

.status-line {
  margin-top: 0.68rem;
  color: #c4d5ff;
  font-size: 0.84rem;
  line-height: 1.5;
}

.map-shell {
  border: 1px solid rgba(93, 116, 208, 0.72);
  border-radius: 0.95rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 65, 255, 0.14), transparent 36%),
    radial-gradient(circle at 80% 18%, rgba(83, 200, 255, 0.16), transparent 34%),
    linear-gradient(150deg, rgba(19, 30, 82, 0.92), rgba(19, 31, 79, 0.9));
  padding: 0.58rem;
}

.map-surface {
  position: relative;
  border-radius: 0.8rem;
  min-height: 500px;
  background:
    radial-gradient(circle at 28% 24%, rgba(183, 102, 255, 0.2), transparent 34%),
    radial-gradient(circle at 76% 24%, rgba(82, 201, 255, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(31, 49, 120, 0.74), rgba(16, 27, 72, 0.82));
  overflow: hidden;
  border: 1px solid rgba(122, 145, 234, 0.45);
}

.region-shape {
  position: absolute;
  border-radius: 0.72rem;
  border: 1px solid rgba(163, 194, 255, 0.18);
  background: linear-gradient(165deg, rgba(78, 105, 201, 0.2), rgba(63, 89, 176, 0.14));
}

.region-label {
  position: absolute;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #deebff;
  background: rgba(18, 28, 74, 0.8);
  border: 1px solid rgba(123, 147, 237, 0.45);
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
}

.map-marker {
  position: absolute;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid rgba(164, 212, 255, 0.72);
  background: linear-gradient(150deg, rgba(72, 103, 214, 0.92), rgba(44, 67, 151, 0.9));
  color: #fff;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(4, 10, 29, 0.4);
}

.map-marker .material-symbols-outlined {
  font-size: 1rem;
}

.map-marker img {
  width: 1.18rem;
  height: 1.18rem;
  object-fit: cover;
  border-radius: 50%;
}

.map-marker[data-status="available"] {
  border-color: rgba(158, 245, 201, 0.86);
  box-shadow: 0 0 0 2px rgba(113, 233, 170, 0.22), 0 8px 18px rgba(4, 10, 29, 0.42);
}

.map-marker[data-status="cooldown"] {
  border-color: rgba(255, 219, 143, 0.86);
  background: linear-gradient(150deg, rgba(204, 148, 66, 0.88), rgba(150, 104, 37, 0.86));
}

.map-marker[data-status="collected"] {
  border-color: rgba(160, 175, 227, 0.74);
  background: linear-gradient(150deg, rgba(98, 110, 165, 0.9), rgba(73, 84, 136, 0.88));
  opacity: 0.82;
}

.map-marker.selected {
  transform: translate(-50%, -50%) scale(1.14);
  border-color: #cff2ff;
  box-shadow: 0 0 0 2px rgba(183, 236, 255, 0.48), 0 10px 22px rgba(4, 11, 33, 0.52);
}

.map-list {
  border: 1px solid rgba(93, 116, 205, 0.62);
  border-radius: 0.75rem;
  background: rgba(16, 26, 71, 0.62);
  padding: 0.52rem;
  display: grid;
  gap: 0.4rem;
  max-height: 14.5rem;
  overflow: auto;
}

.node-chip {
  border: 1px solid rgba(102, 123, 209, 0.62);
  border-radius: 0.7rem;
  background: linear-gradient(155deg, rgba(37, 50, 123, 0.74), rgba(28, 41, 100, 0.74));
  color: #f1f6ff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: center;
  padding: 0.5rem 0.56rem;
  cursor: pointer;
}

.node-chip.selected {
  border-color: rgba(178, 229, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(170, 224, 255, 0.52);
}

.node-chip-icon {
  width: 1.78rem;
  height: 1.78rem;
  border-radius: 0.58rem;
  border: 1px solid rgba(145, 178, 255, 0.68);
  background: rgba(34, 49, 123, 0.8);
  display: grid;
  place-items: center;
}

.node-chip-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.node-chip-text {
  min-width: 0;
}

.node-chip-text strong {
  display: block;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-chip-text small {
  display: block;
  margin-top: 0.12rem;
  color: #c4d5ff;
  font-size: 0.68rem;
}

.node-chip-status {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8e4ff;
}

.empty-state {
  border: 1px dashed rgba(117, 141, 225, 0.6);
  border-radius: 0.78rem;
  color: #ccdbff;
  background: rgba(20, 31, 79, 0.56);
  padding: 0.72rem;
  font-size: 0.87rem;
}

.hidden {
  display: none;
}

.detail-card {
  display: grid;
  gap: 0.55rem;
}

.detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.52rem;
  align-items: center;
}

.detail-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.76rem;
  border: 1px solid rgba(150, 182, 255, 0.72);
  background: linear-gradient(158deg, rgba(54, 79, 177, 0.9), rgba(41, 61, 141, 0.9));
  display: grid;
  place-items: center;
}

.detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

#detailName {
  font-size: 1.04rem;
}

#detailMeta {
  margin-top: 0.16rem;
  color: #bfd1ff;
  font-size: 0.76rem;
}

.detail-description {
  color: #dae6ff;
  line-height: 1.5;
  font-size: 0.88rem;
}

.detail-timer {
  color: #c7d9ff;
  font-size: 0.83rem;
  line-height: 1.45;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.46rem;
}

.schedule-list {
  display: grid;
  gap: 0.45rem;
  max-height: 23rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.schedule-card {
  border: 1px solid rgba(100, 123, 210, 0.62);
  border-radius: 0.78rem;
  background: linear-gradient(160deg, rgba(35, 48, 121, 0.78), rgba(27, 39, 98, 0.78));
  padding: 0.56rem;
  display: grid;
  gap: 0.26rem;
}

.schedule-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
}

.schedule-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(140, 173, 255, 0.72);
  background: rgba(35, 53, 131, 0.76);
  display: grid;
  place-items: center;
}

.schedule-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.schedule-card strong {
  font-size: 0.82rem;
}

.schedule-sub {
  color: #c0d2ff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.schedule-days {
  font-size: 0.72rem;
  color: #d7e5ff;
}

.schedule-notes {
  color: #bfd2ff;
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "controls"
      "map"
      "detail"
      "schedule";
  }

  .map-surface {
    min-height: 430px;
  }

  #officialMapFrame {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.85rem;
  }

  .map-header {
    padding: 1rem;
    border-radius: 1rem;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .map-surface {
    min-height: 360px;
  }

  #officialMapFrame {
    min-height: 460px;
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
