:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5f6b7a;
  --line: #d8dee7;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #b45309;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.home-shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.intro {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro p:not(.eyebrow) {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.example-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(23, 32, 42, 0.08);
  transition: transform 160ms ease, border-color 160ms ease;
}

.example-card:hover,
.example-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

.library {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2f4f1;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.example-card strong {
  align-self: end;
  font-size: 1.45rem;
}

.example-card span:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.notes {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.65;
}

.notes h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.notes ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}


.topbar .language-switch {
  margin-left: auto;
}
.topbar > a {
  color: var(--accent-strong);
  font-weight: 800;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar nav a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.topbar nav a.active,
.topbar nav a:hover {
  background: #e2f4f1;
  color: var(--accent-strong);
}

.map-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: calc(100vh - 64px);
}

.map-panel {
  position: relative;
  min-width: 0;
}

.map {
  width: 100%;
  height: calc(100vh - 64px);
  background: #dfe7ee;
}

.status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 500;
  max-width: calc(100% - 32px);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--warn);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.14);
}

.status.ready {
  color: var(--accent-strong);
}

.status.error {
  color: var(--error);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.side-panel h1 {
  font-size: 1.7rem;
  line-height: 1.15;
}

.side-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field-row {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.field-row select,
.field-row input[type="range"] {
  width: 100%;
}

.field-row select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.info-list {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.info-list div {
  display: grid;
  gap: 4px;
}

.info-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.info-list strong {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #e2f4f1;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover {
  background: #d2ede9;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 42, 0.54);
}

.modal-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(23, 32, 42, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.address-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.address-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.address-list pre {
  max-height: 130px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f9;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.leaflet-container,
.ol-viewport {
  font: inherit;
}

@media (max-width: 820px) {
  .home-shell {
    width: min(100% - 28px, 1040px);
    padding-top: 44px;
  }

  .example-grid,
  .map-page {
    grid-template-columns: 1fr;
  }

  .map {
    height: 64vh;
    min-height: 420px;
  }

  .side-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .topbar {
    align-items: center;
    height: auto;
    min-height: 72px;
    flex-direction: row;
    gap: 12px;
    padding: 12px 14px;
  }

  .map-page {
    min-height: calc(100vh - 72px);
  }
}

.lab-home {
  background: #f7f9fb;
}

.lab-hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  color: var(--accent-strong);
}

.lab-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.lab-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 12, 18, 0.84), rgba(5, 12, 18, 0.48) 48%, rgba(5, 12, 18, 0.16));
}

.lab-hero-copy {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 40px));
  align-self: center;
  margin: 0 auto;
  padding: 64px 0 120px;
}

.lab-hero-copy::before {
  content: "";
  position: absolute;
  inset: 22px auto 78px -28px;
  width: min(940px, calc(100% + 56px));
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.34);
  box-shadow: 0 24px 80px rgba(2, 8, 14, 0.34);
  backdrop-filter: blur(1px);
}

.lab-hero-copy > * {
  position: relative;
  z-index: 1;
}

.lab-hero-copy .eyebrow {
  color: #83e0d4;
}

.lab-hero-copy h1 {
  max-width: 900px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.04;
  text-align: left;
  text-wrap: balance;
}

.lang-ko .lab-hero-copy h1 {
  max-width: 1040px;
  font-size: clamp(2.35rem, 5.55vw, 5.05rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  word-break: keep-all;
}

.lang-en .lab-hero-copy {
  width: min(1280px, calc(100% - 40px));
}

.lang-en .lab-hero-copy h1 {
  max-width: 1080px;
  font-size: clamp(2rem, 4.45vw, 4.65rem);
  line-height: 1.02;
  word-spacing: -0.02em;
}

.lab-hero-copy p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: clamp(0.98rem, 1.65vw, 1.12rem);
  line-height: 1.58;
  letter-spacing: -0.012em;
  word-break: keep-all;
  color: rgba(255, 255, 255, 0.88);
}

.lab-band {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.lab-section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.lab-section-head span {
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lab-section-head h2,
.lab-note h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.focus-grid article {
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.focus-grid h3 {
  margin: 0 0 12px;
  font-size: clamp(0.98rem, 1.1vw, 1.05rem);
}

.focus-grid p,
.achievement-list,
.lab-note p {
  color: var(--muted);
  line-height: 1.7;
}

.lab-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.achievement-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.metric-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-panel div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.metric-panel div:last-child {
  border-bottom: 0;
}

.metric-panel strong {
  color: var(--accent-strong);
  font-size: 2rem;
}

.metric-panel span {
  color: var(--muted);
  font-weight: 800;
}

.lab-note {
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .focus-grid,
  .lab-split,
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .focus-grid,
  .lab-split,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .lab-hero {
    min-height: 680px;
  }
  .lab-band {
    width: min(100% - 28px, 1280px);
    padding: 44px 0;
  }
}

.lang-ko [data-lang="en"],
.lang-en [data-lang="ko"] {
  display: none !important;
}
.language-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.language-switch button {
  min-width: 54px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switch button.active,
.language-switch button:hover {
  border-color: var(--accent);
  background: #e2f4f1;
  color: var(--accent-strong);
}


.topbar .language-switch {
  margin-left: auto;
}
.topbar > a {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.25;
  letter-spacing: 0;
}


.lab-hero-copy h1 span {
  display: block;
  width: 100%;
}


.research-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.research-links a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.research-links a:hover {
  border-color: var(--accent);
  background: #eef8f6;
}

.research-links span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.lab-profile {
  border-top: 1px solid var(--line);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.profile-grid h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.profile-grid p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-list {
  display: grid;
  gap: 10px;
}

.profile-list div,
.profile-highlight {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-list span,
.profile-highlight span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-list strong,
.profile-list a {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.4;
}

.profile-list a {
  text-decoration-color: rgba(45, 143, 130, 0.45);
  text-underline-offset: 3px;
}

.profile-highlight {
  margin-top: 16px;
}

.profile-highlight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}