:root {
  --paper: #ffffff;
  --bg: #fafbfc;
  --ink: #2c323c;
  --ink-soft: #536176;
  --ink-faint: #718095;
  --blue: #11468c;
  --blue-deep: #0b356d;
  --blue-soft: #e9f0fa;
  --blue-pale: #f4f7fc;
  --space: #0f0f23;
  --gold: #cc9528;
  --gold-deep: #79520b;
  --gold-soft: #fbf3df;
  --line: #ccd6e2;
  --line-strong: #77879a;
  --grid-line: #d8e1eb;
  --success: #1e6d55;
  --danger: #9a3d3d;
  --shadow-paper: 0 18px 50px rgba(15, 15, 35, .12), 0 2px 8px rgba(15, 15, 35, .08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 188px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(17, 70, 140, .08), transparent 28rem),
    linear-gradient(180deg, #f5f8fc 0, var(--bg) 28rem);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
}

button,
input,
textarea {
  font: inherit;
}

button,
input,
textarea,
a,
[tabindex] {
  outline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--gold);
}

button {
  cursor: pointer;
}

input,
textarea {
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--space);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-header {
  position: sticky;
  z-index: 20;
  top: 0;
  color: #fff;
  background: rgba(15, 15, 35, .97);
  box-shadow: 0 8px 28px rgba(15, 15, 35, .2);
  backdrop-filter: blur(14px);
}

.workspace-header__inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 104px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--space);
  background: var(--gold);
  border-radius: 50%;
  font-size: 25px;
  box-shadow: 0 0 0 6px rgba(204, 149, 40, .15);
}

.eyebrow {
  margin: 0 0 2px;
  color: #c3d8f7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 29px);
  line-height: 1.22;
  letter-spacing: -.035em;
}

.workspace-intro {
  margin: 4px 0 0;
  color: #b7c1d0;
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-indicator {
  min-width: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #ced6e1;
  font-size: 13px;
}

.save-indicator__dot {
  width: 9px;
  height: 9px;
  background: #8da0b9;
  border-radius: 50%;
}

.save-indicator.is-saved .save-indicator__dot {
  background: #66d1aa;
}

.save-indicator.is-saving .save-indicator__dot {
  background: var(--gold);
  animation: pulse 1s ease-in-out infinite;
}

.save-indicator.is-error .save-indicator__dot {
  background: #f09a9a;
}

@keyframes pulse {
  50% { opacity: .35; }
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.button--primary {
  color: #fff;
  background: var(--blue);
  border-color: #5c8bc9;
  box-shadow: 0 2px 8px rgba(17, 70, 140, .32);
}

.button--primary:hover {
  background: #19559f;
}

.button--quiet {
  color: #e7ebf1;
  background: transparent;
  border-color: #697187;
}

.button--quiet:hover {
  background: rgba(255, 255, 255, .08);
}

.page-nav {
  min-height: 60px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 24px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
  scrollbar-width: thin;
}

.page-nav a {
  min-height: 48px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  color: #cad2df;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.page-nav a span {
  color: #f2c568;
  font-size: 11px;
}

.page-nav a:hover,
.page-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.noscript-note {
  width: min(720px, calc(100% - 32px));
  margin: 24px auto;
  padding: 16px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid #dfc785;
  border-radius: var(--radius-sm);
}

#worksheet {
  padding: 48px 24px 96px;
}

.sheet-page {
  position: relative;
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 0 auto 48px;
  padding: 15mm 16mm 13mm;
  background: var(--paper);
  border: 1px solid rgba(114, 129, 149, .32);
  border-radius: 2px;
  box-shadow: var(--shadow-paper);
  overflow: hidden;
}

.sheet-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 78%, var(--gold) 78% 100%);
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--space);
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.page-kicker span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 10px;
}

.page-heading h2 {
  margin: 0;
  color: var(--space);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.045em;
}

.page-lead {
  max-width: 590px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.62;
}

.mission-chip {
  min-width: 92px;
  min-height: 40px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid #e3c77c;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.identity-panel {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
  padding: 13px 16px;
  background: var(--blue-pale);
  border: 1px solid #d8e3f0;
  border-radius: var(--radius-md);
}

.identity-panel label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}

.line-input {
  min-width: 0;
  height: 36px;
  padding: 4px 6px;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
}

.activity-section {
  margin-top: 20px;
}

.activity-section--compact {
  margin-top: 16px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-title-row--tight {
  margin-bottom: 8px;
}

.step-label {
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.section-title-row h3,
.rule-card h3,
.peer-check h3,
.sequence-verdict h3,
.physics-note h3,
.final-connection h3 {
  margin: 0;
  color: var(--space);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.section-note {
  max-width: 330px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: right;
}

.choice-fieldset,
.trait-row,
.peer-options,
.verdict-options,
.invariant-options {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-card {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.choice-card:hover {
  border-color: var(--blue);
  background: var(--blue-pale);
}

.choice-card:has(input:checked) {
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

input[type="radio"],
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.drawing-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.draw-card,
.static-card {
  min-width: 0;
}

.draw-card__heading,
.mini-board__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.draw-card h4,
.static-card h4,
.mini-board h4 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.draw-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draw-tools button {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 9px;
  color: var(--blue-deep);
  background: #fff;
  border: 1.5px solid var(--blue);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.draw-tools button:hover {
  background: var(--blue-soft);
}

.draw-surface,
.static-surface {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background-color: #fbfcfe;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.grid-surface {
  background-image:
    linear-gradient(to right, transparent calc(50% - .75px), rgba(44, 50, 60, .75) calc(50% - .75px), rgba(44, 50, 60, .75) calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(to bottom, transparent calc(50% - .75px), rgba(44, 50, 60, .75) calc(50% - .75px), rgba(44, 50, 60, .75) calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 12.5% 100%, 100% 16.666%;
}

.mirror-grid {
  background-image:
    linear-gradient(to right, transparent calc(50% - 1px), rgba(204, 149, 40, .95) calc(50% - 1px), rgba(204, 149, 40, .95) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - .75px), rgba(44, 50, 60, .5) calc(50% - .75px), rgba(44, 50, 60, .5) calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
}

.draw-surface::after {
  content: "여기에 그려요";
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 0;
  color: #8793a3;
  font-size: 9px;
  pointer-events: none;
}

.draw-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.large-arrow {
  color: var(--gold-deep);
  font-size: 26px;
  font-weight: 800;
}

.drawing-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.drawing-caption input,
.sentence-response input,
.revision-line input {
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 5px 7px;
  background: #fff;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
}

.observation-panel {
  padding: 12px 14px;
  background: var(--blue-pale);
  border: 1px solid #d0ddea;
  border-radius: var(--radius-md);
}

.trait-table {
  display: grid;
  gap: 6px;
}

.trait-table__head,
.trait-row {
  display: grid;
  grid-template-columns: 1.45fr .65fr .75fr 1.15fr;
  align-items: center;
  gap: 6px;
}

.trait-table__head {
  padding: 0 8px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.trait-table__head span:first-child {
  text-align: left;
}

.trait-row {
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.trait-row legend {
  display: block;
  padding: 0;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
}

.trait-row label {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
}

.trait-row input {
  width: 16px;
  height: 16px;
}

.sentence-response {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 13px;
  color: #fff;
  background: var(--space);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.sentence-response input {
  color: #fff;
  background: transparent;
  border-bottom-color: #93a2b7;
}

.sentence-response input::placeholder {
  color: #bdc6d3;
}

.page-footer {
  position: absolute;
  left: 16mm;
  right: 16mm;
  bottom: 7mm;
  display: flex;
  justify-content: space-between;
  padding-top: 7px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: .03em;
}

/* Page 2 */
.rule-card {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--space);
  border: 2px solid var(--space);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 3px rgba(204, 149, 40, .28);
  color: #fff;
}

.rule-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.rule-card .step-label {
  color: #f2c565;
}

.rule-card h3 {
  color: #fff;
  font-size: 20px;
}

.card-name {
  width: 230px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: #c4cfdd;
  font-size: 10px;
  font-weight: 700;
}

.card-name input {
  min-width: 0;
  height: 36px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid #7c879b;
  border-radius: 6px;
}

.card-name input::placeholder {
  color: #aeb9c9;
}

.rule-writing {
  display: block;
  margin-top: 14px;
}

.rule-writing > span {
  display: block;
  margin-bottom: 6px;
  color: #d8dfe9;
  font-size: 11px;
  font-weight: 700;
}

.rule-writing textarea,
.final-connection textarea {
  width: 100%;
  padding: 9px 11px;
  background-color: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, #d9e0e8 30px);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  line-height: 30px;
}

.rule-writing textarea {
  min-height: 105px;
}

.rule-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.rule-clues span {
  padding: 5px 9px;
  color: #f2c76c;
  background: rgba(204, 149, 40, .1);
  border: 1px solid rgba(231, 192, 108, .45);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.transfer-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
}

.static-card > p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.map-star {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);
  color: var(--gold);
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 1px 0 #684606, 0 2px 4px rgba(104, 70, 6, .25);
  transform: translate(-50%, -50%);
}

.rule-arrow {
  width: 90px;
  display: grid;
  place-items: center;
  gap: 5px;
  color: var(--gold-deep);
  text-align: center;
}

.rule-arrow span {
  max-width: 90px;
  padding: 5px 8px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-arrow b {
  font-size: 25px;
}

.peer-check {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px 20px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--gold-soft);
  border: 1px solid #dfc47a;
  border-radius: var(--radius-md);
}

.peer-check p {
  margin: 5px 0 0;
  color: #6c5729;
  font-size: 10.5px;
}

.peer-options {
  display: grid;
  gap: 6px;
}

.peer-options label,
.verdict-options label,
.invariant-options label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.peer-options label:has(input:checked),
.verdict-options label:has(input:checked),
.invariant-options label:has(input:checked) {
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-color: var(--blue);
}

.revision-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
}

/* Page 3 */
.operation-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.operation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid;
  border-radius: var(--radius-md);
}

.operation-card--blue {
  background: var(--blue-pale);
  border-color: #9ebbe0;
}

.operation-card--gold {
  background: var(--gold-soft);
  border-color: #dfc274;
}

.operation-card__letter {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.operation-card--gold .operation-card__letter {
  color: var(--space);
  background: var(--gold);
}

.operation-card strong {
  color: var(--space);
  font-size: 12px;
}

.operation-card p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 9.5px;
}

.sequence-test {
  margin-top: 17px;
}

.sequence-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.sequence-title > span {
  padding: 4px 8px;
  color: #fff;
  background: var(--space);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.sequence-title h3 {
  margin: 0;
  color: var(--space);
  font-size: 14px;
}

.sequence-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.static-surface--small,
.draw-surface--small {
  height: 150px;
}

.sequence-arrow {
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--gold-deep);
  text-align: center;
}

.sequence-arrow span {
  font-size: 8.5px;
  font-weight: 800;
}

.sequence-arrow b {
  font-size: 21px;
}

.mini-board__heading {
  min-height: 40px;
  margin-bottom: 4px;
}

.draw-tools--mini button {
  min-width: 48px;
  min-height: 48px;
  padding: 4px 6px;
  font-size: 9px;
}

.sequence-verdict {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px 18px;
  margin-top: 17px;
  padding: 13px 15px;
  color: #fff;
  background: var(--space);
  border-radius: var(--radius-md);
}

.sequence-verdict .step-label {
  color: #f2c66b;
}

.sequence-verdict h3 {
  color: #fff;
}

.verdict-options {
  display: grid;
  grid-template-columns: .7fr .8fr 1.35fr;
  gap: 6px;
}

.verdict-options label {
  min-height: 42px;
  color: var(--ink);
}

.sequence-verdict .revision-line {
  color: #e9edf3;
}

.sequence-verdict .revision-line input {
  color: #fff;
  background: transparent;
  border-bottom-color: #8e9caf;
}

/* Page 4 */
.invariant-panel {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--blue-pale);
  border: 1px solid #c7d7e9;
  border-radius: var(--radius-md);
}

.invariant-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.invariant-options label {
  min-height: 48px;
  padding: 7px 8px;
  font-size: 9.5px;
}

.sentence-response--plain {
  margin-top: 10px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.sentence-response--plain input {
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
}

.sentence-response--plain input::placeholder {
  color: #8793a4;
}

.physics-note {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  color: #f1f4f8;
  background: var(--space);
  border-radius: var(--radius-md);
}

.physics-note__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--space);
  background: var(--gold);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
}

.physics-note .step-label {
  color: #f3c96e;
}

.physics-note h3 {
  color: #fff;
}

.physics-note p:last-child {
  margin: 6px 0 0;
  color: #cbd3df;
  font-size: 11px;
  line-height: 1.6;
}

.connection-section {
  margin-top: 17px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.evidence-card {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.evidence-card h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 11px;
}

.evidence-card h4 span {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 8px;
}

.evidence-card:nth-child(2) h4 span {
  color: var(--space);
  background: var(--gold);
}

.evidence-card:nth-child(3) h4 span {
  background: var(--blue-deep);
}

.evidence-card label {
  display: block;
  margin-top: 7px;
}

.evidence-card label span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 700;
}

.evidence-card input {
  width: 100%;
  height: 29px;
  padding: 4px 6px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
  font-size: 9px;
}

.flow-head {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 37px;
  margin: 0 6px 5px 118px;
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 700;
  text-align: center;
}

.connection-flows {
  display: grid;
  gap: 7px;
}

.connection-flow {
  display: grid;
  grid-template-columns: 105px 1fr 24px 1.25fr 24px 1fr;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 9.5px;
  text-align: center;
}

.connection-flow strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-deep);
  text-align: left;
}

.connection-flow strong > span {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 8px;
}

.connection-flow:nth-child(2) strong > span {
  color: var(--space);
  background: var(--gold);
}

.connection-flow b {
  color: var(--gold-deep);
  font-size: 15px;
}

.connection-flow > span:not(strong span) {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 5px 7px;
  background: #f5f7fa;
  border-radius: 6px;
}

.final-connection {
  margin-top: 17px;
  padding: 14px 16px;
  background: var(--gold-soft);
  border: 1px solid #dfc47a;
  border-radius: var(--radius-md);
}

.final-connection > div {
  margin-bottom: 8px;
}

.final-connection label {
  display: block;
}

.sentence-starter {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 800;
}

.final-connection textarea {
  min-height: 108px;
}

.share-note {
  margin: 7px 0 0;
  color: #685524;
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 48px));
  padding: 13px 16px;
  color: #fff;
  background: var(--space);
  border: 1px solid #4d5870;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(15, 15, 35, .25);
  font-size: 13px;
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 160px;
  }

  .workspace-header__inner {
    width: calc(100% - 32px);
    min-height: 92px;
  }

  .workspace-intro,
  .save-indicator {
    display: none;
  }

  .page-nav {
    justify-content: flex-start;
  }

  #worksheet {
    padding-right: 12px;
    padding-left: 12px;
  }

  .sheet-page {
    min-height: auto;
    padding: 40px 32px 72px;
    border-radius: var(--radius-md);
  }

  .page-footer {
    right: 32px;
    bottom: 24px;
    left: 32px;
  }

  .flow-head {
    margin-left: 102px;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 190px;
  }

  body {
    font-size: 15px;
  }

  .workspace-header__inner {
    min-height: 126px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .brand-lockup h1 {
    font-size: 20px;
  }

  .toolbar {
    width: 100%;
    gap: 8px;
  }

  .toolbar .button {
    min-width: 0;
    flex: 1;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
  }

  #worksheet {
    padding-top: 24px;
  }

  .sheet-page {
    padding: 32px 18px 68px;
    margin-bottom: 24px;
  }

  .page-heading {
    display: block;
  }

  .page-heading h2 {
    font-size: 24px;
  }

  .mission-chip {
    margin-top: 12px;
  }

  .identity-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .choice-grid--four {
    grid-template-columns: 1fr 1fr;
  }

  .drawing-pair,
  .transfer-layout,
  .operation-cards,
  .sequence-row,
  .sequence-verdict,
  .peer-check {
    grid-template-columns: 1fr;
  }

  .large-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .draw-tools button {
    min-height: 48px;
  }

  .draw-surface,
  .static-surface {
    height: 230px;
  }

  .drawing-caption,
  .sentence-response,
  .revision-line {
    grid-template-columns: 1fr;
  }

  .trait-table__head {
    display: none;
  }

  .trait-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 9px;
  }

  .trait-row legend {
    grid-column: 1 / -1;
    margin-bottom: 3px;
  }

  .trait-row label {
    min-height: 48px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .rule-card__topline {
    display: grid;
  }

  .card-name {
    width: 100%;
  }

  .rule-arrow {
    justify-self: center;
  }

  .rule-arrow b {
    transform: rotate(90deg);
  }

  .peer-options {
    grid-template-columns: 1fr;
  }

  .sequence-row {
    gap: 10px;
  }

  .sequence-arrow b {
    transform: rotate(90deg);
  }

  .static-surface--small,
  .draw-surface--small {
    height: 220px;
  }

  .verdict-options {
    grid-template-columns: 1fr;
  }

  .invariant-options {
    grid-template-columns: 1fr 1fr;
  }

  .physics-note {
    align-items: flex-start;
  }

  .flow-head {
    display: none;
  }

  .connection-flow {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 11px;
    text-align: left;
  }

  .connection-flow strong {
    margin-bottom: 3px;
  }

  .connection-flow b {
    justify-self: center;
    transform: rotate(90deg);
  }

  .connection-flow > span:not(strong span) {
    width: 100%;
  }

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

  .page-footer {
    right: 18px;
    left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media screen {
  .trait-row label {
    min-height: 48px;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  :root {
    --shadow-paper: none;
  }

  html,
  body {
    width: 210mm;
    margin: 0;
    padding: 0;
    color: #20242b;
    background: #fff;
    font-size: 10pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .screen-only,
  .workspace-header,
  .toast,
  .noscript-note,
  .skip-link {
    display: none !important;
  }

  #worksheet,
  #worksheetForm {
    width: 210mm;
    margin: 0;
    padding: 0;
  }

  .sheet-page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    margin: 0;
    padding: 12mm 14mm 11mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }

  .sheet-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .page-heading {
    padding-bottom: 4mm;
  }

  .page-heading h2 {
    font-size: 19pt;
  }

  .page-lead {
    font-size: 9pt;
  }

  .mission-chip {
    min-height: 8mm;
  }

  .page-footer {
    right: 14mm;
    bottom: 5mm;
    left: 14mm;
  }

  input,
  textarea {
    color: #20242b !important;
    background-color: #fff !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }

  textarea {
    resize: none;
  }

  .choice-card:has(input:checked),
  .peer-options label:has(input:checked),
  .verdict-options label:has(input:checked),
  .invariant-options label:has(input:checked) {
    box-shadow: inset 0 0 0 1px var(--blue);
  }

  .identity-panel {
    margin: 4mm 0;
    padding: 2.5mm 4mm;
  }

  .activity-section {
    margin-top: 4mm;
  }

  .activity-section--compact {
    margin-top: 3mm;
  }

  .section-title-row {
    margin-bottom: 2mm;
  }

  .choice-grid {
    gap: 1.5mm;
  }

  .choice-card {
    min-height: 9mm;
    padding: 1.5mm 2mm;
  }

  .draw-surface,
  .static-surface {
    height: 49mm;
  }

  .drawing-caption {
    margin-top: 1.2mm;
  }

  .drawing-caption input {
    height: 7mm;
  }

  .observation-panel {
    padding: 2.5mm 3mm;
  }

  .trait-table {
    gap: 1mm;
  }

  .trait-row {
    min-height: 7.5mm;
    padding: 1mm 2mm;
  }

  .sentence-response {
    margin-top: 2.5mm;
    padding: 2mm 3mm;
  }

  .sentence-response input {
    height: 7mm;
  }

  .rule-card {
    margin-top: 4mm;
    padding: 3mm 4mm;
  }

  .rule-writing {
    margin-top: 2.5mm;
  }

  .rule-writing textarea {
    height: 25mm;
    min-height: 0;
  }

  .rule-clues {
    margin-top: 2mm;
  }

  #page-2 .draw-surface,
  #page-2 .static-surface {
    height: 57mm;
  }

  .peer-check {
    gap: 2mm 4mm;
    margin-top: 4mm;
    padding: 3mm 4mm;
  }

  .peer-options {
    gap: 1mm;
  }

  .peer-options label {
    min-height: 8mm;
    padding: 1mm 2mm;
  }

  .operation-cards {
    gap: 3mm;
    margin-top: 4mm;
  }

  .operation-card {
    padding: 2.5mm 3mm;
  }

  .sequence-test {
    margin-top: 3.5mm;
  }

  .sequence-row {
    grid-template-columns: minmax(0, 1fr) 14mm minmax(0, 1fr) 16mm minmax(0, 1fr);
    gap: 1.5mm;
    padding: 2mm;
  }

  .mini-board__heading {
    min-height: auto;
    margin-bottom: 1mm;
  }

  .static-surface--small,
  .draw-surface--small {
    height: 35mm;
  }

  .sequence-verdict {
    gap: 2mm 4mm;
    margin-top: 3.5mm;
    padding: 2.5mm 3.5mm;
  }

  .verdict-options label {
    min-height: 8mm;
    padding: 1mm 2mm;
  }

  .invariant-panel {
    margin-top: 4mm;
    padding: 3mm 4mm;
  }

  .invariant-options {
    gap: 1.5mm;
  }

  .invariant-options label {
    min-height: 9mm;
    padding: 1mm 2mm;
  }

  .physics-note {
    gap: 3mm;
    margin-top: 3.5mm;
    padding: 3mm 4mm;
  }

  .physics-note p:last-child {
    margin-top: 1mm;
  }

  .connection-section {
    margin-top: 3.5mm;
  }

  .connection-flows {
    gap: 1.2mm;
  }

  .connection-flow {
    min-height: 10mm;
    padding: 1.2mm 2mm;
  }

  .final-connection {
    margin-top: 3.5mm;
    padding: 3mm 4mm;
  }

  .final-connection textarea {
    height: 25mm;
    min-height: 0;
  }

  .draw-surface,
  .static-surface,
  .rule-card,
  .peer-check,
  .sequence-test,
  .sequence-verdict,
  .invariant-panel,
  .physics-note,
  .connection-section,
  .final-connection {
    break-inside: avoid;
  }
}
