/* ════════════════════════════════════════════════════════════════════════
   말칸 (malkan-lang) — 워크북 한 페이지와 진도 스탬프
   위쪽 절반은 공통 뼈대(kit.css) 그대로. 아래쪽이 이 벌의 생김새다.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 기본 ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img, video { max-width: 100%; height: auto; }

img { -webkit-user-drag: none; user-select: none; }

.frame { display: block; }

/* ── 초점 ─────────────────────────────────────────────────────────── */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: .75rem 1rem; background: Canvas; color: CanvasText;
}
.skip-link:focus { left: 0; }

/* ── 터치 영역 ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .site-header a, .site-header button,
  .drawer a, .drawer button,
  .dots button, .pager button, .tab {
    min-width: 44px; min-height: 44px;
  }
}

/* ── 가로 넘침 ───────────────────────────────────────────────────── */
.scroll-x { overflow-x: auto; position: relative; -webkit-overflow-scrolling: touch; }

.clip { overflow: clip; }

/* ── 무JS 완성본 ─────────────────────────────────────────────────── */
.acc-item .acc-panel { display: block; }
.js .acc-item .acc-panel { display: none; }
.js .acc-item.open .acc-panel { display: block; }

.js [role="tabpanel"][hidden] { display: none; }
[role="tabpanel"][hidden] { display: block; }

.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

html:not(.js) .js-only { display: none !important; }

:where([hidden]):not([role="tabpanel"]) { display: none !important; }

/* ── 모션 끔 ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── 모바일 서랍 ─────────────────────────────────────────────────── */
.menu-btn { display: none; }
@media (max-width: 767px) { .menu-btn { display: inline-flex; } }

.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px);
  transform: translateX(100%); transition: transform .28s ease;
  z-index: 60; overflow-y: auto;
  visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }

.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgb(0 0 0 / .45);
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }

@media (min-width: 768px) { .drawer, .scrim { display: none; } }

/* ── 토스트 ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0;
  z-index: 80; pointer-events: none;
  opacity: 0; transition: opacity .25s ease, translate .25s ease;
}
.toast.show { opacity: 1; translate: -50% -6px; }

/* ── 폼 ─────────────────────────────────────────────────────────── */
.agree input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agree input:focus-visible + label .box { outline: 2px solid currentColor; outline-offset: 2px; }

.spinner {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.125em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: kit-spin .7s linear infinite;
}
@keyframes kit-spin { to { rotate: 360deg; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ── 구획 리듬 ───────────────────────────────────────────────────── */
.section { padding-block: calc(var(--section, 96px) / 2); }
.section-lead { padding-top: var(--section, 96px); }
.section-last { padding-bottom: var(--section, 96px); }


/* ════════════════════════════════════════════════════════════════════════
   여기부터 말칸의 생김새
   ════════════════════════════════════════════════════════════════════════ */

/* ── 토큰 ─────────────────────────────────────────────────────────
   색은 00-디자인보드.png 의 01/COLOR 세 칸에서 그대로 받아 적었다.
   흰 글자를 얹는 면(단추·채운 스탬프)만 --primary-solid 로 한 단 낮췄다 —
   #FF7452 위의 흰 글자는 2.67:1 로 대비 하한에 못 미친다. */
:root {
  --ground:        #FFF5E7;   /* Ground */
  --sheet:         #FFFFFF;
  --ink:           #214EAB;   /* Ink */
  --ink-soft:      #4C6BA8;
  --primary:       #FF7452;   /* Primary — 선·점·강조 */
  --primary-solid: #D0451B;   /* 흰 글자를 얹는 면 전용 */
  --primary-wash:  #FFE9E0;
  --rule:          rgb(33 78 171 / .22);
  --rule-soft:     rgb(33 78 171 / .12);

  --sans: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --section: 84px;
  --pad: clamp(20px, 3.2vw, 44px);
  --r-sheet: 14px;
  --r-btn: 4px;
}

html { color-scheme: light; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

a { color: inherit; }

/* 활자 — 디자인보드 02/TYPE: Display 800 / Body 500 / Meta Mono */
.display {
  font-weight: 800;
  font-size: clamp(2rem, 5.2vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: -.028em;
  margin: 0;
}
.h2 {
  font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  margin: 0;
}
.h3 {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -.01em;
  margin: 0;
}
.meta {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.lead { font-size: 1.0625rem; color: var(--ink-soft); margin: 14px 0 0; max-width: 46ch; }
.fineprint { font-size: .8125rem; color: var(--ink-soft); margin: 12px 0 0; max-width: 52ch; }
.note { font-size: .8125rem; color: var(--ink-soft); margin: 18px 0 0; }
.note-scroll { display: none; }
@media (max-width: 767px) { .note-scroll { display: block; } }

/* ── 헤더 ─────────────────────────────────────────────────────────
   01-home.png: 크림 바탕에 「말칸」 좌측, 오른쪽에 작은 내비, 아래 파란 실선 한 줄 */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}
.site-header.is-stuck { border-bottom-color: var(--ink); }
.header-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  font-weight: 800; font-size: 1.3125rem; letter-spacing: -.03em;
  text-decoration: none; color: var(--ink); line-height: 1;
}
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  font-size: .875rem; font-weight: 600; letter-spacing: -.01em;
  padding: 8px 12px; border-radius: var(--r-btn);
  transition: color .16s ease, background-color .16s ease;
}
.nav a:hover { color: var(--ink); background: var(--rule-soft); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.header-cta {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em;
  text-decoration: none; color: #fff; background: var(--primary-solid);
  padding: 10px 16px; border-radius: var(--r-btn); white-space: nowrap;
  transition: background-color .16s ease;
}
.header-cta:hover { background: #B93B15; }
.menu-btn {
  margin-left: auto; align-items: center; justify-content: center;
  background: none; border: 1.5px solid var(--ink); border-radius: var(--r-btn);
  color: var(--ink); cursor: pointer; padding: 0;
}
.menu-bar { position: relative; display: block; width: 18px; height: 1.5px; background: currentColor; }
.menu-bar::before, .menu-bar::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor;
}
.menu-bar::before { top: -6px; }
.menu-bar::after { top: 6px; }

@media (max-width: 1023px) { .nav a { padding: 8px 8px; font-size: .8125rem; } }
@media (max-width: 767px) { .nav, .header-cta { display: none; } }

/* ── 서랍 ─────────────────────────────────────────────────────── */
.drawer { background: var(--sheet); border-left: 2px solid var(--ink); padding: 18px 20px 28px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.drawer-close {
  background: none; border: 1.5px solid var(--ink); border-radius: var(--r-btn);
  color: var(--ink); font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em;
  cursor: pointer; padding: 0 10px;
}
.drawer-nav { display: flex; flex-direction: column; margin-top: 8px; }
.drawer-nav a {
  display: flex; align-items: center; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 1.0625rem; padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.drawer-nav a[aria-current="page"] { color: var(--primary-solid); }
.drawer-cta {
  display: flex; align-items: center; justify-content: center;
  margin-top: 20px; background: var(--primary-solid); color: #fff;
  text-decoration: none; border-radius: var(--r-btn);
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .06em; padding: 12px;
}
.drawer-tel { margin: 14px 0 0; font-size: .875rem; }
.drawer-tel a { color: var(--ink-soft); }

/* ── 워크북 판(PrimaryCanvas) ─────────────────────────────────────
   01-home.png 의 주인공. 크림 바탕 위에 파란 테두리 흰 판 한 장.
   판 안쪽의 세로 실선이 이 벌의 정렬축이다. */
.sheet {
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: var(--r-sheet);
  overflow: clip;
}
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); }
.sheet-col { padding: var(--pad); }
.sheet-col + .sheet-col { border-left: 1px solid var(--rule); }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--pad); border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; color: var(--ink-soft);
}
.sheet-step b { color: var(--ink); font-weight: 500; }
.sheet-body { padding: var(--pad); }

@media (max-width: 900px) {
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-col + .sheet-col { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ── 오늘의 한 칸(홈 왼쪽 열) ───────────────────────────────────── */
.sheet-left .meta { margin-bottom: 22px; }
.today-line { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--rule); }
.quote { font-size: clamp(1.0625rem, 2vw, 1.25rem); font-weight: 700; margin: 0; letter-spacing: -.015em; }
.quote-en { font-family: var(--mono); font-size: 1rem; color: var(--primary-solid); margin: 6px 0 0; letter-spacing: -.01em; }
.quote-say { font-size: .875rem; color: var(--ink-soft); margin: 6px 0 0; }
.quote-say .meta { display: inline; margin-right: 8px; }

/* ── 단추 ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: .9375rem; letter-spacing: -.01em;
  padding: 13px 22px; border-radius: var(--r-btn); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary-solid); color: #fff; border-color: var(--primary-solid); }
.btn-primary:hover { background: #B93B15; border-color: #B93B15; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--rule-soft); }
.btn-mark { background: transparent; color: var(--ink); border-color: var(--rule); font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; }
.btn-mark[aria-pressed="true"] { background: var(--primary-wash); border-color: var(--primary-solid); color: var(--primary-solid); }
.btn-wide { width: 100%; }
.btn[aria-disabled="true"] { opacity: .7; pointer-events: none; }
.btn-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.sheet-left .btn-primary { margin-top: 30px; width: 100%; max-width: 400px; }

.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary-solid);
  font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}

/* ── 견본 사진 ───────────────────────────────────────────────────
   사진은 장식이 아니라 「오늘의 한 칸이 어디에 있는지」를 보여 주는 견본이다.
   언제나 액자와 모노 캡션을 달고 본문 옆에 놓인다. 배경으로 깔지 않는다. */
.figure { margin: 0; }
.figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--rule-soft);
}
.cap { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; color: var(--ink-soft); margin: 10px 0 0; }
.figure-wide img { max-width: 552px; }
.figure-mini { width: 180px; flex: none; }
.figure-mini img { max-width: 180px; }

/* ── 진도 스탬프(StatePanel) ──────────────────────────────────────
   이 벌의 시각 장치. 오늘 어디까지 했고 무엇이 남았는지를 홈 첫 화면에서 읽는다.
   상태는 색만으로 말하지 않는다 — 채움/점선/빈 칸의 모양과 아래 글줄이 함께 말한다. */
.state-panel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.stamps { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.stamp {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--mono); font-size: .75rem; font-weight: 500;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
}
.stamp.is-done { background: var(--primary-solid); border-color: var(--primary-solid); color: #fff; }
.stamp.is-today { border: 2px dashed var(--primary-solid); background: var(--primary-wash); color: var(--ink); }
.stamp-mini { width: 16px; height: 16px; border-width: 1.5px; }
.stamp-mini.is-today { border-width: 1.5px; }

/* 시그니처 한 건 — 칸을 마치면 도장이 「내려앉는다」. 그 밖의 연출은 두지 않는다. */
.stamp.just-stamped { animation: stamp-drop .26s cubic-bezier(.2, .8, .3, 1); }
@keyframes stamp-drop {
  from { transform: scale(1.55); opacity: .25; }
  to   { transform: scale(1);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.just-stamped { animation: none; }
}

.stamp-line { font-size: .875rem; font-weight: 700; margin: 16px 0 0; }
.legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-soft); }

/* ── 상태 표시(마크) — 색 + 모양 + 글자 세 겹 ─────────────────── */
.mark { font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; white-space: nowrap; }
.mark-done { color: var(--primary-solid); }
.mark-today { color: var(--ink); }
.mark-todo { color: var(--ink-soft); }

/* ── 세 걸음 목록(ContextIndex) ──────────────────────────────────
   디자인보드 03/ACTION 의 실선 구분 행. 카드로 만들지 않는다. */
.index-list { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.index-row { border-bottom: 1px solid var(--rule); }
.index-row > a {
  display: grid; grid-template-columns: 46px minmax(0, 150px) minmax(0, 1fr) 24px;
  align-items: baseline; gap: 8px 16px;
  padding: 18px 6px; text-decoration: none; color: var(--ink);
  transition: background-color .16s ease, padding-inline-start .16s ease;
}
.index-row > a:hover { background: var(--primary-wash); padding-inline-start: 14px; }
.num { font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); }
.index-row .label { font-weight: 800; font-size: 1.125rem; letter-spacing: -.02em; }
.index-row .desc { font-size: .875rem; color: var(--ink-soft); }
.index-row .arrow { justify-self: end; color: var(--primary-solid); font-size: 1rem; }

@media (max-width: 640px) {
  /* 자동 배치에 맡기면 화살표가 셋째 줄 왼쪽으로 떨어진다 — 넷을 모두 못 박는다 */
  .index-row > a { grid-template-columns: 38px minmax(0, 1fr) 24px; }
  .index-row .num { grid-column: 1; grid-row: 1; }
  .index-row .label { grid-column: 2; grid-row: 1; }
  .index-row .desc { grid-column: 2; grid-row: 2; }
  .index-row .arrow { grid-column: 3; grid-row: 1; }
}

/* ── 이번 주 표 ────────────────────────────────────────────────── */
.week { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 560px; }
.week th, .week td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.week thead th { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; color: var(--ink-soft); font-weight: 500; border-bottom: 1px solid var(--ink); }
.week tbody th { font-family: var(--mono); font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.week .en { font-family: var(--mono); color: var(--ink); }
.week tr[data-today] td, .week tr[data-today] th { background: var(--primary-wash); }

/* ── 과업 순서 바(AdaptiveNav — 모바일 전용) ─────────────────────
   06-mobile.png: 모바일은 PC 축소가 아니라 「1 / 3」로 세는 한 과업 한 화면이다. */
.seq { display: none; }
@media (max-width: 767px) {
  .seq {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 10px var(--pad); border-bottom: 1px solid var(--rule);
    background: var(--primary-wash);
  }
  .seq-count { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; color: var(--primary-solid); margin-right: 6px; }
  .seq a {
    text-decoration: none; color: var(--ink-soft); font-size: .8125rem; font-weight: 700;
    padding: 10px 10px; border-radius: var(--r-btn); min-height: 44px; display: inline-flex; align-items: center;
  }
  .seq a[aria-current="step"] { color: #fff; background: var(--primary-solid); }
}

/* ── 오늘의 문장(듣기) ─────────────────────────────────────────── */
.listen-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(24px, 4vw, 48px); margin-top: 28px; }
@media (max-width: 900px) { .listen-top { grid-template-columns: 1fr; } }

.sentence { border-top: 1px solid var(--ink); padding-top: 20px; }
.sentence-en { font-family: var(--mono); font-size: clamp(1.125rem, 2.4vw, 1.5rem); font-weight: 500; margin: 12px 0 0; letter-spacing: -.02em; }
.sentence-ko { font-size: 1.0625rem; font-weight: 700; margin: 8px 0 0; }
.sentence-say { font-size: .875rem; color: var(--ink-soft); margin: 6px 0 0; }
.sentence-say .meta { display: inline; margin-right: 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sound-note { font-size: .8125rem; color: var(--ink-soft); margin: 12px 0 0; }

.cells-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--ink); }
@media (max-width: 640px) { .cells-head { flex-direction: column; } .figure-mini { width: 100%; } .figure-mini img { max-width: 300px; } }

.cells { list-style: none; margin: 20px 0 0; padding: 0; }
.cell { border-bottom: 1px solid var(--rule); padding: 22px 0; }
.cell-head { display: flex; align-items: baseline; gap: 14px; }
.cell-en { font-family: var(--mono); font-size: 1.125rem; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
.cell p { margin: 8px 0 0; font-size: .875rem; color: var(--ink-soft); }
.cell p .meta { display: inline; margin-right: 8px; }
.cell-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cell-state { font-size: .8125rem; }
.cell.is-marked { background: var(--primary-wash); border-radius: 8px; padding-inline: 14px; }

/* ── 고르기 + 상세(말하기) ───────────────────────────────────────
   「선택의 근거를 한 화면에」 — 고른 칸의 근거가 같은 화면 오른쪽에 선다.
   덮개(모달)로 가리지 않는다. */
.mic { margin-top: 28px; padding: 20px; border: 1px solid var(--rule); border-radius: 8px; background: var(--ground); }
.mic p { margin: 10px 0 0; font-size: .875rem; color: var(--ink-soft); max-width: 62ch; }
.mic .btn { margin-top: 16px; }
.mic-state { font-weight: 700; color: var(--ink) !important; }

.pick-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 3.4vw, 44px); margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--ink); }
@media (max-width: 900px) { .pick-grid { grid-template-columns: 1fr; } }

.pick-list { list-style: none; margin: 18px 0 0; padding: 0; }
.pick-list li { border-bottom: 1px solid var(--rule); }
.pick-row {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; align-items: baseline; gap: 4px 12px;
  padding: 16px 6px; color: var(--ink); font: inherit;
  transition: background-color .16s ease, padding-inline-start .16s ease;
}
.pick-row:hover { background: var(--rule-soft); padding-inline-start: 14px; }
.pick-label { font-family: var(--mono); font-size: 1rem; font-weight: 500; letter-spacing: -.02em; }
.pick-sub { grid-column: 2; font-size: .8125rem; color: var(--ink-soft); font-family: var(--sans); }
.pick-row .arrow { grid-row: 1; grid-column: 3; justify-self: end; color: var(--primary-solid); }
.pick-row[aria-pressed="true"] { background: var(--primary-wash); box-shadow: inset 3px 0 0 var(--primary-solid); }
.pick-row[aria-pressed="true"] .pick-label { color: var(--primary-solid); }

.detail { border: 1px solid var(--ink); border-radius: 8px; padding: 22px; margin-top: 18px; }
.detail-card + .detail-card { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rule); }
.js .detail-card.is-off { display: none; }
.detail-en { font-family: var(--mono); font-size: 1.25rem; font-weight: 500; margin: 10px 0 0; letter-spacing: -.02em; }
.detail dl { margin: 16px 0 0; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px 14px; font-size: .875rem; }
.detail dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; color: var(--ink-soft); padding-top: 3px; }
.detail dd { margin: 0; }
.detail-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.detail-state { font-size: .8125rem; font-weight: 700; margin: 14px 0 0; }

/* ── 진행 레일(복습) ──────────────────────────────────────────────
   02-페이지시안 03면: 파란 실선 위에 주황 원 넷. 날짜와 순서로 읽는 장치. */
.rail { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; position: relative; }
.rail::before { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: var(--ink); }
.rail::after { content: ""; position: absolute; right: 5px; top: 17px; width: 9px; height: 9px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); rotate: 45deg; }
.rail-node { position: relative; text-align: center; padding-top: 0; }
.rail-dot {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--mono); font-size: .8125rem;
  border: 2px solid var(--ink); background: var(--sheet); color: var(--ink);
}
.rail-node.is-done .rail-dot { background: var(--primary-solid); border-color: var(--primary-solid); color: #fff; }
.rail-node.is-now .rail-dot { border: 2px dashed var(--primary-solid); background: var(--primary-wash); }
.rail-label { display: block; font-weight: 800; font-size: .9375rem; margin-top: 10px; }
.rail-state { display: block; font-family: var(--mono); font-size: .625rem; letter-spacing: .1em; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 560px) {
  .rail { grid-auto-flow: row; grid-auto-columns: auto; gap: 2px; }
  .rail::before { left: 21px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; }
  .rail::after { right: auto; left: 17px; top: auto; bottom: 4px; rotate: 135deg; }
  .rail-node { display: grid; grid-template-columns: 44px minmax(0, 1fr); text-align: left; gap: 4px 14px; align-items: center; padding: 6px 0; }
  .rail-label { margin-top: 0; }
  .rail-state { grid-column: 2; }
}

/* ── 칸 찾기(검색·거르기 — 상태 보존) ─────────────────────────── */
.acc-heading { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--ink); }
.finder { margin-top: 20px; }
.btn-next { margin-top: 30px; }
.finder-row { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.control {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--sheet); border: 1.5px solid var(--rule); border-radius: var(--r-btn);
  padding: 12px 14px; width: 100%; min-height: 48px;
}
.control:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 2px var(--primary-wash); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .06em;
  background: transparent; border: 1.5px solid var(--rule); border-radius: 999px;
  color: var(--ink-soft); padding: 9px 16px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.finder-count { font-size: .8125rem; font-weight: 700; margin: 14px 0 0; }
.finder-kept { font-size: .8125rem; color: var(--ink-soft); margin: 4px 0 0; }
.empty { margin: 24px 0 0; padding: 20px; border: 1px dashed var(--rule); border-radius: 8px; font-size: .9375rem; }

/* ── 아코디언(지난 칸) ───────────────────────────────────────── */
.acc { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.acc-item { border-bottom: 1px solid var(--rule); }
.acc-h { margin: 0; font-size: 1rem; }
.acc-trigger {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
  display: grid; grid-template-columns: 40px 74px minmax(0, 1fr) auto 20px; align-items: center; gap: 4px 12px;
  padding: 16px 4px;
  transition: background-color .16s ease;
}
.acc-trigger:hover { background: var(--rule-soft); }
.acc-date { font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); }
.acc-title { font-family: var(--mono); font-size: .9375rem; font-weight: 500; letter-spacing: -.02em; }
.acc-plus { position: relative; width: 14px; height: 14px; justify-self: end; }
.acc-plus::before, .acc-plus::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  background: var(--primary-solid); transition: transform .2s ease;
}
.acc-plus::before { width: 14px; height: 2px; }
.acc-plus::after { width: 2px; height: 14px; }
.acc-item.open .acc-plus::after { transform: scaleY(0); }
.acc-panel { padding: 4px 4px 22px 56px; }
.acc-panel p { margin: 6px 0 0; font-size: .875rem; color: var(--ink-soft); }
.acc-panel p .meta { display: inline; margin-right: 8px; }
.acc-panel .btn { margin-top: 14px; }
@media (max-width: 640px) {
  .acc-trigger { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .acc-date { grid-column: 2; grid-row: 1; }
  .acc-title { grid-column: 2; grid-row: 2; }
  .acc-trigger .mark { grid-column: 2; grid-row: 3; justify-self: start; }
  .acc-plus { grid-column: 3; grid-row: 1 / 4; }
  .acc-panel { padding-left: 34px; }
}

/* ── 완료 확인(CompletionAction) ────────────────────────────────
   02-페이지시안 넷째 판: 칸 두 개와 전폭 「완료하기 →」.
   판의 라벨은 「04 / 듣기」로 잘못 찍혀 있었다 — 내용을 따라 완료 면으로 세웠다. */
/* 완료 면은 홈과 같은 세로 실선 축을 그대로 쓴다 — 왼쪽 결과, 오른쪽 남은 행동. */
.done-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
  margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--ink);
}
.done-grid > * + * { border-left: 1px solid var(--rule); padding-left: clamp(24px, 3.4vw, 48px); }
@media (max-width: 900px) {
  .done-grid { grid-template-columns: 1fr; }
  .done-grid > * + * { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 28px; }
}

.result { margin-top: 0; }
.result-list { margin: 16px 0 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 18px; font-size: .9375rem; }
.result-list > div { display: contents; }
.result-list dt { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; color: var(--ink-soft); padding-top: 5px; }
.result-list dd { margin: 0; font-weight: 700; }
.result-list dd[lang="en"] { font-family: var(--mono); font-weight: 500; }
.result .state-panel { margin-top: 26px; }

.done-form { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.field label { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; color: var(--ink-soft); }
.field.invalid .control { border-color: var(--primary-solid); }
.err { display: none; margin: 0; font-size: .8125rem; font-weight: 700; color: var(--primary-solid); }
.field.invalid .err, .agree.invalid .err { display: block; }
.agree { position: relative; margin-top: 22px; }
.agree label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .875rem; cursor: pointer; }
.agree .box { width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 3px; display: block; margin-top: 2px; }
.agree input:checked + label .box { background: var(--primary-solid); border-color: var(--primary-solid); }
.agree input:checked + label .box::after { content: ""; display: block; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin: 2px auto 0; }
.agree .err { margin-top: 6px; }
.done-form .btn-wide { margin-top: 26px; }
.no-js-note { font-size: .875rem; margin: 16px 0 0; }
.js .no-js-note { display: none; }

.done-panel { margin-top: 30px; padding: 22px; border: 1px dashed var(--rule); border-radius: 8px; }
.done-panel p { margin: 0; font-size: .9375rem; }
.done-panel .stamp { margin-bottom: 12px; }

/* ── 다음 걸음 ────────────────────────────────────────────────── */
.stepnav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 26px; }
.stepnav a {
  display: grid; gap: 2px; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--r-btn);
  padding: 12px 20px; min-width: 190px; flex: 1 1 190px;
  transition: background-color .16s ease;
}
.stepnav a:hover { background: var(--sheet); }
.stepnav-next { text-align: right; }
.stepnav a span:last-child { font-weight: 800; font-size: 1rem; }

/* ── 푸터 ─────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--ink); margin-top: 20px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 56px; }
.footer-brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; }
.footer-nav a { text-decoration: none; color: var(--ink-soft); font-size: .875rem; font-weight: 600; padding: 6px 0; }
.footer-nav a:hover { color: var(--ink); }
.footer-biz { font-style: normal; font-size: .8125rem; color: var(--ink-soft); margin-top: 20px; line-height: 1.9; }
.footer-biz a { color: var(--ink-soft); }
.footer-note { font-size: .8125rem; color: var(--ink-soft); margin: 14px 0 0; max-width: 64ch; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 0; }
.footer-legal a { font-size: .8125rem; color: var(--ink-soft); }
.footer-copy { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; color: var(--ink-soft); margin: 20px 0 0; }

/* ── 토스트 겉모습 ────────────────────────────────────────────── */
.toast {
  background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: var(--r-btn);
  font-size: .875rem; font-weight: 600;
  max-width: min(92vw, 460px); text-align: center;
}

/* ── 한국어 라벨의 활자 ────────────────────────────────────────
   넓은 자간의 모노 라벨은 라틴·숫자 라벨의 문법이다(LESSON 07 · 01 / 듣기 · 08.05).
   한국어 라벨까지 같이 벌리면 「오 늘 의  한  칸」처럼 읽혀 읽는 속도가 떨어진다.
   그래서 한국어가 들어가는 라벨만 본문 활자로 되돌린다.
   ※ 이 묶음은 스타일시트 끝에 두어야 한다 — 앞에 두면 각 부품의 뒤쪽 규칙에 진다. */
.cap, .mark, .chip, .btn-mark, .header-cta, .drawer-cta, .drawer-close,
.week thead th, .rail-state, .field label, .finder-row label,
.detail dt, .result-list dt, .stepnav .meta,
.sentence .meta, .detail-card .meta, .mic .meta, .result .meta,
.quote-say .meta, .sentence-say .meta, .cell p .meta, .acc-panel p .meta {
  font-family: var(--sans);
  letter-spacing: .005em;
  font-weight: 600;
  font-size: .75rem;
}
.header-cta, .drawer-cta, .chip, .btn-mark, .drawer-close { font-size: .8125rem; font-weight: 700; }
.rail-state { font-size: .6875rem; }
.week thead th { font-weight: 700; }

/* ── 모바일 마무리 ────────────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --section: 56px; }
  button, .btn { min-height: 46px; }
  .sheet { border-radius: 10px; }
  .stepnav a { min-width: 0; }
  .listen-top { margin-top: 20px; }
}
