/* ringono.com — "수색 표지의 일본어 대역 학습지". 모바일(360px) 우선 → 600 / 840 / 960 / 1024px.
   토큰은 base.html 의 :root. 표준 31개 컴포넌트 + 사이트 블록(.ex-list · .vocab-grid · 장면 표현 카드 dl). */

/* ── 0. 바탕 ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.7;
  word-break: keep-all; overflow-wrap: break-word;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.num, time { font-family: var(--font-number); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
/* 일본어 구간: 한국어용 keep-all 을 풀어야 공백 없는 일본어 문장이 줄바꿈된다 */
[lang|="ja"] { font-family: var(--font-ja); word-break: normal; line-break: strict; }
ruby { ruby-position: over; ruby-align: center; }
rt { font-family: var(--font-ja); font-size: .5em; font-weight: 400; line-height: 1; letter-spacing: 0; color: var(--text-dim); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skiplink { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--primary); color: #fff; padding: 12px 16px; border-radius: var(--radius); }
.skiplink:focus { top: 12px; color: #fff; }

/* ── 1. 헤더 (수색 표지 위 워드마크) ─────────────────────── */
.desk { position: relative; z-index: 10; background: var(--bg); border-bottom: 1px solid rgba(32, 45, 49, .14); }
.desk__in { max-width: var(--container); margin: 0 auto; padding: 0 12px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.wordmark__mark { flex: none; }
.wordmark__name { font-family: var(--font-title); font-weight: 400; font-size: 24px; line-height: 1; letter-spacing: .02em; padding-top: 10px; }
.wordmark__name rt { font-size: 11px; color: var(--primary); letter-spacing: .12em; padding-bottom: 3px; }

.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px;
  border: 1.5px solid var(--text); border-radius: var(--radius); background: var(--surface); color: var(--text);
  font: 600 15px/1 var(--font-body); cursor: pointer;
}
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; position: relative; content: ""; }
.menu-btn__bars::before { position: absolute; top: -5px; }
.menu-btn__bars::after { position: absolute; top: 5px; }
.js .menu-btn { display: inline-flex; }

.desk-nav { flex: 1 0 100%; }
.desk-nav ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 0 12px; }
.desk-nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px;
}
.desk-nav a:hover { color: var(--primary); }
.desk-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--primary); color: var(--primary); }
.js .desk-nav { display: none; }
.js .desk.is-open .desk-nav { display: block; }

/* ── 2. 페이지 틀 · 학습 면(.sheet) ────────────────────── */
.page { max-width: var(--container); margin: 0 auto; padding: 12px 10px 32px; }
.sheet { background: var(--surface); border-radius: var(--radius); padding: 22px 16px; margin: 0 0 12px; }
.sheet.sheet--plain { padding: 0; background: none; }
.sheet__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sheet__h { font-family: var(--font-body); font-weight: 600; font-size: 20px; line-height: 1.4; color: var(--text); }
.sheet__h::before { content: ""; display: block; width: 28px; height: 3px; background: var(--primary); margin-bottom: 10px; }
.sheet__h--sm { font-size: 17px; }
.sheet__h--sm::before { width: 20px; margin-bottom: 8px; }
.sheet__sub { margin-top: 6px; color: var(--text-dim); font-size: 15px; }
.sheet__more { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }
.sheet__more::after { content: " →"; white-space: pre; }
.empty-note { margin-top: 14px; color: var(--text-dim); font-size: 16px; }

/* 버튼 · 칩 */
.btn, .post-body .cta-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--primary); color: #fff; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn:hover, .post-body .cta-button:hover { background: var(--primary-hover); color: #fff; }
.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 22px;
  border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: none;
}
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chip--cat { border-color: var(--primary); color: var(--primary); border-radius: var(--radius); }
.chip--cat:hover { background: var(--primary-soft); color: var(--primary); }
.lv {
  display: inline-block; padding: 2px 8px; border-radius: 3px; background: var(--accent); color: #fff;
  font: 700 13px/1.5 var(--font-number); letter-spacing: .03em; text-decoration: none;
}
a.lv { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; }
a.lv:hover { color: #fff; background: #1a3a4a; }

/* 브레드크럼 */
.trail ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--text-dim); }
.trail li { display: flex; align-items: center; min-width: 0; }
.trail li + li::before { content: "›"; padding: 0 6px; color: var(--text-dim); }
.trail a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-dim); }
.trail li:last-child:not(:first-child) { display: none; }
.trail [aria-current] { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 3. 홈 ──────────────────────────────────────────── */
.intro { padding: 18px 6px 22px; }
.intro__kicker { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.intro__title { margin-top: 8px; font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.45; color: var(--text); }
.intro__lede { margin-top: 12px; font-size: 17px; line-height: 1.7; max-width: 34em; }
.intro__by { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(98, 66, 21, .45); font-size: 15px; color: var(--text-dim); max-width: 40em; }
.intro__by strong { color: var(--primary); font-weight: 600; }
.br-wide { display: none; }

.levels__list { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.levels__list a {
  display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: 10px 14px;
  border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius);
  color: var(--text); text-decoration: none; background: var(--surface);
}
.levels__list a:hover { background: var(--primary-soft); color: var(--text); }
.levels__lv { font-size: 22px; line-height: 1.2; color: var(--primary); }
.levels__desc { font-size: 14px; color: var(--text-dim); margin-top: 2px; }

/* 대표 수업 펼침면: 왼쪽(원문 면) / 오른쪽(풀이 면) — 840px 미만은 한 열 */
.spread { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0 0 12px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spread__left { padding: 22px 16px 18px; background: var(--surface); }
.spread__right { padding: 18px 16px 22px; background: var(--primary-soft); border-top: 1px dashed rgba(98, 66, 21, .5); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.spread__label { font-size: 14px; font-weight: 600; color: var(--accent); }
.spread__title { margin-top: 8px; font-family: var(--font-title); font-weight: 400; font-size: 24px; line-height: 1.45; }
.spread__title a { color: var(--text); text-decoration: none; }
.spread__title a:hover { text-decoration: underline; }
.spread__sum { margin-top: 10px; font-size: 16px; line-height: 1.75; color: var(--text); }
.spread__k { font-size: 14px; font-weight: 600; color: var(--primary); }
.spread__right .chip { background: var(--surface); }
.spread__date { font-size: 14px; color: var(--text-dim); }

.scenes__list { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scenes__list a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 10px 14px;
  background: var(--accent-soft); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.scenes__list a:hover { background: #d6e8ee; color: var(--text); }
.scenes__ja { font-size: 22px; line-height: 2; color: var(--accent); }
.scenes__ja rt { font-size: 11px; }
.scenes__ko { font-size: 15px; font-weight: 600; }

/* 목록 카드 */
.lesson-list { list-style: none; margin-top: 8px; }
.lesson { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); }
.lesson-list > .lesson:first-child { border-top: 0; }
.lesson--thumb { grid-template-columns: minmax(0, 1fr) 88px; }
.lesson__cat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.lesson__title { margin-top: 6px; font-size: 18px; font-weight: 600; line-height: 1.5; text-wrap: pretty; }
.lesson__title a { color: var(--text); text-decoration: none; }
.lesson__title a:hover { color: var(--primary); text-decoration: underline; }
.lesson__sum { max-width: 40em; margin-top: 6px; font-size: 16px; line-height: 1.7; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lesson__meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--text-dim); }
.lesson__meta time { font-size: 13px; }
.lesson__thumb { display: block; align-self: start; margin-top: 4px; }
.lesson__thumb img { display: block; width: 88px; height: 66px; object-fit: cover; border-radius: 4px; background: var(--accent-soft); }

/* 작가 */
.author { display: block; background: var(--surface); border-radius: var(--radius); padding: 20px 16px; border-top: 3px solid var(--primary); }
.author__mono { float: left; margin: 0 12px 4px 0; width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.author__name { font-size: 18px; font-weight: 600; line-height: 1.4; min-height: 52px; }
.author__role { display: block; font-size: 14px; font-weight: 400; color: var(--text-dim); }
.author__body p { clear: left; margin-top: 10px; font-size: 15px; line-height: 1.7; }
.author__rule { color: var(--text-dim); }

/* 목록 페이지 머리 */
.list-head { padding: 4px 6px 18px; }
.list-head__title { margin-top: 4px; font-family: var(--font-title); font-weight: 400; font-size: 30px; line-height: 1.4; }
.list-head__hash { color: var(--primary); margin-right: 2px; }
.list-head__desc { margin-top: 8px; font-size: 16px; max-width: 40em; }
.list-head__count { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.list-head__count .num { color: var(--primary); font-size: 16px; margin-right: 2px; }
.tag-nav .chip-row { margin-top: 12px; }

/* 광고: 라벨 외 자식(광고 코드)이 없으면 숨김. 있으면 예약 높이로 레이아웃 이동 방지 */
.ad-slot { position: relative; margin: 0 0 12px; padding: 22px 0 8px; min-height: 120px; text-align: center; background: var(--surface); border-radius: var(--radius); }
.ad-slot:not(:has(> :not(.ad-label))) { display: none; }
.ad-label { position: absolute; top: 4px; left: 10px; font-size: 12px; color: var(--text-dim); letter-spacing: .08em; }

/* ── 4. 글 ──────────────────────────────────────────── */
.lesson-sheet { max-width: var(--post-width); margin: 0 auto 12px; background: var(--surface); border-radius: var(--radius); padding: 6px 16px 24px; }
.lesson-head { max-width: var(--reading-width); margin: 0 auto; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.lesson-head__cat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; font-weight: 600; }
.lesson-head__cat > a:not(.lv) { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: none; }
.lesson-head__cat > a:not(.lv):hover { text-decoration: underline; }
.lesson-head__title { margin-top: 4px; font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.lesson-head__lede { margin-top: 12px; font-size: 17px; line-height: 1.75; color: var(--text-dim); }
.lesson-head__by { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--text-dim); }
.lesson-head__author { font-weight: 600; color: var(--primary); }
.lesson-head__by time { color: var(--text); }
.lesson-cover { max-width: var(--reading-width); margin: 20px auto 0; }
.lesson-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--accent-soft); }

.lesson-foot { max-width: var(--reading-width); margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--border); }
.lesson-foot__upd { margin-top: 12px; font-size: 14px; color: var(--text-dim); }

.next-lesson { max-width: var(--post-width); margin: 0 auto 12px; }
.next-lesson__k { font-size: 14px; font-weight: 600; color: var(--text); padding: 0 6px 6px; }
.next-lesson__a {
  display: grid; gap: 4px; padding: 16px 48px 16px 16px; position: relative; min-height: 64px;
  background: var(--accent); color: #fff; border-radius: var(--radius); text-decoration: none;
}
.next-lesson__a::after { content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; }
.next-lesson__a:hover { background: #1a3a4a; color: #fff; }
.next-lesson__title { font-size: 18px; font-weight: 600; line-height: 1.5; }
.next-lesson__sum { font-size: 15px; line-height: 1.6; color: #e6f1f4; }
.related, .lesson-sheet ~ .sheet--plain { max-width: var(--post-width); margin-left: auto; margin-right: auto; }

/* ── 5. 본문 .post-body ───────────────────────────────── */
.post-body {
  max-width: var(--reading-width); margin: 0 auto; padding-top: 22px;
  font-size: 17px; line-height: 1.8; color: var(--text);
  word-break: keep-all; overflow-wrap: break-word;
}
.post-body > * + * { margin-top: 1em; }
.post-body p, .post-body li, .post-body dd { overflow-wrap: break-word; }
.post-body a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; }
.post-body strong { font-weight: 600; color: var(--text); }
.post-body h2 {
  margin-top: 2.4em; font-weight: 600; font-size: 22px; line-height: 1.45; color: var(--text);
  padding-top: 14px; border-top: 1px solid var(--border); position: relative; scroll-margin-top: 16px;
}
.post-body h2::before { content: ""; position: absolute; top: -2px; left: 0; width: 44px; height: 3px; background: var(--primary); }
.post-body h3 { margin-top: 1.8em; font-weight: 600; font-size: 19px; line-height: 1.5; color: var(--accent); scroll-margin-top: 16px; }
.post-body h4 { margin-top: 1.4em; font-weight: 600; font-size: 17px; line-height: 1.5; }
.post-body :is(h2, h3, h4) + * { margin-top: .6em; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .4em; }
.post-body li > p { margin: 0; }
.post-body [lang|="ja"] { font-size: 1.06em; }
.post-body p[lang|="ja"], .post-body dd[lang|="ja"] { line-height: 2; }
.post-body img { display: block; max-width: 100%; border-radius: var(--radius); }
.post-body hr, .post-body .divider { border: 0; height: 0; border-top: 1px dashed var(--primary); margin: 2em auto; width: 40%; }
.post-body code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; }

/* 상자 다음 문단은 조금 더 띄운다 */
.post-body :is(blockquote, .summary-box, .toc-box, .info-box, .warn-box, .note-box, .success-box, .error-box, .key-points, .ex-list, .vocab-grid, .scroll-x, .table-scroll, table, .step, .timeline, figure, .cta-box, .spoiler) + p { margin-top: 1.4em; }

/* 본문 컴포넌트 시각 — 실제 일본어 학습 사이트(Tofugu · Bunpro · JLPT 공식)와 일본 구청 안내 페이지(요코하마시 · 세타가야구)의
   상자 모양을 따왔다. 출처는 DESIGN.md 표 참고. 알림 상자 다섯 개는 서로 모양이 다르다:
   warn=점선 밑줄 제목(注意事項) / error=머리 칸 있는 테두리 상자 / info=무테 회색 면 + 자간 킥커 / success=각진 라벨 칩 + 가로선 / note=（ ）괄호 머리말 문단 */
.post-body { --panel: #f1f4f5; --row-head: #faf5ea; }

/* 장면 인용 (본문 첫 요소) — Bunpro 예문 카드: 둥근 회청색 면, 가운데 정렬, 원문 크게 → 뜻 */
.post-body blockquote { margin: 0; padding: 18px 18px 16px; background: var(--accent-soft); border-radius: 10px; text-align: center; }
.post-body blockquote p { font-size: 16px; color: var(--text); }
.post-body blockquote p[lang|="ja"] { font-size: 20px; line-height: 2; color: var(--text); }
.post-body blockquote p + p { margin-top: 4px; }
.post-body blockquote cite { display: block; margin-top: 6px; font-size: 14px; font-style: normal; color: var(--text-dim); }

/* 알림 상자 공통 */
.post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) { font-size: 16px; line-height: 1.75; }
.post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) > div > * + * { margin-top: .6em; }
.post-body .badge { display: inline-block; font-size: 14px; font-weight: 600; line-height: 1.6; }

/* warn — 요코하마시 '注意事項': 상자 없이 작은 사각 표지 + 제목, 그 아래 폭 가득 점선, 내용은 선 아래 */
.post-body .warn-box { padding: 2px 0 0; }
.post-body .warn-box > .badge { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--warn); color: var(--warn); font-size: 17px; }
.post-body .warn-box > .badge::before { content: ""; flex: none; width: 5px; height: 15px; background: var(--warn); }
.post-body .warn-box > div { padding-top: 10px; }

/* error — 요코하마시 'このページへのお問合せ' 상자: 1px 테두리 + 회색 머리 칸(제목) → 흰 몸통. 머리 칸 앞에 ✕ */
.post-body .error-box { border: 1px solid var(--warn); background: var(--surface); }
.post-body .error-box > .badge { display: block; padding: 8px 14px; background: var(--warn-soft); border-bottom: 1px solid var(--warn); color: var(--warn); font-size: 16px; }
.post-body .error-box > .badge::before { content: "✕"; margin-right: 8px; font-weight: 700; }
.post-body .error-box > div { padding: 12px 14px 14px; }

/* info(장면 표현 카드) — Tofugu 'GRAMMAR EQUATIONS' · 예문 상자: 테두리·모서리 없는 회색 면, 자간 넓힌 작은 회색 킥커가 위 */
.post-body .info-box { padding: 20px 20px 18px; background: var(--panel); }
.post-body .info-box > .badge { display: block; margin-bottom: 8px; color: var(--text-dim); font-size: 14px; letter-spacing: .14em; }
.post-body :is(.info-box, .note-box) dl { margin: 0; }
.post-body :is(.info-box, .note-box) dl > div + div { margin-top: 12px; }
.post-body :is(.info-box, .note-box) dt { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: .14em; }
.post-body :is(.info-box, .note-box) dd { margin: 0; font-size: 16px; }
.post-body :is(.info-box, .note-box) dd[lang|="ja"] { font-size: 20px; }

/* success — JLPT 공식 수준 표의 각진 색 라벨('Reading'): 왼쪽 단색 칩 | 오른쪽 문장, 위아래 가는 녹색 선 */
.post-body .success-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--ok); border-bottom: 1px solid var(--ok); }
.post-body .success-box > .badge { padding: 0 8px; background: var(--ok); color: #fff; font-size: 13px; line-height: 1.9; border-radius: 2px; margin-top: 2px; }

/* note — 세타가야구 안내문의 '（補足）（注意）' 머리말: 상자 없는 문단, 괄호로 감싼 머리말, 첫 줄 들여쓰기 */
.post-body .note-box { text-indent: 1em; font-size: 15px; color: var(--text-dim); }
.post-body .note-box > .badge { margin-right: 2px; color: var(--text); font-size: 15px; font-weight: 600; text-indent: 0; }
.post-body .note-box > .badge::before { content: "（"; }
.post-body .note-box > .badge::after { content: "）"; }
.post-body .note-box > div { display: inline; }
.post-body .note-box dl { text-indent: 0; }

/* 예문 목록 .ex-list — Tofugu 예문 상자: 회색 면, 줄마다 위에 작은 자간 킥커(예문 1 / 읽기 / 뜻) */
.post-body .ex-list { list-style: none; padding: 0; counter-reset: ex; }
.post-body .ex-list > li { padding: 16px 20px 16px; background: var(--panel); counter-increment: ex; }
.post-body .ex-list > li + li { margin-top: 10px; }
.post-body .ex-list > li::before { content: "예문 " counter(ex); display: block; font: 700 12px/1.6 var(--font-number); letter-spacing: .14em; color: var(--text-dim); }
.post-body .ex-list > li > p[lang|="ja"] { font-size: 20px; line-height: 2; color: var(--text); }
.post-body .ex-list > li > p + p { margin-top: 8px; font-size: 16px; line-height: 1.7; }
.post-body .ex-list > li > p.yomi { color: var(--text-dim); }
.post-body .ex-list > li > p:not([lang]):not(.yomi)::before,
.post-body .ex-list > li > p.yomi::before { display: block; font-size: 12px; font-weight: 600; line-height: 1.6; letter-spacing: .14em; color: var(--text-dim); }
.post-body .ex-list > li > p.yomi::before { content: "읽기"; }
.post-body .ex-list > li > p:not([lang]):not(.yomi)::before { content: "뜻"; }

/* 단어 카드 .vocab-grid — Bunpro 'Related' 카드: 둥근 회색 면, 큰 단어 → 가는 선 → 뜻 */
.post-body .vocab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.post-body .vocab-grid > dl { margin: 0; padding: 10px 14px 12px; background: var(--panel); border-radius: 8px; }
.post-body .vocab-grid dt { padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 21px; line-height: 2; color: var(--text); }
.post-body .vocab-grid dd { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-dim); }

/* 이 글에서 익힐 것 — Bunpro 'Topics' 카드: 1px 테두리 8px 모서리, 머리 줄(청회색 아이콘 칸 + 제목) → 가는 선 → 내용 */
.post-body .summary-box { padding: 0 16px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.post-body .summary-box > h4 { display: flex; align-items: center; gap: 10px; margin: 0 -16px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 17px; font-weight: 600; color: var(--text); }
.post-body .summary-box > h4::before { content: "✓"; flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 16px; }
.post-body .summary-box > p, .post-body .summary-box ul { font-size: 16px; }
.post-body .summary-box > p + ul { margin-top: 8px; }

/* 오늘의 따라 읽기 — Bunpro 'About' 예문 묶음: 위 가는 선 + 제목, 예문은 가운데 정렬 둥근 카드(킥커 없이) */
.post-body .key-points { padding-top: 14px; border-top: 1px solid var(--border); }
.post-body .key-points > h4 { margin: 0 0 12px; font-size: 19px; font-weight: 600; color: var(--text); }
.post-body .key-points .ex-list > li { padding: 14px 16px; background: var(--accent-soft); border-radius: 10px; text-align: center; }
.post-body .key-points .ex-list > li::before, .post-body .key-points .ex-list > li > p.yomi::before, .post-body .key-points .ex-list > li > p:not([lang]):not(.yomi)::before { content: none; }
.post-body .key-points .ex-list > li > p + p { margin-top: 2px; }
.post-body .key-points .ex-list > li > p.yomi { font-size: 14px; }
.post-body .key-points > ul:not(.ex-list), .post-body .key-points > ol { padding-left: 1.4em; }

/* 읽기 순서 — 세타가야구 '目次': 왼쪽 위·오른쪽 아래 두 모서리만 꺾쇠 선, 항목 앞 요코하마시식 ▼ */
.post-body .toc-box { position: relative; padding: 16px 18px 10px; }
.post-body .toc-box::before, .post-body .toc-box::after { content: ""; position: absolute; width: 62%; height: 46%; pointer-events: none; }
.post-body .toc-box::before { left: 0; top: 0; border-top: 1px solid var(--text); border-left: 1px solid var(--text); }
.post-body .toc-box::after { right: 0; bottom: 0; border-right: 1px solid var(--text); border-bottom: 1px solid var(--text); }
.post-body .toc-box h4 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--text); }
.post-body .toc-box ol { list-style: none; padding: 0; }
.post-body .toc-box li { margin: 0; border-top: 1px solid var(--border); }
.post-body .toc-box li:first-child { border-top: 0; }
.post-body .toc-box a { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; min-height: 44px; font-size: 16px; line-height: 1.55; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.post-body .toc-box a::before { content: "▼"; flex: none; font-size: 11px; color: var(--accent); text-decoration: none; display: inline-block; }
.post-body .toc-box a:hover { color: var(--primary); }

/* 준비물 체크 — 요코하마시 '必要なもの': ▮ 표지 제목, 항목은 '1．' 번호 + 줄마다 점선 밑줄 */
.post-body .prep-box h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.post-body .prep-box h4::before { content: ""; flex: none; width: 5px; height: 15px; background: var(--accent); }
.post-body .prep-box ol { list-style: none; padding: 0; counter-reset: prep; }
.post-body .prep-box ol > li { counter-increment: prep; display: flex; gap: 4px; margin: 0; padding: 8px 0; border-bottom: 1px dashed var(--text-dim); }
.post-body .prep-box ol > li::before { content: counter(prep) "．"; flex: none; font: 700 16px/1.75 var(--font-number); }
.post-body .prep-grid { display: grid; gap: 0; }
.post-body .prep-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--text-dim); font-size: 16px; }
.post-body .prep-grid > div > span:last-child { font-family: var(--font-number); font-weight: 700; white-space: nowrap; }

/* 연습 단계 — 요코하마시 번호 소제목 '1．住民異動届': 번호 + '．' 와 제목이 한 줄, 제목 아래 점선 */
.post-body .step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px; align-items: start; }
.post-body .step + .step { margin-top: 18px; }
.post-body .step .num { padding-bottom: 6px; font: 700 18px/1.55 var(--font-number); color: var(--accent); white-space: nowrap; }
.post-body .step .num::after { content: "."; }
.post-body .step .body h4 { margin: 0; padding-bottom: 6px; border-bottom: 1px dashed var(--text-dim); font-size: 18px; line-height: 1.55; }
.post-body .step .body > * + * { margin-top: .6em; }

/* 주차별 계획 — JLPT 공식 수준 표: 왼쪽 연한 색 머리 칸(가운데 굵게) | 오른쪽 내용, 1px 회색 격자 */
.post-body .timeline { list-style: none; padding: 0; border: 1px solid var(--border); }
.post-body .timeline li { display: grid; grid-template-columns: 5.4em minmax(0, 1fr); margin: 0; }
.post-body .timeline li + li { margin-top: 0; border-top: 1px solid var(--border); }
.post-body .timeline .time { display: flex; align-items: center; justify-content: center; padding: 10px 6px; background: var(--row-head); border-right: 1px solid var(--border); font: 700 15px/1.4 var(--font-number); color: var(--primary); text-align: center; }
.post-body .timeline .event { padding: 10px 12px; }

/* 장단점 — 일본 학습지의 ○ / ✕ 표기: 테두리 칸 두 개, 제목 앞 큰 ○·✕ */
.post-body .pros-cons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.post-body .pros-cons > div { padding: 12px 16px 14px; border: 1px solid var(--border); }
.post-body .pros-cons h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.post-body .pros-cons h4::before { font-size: 20px; line-height: 1; font-weight: 700; }
.post-body .pros h4 { color: var(--ok); }
.post-body .pros h4::before { content: "○"; }
.post-body .cons h4 { color: var(--warn); }
.post-body .cons h4::before { content: "✕"; }

/* 수치 요약 — Bunpro 'Details': 상자 없이 2열, 작은 회색 라벨 위 · 값 아래, 묶음 위아래 가는 선 */
.post-body .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.post-body .stat .label { display: block; font-size: 13px; color: var(--text-dim); }
.post-body .stat .value { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; line-height: 1.45; }

/* 표 — JLPT 공식 'N1–N5 수준 요약' 표: 머리 줄과 첫 열을 연한 색 면으로, 1px 회색 격자, 머리 칸 가운데 */
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; background: var(--surface); }
.post-body caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.post-body thead th { background: var(--primary-soft); color: var(--text); font-weight: 600; text-align: center; white-space: nowrap; }
.post-body tbody th { background: var(--row-head); color: var(--primary); font-weight: 700; text-align: center; vertical-align: middle; }
.post-body :is(.scroll-x, .table-scroll) {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(32, 45, 49, .22), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(32, 45, 49, .22), transparent) right / 12px 100% no-repeat scroll;
}
.post-body :is(.scroll-x, .table-scroll) table { min-width: 560px; background: transparent; }
.post-body .scroll-x .table-scroll { overflow: visible; background: none; }

/* 4. 텍스트 강조 */
.post-body .lead { font-size: 19px; line-height: 1.75; }
.post-body .highlight { background: linear-gradient(transparent 55%, #f1dcb0 55%); padding: 0 1px; }
.post-body .pull-quote { margin: 1.6em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--primary); font-family: var(--font-title); font-size: 21px; line-height: 1.6; color: var(--primary); }
.post-body kbd, .post-body .kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); font: 600 .85em/1.5 var(--font-number); }

/* 5. 미디어 — 내용 h2 마다 한 장. 아직 채워지지 않은 이미지(data-img-pending, src 없음)는 자리째 숨긴다 */
.post-body figure { margin: 1.6em 0 0; }
.post-body figure img { width: 100%; height: auto; background: var(--accent-soft); }
.post-body figure:has(> img[data-img-pending]:not([src])) { display: none; }
.post-body figcaption { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.post-body .image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.post-body .image-grid figure { margin: 0; }
.post-body .before-after { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.post-body .before-after > div { position: relative; }
.post-body .before-after .label { position: absolute; top: 8px; left: 8px; padding: 0 8px; border-radius: 3px; background: var(--text); color: #fff; font-size: 13px; font-weight: 600; }
.post-body .video-embed { position: relative; aspect-ratio: 16 / 9; }
.post-body .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* CTA — 요코하마시 'このページへのお問合せ' 상자: 1px 테두리, 회색 머리 칸(제목) → 흰 몸통, 각진 청회색 버튼 */
.post-body .cta-box { border: 1px solid var(--border); background: var(--surface); }
.post-body .cta-box h4 { margin: 0; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 17px; font-weight: 600; color: var(--text); }
.post-body .cta-box > :not(h4) { margin-left: 16px; margin-right: 16px; }
.post-body .cta-box > p { margin-top: 12px; font-size: 16px; }
.post-body .cta-box > :last-child { margin-bottom: 16px; }
.post-body .cta-box .cta-button { margin-top: 12px; background: var(--accent); color: #fff; border-radius: 3px; }
.post-body .cta-box .cta-button::before { content: "›"; margin-right: 8px; font-size: 20px; line-height: 1; }
.post-body .cta-box .cta-button:hover { background: #1a3a4a; color: #fff; }
.post-body .cta-box .badge { margin-right: 6px; padding: 0 6px; background: var(--ok); color: #fff; font-size: 13px; border-radius: 2px; }

/* 7. 기타 */
/* 정답 접기 — 요코하마시 목차 링크의 ▼ 표기: 상자 없이 위아래 점선, ▶ 닫힘 / ▼ 열림 */
.post-body .spoiler { border-top: 1px dashed var(--text-dim); border-bottom: 1px dashed var(--text-dim); }
.post-body .spoiler > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--accent); list-style: none; }
.post-body .spoiler > summary::-webkit-details-marker { display: none; }
.post-body .spoiler > summary::before { content: "▶"; flex: none; font-size: 11px; }
.post-body .spoiler[open] > summary::before { content: "▼"; }
.post-body .spoiler > :not(summary) { margin: 0; padding: 0 0 14px 21px; }
.post-body .footnote { display: block; padding-left: 2.6em; text-indent: -2.6em; font-size: 15px; line-height: 1.7; color: var(--text-dim); }
.post-body .footnote .num { display: inline-block; min-width: 2.6em; text-indent: 0; color: var(--primary); font-size: 14px; }
.post-body .footnote + .footnote { margin-top: .3em; }
.post-body .footnote-ref { font: 700 .7em/0 var(--font-number); }
.post-body .price-tag { display: inline-flex; align-items: baseline; gap: 2px; padding: 0 6px; background: var(--primary-soft); border-radius: 3px; color: var(--primary); }
.post-body .price-tag .amount { font: 700 1.05em/1.5 var(--font-number); }
.post-body dl.faq dt { margin-top: 1em; padding-bottom: 4px; border-bottom: 1px dashed var(--text-dim); font-weight: 600; }
.post-body dl.faq dt::before { content: "Q. "; font-family: var(--font-number); color: var(--accent); }
.post-body dl.faq dd { margin: 6px 0 0; }
.post-body dl.faq dd::before { content: "A. "; font: 700 1em var(--font-number); color: var(--primary); }
.post-body .tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.post-body .tag-list .tag { display: inline-block; padding: 0 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; line-height: 1.9; }
.post-body .inline-ad { margin: 2em 0; }

/* CMS 기본 페이지(/privacy·/about·/contact) — 같은 학습 면 위에 */
.post-body.cms-default-page { max-width: var(--post-width); background: var(--surface); border-radius: var(--radius); padding: 24px 16px 32px; }
.cms-default-page > h1 { font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.45; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
@media (min-width: 600px) { .post-body.cms-default-page { padding: 36px 32px 44px; } }
@media (min-width: 960px) { .post-body.cms-default-page { padding: 48px max(40px, calc((var(--post-width) - var(--reading-width)) / 2)) 56px; } .cms-default-page > h1 { font-size: 36px; } }

/* ── 6. 푸터 ─────────────────────────────────────────── */
.colophon { background: var(--bg-deep); margin-top: 8px; }
.colophon__in { max-width: var(--container); margin: 0 auto; padding: 28px 16px 36px; display: grid; gap: 14px; font-size: 15px; }
.colophon__name { font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.colophon__id p { margin-top: 6px; max-width: 40em; }
.colophon__links { display: flex; flex-wrap: wrap; gap: 0 4px; }
.colophon__links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px 0 0; color: var(--text); font-weight: 600; }
.colophon__note { color: var(--text); max-width: 46em; font-size: 14px; }
.colophon__copy { font-size: 13px; color: var(--text); }

/* ── 7. 반응형 ───────────────────────────────────────── */
/* 720px 이하: 표 → 행 카드 (site.js 가 thead 라벨을 td[data-label] 로 복사하고 .is-stacked 를 붙였을 때만) */
@media (max-width: 720px) {
  .post-body :is(.scroll-x, .table-scroll).is-stacked { overflow: visible; background: none; }
  .post-body table.is-stacked, .post-body table.is-stacked :is(tbody, tr, th, td) { display: block; min-width: 0; width: auto; }
  .post-body table.is-stacked { background: none; }
  .post-body table.is-stacked caption { display: block; }
  .post-body table.is-stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* JLPT 표 모양 그대로 카드로: 첫 칸 = 연한 색 머리 띠(가운데 굵게), 칸 사이 1px 회색 선 */
  .post-body table.is-stacked tbody tr { border: 1px solid var(--border); background: var(--surface); }
  .post-body table.is-stacked tbody tr + tr { margin-top: 10px; }
  .post-body table.is-stacked tbody :is(th, td) { border: 0; padding: 8px 14px; background: none; text-align: left; }
  .post-body table.is-stacked tbody > tr > :first-child:not([data-label]) { padding: 8px 14px; background: var(--primary-soft); border-bottom: 1px solid var(--border); text-align: center; font-size: 17px; font-weight: 700; color: var(--primary); }
  /* 칸 안에 <br>·여러 요소가 있어도 깨지지 않게 grid 가 아닌 block + 내어쓴 라벨 */
  .post-body table.is-stacked td[data-label] { position: relative; padding-left: calc(5.6em + 24px); border-top: 1px solid var(--border); font-size: 15px; }
  .post-body table.is-stacked tbody tr > :first-child + td[data-label], .post-body table.is-stacked tbody tr > td[data-label]:first-child { border-top: 0; }
  .post-body table.is-stacked td[data-label]::before { content: attr(data-label); position: absolute; left: 14px; top: 9px; width: 5.6em; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--text-dim); word-break: keep-all; }
}

@media (min-width: 480px) {
  .levels__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scenes__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 600px) {
  .page { padding: 16px 20px 40px; }
  .sheet { padding: 26px 24px; }
  .intro { padding: 28px 8px 30px; }
  .intro__title { font-size: 34px; }
  .lesson-sheet { padding: 8px 32px 32px; }
  .lesson-head__title { font-size: 34px; }
  .lesson--thumb { grid-template-columns: minmax(0, 1fr) 140px; gap: 18px; }
  .lesson__thumb img { width: 140px; height: 105px; }
  .trail li:last-child:not(:first-child) { display: flex; }
  .author__name { min-height: 0; }
  .post-body .pros-cons, .post-body .before-after { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-body .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-body .stats-grid > .stat:last-child:nth-child(odd) { grid-column: auto; }
  .author { padding: 24px; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 18px; }
  .author__mono { float: none; margin: 0; width: 60px; height: 60px; }
  .author__body p { clear: none; }
  .desk__in { padding: 0 20px; }
}

@media (min-width: 768px) {
  .post-body { font-size: 18px; line-height: 1.85; }
  .post-body h2 { font-size: 25px; }
  .post-body h3 { font-size: 20px; }
  .post-body .vocab-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .post-body blockquote p[lang|="ja"], .post-body .ex-list > li > p[lang|="ja"] { font-size: 22px; }
}

@media (min-width: 840px) {
  .spread { grid-template-columns: 5fr 6fr; }
  .spread__left { padding: 32px 32px 32px 32px; }
  .spread__right { padding: 32px; border-top: 0; border-left: 1px dashed rgba(98, 66, 21, .5); justify-content: center; }
  .spread__title { font-size: 28px; }
  .lesson-list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .lesson-list--grid > .lesson:nth-child(2) { border-top: 0; }
  .br-wide { display: inline; }
}

@media (min-width: 960px) {
  .js .menu-btn { display: none; }
  .js .desk-nav, .desk-nav { display: block; flex: 0 1 auto; }
  .desk__in { flex-wrap: nowrap; min-height: 68px; }
  .desk-nav ul { display: flex; gap: 2px; padding: 0; }
  .desk-nav a { background: none; min-height: 44px; padding: 0 12px; font-size: 15px; white-space: nowrap; }
  .desk-nav a:hover { background: rgba(255, 255, 255, .55); }
  .desk-nav a[aria-current="page"] { background: var(--surface); box-shadow: inset 0 -3px 0 var(--primary); }
  .intro { padding: 44px 8px 40px; }
  .intro__title { font-size: 40px; }
  .levels__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .scenes__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sheet { padding: 30px 32px; margin-bottom: 16px; }
  .lesson-sheet { padding: 12px 40px 40px; margin-bottom: 16px; }
  .lesson-head__title { font-size: 40px; }
  .list-head { padding: 16px 8px 22px; }
  .list-head__title { font-size: 36px; }
}

@media (min-width: 1024px) {
  /* 표·단어 카드는 학습 면(960px) 안에서 읽기 폭보다 넓게 */
  /* 읽기 폭 밖으로 빼던 표·단어 카드(-80px)는 본문 넘침 검사에 걸려 읽기 폭 안으로 (2026-10-06) */
  .lesson-list--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lesson-list--grid > .lesson:nth-child(3) { border-top: 0; }
  .colophon__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 48px; padding: 36px 24px 44px; }
  .colophon__links, .colophon__note, .colophon__copy { grid-column: 2; }
  .colophon__id { grid-row: 1 / span 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .desk, .colophon, .ad-slot, .next-lesson, .related, .menu-btn { display: none !important; }
  body { background: #fff; }
  .lesson-sheet { padding: 0; }
}

/* 일본어 문장: 한국어용 keep-all 이 문장 전체를 한 단어로 봐서 "す。"만 떨어졌다 — 일본어 줄바꿈 규칙(금칙)으로 (2026-10-06) */
[lang="ja"], [lang="ja"] * { word-break: normal; line-break: strict; overflow-wrap: anywhere; }
