:root {
  --bg: #04070d;
  --bg-soft: #081220;
  --surface: rgba(8, 13, 24, 0.88);
  --surface-strong: rgba(12, 19, 34, 0.98);
  --line: rgba(63, 100, 173, 0.32);
  --line-strong: rgba(83, 126, 214, 0.6);
  --text: #f3f2ec;
  --muted: #81889a;
  --blue: #183866;
  --blue-strong: #295393;
  --blue-soft: rgba(42, 84, 149, 0.18);
  --gold: #c39a48;
  --gold-soft: rgba(195, 154, 72, 0.12);
  --danger: #6d89c0;
  --font-display: "Avenir Next Condensed", "Helvetica Neue Condensed Bold", "Arial Narrow", sans-serif;
  --font-body: "Avenir Next", "Helvetica Neue", sans-serif;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body.embed-mode .topbar,
body.embed-mode .results-band {
  display: none;
}

body.embed-mode .page-shell {
  width: min(1420px, calc(100% - 24px));
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent !important;
}

body.embed-mode,
body.embed-mode main {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* The Vault supplies the surface. Let the Map and its living atmosphere float on it. */
html:has(body.embed-mode),
body.embed-mode {
  background: transparent !important;
}

body.embed-mode .map-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  background: transparent !important;
}

body.embed-mode .map-stage::before {
  display: none;
}

body.embed-mode .map-column,
body.embed-mode .map-copy {
  min-width: 0;
}

body.embed-mode .map-column,
body.embed-mode .map-poster,
body.embed-mode .map-frame {
  background: transparent !important;
}

body.embed-mode .map-copy {
  display: none;
}

body.embed-mode .map-poster {
  width: min(100%, calc(100vh - 32px));
  margin: 0 auto;
}

body.hero-mode .page-shell {
  width: 100%;
  height: 100vh;
}

body.hero-mode {
  background: transparent;
}

body.hero-mode main {
  height: 100%;
}

body.hero-mode .map-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}

body.hero-mode .map-copy {
  display: none;
}

body.hero-mode .map-column,
body.hero-mode .map-poster,
body.hero-mode .map-frame {
  width: 100%;
  height: 100%;
}

body.hero-mode .map-poster {
  aspect-ratio: auto;
}

body.hero-mode .map-atmosphere {
  width: 112%;
}

/* The homepage supplies the atmosphere. Keep the embedded map itself clean. */
body.hero-mode .map-stage::before,
body.hero-mode .map-atmosphere {
  display: none;
}

body.hero-mode .map-poster {
  filter: none;
}

.hero-map-state {
  display: none;
}

body.hero-mode .hero-map-state {
  position: absolute;
  z-index: 6;
  top: 0.6%;
  left: 50%;
  display: none;
  padding: 10px 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(187, 212, 255, 0.28);
  border-radius: 999px;
  background: rgba(3, 8, 16, 0.72);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

body.hero-mode .hero-map-state strong {
  color: #f1e3bd;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.15em;
  white-space: nowrap;
  transition: color 420ms ease, text-shadow 420ms ease;
}

body.hero-mode .hero-map-state strong[data-life="with-seol"] {
  color: #cce9ff;
  text-shadow: 0 0 18px rgba(94, 175, 255, 0.82);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 26% 32%, rgba(24, 48, 87, 0.42), transparent 22%),
    radial-gradient(circle at 74% 24%, rgba(8, 18, 36, 0.3), transparent 24%),
    linear-gradient(180deg, #020407 0%, #04070c 48%, #020407 100%);
}

button {
  font: inherit;
}

.page-shell {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 28px;
}

.brand-pill,
.apply-pill {
  border: 1px solid rgba(196, 159, 84, 0.22);
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.brand-pill {
  display: flex;
  align-items: center;
  padding: 13px 20px;
}

.brand-mark {
  display: block;
  width: 112px;
  height: auto;
}

.apply-pill {
  color: #d4b06b;
  padding: 12px 26px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.map-stage {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(640px, 1.12fr) minmax(320px, 0.72fr);
  gap: 36px;
  align-items: center;
  padding: 12px 0 36px;
  position: relative;
  isolation: isolate;
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: -16% -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 62% at 34% 50%, rgba(95, 163, 241, 0.28), rgba(37, 94, 181, 0.11) 42%, transparent 74%),
    linear-gradient(102deg, transparent 3%, rgba(224, 237, 255, 0.07) 35%, rgba(59, 128, 224, 0.16) 53%, transparent 84%);
  filter: blur(22px);
  opacity: var(--divine-light-rest-opacity, 0.55);
  transform: scale(var(--divine-light-rest-scale, 1));
  transform-origin: 34% 50%;
  animation: divine-light-breathe var(--divine-light-duration, 8s) ease-in-out infinite;
}

.map-column,
.map-copy {
  position: relative;
  z-index: 1;
}

@keyframes divine-light-breathe {
  0%,
  100% {
    opacity: var(--divine-light-rest-opacity, 0.55);
    transform: scale(var(--divine-light-rest-scale, 1));
  }

  50% {
    opacity: var(--divine-light-pulse-opacity, 0.65);
    transform: scale(var(--divine-light-pulse-scale, 1.055));
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-stage::before,
  .map-atmosphere::before,
  .map-atmosphere::after {
    animation: none;
  }
}

.map-copy {
  max-width: 34rem;
  align-self: center;
}

.map-column {
  display: flex;
  justify-content: center;
  isolation: isolate;
}

.map-atmosphere {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(108%, 980px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.map-atmosphere::before,
.map-atmosphere::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  pointer-events: none;
}

.map-atmosphere::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(92, 166, 249, 0.22), rgba(29, 91, 183, 0.1) 39%, transparent 70%),
    radial-gradient(circle at 50% 50%, rgba(176, 215, 255, 0.09), transparent 51%);
  filter: blur(18px);
  opacity: var(--map-field-rest-opacity, 0.48);
  transform: scale(var(--map-field-rest-scale, 1));
  animation: map-field-breathe var(--map-field-duration, 7.5s) ease-in-out infinite;
}

.map-atmosphere::after {
  background: conic-gradient(
    from 18deg,
    transparent 0deg 30deg,
    rgba(105, 177, 255, 0.62) 52deg,
    transparent 78deg 155deg,
    rgba(215, 176, 96, 0.32) 181deg,
    transparent 210deg 288deg,
    rgba(86, 148, 241, 0.48) 319deg,
    transparent 342deg 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 61% 64%, transparent 68%);
  mask: radial-gradient(circle, transparent 0 58%, #000 61% 64%, transparent 68%);
  mix-blend-mode: screen;
  opacity: var(--map-orbit-opacity, 0.14);
  animation: map-orbit var(--map-orbit-duration, 22s) linear infinite;
}

.map-poster {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.34));
}

@keyframes map-field-breathe {
  0%,
  100% {
    opacity: var(--map-field-rest-opacity, 0.48);
    transform: scale(var(--map-field-rest-scale, 1));
  }

  50% {
    opacity: var(--map-field-pulse-opacity, 0.64);
    transform: scale(var(--map-field-pulse-scale, 1.075));
  }
}

@keyframes map-orbit {
  to {
    transform: rotate(360deg);
  }
}

.detail-kicker,
.section-kicker,
.card-kicker,
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #b8924a;
  font-size: 0.72rem;
}

.map-copy h1,
.results-header h2,
.result-card h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.map-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  line-height: 0.9;
}

.detail-rule {
  width: 42px;
  height: 1px;
  background: rgba(195, 154, 72, 0.5);
  margin: 18px 0 18px;
}

.detail-description,
.detail-insight,
.card-copy {
  color: #8a91a2;
  font-size: 1rem;
  line-height: 1.55;
}

.detail-insight {
  max-width: 28rem;
}

.detail-points,
.result-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}

.detail-points li,
.result-list li {
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

.detail-points li::before,
.result-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f8ce2;
}

.detail-meta {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

.meta-card,
.result-card {
  background: linear-gradient(180deg, rgba(9, 14, 25, 0.88), rgba(4, 8, 15, 0.95));
  border: 1px solid rgba(59, 84, 132, 0.28);
  box-shadow: var(--shadow);
}

.meta-card {
  min-width: 120px;
  padding: 14px 16px;
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.map-poster {
  width: min(920px, 100%);
  aspect-ratio: 1;
  position: relative;
}

.map-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 118px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(195, 154, 72, 0.26);
  border-radius: 14px;
  background: rgba(3, 7, 16, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
  z-index: 5;
}

.map-tooltip.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.map-tooltip-label {
  display: block;
  font-size: 0.68rem;
  line-height: 1.1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d7dced;
}

.map-tooltip-score {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  color: #f6f2e8;
}

.map-base-image,
.map-overlay-svg,
.map-label-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  clip-path: circle(43.66% at 50% 50%);
}

.map-base-image {
  object-fit: cover;
}

.map-overlay-svg {
  overflow: visible;
}

.map-label-overlay {
  overflow: visible;
  pointer-events: none;
}

.ring-progress {
  fill: var(--dimension-color);
  stroke: none;
  /* Screen blending keeps the original white vector labels readable above the score color. */
  mix-blend-mode: screen;
  opacity: 0.86;
  transition: opacity 160ms ease, filter 160ms ease;
}

.ring-progress.active {
  opacity: 1;
  filter: brightness(1.08) saturate(1.16);
}

.outer-progress {
  fill: rgba(255, 255, 255, 0.18);
  stroke: none;
  transition: fill 160ms ease, opacity 160ms ease;
}

body.hero-mode .outer-progress {
  fill: rgba(78, 144, 238, 0.54);
  stroke: rgba(175, 215, 255, 0.32);
  stroke-width: 0.7px;
  filter: drop-shadow(0 0 3px rgba(71, 138, 238, 0.45));
}

.outer-progress.active {
  fill: rgba(255, 255, 255, 0.26);
}

.divine-progress {
  fill: rgba(255, 255, 255, 0.76);
  stroke: rgba(255, 255, 255, 0.52);
  stroke-width: 0.45px;
  opacity: var(--divine-progress-opacity);
  transition: fill 160ms ease, opacity 160ms ease;
}

.divine-progress.active {
  fill: #fff;
}

.inner-hit,
.outer-hit,
.framework-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.inner-highlight,
.outer-highlight,
.framework-highlight {
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.inner-highlight {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.1;
}

.framework-highlight {
  fill: rgba(200, 162, 90, 0.14);
  stroke: rgba(235, 213, 164, 0.88);
  stroke-width: 0.9;
}

.inner-highlight.active,
.outer-highlight.active,
.framework-highlight.active {
  opacity: 1;
}

.center-cover {
  fill: #00163a;
  opacity: 0.96;
  pointer-events: none;
}

.score-cover {
  fill: #00163a;
  opacity: 0.94;
  pointer-events: none;
}

.dynamic-map-score,
.dynamic-divine-score {
  fill: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

.dynamic-map-score {
  font-size: 8.6px;
  letter-spacing: 0.02em;
}

.dynamic-divine-score {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  fill: #ddb15b;
}

.score-backplate {
  fill: #00163a;
  opacity: 0.99;
  pointer-events: none;
}

.divine-score-backplate {
  fill: #fff;
  stroke: rgba(222, 177, 91, 0.32);
  stroke-width: 0.35px;
  opacity: var(--divine-plate-opacity);
  pointer-events: none;
}

.map-poster-image,
.map-shade,
.overlay-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-poster-image {
  object-fit: cover;
  display: block;
  filter: saturate(0.78) brightness(0.56) contrast(1.08);
}

.map-shade {
  background:
    radial-gradient(circle at 18% 8%, rgba(226, 159, 134, 0.22), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(34, 86, 150, 0.24), transparent 26%),
    linear-gradient(180deg, rgba(2, 4, 7, 0.1), rgba(2, 4, 7, 0.22));
  mix-blend-mode: multiply;
}

.overlay-map {
  pointer-events: auto;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  transition: box-shadow 140ms ease, background-color 140ms ease;
}

.hotspot:hover,
.hotspot.active {
  box-shadow: 0 0 0 1px rgba(214, 176, 107, 0.42), 0 0 24px rgba(214, 176, 107, 0.18);
  background: rgba(214, 176, 107, 0.08);
}

.results-band {
  margin-top: 18px;
  padding: 34px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.results-header h2 {
  margin: 8px 0 0;
  max-width: 12ch;
  line-height: 0.9;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-chip {
  border: 1px solid rgba(195, 154, 72, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  color: #beb7a8;
  background: rgba(8, 12, 20, 0.66);
}

.results-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.result-card {
  border-radius: 24px;
  padding: 22px;
  min-height: 190px;
}

.score-card {
  background:
    radial-gradient(circle at top, rgba(195, 154, 72, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(12, 19, 34, 0.98), rgba(4, 8, 15, 0.95));
}

.score-display {
  display: block;
  margin-top: 18px;
  font-size: 4.8rem;
  line-height: 0.9;
  font-family: var(--font-display);
  color: #f3e6c4;
}

.wide-card {
  grid-column: span 2;
}

.result-card h3 {
  margin: 12px 0 10px;
  font-size: 2rem;
}

.result-list li strong {
  color: var(--text);
}

.map-label {
  font-size: 13px;
  letter-spacing: 0.14em;
  fill: #6d89c0;
  text-transform: uppercase;
}

.map-label.active {
  fill: #f0f1ec;
}

.divine-core {
  fill: rgba(30, 139, 219, 0.2);
  stroke: rgba(255, 255, 255, 0.28);
}

.divine-score {
  font-size: 14px;
  font-family: var(--font-display);
  fill: rgba(255, 255, 255, 0.96);
}

.divine-label {
  font-size: 10px;
  fill: rgba(255, 255, 255, 0.96);
}

.dimension-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.015);
  stroke-width: 22;
}

.dimension-progress {
  fill: none;
  stroke: rgba(233, 240, 255, 0.36);
  stroke-linecap: butt;
  stroke-width: 22;
  transform: rotate(-90deg);
  transform-origin: 512px 512px;
  transition: stroke 140ms ease, opacity 140ms ease;
}

.dimension-progress.active {
  stroke: rgba(214, 176, 107, 0.82);
}

.vector-poster {
  background: transparent;
}

.seol-map-svg {
  display: block;
}

.outer-boundary,
.outer-grid,
.inner-grid,
.spoke-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.52);
}

.outer-boundary {
  stroke-width: 1.5;
}

.outer-grid,
.inner-grid {
  stroke-width: 1.1;
  opacity: 0.76;
}

.spoke-line {
  stroke-width: 1.1;
  opacity: 0.65;
}

.outer-label,
.inner-axis-label,
.quad-label,
.scale-label,
.stack-label,
.logo-main,
.logo-sub {
  fill: rgba(255, 255, 255, 0.97);
  font-family: var(--font-display);
}

.outer-label {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.inner-axis-label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.quad-label {
  font-size: 13px;
  font-weight: 700;
}

.scale-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stack-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.logo-main {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.logo-sub {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hit-zone {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.hit-zone.active {
  fill: rgba(214, 176, 107, 0.08);
}

@media (max-width: 1200px) {
  .map-stage {
    grid-template-columns: 1fr;
  }

  .map-copy,
  .map-column {
    order: initial;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 12px;
  }

  .topbar {
    padding-bottom: 14px;
  }

  .brand-mark {
    width: 92px;
  }

  .map-copy h1 {
    font-size: 2.85rem;
  }

  .detail-meta,
  .results-header,
  .mode-strip {
    flex-direction: column;
    align-items: start;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: span 1;
  }
}
