:root {
  --navy: #071b38;
  --ink: #15243b;
  --muted: #64748b;
  --line: #dbe4ef;
  --bg: #f4f7fb;
  --blue: #2869ff;
  --blue2: #0d4fd4;
  --cyan: #2cc6e8;
  --purple: #7258e8;
  --green: #16a67a;
  --red: #e95b70;
  --gold: #f2b741;
  --shadow: 0 12px 34px rgba(18, 46, 86, 0.09);
}
.external-data-bar .error {
  color: var(--red);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.45;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  touch-action: none;
}
input[type="range"] {
  accent-color: var(--blue);
}
.eyebrow {
  margin: 0 0 5px;
  color: #6ed8ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.primary,
.secondary {
  min-height: 48px;
  border-radius: 13px;
  font-weight: 850;
}
.primary {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 12px 18px;
  box-shadow: 0 7px 16px rgba(40, 105, 255, 0.2);
}
.primary:hover:not(:disabled) {
  background: var(--blue2);
}
.secondary {
  border: 1px solid #bdcbe0;
  background: #fff;
  color: #34465f;
  padding: 11px 16px;
}
.compact {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 12px;
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 30% 18%, #164879, #06152c 60%);
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  overflow: auto;
}
.launch-card {
  width: min(850px, 100%);
  background: rgba(8, 31, 61, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.launch-card > h1 {
  font-size: 34px;
  margin: 4px 0;
}
.launch-card > p {
  color: #bdcce1;
  margin: 0 0 23px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}
.teacher-resume-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(125, 207, 255, 0.38);
  border-radius: 15px;
  background: rgba(40, 105, 255, 0.14);
}
.teacher-resume-panel small,
.teacher-resume-panel b {
  display: block;
}
.teacher-resume-panel small {
  color: #9fc4ef;
  font-size: 9px;
}
.teacher-resume-panel b {
  margin-top: 2px;
  color: #fff;
  font-size: 13px;
}
.teacher-resume-panel button {
  flex: 0 0 auto;
  min-height: 42px;
}
.mode-card {
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  padding: 20px;
  text-align: left;
}
.mode-card:hover {
  border-color: #65d0fa;
  background: rgba(255, 255, 255, 0.11);
}
.mode-card > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--blue);
  font-size: 22px;
  margin-bottom: 18px;
}
.mode-card.teacher > span {
  background: var(--purple);
}
.mode-card.continue > span {
  background: #16a67a;
}
.mode-card b,
.mode-card small {
  display: block;
}
.mode-card b {
  font-size: 18px;
}
.mode-card small {
  font-size: 11px;
  color: #b9c9de;
  margin-top: 6px;
}
.continue-file-status {
  min-height: 18px;
  margin: 10px 2px 0 !important;
  color: #8edcff !important;
  font-size: 10px;
}
.continue-file-status.error {
  color: #ff9eaa !important;
}
.mode-form {
  position: relative;
  max-width: 480px;
  margin: 15px auto 0;
  background: #fff;
  color: var(--ink);
  padding: 24px;
  border-radius: 18px;
}
.mode-form h2,
.mode-form small {
  display: block;
  margin: 0;
}
.mode-form label {
  display: block;
  margin-top: 13px;
  font-size: 12px;
  font-weight: 800;
}
.mode-form input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px;
  margin-top: 5px;
  border: 1px solid #cfd9e7;
  border-radius: 11px;
}
.mode-form label > small {
  margin-top: 5px;
  color: #718097;
  font-size: 9px;
  font-weight: 600;
}
.form-back {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  background: #edf2f8;
  border-radius: 9px;
  width: 36px;
  height: 36px;
}
.form-error {
  min-height: 18px;
  margin: 8px 0 0;
  color: #d43e56;
  font-size: 11px;
}
.hero {
  min-height: 116px;
  padding: 25px max(24px, calc((100vw - 1180px) / 2));
  background: linear-gradient(120deg, #061a38, #0d3768);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}
.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.resource-button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 10px 15px;
  font-weight: 850;
}
.mission-badge {
  min-width: 180px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}
.mission-badge span,
.mission-badge strong {
  display: block;
}
.mission-badge span {
  font-size: 10px;
  color: #8edcff;
}
.mission-badge strong {
  font-size: 14px;
  margin-top: 2px;
}
.mission-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  box-shadow: 0 4px 16px rgba(16, 39, 74, 0.05);
}
.nav-step {
  position: relative;
  min-height: 68px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 34px auto;
  grid-template-rows: auto auto;
  text-align: left;
  align-content: center;
  justify-content: center;
  column-gap: 9px;
}
.nav-step > span {
  grid-row: 1/3;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e9eef5;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}
.nav-step b {
  font-size: 13px;
}
.nav-step small {
  font-size: 10px;
}
.nav-step.active {
  background: #f5f8ff;
  color: var(--blue);
}
.nav-step.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--blue);
}
.nav-step.active > span,
.nav-step.complete > span {
  background: var(--blue);
  color: #fff;
}
.nav-step.complete {
  color: var(--ink);
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 34px 24px 80px;
}
.stage {
  display: none;
}
.stage.active {
  display: block;
  animation: stageIn 0.25s ease;
}
@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.stage-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}
.stage-head > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}
.stage-head small,
.stage-head h2 {
  display: block;
  margin: 0;
}
.stage-head small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}
.stage-head h2 {
  font-size: clamp(21px, 3vw, 29px);
  letter-spacing: -0.035em;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.panel-head small,
.panel-head h3 {
  display: block;
  margin: 0;
}
.panel-head small {
  font-size: 10px;
  color: var(--muted);
}
.panel-head h3 {
  font-size: 16px;
}
.principle-lab {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
}
.principle-lab.observation-only {
  grid-template-columns: 1fr;
}
.principle-lab.observation-only .signal-workbench {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
}
.principle-lab.observation-only .principle-readouts {
  grid-column: 1;
}
.orbit-workbench,
.spectrum-card,
.graph-card,
.hypothesis-notebook,
.experiment-lab,
.conclusion-notebook,
.analysis-station,
.calculation-card,
.final-report,
.success-reveal {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.orbit-workbench {
  padding: 16px;
  min-width: 0;
}
.orbit-workbench canvas {
  border-radius: 15px;
  background: linear-gradient(145deg, #061831, #0d315c);
}
.drag-hint {
  text-align: center;
  padding: 10px 5px 0;
  color: var(--muted);
  font-size: 11px;
}
.external-data-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #dbe4f1;
  border-radius: 13px;
  background: #f7f9fc;
}
.external-data-bar small,
.external-data-bar b {
  display: block;
}
.external-data-bar small {
  font-size: 9px;
  color: var(--muted);
}
.external-data-bar b {
  font-size: 11px;
}
.external-data-bar select {
  min-height: 40px;
  border: 1px solid #cbd6e5;
  border-radius: 9px;
  background: #fff;
  padding: 6px 8px;
  font-size: 10px;
}
.file-upload {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.file-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.external-data-bar > p {
  grid-column: 1/-1;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}
.external-data-bar > p.error {
  color: var(--red);
}
.external-data-bar > p a {
  margin-left: 5px;
  color: var(--blue);
  font-weight: 800;
}
.signal-workbench {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
  min-width: 0;
}
.spectrum-card,
.graph-card {
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}
.spectrum-card canvas {
  border-radius: 12px;
  background: #071b38;
}
.spectrum-card strong {
  padding: 5px 8px;
  border-radius: 8px;
  background: #e9f1ff;
  color: var(--blue);
  font-size: 10px;
}
.graph-card canvas {
  border: 1px solid #e2e9f2;
  border-radius: 12px;
  cursor: grab;
  touch-action: pan-y;
}
.graph-card canvas:active {
  cursor: grabbing;
}
.graph-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.graph-tools > span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.velocity-legend {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.velocity-legend i {
  display: inline-block;
  width: 14px;
  border-top: 3px solid;
  margin: 0 3px 2px 6px;
}
.velocity-legend i.approach {
  border-color: #2774f0;
}
.velocity-legend i.recede {
  border-color: #e05262;
}
.graph-pan-hint {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: #8794a7;
  font-size: 9px;
}
.graph-pan-hint span:first-child {
  color: var(--ink);
  font-weight: 800;
}
.mini-legend {
  font-size: 10px;
  color: var(--muted);
}
.mini-legend i,
.curve-key {
  display: inline-block;
  width: 18px;
  border-top: 3px solid var(--blue);
  margin-right: 5px;
  vertical-align: middle;
}
.principle-readouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.principle-readouts div {
  background: #eef4ff;
  border-radius: 12px;
  padding: 10px;
}
.principle-readouts small,
.principle-readouts b {
  display: block;
}
.principle-readouts small {
  font-size: 9px;
  color: var(--muted);
}
.principle-readouts b {
  font-size: 13px;
  margin-top: 2px;
}
.time-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
}
.time-control output {
  color: var(--blue);
}
.time-control input {
  grid-column: 1/-1;
  width: 100%;
  min-height: 28px;
}
.guide-question {
  margin-top: 16px;
  padding: 17px 19px;
  border: 1px solid #ccdafa;
  border-radius: 17px;
  background: #eaf1ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.guide-question small,
.guide-question h3 {
  display: block;
  margin: 0;
}
.guide-question small {
  font-size: 10px;
  color: var(--blue);
  font-weight: 900;
}
.guide-question h3 {
  font-size: 16px;
}
.guide-question p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.choice-row {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.choice-row button {
  min-height: 46px;
  border: 1px solid #b8c9e5;
  background: #fff;
  border-radius: 12px;
  padding: 10px 15px;
  font-weight: 800;
}
.choice-row button.selected {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: #fff;
}
.stage-action {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 11px 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(18, 46, 86, 0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stage-action p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.next {
  min-width: 205px;
}
.next span {
  margin-left: 12px;
}
.hypothesis-notebook {
  padding: 17px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 17px;
}
.notebook-title {
  display: flex;
  gap: 10px;
  align-items: center;
}
.notebook-title > span {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eeeaff;
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 19px;
}
.notebook-title small,
.notebook-title h3 {
  display: block;
  margin: 0;
}
.notebook-title small {
  font-size: 9px;
  color: var(--muted);
}
.notebook-title h3 {
  font-size: 15px;
}
.hypothesis-sentences {
  display: grid;
  gap: 7px;
}
.hypothesis-sentences label {
  font-size: 12px;
  font-weight: 700;
}
.hypothesis-sentences select,
.conclusion-sentences select {
  min-height: 38px;
  border: 1px solid #cbd6e5;
  border-radius: 9px;
  padding: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}
.experiment-lab {
  margin-top: 14px;
  overflow: hidden;
}
.experiment-lab.locked {
  opacity: 0.48;
  pointer-events: none;
}
.experiment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.experiment-tabs button {
  min-height: 56px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}
.experiment-tabs button.active {
  background: #eef4ff;
  color: var(--blue);
}
.experiment-tabs span {
  margin-left: 8px;
  padding: 3px 6px;
  border-radius: 7px;
  background: #e4eaf3;
  font-size: 9px;
}
.experiment-tabs button.active span {
  background: #fff;
}
.experiment-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  padding: 16px;
}
.experiment-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.experiment-metaphor {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 13px;
  background: #eef4ff;
}
.experiment-metaphor > span {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.experiment-metaphor small,
.experiment-metaphor b {
  display: block;
}
.experiment-metaphor small {
  font-size: 9px;
  color: var(--blue);
}
.experiment-metaphor b {
  font-size: 12px;
}
.experiment-controls > label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  font-size: 11px;
  font-weight: 850;
}
.experiment-controls output {
  color: var(--blue);
}
.experiment-controls input {
  grid-column: 1/-1;
  width: 100%;
  min-height: 29px;
}
.dependent-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dependent-readouts div {
  padding: 10px;
  background: #f4f7fb;
  border-radius: 11px;
}
.dependent-readouts small,
.dependent-readouts strong {
  display: block;
}
.dependent-readouts small {
  font-size: 9px;
  color: var(--muted);
}
.dependent-readouts strong {
  font-size: 14px;
}
.experiment-visual {
  min-width: 0;
}
.experiment-visual canvas {
  border: 1px solid #e2e9f2;
  border-radius: 14px;
}
.experiment-visual p {
  margin: 7px 2px 0;
  text-align: right;
  font-size: 10px;
  color: var(--muted);
}
.data-table-wrap {
  border-top: 1px solid var(--line);
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.data-table th {
  background: #f3f6fa;
  color: var(--muted);
  font-size: 10px;
}
.data-table tbody tr:nth-child(even) {
  background: #f8faff;
}
.empty-row {
  color: #94a0b1;
}
.conclusion-notebook {
  margin-top: 14px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}
.conclusion-notebook small,
.conclusion-notebook h3 {
  display: block;
  margin: 0;
}
.conclusion-notebook small {
  font-size: 10px;
  color: var(--muted);
}
.conclusion-notebook h3 {
  font-size: 16px;
}
.conclusion-sentences {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.conclusion-sentences label {
  font-size: 12px;
  font-weight: 700;
}
.conclusion-notebook p {
  grid-column: 2/-1;
  margin: 0;
  font-size: 11px;
  color: var(--red);
}
.mission-brief {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-radius: 15px;
  background: #071b38;
  color: #fff;
  margin-bottom: 14px;
}
.mission-brief span {
  padding: 8px 9px;
  border-radius: 9px;
  background: #fff;
  color: #071b38;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.mission-brief p {
  margin: 0;
  font-size: 13px;
  color: #d9e5f5;
}
.analysis-station {
  padding: 16px;
}
.ruler-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}
.ruler-toolbar > div {
  margin-right: auto;
}
.ruler-toolbar small,
.ruler-toolbar h3 {
  display: block;
  margin: 0;
}
.ruler-toolbar small {
  font-size: 9px;
  color: var(--muted);
}
.ruler-toolbar h3 {
  font-size: 16px;
}
.ruler-mode {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 850;
}
.ruler-mode.active {
  border-color: var(--blue);
  background: #eef4ff;
  color: var(--blue);
}
.analysis-station canvas {
  border: 1px solid #dfe7f1;
  border-radius: 14px;
}
.ruler-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 2px 0;
}
.ruler-readout small,
.ruler-readout strong {
  display: block;
}
.ruler-readout small {
  font-size: 10px;
  color: var(--muted);
}
.ruler-readout strong {
  font-size: 16px;
  color: var(--blue);
}
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.calculation-card {
  position: relative;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
}
.calc-number {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #eaf1ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.calculation-card small,
.calculation-card h3 {
  display: block;
  margin: 0;
}
.calculation-card small {
  font-size: 9px;
  color: var(--muted);
}
.calculation-card h3 {
  font-size: 15px;
}
.calculation-card label {
  grid-column: 1/3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}
.calculation-card input,
.report-fields input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cad5e4;
  border-radius: 10px;
  padding: 8px;
}
.calculation-card button {
  grid-column: 3;
  grid-row: 2/4;
}
.calc-result {
  grid-column: 1/3;
  padding: 10px;
  border-radius: 10px;
  background: #f3f6fb;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}
.final-report {
  margin-top: 14px;
  padding: 18px;
}
.final-report small,
.final-report h3 {
  display: block;
  margin: 0;
}
.final-report small {
  font-size: 9px;
  color: var(--muted);
}
.final-report h3 {
  font-size: 18px;
}
.report-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
  margin-top: 12px;
}
.report-fields label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 850;
}
.report-fields input {
  grid-column: 1;
}
.report-fields input[readonly] {
  background: #eef3fb;
  color: #244b86;
  font-weight: 850;
}
.stage-two-report-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d5dfef;
  border-radius: 14px;
  background: #f8faff;
  color: #4d5d73;
  font-size: 11px;
  font-weight: 800;
}
.stage-two-report-field textarea {
  width: 100%;
  min-height: 190px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.65;
}
.stage-two-report-field > small {
  color: #718097;
  font-size: 9px;
  font-weight: 650;
}
.stage-two-report-field > small.ready {
  color: #16875a;
}
.launch-probe {
  display: block;
  margin: 15px auto 0;
  min-width: 300px;
}
.launch-probe span {
  margin-left: 12px;
}
.final-report > p {
  text-align: center;
  margin: 9px 0 0;
  min-height: 18px;
  color: var(--red);
  font-size: 11px;
}
.success-reveal {
  margin-top: 16px;
  overflow: hidden;
  text-align: center;
  background: #061831;
  color: #fff;
}
.success-copy {
  padding: 24px 18px 12px;
}
.success-copy small {
  color: #73ddff;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.success-copy h2 {
  margin: 5px 0;
  font-size: 28px;
}
.success-copy p {
  margin: 0;
  color: #c4d6ec;
}
.success-reveal canvas {
  background: #061831;
  cursor: grab;
  touch-action: none;
}
.success-reveal canvas:active {
  cursor: grabbing;
}
.success-reveal button {
  margin: 15px 0 22px;
}
.result-action-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result-action-row button {
  min-width: 190px;
}
.result-preview-modal {
  z-index: 130;
  backdrop-filter: blur(7px);
}
.result-preview-dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 28px;
  border-radius: 24px;
  background: #f7f9fd;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  text-align: left;
}
.result-preview-head {
  padding-right: 48px;
}
.result-preview-head small,
.preview-report > small,
.preview-evidence-grid small {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.result-preview-head h2 {
  margin: 3px 0 4px;
  font-size: 25px;
}
.result-preview-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.preview-candidate {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(120deg, #102b55, #154c83);
  color: #fff;
}
.preview-candidate span {
  grid-column: 1 / -1;
  color: #9ddfff;
  font-size: 9px;
  font-weight: 900;
}
.preview-candidate strong {
  font-size: 24px;
}
.preview-candidate b {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #e8f6ff;
  font-size: 10px;
}
.preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 10px;
}
.preview-metrics > div,
.preview-evidence-grid > section,
.preview-report {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.preview-metrics > div {
  padding: 13px;
}
.preview-metrics small,
.preview-metrics b {
  display: block;
}
.preview-metrics small {
  color: var(--muted);
  font-size: 9px;
}
.preview-metrics b {
  margin-top: 4px;
  color: #19365e;
  font-size: 16px;
}
.preview-evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}
.preview-evidence-grid > section,
.preview-report {
  padding: 14px 16px;
}
.preview-evidence-grid p,
.preview-report p {
  margin: 6px 0 0;
  color: #40516a;
  font-size: 11px;
  line-height: 1.7;
}
.preview-report {
  margin-top: 9px;
}
.preview-report p {
  max-height: 210px;
  overflow: auto;
  white-space: pre-wrap;
}
.preview-save-feedback {
  min-height: 18px;
  margin: 9px 0 0;
  color: #16875a;
  font-size: 10px;
  text-align: center;
}
.preview-actions {
  margin-top: 4px;
}
.preview-actions button {
  margin: 0;
  min-width: 170px;
}
.generated-target-banner {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #a9c2ff;
  border-radius: 16px;
  background: linear-gradient(100deg, #eef4ff, #f8fbff);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.generated-target-banner > span {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 38px;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}
.generated-target-banner small,
.generated-target-banner b {
  display: block;
}
.generated-target-banner small {
  font-size: 9px;
  color: var(--blue);
  font-weight: 850;
}
.generated-target-banner b {
  font-size: 12px;
  margin-top: 2px;
}
.embedded-mission {
  margin-top: 24px;
  padding-top: 24px;
}
.embedded-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.embedded-head > span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 42px;
  border-radius: 12px;
  background: #7258e8;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}
.embedded-head small,
.embedded-head h2 {
  display: block;
  margin: 0;
}
.embedded-head small {
  font-size: 10px;
  color: #7258e8;
  font-weight: 850;
}
.embedded-head h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}
.mission-brief.mystery {
  background: linear-gradient(110deg, #102a53, #394d91);
}
.mystery-builder {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}
.mystery-controls,
.mystery-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}
.builder-title small,
.builder-title h3 {
  display: block;
  margin: 0;
}
.builder-title small {
  font-size: 9px;
  color: var(--blue);
  font-weight: 900;
}
.builder-title h3 {
  font-size: 18px;
}
.mystery-controls > label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 15px;
  font-size: 11px;
  font-weight: 850;
}
.mystery-controls output {
  color: var(--blue);
}
.mystery-controls input[type="range"] {
  grid-column: 1/-1;
  width: 100%;
  min-height: 30px;
}
.mystery-controls .name-control {
  grid-template-columns: 1fr;
}
.mystery-controls .name-control input {
  min-height: 44px;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
}
.builder-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 18px;
}
.builder-actions button {
  min-height: 46px;
}
.builder-feedback {
  min-height: 32px;
  margin: 10px 1px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.mystery-preview canvas {
  border-radius: 15px;
  background: #071b38;
}
.sealed-badge {
  padding: 5px 8px;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.mystery-readouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.mystery-readouts div {
  padding: 11px;
  border-radius: 11px;
  background: #eef4ff;
}
.mystery-readouts small,
.mystery-readouts b {
  display: block;
}
.mystery-readouts small {
  font-size: 9px;
  color: var(--muted);
}
.mystery-readouts b {
  font-size: 12px;
  margin-top: 2px;
}
footer {
  text-align: center;
  padding: 26px;
  color: #8794a6;
  font-size: 10px;
}
.teacher-dashboard {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  background: linear-gradient(125deg, #061a38, #0f3e72);
  color: #fff;
  border-radius: 22px;
  padding: 26px;
}
.dashboard-head h1,
.dashboard-head p {
  margin: 0;
}
.dashboard-head > div > span {
  color: #b8c8de;
  font-size: 12px;
}
.room-code-box {
  text-align: center;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 11px 19px;
}
.room-code-box small,
.room-code-box strong {
  display: block;
}
.room-code-box strong {
  font-size: 28px;
  letter-spacing: 0.13em;
}
.room-code-box button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  text-decoration: underline;
}
.dashboard-actions {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.dashboard-summary > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
}
.dashboard-summary small,
.dashboard-summary strong {
  display: block;
}
.dashboard-summary small {
  font-size: 10px;
  color: var(--muted);
}
.dashboard-summary strong {
  font-size: 22px;
}
.dashboard-table-wrap {
  margin-top: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 19px;
  box-shadow: var(--shadow);
  overflow: auto;
}
.dashboard-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dashboard-table-head small,
.dashboard-table-head h2 {
  margin: 0;
}
.dashboard-table-head span {
  font-size: 10px;
  color: var(--muted);
}
.empty-roster {
  text-align: center;
  padding: 38px;
  color: var(--muted);
}
.roster-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.roster-table th,
.roster-table td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
}
.roster-table th {
  font-size: 9px;
  color: var(--muted);
}
.stage-badge {
  display: inline-block;
  background: #edf3ff;
  color: var(--blue);
  border-radius: 8px;
  padding: 4px 7px;
  font-weight: 800;
}
.resource-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(3, 13, 28, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
}
.resource-dialog {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 27px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}
.resource-dialog > small {
  font-size: 10px;
  color: var(--blue);
  font-weight: 800;
}
.resource-dialog h2 {
  margin: 3px 0 14px;
}
.modal-close {
  position: absolute;
  right: 17px;
  top: 15px;
  border: 0;
  background: #eef2f7;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 21px;
}
.download-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  margin-top: 9px;
  text-decoration: none;
  color: var(--ink);
}
.download-card > span {
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  padding: 8px 6px;
}
.download-card b,
.download-card small {
  display: block;
}
.download-card b {
  font-size: 13px;
}
.download-card small {
  font-size: 10px;
  color: var(--muted);
}
.download-card i {
  font-size: 20px;
  color: var(--blue);
}
@media (max-width: 900px) {
  .hero {
    padding: 20px 18px;
  }
  .mission-badge {
    display: none;
  }
  .principle-lab {
    grid-template-columns: 1fr;
  }
  .principle-lab.observation-only .signal-workbench {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .principle-lab.observation-only .principle-readouts {
    grid-column: auto;
  }
  .orbit-workbench canvas {
    height: 420px;
  }
  .hypothesis-notebook,
  .conclusion-notebook {
    grid-template-columns: 1fr;
  }
  .hypothesis-notebook button,
  .conclusion-notebook button {
    width: 100%;
  }
  .conclusion-notebook p {
    grid-column: 1;
  }
  .experiment-body {
    grid-template-columns: 260px 1fr;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .mystery-builder {
    grid-template-columns: 300px 1fr;
  }
  .free-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-actions {
    flex-wrap: wrap;
  }
  .teacher-dashboard {
    padding: 24px 14px;
  }
}
@media (max-width: 680px) {
  .hero h1 {
    font-size: 22px;
  }
  .mission-nav {
    overflow-x: auto;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
  main {
    padding: 25px 14px 70px;
  }
  .stage-head {
    align-items: flex-start;
  }
  .guide-question,
  .stage-action,
  .ruler-readout {
    align-items: stretch;
    flex-direction: column;
  }
  .choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .next {
    width: 100%;
  }
  .external-data-bar {
    grid-template-columns: 1fr 1fr;
  }
  .external-data-bar > div {
    grid-column: 1/-1;
  }
  .experiment-body,
  .mystery-builder {
    grid-template-columns: 1fr;
  }
  .experiment-tabs {
    position: sticky;
    top: 68px;
    z-index: 3;
  }
  .ruler-toolbar {
    flex-wrap: wrap;
  }
  .ruler-toolbar > div {
    width: 100%;
  }
  .calculation-card {
    grid-template-columns: 38px 1fr;
  }
  .calculation-card label,
  .calc-result {
    grid-column: 1/-1;
  }
  .calculation-card button {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .report-fields {
    grid-template-columns: 1fr;
  }
  .launch-probe {
    width: 100%;
    min-width: 0;
  }
  .success-copy h2 {
    font-size: 23px;
  }
  .generated-target-banner {
    grid-template-columns: auto 1fr;
  }
  .generated-target-banner button {
    grid-column: 1/-1;
  }
  .mystery-readouts {
    grid-template-columns: 1fr;
  }
  .dashboard-summary {
    grid-template-columns: 1fr;
  }
  .dashboard-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  .launch-card {
    padding: 23px;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .mode-card {
    min-height: 118px;
  }
  .mode-card > span {
    margin-bottom: 7px;
  }
  .result-preview-modal {
    padding: 10px;
  }
  .result-preview-dialog {
    max-height: calc(100vh - 20px);
    padding: 22px 16px 18px;
    border-radius: 18px;
  }
  .preview-candidate {
    grid-template-columns: 1fr;
  }
  .preview-candidate b {
    justify-self: start;
  }
  .preview-metrics,
  .preview-evidence-grid {
    grid-template-columns: 1fr 1fr;
  }
  .preview-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .preview-actions button {
    width: 100%;
    min-width: 0;
  }
  .teacher-resume-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .hero {
    align-items: flex-start;
  }
  .hero-actions {
    margin-left: auto;
  }
  .resource-button {
    min-width: 72px;
  }
  .principle-readouts {
    grid-template-columns: 1fr;
  }
  .choice-row {
    grid-template-columns: 1fr;
  }
  .hypothesis-sentences label {
    line-height: 2.2;
  }
  .conclusion-sentences {
    display: grid;
  }
  .ruler-mode {
    flex: 1;
  }
  .stage-head > span {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }
}
.launch-brand {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 2;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.mystery-data-bar {
  margin: 0 0 16px;
  background: #fff;
}
.mystery-preview canvas {
  cursor: grab;
}
.mystery-preview canvas:active {
  cursor: grabbing;
}
.mystery-readouts {
  grid-template-columns: repeat(2, 1fr);
}
.submission-feedback {
  margin: -8px 0 18px;
  color: #8edcff;
  font-size: 11px;
}
@media (max-width: 680px) {
  .launch-brand {
    top: 14px;
    left: 16px;
    font-size: 13px;
  }
  .launch-card {
    margin-top: 28px;
  }
}
.periodicity-activity {
  margin-top: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.activity-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.activity-title > span {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.activity-title small,
.activity-title h3 {
  display: block;
  margin: 0;
}
.activity-title small {
  font-size: 9px;
  color: var(--blue);
  font-weight: 850;
}
.activity-title h3 {
  font-size: 16px;
}
.periodicity-activity canvas {
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  cursor: crosshair;
  touch-action: none;
}
.periodicity-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
}
.periodicity-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.periodicity-ruler-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #f7f9fc;
}
.periodicity-ruler-toolbar,
.periodicity-ruler-readout {
  display: flex;
  align-items: center;
  gap: 9px;
}
.periodicity-ruler-toolbar > div {
  margin-right: auto;
}
.periodicity-ruler-toolbar small,
.periodicity-ruler-toolbar strong,
.periodicity-ruler-readout small,
.periodicity-ruler-readout strong {
  display: block;
}
.periodicity-ruler-toolbar small,
.periodicity-ruler-readout small {
  color: var(--muted);
  font-size: 9px;
}
.periodicity-ruler-mode {
  min-height: 38px;
  border: 1px solid #cbd7e7;
  border-radius: 10px;
  background: #fff;
  color: #526178;
  font-weight: 850;
}
.periodicity-ruler-mode.active {
  border-color: var(--blue);
  background: #eaf1ff;
  color: var(--blue);
}
.periodicity-ruler-readout {
  justify-content: space-between;
  margin-top: 9px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fff;
}
.periodicity-ruler-readout strong {
  margin-top: 3px;
  color: #e04f67;
}
#periodicityMeasurementResult {
  margin: 9px 2px 0;
  color: #315c9e;
  font-size: 10px;
  font-weight: 800;
}
@media (max-width: 680px) {
  .periodicity-ruler-toolbar,
  .periodicity-ruler-readout {
    flex-wrap: wrap;
  }
  .periodicity-ruler-toolbar > div {
    width: 100%;
  }
  .periodicity-ruler-readout button {
    width: 100%;
  }
}
.stage-one-analysis {
  margin-top: 16px;
}
.stage-one-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(120deg, #152a59, #254c94);
  color: #fff;
}
.stage-one-analysis-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stage-one-analysis-head > div > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #7357e8;
  font-size: 12px;
  font-weight: 950;
}
.stage-one-analysis-head small,
.stage-one-analysis-head h2 {
  display: block;
  margin: 0;
}
.stage-one-analysis-head small {
  color: #bcd1ef;
  font-size: 9px;
}
.stage-one-analysis-head h2 {
  font-size: 20px;
}
.stage-one-analysis-head > b {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #dce9fb;
}
.stage-one-flow {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  list-style: none;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  background: #eef3fa;
}
.stage-one-panel {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(18, 46, 86, 0.06);
}
.stage-one-panel.locked {
  opacity: 0.48;
  pointer-events: none;
}
.stage-one-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-one-panel-head > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #eeeaff;
  color: #7258e8;
  font-size: 12px;
  font-weight: 950;
}
.stage-one-panel-head h3,
.stage-one-panel-head small {
  display: block;
  margin: 0;
}
.stage-one-panel-head h3 {
  font-size: 16px;
}
.stage-one-panel-head small {
  color: #7258e8;
  font-size: 9px;
  font-weight: 850;
}
.stage-one-panel > p {
  margin: 9px 0 12px 44px;
  color: var(--muted);
  font-size: 11px;
}
.period-analysis-principle {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 12px 44px;
}
.period-analysis-principle > div {
  position: relative;
  min-width: 0;
  padding: 12px 11px 11px 42px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f7f9fc;
}
.period-analysis-principle > div > span {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e8efff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
}
.period-analysis-principle b,
.period-analysis-principle small {
  display: block;
}
.period-analysis-principle b {
  margin-bottom: 4px;
  font-size: 11px;
}
.period-analysis-principle small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.period-analysis-principle > i {
  align-self: center;
  color: #8da0b9;
  font-style: normal;
  font-weight: 900;
}
.stage-one-hypothesis,
.stage-one-input,
.stage-one-model-description {
  margin: 0 0 11px 44px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #f3f6fb;
  color: #536178;
  font-size: 11px;
}
.stage-one-hypothesis {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 15px;
}
.stage-one-hypothesis > strong {
  color: var(--blue);
}
.stage-one-hypothesis label:last-child {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.stage-one-hypothesis input[type="number"] {
  width: 92px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #cbd6e5;
  border-radius: 8px;
}
.stage-one-panel > button {
  margin-left: 44px;
  width: calc(100% - 44px);
}
.stage-one-visual {
  margin: 13px 0 0 44px;
  padding: 13px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fbfcfe;
}
.stage-one-visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.stage-one-visual-head strong {
  font-size: 13px;
}
.stage-one-visual-head span {
  color: var(--muted);
  font-size: 9px;
}
.stage-one-visual canvas {
  border: 1px solid #e1e8f2;
  border-radius: 11px;
  background: #fff;
}
.period-scan-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.period-scan-status > span {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: #eef4ff;
}
.period-scan-status small,
.period-scan-status b {
  display: block;
}
.period-scan-status small {
  margin-bottom: 2px;
  color: #6f7e93;
  font-size: 8px;
  font-weight: 800;
}
.period-scan-status b {
  overflow: hidden;
  color: #1d56bd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period-subgraphs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.period-subgraphs section {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #fff;
}
.period-subgraph-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
  margin-bottom: 8px;
}
.period-subgraph-head > span {
  grid-row: 1 / 3;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eaf1ff;
  color: #2869ff;
  font-size: 9px;
  font-weight: 900;
}
.period-subgraph-head b,
.period-subgraph-head small {
  display: block;
  min-width: 0;
}
.period-subgraph-head b {
  color: #17243a;
  font-size: 11px;
}
.period-subgraph-head small {
  overflow: hidden;
  color: #718097;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period-correlation-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.period-correlation-strip > span {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f2f5fa;
}
.period-correlation-strip small,
.period-correlation-strip b {
  display: block;
}
.period-correlation-strip small {
  margin-bottom: 2px;
  color: #718097;
  font-size: 8px;
}
.period-correlation-strip b {
  color: #17243a;
  font-size: 12px;
}
.orbit-fit-step {
  margin-bottom: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fff3f5;
  color: #b43e52;
  font-size: 10px;
  font-weight: 800;
}
.stage-one-result {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eaf1ff;
  color: #194da9;
  font-size: 11px;
  font-weight: 750;
}
.stage-one-model-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px 44px;
}
.stage-one-model-row label,
.stage-one-conclusion-fields label {
  display: grid;
  gap: 6px;
  color: #4d5d73;
  font-size: 11px;
  font-weight: 800;
}
.stage-one-model-row select,
.stage-one-conclusion-fields select,
.stage-one-conclusion-fields input,
.stage-one-conclusion-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #cbd6e5;
  border-radius: 9px;
  background: #fff;
}
.stage-one-model-row input[type="range"] {
  width: 100%;
}
.stage-one-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}
.stage-one-comparison span {
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef2f8;
  color: #33445d;
  font-weight: 800;
}
.stage-one-conclusion-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 11px 44px;
}
.stage-one-conclusion-fields label:last-child {
  grid-column: 1 / -1;
}
.stage-one-conclusion-fields textarea {
  resize: vertical;
}
.ai-report-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ai-write-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #9db8f5;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef4ff, #f2edff);
  color: #315fbf;
  font-size: 10px;
  font-weight: 900;
}
.ai-write-button::before {
  content: '✦ ';
}
.ai-report-field > small {
  color: #718097;
  font-size: 9px;
  font-weight: 650;
}
.ai-report-field > small.ready {
  color: #16875a;
}
@media (max-width: 680px) {
  .stage-one-analysis-head {
    align-items: flex-start;
  }
  .stage-one-analysis-head > b {
    display: none;
  }
  .stage-one-panel > p,
  .period-analysis-principle,
  .stage-one-hypothesis,
  .stage-one-input,
  .stage-one-model-description,
  .stage-one-panel > button,
  .stage-one-visual,
  .stage-one-model-row,
  .stage-one-conclusion-fields {
    margin-left: 0;
    width: 100%;
  }
  .period-analysis-principle {
    grid-template-columns: 1fr;
  }
  .period-analysis-principle > i {
    display: none;
  }
  .stage-one-model-row,
  .stage-one-conclusion-fields {
    grid-template-columns: 1fr;
  }
  .stage-one-conclusion-fields label:last-child {
    grid-column: auto;
  }
  .ai-report-prompt {
    align-items: flex-start;
    flex-direction: column;
  }
  .period-subgraphs {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 681px) and (max-width: 980px) {
  .period-subgraphs {
    grid-template-columns: 1fr;
  }
}
.curve-key.reference {
  border-color: #aab3c0;
  margin-left: 10px;
}
.hypothesis-feedback {
  min-height: 16px;
  margin: 0;
  color: var(--red);
  font-size: 10px;
}

/* 과학사 기반 발견 서사: 기존 패널 구조를 유지하고 사건·증거·발견 기록만 덧붙입니다. */
.discovery-incident,
.evidence-ledger,
.discovery-notebook {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #cbd9ec;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f4f8ff);
  box-shadow: var(--shadow);
}
.discovery-incident {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(310px, .85fr);
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--blue);
}
.incident-mark {
  padding: 8px 10px;
  border-radius: 10px;
  background: #071b38;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.discovery-incident small,
.discovery-incident h3,
.evidence-ledger small,
.evidence-ledger h3,
.discovery-notebook small,
.discovery-notebook h3 {
  display: block;
  margin: 0;
}
.discovery-incident small,
.evidence-ledger small,
.discovery-notebook small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}
.discovery-incident h3,
.evidence-ledger h3,
.discovery-notebook h3 {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.45;
}
.incident-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
.incident-facts div,
.new-observation-values span {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eaf1ff;
}
.incident-facts dt {
  color: #66768d;
  font-size: 9px;
  font-weight: 800;
}
.incident-facts dd {
  margin: 3px 0 0;
  color: #173e8d;
  font-size: 13px;
  font-weight: 900;
}
.discovery-calculator {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(2, minmax(150px, .7fr)) auto;
  align-items: end;
  gap: 10px;
  margin: 14px 0 0;
  padding: 15px;
  border: 1px dashed #8eb1eb;
  border-radius: 15px;
  background: #f5f8ff;
}
.discovery-calculator h4,
.discovery-calculator p {
  margin: 0;
}
.discovery-calculator h4 { font-size: 15px; }
.discovery-calculator p { margin-top: 3px; color: #6a7890; font-size: 10px; }
.discovery-calculator small { color: var(--blue); font-weight: 900; }
.discovery-calculator label,
.calculation-card label {
  position: relative;
  display: grid;
  gap: 4px;
  color: #5e6d82;
  font-size: 10px;
  font-weight: 850;
}
.discovery-calculator input {
  width: 100%;
  min-height: 43px;
  padding: 9px 42px 9px 10px;
  border: 1px solid #c8d5e7;
  border-radius: 10px;
  background: #fff;
}
.discovery-calculator label > span { position: absolute; right: 10px; bottom: 12px; }
.discovery-calculator .calc-result,
.orbit-shape-result {
  grid-column: 1 / -1;
}
.source-values {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}
.source-values span {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  background: #e5edfb;
  color: #54657d;
  font-size: 10px;
}
.source-values b { float: right; color: #173e8d; }
.orbit-shape-result {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  background: #eaf1ff;
}
.orbit-shape-result canvas { border-radius: 9px; }
.orbit-shape-result strong { font-size: 16px; }
.needs-check { color: #c13f55 !important; background: #fff0f2 !important; }
.discovery-notebook { margin-top: 18px; }
.discovery-note-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.discovery-note-rows p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: #eaf1ff;
  color: #506078;
  font-size: 11px;
}
.discovery-note-rows b { color: #173e8d; white-space: nowrap; }
.discovery-note-rows span { text-align: right; font-weight: 750; }
.evidence-ledger {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.2fr);
  gap: 12px 18px;
  margin-top: 16px;
}
.evidence-ledger ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.evidence-ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; background: #f0f4fa; font-size: 10px; }
.evidence-ledger li b { color: #1d4fae; }
.new-observation-values { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.new-observation-values span { color: #57677e; font-size: 11px; font-weight: 750; }
.new-observation-values b { float: right; color: #173e8d; }
.analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculation-card { align-content: start; }
.calculation-card label + label { margin-top: 7px; }
.report-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .discovery-incident { grid-template-columns: auto 1fr; }
  .incident-facts { grid-column: 1 / -1; }
  .discovery-calculator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discovery-calculator > div:first-child,
  .discovery-calculator .source-values,
  .discovery-calculator .calc-result,
  .discovery-calculator .orbit-shape-result { grid-column: 1 / -1; }
  .evidence-ledger { grid-template-columns: 1fr; }
  .new-observation-values { grid-column: 1; }
}
@media (max-width: 700px) {
  .discovery-incident,
  .discovery-calculator,
  .analysis-grid,
  .discovery-note-rows,
  .incident-facts,
  .new-observation-values,
  .report-fields { grid-template-columns: 1fr; }
  .discovery-incident > *,
  .discovery-calculator > *,
  .new-observation-values { grid-column: 1; }
  .orbit-shape-result { grid-template-columns: 1fr; }
}
.mystery-preview canvas,
#discoveryCanvas {
  cursor: zoom-in;
  touch-action: none;
}
.mystery-preview canvas:active,
#discoveryCanvas:active {
  cursor: zoom-in;
}
.mystery-controls.external-locked {
  background: #f4f6f9;
}
.mystery-controls.external-locked input[type="range"] {
  opacity: 0.45;
}
.mystery-controls.external-locked:after {
  content: "외부 관측 자료 적용 중 · 변인 조작 잠금";
  display: block;
  margin-top: 10px;
  padding: 9px;
  border-radius: 9px;
  background: #e8edf4;
  color: #59687c;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
#toMysteryBtn {
  margin-left: 8px;
}
@media (max-width: 680px) {
  .periodicity-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .periodicity-actions button {
    width: 100%;
  }
  #toMysteryBtn {
    margin-left: 0;
  }
}

/* v51: 탐구하기 01·02 구분선 통일(실선) */
.stage-divider { margin-top: 24px; padding-top: 24px; border-top: 2px solid #cfd9e8; }
/* v51: 탐구활동 배지 삭제 후 소제목 회색 */
.activity-title small { color: #7d899a; }
/* v51: 03 모항성 정보(조작 불가) */
.mystery-info-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #eef3fb; }
.mystery-info-row > span { font-weight: 800; }
.mystery-info-row small { margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: #dbe6f7; color: #5b6b82; font-size: 11px; font-weight: 800; }
.mystery-info-row output { color: #173e8d; font-weight: 900; }

/* v51: 궤도 반지름(평균 거리) 용어가 길어 결과 칸을 카드 전체 폭으로 */
.calculation-card .calc-result { grid-column: 1 / -1; }

/* v52: 통과법 미니 활동 */
.transit-lab { grid-column: 1 / -1; }
.transit-lab .transit-intro, .transit-lab .transit-visual, .transit-lab .transit-formula, .transit-lab .transit-inputs, .transit-lab .calc-result { grid-column: 1 / -1; }
.transit-intro { margin: 0; color: #4b5d76; font-size: 14px; line-height: 1.55; }
.transit-visual canvas { width: 100%; display: block; border: 1px solid #e1e8f2; border-radius: 12px; background: #fff; cursor: ns-resize; }
.transit-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.transit-tools .transit-readout { flex: 1; min-width: 160px; text-align: center; color: var(--blue); font-weight: 900; font-size: 15px; }
.transit-tools button { margin: 0; width: auto; }
.transit-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.transit-formula { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 10px 12px; border-radius: 10px; background: #eef3fb; color: #173e8d; font-size: 14px; }
.transit-formula span { color: #5b6b82; font-size: 12.5px; font-weight: 700; }
.transit-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: center; gap: 10px; }
.transit-inputs label { margin: 0 !important; }
.transit-inputs button { margin: 0; }
@media (max-width: 700px) { .transit-inputs { grid-template-columns: 1fr; } }


.mystery-info-row[hidden] { display: none; }

/* v59: 02 주기 자 검증 안내 */
.calculation-card .period-check-note { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-radius: 10px; background: #f6f8fc; color: #5b6b82; font-size: 13px; font-weight: 700; }
.calculation-card .period-check-note.ok { background: #e9f8f1; color: #11845f; }
.calculation-card .period-check-note.warn { background: #fff4e5; color: #a5600b; }


/* v63: 결과 제출 미리보기의 창의적으로 생각하기 */
.preview-creative { border-left: 4px solid #6d4fd8; }
.preview-creative .cb-write p { margin: 6px 0; }
.preview-creative .cb-write-how { color: #6b6290; font-size: 13px; }
.preview-creative textarea { width: 100%; min-height: 120px; box-sizing: border-box; border: 1px solid #cfc3f5; border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
.preview-creative-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.preview-creative .cb-write > p:first-child { font-size: 15px; font-weight: 700; color: #2b2350; line-height: 1.6; }
