/* JJ웹툰연출 — 전주대 블루와 별 노랑으로 정리한 웹툰 수업 노트
   그림(컷)은 각진 만화 칸, 설명 상자와 버튼은 둥근 카드로 구분합니다. */
/* 제목 글꼴: 페이퍼로지(Paperlogy, SIL OFL). 큰 제목 800, 소제목 600. 본문은 Pretendard 그대로. */
@font-face { font-family: "Paperozi"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Paperozi"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --bg: #eef5fb;
  --paper: #ffffff;
  --ink: #12395e;          /* 제목·테두리용 짙은 남색 */
  --text: #26323f;
  --muted: #5b6876;
  --line: #d3e2ef;
  --line-strong: #9fc0dc;
  --blue: #0078ad;         /* JJU Blue */
  --blue-deep: #005494;    /* 그러데이션 끝색 */
  --sky: #009edf;          /* 그러데이션 시작색 */
  --blue-soft: #e3f1fa;
  --blue-tint: #f3f9fd;
  --star: #f6d200;         /* JJU Yellow: 별 */
  --star-soft: #fff5c2;
  --peach: #d1906a;        /* JJU Orange: 주의 */
  --peach-soft: #fbeee6;
  --green: #5f9a78;        /* JJU Green 계열: 좋은 예 */
  --green-soft: #e7f2ec;
  --violet: #8f7eaa;
  --col: 780px;
  --r: 14px;
  --f-head: "Paperozi", "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: break-word;
  background-color: var(--bg);
  background-image: radial-gradient(#d6e6f3 1px, transparent 1.3px);
  background-size: 9px 9px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
button { font-family: var(--f-body); }

/* ───────── 상단 바 ───────── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; gap: 14px; }
.logo { font-family: var(--f-head); font-weight: 800; font-size: 23px; text-decoration: none; color: var(--ink); line-height: 1; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.logo b { font-weight: 800; background: linear-gradient(135deg, var(--sky), var(--blue-deep)); color: #fff; padding: 6px 8px 5px; border-radius: 9px; }
.topbar .where { flex: 1; min-width: 0; font-size: 14.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .where strong { color: var(--blue-deep); font-weight: 700; }
.btn-toc { font: 700 15px/1 var(--f-body); background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.btn-toc:hover { background: var(--blue-deep); }
.progress { position: absolute; left: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--sky), var(--blue-deep)); width: 0; border-radius: 0 3px 3px 0; }

/* 목차 서랍 */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(10,35,60,.45); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); overflow-y: auto; padding: 18px 18px 40px; border-radius: 18px 0 0 18px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.drawer-head h2 { font-family: var(--f-head); font-weight: 800; font-size: 26px; margin: 0; color: var(--ink); }
.drawer-close { font: 700 14.5px var(--f-body); border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); padding: 7px 13px; cursor: pointer; border-radius: 999px; }
.toc-group { font-family: var(--f-head); font-weight: 600; color: var(--blue); font-size: 19px; margin: 20px 0 4px; line-height: 1.2; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list a { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 12px; text-decoration: none; }
.toc-list a:hover { background: var(--blue-tint); }
.toc-list img { width: 58px; height: 58px; object-fit: cover; border: 1.5px solid #6fb3d6; border-radius: 8px; }
.toc-list .n { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.3; }
.toc-list .t { font-weight: 700; color: var(--ink); line-height: 1.35; display: block; }
.toc-list a[aria-current="page"] { background: var(--blue-soft); }

/* ───────── 화(에피소드) 본문 ───────── */
.ep { max-width: var(--col); margin: 22px auto 0; background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(18,57,94,.06); padding: 0 0 40px; }
@media (max-width: 800px) { .ep { margin-top: 0; border-radius: 0; } }

.ep-cover .cover-img { position: relative; background: var(--ink); }
.ep-cover .cover-img img { width: 100%; max-height: 400px; object-fit: cover; object-position: var(--focus, center 30%); }
.ep-cover .titles { padding: 24px 28px 22px; }
.ep-no { display: inline-block; font-family: var(--f-head); font-weight: 600; font-size: 16px; background: var(--blue-soft); color: var(--blue-deep); padding: 5px 12px 4px; border-radius: 999px; margin-bottom: 10px; line-height: 1.2; }
.ep-no.cut { background: var(--blue); color: #fff; }
.ep-no.story { background: var(--star); color: var(--ink); }
.ep-cover h1 { font-family: var(--f-head); font-weight: 800; font-size: clamp(32px, 6.4vw, 50px); line-height: 1.18; margin: 0 0 10px; color: var(--ink); }
.ep-cover .lead { font-size: 17.5px; margin: 0; color: var(--text); }

.ep-body { padding: 6px 28px 0; }
@media (max-width: 560px) { .ep-body { padding: 4px 16px 0; } .ep-cover .titles { padding: 18px 16px 18px; } }

/* 이번 화에서 볼 것 */
.goals { margin: 18px 0 8px; background: var(--blue-tint); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px 12px; }
.goals::before { content: "이번 화에서 볼 것"; display: block; font-family: var(--f-head); font-weight: 600; color: var(--blue); font-size: 18px; line-height: 1.2; margin-bottom: 4px; }
.goals ol { margin: 0; padding-left: 22px; }
.goals li { margin: 2px 0; }
.goals a { text-decoration: none; color: var(--ink); border-bottom: 1.5px solid var(--line-strong); }
.goals a:hover { border-bottom-color: var(--blue); color: var(--blue-deep); }

/* 섹션 제목: 파란 내레이션 박스 */
.ep-body h2 {
  font-family: var(--f-head); font-weight: 800; font-size: 27px; line-height: 1.3; color: #fff;
  margin: 58px 0 18px; padding: 9px 16px 8px; background: var(--blue); border-radius: 12px;
  box-shadow: 5px 5px 0 var(--blue-soft); display: inline-block; max-width: 100%;
  scroll-margin-top: 76px;
}
.ep-body h3 { font-family: var(--f-head); font-size: 20px; font-weight: 600; color: var(--ink); margin: 34px 0 8px; line-height: 1.45; scroll-margin-top: 76px; }
.ep-body h3 .tag { font-size: 13.5px; font-weight: 700; color: var(--blue-deep); background: var(--blue-soft); border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: 3px; white-space: nowrap; }
.ep-body p { margin: 0 0 14px; }
.ep-body ul, .ep-body ol { margin: 0 0 14px; padding-left: 24px; }
.ep-body li { margin: 4px 0; }
.ep-body li::marker { color: var(--blue); }
.ep-body strong, .hl { font-weight: 800; color: var(--ink); background: linear-gradient(transparent 62%, var(--star-soft) 62%); }
.ep-body em { font-style: normal; color: var(--blue-deep); font-weight: 800; }
.ep-body b { color: var(--ink); }

/* 교수님 한마디: 아바타 + 말풍선 */
.pen, .ep-body .pen { position: relative; margin: 14px 0 22px; padding: 12px 16px 12px 16px; margin-left: 62px; background: var(--star-soft); border-radius: 16px; color: var(--ink); font-weight: 600; font-size: 16.5px; line-height: 1.65; }
.pen::before { content: ""; position: absolute; left: -62px; top: 0; width: 50px; height: 50px; border-radius: 50%; background: #fff url(../img/yao/yao-face.webp) center/cover no-repeat; border: 2px solid var(--ink); }
.pen::after { content: ""; position: absolute; left: -9px; top: 16px; border: 9px solid transparent; border-right-color: var(--star-soft); border-left: 0; }

/* 핵심 정의 */
.def { border: 1.5px solid var(--line-strong); border-radius: var(--r); margin: 16px 0 20px; overflow: hidden; background: #fff; }
.def dt { background: var(--blue-soft); color: var(--blue-deep); font-weight: 800; padding: 8px 14px; font-size: 16.5px; }
.def dd { margin: 0; padding: 10px 16px 12px; }
.def dd p:last-child { margin-bottom: 0; }

/* 더 알아 두기 상자 */
.tip-box { border-left: 5px solid var(--sky); background: var(--blue-tint); border-radius: 0 var(--r) var(--r) 0; padding: 12px 18px 6px; margin: 16px 0 22px; }
.tip-box > b:first-child { display: block; color: var(--blue-deep); font-size: 17px; margin-bottom: 4px; }
.tip-box .tbl-wrap { background: #fff; }

/* 표 */
.tbl-wrap { overflow-x: auto; margin: 12px 0 22px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.6; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--blue-soft); color: var(--blue-deep); font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
tbody tr:nth-child(even) td { background: #fbfdff; }

/* 컷 링크: 글씨를 누르면 예시 컷이 열림 */
.cl { color: var(--blue-deep); font-weight: 700; text-decoration: none; border-bottom: 2px dotted var(--sky); cursor: zoom-in; }
.cl::after { content: "컷"; font-size: 11px; font-weight: 800; color: var(--ink); background: var(--star); border-radius: 5px; padding: 0 4px; margin-left: 3px; vertical-align: 2px; line-height: 1.5; }
.cl:hover { background: var(--blue-soft); }

/* ───────── 컷(그림) : 만화 칸 ───────── */
.cut { margin: 18px 0 24px; }
.cut .frame { position: relative; border: 2.5px solid var(--ink); background: var(--paper); cursor: zoom-in; }
.cut .frame img { width: 100%; }
.cut.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.cut.mid { max-width: 560px; margin-left: auto; margin-right: auto; }
.cut figcaption { font-size: 15px; line-height: 1.6; margin-top: 8px; color: var(--text); }
.cut .notes { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: n; }
.cut .notes li { position: relative; padding-left: 30px; margin: 4px 0; font-size: 15.5px; line-height: 1.55; }
.cut .notes li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--star); color: var(--ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.mk { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--star); color: var(--ink); font: 800 15px/30px var(--f-body); text-align: center; box-shadow: 0 0 0 3px var(--ink); pointer-events: none; }
.ring { position: absolute; border: 3px solid var(--sky); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px #fff; }
.box-mk { position: absolute; border: 3px dashed var(--star); pointer-events: none; box-shadow: 0 0 0 2px var(--ink); }
.arrow-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cut.tall .frame { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; }
.cut.tall figcaption::before { content: "↕ 그림 안에서 스크롤하세요"; display: block; font-size: 12.5px; font-weight: 700; color: var(--blue); margin-bottom: 2px; }

/* 나란히 비교 */
.duo, .trio, .quad { display: grid; gap: 14px; margin: 18px 0 24px; align-items: start; }
.duo { grid-template-columns: 1fr 1fr; }
.trio { grid-template-columns: repeat(3, 1fr); }
.quad { grid-template-columns: repeat(4, 1fr); }
.duo .cut, .trio .cut, .quad .cut { margin: 0; }
@media (max-width: 640px) { .trio, .quad { grid-template-columns: 1fr 1fr; } .duo.wide { grid-template-columns: 1fr; } }
.label-a, .label-b { font-weight: 800; font-size: 14.5px; display: inline-block; padding: 3px 11px; margin-bottom: 6px; border-radius: 999px; }
.label-a { background: var(--blue-soft); color: var(--blue-deep); }
.label-b { background: var(--blue); color: #fff; }
.label-good { background: var(--green-soft); color: #2f6b4b; }
.label-bad { background: var(--peach-soft); color: #8a4a26; }

/* 컷 흐름(연속 컷) */
.seq { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding: 4px 2px 10px; margin: 16px 0 6px; scroll-snap-type: x mandatory; }
.seq .cut { flex: 0 0 auto; width: min(240px, 62vw); margin: 0; scroll-snap-align: start; }
.seq .cut .frame { height: 300px; display: flex; align-items: center; background: #fff; }
.seq .cut .frame img { max-height: 100%; width: 100%; object-fit: contain; }
.step { display: inline-block; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--blue); border-radius: 999px; padding: 0 8px; margin-right: 4px; line-height: 1.7; }
.seq-cap { font-size: 15px; color: var(--muted); margin: 0 0 22px; }

/* ───────── 실습 위젯 공통 ───────── */
.widget { border: 1.5px solid var(--line-strong); border-radius: 18px; margin: 22px 0 30px; background: var(--paper); overflow: hidden; }
.widget-head { background: linear-gradient(90deg, var(--blue), var(--blue-deep)); color: #fff; padding: 10px 16px; font-weight: 800; font-size: 16px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.widget-head::before { content: "실습"; font-size: 12px; font-weight: 800; background: var(--star); color: var(--ink); border-radius: 999px; padding: 1px 8px; }
.widget-head .how { font-weight: 500; font-size: 13.5px; opacity: .9; }
.widget-body { padding: 16px; }

/* 탭 */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button, .tab-list button { font: 700 14.5px/1.2 var(--f-body); padding: 8px 13px; border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; border-radius: 999px; }
.tabs button[aria-selected="true"], .tab-list button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.tabs button:hover:not([aria-selected="true"]), .tab-list button:hover:not([aria-selected="true"]) { background: var(--blue-soft); }
.tab-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tab-panel[hidden] { display: none; }
.tab-panel .tp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 620px) { .tab-panel .tp-grid { grid-template-columns: 1fr; } }
.tab-panel .tp-img { border: 2.5px solid var(--ink); cursor: zoom-in; }
.tab-panel h4 { margin: 0 0 2px; font-family: var(--f-head); font-weight: 600; font-size: 23px; color: var(--ink); line-height: 1.25; }
.tab-panel .en { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: block; }
.tab-panel p { margin: 0 0 10px; font-size: 16px; }
.tab-panel .use { font-size: 15px; border-top: 1px dashed var(--line-strong); padding-top: 8px; }
.tab-panel .use b { color: var(--blue-deep); }

/* 슬라이더·결과 */
.slider-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; flex-wrap: wrap; }
.slider-row label { font-weight: 800; font-size: 15px; color: var(--ink); }
.slider-row span { font-size: 13.5px; color: var(--muted); }
.slider-row input[type=range] { flex: 1; min-width: 180px; accent-color: var(--blue); }
.readout { font-weight: 700; color: var(--ink); background: var(--star-soft); border-radius: 12px; padding: 9px 13px; font-size: 16px; line-height: 1.55; min-height: 44px; margin: 8px 0 4px; }
.readout:empty { display: none; }
.btn, .order-toggle { font: 700 15px var(--f-body); border: 0; background: var(--star); color: var(--ink); padding: 9px 16px; cursor: pointer; margin: 0 6px 10px 0; border-radius: 999px; }
.btn:hover, .order-toggle:hover { filter: brightness(.95); }
.btn.ghost { background: var(--blue-soft); color: var(--blue-deep); }
.btn[aria-pressed="true"] { background: var(--blue); color: #fff; }

/* 간격(여백) 실험 */
.gapdemo { --gap: 40px; max-width: 360px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 640px; overflow-y: auto; }
.gapdemo img { border: 2px solid var(--ink); margin-bottom: var(--gap); }
.gapdemo img:last-child { margin-bottom: 0; }
.gap-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: -2px 0 6px; }

/* 폰 스크롤 체험 */
.phone-wrap { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
@media (max-width: 640px) { .phone-wrap { grid-template-columns: 1fr; } }
.phone { width: 300px; max-width: 100%; margin: 0 auto; border: 10px solid #1d2a38; border-radius: 34px; background: #1d2a38; position: relative; }
.phone::before { content: ""; position: absolute; top: 6px; left: 50%; width: 70px; height: 8px; margin-left: -35px; border-radius: 6px; background: #3a4a5c; z-index: 2; }
.phone .screen { height: 560px; overflow-y: auto; border-radius: 24px; background: #fff; overscroll-behavior: contain; }
.phone.tall .screen { height: min(78vh, 640px); }
.phone .screen img { width: 100%; }
.phone-side .meter { height: 10px; background: var(--blue-soft); border-radius: 999px; margin: 6px 0 14px; overflow: hidden; }
.phone-side .meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sky), var(--blue-deep)); }
.phone-side .beats { list-style: none; padding: 0; margin: 0; }
.phone-side .beats li { padding: 8px 12px; border-left: 4px solid var(--line); margin-bottom: 6px; font-size: 15px; line-height: 1.5; transition: border-color .2s, background .2s; border-radius: 0 10px 10px 0; }
.phone-side .beats li.on { border-left-color: var(--blue); background: var(--blue-soft); }
.phone-side .beats b { color: var(--ink); }

/* 헤드룸 크롭 */
.cropper { position: relative; overflow: hidden; border: 2.5px solid var(--ink); aspect-ratio: 4 / 3; background: #fff; max-width: 520px; margin: 0 auto; }
.cropper img { position: absolute; left: 50%; top: 0; width: 100%; max-width: none; transform-origin: 50% 0; }

/* 읽는 순서 */
.order-layer { transition: opacity .25s; }
.order-layer.off { opacity: 0; }

/* 다음/이전 화 */
.ep-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 34px 28px 6px; margin-top: 50px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .ep-nav { padding: 26px 16px 6px; grid-template-columns: 1fr 1fr; } .ep-nav .home { grid-column: 1 / -1; order: 3; } }
.ep-nav a { text-decoration: none; border: 1.5px solid var(--line-strong); padding: 12px 16px; display: block; background: var(--paper); border-radius: 14px; }
.ep-nav a:hover { background: var(--blue-tint); }
.ep-nav .dir { font-size: 13px; color: var(--muted); display: block; }
.ep-nav .nm { font-weight: 800; color: var(--ink); line-height: 1.35; display: block; }
.ep-nav .next { text-align: right; background: var(--blue); border-color: var(--blue); }
.ep-nav .next .dir { color: #cfe8f6; } .ep-nav .next .nm { color: #fff; }
.ep-nav .next:hover { background: var(--blue-deep); }
.ep-nav .home { text-align: center; align-self: stretch; display: grid; place-items: center; font-weight: 800; color: var(--blue-deep); }
.ep-nav .empty { visibility: hidden; }

.footer { text-align: center; font-size: 13px; color: var(--muted); padding: 30px 16px 50px; line-height: 1.7; }
.footer b { color: var(--ink); }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(9,27,46,.9); display: none; overflow: auto; padding: 54px 12px 30px; cursor: zoom-out; }
.lightbox.open { display: block; }
.lightbox img { margin: 0 auto; max-width: min(900px, 100%); width: auto; border: 3px solid #fff; background: #fff; }
.lightbox .lb-cap { color: #eef5fb; max-width: 760px; margin: 12px auto 0; font-size: 15.5px; text-align: center; line-height: 1.6; }
.lightbox .lb-close { position: fixed; top: 10px; right: 12px; font: 700 15px var(--f-body); border: 0; color: var(--ink); background: #fff; padding: 7px 14px; cursor: pointer; border-radius: 999px; }

/* ───────── 홈 ───────── */
.home-hero { max-width: 1180px; margin: 0 auto; padding: 22px 16px 6px; }
.page-sheet { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 70px; }
.pnl { position: relative; border: 2.5px solid var(--ink); overflow: hidden; text-decoration: none; color: var(--ink); background: #fff; display: block; }
.pnl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: transform .35s ease; }
.pnl:hover img, .pnl:focus-visible img { transform: scale(1.04); }
.pnl .cap { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); background: rgba(255,255,255,.96); border-radius: 12px; padding: 7px 12px 6px; box-shadow: 0 2px 0 rgba(18,57,94,.18); }
.pnl .cap .n { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.25; font-weight: 600; }
.pnl .cap .t { font-family: var(--f-head); font-weight: 600; font-size: 20px; line-height: 1.2; display: block; color: var(--ink); }
.pnl.cutp .cap { background: var(--blue); }
.pnl.cutp .cap .n { color: #cfe8f6; } .pnl.cutp .cap .t { color: #fff; }
.pnl.storyp .cap { background: var(--star); }
.pnl-title { border: 0; border-radius: 22px; background: linear-gradient(140deg, var(--sky) 0%, var(--blue) 45%, var(--blue-deep) 100%); color: #fff; padding: 26px 28px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.pnl-title h1 { font-family: var(--f-head); font-weight: 800; font-size: clamp(44px, 6.6vw, 84px); line-height: 1.02; margin: 0; color: #fff; }
.pnl-title h1 span { display: block; }
.pnl-title h1 .jj { color: var(--ink); background: var(--star); display: inline-block; padding: 6px 14px 2px; border-radius: 16px; margin-bottom: 8px; }
.pnl-title p { margin: 12px 0 0; font-size: 16.5px; line-height: 1.65; max-width: 32em; color: #eaf6fd; }
.pnl-title .pen { margin: 14px 0 0 62px; font-size: 15.5px; }
.pnl-mascot { background: var(--star); border-radius: 22px; border: 0; }
.pnl-mascot img { object-fit: contain; object-position: center bottom; }
.pnl-mascot .cap { left: auto; right: 12px; }
.g-title  { grid-column: 1 / 8;  grid-row: span 5; }
.g-mascot { grid-column: 8 / 13; grid-row: span 5; }
.home-section { max-width: 1180px; margin: 0 auto; padding: 14px 16px; }
.home-section > h2 { font-family: var(--f-head); font-weight: 800; font-size: 30px; margin: 22px 0 8px; color: #fff; background: var(--blue); display: inline-block; padding: 8px 18px 7px; border-radius: 14px; letter-spacing: -.01em; }
.home-section > h2.red { background: var(--blue); }
.home-section > h2.story { background: var(--star); color: var(--ink); }
.home-section .sub { background: var(--paper); border-radius: 14px; padding: 10px 16px; margin: 6px 0 14px; font-size: 15.5px; max-width: 760px; border: 1px solid var(--line); }
.pnl.char { background: var(--blue-tint); }
.pnl.char img { object-fit: contain; padding: 10px 10px 54px; }
@media (max-width: 820px) {
  .page-sheet { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .page-sheet > * { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 210px; }
  .pnl-title { min-height: 0 !important; }
  .pnl-mascot { min-height: 300px !important; }
}
.continue { max-width: 1180px; margin: 8px auto 0; padding: 0 16px; }
.continue a { display: inline-block; background: var(--star); border-radius: 999px; padding: 9px 16px; font-weight: 800; text-decoration: none; color: var(--ink); }
.continue[hidden] { display: none; }

/* 용어사전 */
.gloss-search { width: 100%; font: 400 17px var(--f-body); padding: 12px 16px; border: 2px solid var(--line-strong); border-radius: 999px; margin: 18px 0 10px; }
.gloss-search:focus { border-color: var(--blue); outline: none; }
.gloss-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.gloss-filters button { font: 700 14px var(--f-body); border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); padding: 6px 12px; cursor: pointer; border-radius: 999px; }
.gloss-filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.gloss { list-style: none; margin: 0; padding: 0; }
.gloss li { border-bottom: 1px solid var(--line); padding: 11px 2px; }
.gloss li[hidden] { display: none; }
.gloss .term { font-weight: 800; color: var(--ink); font-size: 17.5px; }
.gloss .term small { font-weight: 500; color: var(--muted); font-size: 13.5px; margin-left: 6px; }
.gloss .cat { font-size: 12px; font-weight: 700; background: var(--blue-soft); color: var(--blue-deep); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.gloss .desc { font-size: 15.5px; margin-top: 2px; }
.gloss .go { font-size: 14px; margin-left: 4px; color: var(--blue); font-weight: 700; }
.gloss-count { font-size: 14px; color: var(--muted); }

/* 체크리스트 */
.checklist { list-style: none; padding: 0; margin: 10px 0 20px; }
.checklist li { padding: 9px 0 9px 36px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 20px; height: 20px; border: 2px solid var(--blue); border-radius: 6px; }
.checklist label { cursor: pointer; display: block; }
.checklist input { position: absolute; left: 2px; top: 12px; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.checklist li:has(input:checked)::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10l3.5 3.5L15 7' stroke='white' stroke-width='2.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* 크기 실험 */
.sizer-stage { max-width: 520px; margin: 0 auto; min-height: 120px; display: flex; align-items: flex-start; justify-content: center; }
.sizer-fig { transition: width .15s; }

/* 회전 방향 연출 */
.rot-stage { display: flex; justify-content: center; margin: 12px 0; }
.rot-phone { width: 236px; height: 410px; border: 9px solid #1d2a38; border-radius: 28px; background: #fff; position: relative; overflow: hidden; }
.rot-phone .panel { position: absolute; left: 50%; top: 50%; width: 200px; max-width: none; transform: translate(-50%,-50%); transition: transform .45s ease, width .45s ease; border: 2.5px solid var(--ink); }
.rot-phone.rotated .panel { width: var(--rotw, 360px); transform: translate(-50%,-50%) rotate(90deg); }
.rot-phone .say { position: absolute; left: 12px; bottom: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; padding: 8px 14px; font-weight: 800; font-size: 14px; z-index: 2; color: var(--ink); }
.rot-phone .sfx { position: absolute; right: 10px; top: 14px; font-family: var(--f-head); font-weight: 800; font-size: 24px; color: var(--blue-deep); -webkit-text-stroke: 4px #fff; paint-order: stroke fill; z-index: 2; }

/* 퍼스·앵글 실습 */
.persp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 680px) { .persp { grid-template-columns: 1fr; } }
.persp svg { width: 100%; height: auto; background: #fff; border: 2.5px solid var(--ink); display: block; }
.persp .ex-cut { border: 2.5px solid var(--ink); cursor: zoom-in; }
.persp .ex-cap { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

/* 카메라 워크 실습 */
.cam-stage { position: relative; overflow: hidden; border: 2.5px solid var(--ink); background: #0b1a2a; margin: 0 auto; max-width: 560px; }
.cam-stage.portrait { aspect-ratio: 3 / 4; max-width: 360px; }
.cam-stage.land { aspect-ratio: 16 / 10; }
.cam-stage img { position: absolute; max-width: none; will-change: transform; }
.cam-frames { display: flex; flex-direction: column; gap: 14px; max-width: 380px; margin: 0 auto; }
.cam-frames .fr { position: relative; overflow: hidden; border: 2.5px solid var(--ink); aspect-ratio: 4 / 3; background: #fff; }
.cam-frames .fr img { position: absolute; max-width: none; }
.cam-frames .fr .lbl { position: absolute; left: 8px; top: 8px; z-index: 2; background: var(--star); color: var(--ink); font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 1px 9px; }
.fx-lines { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.fx-on .fx-lines { opacity: 1; }

/* 같은 시간 다른 곳 */
.parallel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--line-strong); border-radius: var(--r); overflow: hidden; margin: 16px 0 24px; }
.parallel .lane { padding: 12px; }
.parallel .lane + .lane { border-left: 2px dashed var(--line-strong); background: var(--blue-tint); }
.parallel .lane-h { font-weight: 800; color: var(--blue-deep); font-size: 14.5px; margin-bottom: 8px; }
.parallel .cut { margin: 0 0 12px; }
@media (max-width: 560px) { .parallel { grid-template-columns: 1fr; } .parallel .lane + .lane { border-left: 0; border-top: 2px dashed var(--line-strong); } }

/* 출판 vs 웹툰 */
.compare-read { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; align-items: start; }
@media (max-width: 640px) { .compare-read { grid-template-columns: 1fr; } }


.form-grid { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 190px 1fr; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.form-row label { background: var(--green-soft); color: var(--ink); font-weight: 800; padding: 10px 12px; font-size: 15px; display: flex; align-items: center; }
.form-row input, .form-row textarea, .form-row select { border: 0; background: #fffbea; padding: 10px 12px; font: 500 16px var(--f-body); color: var(--text); width: 100%; min-width: 0; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: 2px solid var(--sky); outline-offset: -2px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.result-card { background: linear-gradient(135deg, var(--blue-tint), #fff); border: 1.5px dashed var(--blue); border-radius: 16px; padding: 14px 16px; margin-top: 12px; font-size: 17px; font-weight: 600; color: var(--ink); min-height: 54px; }
.result-card .ph { color: var(--muted); font-weight: 500; }
.card-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plot-card { border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 10px 12px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.plot-card:hover, .plot-card[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-tint); }
.plot-card .no { font-size: 12px; font-weight: 800; color: var(--blue); }
.plot-card .nm { font-family: var(--f-head); font-weight: 600; font-size: 19px; color: var(--ink); display: block; line-height: 1.25; }
.plot-card .ds { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }

/* 표 셀 미니 컷 */
.thumb-cell img { width: 92px; height: 70px; object-fit: cover; border: 2px solid var(--ink); cursor: zoom-in; }
.thumb-cell { width: 104px; }
.mini-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0 24px; }
.mini-gallery .cut { margin: 0; }
.mini-gallery .cut .frame { aspect-ratio: 4 / 3; overflow: hidden; }
.mini-gallery .cut .frame img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 560px) {
  table { font-size: 14.5px; }
  th, td { padding: 8px 8px; }
  td:first-child, th { white-space: normal; }
  .tbl-wrap.wide table { min-width: 560px; }
  .pen, .ep-body .pen { margin-left: 52px; font-size: 15.5px; }
  .pen::before { left: -52px; width: 42px; height: 42px; }
}

/* 인쇄 */
@media print {
  body { background: #fff; }
  .topbar, .ep-nav, .drawer, .lightbox, .widget:not(.print-target) { display: none !important; }
  .ep { box-shadow: none; max-width: none; }
}
.gap-presets { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 4px; }
.gap-presets .btn { padding: 7px 11px; font-size: 13.5px; margin: 0 5px 6px 0; }
.gap-screen { padding: 10px; }
.pnl-title { position: relative; }
.pnl-title > div, .pnl-title > .pen { position: relative; z-index: 1; }
.pnl .hero-chars, .pnl:hover .hero-chars { position: absolute; inset: auto 6px 0 auto; width: 34%; max-width: 270px; height: auto; object-fit: contain; transform: none; pointer-events: none; }
.pnl-title .pen { max-width: calc(64% - 62px); }
@media (max-width: 820px) { .pnl .hero-chars, .pnl:hover .hero-chars { position: static; width: 64%; margin: 10px auto -26px; } .pnl-title .pen { max-width: none; } }
.pnl-title .pen { color: var(--ink); }
.pnl-title p:not(.pen) { max-width: 62%; }
.g-title, .g-mascot { grid-row: span 6; }
@media (max-width: 820px) { .pnl-title p:not(.pen) { max-width: none; } }

.toc-list a[href^="st"] img, .toc-list a[href^="glossary"] img { border-color: var(--star); }




/* ── 공통: 칸과 라벨 ── */
.widget[data-practice] [hidden] { display: none !important; }
.widget[data-practice] .widget-body > p { margin: 0 0 14px; }
.widget[data-practice] .widget-body > :last-child { margin-bottom: 0; }
.widget[data-practice] label[for] { display: block; margin: 0 0 6px; font-size: 15.5px; font-weight: 800; line-height: 1.45; color: var(--ink); }
.widget[data-practice] input[type="text"],
.widget[data-practice] input[type="number"],
.widget[data-practice] textarea,
.widget[data-practice] select {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 46px; margin: 0;
  padding: 9px 13px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background-color: #fffbea; color: var(--text); font: 500 16px/1.55 var(--f-body);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.widget[data-practice] textarea { min-height: 76px; resize: vertical; }
.widget[data-practice] select {
  cursor: pointer; padding-right: 38px; -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' stroke='%23005494' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}
.widget[data-practice] input[type="text"]:hover,
.widget[data-practice] input[type="number"]:hover,
.widget[data-practice] textarea:hover,
.widget[data-practice] select:hover { border-color: var(--blue); }
.widget[data-practice] input[type="text"]:focus,
.widget[data-practice] input[type="number"]:focus,
.widget[data-practice] textarea:focus,
.widget[data-practice] select:focus { border-color: var(--blue); background-color: #fff; outline: 3px solid var(--sky); outline-offset: 1px; }
.widget[data-practice] ::placeholder { color: #6f7c89; opacity: 1; }
.widget[data-practice] fieldset { min-width: 0; margin: 0 0 14px; padding: 12px 14px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--blue-tint); }
/* legend를 카드 안 제목처럼: 줄바꿈돼도 테두리를 끊지 않게 */
.widget[data-practice] legend { float: left; width: 100%; margin: 0; padding: 0 2px 10px; font-family: var(--f-head); font-weight: 600; font-size: 19px; line-height: 1.35; color: var(--ink); white-space: normal; }
.widget[data-practice] legend + * { clear: both; }

/* ── 공통: 버튼 줄 ── */
.widget[data-practice] .sj-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 12px; }
.widget[data-practice] button[data-act] {
  min-height: 44px; margin: 0; padding: 10px 18px; border: 1.5px solid transparent; border-radius: 999px;
  background: var(--star); color: var(--ink); font: 700 15px/1.2 var(--f-body); cursor: pointer;
  box-shadow: 0 2px 0 rgba(18,57,94,.16); transition: filter .15s, transform .1s, background-color .15s;
}
.widget[data-practice] button[data-act]:hover { filter: brightness(.96); }
.widget[data-practice] button[data-act]:active { transform: translateY(1px); box-shadow: none; }
.widget[data-practice] button[data-act="example"],
.widget[data-practice] button[data-act="reset"],
.widget[data-practice] button[data-act="draw2"] { background: var(--blue-soft); border-color: var(--line-strong); color: var(--blue-deep); box-shadow: none; }
.widget[data-practice] button[data-act="clear"] { background: #fff; border-color: var(--line-strong); color: var(--muted); box-shadow: none; }
.widget[data-practice] button[data-act="clear"].is-armed { background: var(--peach-soft); border-color: var(--peach); color: #8a4a26; }
.widget[data-practice] button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.widget[data-practice] button[data-act]:focus-visible, .widget[data-practice] .gf-alt:focus-visible { border-radius: 999px; }
.sj-flash { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--green-soft); color: #24543a; font-size: 14px; font-weight: 800; line-height: 1.4; animation: sj-pop .25s ease both; }
.sj-flash:empty { display: none; }

/* ── 공통: 결과(readout) ── */
.widget[data-practice] .readout { margin: 10px 0 4px; }
.widget[data-practice] .readout.is-done { background: var(--green-soft); color: #24543a; }
.widget[data-practice] .sj-todo { padding: 1px 7px; border-radius: 8px; background: var(--peach-soft); color: #8a4a26; font-weight: 800; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.widget[data-practice] .sj-link { color: var(--blue-deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.widget[data-practice] .sj-count { font-weight: 800; white-space: nowrap; }
.widget[data-practice] .sj-meter { display: inline-block; width: 90px; max-width: 30%; height: 10px; margin: 0 10px 0 8px; vertical-align: 1px; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1.5px var(--line-strong); overflow: hidden; }
.widget[data-practice] .sj-meter i { display: block; height: 100%; border-radius: 999px; background: var(--star); transition: width .25s ease; }
.widget[data-practice] .readout.is-done .sj-meter i { background: var(--green); }
.widget[data-practice] .sj-done-msg { font-weight: 700; }

/* ── 체크 목록 (checklist · pick · 유형 3요소) ── */
.widget[data-practice] .check-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.widget[data-practice] .check-list > li { margin: 0; }
.widget[data-practice] .check-list label,
.widget[data-practice] .gf-step label {
  display: flex; align-items: flex-start; gap: 11px; min-height: 46px; margin: 0; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text);
  font-size: 16px; font-weight: 500; line-height: 1.55; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.widget[data-practice] .check-list label:hover,
.widget[data-practice] .gf-step label:hover { border-color: var(--line-strong); background: var(--blue-tint); }
.widget[data-practice] .check-list input[type="checkbox"],
.widget[data-practice] .gf-step input[type="radio"] { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.widget[data-practice] .gf-step input[type="radio"] { accent-color: var(--blue); }
.widget[data-practice] .check-list label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.widget[data-practice] .gf-step label:has(input[type="radio"]:checked) { border-color: var(--blue); background: var(--blue-soft); }
.widget[data-practice="pick"] .check-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.widget[data-practice="pick"] .check-list input[type="checkbox"] { accent-color: var(--blue); }
.widget[data-practice="pick"] .check-list label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }

/* ── match: 고르고 확인 ── */
.widget[data-practice] .match-list { display: grid; gap: 10px; margin: 0 0 4px; padding: 0; list-style: none; counter-reset: sjq; }
.widget[data-practice] .match-list > li {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0;
  padding: 12px 14px 12px 52px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  counter-increment: sjq; transition: border-color .15s, background-color .15s;
}
.widget[data-practice] .match-list > li::before {
  content: counter(sjq); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-deep); font: 800 14px/28px var(--f-body); text-align: center;
}
.widget[data-practice] .match-list > li > label { flex: 1 1 100%; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--text); }
.widget[data-practice] .match-list select { flex: 0 1 auto; width: auto; min-width: 150px; }
.widget[data-practice] .match-list > li.is-right { border-color: var(--green); background: var(--green-soft); }
.widget[data-practice] .match-list > li.is-right::before { content: "✓"; background: var(--green); color: #fff; font-size: 16px; }
.widget[data-practice] .match-list > li.is-wrong { border-color: var(--peach); background: var(--peach-soft); }
.widget[data-practice] .match-list > li.is-wrong::before { background: #fff; color: #8a4a26; box-shadow: inset 0 0 0 2px var(--peach); }
.widget[data-practice] .match-list select[aria-invalid="true"] { border-color: var(--peach); }
.widget[data-practice] .match-answer { display: inline-block; padding: 5px 12px; border: 1.5px solid var(--peach); border-radius: 999px; background: #fff; color: #8a4a26; font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.widget[data-practice] .match-why { flex: 1 1 100%; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.8); color: var(--text); font-size: 15px; line-height: 1.6; }
.widget[data-practice] .match-why::before { content: "왜? "; font-weight: 800; color: var(--blue-deep); }

/* ── switch-fill: 장르별 질문 ── */
.widget[data-practice] .case { margin: 4px 0 12px; padding: 4px 0 2px 14px; border-left: 4px solid var(--star); }
.widget[data-practice] .case > p { margin: 0 0 12px; }


.widget[data-practice] .ohh-map { margin: 18px 0 6px; }
.ohh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.widget[data-practice] .ohh-top p { margin: 0; }
.ohh-genre { padding: 5px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 800; }
.ohh-genre.is-empty { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ohh-legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ohh-key { display: inline-flex; align-items: center; gap: 5px; }
.ohh-key::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--star); }
.ohh-key.is-foe::before { background: var(--blue); }
.ohh-track { position: relative; display: grid; gap: 10px; padding: 0; }
.ohh-track::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 6px; border-radius: 6px; background: var(--star); }
.ohh-mount { display: none; }
.ohh-slot { position: relative; min-width: 0; padding-left: 38px; }
.ohh-slot::before { content: ""; position: absolute; left: 8px; top: 15px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--star); }
.ohh-slot.is-gate::before { border-radius: 4px; background: var(--star); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--star); }
.ohh-slot.is-sub, .ohh-slot.is-main { padding-left: 54px; }
.ohh-slot.is-main { padding-left: 70px; }
.ohh-slot.is-sub::before, .ohh-slot.is-main::before { left: 19px; top: 22px; width: 31px; height: 0; border-radius: 0; background: none; box-shadow: none; border-top: 2.5px dashed var(--blue); }
.ohh-slot.is-main::before { width: 47px; }
.ohh-card {
  position: relative; display: block; width: 100%; min-height: 48px; margin: 0; padding: 9px 12px 10px;
  border: 2px solid var(--star); border-radius: 14px; background: #fffdf2; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.ohh-slot.is-sub .ohh-card, .ohh-slot.is-main .ohh-card { border-color: var(--blue); background: var(--blue-tint); }
.ohh-slot.is-main .ohh-card { border-width: 3px; border-color: var(--blue-deep); box-shadow: 0 4px 0 var(--blue-soft); }
.ohh-card:hover { box-shadow: 0 0 0 3px var(--blue-soft); }
.ohh-card:focus-visible { border-radius: 14px; }
.ohh-slot .ohh-card.is-empty { border: 2px dashed var(--line-strong); background: #fff; box-shadow: none; }
.ohh-card.is-empty .ohh-tag { opacity: .72; }
.ohh-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; line-height: 1.3; }
.ohh-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 800; }
.ohh-name { font-family: var(--f-head); font-weight: 600; font-size: 18px; color: var(--ink); }
.ohh-role, .ohh-gate { padding: 1px 8px; border-radius: 999px; background: var(--star-soft); color: #6b5800; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ohh-slot.is-sub .ohh-role, .ohh-slot.is-main .ohh-role { background: var(--blue-soft); color: var(--blue-deep); }
.ohh-slot.is-main .ohh-role { background: var(--blue-deep); color: #fff; }
.ohh-gate { background: #fff; box-shadow: inset 0 0 0 1.5px var(--star); }
.ohh-text { display: block; margin-top: 5px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.ohh-text:empty { display: none; }
.ohh-card.is-long .ohh-text::after { content: " 더보기"; color: var(--blue-deep); font-size: 12.5px; font-weight: 800; }
.ohh-pop {
  display: none; position: absolute; z-index: 6; left: -2px; right: -2px; top: calc(100% + 6px);
  padding: 10px 13px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14.5px; line-height: 1.6;
  box-shadow: 0 8px 22px rgba(18,57,94,.25); pointer-events: none;
}
.ohh-pop::before { content: ""; position: absolute; left: 22px; top: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.ohh-card.is-long[aria-expanded="true"] .ohh-pop,
.ohh-card.is-long:focus-visible .ohh-pop { display: block; }
@media (hover: hover) { .ohh-card.is-long:hover .ohh-pop { display: block; } }
.ohh-pairs { display: grid; gap: 10px; margin-top: 16px; }
.ohh-pair { min-width: 0; padding: 12px 14px 13px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; }
.widget[data-practice] .ohh-pair p { margin: 0; }
.ohh-pair-h { font-family: var(--f-head); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); }
.ohh-pair-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 8px 0 10px; }
.ohh-arrow { justify-self: center; transform: rotate(90deg); font-weight: 800; font-size: 18px; line-height: 1; color: var(--blue); }
.ohh-mini { min-width: 0; padding: 8px 11px; border-radius: 10px; background: var(--star-soft); font-size: 14.5px; line-height: 1.55; }
.ohh-pair.is-foe .ohh-mini { background: var(--blue-soft); }
.ohh-mini b { display: block; font-size: 12.5px; color: var(--blue-deep); }
.ohh-mini.is-empty { background: #fff !important; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }
.widget[data-practice] .ohh-q { padding: 7px 11px; border-radius: 10px; background: var(--blue-tint); color: var(--ink); font-size: 14.5px; font-weight: 700; line-height: 1.55; }
@media (min-width: 480px) {
  .ohh-pair-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
  .ohh-arrow { align-self: center; transform: none; }
}
@media (min-width: 720px) {
  .ohh-track { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 8px; row-gap: 14px; padding-bottom: 22px; }
  .ohh-track::before { z-index: 1; left: 0; right: 10px; top: auto; bottom: 4px; width: auto; height: 7px; }
  .ohh-track::after { content: ""; position: absolute; z-index: 1; right: 0; bottom: -1px; border: 8.5px solid transparent; border-right: 0; border-left: 12px solid var(--star); }
  .ohh-mount { display: block; grid-row: 1 / 4; grid-column: 2 / 12; align-self: stretch; margin-bottom: -22px; background: linear-gradient(180deg, var(--blue-soft), var(--blue-tint)); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .9; }
  .ohh-slot, .ohh-slot.is-sub, .ohh-slot.is-main { padding-left: 0; align-self: end; }
  .ohh-slot::before, .ohh-slot.is-sub::before, .ohh-slot.is-main::before { display: none; }
  .ohh-slot[data-k="mid"] { grid-row: 1; grid-column: 5 / 9; }
  .ohh-slot[data-k="a1"] { grid-row: 2; grid-column: 3 / 7; }
  .ohh-slot[data-k="a3"] { grid-row: 2; grid-column: 7 / 11; }
  .ohh-slot[data-k="plan"] { grid-row: 3; grid-column: 1 / 4; }
  .ohh-slot[data-k="setup"] { grid-row: 3; grid-column: 4 / 7; }
  .ohh-slot[data-k="climax"] { grid-row: 3; grid-column: 7 / 10; }
  .ohh-slot[data-k="done"] { grid-row: 3; grid-column: 10 / 13; }
  .ohh-slot.is-gate .ohh-card:not(.is-empty) { border-bottom-width: 6px; }
  .ohh-pop { min-width: 240px; }
  .ohh-slot[data-k="climax"] .ohh-pop, .ohh-slot[data-k="done"] .ohh-pop, .ohh-slot[data-k="a3"] .ohh-pop { left: auto; }
  .ohh-slot[data-k="climax"] .ohh-pop::before, .ohh-slot[data-k="done"] .ohh-pop::before, .ohh-slot[data-k="a3"] .ohh-pop::before { left: auto; right: 22px; }
  .ohh-pairs { grid-template-columns: 1fr 1fr; }
  .ohh-pair-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ohh-arrow { transform: rotate(90deg); }
}

/* ── genre-finder: 유형 찾기 ── */
.widget[data-practice] .gf-step > p { margin: 0 0 8px; }
.widget[data-practice] .gf-step > p:last-of-type { margin-bottom: 0; }
.widget[data-practice] .gf-step[data-step="2"] { border-color: var(--line-strong); }
.widget[data-practice] .gf-step[data-step="3"] { border: 2px solid var(--star); background: #fffdf2; }
.widget[data-practice] .gf-result-name { margin: 6px 0 2px; font-family: var(--f-head); font-weight: 600; font-size: 23px; line-height: 1.3; color: var(--ink); }
.widget[data-practice] .gf-result-name:focus { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.widget[data-practice] .gf-result-desc { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
.widget[data-practice] .gf-elements b { color: var(--ink); }
.widget[data-practice] .readout.is-alt { background: var(--blue-tint); }
.widget[data-practice] .gf-alt {
  min-height: 40px; margin: 6px 6px 0 0; padding: 7px 14px; border: 1.5px solid var(--blue); border-radius: 999px;
  background: #fff; color: var(--blue-deep); font: 700 14.5px/1.3 var(--f-body); cursor: pointer;
}
.widget[data-practice] .gf-alt:hover { background: var(--blue-soft); }
.widget[data-practice] .gf-fill { margin: 0 0 12px; padding: 14px 14px 2px; border: 1.5px dashed var(--blue); border-radius: 16px; background: var(--blue-tint); }
.widget[data-practice] .gf-fill > p:first-child { margin: 0 0 10px; font-family: var(--f-head); font-weight: 600; font-size: 18px; color: var(--ink); }
.widget[data-practice] .gf-fill > p { margin: 0 0 12px; }

/* ── logline: 로그라인 빌더 ── */
.widget[data-practice] .lb-sentence { margin: 14px 0 8px; padding: 14px 16px; border: 2px dashed var(--blue); border-radius: 16px; background: #fff; font-size: 17.5px; line-height: 1.7; }
.widget[data-practice] .lb-hints { display: grid; gap: 6px; margin: 0 0 14px; }
.widget[data-practice] .lb-hints:empty { display: none; }
.lb-hint { position: relative; display: block; padding: 8px 12px 8px 58px; border-radius: 12px; background: var(--blue-tint); color: var(--ink); font-size: 15px; line-height: 1.55; }
.lb-hint::before { content: "힌트"; position: absolute; left: 10px; top: 9px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.6; }
.widget[data-practice] .lb-check-readout { display: inline-block; margin: 0 0 4px; padding: 6px 14px; border-radius: 999px; background: var(--peach-soft); color: #8a4a26; font-weight: 800; font-size: 15px; }
.widget[data-practice] .lb-check-readout.is-done { background: var(--green-soft); color: #24543a; }
.widget[data-practice] .lb-check-readout:empty { display: none; }

/* ── puzzle6: 퍼즐판 문장 ── */
.widget[data-practice] .p6-oneline { padding: 14px 16px; border: 2px dashed var(--blue); border-radius: 16px; background: #fff; font-size: 17px; line-height: 1.7; }
.widget[data-practice] .p6-fourline { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.widget[data-practice] .p6-fourline:empty { display: none; }
.widget[data-practice] .p6-fourline > li { margin: 0; padding: 9px 13px; border-left: 5px solid var(--sky); border-radius: 0 12px 12px 0; background: var(--blue-tint); font-size: 15.5px; line-height: 1.65; }
.widget[data-practice] .p6-fourline > li:nth-child(2) { border-left-color: var(--blue); }
.widget[data-practice] .p6-fourline > li:nth-child(3) { border-left-color: var(--blue-deep); }
.widget[data-practice] .p6-fourline > li:nth-child(4) { border-left-color: var(--star); background: var(--star-soft); }
.widget[data-practice] .p6-fourline b { margin-right: 2px; color: var(--blue-deep); }


.widget[data-practice] .pc-deck { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 16px; padding: 0; list-style: none; }
.widget[data-practice] .pc-deck > li { display: flex; min-width: 0; margin: 0; }
.widget[data-practice]:not(.pc-ready) .pc-deck > li { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
@media (min-width: 520px) { .widget[data-practice] .pc-deck { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 740px) { .widget[data-practice] .pc-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pc-card { --g: var(--sky); display: block; flex: 1; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; perspective: 900px; }
.pc-card.g-face { --g: var(--peach); } .pc-card.g-love { --g: var(--star); } .pc-card.g-inner { --g: var(--green); } .pc-card.g-rise { --g: var(--violet); }
.pc-card:focus-visible { border-radius: 16px; outline-offset: 3px; }
.pc-inner { position: relative; display: grid; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.75,.3,1); }
.pc-card.is-flipped .pc-inner { transform: rotateY(180deg); }
.pc-face {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 148px; padding: 12px 12px 11px;
  border: 2px solid var(--ink); border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.pc-front { background: #fff; box-shadow: inset 0 7px 0 var(--g); padding-top: 16px; }
.pc-card:hover .pc-front { background: var(--blue-tint); }
.pc-back { background: var(--ink); color: #fff; transform: rotateY(180deg); }
.pc-no { align-self: flex-start; padding: 0 8px; border-radius: 999px; background: var(--g); color: var(--ink); font-size: 12.5px; font-weight: 800; line-height: 1.6; }
.pc-card.g-rise .pc-no, .pc-card.g-inner .pc-no { color: #fff; }
.pc-ko { margin-top: 4px; font-family: var(--f-head); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--ink); }
.pc-en { font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.pc-hint { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--blue); }
.pc-hint::before { content: "↻ "; }
.pc-qlabel { align-self: flex-start; padding: 0 7px; border-radius: 999px; background: var(--star); color: var(--ink); font-size: 11.5px; font-weight: 800; line-height: 1.6; }
.pc-q { font-size: 14px; font-weight: 600; line-height: 1.55; }
.pc-ex { margin-top: auto; padding-top: 6px; font-size: 13px; color: #cfe8f6; }
.widget[data-practice] .pc-hand { margin: 0 0 16px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 18px; background: linear-gradient(140deg, var(--star-soft), #fff 55%, var(--blue-tint)); }
.widget[data-practice] .pc-hand:empty { display: none; }
.widget[data-practice] .pc-hand-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.pc-hcard { --g: var(--sky); display: flex; flex-direction: column; gap: 3px; min-width: 0; margin: 0 !important; padding: 11px 13px 12px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; animation: sj-deal .4s cubic-bezier(.2,.75,.3,1) both; }
.pc-hcard:nth-child(2) { animation-delay: .07s; } .pc-hcard:nth-child(3) { animation-delay: .14s; } .pc-hcard:nth-child(4) { animation-delay: .21s; }
.pc-hcard.g-face { --g: var(--peach); } .pc-hcard.g-love { --g: var(--star); } .pc-hcard.g-inner { --g: var(--green); } .pc-hcard.g-rise { --g: var(--violet); }
.pc-hcard.is-plot { box-shadow: inset 0 7px 0 var(--g); padding-top: 15px; }
.pc-hcard.is-desire { background: var(--star-soft); }
.pc-hcard.is-hero { background: var(--green-soft); }
.pc-hlabel { align-self: flex-start; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.6; }
.pc-hname { font-family: var(--f-head); font-weight: 600; font-size: 20px; line-height: 1.3; color: var(--ink); }
.pc-hsub { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.widget[data-practice] .pc-prompt { margin: 0; padding: 10px 13px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-size: 16.5px; font-weight: 800; line-height: 1.6; }

/* ── beat-sheet: 비트 시트 ── */
.widget[data-practice="beat-sheet"] input[type="number"] { display: inline-block; width: 120px; margin-right: 8px; vertical-align: middle; }
.widget[data-practice] .bs-note { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-size: 14px; font-weight: 700; line-height: 1.45; vertical-align: middle; }
.widget[data-practice] .bs-note.is-preset { background: var(--green-soft); color: #24543a; }
.widget[data-practice] .bs-note.is-todo { background: var(--peach-soft); color: #8a4a26; }
.widget[data-practice] .bs-note:empty { display: none; }
.widget[data-practice] .bs-list { display: grid; gap: 10px; margin: 14px 0 4px; padding: 0; list-style: none; counter-reset: sjb; }
.widget[data-practice] .bs-list > li { position: relative; margin: 0; padding: 10px 12px 12px 50px; border: 1.5px solid var(--line); border-left: 6px solid var(--sky); border-radius: 14px; background: #fff; counter-increment: sjb; }
.widget[data-practice] .bs-list > li:nth-child(n+6) { border-left-color: var(--blue); }
.widget[data-practice] .bs-list > li:nth-child(n+13) { border-left-color: var(--star); }
.widget[data-practice] .bs-list > li::before { content: counter(sjb); position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-deep); font: 800 14px/28px var(--f-body); text-align: center; }
.widget[data-practice] .bs-list > li:nth-child(9)::before, .widget[data-practice] .bs-list > li:nth-child(11)::before { background: var(--ink); color: #fff; }
.widget[data-practice] .bs-list label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.widget[data-practice] .bs-ep { padding: 1px 10px; border-radius: 999px; background: var(--star-soft); color: #6b5800; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.widget[data-practice] .bs-list textarea { min-height: 60px; }

/* ── 움직임 ── */
@keyframes sj-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes sj-deal { from { opacity: 0; transform: translateY(10px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pc-inner, .sj-flash, .pc-hcard, .sj-meter i { transition: none; animation: none; }
}

/* ── 좁은 화면 ── */
@media (max-width: 560px) {
  .widget[data-practice] .widget-body { padding: 14px 12px; }
  .widget[data-practice] .match-list > li { padding: 11px 12px 11px 46px; }
  .widget[data-practice] .match-list > li::before { left: 10px; top: 11px; }
  .widget[data-practice] .match-list select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .widget[data-practice] fieldset { padding: 6px 10px 12px; }
  .widget[data-practice] .bs-list > li { padding-left: 46px; }
  .pc-face { min-height: 136px; padding: 10px; }
  .pc-front { padding-top: 14px; }
  .pc-ko { font-size: 20px; }
}
/* 세로 컷 ↔ 가로 */
.sw-view { margin: 12px 0 6px; }
.sw-view[hidden] { display: none; }
.land-phone { border: 10px solid #1d2a38; border-radius: 30px; background: #1d2a38; max-width: 620px; margin: 0 auto; }
.land-phone .hscreen { height: 300px; overflow-x: auto; overflow-y: hidden; border-radius: 20px; background: #fff; overscroll-behavior: contain; }
.land-phone .hscreen img { height: 100%; width: auto; max-width: none; }
.sw-hint { text-align: center; font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 560px) { .land-phone .hscreen { height: 210px; } }
/* 표 안 미니 컷 */
.cl-thumb { display: inline-block; margin: 2px 4px 2px 0; vertical-align: top; cursor: zoom-in; }
.cl-thumb img { width: 124px; height: 92px; object-fit: cover; border: 2px solid var(--ink); }
.cl-thumb:hover img { outline: 3px solid var(--star); }
@media (max-width: 560px) { .cl-thumb img { width: 96px; height: 72px; } }

/* 홈: 교수 캐릭터 칸 (전주대 노랑 바탕 + 제작 표기) */
.pnl-mascot { background: var(--star); }
.pnl-mascot img { object-fit: contain; object-position: center 20%; padding: 14px 14px 58px; }
.pnl-mascot .credit { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-family: var(--f-head); font-weight: 600; font-size: 19px; color: var(--ink); letter-spacing: .01em; }
.pnl-mascot .cap { top: 12px; bottom: auto; right: 12px; left: auto; }


.ohfig { margin: 18px 0 22px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: #fff; padding: 14px 12px 10px; overflow-x: auto; }
.ohfig svg { display: block; width: 100%; height: auto; min-width: 620px; font-family: var(--f-body); }
.ohfig figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.src-box { border: 1.5px solid var(--line-strong); border-left: 6px solid var(--blue); border-radius: 12px; background: #fff; padding: 12px 16px; margin: 0 0 18px; display: flex; gap: 16px; align-items: flex-start; }
.src-box > b { flex: none; color: var(--blue-deep); }
.src-box p { margin: 0; }
.src-box img { flex: none; width: 92px; height: auto; border-radius: 4px; box-shadow: 0 2px 8px rgba(18,57,94,.18); }
@media (max-width: 560px) { .src-box { flex-wrap: wrap; } }
.save-note { margin-bottom: 22px; }


.ohb-scroll { overflow-x: auto; margin: 6px -4px 0; padding: 4px 4px 8px; }
.ohb { min-width: 720px; }
.ohb-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0 8px; padding: 0 2%; align-items: end; }
.ohb-bot { align-items: start; }
.ohb-pic { position: relative; }
.ohb-pic svg { display: block; width: 100%; height: auto; }
.ohb-card { position: relative; display: block; text-align: left; font: inherit; color: var(--text); background: #fff; border: 2px solid var(--line-strong); border-radius: 12px; padding: 7px 10px 8px; margin: 4px 0; cursor: pointer; min-width: 0; }
.ohb-pic .ohb-card { position: absolute; top: 46.5%; width: 20.5%; margin: 0; background: rgba(255,255,255,.94); }
.ohb-card.is-sub { border-color: #2f9e57; }
.ohb-card.is-main { border-color: #d0565b; border-width: 2.5px; }
.ohb-card.is-gate, .ohb-card.is-hero { border-color: var(--blue); }
.ohb-card.is-empty { border-style: dashed; }
.ohb-card.is-empty .ohh-text { color: var(--muted); font-weight: 500; }
.ohb-head { display: block; font-size: 12.5px; font-weight: 800; color: var(--blue-deep); line-height: 1.35; }
.ohb-card.is-sub .ohb-head { color: #22794a; }
.ohb-card.is-main .ohb-head { color: #b3424a; }
.ohb-card .ohh-text { margin-top: 3px; font-size: 14px; line-height: 1.5; }
.ohb-card:hover { box-shadow: 0 0 0 3px var(--blue-soft); }
.ohb-card.is-long .ohh-text::after { content: " 더보기"; color: var(--blue-deep); font-size: 12.5px; font-weight: 700; }
.ohb-card .ohh-pop { z-index: 3; }
.ohb-card.is-long[aria-expanded="true"] .ohh-pop, .ohb-card.is-long:focus-visible .ohh-pop { display: block; }
@media (hover: hover) { .ohb-card.is-long:hover .ohh-pop { display: block; } }
.widget[data-practice] .ohb-hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
@media (min-width: 760px) { .widget[data-practice] .ohb-hint { display: none; } }

/* 연습 칸 내려받기 */
.widget .save-row { margin: 14px 0 0; padding-top: 12px; border-top: 1.5px dashed var(--line-strong); display: flex; flex-wrap: wrap; gap: 8px; }
.widget .save-btn { font: inherit; font-size: 14.5px; font-weight: 700; color: var(--blue-deep); background: var(--blue-tint); border: 1.5px solid var(--blue-soft); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.widget .save-btn::before { content: "↓ "; }
.widget .save-btn:hover { background: var(--blue-soft); }
.widget .save-btn:disabled { opacity: .5; cursor: progress; }
.print-val, .print-stamp { display: none; }
@media print {
  body.printing-widget .print-path > :not(.print-path):not(.print-target) { display: none !important; }
  body.printing-widget .print-path { margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: #fff !important; max-width: none !important; }
  body.printing-widget .print-target { margin: 0; box-shadow: none; }
  body.printing-widget .print-target textarea, body.printing-widget .print-target input[type=text], body.printing-widget .print-target select, body.printing-widget .print-target button:not(.ohb-card):not(.ohh-card), body.printing-widget .print-target .save-row, body.printing-widget .print-target .ohb-hint { display: none !important; }
  body.printing-widget .print-target .print-val { display: block; min-height: 1.6em; padding: 4px 8px; border: 1px solid #9aa5b1; border-radius: 6px; white-space: pre-wrap; margin-top: 2px; }
  body.printing-widget .print-target .print-stamp { display: block; margin-top: 14px; font-size: 11px; color: #5b6b7b; }
  body.printing-widget .print-target .ohb-scroll { overflow: visible; }
  body.printing-widget .print-target .ohb { min-width: 0; }
  body.printing-widget .topbar, body.printing-widget .footer { display: none; }
}

/* 장면 전환 카드: 누르면 예시 컷이 세로로 이어진 화면이 열린다 */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.t-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: #fff; border: 1.5px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.t-card:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.t-thumb { display: block; height: 132px; background: var(--ink); border-bottom: 3px solid var(--ink); }
.t-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.t-body { display: block; padding: 10px 12px 12px; }
.t-body b { display: block; font-family: var(--f-head); font-weight: 600; font-size: 19px; color: var(--ink); margin-bottom: 3px; }
.t-desc { display: block; font-size: 14.5px; line-height: 1.55; }
.t-more { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 800; color: var(--blue-deep); background: var(--blue-tint); border-radius: 999px; padding: 3px 10px; }
.lightbox .lb-strip { display: none; }
.lightbox.is-strip .lb-strip { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.lightbox .lb-strip img { max-width: min(560px, 100%); width: 100%; border: 3px solid #fff; background: #fff; }

/* 용어사전: 가나다 첫 글자 */
.gloss-ini { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.gloss-ini a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; background: var(--blue-tint); color: var(--blue-deep); font-weight: 800; text-decoration: none; font-size: 15px; }
.gloss-ini a:hover { background: var(--blue-soft); }
.gloss li[id^="ini-"] { scroll-margin-top: 80px; }
.gloss li[id^="ini-"]::before { content: attr(data-ini); display: block; font-family: var(--f-head); font-weight: 600; font-size: 22px; color: var(--blue); margin: 10px 0 6px; }

.note-add { font-size: 14.5px; color: var(--muted); background: var(--blue-tint); border-radius: 10px; padding: 6px 12px; }
.ohb { min-width: 640px; }
.ohb-pic .ohb-card { top: 50.5%; width: 19.5%; padding: 5px 8px 6px; }
.ohb-pic .ohb-card .ohb-head { font-size: 11.5px; }
.ohb-pic .ohb-card .ohh-text { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ohb-pic .ohb-card.is-long .ohh-text::after { content: none; }
.ohb-row .ohb-card .ohh-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ohb-row .ohb-card.is-long .ohh-text::after { content: none; }
.ohb-card.is-long .ohb-head::after { content: " · 눌러서 전체 보기"; font-weight: 600; color: var(--muted); }
.t-thumb img { object-position: var(--pos, center 35%); }
.src-box cite { font-style: normal; font-weight: 700; }
@media (max-width: 640px) {
  .ohfig svg { min-width: 560px; }
  .ohfig figcaption::before { content: "그림을 옆으로 밀어 보세요. "; font-weight: 700; color: var(--blue-deep); }
}

.ohb.is-formula { min-width: 680px; }
.ohb.is-formula .ohb-pic svg .lbl, .ohb.is-formula .ohb-pic svg .lbl2 { display: none; }
.ohb.is-formula .ohb-card { position: absolute; transform: translate(-50%, -50%); margin: 0; }
.ohb.is-formula .ohb-card.in-circle { width: 23%; top: 0; border: 0; background: transparent; text-align: center; padding: 4px 6px; box-shadow: none; }
.ohb.is-formula .ohb-card.in-circle:hover, .ohb.is-formula .ohb-card.in-circle:focus-visible { background: rgba(255,255,255,.7); border-radius: 999px; box-shadow: none; }
.ohb.is-formula .ohb-card.in-circle .ohb-head { font-size: 12.5px; }
.ohb.is-formula .ohb-card.in-circle .ohh-text { font-size: 13.5px; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.ohb.is-formula .ohb-card.in-circle.is-empty .ohh-text { font-weight: 500; }
.ohb.is-formula .ohb-under { position: relative; height: 118px; margin-top: -22px; }
.ohb.is-formula .ohb-under .ohb-card { top: 0; transform: translateX(-50%); width: 27%; }
.ohb.is-formula .ohb-under .ohb-card .ohh-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ohb.is-formula .ohb-pic .ohb-card { width: 23%; }
.ohb.is-formula .ohb-pic svg .cap { display: none; }
.ohb.is-formula .ohb-card.is-long .ohh-text::after { content: none; }
.ohb.is-formula .ohb-under { margin-top: -40px; }

/* ── 편집 모드 (주소에 ?edit) ── 학생 화면에는 나타나지 않는다 */
body.jj-editing [contenteditable="true"] { cursor: text; outline: 1.5px dashed transparent; outline-offset: 3px; border-radius: 3px; }
body.jj-editing [contenteditable="true"]:hover { outline-color: var(--line-strong); }
body.jj-editing [contenteditable="true"][data-ed-dirty] { outline: 2px dashed var(--star); }
body.jj-editing [contenteditable="true"]:focus { outline: 2.5px solid var(--star); }
.ed-bar { position: fixed; right: 16px; bottom: 16px; z-index: 95; width: 330px; max-width: calc(100vw - 32px); background: var(--paper); color: var(--text); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 0 10px 28px rgba(18,57,94,.22); font: 14.5px/1.5 var(--f-body); }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; background: var(--star); border-radius: 11px 11px 0 0; color: var(--ink); }
.ed-top b { font-family: var(--f-head); font-weight: 600; font-size: 17px; }
.ed-count { font-size: 13.5px; font-weight: 700; }
.ed-fold { margin-left: auto; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.55); border: 0; border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.ed-body { padding: 10px 14px 12px; }
.ed-bar.is-folded .ed-body { display: none; }
.ed-bar.is-folded .ed-top { border-radius: 11px; }
.ed-hint { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.ed-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-btns button { font: inherit; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 6px 13px; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.ed-btns .ed-save { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.ed-btns .ed-save:hover { background: var(--ink); }
.ed-btns button.is-warn { background: var(--peach-soft); border-color: var(--peach); color: #8a4a26; }
.ed-msg { margin: 8px 0 0; font-size: 13.5px; color: var(--ink); font-weight: 600; word-break: break-all; }
.ed-msg:empty { display: none; }
.ed-chip { position: fixed; z-index: 94; display: flex; align-items: center; gap: 6px; max-width: 320px; padding: 4px 10px 4px 4px; background: var(--ink); color: #fff; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.25); font: 12.5px/1.3 var(--f-body); }
.ed-chip[hidden] { display: none; }
.ed-chip button { font: inherit; font-weight: 800; color: var(--ink); background: var(--star); border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.ed-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-bar button:focus-visible, .ed-chip button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (max-width: 560px) { .ed-bar { right: 12px; left: 12px; bottom: 12px; width: auto; max-width: none; } }
@media print { .ed-bar, .ed-chip { display: none !important; } body.jj-editing [contenteditable="true"] { outline: 0 !important; } }


.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.ep-card, .appendix-link {
  --edge: #6fb3d6; --shade: 0, 84, 148;
  background: var(--paper); border: 2px solid var(--edge); border-radius: 10px; color: var(--ink); text-decoration: none; overflow: hidden;
  box-shadow: 0 1px 2px rgba(var(--shade), .08), 0 8px 18px -6px rgba(var(--shade), .22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ep-card.storyp, .appendix-link { --edge: var(--star); --shade: 150, 118, 0; }
.ep-card:hover, .appendix-link:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(var(--shade), .10), 0 14px 24px -8px rgba(var(--shade), .30); }
.ep-card { display: flex; flex-direction: column; }
.ep-card .ep-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--blue-soft); }
.ep-card .ep-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ep-card:hover .ep-thumb img, .ep-card:focus-visible .ep-thumb img { transform: scale(1.04); }
.ep-card .ep-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 15px; flex: 1; border-top: 2px solid var(--edge); }
.ep-card .n { font-size: 13px; font-weight: 700; line-height: 1.2; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); }
.ep-card.cutp .n { background: var(--blue); color: #fff; }
.ep-card.storyp .n { background: var(--star); color: var(--ink); }
.ep-card .t { font-family: var(--f-head); font-weight: 600; font-size: 18.5px; line-height: 1.32; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
.ep-card:hover .t { color: var(--blue-deep); }
.ep-card:focus-visible, .appendix-link:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 14px; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; } .ep-card .ep-meta { padding: 9px 10px 12px; } .ep-card .t { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .ep-card, .appendix-link, .ep-card .ep-thumb img { transition: none; } .ep-card:hover, .appendix-link:hover { transform: none; } }

/* ── 콘티와 완성 원고 비교 ── */
.cmp { position: relative; max-width: 620px; margin: 0 auto; border: 2px solid var(--ink); background: #fff; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; overflow: hidden; }
.cmp img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--cut, 50%)) 0 0); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 3px; margin-left: -1.5px; background: var(--star); box-shadow: 0 0 0 1px var(--ink); pointer-events: none; }
.cmp-line::after { content: "◀ ▶"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--star); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1; padding: 7px 8px; white-space: nowrap; }
.cmp-tag { position: absolute; top: 8px; font-size: 13px; font-weight: 800; line-height: 1.2; padding: 4px 11px; border-radius: 999px; pointer-events: none; }
.cmp-tag.is-a { left: 8px; background: var(--ink); color: #fff; }
.cmp-tag.is-b { right: 8px; background: var(--star); color: var(--ink); }
[data-compare] .slider-row { max-width: 620px; margin-left: auto; margin-right: auto; }

/* 상자 머리글도 소제목 글꼴(600)로 */
.def dt, .tip-box > b:first-child, .widget-head { font-family: var(--f-head); font-weight: 600; }
.widget-head .how, .widget-head .badge { font-family: var(--f-body); }

/* 부록: 용어사전 바로가기 (노란 그림에 맞춘 노란 테두리) */
.home-appendix { padding-top: 26px; padding-bottom: 30px; }
.appendix-link { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: stretch; padding: 0 20px 0 0; }
.appendix-link img { width: 112px; height: 100%; min-height: 112px; object-fit: cover; display: block; border-right: 2px solid var(--edge); }
.appendix-link > span { padding: 14px 0; align-self: center; }
.appendix-link .n { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.2; padding: 3px 10px; border-radius: 999px; background: var(--star); color: var(--ink); }
.appendix-link .t { display: block; font-family: var(--f-head); font-weight: 600; font-size: 20px; line-height: 1.3; margin-top: 5px; }
.appendix-link .d { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.appendix-link:hover .t { color: var(--blue-deep); }
@media (max-width: 600px) { .appendix-link { grid-template-columns: 84px 1fr; gap: 12px; padding-right: 12px; } .appendix-link img { width: 84px; min-height: 84px; } .appendix-link > span { padding: 10px 0; } .appendix-link .t { font-size: 17.5px; } .appendix-link .d { font-size: 13.5px; } }

/* 아직 넣지 않은 그림(책 표지 등)은 자리를 차지하지 않게 숨긴다 */
img[data-optional][hidden] { display: none !important; }

/* 황금비율 그림 */
.goldfig { max-width: 560px; margin: 18px auto 22px; }
.goldfig svg { display: block; width: 100%; height: auto; }
.goldfig figcaption { font-size: 14.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* ── v7: 세로 스크롤로 보는 연속 컷 (seq 기본형) ── */
.vs .vs-screen { --gap: 26px; padding: 20px 0 28px; }
.vs .vs-screen img { display: block; width: 100%; height: auto; margin: 0 0 var(--gap); }
.vs .vs-screen img:last-child { margin-bottom: 0; }
.vs .beats li { cursor: pointer; }
.vs .beats li b { display: inline-block; margin-right: 4px; color: var(--blue-deep); }
.vs .seq-cap { margin: 12px 0 0; }
.widget.vs { margin: 18px 0 24px; }
/* 출판만화 칸은 옆으로 나란히: 높이를 맞춰 줄을 꽉 채운다(흰 여백 없음) */
.seq.page { overflow: visible; align-items: flex-start; scroll-snap-type: none; padding: 4px 0 10px; }
.seq.page .cut { flex: var(--ar) 1 0; width: auto; min-width: 0; }
.seq.page .cut .frame { height: auto; display: block; background: none; }
.seq.page .cut .frame img { width: 100%; height: auto; max-height: none; object-fit: fill; }
@media (max-width: 640px) {
  .seq.page { overflow-x: auto; scroll-snap-type: x mandatory; }
  .seq.page .cut { flex: 0 0 auto; width: calc(var(--ar) * 250px); }
}
/* 눌러 보는 예시 카드: 썸네일을 그림으로 꽉 채운다 */
.t-thumb { height: auto; aspect-ratio: 5 / 3; }
@media (min-width: 900px) { .t-grid.four { grid-template-columns: repeat(4, 1fr); } }
.widget.vs .widget-head::before { content: "스크롤"; }

/* ── v7: 칸·컷·샷 용어 카드 ── */
.terms3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 14px; }
.term-card { background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 12px 14px 12px; }
.term-fig { background: var(--blue-tint); border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.term-fig svg { display: block; width: 100%; height: auto; max-height: 170px; }
.term-name { display: block; font-family: var(--f-head); font-weight: 800; font-size: 26px; color: var(--blue-deep); line-height: 1.1; margin-bottom: 4px; }
.term-card p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.55; }
.term-card .term-gap { margin: 0; font-size: 14.5px; background: var(--star-soft); border-radius: 8px; padding: 4px 9px; color: var(--ink); }
@media (max-width: 720px) {
  .terms3 { grid-template-columns: 1fr; }
  .term-card { display: grid; grid-template-columns: 124px 1fr; gap: 12px; align-items: center; }
  .term-fig { margin: 0; }
}

/* ── v7: 180도 법칙 실습 ── */
.axis-wrap { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.axis-lbl { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.axis-map { display: block; width: 100%; height: auto; border: 2.5px solid var(--ink); border-radius: 10px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.axis-map:active { cursor: grabbing; }
.axis-map text { pointer-events: none; }
.axis-cam { cursor: grab; outline: none; }
.axis-cam:focus-visible .axis-cam-body rect { stroke: var(--star); stroke-width: 4; }
.axis-frame { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; }
.axis-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.widget[data-axis] .readout.warn { background: var(--peach-soft); border-color: var(--peach); color: #6d3a1c; }
.widget[data-axis].crossed .axis-frame { outline: 4px solid var(--peach); outline-offset: 2px; }
@media (max-width: 640px) { .axis-wrap { grid-template-columns: 1fr; } .axis-col:last-child { max-width: 300px; margin: 0 auto; width: 100%; } }
/* 세로 화면에서 공간 쌓기: 왼쪽 스크롤 화면, 오른쪽에 그림 둘 */
.space2 { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; margin: 18px 0 24px; }
.phone-fig { margin: 0; width: 300px; max-width: 100%; }
.phone-fig figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.phone-fig figcaption b { color: var(--ink); }
.space2-side { display: grid; gap: 16px; }
.space2-side .cut { margin: 0; }
@media (max-width: 700px) { .space2 { grid-template-columns: 1fr; } .phone-fig { margin: 0 auto; } }

/* ── v7: 기획안 양식(두 페이지)과 글콘티 표 ── */
.sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 20px; align-items: stretch; }
.sheet { position: relative; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 6px; box-shadow: 0 2px 0 rgba(0,84,148,.10), 0 10px 22px rgba(0,84,148,.10); padding: 40px 14px 16px; }
.sheet-no { position: absolute; top: 10px; left: 14px; font-family: var(--f-head); font-weight: 600; font-size: 15px; color: #fff; background: var(--blue); border-radius: 999px; padding: 2px 12px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.sheet th, .sheet td { border: 1.5px solid var(--ink); padding: 7px 9px; vertical-align: top; text-align: left; }
.sheet th { width: 5.6em; background: var(--blue-soft); color: var(--ink); font-weight: 800; }
.sheet th small { display: block; font-weight: 700; font-size: 11.5px; color: var(--blue-deep); margin-top: 3px; line-height: 1.3; }
.sheet td { color: var(--muted); }
.sheet tr.big td { height: 9.5em; }
.sheet-rel { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 8px 8px 6px; margin-bottom: 10px; text-align: center; background: var(--blue-tint); }
.sheet-rel svg { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.sheet-rel span { font-size: 13.5px; color: var(--muted); }
.sheet-note { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 700px) { .sheets { grid-template-columns: 1fr; } }
table.conti-form caption { caption-side: top; text-align: left; font-family: var(--f-head); font-weight: 600; color: var(--ink); padding: 8px 12px 6px; font-size: 16px; }
table.conti-form td { height: 2.6em; }
table.conti-form tr.ex td { color: var(--blue-deep); background: var(--blue-tint); }
table.conti-form td:first-child, table.conti-form th:first-child { width: 2.6em; text-align: center; }

/* ── v7: 웹앱(홈 화면에 추가) ── */
.install { max-width: 1180px; margin: 10px auto 0; padding: 0 16px; }
.install[hidden] { display: none; }
.install-tip { margin: 0; font-size: 14.5px; color: var(--ink); background: var(--star-soft); border-radius: 12px; padding: 8px 12px; display: inline-block; }
.topbar { padding-top: env(safe-area-inset-top, 0px); }
.footer { padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px)); }
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 1.5px solid var(--ink); }

/* ───────── v8 (2026-11-15) ───────── */
.src { font-size: 13.5px; color: var(--muted); margin: -6px 0 18px; line-height: 1.55; }
.src a { color: inherit; text-decoration: underline; }
.src::before { content: "출처 "; font-weight: 800; color: var(--blue-deep); }
dl.def + .src { margin-top: -10px; }
.note-it { font-style: italic; color: var(--muted); }

/* 같은 크기의 두 상자: 왼쪽은 쪽 넘김, 오른쪽은 세로 스크롤 */
.eqpair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 8px; align-items: start; }
.eqpair > div { min-width: 0; }
.eq-box { position: relative; aspect-ratio: var(--ar, 720 / 1140); border: 2.5px solid var(--ink); background: #fff; overflow: hidden; }
.eq-box.scroll { overflow-y: auto; overscroll-behavior: contain; }
.eq-box.scroll img { width: 100%; display: block; }
.eq-cap { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 8px 0 0; }
.eq-cap b { color: var(--ink); }
.pager img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pager img[hidden] { display: none; }
.pg-btn { position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--star); color: var(--ink); font: 800 17px/1 var(--f-body); cursor: pointer; z-index: 2; box-shadow: 0 2px 0 var(--ink); }
.pg-btn.prev { left: 8px; } .pg-btn.next { right: 8px; }
.pg-btn[disabled] { opacity: .28; cursor: default; }
.pg-no { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: var(--ink); color: #fff; font: 700 12.5px/1 var(--f-body); padding: 5px 10px; border-radius: 999px; z-index: 2; }

/* 시선의 길: 번호를 누르면 화살표가 이어진다 */
.gaze .frame { cursor: default; }
.gaze svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gaze svg path { fill: none; stroke: var(--star); stroke-width: 1.5; stroke-linecap: round; filter: drop-shadow(0 0 1px #12395e); }
.gaze svg path.sh { stroke: var(--ink); stroke-width: 2.6; filter: none; }
.gaze button.mk { pointer-events: auto; border: 0; cursor: pointer; padding: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; line-height: 34px; font-size: 16px; }
.gaze button.mk.on { background: var(--blue); color: #fff; }
.gaze button.mk:focus-visible { outline: 3px solid #fff; }
.gaze-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.gaze-bar button { font: 700 13.5px var(--f-body); border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; }

/* 표: 세로 구분선, 좁은 칸 */
table.vlines td, table.vlines th { border-right: 1.5px solid var(--line-strong); }
table.vlines td:last-child, table.vlines th:last-child { border-right: 0; }
table .nw { white-space: nowrap; }

/* 카드 격자: 칸 수 고정 */
@media (min-width: 900px) { .t-grid.three { grid-template-columns: repeat(3, 1fr); } .t-grid.five { grid-template-columns: repeat(5, 1fr); } .t-grid.two { grid-template-columns: repeat(2, 1fr); } }
.t-grid.sq .t-thumb { aspect-ratio: 1 / 1; }
.t-card.static { cursor: default; }
.t-card .t-tag { display: inline-block; font: 800 12px/1.6 var(--f-body); color: #fff; background: var(--blue-deep); border-radius: 999px; padding: 0 8px; margin-bottom: 4px; }

/* 왼쪽 긴 스크롤 하나 + 오른쪽 위아래 두 칸: 높이를 맞춘다 */
.lr-fit { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 16px; margin: 16px 0 22px; align-items: stretch; }
.lr-fit .lr-left { display: flex; flex-direction: column; min-width: 0; }
.lr-fit .lr-scroll { flex: 1 1 0; min-height: 420px; border: 2.5px solid var(--ink); background: #fff; overflow-y: auto; overscroll-behavior: contain; }
.lr-fit .lr-scroll img { width: 100%; display: block; }
.lr-fit .lr-right { display: grid; grid-template-rows: 1fr 1fr; gap: 14px; min-width: 0; }
.lr-fit .lr-item { display: flex; flex-direction: column; min-height: 0; border: 1.5px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: #fff; }
.lr-fit .lr-item .lr-img { flex: 1 1 0; min-height: 150px; position: relative; background: var(--ink); cursor: zoom-in; }
.lr-fit .lr-item .lr-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
.lr-fit .lr-item p, .lr-fit .lr-left p { margin: 0; padding: 9px 12px 11px; font-size: 14.5px; line-height: 1.55; }
.lr-fit .lr-left p { padding: 8px 2px 0; color: var(--muted); }
.lr-fit .lr-item b, .lr-fit .lr-left b { color: var(--ink); }
@media (max-width: 640px) { .lr-fit { grid-template-columns: 1fr; } .lr-fit .lr-scroll { flex: none; height: 480px; } .lr-fit .lr-right { grid-template-rows: none; } .lr-fit .lr-item .lr-img { flex: none; aspect-ratio: 5 / 3; } }

/* 번호 달린 Yao Tip */
.yao-tip { border: 2.5px solid var(--ink); border-radius: 16px; background: var(--star-soft, #fff7d6); padding: 12px 16px 12px; margin: 16px 0 22px; }
.yao-tip > b { font-family: var(--f-head); font-size: 19px; color: var(--ink); }
.yao-tip ol { margin: 6px 0 0; padding-left: 1.3em; }
.yao-tip li { margin: 3px 0; font-weight: 600; }

/* 도식 그림 */
.diagram { margin: 16px 0 22px; }
.diagram img { width: 100%; max-width: 760px; display: block; margin: 0 auto; border: 2px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: zoom-in; }
.diagram figcaption { font-size: 14.5px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.55; }
.diagram figcaption b { color: var(--ink); }
.link-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0 20px; }
.link-list li { border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 9px 12px; background: #fff; font-size: 14.5px; line-height: 1.5; }
.link-list a { font-weight: 800; color: var(--blue-deep); display: block; }
table.tint2 tr.t-a td { background: #eaf4fb; }
table.tint2 tr.t-b td { background: #fff7d1; }
table.tint2 td[rowspan] { text-align: center; vertical-align: middle; }
.lr-fit a.lr-img { display: block; border: 0; border-radius: 0; padding: 0; margin: 0; width: auto; height: auto; }
.lr-fit a.lr-img img { border: 0; }
/* BIG5 표정 견주기 */
.b5-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 14px 0 22px; }
.b5-item { border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; padding: 10px 12px 12px; }
.b5-name { display: block; font-family: var(--f-head); font-weight: 600; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.b5-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b5-pair figure { margin: 0; }
.b5-img { display: block; aspect-ratio: 1 / 1; border: 2.5px solid var(--ink); overflow: hidden; background: var(--ink); cursor: zoom-in; }
.b5-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.b5-pair figcaption { font-size: 14px; line-height: 1.5; margin-top: 6px; }
.b5-tag { display: inline-block; font: 800 12px/1.6 var(--f-body); color: #fff; border-radius: 999px; padding: 0 8px; margin-right: 2px; }
.b5-tag.hi { background: var(--blue-deep); } .b5-tag.lo { background: #7a8794; }
.cut a.frame { display: block; }
@media (min-width: 900px) { .b5-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; } .b5-pair { grid-template-columns: 1fr; } .b5-item { padding: 8px 9px 10px; } .b5-pair figcaption { font-size: 13.5px; min-height: 5.6em; } }
/* 톤앤매너 견주기 */
.tone-rows { display: grid; gap: 12px; margin: 14px 0 20px; }
.tone-row { border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; padding: 10px; }
.tone-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tone-imgs a { display: block; aspect-ratio: 1 / 1; border: 2.5px solid var(--ink); overflow: hidden; cursor: zoom-in; }
.tone-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tone-row p { margin: 8px 2px 0; font-size: 15px; line-height: 1.55; }
.tone-row p b { color: var(--ink); }
@media (min-width: 900px) { .tone-rows { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .tone-rows { grid-template-columns: 1fr; } .tone-row { display: grid; grid-template-columns: minmax(0, 540px) 1fr; gap: 16px; align-items: center; } .tone-row p { margin: 0; font-size: 16px; } }

/* v8.2 편집기 */
.ed-top > b { white-space: nowrap; }
.ed-count { font-size: 12.5px; }
.install-tip[hidden] { display: none; }
.persp .ex-more { margin: 8px 0 0; font-size: 13.5px; padding: 6px 12px; }

/* v9 편집기: 모든 편집 장치는 떠 있는 상자라 본문 배치를 바꾸지 않는다 */
.ed-ui[hidden] { display: none !important; }
.ed-bar { width: 360px; }
.ed-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ed-file { font-size: 12px; font-weight: 700; color: var(--ink); opacity: .8; }
.ed-file.is-warn { color: #9a3a12; opacity: 1; }
.ed-file.is-ok { color: #1d5e2f; opacity: 1; }
.ed-btns + .ed-btns { margin-top: 6px; }
.ed-btns .ed-memo.is-on { background: var(--star); border-color: var(--ink); }
.ed-old { margin: 0 0 10px; padding: 8px 10px; background: var(--peach-soft); border-radius: 10px; font-size: 13px; }
.ed-old p { margin: 0 0 6px; }
.ed-old button, .ed-tools button, .ed-pop button, .ed-list button, .ed-link button, .ed-fit button { font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 11px; cursor: pointer; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); margin: 2px 4px 2px 0; }
.ed-t-del { border-color: var(--peach) !important; color: #8a4a26 !important; }
.ed-tools, .ed-link, .ed-fit, .ed-pop, .ed-list { position: absolute; z-index: 96; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 6px 18px rgba(18,57,94,.22); font-size: 13.5px; }
.ed-tools { padding: 4px 6px; display: flex; gap: 2px; white-space: nowrap; }
.ed-link { padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; width: 360px; max-width: calc(100vw - 16px); }
.ed-link input { flex: 1 1 200px; font: inherit; padding: 5px 8px; border: 1.5px solid var(--line-strong); border-radius: 8px; }
.ed-fit { padding: 6px 8px; max-width: calc(100vw - 16px); }
.ed-fit b { display: block; margin-bottom: 4px; }
img.ed-fitting { cursor: move !important; outline: 3px solid var(--star); outline-offset: -3px; }
body.jj-editing .ed-del { opacity: .38; text-decoration: line-through; outline: 2px dashed var(--peach) !important; outline-offset: 3px; cursor: pointer; }
body.jj-editing .ed-added { outline: 2px dashed var(--sky) !important; outline-offset: 3px; min-height: 1.6em; }
body.jj-editing .ed-added:empty::before { content: "여기에 글을 쓰세요"; color: var(--muted); }
.ed-pin { position: absolute; z-index: 93; min-width: 34px; height: 26px; margin: -26px 0 0 -4px; border-radius: 13px 13px 13px 2px; border: 2px solid #fff; background: #d9480f; color: #fff; font: 800 12.5px/22px var(--f-body); text-align: center; cursor: pointer; padding: 0 7px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ed-pin::before { content: "메모 "; }
.ed-pop { width: 330px; max-width: calc(100vw - 16px); padding: 10px; }
.ed-pop-where { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.ed-pop textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 6px 8px; border: 1.5px solid var(--line-strong); border-radius: 8px; resize: vertical; }
.ed-pop-btns { margin-top: 6px; }
.ed-list { position: fixed; left: 16px; bottom: 16px; z-index: 97; width: 380px; max-width: calc(100vw - 32px); max-height: 60vh; overflow: auto; padding: 10px 12px; }
.ed-list-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ed-list-head b { margin-right: auto; }
.ed-list-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); }
.ed-list-row > div { flex: 1; min-width: 0; }
.ed-list-row small { color: var(--muted); font-size: 12px; }
.ed-list-row p { margin: 2px 0 0; white-space: pre-wrap; }
.ed-list-row.is-lost { opacity: .7; }
body.ed-memo-mode main, body.ed-memo-mode main * { cursor: crosshair !important; }
/* 편집 중에는 숨은 탭 패널을 모두 펼친다 */
.jj-editing .tab-panel[hidden], .jj-editing .tab-panel { display: block !important; }
.ed-tab-label { margin: 12px 0 4px; font-size: 12.5px; font-weight: 800; color: var(--blue-deep); background: var(--blue-soft); border-radius: 999px; padding: 2px 10px; display: inline-block; }

/* v9.1 */
/* 표: 세로 구분선을 가로선과 같은 연하고 얇은 선으로 모든 표에 */
th, td { border-right: 1px solid var(--line); }
th:last-child, td:last-child { border-right: 0; }
table.vlines td, table.vlines th { border-right: 1px solid var(--line); }
table.vlines td:last-child, table.vlines th:last-child { border-right: 0; }
/* 강조 상자: 검은 테두리 대신 파란색 */
.box-mk { box-shadow: 0 0 0 2px var(--blue); }
/* 나란한 그림의 높이 맞추기: --eqh에 오른쪽 그림 비율을 넣으면 두 칸의 그림 높이가 같아진다 */
.duo.eqh .frame { aspect-ratio: var(--eqh); max-height: none; }
.duo.eqh .frame > img { width: 100%; height: 100%; object-fit: cover; }
.duo.eqh .cut.tall .frame > img { height: auto; }
/* 용어 카드: 노란 칸을 카드 아래에 맞춰 빈 공간이 생기지 않게 */
@media (min-width: 721px) {
  .term-card { display: flex; flex-direction: column; }
  .term-card > div:last-child { flex: 1; display: flex; flex-direction: column; }
  .term-card .term-gap { margin-top: auto; }
}
/* 출처 링크는 밑줄 */
.src a { text-decoration: underline; text-underline-offset: 2px; }
/* 소항목: 작은 파란 동그라미 */
.ep-body ul.sub-dots { list-style: none; padding-left: 6px; }
.ep-body ul.sub-dots > li { position: relative; padding-left: 18px; }
.ep-body ul.sub-dots > li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
