:root {
  --paper: #f7f6f1;
  --white: #fffefa;
  --ink: #21332d;
  --muted: #53645b;
  --forest: #172e29;
  --green: #28483d;
  --line: #dddcd0;
  --accent: #e5bf73;
  --serif: Georgia, "Noto Serif KR", "Batang", "바탕", serif;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.62;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.32; letter-spacing: -.035em; }
:focus-visible { outline: 3px solid #a57822; outline-offset: 4px; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .6rem 1rem; background: white; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 17.25rem; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: #638174 var(--forest); color: #f4f1e6; background: var(--forest); z-index: 3;
}
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 1.65rem 1.25rem 1.3rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; font-size: 1.05rem; font-weight: 800; line-height: 1.38; letter-spacing: -.055em; }
.brand-mark {
  display: flex; flex: 0 0 2.65rem; width: 2.65rem; height: 2.65rem;
  justify-content: center; align-items: center; gap: .175rem; border: 1px solid #a98752; border-radius: .55rem;
}
.brand-mark i { display: block; background: var(--accent); width: .15rem; height: .95rem; transform: skewY(-22deg); }
.brand-mark i:nth-child(2) { height: .7rem; }
.brand-mark i:nth-child(3) { height: .52rem; }
.side-links { padding: 0 .85rem 1.4rem; }
.side-links nav { display: grid; gap: .1rem; }
.side-links h2 { font-size: .81rem; letter-spacing: .035em; color: #d9bc84; padding: 0 .58rem .38rem; }
.side-links a {
  display: flex; align-items: center; gap: .55rem; min-height: 2.37rem;
  padding: .33rem .57rem; border: 1px solid transparent; border-radius: .4rem;
  text-decoration: none; font-size: .88rem; line-height: 1.33; color: #e5ebe4;
}
.side-links a:hover { background: #263f36; }
.side-links a[aria-current="page"] { background: #395348; border-color: #577569; color: #fffaf0; font-weight: 750; }
.side-links a[aria-current="page"] .lesson-number { color: #221e16; background: var(--accent); }
.lesson-nav, .side-resources { border-top: 1px solid #3c5147; padding-top: .9rem; margin-top: .8rem; }
.lesson-nav ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.lesson-number { flex: 0 0 1.68rem; min-width: 1.68rem; line-height: 1.46rem; color: #ead4a7; text-align: center; background: #2a4338; border-radius: .27rem; font-size: .76rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; }
.shell { margin-left: 17.25rem; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 87rem; margin: auto; min-height: 3.85rem; padding: .55rem clamp(1rem,4vw,3.8rem); display: flex; gap: .6rem; align-items: center; justify-content: space-between; }
.top-label { color: var(--muted); font-size: .94rem; font-weight: 750; }
.top-label span { display: inline-block; margin: 0 .35rem; color: #8c7751; }
.toolbar { display: flex; align-items: center; gap: .5rem; }
.tool { min-height: 2.45rem; padding: .3rem .78rem; border: 1px solid var(--line); border-radius: .38rem; color: var(--ink); background: transparent; font-size: .9rem; font-weight: 710; }
.tool:hover { background: #f0efe6; }
.tool.screen { background: var(--green); color: white; border-color: var(--green); }
.tool.screen:hover { background: #375a4d; }
.main { max-width: 87rem; margin: auto; padding: clamp(1.15rem,3.65vw,3.3rem) clamp(1rem,4vw,3.8rem) 3.2rem; }
.footer { max-width: 87rem; margin: auto; padding: 1.15rem clamp(1rem,4vw,3.8rem) 1.65rem; color: var(--muted); border-top: 1px solid var(--line); display: flex; gap: .75rem; justify-content: space-between; font-size: .89rem; }
.hero {
  isolation: isolate; position: relative; overflow: hidden; min-height: 26.8rem; border-radius: .7rem;
  background: #20382f; color: #fff9e9; display: flex; align-items: center;
}
.hero::before {
  position: absolute; content: ""; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #172e29 1%, #172e29 24%, rgba(23,46,41,.96) 36%, rgba(23,46,41,.49) 62%, rgba(23,46,41,.13) 100%),
    url("archive.jpg") 100% 54% / auto 134% no-repeat;
}
.hero-content { padding: clamp(2rem,5.3vw,5.1rem); width: 100%; }
.eyebrow { font-size: .9rem; font-weight: 800; color: #6f552d; letter-spacing: .025em; margin-bottom: .8rem; }
.hero .eyebrow { color: #f0d49b; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.5rem,5.4vw,5.25rem); line-height: 1.17; font-weight: 700; letter-spacing: -.09em; }
.hero-lead { color: #f0eee4; font-size: clamp(1.02rem,1.65vw,1.25rem); margin: 1.25rem 0 1.75rem; }
.hero-links, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; padding: .64rem 1rem;
  min-height: 2.8rem; text-align: center; border: 1px solid transparent; border-radius: .36rem;
  font-size: .94rem; font-weight: 750; text-decoration: none; line-height: 1.4;
}
.button.primary { color: #22281d; background: var(--accent); }
.button.primary:hover { background: #f4d38e; }
.button.dark { background: var(--green); color: white; }
.button.dark:hover { background: #375a4d; }
.button.secondary { border-color: #cfd3c6; color: var(--green); background: var(--white); }
.button.secondary:hover { background: #edeee6; }
.button.hero-secondary { color: #fff8ea; border-color: #a5aa92; background: rgba(39,63,53,.7); }
.button.hero-secondary:hover { background: #486151; }
.project-facts {
  margin: .9rem 0 2.45rem; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  background: var(--white); border: 1px solid var(--line); border-radius: .52rem;
}
.project-facts div { display: grid; gap: .12rem; padding: .8rem clamp(.6rem,2.25vw,1.55rem); }
.project-facts div + div { border-left: 1px solid var(--line); }
.project-facts dt { color: var(--muted); font-size: .84rem; font-weight: 750; }
.project-facts dd { margin: 0; font-size: 1.48rem; font-weight: 790; letter-spacing: -.035em; }
.project-facts span { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: normal; margin-left: .23rem; }
.section-head { margin: 0 0 1rem; }
.section-head h2, .quick h2, .topic-group h2 { font-size: 1.6rem; }
.section-head p { margin-top: .32rem; color: var(--muted); }
.schedule { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.schedule a { padding: .68rem .82rem; display: flex; align-items: center; gap: .6rem; min-height: 3.8rem; background: var(--white); border: 1px solid var(--line); border-radius: .43rem; text-decoration: none; }
.schedule a:hover { border-color: #688276; background: #f0f1e8; }
.schedule-number { flex-shrink: 0; color: #725725; font-weight: 780; font-size: .78rem; }
.schedule strong { font-weight: 750; line-height: 1.42; }
.schedule-phase { margin-left: auto; color: var(--muted); white-space: nowrap; font-size: .8rem; }
.quick { margin-top: 2rem; }
.quick-grid { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.page-intro {
  margin: 0 0 1.5rem; background: #eaece2; border: 1px solid #dce0d2;
  border-radius: .65rem; padding: clamp(1.25rem,3.35vw,2.9rem);
}
.page-intro h1 { font-size: clamp(2rem,4.3vw,3.55rem); }
.page-intro .lead { margin-top: .7rem; font-size: clamp(1.02rem,1.7vw,1.2rem); color: #455a50; }
.length { display: inline-block; margin-top: .85rem; border-radius: .28rem; border: 1px solid #b9c8b7; padding: .1rem .52rem; color: #3c564b; font-weight: 750; font-size: .89rem; }
.outline { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.lesson-columns { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: .9rem; }
.panel { padding: clamp(1rem,2.2vw,1.68rem); background: var(--white); border: 1px solid var(--line); border-radius: .53rem; margin-bottom: .9rem; }
.panel h2, .related h2 { font-size: 1.3rem; margin-bottom: .75rem; }
.panel h3 { font-size: 1.04rem; }
.panel ul, .panel ol { padding-left: 1.25rem; margin: 0; }
.panel li + li { margin-top: .3rem; }
.panel p + p { margin-top: .65rem; }
.panel .timeline { list-style: none; padding: 0; }
.teacher-guide { scroll-margin-top: 4.5rem; }
.guide-prep { background: #e9eee4; border-radius: .42rem; padding: .75rem .9rem; }
.guide-prep strong { margin-right: .35rem; color: #315849; }
.timeline li { display: grid; grid-template-columns: minmax(7.5rem, 1fr) minmax(0, 5fr); gap: 1.1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.guide-stage .time { color: #775b2a; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; }
.guide-stage h3 { margin: .15rem 0; }
.guide-stage a { color: #315849; text-underline-offset: .15rem; font-size: .87rem; }
.teaching-cues { display: grid; gap: .5rem; margin: 0; }
.teaching-cues > div { display: grid; grid-template-columns: 7.5rem minmax(0,1fr); gap: .6rem; }
.teaching-cues dt { font-weight: 750; color: #315849; }
.teaching-cues dd { margin: 0; }
@media (max-width: 600px) {
  .timeline li { grid-template-columns: 1fr; gap: .55rem; }
  .guide-stage { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; }
  .teaching-cues > div { grid-template-columns: 1fr; gap: .12rem; }
}
.question-panel { background: #f0eadb; border-color: #dfd6bb; }
.question-panel p { border-left: 2px solid #a67c38; padding-left: .73rem; }
.example { margin-top: .8rem; background: #eeefe6; border-radius: .32rem; padding: .68rem .8rem; }
.example strong { display: block; color: #4d6556; font-size: .84rem; margin-bottom: .2rem; }
.completion { background: #e9eee4; border-color: #d4decf; }
.related { padding: .55rem .15rem; }
.related .button { margin: 0 .28rem .43rem 0; }
.page-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.3rem; }
.page-nav a { text-decoration: none; min-width: 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .43rem; background: var(--white); }
.page-nav a:last-child { text-align: right; }
.page-nav a:hover { border-color: #688276; }
.page-nav small, .page-nav strong { display: block; }
.page-nav small { color: var(--muted); font-size: .86rem; }
.muted { color: var(--muted); }
.topic-controls { margin-bottom: 1.3rem; }
.topic-controls label, .worksheet label { display: block; font-weight: 750; margin-bottom: .25rem; }
.topic-controls input, .worksheet textarea {
  width: min(100%,30rem); padding: .58rem .75rem; border: 1px solid #afb8a8;
  background: var(--white); color: var(--ink); border-radius: .33rem;
}
.filters { display: flex; flex-wrap: wrap; gap: .42rem; margin: .75rem 0 .4rem; }
.filters button { flex-shrink: 0; background: var(--white); border: 1px solid #bdc8bb; color: var(--ink); border-radius: .4rem; padding: .45rem .75rem; font-size: .91rem; }
.filters button[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.topic-group + .topic-group { margin-top: 1.6rem; }
.topic-group h2 { margin-bottom: .67rem; }
.topic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.topic-card { padding: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: .42rem; scroll-margin-top: 5.5rem; }
.topic-card:target { border-color: #936e2b; box-shadow: 0 0 0 2px #b88e44; }
.topic-card h3 { margin: .2rem 0 .45rem; font-size: 1.13rem; }
.topic-card p:last-child { color: var(--muted); }
.topic-index { color: #775b2a; font-size: .8rem; font-weight: 780; }
.actions { margin-top: 1.1rem; }
.panel .numbered { list-style: none; counter-reset: items; padding: 0; }
.numbered li { counter-increment: items; position: relative; padding: .68rem .2rem .65rem 2.45rem; border-top: 1px solid var(--line); }
.numbered li:first-child { border-top: 0; }
.numbered li::before {
  content: counter(items,decimal-leading-zero); position: absolute; inset: .65rem auto auto 0;
  min-width: 1.75rem; background: #eee8d8; color: #745627; text-align: center; border-radius: .25rem; font-size: .82rem; font-weight: 780;
}
.numbered p { color: var(--muted); margin-top: .23rem; }
.checklist { display: grid; gap: .4rem; }
.checklist label { display: flex; align-items: flex-start; gap: .55rem; padding: .23rem 0; cursor: pointer; }
.checklist input { width: 1.1rem; height: 1.1rem; margin-top: .31rem; accent-color: var(--green); flex-shrink: 0; }
.source-list li + li { margin-top: .7rem; }
.source-list a, .presentation-list a { color: #315849; text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 39rem; border-collapse: collapse; margin: .1rem 0 .65rem; text-align: left; }
th, td { vertical-align: top; padding: .6rem .56rem; border: 1px solid var(--line); }
thead th, tbody th { background: #eeefe6; }
tbody th { min-width: 6.05rem; }
.worksheet textarea { width: 100%; display: block; margin: 0 0 .8rem; resize: vertical; }
.classroom .sidebar, .classroom .teacher-only { display: none; }
.classroom .shell { margin-left: 0; }
.classroom .topbar { position: sticky; top: 0; z-index: 2; }
.classroom .lesson-columns { grid-template-columns: minmax(0,1.28fr) minmax(0,1fr); }
.classroom .lesson-columns .panel { font-size: clamp(1.15rem,2.25vw,1.8rem); }
.classroom .lesson-columns .panel h2 { font-size: clamp(1.4rem,2.65vw,2.15rem); }
.classroom .example strong { font-size: 1em; }

@media (max-width: 1190px) {
  .schedule-phase { display: none; }
  .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .lesson-columns { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; top: 0; width: 100%; max-height: 83vh; overflow-y: auto; }
  .side-head { padding: .55rem .95rem; min-height: 3.65rem; gap: .45rem; }
  .brand { font-size: .91rem; gap: .5rem; }
  .brand br { display: none; }
  .brand-mark { flex-basis: 1.95rem; width: 1.95rem; height: 1.95rem; }
  .menu-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: .45rem; background: #304a3f; border: 1px solid #718576; border-radius: .35rem; color: white; padding: .37rem .56rem; font-size: .8rem; flex-shrink: 0; min-height: 2.3rem; }
  .menu-toggle span { display: block; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
  .menu-toggle[aria-expanded="true"] span { transform: rotate(225deg); }
  .enhanced .side-links:not(.is-open) { display: none; }
  .side-links a { min-height: 2.62rem; }
  .shell { margin-left: 0; }
  .topbar-inner { min-height: 3.25rem; }
  .hero::before { background-position: center, 76% center; background-size: auto, cover; }
  .hero { min-height: 21.5rem; }
  .hero h1 { font-size: clamp(2.3rem,8.4vw,4.3rem); }
  .main { padding-bottom: 2rem; }
  .classroom .lesson-columns { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .top-label { font-size: .8rem; }
  .top-label span { margin: 0 .15rem; }
  .toolbar { gap: .28rem; }
  .tool { padding-inline: .54rem; }
  .hero-content { padding: 1.35rem; }
  .hero-lead { margin: .85rem 0 1.3rem; }
  .hero-links { gap: .42rem; }
  .hero-links .button { padding-inline: .6rem; font-size: .87rem; }
  .project-facts { margin-bottom: 1.8rem; }
  .project-facts dd { font-size: 1.21rem; }
  .project-facts span { display: block; margin: 0; font-size: .76rem; }
  .outline, .schedule, .topic-grid { grid-template-columns: 1fr; }
  .outline { gap: 0; }
  .page-nav a { padding: .55rem .62rem; font-size: .9rem; }
  .page-nav small { font-size: .76rem; }
}
@media print {
  :root { color: #141b17; background: white; font-size: 11pt; }
  .sidebar, .topbar, .skip, .page-nav, .footer, .actions, .topic-controls, .related, .hero-links { display: none !important; }
  .shell { margin: 0; }
  .main { padding: 0; max-width: none; }
  .hero { background: white; color: #141b17; min-height: 0; border: 1px solid #9c9c9c; }
  .hero::before { display: none; }
  .hero .eyebrow, .hero-lead { color: #141b17; }
  .hero-content { padding: 1rem; }
  .hero h1 { font-size: 2rem; }
  .page-intro, .panel, .topic-card { background: white; }
  .page-intro { padding: .7rem; }
  .page-intro h1 { font-size: 1.9rem; }
  .outline, .lesson-columns { display: block; }
  .panel h2, .topic-group h2 { break-after: avoid; }
  .panel li, .panel label, .topic-card, tr { break-inside: avoid; }
  table { min-width: 0; }
  .table-wrap { overflow: visible; }
  .worksheet textarea { display: none; }
  .print-answer { display: block; white-space: pre-wrap; border-bottom: 1px solid #b4b4b4; min-height: 2.6em; margin-bottom: .5em; }
}
@media screen { .print-answer, .print-lines { display: none; } }

.material-panel { border-left: 4px solid #ab8140; margin-bottom: 1.12rem; }
.material-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.material-heading h2 { margin-bottom: .22rem; }
.material-heading p { color: var(--muted); }
.material-format { flex-shrink: 0; border: 1px solid #d7cfb5; border-radius: .28rem; color: #69512b; padding: .15rem .45rem; font-size: .82rem; font-weight: 720; }
.material-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.teacher-attachments { margin-top: .9rem; padding: .85rem 1rem; border-radius: .45rem; background: #e9eee4; border: 1px solid #d1ddcf; }
.teacher-attachments h3 { margin-bottom: .26rem; }
.teacher-attachments p { color: var(--muted); }
.teacher-attachments .material-actions { margin-top: .63rem; }
.classroom .teacher-attachments { display: none; }
.material-detail { border-top: 1px solid var(--line); margin-top: .95rem; padding-top: .75rem; }
.material-detail summary { width: fit-content; font-weight: 750; color: var(--green); cursor: pointer; }
.material-note { margin: .62rem 0; }
.material-note p { color: var(--muted); margin-top: .2rem; }
.material-sources, .panel .material-sources { padding-left: 1.2rem; margin: .5rem 0 0; }
.material-sources a, .material-detail > p a { text-underline-offset: 3px; color: #315849; }
.activity-actions { margin: 0 0 .95rem; }
.slide-example-list { display: grid; padding: 0; list-style: none; gap: .75rem; }
.slide-example { margin-bottom: 0; }
.slide-example .eyebrow { margin-bottom: .3rem; }
.slide-example-body { display: grid; grid-template-columns: 1fr 1fr; gap: .72rem; }
.slide-example-body > div { padding: .75rem; border-radius: .35rem; background: #ecefe7; }
.slide-example-body > div + div { background: #f3eee2; }
.slide-example-body p { margin-top: .36rem; }
.classroom .material-panel .material-format { display: none; }
@media (max-width: 480px) {
  .material-heading { display: block; }
  .material-format { display: inline-block; margin-top: .45rem; }
  .slide-example-body { grid-template-columns: 1fr; }
}
@media print {
  .material-panel, .worksheet-notice { display: none; }
}

.student-sheet {
  --print-ink: #1b2f26;
  --print-pine: #1e3f33;
  --print-gold: #9b7430;
  --print-line: #bcc9bf;
  --print-paper: #fffefa;
  --print-tint: #eef3ec;
  --print-reading: #f7f4eb;
  margin: 0 auto; padding: clamp(1.05rem,3.5vw,2.75rem); max-width: 68rem;
  color: var(--print-ink); background: var(--print-paper);
  border: 1px solid #d9dcd0; border-top: 4px solid var(--print-pine); border-radius: .53rem;
  box-shadow: 0 .8rem 2.8rem #263d250a;
}
.student-sheet-actions { max-width: 68rem; margin-inline: auto; }
.sheet-head { margin: 0 0 1.05rem; padding: 0 0 1.12rem; border-bottom: 1px solid var(--print-line); }
.sheet-meta { display: flex; justify-content: space-between; align-items: center; color: #496357; gap: .65rem; font-weight: 760; font-size: .9rem; }
.sheet-meta span:first-child { display: inline-block; padding: .16rem .62rem; border-radius: 99px; background: var(--print-tint); color: var(--print-pine); border: 1px solid #cad6cc; }
.sheet-meta span:last-child { color: var(--print-gold); }
.sheet-head h1 { margin: .55rem 0 .48rem; font-size: clamp(1.85rem,3.45vw,3.1rem); line-height: 1.19; letter-spacing: -.045em; color: #162d24; }
.sheet-use { color: #445a4f; max-width: 48rem; font-size: 1.04rem; }
.sheet-student-line { display: grid; grid-template-columns: 1.35fr 1fr; gap: .82rem; margin-bottom: 1.45rem; }
.sheet-student-line label { display: flex; align-items: center; gap: .5rem; margin: 0; white-space: nowrap; padding: .46rem .72rem; background: var(--print-tint); border: 1px solid #d2ddd4; border-radius: .35rem; font-weight: 750; color: var(--print-pine); }
.sheet-student-line input { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid #7f9687; background: transparent; color: var(--print-ink); }
.sheet-step { margin-top: 1.25rem; padding: 1.25rem 0 .15rem; border-top: 1px solid #d6ded4; }
.sheet-step:first-of-type { border: 0; padding-top: .15rem; }
.sheet-step > header { display: flex; align-items: flex-start; gap: .74rem; margin-bottom: .8rem; }
.sheet-step > header h2 { font-size: clamp(1.25rem,2.35vw,1.55rem); margin: 0 0 .25rem; color: #183228; }
.sheet-step > header p { color: #46594f; margin: 0; }
.sheet-step-number {
  display: flex; align-items: center; justify-content: center; flex: 0 0 2.05rem;
  height: 2.05rem; color: #fffdf6; background: var(--print-pine); border-radius: .35rem;
  font-size: .9rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums;
}
.answer-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: .62rem; }
.answer-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.answer-grid-3 { grid-template-columns: var(--answer-columns,repeat(3,minmax(0,1fr))); }
.answer-block {
  display: flex; flex-direction: column; min-width: 0;
  padding: 0; overflow: hidden; background: #fff;
  border: 1px solid var(--print-line); border-radius: .42rem;
}
.answer-block > label {
  display: flex; align-items: center; gap: .45rem; font-weight: 760;
  margin: 0; padding: .48rem .75rem; color: #19342a;
  background: #f2f6f0; border-bottom: 1px solid #dce4dd;
}
.answer-block p { color: #485e53; font-size: .89rem; margin: 0; padding: .38rem .75rem .1rem; }
.answer-number {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--print-pine); color: #fffdf6; border-radius: .24rem;
  min-width: 1.5rem; height: 1.32rem; padding: 0 .28rem;
  font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.student-sheet .worksheet textarea {
  display: block; padding: .2rem .75rem .45rem; background-color: transparent;
  background-image: repeating-linear-gradient(transparent 0 calc(1.55rem - 1px),#b9c6bb calc(1.55rem - 1px) 1.55rem);
  background-origin: content-box;
  line-height: 1.55rem; border: 0; border-radius: 0; resize: vertical;
  margin: auto 0 0; color: var(--print-ink); width: 100%; min-height: 1.8rem;
}
.student-sheet .student-table textarea { padding: 0 .2rem; min-height: 1.55rem; }
.sheet-reading, .sheet-photo { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .63rem; margin-bottom: .72rem; }
.sheet-reading.reading-count-1 { grid-template-columns: 1fr; }
.reading-card { padding: .78rem .9rem; border: 1px solid #e2dac1; border-left: 3.5px solid var(--print-pine); border-radius: .35rem; background: var(--print-reading); }
.reading-card h3 { font-size: 1.03rem; margin-bottom: .28rem; color: var(--print-pine); }
.reading-card p { color: #2d4338; }
.sheet-photo { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
.sheet-photo figure { margin: 0; }
.sheet-photo img { display: block; width: 100%; height: auto; border-radius: .35rem; border: 1px solid #cad5cc; }
.sheet-photo figcaption { font-size: .84rem; margin-top: .34rem; color: #42584c; }
.sheet-photo a, .sheet-sources a { color: #2b5444; text-underline-offset: .17rem; }
.sheet-checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.sheet-checks label { display: flex; align-items: flex-start; gap: .58rem; padding: .65rem .75rem; margin: 0; background: #fcfdfb; border: 1px solid var(--print-line); border-radius: .4rem; font-weight: 540; }
.sheet-checks input { flex: 0 0 auto; width: 1.12rem; height: 1.12rem; accent-color: #1e3f33; margin: .25rem 0 0; }
.student-table { min-width: 0; margin: .2rem 0 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid #9db0a2; border-radius: .42rem; overflow: hidden; }
.student-table th, .student-table td { border: 0; border-top: 1px solid #cbd6cd; border-right: 1px solid #d5ded7; }
.student-table tr:first-child th, .student-table tr:first-child td { border-top: 0; }
.student-table th:last-child, .student-table td:last-child { border-right: 0; }
.student-table thead th { background: var(--print-tint); color: #1b362c; border-bottom: 1px solid #9db0a2; }
.student-table tbody th { background: #f5f8f3; color: var(--print-pine); text-align: center; }
.student-table td { padding: .57rem .61rem; background: #fff; }
.small-table-heading { display: none; }
.sheet-sources { border-top: 1px solid #d1d8cc; margin-top: 1.65rem; padding-top: .8rem; }
.sheet-sources h2 { font-size: 1rem; }
.student-sheet .worksheet-notice { font-size: .91rem; margin: 1.02rem 0 0; }
@media (max-width: 680px) {
  .answer-grid-3, .sheet-reading, .sheet-photo { grid-template-columns: 1fr; }
  .student-table colgroup, .student-table thead { display: none; }
  .student-table, .student-table tbody, .student-table tr, .student-table td, .student-table tbody th { display: block; }
  .student-table tr { border: 1px solid var(--print-line); border-radius: .35rem; overflow: hidden; margin-bottom: .6rem; }
  .student-table td, .student-table tbody th { border: 0; }
  .student-table tbody th { text-align: left; padding: .39rem .65rem; }
  .small-table-heading { display: block; font-weight: 745; font-size: .88rem; }
}
@media (max-width: 460px) {
  .sheet-checks, .answer-grid-2 { grid-template-columns: 1fr; }
  .sheet-student-line { gap: .45rem; }
  .sheet-student-line label { padding: .36rem .52rem; }
}
.sheet-foot { display: none; }

/* 학생 활동지 인쇄와 PDF: 출판물 수준의 워크북 스타일을 유지하며 A4 한 장에 맞춥니다.
   --write-line(쓰기 줄 간격)은 build-student-pdf.mjs가 쪽마다 맞춰 넣습니다. */
@page sheet { size: A4; margin: 11mm 12mm 10mm; }
@media print {
  .student-sheet-actions, .student-sheet .worksheet-notice { display: none; }
  .student-sheet {
    page: sheet; --write-line: 7.4mm;
    display: flex; flex-direction: column; min-height: 274.5mm;
    max-width: none; margin: 0; padding: 0 .4mm; font-size: 10pt; line-height: 1.5;
    background: white; border: 0; border-radius: 0; box-shadow: none;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .student-sheet + .student-sheet { break-before: page; }
  .student-sheet .worksheet { display: block; margin: 0 0 2.5mm; }
  .sheet-head {
    position: relative; margin: 0 0 3mm; padding: 2.6mm 0 2.8mm;
    border-top: 2.6pt solid #1e3f33; border-bottom: .9pt solid #c4d0c7;
  }
  .sheet-head::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0;
    height: .8pt; background: #d5b77a;
  }
  .sheet-meta { font-size: 8.8pt; margin-bottom: .4mm; }
  .sheet-meta span:first-child { padding: .6mm 2.4mm; background: #e9f0e8; border: .6pt solid #c2d1c5; color: #1e3f33; }
  .sheet-meta span:last-child { color: #8c6724; font-weight: 780; }
  .sheet-head h1 { margin: 1.5mm 0 1mm; font-size: 20.5pt; line-height: 1.2; letter-spacing: -.04em; color: #162d24; }
  .sheet-use { max-width: none; font-size: 9.8pt; color: #40564b; line-height: 1.48; }
  .sheet-student-line { gap: 3mm; margin-bottom: 3.2mm; }
  .sheet-student-line label { padding: 1.5mm 3mm; font-size: 9.4pt; font-weight: 760; background: #f1f5ef; border: .7pt solid #cbd8cd; border-radius: 4pt; }
  .sheet-student-line input { height: 5.2mm; border-bottom: .75pt solid #7d9485; }
  .sheet-step { break-inside: avoid; margin-top: 3mm; padding: 3mm 0 0; border-top: .75pt solid #d5ded5; }
  .sheet-step:first-of-type { padding-top: 0; border-top: 0; }
  .sheet-step > header { gap: 2.4mm; margin-bottom: 2.1mm; }
  .sheet-step > header h2 { font-size: 13pt; margin-bottom: .4mm; color: #183228; }
  .sheet-step > header p { font-size: 9.2pt; color: #465d52; }
  .sheet-step-number { flex-basis: 6.6mm; height: 6.6mm; font-size: 8.8pt; border-radius: 3.2pt; background: #1e3f33; color: #fffdf6; border: 0; }
  .answer-grid { gap: 2.3mm; }
  .answer-block {
    padding: 0; break-inside: avoid; background: #ffffff;
    border: .8pt solid #b8c6bb; border-radius: 4.5pt;
  }
  .answer-block > label {
    padding: 1.4mm 2.6mm; margin: 0; font-size: 9.5pt; line-height: 1.38;
    background: #f1f5ef; border-bottom: .6pt solid #d9e2da; color: #1a352b;
  }
  .answer-block p { padding: 1.1mm 2.6mm 0; font-size: 8.6pt; line-height: 1.4; margin: 0; color: #496055; }
  .answer-number { min-width: 5mm; height: 4.4mm; font-size: 8pt; border-radius: 2.2pt; }
  .student-sheet .worksheet textarea { display: none; }
  .student-sheet .print-lines { display: block; position: relative; margin: auto 0 0; padding: .3mm 2.6mm 1.5mm; }
  .student-sheet .print-lines span { display: block; height: var(--write-line); border-bottom: .65pt dashed #9db0a2; }
  .student-sheet .print-lines .print-answer {
    position: absolute; inset: .3mm 2.6mm 1.5mm; margin: 0; padding: 0 .6mm; border: 0; min-height: 0;
    line-height: var(--write-line); white-space: pre-wrap; overflow: hidden; font-size: 9.6pt;
  }
  .student-sheet .print-lines.has-answer span { display: none; }
  .student-sheet .print-lines.has-answer .print-answer {
    position: static; overflow: visible; min-height: calc(var(--rows, 1) * var(--write-line));
    background: repeating-linear-gradient(transparent 0 calc(var(--write-line) - .65pt), #9db0a2 calc(var(--write-line) - .65pt) var(--write-line));
  }
  .student-table {
    margin: 0; font-size: 9.5pt; line-height: 1.38;
    border-collapse: separate; border-spacing: 0;
    border: .85pt solid #9ab0a0; border-radius: 4.5pt; overflow: hidden;
  }
  .student-table th, .student-table td { border: 0; border-top: .65pt solid #c8d4ca; border-right: .6pt solid #d5dfd7; }
  .student-table thead tr:first-child th { border-top: 0; }
  .student-table tbody tr:first-child th, .student-table tbody tr:first-child td { border-top: 0; }
  .student-table th:last-child, .student-table td:last-child { border-right: 0; }
  .student-table thead th { padding: 1.7mm 2.4mm; text-align: left; background: #e8efe7; color: #19342a; border-bottom: .8pt solid #9ab0a0; font-size: 9.2pt; }
  .student-table tbody th { padding: 0 1mm; font-size: 9.8pt; vertical-align: middle; background: #f4f7f2; color: #1e3f33; border-right: .8pt solid #aec0b2; }
  .student-table td { padding: .6mm 2.4mm 1.4mm; vertical-align: bottom; background: #fff; }
  .student-table td .print-lines { padding: 0; }
  .student-table td .print-lines .print-answer { inset: 0; }
  .student-table tr { break-inside: avoid; }
  .sheet-reading, .sheet-photo { gap: 2.3mm; margin-bottom: 2.2mm; }
  .reading-card {
    padding: 2.2mm 3mm; break-inside: avoid;
    background: #f7f4eb; border: .7pt solid #e0d8be; border-left: 3pt solid #1e3f33; border-radius: 3.8pt;
  }
  .reading-card h3 { font-size: 9.8pt; margin-bottom: .5mm; color: #1e3f33; }
  .reading-card p { font-size: 9.3pt; line-height: 1.54; color: #2b4137; }
  .sheet-photo img { border-radius: 3.5pt; border: .75pt solid #c7d2c9; }
  .sheet-photo figcaption { font-size: 7.9pt; line-height: 1.38; margin-top: 1mm; color: #496055; }
  .sheet-checks { gap: 2mm; }
  .sheet-checks label {
    padding: 2mm 2.6mm; font-size: 9.5pt; line-height: 1.45; break-inside: avoid;
    background: #fcfdfb; border: .8pt solid #bdcac0; border-radius: 4.2pt;
  }
  .sheet-checks input {
    -webkit-appearance: none; appearance: none; position: relative;
    width: 3.8mm; height: 3.8mm; margin-top: .45mm;
    border: 1.1pt solid #1e3f33; border-radius: 1.4pt; background: #fff;
  }
  .sheet-checks input:checked { background: #1e3f33; }
  .sheet-checks input:checked::after {
    content: ""; position: absolute; left: 1.1mm; top: .45mm; width: 1.1mm; height: 2mm;
    border: solid #fff; border-width: 0 .45mm .45mm 0; transform: rotate(45deg);
  }
  .sheet-sources { display: flex; align-items: baseline; gap: 2.8mm; margin-top: 2.6mm; padding-top: 1.8mm; border-top: .7pt solid #cfd9d1; }
  .sheet-sources h2 { flex: 0 0 auto; font-size: 8.4pt; color: #1e3f33; }
  .sheet-sources .material-sources { display: flex; flex-wrap: wrap; gap: .3mm 3.2mm; margin: 0; padding: 0; list-style: none; font-size: 8.2pt; line-height: 1.42; }
  .sheet-foot {
    display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1.8mm;
    border-top: .85pt solid #294b3d; color: #43594e; font-size: 8.4pt;
  }
  .sheet-foot span:last-child {
    background: #e9f0e8; color: #1e3f33; padding: .4mm 2.2mm; border-radius: 99pt;
    font-weight: 800; font-variant-numeric: tabular-nums;
  }
}
