/* ─────────────────────────────────────────────────────────────
   교육과정나침반 동화풍 테마
   기존 화면 구조(theme.css 등)는 그대로 두고, 종이·연필·크레용 느낌의 겉모습만 덧입힙니다.
   body.sb-theme 범위라 이 파일만 빼면 원래 디자인으로 돌아갑니다.
   ───────────────────────────────────────────────────────────── */

/* ── 색과 바탕 ──
   글자는 읽기 쉬운 기존 고딕체를 그대로 쓰고, 손글씨체(Gaegu)는 로고 글씨·인트로 그림 속 낱말에만 씁니다. */
body.sb-theme.curriculum-app.readable-app {
  --page: #f7f3e9;
  --ink: #2c3566;
  --muted: #6b6f86;
  --line: #e2d9c4;
  --blue: #2c3566;
  --blue-deep: #222a55;
  --blue-soft: #fbf3dc;
  --teal: #e0533d;
  --teal-soft: #fdebe5;
  --green: #2f8f55;
  --green-soft: #e7f3e9;
  --sb-pen: #3a3f62;
  --sb-paper: #fffdf8;
  --sb-red: #e0533d;
  --sb-yellow: #f6c24a;
  --sb-green: #2f8f55;
  --sb-mint: #4fb3a9;
  --sb-violet: #7d6bc7;
  --sb-strong: 800;
  --sb-wobble: 14px 6px 12px 7px / 7px 12px 6px 14px;
  --sb-wobble-sm: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --sb-lift: 3px 4px 0 rgba(44, 53, 102, .14);
  --shadow: var(--sb-lift);
  background: var(--page);
  color: var(--ink);
}
/* 페이지 끝·스크롤 반동 영역도 같은 종이색으로 */
html:has(> body.sb-theme) { background: #f7f3e9; }
body.sb-theme.curriculum-app.readable-app::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .42  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 손글씨 타이틀(접속화면·머리말 공통) ── */
body.sb-theme .brand-wordmark { display: block; width: 100%; height: auto; overflow: visible;
  -webkit-mask-image: url("/storybook/grain.png"); mask-image: url("/storybook/grain.png"); -webkit-mask-size: 84px; mask-size: 84px; }
body.sb-theme .brand-wordmark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
body.sb-theme .title-mark .ink path { stroke: #2c3566; stroke-width: 8.4; }
body.sb-theme .title-mark .sh path { stroke: #f6c24a; stroke-width: 8.4; }
body.sb-theme .school-mark path { stroke: #2f8f55; stroke-width: 9; }

/* ── 버튼: 빨간 도장 / 흰 종이 ── */
/* :is(...)는 기존 화면의 .btn:not(.secondary):not(.ghost) 규칙보다 우선하도록 우선순위만 올리는 장치입니다. */
body.sb-theme.curriculum-app.readable-app :is(.btn, .btn:not(.secondary):not(.ghost)) {
  min-height: 44px; padding: 8px 20px; font-size: calc(15px * var(--reading-scale, 1)); font-weight: var(--sb-strong); line-height: 1.3;
  border: 2px solid var(--sb-pen) !important; border-radius: var(--sb-wobble-sm); box-shadow: 3px 3px 0 var(--sb-pen) !important; transform: none;
}
body.sb-theme.curriculum-app.readable-app .btn:not(.secondary):not(.ghost) { color: #fff !important; background: var(--sb-red) !important; }
body.sb-theme.curriculum-app.readable-app .btn:is(.secondary, .ghost) { color: var(--sb-pen) !important; background: #fff !important; }
body.sb-theme.curriculum-app.readable-app .btn:not(:disabled):hover { background-position: 0 0 !important; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--sb-pen) !important; }
body.sb-theme.curriculum-app.readable-app .btn:not(.secondary):not(.ghost):not(:disabled):hover { background: #d2442e !important; }
body.sb-theme.curriculum-app.readable-app .btn.secondary:not(:disabled):hover { background: #fff8e6 !important; color: var(--sb-pen) !important; }
body.sb-theme.curriculum-app.readable-app .btn:not(:disabled):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sb-pen) !important; }
body.sb-theme.curriculum-app.readable-app .btn:disabled { opacity: .55 !important; box-shadow: none !important; }
body.sb-theme.curriculum-app.readable-app :focus-visible { outline: 3px dashed var(--sb-violet); outline-offset: 3px; }

/* ── 입력칸 ── */
body.sb-theme.curriculum-app.readable-app #app :is(input, select),
body.sb-theme.curriculum-app.readable-app .modal :is(input, select) {
  color: var(--ink); background-color: #fffdf8; border: 2px solid #c9bfa6; border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px;
}
body.sb-theme.curriculum-app.readable-app #app :is(input, select):focus,
body.sb-theme.curriculum-app.readable-app .modal :is(input, select):focus { border-color: var(--sb-pen); box-shadow: 3px 3px 0 rgba(224, 83, 61, .35); outline: none; }
body.sb-theme.curriculum-app.readable-app #app label,
body.sb-theme.curriculum-app.readable-app :is(#planModal, #helperModal, .modal) label { color: #4b4f6e; font-size: calc(14px * var(--reading-scale, 1)); font-weight: 700; }

/* ── 종이 카드 공통 ── */
body.sb-theme.curriculum-app.readable-app :is(.panel, .modal-panel),
body.sb-theme .student-dashboard.curriculum-board :is(.board-summary, .board-semester, .board-disclosure) {
  background: var(--sb-paper); border: 2px solid var(--sb-pen); border-radius: var(--sb-wobble); box-shadow: var(--sb-lift);
}

/* ── 머리말: 나침반 로고 + 손글씨 제목 + 메뉴 ── */
body.sb-theme.curriculum-app.readable-app .app-topbar {
  position: relative; margin-top: 18px; padding: 16px 26px; background: var(--sb-paper); border: 2px solid var(--sb-pen);
  border-radius: var(--sb-wobble); box-shadow: var(--sb-lift); clip-path: none;
}
body.sb-theme.curriculum-app.readable-app .app-topbar::before,
body.sb-theme.curriculum-app.readable-app .app-topbar::after {
  content: ""; position: absolute; top: -13px; width: 92px; height: 24px; pointer-events: none;
  clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 2% 94%, 0 50%);
}
body.sb-theme.curriculum-app.readable-app .app-topbar::before { left: 30px; background: rgba(242, 184, 75, .6); rotate: -5deg; }
body.sb-theme.curriculum-app.readable-app .app-topbar::after { right: 34px; background: rgba(79, 179, 169, .48); rotate: 4deg; }
body.sb-theme.curriculum-app.readable-app .app-brand { gap: 14px; }
body.sb-theme.curriculum-app.readable-app .app-brand .app-logo.sb-app-logo {
  width: 64px !important; height: 64px !important; padding: 0 !important; overflow: visible !important; background: transparent; border: 0; box-shadow: none;
}
body.sb-theme.curriculum-app.readable-app .app-brand .app-logo.sb-app-logo img { width: 100%; height: 100%; object-fit: contain; }
body.sb-theme.curriculum-app.readable-app .sb-app-logo .logo-fallback { display: none; }
body.sb-theme.curriculum-app.readable-app .app-title { width: calc(200px * var(--reading-scale, 1)); max-width: 100%; margin: 0 0 2px; font-size: 0; line-height: 0; }
body.sb-theme.curriculum-app.readable-app .app-school { display: block; color: var(--sb-green); font-size: calc(13px * var(--reading-scale, 1)); font-weight: var(--sb-strong); letter-spacing: .02em; }
body.sb-theme.curriculum-app.readable-app .app-navigation button {
  min-height: 44px; padding: 8px 2px; color: #6b6f86; font-size: calc(16px * var(--reading-scale, 1)); font-weight: var(--sb-strong);
  border: 0; border-bottom: 0; background: none;
}
body.sb-theme.curriculum-app.readable-app .app-navigation button:hover { color: var(--ink); }
body.sb-theme.curriculum-app.readable-app .app-navigation button[aria-current] {
  color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7 C30 11 60 3 90 7 S112 8 117 4' fill='none' stroke='%23e0533d' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% 10px no-repeat;
}
body.sb-theme.curriculum-app.readable-app .reading-controls { color: var(--muted); background: #fff; border: 2px solid #d7cdb5; border-radius: var(--sb-wobble-sm); }
body.sb-theme.curriculum-app.readable-app .reading-controls > span { font-size: 13px; font-weight: 700; }
body.sb-theme.curriculum-app.readable-app .reading-controls button { color: var(--ink); border-radius: 8px; }
body.sb-theme.curriculum-app.readable-app .reading-controls button:hover { background: #fff3cf; }
body.sb-theme.curriculum-app.readable-app #changeModeBtn.app-mode-switch {
  color: var(--sb-pen); background: #fff !important; border: 2px solid var(--sb-pen); border-radius: var(--sb-wobble-sm);
  font-size: calc(13px * var(--reading-scale, 1)); font-weight: var(--sb-strong); padding: 4px 12px;
}
body.sb-theme.curriculum-app.readable-app #changeModeBtn.app-mode-switch:hover { background: #fff8e6 !important; box-shadow: 2px 3px 0 var(--sb-pen); }
body.sb-theme.curriculum-app.readable-app .mode-text { color: var(--muted); font-size: calc(13px * var(--reading-scale, 1)); font-weight: 700; }
body.sb-theme.curriculum-app.readable-app .app-external-links #openCourseSiteBtn,
body.sb-theme.curriculum-app.readable-app .app-external-links #openMockEnrollmentBtn {
  min-height: 52px; min-width: 210px; padding: 8px 24px; font-size: calc(17px * var(--reading-scale, 1)); font-weight: var(--sb-strong);
  color: #fff !important; background: var(--sb-red) !important; border: 2px solid var(--sb-pen) !important;
  border-radius: var(--sb-wobble-sm); box-shadow: 4px 4px 0 var(--sb-pen) !important;
}
body.sb-theme.curriculum-app.readable-app .app-external-links #openMockEnrollmentBtn { color: var(--sb-pen) !important; background: var(--sb-yellow) !important; }

/* ── 상태 메시지: 노란 포스트잇 ── */
body.sb-theme.curriculum-app.readable-app :is(#status, .status) { color: #6b4e16; background: #fff6d6; border: 2px dashed #e0b85c; border-radius: 10px; }
body.sb-theme.curriculum-app.readable-app :is(#status, .status):empty { display: none; }
body.sb-theme.curriculum-app.readable-app :is(.status.ok, .gate-status.ok) { color: #24603d; background: #eaf6ec; border-color: #8fc79d; }
body.sb-theme.curriculum-app.readable-app :is(.status.error, .gate-status.error) { color: #9a2e1e; background: #fff0eb; border-color: #e88b7a; }
body.sb-theme.curriculum-app.readable-app :is(.status.loading, .gate-status.loading) { color: #4b4f6e; background: #f1effa; border-color: #b9aee3; }

/* ── 교사 도구 ── */
body.sb-theme.curriculum-app.readable-app #teacherTools.panel { border: 2px solid var(--sb-pen); }
body.sb-theme :is(#planModal, #helperModal, #teacherTools) .btn:not(.secondary):not(.ghost) {
  color: #fff !important; background: var(--sb-red) !important; border: 2px solid var(--sb-pen) !important; box-shadow: 3px 3px 0 var(--sb-pen) !important;
  border-radius: var(--sb-wobble-sm); font-size: calc(15px * var(--reading-scale, 1)); font-weight: var(--sb-strong);
}
body.sb-theme :is(#planModal, #helperModal, #teacherTools) .btn.secondary {
  color: var(--sb-pen) !important; background: #fff !important; border: 2px solid var(--sb-pen) !important; box-shadow: 3px 3px 0 var(--sb-pen) !important;
  border-radius: var(--sb-wobble-sm); font-size: calc(15px * var(--reading-scale, 1)); font-weight: var(--sb-strong);
}
body.sb-theme :is(#planModal, #helperModal, #teacherTools) .btn:disabled { opacity: .55 !important; box-shadow: none !important; }
body.sb-theme.curriculum-app.readable-app #teacherTools h3,
body.sb-theme.curriculum-app.readable-app .section-title h3 { font-weight: var(--sb-strong); letter-spacing: -.03em; color: var(--ink); }
body.sb-theme.curriculum-app.readable-app .badge { color: var(--sb-pen); background: #fff3cf; border: 2px solid #e8c56a; border-radius: var(--sb-wobble-sm); font-weight: 700; }
body.sb-theme.curriculum-app.readable-app .badge.info { color: #4a3f8c; background: #f0edfb; border-color: #b9aee3; }
body.sb-theme.curriculum-app.readable-app .badge.good { color: #24603d; background: #eaf6ec; border-color: #8fc79d; }

/* ── 학생 대시보드 ── */
body.sb-theme .student-dashboard.curriculum-board { --board-ink: var(--ink); --board-emerald: var(--ink); --board-paper: var(--sb-paper); }
body.sb-theme .student-dashboard.curriculum-board .board-overview h2 { font-weight: var(--sb-strong); letter-spacing: -.045em; color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .board-overview h2::after {
  content: ""; display: block; width: min(260px, 70%); height: 10px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7 C30 11 60 3 90 7 S112 8 117 4' fill='none' stroke='%23f6c24a' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") left center / 100% 100% no-repeat;
}
body.sb-theme .student-dashboard.curriculum-board h3 { font-weight: var(--sb-strong); letter-spacing: -.035em; color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board :is(.board-outline-button, .board-view-toggle) {
  color: var(--sb-pen); background: #fff; border: 2px solid var(--sb-pen); border-radius: var(--sb-wobble-sm); font-weight: var(--sb-strong);
}
body.sb-theme .student-dashboard.curriculum-board :is(.board-outline-button, .board-view-toggle):hover { background: #fff8e6; box-shadow: 2px 3px 0 var(--sb-pen) !important; }
body.sb-theme .student-dashboard.curriculum-board .board-view-toggle[aria-pressed="true"] { color: #fff; background: var(--sb-pen); }

/* 요약 카드: 테이프 두 장 */
body.sb-theme .student-dashboard.curriculum-board .board-summary { position: relative; }
body.sb-theme .student-dashboard.curriculum-board .board-summary::before,
body.sb-theme .student-dashboard.curriculum-board .board-summary::after {
  content: ""; position: absolute; top: -13px; width: 84px; height: 24px; pointer-events: none;
  clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 2% 94%, 0 50%);
}
body.sb-theme .student-dashboard.curriculum-board .board-summary::before { left: 22px; background: rgba(242, 184, 75, .6); rotate: -6deg; }
body.sb-theme .student-dashboard.curriculum-board .board-summary::after { right: 22px; background: rgba(125, 107, 199, .35); rotate: 5deg; }
body.sb-theme .student-dashboard.curriculum-board .board-summary-item { border-right: 2px dashed #e2d9c4; }
body.sb-theme .student-dashboard.curriculum-board .board-summary-item > span { font-weight: 700; color: var(--muted); }
body.sb-theme .student-dashboard.curriculum-board .board-summary-item > strong { color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .board-summary-status strong { font-weight: var(--sb-strong); }
body.sb-theme .student-dashboard.curriculum-board .board-summary-status.is-good { color: var(--sb-green); }
body.sb-theme .student-dashboard.curriculum-board .board-summary-status.is-good .board-status-symbol { color: var(--sb-green); background: #eaf6ec; border: 2px solid #8fc79d; }
body.sb-theme .student-dashboard.curriculum-board .board-status-symbol { color: #b26a12; background: #fff3cf; border: 2px solid #e8c56a; }
body.sb-theme .student-dashboard.curriculum-board .board-alert-notice { color: #6b4e16; background: #fff6d6; border: 2px dashed #e0b85c; border-radius: 10px; }

/* 학년 탭: 색 포스트잇 */
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs { gap: 10px; padding: 0; background: none; border: 0; border-radius: 0; }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button {
  min-height: 52px; color: #5d6180; border: 2px solid transparent; border-radius: 6px 12px 8px 14px / 12px 6px 14px 8px;
  box-shadow: 2px 3px 0 rgba(44, 53, 102, .12); transform: rotate(-.6deg);
}
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button:nth-child(1) { background: #fff1c2; }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button:nth-child(2) { background: #dff1ec; transform: rotate(.5deg); }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button:nth-child(3) { background: #fde3e6; transform: rotate(-.3deg); }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs strong { font-weight: var(--sb-strong); }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button:hover { color: var(--ink); filter: brightness(1.02); transform: translateY(-2px) rotate(-.6deg); }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button[aria-pressed="true"] {
  color: var(--ink); border-color: var(--sb-pen); box-shadow: 3px 4px 0 var(--sb-pen); transform: translateY(-3px) rotate(-1deg);
}
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button[aria-pressed="true"]:nth-child(1) { background: #ffe79a; }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button[aria-pressed="true"]:nth-child(2) { background: #bfe6dc; }
body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button[aria-pressed="true"]:nth-child(3) { background: #fbc9cf; }

/* 학기 카드: 공책 한 장 */
body.sb-theme .student-dashboard.curriculum-board .board-semester { overflow: hidden; }
body.sb-theme .student-dashboard.curriculum-board .board-semester > header { background: #fff7df; border-bottom: 2px dashed #e2d3a6; }
body.sb-theme .student-dashboard.curriculum-board .board-semester h4 { font-weight: var(--sb-strong); color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .course-detail { border-color: #ece4d0; border-style: dashed; }
body.sb-theme .student-dashboard.curriculum-board .course-detail > summary:hover { background: #fffaf0; }
body.sb-theme .student-dashboard.curriculum-board .course-detail[open] > summary { background: #fff4d8; }
body.sb-theme .student-dashboard.curriculum-board .course-title { color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .course-credit { color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .board-chevron { color: var(--sb-red); }
body.sb-theme .student-dashboard.curriculum-board .course-detail-body { background: #fffaf0; border-color: #ece4d0; }

/* 과목 배지: 크레용 도장 */
body.sb-theme :is(.student-dashboard.curriculum-board .course-kind, #helperModal .course-kind-pill, #planModal .course-kind-pill, .course-kind-legend span) {
  border: 1.5px solid currentColor; border-radius: 10px 4px 9px 5px / 5px 9px 4px 10px; font-weight: 700;
}
body.sb-theme .student-dashboard.curriculum-board .course-kind.designated,
body.sb-theme :is(#helperModal, #planModal) :is(.course-kind-pill.designated, .course-kind-legend .designated) { color: #24603d; background: #eaf6ec; border-color: #8fc79d; }
body.sb-theme .student-dashboard.curriculum-board .course-kind.selection,
body.sb-theme :is(#helperModal, #planModal) :is(.course-kind-pill.selection, .course-kind-legend .selection) { color: #4a3f8c; background: #f0edfb; border-color: #b9aee3; }
body.sb-theme .student-dashboard.curriculum-board .course-kind.external { color: #8a5a10; background: #fff3cf; border-color: #e8c56a; }
body.sb-theme .student-dashboard.curriculum-board .board-legend .course-kind { font-size: calc(12px * var(--reading-scale, 1)); }

/* 펼침 영역 */
body.sb-theme .student-dashboard.curriculum-board .board-disclosure { overflow: hidden; }
body.sb-theme .student-dashboard.curriculum-board .board-disclosure > summary:hover { background: #fffaf0; }
body.sb-theme .student-dashboard.curriculum-board .board-disclosure > summary > strong { font-weight: var(--sb-strong); color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .board-disclosure-body { border-top: 2px dashed #e2d9c4; }
body.sb-theme .student-dashboard.curriculum-board .board-group-preview b { color: var(--ink); }
body.sb-theme .student-dashboard.curriculum-board .dashboard-mark { border: 1.5px solid currentColor; border-radius: 10px 4px 9px 5px / 5px 9px 4px 10px; font-weight: 700; }
body.sb-theme .student-dashboard.curriculum-board .dashboard-mark.is-good { color: #24603d; background: #eaf6ec; }
body.sb-theme .student-dashboard.curriculum-board .dashboard-mark:not(.is-good) { color: #9a2e1e; background: #fff0eb; }
body.sb-theme .student-dashboard.curriculum-board .dashboard-advisory { color: #4b4f6e; background: #f1effa; border: 2px dashed #b9aee3; border-radius: 10px; }

/* 막대: 크레용으로 칠한 줄무늬 */
body.sb-theme .student-dashboard.curriculum-board .board-meter { height: 12px; background: #fff; border: 2px solid var(--sb-pen); border-radius: 8px 4px 7px 5px / 5px 7px 4px 8px; overflow: hidden; }
body.sb-theme .student-dashboard.curriculum-board .board-meter > span { background: repeating-linear-gradient(-55deg, #3f9a62 0 5px, #6cbb85 5px 9px); }
body.sb-theme .student-dashboard.curriculum-board .board-meter.is-over > span,
body.sb-theme .student-dashboard.curriculum-board .board-group.needs-review .board-meter > span { background: repeating-linear-gradient(-55deg, #e0533d 0 5px, #f08b78 5px 9px); }
body.sb-theme .student-dashboard.curriculum-board .board-chart-track > span { background: repeating-linear-gradient(-55deg, #f2b84b 0 5px, #f7d27f 5px 9px); border: 2px solid var(--sb-pen); border-bottom: 0; border-radius: 6px 6px 0 0; }
body.sb-theme .student-dashboard.curriculum-board :is(.board-next button, .board-next a) { color: var(--sb-red); font-weight: var(--sb-strong); }
body.sb-theme .student-dashboard.curriculum-board .board-next li > span { color: var(--sb-yellow); }

/* ── 편제표·과목선택도우미 창 ── */
body.sb-theme :is(#planModal, #helperModal) { background: rgba(58, 50, 30, .35); backdrop-filter: blur(3px); }
body.sb-theme :is(#planModal, #helperModal) .modal-panel { position: relative; overflow: visible; background: var(--sb-paper); border: 2px solid var(--sb-pen); border-radius: var(--sb-wobble); box-shadow: 6px 7px 0 rgba(44, 53, 102, .22); }
body.sb-theme :is(#planModal, #helperModal) .modal-panel::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 24px; translate: -50% 0; z-index: 2; pointer-events: none;
  background: rgba(242, 184, 75, .65); rotate: -3deg; clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 2% 94%, 0 50%);
}
body.sb-theme :is(#planModal, #helperModal) .modal-head { color: var(--ink); background: #fff7df; border-bottom: 2px dashed #e2d3a6; border-radius: 14px 6px 0 0; font-weight: var(--sb-strong); }
body.sb-theme.curriculum-app.readable-app :is(#planModal, #helperModal) .modal-head .btn { min-height: 38px; padding: 2px 14px; font-size: 14px; color: var(--sb-pen) !important; background: #fff !important; }
body.sb-theme :is(#planModal, #helperModal) .modal-body { background: transparent; border-radius: 0 0 14px 6px; }
body.sb-theme :is(#planModal, #helperModal) .strip-cell { background: #fff; border: 2px solid #d7cdb5; border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; }
body.sb-theme :is(#planModal, #helperModal) .strip-label { font-weight: 700; color: var(--muted); }
body.sb-theme :is(#planModal, #helperModal) .strip-value { color: var(--ink); }
body.sb-theme #planModal .plan-matrix-wrap { border: 2px solid var(--sb-pen); border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; background: #fff; }
body.sb-theme #planModal .plan-matrix-table thead th,
body.sb-theme #planModal .plan-matrix-table :is(th, td):first-child { background: #fff7df; }
body.sb-theme #planModal .plan-semester-head strong { font-weight: var(--sb-strong); color: var(--ink); }
body.sb-theme #planModal .plan-subject-card { background: #fff; border: 1.5px solid #cfc5ad; border-radius: 9px 5px 8px 6px / 6px 8px 5px 9px; box-shadow: 2px 2px 0 rgba(44, 53, 102, .08); }
body.sb-theme #planModal .plan-block { border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; }
body.sb-theme #planModal .plan-block.selection { background: #f4f1fc; border: 2px dashed #b9aee3; }
body.sb-theme #helperModal .semester-card { border: 2px solid var(--sb-pen); border-radius: var(--sb-wobble); overflow: hidden; background: var(--sb-paper); }
body.sb-theme #helperModal .semester-card > header { color: var(--ink); background: #fff7df; border-bottom: 2px dashed #e2d3a6; font-weight: var(--sb-strong); }
body.sb-theme #helperModal #helperRenderArea .course-table th { background: #fff7df; color: #4b4f6e; }
body.sb-theme #helperModal .issue-box { background: #fff6d6; border: 2px dashed #e0b85c; border-radius: 10px; }
body.sb-theme #helperModal :is(.helper-floating-card, .helper-floating-panel) { background: #fff; border: 2px solid #d7cdb5; border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; }

/* ── 교사용 연도별 점검 ── */
body.sb-theme #teacherTools .admin-review__controls { background: #fff7df; border: 2px dashed #e2d3a6; }
body.sb-theme #teacherTools .admin-review__metric { background: #fff; border: 2px solid #d7cdb5; border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; box-shadow: 2px 3px 0 rgba(44, 53, 102, .1); }
body.sb-theme #teacherTools .admin-review__metric.is-attention { background: #fff6d6; border-color: #e0b85c; }
body.sb-theme #teacherTools .admin-review__metric.is-ready strong { color: var(--sb-green); }
body.sb-theme #teacherTools .admin-review__tabs { background: #fff; border: 2px solid #d7cdb5; }
body.sb-theme #teacherTools .admin-review__table-wrap { border: 2px solid var(--sb-pen); border-radius: 10px 6px 9px 7px / 7px 9px 6px 10px; background: #fff; }
body.sb-theme #teacherTools .admin-review .admin-review__table th { background: #fff7df; color: #4b4f6e; }
body.sb-theme #teacherTools .admin-review__eyebrow { color: var(--sb-red); }

/* ── 바닥글 ── */
body.sb-theme.curriculum-app.readable-app .site-footer { color: #7d7563; font-weight: 600; }

@media (max-width: 1199px) {
  body.sb-theme .student-dashboard.curriculum-board .board-summary-item:nth-child(3) { border-right: 0; }
  body.sb-theme .student-dashboard.curriculum-board .board-summary-status { border-top: 2px dashed #e2d9c4; }
}
@media (max-width: 760px) {
  body.sb-theme.curriculum-app.readable-app .app-topbar { padding: 14px 16px; }
  body.sb-theme.curriculum-app.readable-app .app-navigation button { font-size: calc(15px * var(--reading-scale, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  body.sb-theme .student-dashboard.curriculum-board .board-year-tabs button { transform: none !important; }
}
