.atlas-page .mc-main {
  min-height: 100vh;
}

.atlas-hero {
  min-height: auto;
  padding-block: 68px 38px;
}

.atlas-hero h1 {
  max-width: 920px;
  font-size: clamp(3.1rem, 7vw, 6.4rem);
}

.atlas-hero .mc-lead {
  max-width: 760px;
}

.atlas-workspace {
  display: grid;
  grid-template-columns: 230px minmax(380px, 1fr) minmax(300px, 0.78fr);
  gap: 16px;
  align-items: stretch;
  padding-bottom: 42px;
}

.atlas-panel {
  border: 1px solid var(--mc-line);
  border-radius: 21px;
  background: rgba(11, 24, 21, 0.75);
  box-shadow: var(--mc-shadow);
  backdrop-filter: blur(18px);
}

.atlas-sidebar {
  padding: 18px;
}

.atlas-panel-title {
  margin: 0 0 13px;
  color: var(--mc-gold);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.atlas-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.atlas-filter {
  padding: 7px 10px;
  border: 1px solid rgba(164, 215, 183, 0.15);
  border-radius: 999px;
  color: var(--mc-muted);
  background: transparent;
  font: 650 0.65rem/1 "Inter", sans-serif;
  cursor: pointer;
}

.atlas-filter:hover,
.atlas-filter.is-active {
  color: #08110f;
  background: var(--mc-jade-bright);
}

.atlas-channel-list {
  display: grid;
  gap: 5px;
}

.atlas-channel-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #b8c8c0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.atlas-channel-button:hover,
.atlas-channel-button.is-active {
  border-color: color-mix(in srgb, var(--channel-color) 40%, transparent);
  color: var(--mc-ink);
  background: color-mix(in srgb, var(--channel-color) 9%, transparent);
}

.atlas-channel-button[hidden] {
  display: none;
}

.atlas-code {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid color-mix(in srgb, var(--channel-color) 48%, transparent);
  border-radius: 50%;
  color: var(--channel-color);
  font-size: 0.66rem;
  font-weight: 800;
}

.atlas-channel-name {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-polarity {
  color: #71837a;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.atlas-map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 770px;
  overflow: hidden;
}

.atlas-map-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-bottom: 1px solid var(--mc-line);
}

.atlas-map-toolbar p {
  margin: 0;
  color: #7f9288;
  font-size: 0.67rem;
}

.atlas-map-actions {
  display: flex;
  gap: 7px;
}

.atlas-map-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(164, 215, 183, 0.18);
  border-radius: 999px;
  color: #b9c9c1;
  background: rgba(117, 183, 146, 0.05);
  font: 650 0.67rem/1 "Inter", sans-serif;
  cursor: pointer;
}

.atlas-map-button:hover,
.atlas-map-button.is-active {
  color: #08110f;
  background: var(--mc-jade-bright);
}

.atlas-stage {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  padding: 16px 12px 10px;
  background:
    radial-gradient(circle at 50% 45%, rgba(117, 183, 146, 0.09), transparent 38%),
    linear-gradient(rgba(164, 215, 183, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 215, 183, 0.018) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
}

.atlas-stage::before {
  position: absolute;
  inset: 9% 18%;
  border: 1px solid rgba(164, 215, 183, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(117, 183, 146, 0.012),
    0 0 0 116px rgba(117, 183, 146, 0.008);
  content: "";
}

.atlas-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  height: auto;
  overflow: visible;
}

.body-outline {
  fill: rgba(164, 215, 183, 0.018);
  stroke: rgba(197, 222, 207, 0.22);
  stroke-width: 1.5;
}

.body-axis {
  stroke: rgba(164, 215, 183, 0.07);
  stroke-dasharray: 4 9;
}

.body-label {
  fill: rgba(197, 222, 207, 0.42);
  font: 600 14px "Inter", sans-serif;
  letter-spacing: 0.18em;
  text-anchor: middle;
}

.meridian-path {
  fill: none;
  stroke: var(--path-color, var(--mc-jade));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  opacity: 0.055;
  filter: drop-shadow(0 0 1px transparent);
  transition: opacity 220ms ease, stroke-width 220ms ease, filter 220ms ease;
  vector-effect: non-scaling-stroke;
}

.meridian-path.is-paired {
  stroke-width: 4.5;
  opacity: 0.36;
  filter: drop-shadow(0 0 5px var(--path-color));
}

.meridian-path.is-active {
  stroke-width: 6;
  opacity: 1;
  filter:
    drop-shadow(0 0 5px var(--path-color))
    drop-shadow(0 0 12px var(--path-color));
  stroke-dasharray: 15 8;
  animation: atlas-flow 1.8s linear infinite;
}

.meridian-node {
  fill: var(--path-color, var(--mc-jade));
  opacity: 0;
  filter: drop-shadow(0 0 5px var(--path-color));
  transition: opacity 200ms ease;
}

.meridian-node.is-active {
  opacity: 1;
}

.atlas-legend {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 13px;
  color: #74877d;
  font-size: 0.6rem;
}

.atlas-legend span::before {
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 5px;
  background: var(--legend-color);
  content: "";
  vertical-align: middle;
}

.atlas-detail {
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.atlas-detail-code {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--active-channel) 45%, transparent);
  border-radius: 50%;
  color: var(--active-channel);
  background: color-mix(in srgb, var(--active-channel) 8%, transparent);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.atlas-detail h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.35rem, 4vw, 3.55rem);
  font-weight: 500;
  line-height: 0.92;
}

.atlas-pinyin {
  margin: 10px 0 22px;
  color: var(--mc-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atlas-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 25px;
}

.atlas-tag {
  padding: 6px 9px;
  border: 1px solid rgba(164, 215, 183, 0.14);
  border-radius: 999px;
  color: #9eb0a7;
  font-size: 0.62rem;
  text-transform: capitalize;
}

.atlas-detail-section {
  padding-block: 18px;
  border-top: 1px solid rgba(164, 215, 183, 0.1);
}

.atlas-detail-section h3 {
  margin: 0 0 8px;
  color: var(--mc-jade-bright);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.atlas-detail-section p {
  margin: 0;
  color: #aebeb6;
  font-size: 0.83rem;
  line-height: 1.65;
}

.atlas-pair-link {
  color: var(--mc-ink);
  text-decoration-color: rgba(164, 215, 183, 0.4);
  text-underline-offset: 4px;
}

.atlas-cycle-status {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(207, 173, 109, 0.15);
  border-radius: 13px;
  color: #8d9f96;
  background: rgba(207, 173, 109, 0.04);
  font-size: 0.67rem;
  line-height: 1.5;
}

.atlas-cycle-status strong {
  color: var(--mc-gold);
}

.atlas-foundation {
  padding-block: 50px 100px;
}

.atlas-foundation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.atlas-foundation .mc-card h3 {
  margin-top: 3px;
}

@keyframes atlas-flow {
  to { stroke-dashoffset: -46; }
}

@media (max-width: 1080px) {
  .atlas-workspace {
    grid-template-columns: 210px minmax(360px, 1fr);
  }

  .atlas-detail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 15px 24px;
    align-items: start;
  }

  .atlas-detail-code {
    grid-row: 1 / span 2;
  }

  .atlas-detail-head {
    grid-column: 2 / -1;
  }

  .atlas-detail-sections {
    display: contents;
  }

  .atlas-cycle-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .atlas-workspace {
    grid-template-columns: 1fr;
  }

  .atlas-sidebar {
    order: 2;
  }

  .atlas-map-panel {
    min-height: 610px;
    order: 1;
  }

  .atlas-detail {
    display: flex;
    order: 3;
  }

  .atlas-channel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-foundation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .atlas-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .atlas-map-panel {
    min-height: 545px;
  }

  .atlas-stage {
    padding-inline: 0;
  }

  .atlas-channel-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meridian-path.is-active {
    animation: none;
  }
}
