/* 탐구보고서 화면(과학 탐구 실험실 v1) — 학생 쓰기 · 선생님 첨삭(손글씨 느낌) · A4 인쇄
   2026-10-23 원장: 초등 1장·중등 2~3장, 첨삭은 형광펜·고치기(글 위에 바른 말)·말풍선·가이드/질문 버튼. 손글씨 글꼴 Gaegu(이미 사이트에 있음). */
@font-face { font-family: Gaegu; src: url('./assets/fonts/gaegu-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root { --rp-ink: #c0392b; --rp-ink-2: #b03a2e; --rp-hl: rgba(255, 221, 64, .55); --rp-sticky: #fff6b3; --rp-hand: Gaegu, Pretendard, sans-serif; --rp-paper: #fffdf8; }

.report-page .unit-head .crumb .lv { border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; background: #e3f1ec; color: var(--accent); }
.rp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 14px; }
.rp-bar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.rp-bar .seg button { border: 0; background: transparent; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.rp-bar .seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 700; }
.rp-bar .seg.teach button[aria-pressed="true"] { background: var(--rp-ink); }
.rp-bar .btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.rp-bar .sp { flex: 1; }
.rp-bar .count { font-size: 13px; color: var(--ink-3); }
.rp-tip { font-size: 13px; color: var(--ink-2); background: var(--paper-2); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.rp-tip b { color: var(--rp-ink); }

/* 종이 — 어두운 실험실 테마 안이라 글자색을 종이용으로 못 박는다 */
.rp-sheet, .rp-sheet h1, .rp-sheet h3, .rp-sheet label, .rp-sheet td, .rp-sheet th, .rp-sheet input, .rp-sheet textarea, .rp-sheet p { color: var(--ink); }
.rp-sheet h3 small, .rp-foot, .rp-view:empty::before { color: var(--ink-3); }
.rp-tip { background: #efe8d9; color: #4b5563; }
.rp-bar .btn, .rp-bar .seg button { color: #1f2a37; }
.rp-bar .count { color: #cfc6ba; }
.rp-checks { background: #efe8d9; }
.rp-sheet { background: var(--rp-paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 28px 30px 26px; max-width: 820px; margin: 0 auto 28px; position: relative; }
.rp-head { display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.rp-head h1 { font-family: var(--serif); font-size: 24px; margin: 0; line-height: 1.25; }
.rp-head .kind { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; font-weight: 800; margin-bottom: 4px; }
.rp-who { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; font-size: 13px; align-items: center; min-width: 220px; }
.rp-who input { border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; padding: 2px 4px; min-width: 120px; }
.rp-cell { display: grid; grid-template-columns: 150px 1fr; gap: 0 14px; border-bottom: 1px dashed var(--line); padding: 12px 0; position: relative; }
.rp-cell > h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.rp-cell > h3 small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }
.rp-body { min-width: 0; position: relative; }
.rp-edit { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 15px; line-height: 1.7; resize: vertical; background: #fff; min-height: 64px; }
.rp-view { font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: keep-all; min-height: 32px; padding: 4px 2px; }
.rp-view:empty::before { content: '아직 쓰지 않았어요'; color: var(--ink-3); font-style: italic; }
.rp-text.editing .rp-view, .rp-text:not(.editing) .rp-edit { display: none; }
.teach .rp-text .rp-edit { display: none; } .teach .rp-text .rp-view { display: block; }
.rp-cell .rp-ctl { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.rp-cell .rp-ctl button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.rp-cell .rp-ctl button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.rp-add summary { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; background: #fff; }
.rp-add summary.g { color: #7a5710; border-color: #e7cf6a; background: #fffbe6; }
.rp-add summary.q { color: var(--rp-ink); border-color: #e8b4ad; background: #fff3f1; }

/* 첨삭 표시 — 글 위에 손으로 쓴 것처럼 */
.rp-view .p { position: relative; }
.rp-view .p.hl { background: linear-gradient(104deg, transparent 2%, var(--rp-hl) 3%, var(--rp-hl) 96%, transparent 97%); border-radius: 2px; padding: 1px 0; }
.rp-view .p.fix { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--rp-ink); text-decoration-thickness: 2px; }
.rp-view .p.fix::after { content: attr(data-fix); position: absolute; left: 0; top: -1.05em; white-space: nowrap; font-family: var(--rp-hand); font-size: 17px; color: var(--rp-ink); line-height: 1; transform: rotate(-2deg); transform-origin: left bottom; text-decoration: none; pointer-events: none; }
.rp-view .p.note { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='8' viewBox='0 0 60 8'><path d='M0 5 Q 7 1 15 5 T 30 5 T 45 5 T 60 5' fill='none' stroke='%23c0392b' stroke-width='2' stroke-linecap='round'/></svg>"); background-repeat: repeat-x; background-position: 0 100%; background-size: 60px 8px; padding-bottom: 3px; }
.rp-view .p .no { font-family: var(--rp-hand); color: #fff; background: var(--rp-ink); border-radius: 50%; width: 17px; height: 17px; display: inline-grid; place-items: center; font-size: 12px; margin-left: 2px; vertical-align: super; line-height: 1; cursor: pointer; user-select: none; }
.teach .rp-view .p.hl, .teach .rp-view .p.fix, .teach .rp-view .p.note { cursor: pointer; }
.rp-bubble { display: inline-block; vertical-align: middle; margin: 2px 0 2px 6px; max-width: 320px; font-family: var(--rp-hand); font-size: 16.5px; line-height: 1.3; color: var(--rp-ink); background: #fff; border: 1.5px solid var(--rp-ink); border-radius: 12px; padding: 4px 10px; position: relative; transform: rotate(-1deg); user-select: none; white-space: normal; }
.rp-bubble::before { content: ''; position: absolute; left: -9px; top: 9px; border: 5px solid transparent; border-right-color: var(--rp-ink); }
.rp-bubble.hidden { display: none; }
.rp-lost { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }
.rp-lost b { font-family: var(--rp-hand); color: var(--rp-ink); font-size: 15px; }

/* 메모(가이드·질문) — 포스트잇 / 빨간 펜 질문 */
.rp-notes { display: grid; gap: 6px; margin-top: 8px; }
.rp-sticky { position: relative; font-family: var(--rp-hand); font-size: 17px; line-height: 1.35; padding: 8px 32px 8px 34px; border-radius: 3px; box-shadow: 0 2px 6px rgba(31,42,55,.12); transform: rotate(-.6deg); }
.rp-sticky.guide { background: var(--rp-sticky); color: #5a4300; }
.rp-sticky.question { background: #fff; color: var(--rp-ink); border: 1.5px dashed var(--rp-ink); transform: rotate(.5deg); }
.rp-sticky::before { position: absolute; left: 10px; top: 7px; font-size: 15px; }
.rp-sticky.guide::before { content: '✎'; }
.rp-sticky.question::before { content: '?'; font-weight: 900; font-size: 18px; }
.rp-sticky.done { opacity: .5; text-decoration: line-through; }
.rp-sticky .x { position: absolute; right: 6px; top: 4px; border: 0; background: transparent; font-size: 15px; cursor: pointer; color: inherit; }
.rp-sticky label.ok { position: absolute; right: 8px; top: 7px; font-family: var(--font); font-size: 12px; color: var(--accent); display: flex; gap: 4px; align-items: center; cursor: pointer; }
.rp-add { position: relative; }
.rp-add summary { list-style: none; cursor: pointer; }
.rp-add summary::-webkit-details-marker { display: none; }
.rp-add .menu { position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 280px; max-width: min(420px, 90vw); }
.rp-add .menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.rp-add .menu button:hover { background: var(--paper-2); }
.rp-add .menu form { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.rp-add .menu input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }

/* 선택 도구 막대 */
.rp-tools { position: absolute; z-index: 30; display: flex; gap: 4px; background: #1f2a37; color: #fff; border-radius: 10px; padding: 5px 6px; box-shadow: 0 6px 20px rgba(0,0,0,.25); align-items: center; }
.rp-tools button { border: 0; background: transparent; color: #fff; font-size: 13px; padding: 5px 8px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.rp-tools button:hover { background: rgba(255,255,255,.14); }
.rp-tools input { border: 0; border-radius: 7px; padding: 5px 8px; font: inherit; font-size: 13px; min-width: 180px; }
.rp-tools::after { content: ''; position: absolute; left: 14px; top: 100%; border: 6px solid transparent; border-top-color: #1f2a37; }

/* 결과 표·그래프·사진 */
/* 날짜 칸이 많은 표(강낭콩 자람 등)는 폰에서 표 안에서만 옆으로 밀어 본다 — 페이지 전체가 옆으로 밀리지 않게 */
.rp-table-wrap { max-width: 100%; overflow-x: auto; }
@media print { .rp-table-wrap { overflow: visible; } }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.rp-table th, .rp-table td { border: 1px solid var(--line); padding: 5px 8px; min-width: 56px; }
.rp-table th { background: var(--paper-2); font-weight: 700; text-align: center; }
.rp-table td[contenteditable] { outline: none; } .rp-table td[contenteditable]:focus { background: #fffbe6; }
.rp-table td.mean { background: #eef6f3; font-weight: 700; text-align: center; }
.rp-table th[contenteditable] { background: #f3eedf; }
.rp-chart { margin-top: 10px; }
.rp-chart svg { width: 100%; max-width: 560px; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.rp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.rp-photo { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.rp-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; display: block; }
.rp-photo input { width: 100%; border: 0; border-bottom: 1px solid var(--line); font: inherit; font-size: 12.5px; margin-top: 4px; padding: 2px; }
.rp-photo .x { position: absolute; right: 2px; top: 2px; border: 0; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.rp-photo-add { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer; background: #fff; }
.rp-photo-add input { display: none; }

.rp-checks { margin-top: 14px; background: var(--paper-2); border-radius: 10px; padding: 10px 14px; }
.rp-checks h3 { margin: 0 0 6px; font-size: 14px; }
.rp-checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 2px 0; }
.rp-foot { margin-top: 16px; font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }
.rp-break { display: none; }

@media (max-width: 760px) {
  .rp-sheet { padding: 18px 14px; }
  .rp-cell { grid-template-columns: 1fr; gap: 6px; }
  .rp-head { grid-template-columns: 1fr; }
  .rp-tools { flex-wrap: wrap; max-width: calc(100vw - 24px); }
}
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; @bottom-right { content: '전체 ( ' counter(pages) ' )쪽 중 ( ' counter(page) ' )쪽'; font-size: 9pt; color: #555; } }
  .rp-photos .redraw, .rp-tree-msg, .rp-tree .mini { display: none !important; }
  .rp-tree input { border: 0 !important; }
  body { background: #fff !important; }
  .archive-theme .topbar, .unit-head, .rp-bar, .rp-tip, footer, .rp-ctl, .rp-add, .rp-photo-add, .rp-photo .x, .rp-sticky .x, .rp-tools, .rp-lost, .no-print { display: none !important; }
  .rp-sheet { box-shadow: none; border: 0; max-width: none; padding: 0; margin: 0; }
  .rp-cell { break-inside: avoid; grid-template-columns: 130px 1fr; }
  .rp-text .rp-edit { display: none !important; } .rp-text .rp-view { display: block !important; }
  .rp-obs-blank { border-style: solid; }
  .rp-view .p.hl { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-sticky, .rp-bubble { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-break { display: block; break-after: page; height: 0; }
  .rp-who input { border-bottom-color: #999; }
  .hide-marks .rp-view .p.hl { background: none; }
  .hide-marks .rp-view .p.fix { text-decoration: none; color: inherit; } .hide-marks .rp-view .p.fix::after { display: none; }
  .hide-marks .rp-view .p.note { background-image: none; } .hide-marks .rp-view .p .no, .hide-marks .rp-bubble, .hide-marks .rp-notes { display: none !important; }
}

/* ── 대회 양식(2026-10-23): 관찰그림|설명 · 벤 다이어그램 · 분류 나무 · 갤러리 · 그리기판 ── */
.rp-bar .seg.contest button[aria-pressed="true"] { background: #6d4c9f; }
.rp-cell .rp-ctl.mini { margin-top: 4px; }
.rp-cell .rp-ctl.mini button { padding: 2px 8px; font-size: 12px; }
.rp-cell.kind-obs, .rp-cell.kind-venn, .rp-cell.kind-tree { grid-template-columns: 1fr; gap: 8px; }
.rp-obs { border: 1.5px solid var(--ink); }
.rp-obs-head { display: grid; grid-template-columns: minmax(200px, 44%) 1fr; background: #ece7da; font-weight: 800; font-size: 13px; text-align: center; border-bottom: 1.5px solid var(--ink); }
.rp-obs-head span { padding: 5px; } .rp-obs-head span + span { border-left: 1px solid var(--ink); }
.rp-obs-row { display: grid; grid-template-columns: minmax(200px, 44%) 1fr; border-bottom: 1px solid #9aa3ad; break-inside: avoid; }
.rp-obs-row:last-child { border-bottom: 0; }
.rp-obs-fig { padding: 8px; border-right: 1px solid #9aa3ad; display: grid; gap: 6px; align-content: start; }
.rp-obs-fig img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; border-radius: 4px; }
.rp-obs-blank { aspect-ratio: 4/3; border: 1px dashed #b9c0c8; border-radius: 4px; display: grid; place-items: center; color: #9aa3ad; font-size: 13px; background: #fff; }
.rp-obs-label { border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-weight: 800; font-size: 14px; padding: 2px 4px; color: var(--ink); }
.rp-obs-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.rp-obs-tools button, .rp-obs-tools label { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.rp-obs-tools input { display: none; }
.rp-obs-text { padding: 8px 10px; min-width: 0; }
.rp-add-media { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rp-photo .redraw { position: absolute; left: 8px; top: 8px; border: 0; background: rgba(255,255,255,.9); border-radius: 6px; font-size: 11.5px; padding: 2px 6px; cursor: pointer; }

.rp-venn { position: relative; display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 0; min-height: 280px; padding: 44px 8px 18px; }
.rp-venn .ring { position: absolute; top: 30px; bottom: 6px; width: 62%; border: 2px solid var(--ink); border-radius: 50%; pointer-events: none; }
.rp-venn .ring.a { left: 0; } .rp-venn .ring.b { right: 0; }
.rp-venn-name { position: absolute; top: 0; width: 32%; text-align: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-weight: 800; color: var(--ink); }
.rp-venn-name.a { left: 8%; } .rp-venn-name.b { right: 8%; }
.rp-venn-zone { position: relative; padding: 18px 12px 10px; min-width: 0; z-index: 1; }
.rp-venn-zone.a { padding-left: 10%; } .rp-venn-zone.b { padding-right: 10%; }
.rp-venn-zone > b { display: block; text-align: center; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.rp-venn-zone .rp-view { font-size: 14px; line-height: 1.7; }
.rp-venn-zone .rp-edit { font-size: 14px; }

.rp-tree, .rp-tree ul { list-style: none; margin: 0; padding: 0; }
.rp-tree { overflow-x: auto; padding-bottom: 6px; }
.rp-tree ul { display: flex; gap: 14px; padding-top: 18px; position: relative; justify-content: center; }
.rp-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 10px; border-left: 1.5px solid var(--ink); }
.rp-tree .tn { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.rp-tree ul > .tn::before { content: ''; position: absolute; top: -8px; height: 10px; border-top: 1.5px solid var(--ink); }
.rp-tree ul > .tn:first-child::before { left: 50%; right: -7px; border-left: 1.5px solid var(--ink); }
.rp-tree ul > .tn:last-child::before { right: 50%; left: -7px; border-right: 1.5px solid var(--ink); }
.rp-tree .side { font-size: 12px; font-weight: 800; margin-bottom: 3px; padding: 1px 8px; border-radius: 999px; }
.rp-tree .side.y { background: #e3f1ec; color: #1f6b56; } .rp-tree .side.n { background: #f6e7e4; color: #9a3a2c; }
.rp-tree .box { border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; padding: 6px 8px; display: grid; gap: 6px; max-width: 280px; }
.rp-tree .leaf .box { border-style: dashed; }
.rp-tree .chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.rp-tree .chip { border: 1.5px solid #9aa3ad; background: #fff; border-radius: 999px; padding: 1px 9px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); }
.rp-tree .chip:not(:disabled) { cursor: pointer; }
.rp-tree .chip.y { border-color: #2f7d6d; background: #e3f1ec; } .rp-tree .chip.n { border-color: #c27c70; background: #f8ece9; }
.rp-tree .q { display: grid; gap: 4px; }
.rp-tree .q input { border: 0; border-bottom: 1px solid var(--line); font: inherit; font-size: 13px; padding: 2px 4px; min-width: 200px; text-align: center; background: transparent; }
.rp-tree .qtext { font-size: 13px; text-align: center; }
.rp-tree .mini { justify-self: center; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.rp-tree .mini.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.rp-tree .none { color: var(--ink-3); font-size: 12px; }
.rp-tree-msg { font-size: 12.5px; color: #9a3a2c; margin: 6px 0; } .rp-tree-msg.ok { color: #1f6b56; }
.rp-gallery-open { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.rp-gallery-open small { color: var(--ink-3); font-size: 12px; }
.rp-gallery-open button:disabled { opacity: .5; cursor: not-allowed; }

/* 그리기판·갤러리 창 */
body.sk-open { overflow: hidden; }
.sk-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(10, 14, 18, .72); display: grid; place-items: center; padding: 14px; }
.sk-box { background: #fbf8f1; color: #1f2a37; border-radius: 14px; width: min(1240px, 100%); max-height: calc(100vh - 28px); overflow: auto; display: grid; gap: 8px; padding: 12px 14px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.sk-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.sk-sp { flex: 1; }
.sk-btn { border: 1px solid #cfc8b8; background: #fff; color: #1f2a37; border-radius: 9px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.sk-btn.primary { background: #2f7d6d; border-color: #2f7d6d; color: #fff; font-weight: 700; }
.sk-tools { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.sk-grp { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.sk-tool, .sk-size { border: 1px solid #cfc8b8; background: #fff; color: #1f2a37; border-radius: 8px; padding: 5px 9px; font-size: 13px; cursor: pointer; }
.sk-tool[aria-pressed="true"], .sk-size[aria-pressed="true"] { background: #1f2a37; color: #fff; border-color: #1f2a37; }
.sk-color { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px #cfc8b8; cursor: pointer; }
.sk-color[aria-pressed="true"] { box-shadow: 0 0 0 2px #1f2a37; }
.sk-main { display: grid; gap: 10px; }
.sk-main.has-ref { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.sk-ref { margin: 0; background: #11161b; border-radius: 10px; padding: 6px; display: grid; gap: 4px; align-content: start; }
.sk-ref img { width: 100%; border-radius: 6px; display: block; }
.sk-ref figcaption { color: #cfd6dd; font-size: 12px; padding: 0 4px 2px; }
.sk-stage { background: #e9e4d8; border-radius: 10px; padding: 6px; display: grid; place-items: center; }
.sk-stage canvas { width: 100%; max-height: calc(100vh - 230px); object-fit: contain; aspect-ratio: 4 / 3; background: #fff; border-radius: 4px; touch-action: none; cursor: crosshair; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.sk-hint { margin: 0; font-size: 12.5px; color: #5b6573; }
.rp-gallery .sk-box { width: min(980px, 100%); }
.rp-g-lead { margin: 0; font-size: 14px; color: #3f4a57; } .rp-g-lead b { color: #6d4c9f; }
.rp-g-filter { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.rp-g-filter > span { font-weight: 800; color: #5b6573; margin-right: 4px; min-width: 30px; }
.rp-g-filter button { border: 1px solid #cfc8b8; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: #1f2a37; }
.rp-g-filter button[aria-pressed="true"] { background: #6d4c9f; color: #fff; border-color: #6d4c9f; }
.rp-g-ask { margin: 0; font-size: 13.5px; color: #6d4c9f; font-weight: 700; }
.rp-g-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rp-g-card { background: #fff; border: 1px solid #e2dccd; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; align-content: start; font-size: 13px; line-height: 1.5; }
.rp-g-card h4 { margin: 2px 0; font-size: 15px; }
.rp-g-card p { margin: 0; } .rp-g-card p b { color: #6d4c9f; margin-right: 4px; }
.rp-g-card small { color: #7a8491; font-size: 11.5px; }
.rp-g-card .tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.rp-g-card .tags em { font-style: normal; font-size: 11.5px; background: #efe8fa; color: #5a3d8a; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.rp-g-card .tags span { font-size: 11px; color: #7a8491; margin-left: auto; }
.rp-g-card button { justify-self: end; border: 1px solid #6d4c9f; color: #6d4c9f; background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; margin-top: 4px; }
.rp-g-none { color: #7a8491; }
@media (max-width: 760px) {
  .rp-obs-head { display: none; }
  .rp-obs-row { grid-template-columns: 1fr; }
  .rp-obs-fig { border-right: 0; border-bottom: 1px dashed #c9cfd6; }
  .rp-venn { grid-template-columns: 1fr; padding: 8px 0; min-height: 0; gap: 8px; }
  .rp-venn .ring { display: none; }
  .rp-venn-name { position: static; width: auto; }
  .rp-venn-zone { border: 1.5px solid var(--ink); border-radius: 14px; padding: 8px 10px; }
  .rp-venn-zone.a, .rp-venn-zone.b { padding: 8px 10px; }
  .rp-venn-zone.both { background: #f3f0e6; }
  .sk-main.has-ref { grid-template-columns: 1fr; }
  .sk-ref img { max-height: 24vh; object-fit: contain; }
  .sk-modal { padding: 0; } .sk-box { border-radius: 0; max-height: 100vh; height: 100vh; }
}
@media (max-width: 760px) { .rp-venn { display: grid; } .rp-venn-name.a { order: 0; } .rp-venn-zone.a { order: 1; } .rp-venn-zone.both { order: 2; } .rp-venn-name.b { order: 3; } .rp-venn-zone.b { order: 4; } }

/* ── 자연관찰 연습(#/observe) ── */
.ob-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.ob-steps li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: rgba(143, 209, 138, .14); color: #d9f0d6; border: 1px solid rgba(143, 209, 138, .35); border-radius: 999px; padding: 3px 10px 3px 4px; }
.ob-steps li b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #8fd18a; color: #13261a; font-size: 12px; }
.ob-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr); gap: 18px; align-items: start; margin-top: 14px; }
.ob-viewer { position: sticky; top: 64px; background: #fbf8f1; color: #1f2a37; border-radius: 14px; padding: 12px; display: grid; gap: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.ob-tabs, .ob-mode, .ob-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ob-row .sp { flex: 1; }
.ob-viewer button { border: 1px solid #cfc8b8; background: #fff; color: #1f2a37; border-radius: 9px; padding: 6px 11px; font-size: 13.5px; cursor: pointer; }
.ob-viewer button:disabled { opacity: .45; cursor: default; }
.ob-tabs button { font-size: 18px; font-weight: 800; padding: 4px 14px; }
.ob-tabs button[aria-selected="true"], .ob-viewer button[aria-pressed="true"] { background: #2f6b3a; color: #fff; border-color: #2f6b3a; }
.ob-stage { position: relative; border-radius: 10px; overflow: hidden; background: #ece6d8; }
.ob-stage canvas { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: pan-y; }
.ob-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #1b2420; }
.ob-photo img { width: 100%; height: 100%; object-fit: contain; }
.ob-photo-none { color: #cfe3cf; font-size: 14px; padding: 20px; text-align: center; }
/* 날짜별 사진(data/observe-photos.js): 사진 아래쪽에 차례 단추 */
.ob-photo { position: relative; }
.ob-photo-steps { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ob-photo-steps button { border: 0; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; background: rgba(16, 26, 22, .72); color: #e8f1ea; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ob-photo-steps button b { font-family: var(--mono, monospace); color: #9fd49a; }
.ob-photo-steps button[aria-pressed="true"] { background: #e9f5e4; color: #183020; }
.ob-photo-steps button[aria-pressed="true"] b { color: #2f6b3a; }
.ob-acts button { background: #eef6ea; border-color: #b9d7ae; }
.ob-note { margin: 0; min-height: 1.4em; font-size: 13.5px; color: #2f6b3a; font-weight: 700; }
.ob-think summary { cursor: pointer; font-weight: 800; font-size: 14px; }
.ob-think ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.ob-name { font-size: 14px; font-weight: 700; color: #3f4a57; }
.ob-report .rp-bar { margin-top: 0; }
.arch-observe { flex: 0 0 auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: #13261a; background: #bfe8bb; border-radius: 999px; padding: 6px 13px; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.5); white-space: nowrap; }
@media (max-width: 1000px) {
  .ob-grid { grid-template-columns: 1fr; }
  .ob-viewer { position: static; }
}
.rp-g-judge { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 12px; color: #5b6573; }
.rp-g-judge b { color: #3f4a57; margin-right: 4px; }
.rp-g-card small a { color: #6d4c9f; }
.ob-photo[hidden], .ob-stage canvas[hidden] { display: none; }
.rp-obs-fig { min-width: 0; } .rp-obs-label { width: 100%; min-width: 0; box-sizing: border-box; }
.rp-obs-fig img, .rp-obs-blank { max-width: 100%; box-sizing: border-box; }
.rp-venn-name { box-sizing: border-box; min-width: 0; }
.rp-tree .q input { min-width: 0; width: 100%; box-sizing: border-box; }
/* 자연관찰 연습 — 세트 선택·장소·환경 확인 */
.ob-sets { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.ob-sets a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13.5px; font-weight: 700; color: #d9f0d6; border: 1px solid rgba(143, 209, 138, .4); border-radius: 999px; padding: 5px 12px; }
.ob-sets a small { font-weight: 400; font-size: 11px; opacity: .8; }
.ob-sets a[aria-current="true"] { background: #8fd18a; color: #13261a; border-color: #8fd18a; }
.ob-place { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ob-place[data-title]:not([data-title=""])::before { content: attr(data-title); font-size: 12px; font-weight: 700; opacity: 0.75; margin-right: 2px; }
.ob-place button { font-weight: 700; }
.ob-place button[aria-pressed="true"] { background: #6d4c9f; border-color: #6d4c9f; color: #fff; }
.ob-acts-wrap { display: grid; gap: 6px; }
.ob-acts.env { padding-top: 6px; border-top: 1px dashed #d9d2c2; }
.ob-acts.env:empty { display: none; }
.ob-acts .ob-grp { font-size: 12px; font-weight: 800; color: #5b6573; margin-right: 4px; }
.ob-acts.env button { background: #fff7e6; border-color: #e7cf6a; }

.sk-ref figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sk-pencil { font-size: 12.5px; padding: 4px 9px; }
.sk-pencil[aria-pressed="true"] { background: #1f2a37; color: #fff; border-color: #1f2a37; }

/* ── 예시 보고서(연필이 그려 가는 관찰그림) ── */
.ob-sample-row { gap: 10px; }
.ob-sample { background: #fff7e6 !important; border-color: #e7cf6a !important; font-weight: 700; }
.ob-sample-row small { color: #5b6573; font-size: 12px; }
.rp-sample .sk-box { width: min(980px, 100%); gap: 10px; }
.rp-sample .rp-sheet.sample { margin: 0; max-width: none; }
.rp-sheet.sample .rp-who i { font-style: normal; font-family: var(--rp-hand); font-size: 18px; border-bottom: 1px solid var(--line); padding: 0 6px; min-width: 120px; color: var(--ink); }
.rp-sheet.sample .rp-view.sv { font-size: 14.5px; line-height: 1.75; }
.rp-sheet.sample .rp-view.sv b { color: #2f6b3a; font-weight: 800; }
.rp-sheet.sample .rp-obs-fig .rp-obs-label { font-size: 15px; }
.pz-wrap { position: relative; background: #fffdf8; border: 1px solid #e4dccb; border-radius: 4px; overflow: hidden; }
.pz-wrap svg { width: 100%; height: auto; display: block; }
.pz-wrap.wide { max-width: 560px; margin-bottom: 8px; }
.rp-sheet.sample .rp-obs-row { grid-template-columns: minmax(240px, 50%) 1fr; }
.rp-venn.static .rp-venn-name { font-size: 13.5px; color: var(--ink); }
.rp-venn.static .rp-venn-zone .rp-view { font-size: 13.5px; }
.rp-tree .chip.y { border-color: #2f7d6d; background: #e3f1ec; } .rp-tree .chip.n { border-color: #c27c70; background: #f8ece9; }
@media (max-width: 760px) { .rp-sheet.sample .rp-obs-row { grid-template-columns: 1fr; } .rp-sample .sk-head { flex-wrap: wrap; } }
@media print {
  body.print-sample > :not(.rp-sample) { display: none !important; }
  body.print-sample .rp-sample { position: static; background: #fff; padding: 0; display: block; }
  body.print-sample .rp-sample .sk-box { box-shadow: none; max-height: none; overflow: visible; padding: 0; }
  body.print-sample .sk-head, body.print-sample .rp-g-lead, body.print-sample .pz-hand { display: none !important; }
  .rp-sheet.sample .rp-obs-row { break-inside: avoid; }
}

/* ── 대회 폴더(원장 2026-10-25: 대회별로 어떻게 표시할지 · 폴더를 열면 대회 안내) ── */
/* 대회 색: 과학탐구 #7fc8f0 · 자연관찰 #8fd18a · 발명 #c9a6f0 — 카드 위 색 탭, 폴더 첫 장(대회 안내 카드), #/contest/<id> */
.ac-tabs { position: absolute; left: 24px; top: -27px; display: flex; gap: 4px; pointer-events: none; }
.ac-tab { font-size: 12px; font-weight: 800; letter-spacing: .01em; line-height: 1; padding: 8px 13px 10px; border-radius: 9px 9px 0 0; color: #10201a; background: #8fd18a; box-shadow: 0 -2px 10px rgba(0, 0, 0, .35); white-space: nowrap; }
.ac-tab.inquiry { background: #7fc8f0; color: #0c2130; } .ac-tab.invent { background: #c9a6f0; color: #22123a; }
.ac-tab.sub { font-size: 11px; padding: 6px 10px 8px; opacity: .72; margin-top: 4px; }
.arch-card:not(.front) .ac-tabs { opacity: .75; }
.arch-card.guide { border: 1.5px solid var(--tab); background: linear-gradient(180deg, color-mix(in srgb, var(--tab) 14%, #0f1a1a), #0a1213); }
.arch-card.guide h3 { margin-top: 16px; }
.arch-card.guide .ac-lead { font-size: 14px; }
.ac-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
.ac-facts dt { color: var(--tab); font-weight: 800; white-space: nowrap; } .ac-facts dd { margin: 0; color: #dbe6e4; }
.ac-judge { display: flex; gap: 3px; margin-top: 12px; font-size: 11.5px; }
.ac-judge span { background: color-mix(in srgb, var(--tab) 26%, transparent); border-top: 3px solid var(--tab); padding: 5px 8px; color: #e7efe9; border-radius: 3px; min-width: 0; }
.ac-judge b { display: block; font-family: var(--mono); font-size: 13px; color: var(--tab); }
.ac-judge-line { margin: 12px 0 0; font-size: 13px; color: #dbe6e4; } .ac-judge-line b { color: var(--tab); margin-right: 10px; }
.arch-card:not(.front) :is(.ac-facts, .ac-judge, .ac-judge-line) { visibility: hidden; }
.arch-stage[data-ct]:not([data-ct=""]) .arch-wall { color: var(--ct); opacity: .8; }
.arch-stage[data-ct]:not([data-ct=""]) .arch-wall b { font-family: var(--font); font-weight: 800; transform: none; letter-spacing: 0; }
.arch-pills.arch-contests button.on { box-shadow: 0 0 0 2px var(--ct, #fff) inset; }
@media (max-width: 760px) {
  .ac-tabs { left: 14px; top: -24px; } .ac-tab { font-size: 11px; padding: 7px 10px 8px; } .ac-tab.sub { display: none; }
  .ac-facts { font-size: 12px; } .ac-facts dt:nth-of-type(n+3), .ac-facts dd:nth-of-type(n+3) { display: none; }
  .arch-card.guide .ac-lead { display: none; }
}
/* 첫 화면 아래 목록: 대회 폴더 3개 + 자연관찰 연습 */
.arch-folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 30px 0 34px; }
.arch-folder { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 18px; border-radius: 0 10px 10px 10px; background: #0f1a1b; border: 1px solid var(--c); text-decoration: none; color: var(--ar-ink); --c: #8fd18a; }
.arch-folder.inquiry { --c: #7fc8f0; } .arch-folder.invent { --c: #c9a6f0; }
.arch-folder .af-tab { position: absolute; left: -1px; top: -26px; background: var(--c); color: #111; font-size: 12.5px; font-weight: 800; padding: 7px 14px 8px; border-radius: 9px 9px 0 0; }
.arch-folder b { font-size: 16px; } .arch-folder .af-lead { font-size: 13px; color: #b9c3c1; line-height: 1.6; flex: 1; }
.arch-folder .af-n { font-family: var(--mono); font-size: 11.5px; color: var(--c); letter-spacing: .04em; }
.arch-folder:hover { background: color-mix(in srgb, var(--c) 10%, #0f1a1b); }
.arch-shelf.nature-shelf { margin-bottom: 18px; }
@media (max-width: 760px) { .arch-folders { grid-template-columns: 1fr; gap: 34px; } }

/* #/contest/<id> — 폴더를 연 모습: 위는 폴더 이름표, 아래는 종이 여러 장 */
.contest-page .ct-head { position: relative; border-top: 4px solid var(--ct); }
.ct-folders { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ct-folders a { font-size: 13.5px; font-weight: 700; text-decoration: none; color: #d6e1df; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 5px 12px; }
.ct-folders a.nature { --c: #8fd18a; } .ct-folders a.inquiry { --c: #7fc8f0; } .ct-folders a.invent { --c: #c9a6f0; }
.ct-folders a { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.ct-folders a[aria-current="true"] { background: var(--c); color: #111; }
.contest-page .ct-sub { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--ct); margin: 0 0 10px; }
.contest-page .ct-head .sub { max-width: 860px; line-height: 1.7; }
.ct-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ct-jump a { background: var(--ct); color: #111; font-weight: 800; font-size: 13.5px; text-decoration: none; border-radius: 999px; padding: 8px 15px; }
.ct-jump a + a { background: transparent; color: var(--ct); border: 1px solid var(--ct); }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; margin: 22px auto 40px; }
.ct-sheet { background: var(--rp-paper, #fbf7ef); color: var(--ink); border-radius: 10px; padding: 22px 26px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border-left: 5px solid var(--ct); }
.ct-sheet h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 12px; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.ct-sheet h2 span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }
.ct-dl { display: grid; grid-template-columns: 9em 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; }
.ct-dl dt { font-weight: 800; color: #2f5d4f; } .ct-dl dd { margin: 0; }
.ct-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 7px; }
.ct-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; font-size: 14.5px; line-height: 1.6; }
.ct-steps li::before { content: counter(s); font-family: var(--mono); font-weight: 800; font-size: 12px; text-align: center; border-radius: 50%; background: var(--ct); color: #111; width: 24px; height: 24px; line-height: 24px; }
.ct-bar { display: flex; gap: 4px; margin-bottom: 12px; } .ct-bar span { background: color-mix(in srgb, var(--ct) 35%, #fff); border-radius: 4px; padding: 8px 10px; font-size: 13px; font-weight: 700; } .ct-bar b { display: block; font-family: var(--mono); font-size: 16px; }
.ct-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.ct-table th, .ct-table td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: top; color: var(--ink); }
.ct-table thead th { font-size: 12px; color: var(--ink-3); font-weight: 700; } .ct-table tbody th { white-space: nowrap; } .ct-table .num { font-family: var(--mono); font-weight: 800; white-space: nowrap; }
.ct-src { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; } .ct-note { font-size: 13px; color: #6b4f1d; background: #fbf0d6; border-radius: 8px; padding: 8px 12px; margin: 10px 0 0; line-height: 1.6; }
.ct-p { font-size: 14.5px; line-height: 1.7; margin: 0 0 8px; }
.ct-list { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.7; } .ct-list li + li { margin-top: 4px; }
.ct-list.src { font-size: 13px; color: var(--ink-2); }
.ct-train { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ct-train li { display: grid; grid-template-columns: 10em 1fr; gap: 12px; font-size: 14.5px; line-height: 1.6; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ct) 14%, #fff); }
.ct-train b { color: #23453b; }
.ct-side { position: sticky; top: 66px; display: grid; gap: 14px; }
.ct-box { background: #0f1a1b; border: 1px solid color-mix(in srgb, var(--ct) 50%, transparent); border-radius: 10px; padding: 16px 16px 10px; }
.ct-box h3 { margin: 0 0 8px; font-size: 15px; color: var(--ar-ink, #ecebe8); } .ct-box h3 small { display: block; font-weight: 400; font-size: 12px; color: #9aa6a4; margin-top: 4px; }
.ct-links { list-style: none; margin: 0; padding: 0; }
.ct-links li { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .07); }
.ct-links li > a:first-child { flex: 1; display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; padding: 9px 2px; text-decoration: none; color: var(--ar-ink, #ecebe8); min-width: 0; }
.ct-links .lv { grid-row: span 2; font-size: 11px; font-weight: 800; color: var(--ct); padding-top: 2px; } .ct-links b { font-size: 14px; } .ct-links small { font-size: 12px; color: #9aa6a4; }
.ct-links a.rp { font-size: 12px; color: var(--ct); text-decoration: none; white-space: nowrap; padding: 6px 4px; }
.ct-links li > a:first-child:hover b { text-decoration: underline; }
@media (max-width: 900px) { .ct-grid { grid-template-columns: 1fr; } .ct-side { position: static; } }
@media (max-width: 560px) { .ct-sheet { padding: 18px 16px; } .ct-dl { grid-template-columns: 1fr; gap: 0 0; } .ct-dl dd { margin-bottom: 8px; } .ct-train li { grid-template-columns: 1fr; gap: 2px; } .ct-table { font-size: 13px; } }
.ct-go { font-size: 12.5px; font-weight: 800; color: #2f6b3a; white-space: nowrap; margin-left: 4px; }
.ct-dl.names { grid-template-columns: 1fr; gap: 0; padding-bottom: 12px; border-bottom: 1px dashed var(--line); } .ct-dl.names dd { margin-bottom: 8px; }
.rp-contest-one { display: inline-flex; align-items: center; font-size: 13px; font-weight: 800; text-decoration: none; border-radius: 999px; padding: 7px 13px; background: #8fd18a; color: #13261a; }
.rp-contest-one.inquiry { background: #7fc8f0; color: #0c2130; } .rp-contest-one.invent { background: #c9a6f0; color: #22123a; }
@media (max-width: 560px) { .contest-page .ct-head .label-tab { position: static; display: block; margin-bottom: 10px; } }

/* 자연관찰 공원 지도(#/contest/nature 맨 위) — 점 + 말꼬리 표 */
.ct-park { margin-top: 18px; }
.pk-stage { position: relative; height: min(64vh, 600px); min-height: 380px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #cfe8f5, #eaf4e2); border: 1px solid rgba(143, 209, 138, .45); }
.pk-stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.pk-pins { position: absolute; inset: 0; pointer-events: none; }
.pk-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; min-height: 0; line-height: 0; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity .35s; font: inherit; }
.pk-pin.show { opacity: 1; }
.pk-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #2f6b3a; box-shadow: 0 0 0 4px rgba(255, 255, 255, .45), 0 2px 6px rgba(0, 0, 0, .35); }
.pk-pin.show .pk-dot { animation: pkPulse 2.2s ease-out infinite; }
@keyframes pkPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8), 0 2px 6px rgba(0, 0, 0, .35); } 70% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 2px 6px rgba(0, 0, 0, .35); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 2px 6px rgba(0, 0, 0, .35); } }
.pk-tag { position: absolute; left: 0; bottom: 16px; transform: translateX(-50%); white-space: nowrap; line-height: 1.35; background: #fffdf6; color: #1f2a1f; font-size: 13px; font-weight: 800; padding: 6px 11px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); display: flex; align-items: center; gap: 5px; }
.pk-tag::after { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 0; border-top-color: #fffdf6; }
.pk-tag i { font-style: normal; }
.pk-pin:hover .pk-tag, .pk-pin.on .pk-tag { background: #2f6b3a; color: #fff; } .pk-pin:hover .pk-tag::after, .pk-pin.on .pk-tag::after { border-top-color: #2f6b3a; }
.pk-pin:focus-visible .pk-tag { outline: 3px solid #f2c14e; }
.pk-intro { position: absolute; left: 14px; top: 12px; margin: 0; background: rgba(255, 253, 246, .92); color: #24341f; font-size: 13.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.pk-replay { position: absolute; right: 12px; top: 12px; background: rgba(255, 253, 246, .92); border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: #24341f; cursor: pointer; }
.pk-panel { margin-top: 12px; background: var(--rp-paper, #fbf7ef); color: var(--ink); border-radius: 12px; padding: 18px 22px; border-left: 5px solid #8fd18a; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.pk-panel h3 { margin: 10px 0 8px; font-family: var(--serif); font-size: 20px; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; } .pk-panel h3 i { font-style: normal; } .pk-panel h3 small { font-family: var(--font); font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pk-talk { display: grid; gap: 6px; } .pk-talk p { margin: 0; display: inline-block; justify-self: start; background: #eef6e6; border-radius: 12px; padding: 7px 12px; font-size: 14px; line-height: 1.5; } .pk-talk p:nth-child(2) { justify-self: end; background: #fdf0d8; } .pk-talk b { margin-right: 8px; color: #2f6b3a; }
.pk-lead { font-size: 14.5px; line-height: 1.7; margin: 0 0 8px; }
.pk-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); columns: 2; column-gap: 26px; }
.pk-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; } .pk-go span { font-size: 12.5px; color: var(--ink-3); }
.pk-btn { background: #2f6b3a; color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 9px 16px; }
.pk-flat .pk-stage { height: auto; min-height: 0; padding: 50px 12px 12px; } .pk-flat canvas { display: none; } .pk-flat .pk-pins { position: static; display: flex; flex-wrap: wrap; gap: 8px; } .pk-flat .pk-pin { position: static; transform: none !important; opacity: 1; } .pk-flat .pk-tag { position: static; transform: none; } .pk-flat .pk-dot, .pk-flat .pk-tag::after { display: none; }
@media (max-width: 560px) { .pk-stage { height: 62vh; min-height: 340px; } .pk-tag { font-size: 11.5px; padding: 5px 8px; } .pk-steps { columns: 1; } .pk-intro { font-size: 12px; top: auto; bottom: 10px; right: 10px; border-radius: 12px; } }
.pk-tag b { font-weight: 800; } .pk-tag .short { display: none; }
@media (max-width: 560px) { .pk-tag .full { display: none; } .pk-tag .short { display: inline; } }

/* 공원 지도(그림 한 장) — 들어오면 전체 → 광장 쪽으로 확대. 표는 확대해도 같은 크기(--s로 되돌림) */
.pm-view { position: relative; height: min(70vh, 640px); min-height: 380px; border-radius: 12px; overflow: hidden; background: #dfeee0; touch-action: pan-y; cursor: grab; user-select: none; outline: none; }
.pm-view:active { cursor: grabbing; }
.pm-map { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pm-img { display: none; }
/* 지도 그림은 화면 크기 캔버스(park.js paint)에 그린다 — 큰 그림을 페이지 층으로 두면 태블릿에서 깜빡였다 */
.pm-bg { position: absolute; left: 0; top: 0; pointer-events: none; }
.pm-map .pk-pin { left: 0; top: 0; transform: scale(calc(1 / var(--s, 1))); transform-origin: 0 0; }
/* 아이들이 가 있는 지점의 표는 아이들(z 3) 위로 — 아이 그림이 표 글씨를 가리지 않게 */
.pm-map .pk-pin.on, .pm-map .pk-pin.here { z-index: 4; }
.pm-title { position: absolute; left: 14px; top: 12px; background: rgba(255, 253, 246, .93); color: #24341f; border-radius: 12px; padding: 8px 13px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); pointer-events: none; }
.pm-title b { display: block; font-size: 16px; } .pm-title span { font-size: 12px; color: #55634f; }
.pm-ctrl { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.pm-ctrl button { background: rgba(255, 253, 246, .93); border: 0; border-radius: 999px; min-width: 36px; height: 36px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 800; color: #24341f; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.pm-temp { position: absolute; left: 14px; bottom: 12px; font-size: 11.5px; color: #fff; background: rgba(30, 40, 30, .55); border-radius: 999px; padding: 4px 10px; pointer-events: none; }
/* 폰(세로)에서는 지도를 가로 그림 비율로 작게 보이고, 「가로로 크게」로 화면 가득 본다(원장 2026-10-27 「가로 모달로 하면 되지」) */
@media (max-width: 560px) { .pm-view { height: auto; min-height: 0; aspect-ratio: 16 / 9; } .pm-title { display: none; } .pm-ctrl button[data-z] { display: none; } .pm-ctrl { left: 0; right: 0; top: auto; bottom: 10px; justify-content: center; } }
.pm-close { display: none; }
/* 폰 미리 보기(작은 상자)에서는 말풍선을 숨긴다 — 같은 대화가 아래 패널에 나오고, 「가로로 크게」에서는 보인다 */
@media (max-width: 560px) { .pm-view:not(.big) .pk-say { display: none !important; } }
.pm-big { background: #2f6b3a !important; color: #fff !important; }
html.pm-lock, html.pm-lock body { overflow: hidden; }
.pm-view.big { position: fixed; inset: 0; z-index: 1000; min-height: 0; touch-action: none; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; margin: 0; }
.pm-view.big .pm-big { display: none; } .pm-view.big .pm-close { display: inline-block; }
.pm-view.big .pm-title { display: block; } .pm-view.big .pm-ctrl { left: auto; right: 12px; top: 12px; bottom: auto; } .pm-view.big .pm-ctrl button[data-z] { display: inline-block; }
/* 세로로 든 채(가로 고정이 안 되는 기기): 상자를 화면 오른쪽 위 모서리에 걸어 시계 방향 90° — 안쪽 가로 = 화면 세로 */
.pm-view.big.rot { inset: auto; left: 100vw; top: 0; width: 100vh; width: 100dvh; height: 100vw; transform: rotate(90deg); transform-origin: top left; }
.pk-panel.in-big { position: absolute; left: 12px; bottom: 12px; z-index: 6; width: min(420px, calc(100% - 24px)); max-height: 46%; overflow: auto; margin: 0; touch-action: pan-x pan-y; cursor: auto; user-select: text; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
/* 공원 지도의 두 아이(유빈·유준) — 발 사이가 기준점. 확대할수록 조금만 커진다(--kk, park.js) */
.pk-kids { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 3; pointer-events: none; transform: scale(calc(var(--kk, .72) / var(--s, 1))); transform-origin: 0 0; }
.pk-kid3d { position: absolute; left: -66px; bottom: -13.5px; width: 132px; height: 120px; }
.pk-kid3d canvas { display: block; width: 132px; height: 120px; }
/* 공원 안의 다른 사람들(독쌤·할아버지·탐험가·숫자 친구) — 아이들과 같은 배율, 아이들보다 아래 층 */
.pk-npc { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; pointer-events: none; transform: scale(calc(var(--kk, .42) / var(--s, 1))); transform-origin: 0 0; }
.pk-npc canvas { position: absolute; left: -66px; bottom: -13.5px; width: 132px; height: 120px; }
.pk-kid3d b { position: absolute; top: 100%; transform: translate(-50%, -12px) scale(calc(1 / var(--kk, .42))); transform-origin: 50% 0; font-size: 11px; font-weight: 800; color: #1f2a1f; background: rgba(255, 253, 246, .92); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.pk-kid3d b.nr { left: calc(50% - 28.5px); } .pk-kid3d b.dy { left: calc(50% + 28.5px); }
.pk-say { position: absolute; left: 0; bottom: 96px; transform: translateX(-50%) scale(calc(1 / var(--kk, .42))); transform-origin: 50% 100%; width: max-content; max-width: 230px; background: rgba(255, 253, 246, .62); color: rgba(31, 42, 31, .86); border: 1px solid rgba(255, 255, 255, .55); border-radius: 14px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; line-height: 1.4; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.pk-say::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-bottom: 0; border-top-color: rgba(255, 253, 246, .62); }
.pk-say b { color: #2f6b3a; margin-right: 6px; }
/* 자연관찰 세트 단계: 현장(하루) / 사전 탐구보고서(오래 관찰) */
.ob-stage-tag { align-self: center; font-size: 11.5px; font-weight: 800; color: #8fd18a; letter-spacing: .02em; margin: 0 2px 0 6px; }
.ob-stage-tag:first-child { margin-left: 0; }
.ob-stage-note { margin: 6px 0 10px; padding: 9px 12px; border-radius: 10px; background: rgba(143, 209, 138, .12); border: 1px dashed rgba(143, 209, 138, .5); color: #d9f0d6; font-size: 13.5px; line-height: 1.55; }
.ob-stage-note a { color: #8fd18a; font-weight: 700; }

/* 예시 보고서 따라 하기(observe-follow.js) — 화면 아래에 뜨는 안내 카드 + 내 보고서의 지금 칸 밝히기 */
.pk-btn.alt { background: #fffdf6; color: #2f6b3a; border: 1.5px solid #2f6b3a; }
.ob-follow { width: 100%; background: #2f6b3a; color: #fff; border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.fw-card { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 900; width: min(760px, calc(100vw - 24px)); max-height: 56vh; display: flex; flex-direction: column; background: #fffdf8; color: #1f2a1f; border-radius: 14px; box-shadow: 0 10px 36px rgba(0, 0, 0, .38); border: 1px solid #d9d2c2; font-size: 14px; }
.fw-card header, .fw-card footer { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.fw-card header { border-bottom: 1px solid #ece5d6; } .fw-card footer { border-top: 1px solid #ece5d6; justify-content: space-between; }
.fw-card header b { color: #2f6b3a; } .fw-step { font-size: 12px; color: #6b7466; } .fw-sp { flex: 1; }
.fw-card button { font: inherit; font-size: 13px; font-weight: 700; border: 1px solid #cfc8b8; background: #fff; color: #1f2a1f; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.fw-card button:disabled { opacity: .4; cursor: default; }
.fw-card .fw-main { background: #2f6b3a; border-color: #2f6b3a; color: #fff; }
.fw-card h3 { margin: 8px 12px 0; font-size: 16px; }
.fw-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; padding: 8px 12px 10px; overflow: auto; }
.fw-tag { display: inline-block; font-size: 11px; font-weight: 800; background: #efe7d4; color: #6b5a2e; border-radius: 999px; padding: 1px 8px; margin-bottom: 6px; } .fw-tag.me { background: #e3f1e1; color: #2f6b3a; }
.fw-ex .pz-wrap { max-width: 340px; } .fw-obs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: start; }
.fw-ex .rp-table { font-size: 12px; } .fw-venn p { margin: 0 0 6px; } .fw-venn b { margin-right: 6px; color: #2f6b3a; }
.fw-tip { margin: 8px 0 0; font-size: 12.5px; color: #5b5440; background: #fbf5e4; border-radius: 8px; padding: 6px 8px; } .fw-none { color: #7a7466; font-size: 13px; }
.fw-me p { margin: 0 0 8px; line-height: 1.55; } .fw-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.fw-dots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; } .fw-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ddd5c4; } .fw-dots i.done { background: #9cc79a; } .fw-dots i.on { background: #2f6b3a; }
.fw-card.min .fw-body, .fw-card.min h3, .fw-card.min footer .fw-dots { display: none; }
body.fw-on .observe-page { padding-bottom: 58vh; }
.fw-now { scroll-margin-top: 70px; outline: 3px solid #f2b705; outline-offset: 4px; border-radius: 6px; box-shadow: 0 0 0 8px rgba(242, 183, 5, .18); transition: outline-color .3s; }
@media (max-width: 640px) { .fw-body { grid-template-columns: 1fr; } .fw-card { max-height: 62vh; } }
@media print { .fw-card { display: none !important; } .fw-now { outline: 0; box-shadow: none; } }

/* 공원 사람들의 말(park.js npcSay) — 아이들 말풍선처럼 배율을 되돌려 글씨 크기 그대로. 지키는 사람(관리인·안전요원)은 빨간 이름 */
.pm-map .pk-pin { z-index: 2; }
.pk-npc { z-index: 1; } .pk-npc.talk { z-index: 3; }
/* 말풍선은 워터마크처럼 옅게(원장 2026-10-27 「대화가 약간 워터마크처럼」) — 그림이 비쳐 보인다 */
/* 지도 위 파도: 화면 크기 캔버스(park.js waveStep) — 지도 크기 SVG는 태블릿에서 지도가 비어 보이게 했다 */
.pk-nhit { position: absolute; left: -16px; bottom: -4px; width: 32px; height: 64px; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; }
.pk-nsay { position: absolute; left: 0; bottom: 86px; transform: translateX(-50%) scale(calc(1 / var(--kk, .42))); transform-origin: 50% 100%; width: max-content; max-width: 210px; background: rgba(255, 253, 246, .5); color: rgba(31, 42, 31, .8); border: 1px solid rgba(255, 255, 255, .5); border-radius: 12px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; line-height: 1.4; box-shadow: none; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); pointer-events: none; }
.pk-nsay::after { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 0; border-top-color: rgba(255, 253, 246, .5); }
.pk-nsay b { color: #8a5a2b; margin-right: 6px; } .pk-nsay.safe b { color: #c0392b; }
@media (max-width: 560px) { .pm-view:not(.big) .pk-nsay { display: none !important; } }
/* 지점에서 바로 그리기 */
.pk-sk { margin: 10px 0; padding: 10px 12px; background: #f4f8ef; border: 1px solid #d4e3c8; border-radius: 10px; }
.pk-sk b { color: #2f6b3a; margin-right: 8px; } .pk-sk small { display: block; margin-top: 6px; color: #5d6b55; font-size: 12px; line-height: 1.5; }
.pk-sk-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.pk-sk-btns button { min-width: 38px; height: 34px; border-radius: 8px; border: 1.5px solid #2f6b3a; background: #fff; color: #2f6b3a; font: inherit; font-weight: 800; cursor: pointer; }
.pk-sk-btns button.done { background: #2f6b3a; color: #fff; } .pk-sk-btns button.done::after { content: " ✓"; font-size: 11px; }
.pk-sk-msg { margin: 6px 0 0; font-size: 13px; color: #2f6b3a; font-weight: 700; } .pk-sk-msg:empty { display: none; }

/* ── 예시 보고서 A4 쪽 인쇄(observe-sample.js printSampleA4, 원장 2026-10-28) ── */
/* 화면에서는 보이지 않는 자리에서 쪽을 재고, 인쇄할 때만 나온다. 한 쪽 = 210×297mm 상자 하나. */
.a4-print { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
.a4-page { width: 210mm; height: 296.5mm; box-sizing: border-box; padding: 12mm 14mm 9mm; display: flex; flex-direction: column; background: #fff; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-run, .a4-foot { flex: none; display: flex; justify-content: space-between; gap: 8mm; font-size: 8.5pt; color: #5b6570; }
.a4-run { border-bottom: .35mm solid #1d2329; padding-bottom: 1.5mm; margin-bottom: 4mm; }
.a4-run b { color: #1d2329; }
.a4-page.first .a4-run { display: none; }
.a4-foot { border-top: .25mm solid #b9c0c8; padding-top: 1.6mm; margin-top: 3mm; }
.a4-body.rp-sheet { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 3mm; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; max-width: none; background: transparent; }
.a4-body > * { flex: none; margin: 0 !important; }
.a4-body .rp-head { padding-bottom: 2.5mm; }
.a4-body .rp-cell { grid-template-columns: 34mm 1fr; padding: 2.5mm 0; break-inside: auto; }
.a4-body .rp-cell:last-child { border-bottom: 0; }
.a4-body .rp-cell[data-sec="obs"], .a4-body .rp-cell[data-sec="tree"], .a4-body .rp-cell[data-sec="venn"], .a4-body .rp-cell[data-sec^="x"], .a4-body .rp-cell[data-sec="adapt"] { grid-template-columns: 1fr; gap: 2mm; }
.a4-body .rp-cell[data-sec="obs"] > h3 small, .a4-body .rp-cell[data-sec="tree"] > h3 small, .a4-body .rp-cell[data-sec="venn"] > h3 small, .a4-body .rp-cell[data-sec^="x"] > h3 small, .a4-body .rp-cell[data-sec="adapt"] > h3 small { display: inline; margin: 0 0 0 2mm; }
.a4-body.rp-sheet .rp-obs-head, .a4-body.rp-sheet .rp-obs-row { grid-template-columns: 74mm 1fr; }
.a4-body .rp-tree { overflow: visible; }
.a4-body .pz-hand { display: none; }
@media print {
  @page a4sheet { size: A4; margin: 0; @bottom-right { content: none; } }
  html:has(body.a4-printing), body.a4-printing { background: #fff !important; }
  body.a4-printing > :not(.a4-print) { display: none !important; }
  body.a4-printing .a4-print { position: static; visibility: visible; left: auto; }
  .a4-page { page: a4sheet; break-after: page; }
  .a4-page:last-child { break-after: auto; }
}
/* 벤 그림: 가운데 글이 두 원이 겹친 자리(렌즈) 안에 들어가게 */
.a4-body .rp-venn { grid-template-columns: 1fr .6fr 1fr; align-items: center; }
.a4-body .rp-venn .ring { width: 64%; }
.a4-body .rp-venn-zone.both { padding: 18px 2px 10px; }
.a4-body .rp-venn-zone.both .rp-view { font-size: 12.5px; line-height: 1.6; }
.a4-body .rp-venn-zone.a { padding-right: 16px; } .a4-body .rp-venn-zone.b { padding-left: 16px; }
