:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --text: #13212f;
  --sub: #4d6276;
  --line: #d4dde6;
  --brand: #1864ab;
  --brand-2: #0b4f8a;
  --ok: #1f9d55;
  --warn: #b7791f;
  --danger: #c53030;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, #dcebf8 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, #f3e8d3 0%, transparent 42%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(245, 246, 242, 0.9);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.brand__title {
  font-weight: 800;
}

.brand__sub {
  font-size: 12px;
  color: var(--sub);
}

.nav {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--sub);
}

.nav a[aria-current="page"] {
  color: var(--brand-2);
  font-weight: 700;
}

.page {
  padding: 28px 0 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(17, 36, 56, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hero__copy {
  padding: 22px;
}

.hero__copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.hero__copy p {
  margin: 14px 0 0;
  color: var(--sub);
  font-size: 17px;
}

.hero__controls {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #f8fbff;
  color: var(--sub);
  font-weight: 600;
  cursor: pointer;
}

.chip.is-active {
  color: var(--brand-2);
  border-color: #8eb9de;
  background: #e9f4ff;
}

.hero__cta {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  background: white;
  cursor: pointer;
}

.btn--primary {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.hero__scene {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  padding: 8px;
}

.hero__canvas,
.hero__fallback {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  display: block;
}

.hero__fallback {
  object-fit: cover;
}

.hero__scene[data-mode="fallback"] .hero__canvas {
  display: none;
}

.hero__scene[data-mode="webgl"] .hero__fallback {
  display: none;
}

.hero__loading {
  position: absolute;
  inset: 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sub);
  transition: opacity 180ms ease;
}

.hero__loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 24px;
}

.section-sub {
  margin: 0 0 16px;
  color: var(--sub);
}

.panel {
  padding: 18px;
}

.field {
  margin-top: 12px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.hint {
  margin-top: 6px;
  color: var(--sub);
  font-size: 12px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.status {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--sub);
}

.status.is-ok {
  color: var(--ok);
}

.status.is-warn {
  color: var(--warn);
}

.status.is-bad {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--sub);
}

.map {
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.summary {
  padding: 12px;
  border-radius: 12px;
  background: #f3f9ff;
  border: 1px solid #cde2f6;
  color: #1f3b56;
  font-weight: 600;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.scenario__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.scenario__meta {
  margin-top: 8px;
  color: var(--sub);
  font-size: 13px;
}

.scenario__metrics {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fbfcfd;
}

.metric .k {
  font-size: 11px;
  color: var(--sub);
}

.metric .v {
  margin-top: 4px;
  font-weight: 700;
}

.details {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.details summary {
  cursor: pointer;
  font-weight: 700;
}

.details ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--sub);
}

.footer {
  margin-top: 24px;
  color: var(--sub);
  font-size: 12px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  color: var(--sub);
}

.recent-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
  padding: 8px 10px;
  font-size: 13px;
}

@media (max-width: 920px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .hero__scene {
    min-height: 320px;
  }

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