:root {
  --ink: #101827;
  --muted: #607085;
  --paper: #fff;
  --soft: #f5f8fb;
  --line: #dfe7ef;
  --teal: #0e9b9d;
  --blue: #2457a7;
  --coral: #ee6a5a;
  --amber: #f1b93d;
  --shadow: 0 20px 58px rgba(16, 24, 39, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
img, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.96;
}
h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  line-height: 1.08;
}
h3 { margin: 0; font-size: 1.22rem; line-height: 1.2; }
p { color: var(--muted); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-header, .quiz-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.dark-header, .quiz-header { color: white; background: rgba(16, 24, 39, 0.94); border-color: rgba(255,255,255,.13); }
.nav-shell, .quiz-header {
  min-height: 68px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: radial-gradient(circle at 70% 25%, var(--amber) 0 16%, transparent 17%), linear-gradient(135deg, var(--teal), var(--blue));
}
.nav-links { display: flex; align-items: center; gap: 5px; }
.nav-links a, .quiz-header a:not(.brand) {
  padding: 9px 11px;
  border-radius: 8px;
  color: inherit;
  font-weight: 850;
  text-decoration: none;
}
.nav-links a:hover, .quiz-header a:not(.brand):hover { background: rgba(14, 155, 157, 0.1); color: var(--teal); }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span:not(.sr-only) { width: 18px; height: 2px; background: var(--ink); }

.home-hero {
  padding: 88px 0 58px;
  background: linear-gradient(180deg, #fff 0%, #f4f8fb 100%);
}
.home-hero-grid, .design-note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr);
  gap: 34px;
  align-items: end;
}
.home-copy { max-width: 880px; }
.home-copy p:not(.eyebrow) { max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.24rem); }
.home-rule, .content-panel, .station-model-card, #interaction-zone, .qr-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.home-rule { padding: 24px; }
.home-rule strong, .home-rule span { display: block; }
.home-rule span { color: var(--muted); font-weight: 850; }
.organ-gallery, .section-band { padding: 72px 0; }
.section-heading { max-width: 820px; margin-bottom: 30px; }

.real-organ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.real-organ-card {
  display: grid;
  grid-template-rows: auto 280px auto auto;
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(16, 24, 39, .11);
}
.organ-card-head { display: grid; gap: 10px; padding: 20px 20px 0; }
.organ-card-head span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 8px;
  color: #14696f;
  background: #e4f8f5;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.organ-card-head p { margin: 0; font-size: .94rem; }
.real-model-mini {
  position: relative;
  min-height: 280px;
  margin: 16px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #101827;
}
.model-chip {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 9px;
  border-radius: 8px;
  color: white;
  background: rgba(16, 24, 39, .84);
  font-size: .78rem;
  font-weight: 950;
}
.real-model-mini iframe, .real-model-frame { width: 100%; height: 100%; border: 0; background: #101827; }
.real-model-mini iframe { position: absolute; inset: 0; }
.layer-ladder { display: grid; gap: 8px; padding: 0 14px 14px; }
.layer-ladder div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.layer-ladder strong { color: var(--teal); font-size: .82rem; text-transform: uppercase; }
.layer-ladder span { color: #34475b; font-weight: 850; }
.organ-card-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(118px, 130px) minmax(118px, 130px);
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.button, .card-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 950;
  text-decoration: none;
}
.primary, .card-button.primary { color: white; background: var(--ink); box-shadow: 0 10px 28px rgba(16,24,39,.18); }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.qr-button {
  min-height: 140px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #34475b;
  background: white;
  font-size: .76rem;
  font-weight: 950;
  text-decoration: none;
}
.qr-button img, .quiz-qr-link img, .qr-callout img {
  width: 100px;
  height: 100px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.design-note { padding: 64px 0; color: white; background: var(--ink); }
.design-note p { color: #c9d5e5; }

.station-hero { padding: 76px 0 58px; background: linear-gradient(180deg, #fff 0%, #f5f8fb 100%); }
.station-hero-grid, .station-learning-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, .75fr);
  gap: 24px;
  align-items: stretch;
}
.station-hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.station-model-card, .compact-frame { min-height: 390px; overflow: hidden; }
.content-panel { padding: 24px; }
.term-list, .sensor-flow { display: grid; gap: 10px; }
.term-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.term-card strong { display: block; }
.term-card span { color: var(--muted); }
.sensor-flow span {
  padding: 12px;
  border-left: 4ppx solid var(--teal);
  border-radius: 8px;
  background: #edf8f7;
  font-weight: 900;
}
.alt-band { background: #f5f8fb; }
