:root {
  --path-ink: #241c18;
  --path-muted: #756a63;
  --path-paper: #fffaf4;
  --path-card: #fffdf9;
  --path-line: #eadfd4;
  --path-accent: #df6247;
  --path-accent-dark: #b94732;
  --path-green: #52715f;
  --path-soft: #f7e8dc;
  --path-shadow: 0 24px 70px rgba(104, 69, 48, 0.12);
  --site-nav-height: 68px;
  --kana-print-font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --kana-hand-font: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 84% 8%, rgba(225, 137, 99, .16), transparent 28rem), var(--path-paper); color: var(--path-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 100; top: .75rem; left: .75rem; background: var(--path-ink); color: white; padding: .65rem .9rem; border-radius: .6rem; }

.site-global-nav { position: sticky; top: 0; z-index: 50; width: 100%; min-height: var(--site-nav-height); background: rgba(255,250,244,.9); border-bottom: 1px solid var(--path-line); backdrop-filter: blur(18px); }
.site-nav-inner { width: min(1180px, calc(100% - 2rem)); min-height: var(--site-nav-height); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1.2rem, 4vw, 3.5rem); align-items: center; }
.site-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--path-ink); text-decoration: none; font-weight: 820; letter-spacing: -.035em; white-space: nowrap; }
.site-brand img { width: 2rem; height: 2rem; border-radius: 50%; box-shadow: 0 7px 18px rgba(185,71,50,.2); }
.site-brand span { font-size: 1.05rem; }
.site-brand small { color: var(--path-accent-dark); font-size: .7rem; letter-spacing: .08em; }
.site-nav-steps { display: flex; align-items: center; justify-content: center; min-width: 0; }
.site-nav-steps a { display: inline-flex; align-items: center; gap: .45rem; color: var(--path-muted); text-decoration: none; font-size: .84rem; font-weight: 680; white-space: nowrap; transition: color 180ms ease, transform 180ms ease; }
.site-nav-steps a:hover { color: var(--path-ink); transform: translateY(-1px); }
.site-nav-steps a:active { transform: translateY(1px); }
.site-nav-steps b { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid var(--path-line); border-radius: 50%; background: var(--path-card); font-size: .7rem; }
.site-nav-steps a.is-active { color: var(--path-accent-dark); }
.site-nav-steps a.is-active b { border-color: var(--path-accent); background: var(--path-accent); color: white; }
.site-nav-steps i { width: clamp(1rem, 3vw, 3rem); height: 1px; margin: 0 .7rem; background: var(--path-line); }
.site-nav-tools { display: flex; align-items: center; gap: .65rem; }
.site-language select { border: 0; background: transparent; color: var(--path-muted); padding: .45rem .2rem; cursor: pointer; }
.site-nav-tools .nav-account-btn { cursor: pointer; }

.learning-page { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.8rem, 7vw, 5.8rem) 0 6rem; }
.stage-intro { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.stage-kicker { margin: 0 0 .8rem; color: var(--path-accent-dark); font-size: .76rem; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.stage-intro h1 { max-width: 12ch; margin: 0; font-family: "Songti SC", "Yu Mincho", serif; font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -.065em; text-wrap: balance; }
.stage-intro > div > p:last-child { max-width: 42rem; margin: 1.25rem 0 0; color: var(--path-muted); font-size: 1.05rem; line-height: 1.8; text-wrap: pretty; }
.home-next { min-height: 22rem; align-items: center; padding-block: clamp(2rem, 5vw, 4.5rem); }
.home-next h1 { max-width: 14ch; }
.home-next .stage-next-copy { max-width: 36rem; margin: 1.1rem 0 0; color: var(--path-muted); font-size: 1.05rem; line-height: 1.8; text-wrap: pretty; }
.home-next-action { display: inline-flex; align-items: center; justify-content: center; margin-top: 1.5rem; }
.stage-progress { min-width: 10rem; text-align: right; }
.stage-progress strong { display: block; font-size: 2rem; font-variant-numeric: tabular-nums; }
.stage-progress span { color: var(--path-muted); font-size: .8rem; }
.progress-track { width: 100%; height: .55rem; margin-top: .65rem; overflow: hidden; border-radius: 1rem; background: #ede2d8; }
.progress-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--path-accent); transform: scaleX(var(--progress,0)); transform-origin: left center; transition: transform 360ms cubic-bezier(.16,1,.3,1); }

.home-session { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(18rem,.8fr); gap: clamp(2rem,6vw,5rem); align-items: center; min-height: 29rem; padding: clamp(2.5rem,6vw,5rem); border: 1px solid var(--path-line); border-radius: 2.2rem; background: radial-gradient(circle at 88% 10%, rgba(223,98,71,.13), transparent 20rem), rgba(255,253,249,.88); box-shadow: var(--path-shadow); }
.home-session-main { min-width: 0; }
.home-session-label { display: flex; gap: .65rem; align-items: center; margin: 0 0 1.1rem; color: var(--path-green); font-size: .76rem; letter-spacing: .08em; }
.home-session-label span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--path-green); box-shadow: 0 0 0 .3rem rgba(82,113,95,.1); }
.home-session-label b { font-weight: 820; }
.home-session h1 { max-width: 9.5em; margin: 0; font-family: "Songti SC", "Yu Mincho", serif; font-size: clamp(2.8rem,5vw,4.35rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.04; text-wrap: balance; }
.home-session .stage-next-copy { max-width: 37rem; margin: 1.15rem 0 0; color: var(--path-muted); font-size: 1.05rem; line-height: 1.8; text-wrap: pretty; }
.home-session .home-next-action { margin-top: 1.5rem; }
.home-teacher-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .8rem; align-items: start; max-width: 38rem; margin-top: 1.6rem; padding-top: 1.15rem; border-top: 1px solid var(--path-line); }
.home-teacher-note span { padding: .25rem .48rem; border-radius: .45rem; background: #f1e7dd; color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .04em; }
.home-teacher-note p { margin: 0; color: var(--path-muted); font-size: .82rem; line-height: 1.65; }
.home-session-progress { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(1.4rem,3vw,2.25rem); border-left: 1px solid var(--path-line); }
.home-progress-heading { display: flex; gap: 1rem; align-items: end; justify-content: space-between; }
.home-progress-heading span { color: var(--path-muted); font-size: .76rem; font-weight: 760; }
.home-progress-heading strong { font-size: clamp(1.8rem,3vw,2.6rem); font-variant-numeric: tabular-nums; line-height: 1; }
.home-script-progress { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.home-script-progress > div { min-width: 0; }
.home-script-progress span { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; color: var(--path-muted); font-size: .65rem; }
.home-script-progress span b { overflow: hidden; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.home-script-progress span strong { flex: 0 0 auto; color: var(--path-ink); font-size: .68rem; font-variant-numeric: tabular-nums; }
.home-script-track { height: .28rem; margin-top: .38rem; overflow: hidden; border-radius: 1rem; background: #ede2d8; }
.home-script-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--path-green); transform: scaleX(var(--progress,0)); transform-origin: left center; transition: transform 360ms cubic-bezier(.16,1,.3,1); }
.home-progress-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 1.5rem 0 0; padding-top: 1.35rem; border-top: 1px solid var(--path-line); }
.home-progress-stats div { min-width: 0; padding: 0 .8rem; border-left: 1px solid var(--path-line); }
.home-progress-stats div:first-child { padding-left: 0; border-left: 0; }
.home-progress-stats div:last-child { padding-right: 0; }
.home-progress-stats dt { color: var(--path-muted); font-size: .66rem; }
.home-progress-stats dd { margin: .35rem 0 0; font-size: .92rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.home-session-progress > p { margin: 1.25rem 0 0; color: var(--path-muted); font-size: .72rem; line-height: 1.6; }
.home-unlock-preview { margin-top: 1.25rem; padding-top: 1.2rem; border-top: 1px solid var(--path-line); }
.home-unlock-preview > span { display: block; color: var(--path-accent-dark); font-size: .66rem; font-weight: 820; letter-spacing: .06em; }
.home-unlock-preview > strong { display: block; margin-top: .45rem; font-family: "Songti SC","Yu Mincho",serif; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.home-unlock-preview > p { margin: .35rem 0 0; color: var(--path-ink); font-size: .8rem; font-weight: 760; line-height: 1.5; }
.home-unlock-preview > small { display: block; margin-top: .28rem; color: var(--path-muted); font-size: .68rem; line-height: 1.5; }
.home-learning-history { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--path-line); }
.home-learning-history > div { display: flex; gap: .8rem; align-items: baseline; justify-content: space-between; }
.home-learning-history > div span { color: var(--path-muted); font-size: .68rem; font-weight: 760; }
.home-learning-history > div strong { color: var(--path-ink); font-size: .68rem; font-weight: 760; text-align: right; }
.home-week-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .34rem; align-items: end; height: 3.5rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.home-week-strip li { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: .3rem; align-items: end; height: 100%; min-width: 0; }
.home-week-strip i { display: block; width: 100%; height: 2.45rem; border-radius: .25rem .25rem .12rem .12rem; background: color-mix(in srgb, var(--path-green) 16%, #ede2d8); transform: scaleY(var(--activity,.08)); transform-origin: center bottom; transition: transform 360ms cubic-bezier(.16,1,.3,1), background 180ms ease; }
.home-week-strip li.has-progress i { background: var(--path-green); }
.home-week-strip time { overflow: hidden; color: var(--path-muted); font-size: .55rem; font-variant-numeric: tabular-nums; text-align: center; text-overflow: clip; white-space: nowrap; }
.home-week-strip li.is-today time { color: var(--path-ink); font-weight: 820; }

.home-route { margin: 1.4rem 0; padding: clamp(1.5rem,4vw,3rem); border: 1px solid var(--path-line); border-radius: 2rem; background: rgba(255,253,249,.76); }
.home-route-heading { display: grid; grid-template-columns: minmax(0,.9fr) minmax(20rem,1.1fr); gap: 2rem clamp(2rem,6vw,5rem); align-items: end; }
.home-route-heading h2 { max-width: 17ch; margin: 0; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(2rem,4vw,3.1rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
.home-route-heading > p { margin: 0 0 .2rem; color: var(--path-muted); line-height: 1.8; }
.home-route-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); list-style: none; }
.home-route-steps li { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: 1fr auto; gap: .2rem 1rem; min-height: 17rem; padding: 1.6rem; border-left: 1px solid var(--path-line); }
.home-route-steps li:first-child { border-left: 0; }
.home-route-steps li::before { position: absolute; top: -1px; left: 0; width: 100%; height: 3px; content: ""; background: transparent; }
.home-route-steps li.is-current::before { background: var(--path-accent); }
.home-route-steps li.is-complete::before { background: var(--path-green); }
.home-route-steps li.is-locked { color: color-mix(in srgb, var(--path-ink) 72%, white); }
.home-route-number { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--path-line); border-radius: 50%; background: var(--path-card); color: var(--path-muted); font-size: .72rem; font-weight: 820; }
.home-route-steps .is-current .home-route-number { border-color: var(--path-accent); background: var(--path-accent); color: white; box-shadow: 0 0 0 .35rem rgba(223,98,71,.08); }
.home-route-steps .is-complete .home-route-number { border-color: var(--path-green); background: var(--path-green); color: white; }
.home-route-steps small { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .07em; }
.home-route-steps .is-complete small { color: var(--path-green); }
.home-route-steps .is-locked small { color: var(--path-muted); }
.home-route-steps h3 { margin: .45rem 0 .55rem; font-family: "Songti SC","Yu Mincho",serif; font-size: 1.8rem; font-weight: 600; }
.home-route-steps p { margin: 0; color: var(--path-muted); font-size: .8rem; line-height: 1.7; }
.home-route-steps strong { display: block; margin-top: 1rem; color: var(--path-ink); font-size: .76rem; }
.home-route-meter { height: .3rem; margin-top: .8rem; overflow: hidden; border-radius: 1rem; background: #ede2d8; }
.home-route-meter i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--path-accent); transform: scaleX(var(--progress,0)); transform-origin: left center; transition: transform 360ms cubic-bezier(.16,1,.3,1); }
.home-route-steps .is-complete .home-route-meter i { background: var(--path-green); }
.home-route-steps .is-locked .home-route-meter i { background: var(--path-muted); }
.home-route-steps li > a { grid-column: 2; align-self: end; margin-top: 1.35rem; color: var(--path-accent-dark); font-size: .74rem; font-weight: 780; text-decoration: none; }
.home-route-steps li > a:hover { text-decoration: underline; text-underline-offset: .25em; }
.home-route-steps li > a:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 4px; border-radius: .2rem; }
.home-route-more { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.4rem; }
.home-route-more > a { display: flex; gap: 1rem; align-items: center; justify-content: space-between; min-height: 5rem; padding: 1rem 1.2rem; border: 1px solid var(--path-line); border-radius: 1rem; background: rgba(255,255,255,.72); color: var(--path-ink); text-decoration: none; transition: border-color 180ms ease, transform 180ms ease, background 180ms ease; }
.home-route-more > a:hover { transform: translateY(-2px); border-color: var(--path-accent); background: white; }
.home-route-more > a:active { transform: translateY(0); }
.home-route-more span { display: grid; gap: .3rem; }
.home-route-more small { color: var(--path-muted); font-size: .66rem; }
.home-route-more b { font-size: .82rem; }
.home-route-more strong { flex: 0 0 auto; color: var(--path-accent-dark); font-size: .72rem; }

.home-chapter-heading { display: grid; grid-template-columns: minmax(0,.8fr) minmax(18rem,1.2fr); gap: .75rem clamp(2rem,6vw,5rem); align-items: start; margin: clamp(3.5rem,8vw,6.5rem) 0 1.5rem; scroll-margin-top: calc(var(--site-nav-height) + 1rem); }
.home-chapter-heading > div { display: flex; gap: .8rem; align-items: center; }
.home-chapter-heading > div span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--path-accent); color: white; font-size: .68rem; font-weight: 820; }
.home-chapter-heading > div p { margin: 0; color: var(--path-accent-dark); font-size: .72rem; font-weight: 820; letter-spacing: .08em; }
.home-chapter-heading h2 { grid-column: 1; max-width: 18ch; margin: .65rem 0 0; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(2rem,4vw,3.25rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
.home-chapter-heading > p { grid-column: 2; grid-row: 1 / span 2; margin: .2rem 0 0; color: var(--path-muted); line-height: 1.85; }
.home-chapter-secondary { padding-top: 1.5rem; border-top: 1px solid var(--path-line); }
.home-chapter-secondary > div span { background: var(--path-ink); }
.home-chapter-secondary > div p { color: var(--path-ink); }

.stage-session { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(18rem,.8fr); gap: clamp(2rem,6vw,5rem); align-items: center; min-height: 25rem; margin-bottom: 1.5rem; padding: clamp(2.4rem,5vw,4.2rem); border: 1px solid var(--path-line); border-radius: 1.5rem; background: linear-gradient(135deg, rgba(255,253,249,.94), rgba(247,232,220,.58)); }
.stage-session-main { min-width: 0; }
.stage-session-label { margin: 0 0 1rem; color: var(--path-accent-dark); font-size: .76rem; font-weight: 820; letter-spacing: .08em; }
.stage-session h1 { max-width: 9.5em; margin: 0; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(2.7rem,4.8vw,4.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; text-wrap: balance; }
.stage-session .stage-next-copy { max-width: 38rem; margin: 1.1rem 0 0; color: var(--path-muted); font-size: 1rem; line-height: 1.8; }
.stage-session .home-next-action { margin-top: 1.4rem; }
.stage-teacher-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .8rem; align-items: start; max-width: 39rem; margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--path-line); }
.stage-teacher-note span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; }
.stage-teacher-note p { margin: 0; color: var(--path-muted); font-size: .82rem; line-height: 1.65; }
.stage-session-progress { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-left: clamp(1.4rem,3vw,2.2rem); border-left: 1px solid var(--path-line); }
.stage-progress-heading { display: flex; gap: 1rem; align-items: end; justify-content: space-between; }
.stage-progress-heading span { color: var(--path-muted); font-size: .76rem; font-weight: 760; }
.stage-progress-heading strong { font-size: clamp(1.8rem,3vw,2.6rem); font-variant-numeric: tabular-nums; line-height: 1; }
.stage-progress-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 1.4rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--path-line); }
.stage-progress-stats div { min-width: 0; padding: 0 .75rem; border-left: 1px solid var(--path-line); }
.stage-progress-stats div:first-child { padding-left: 0; border-left: 0; }
.stage-progress-stats div:last-child { padding-right: 0; }
.stage-progress-stats dt { color: var(--path-muted); font-size: .66rem; }
.stage-progress-stats dd { margin: .35rem 0 0; font-size: .82rem; font-weight: 780; line-height: 1.35; }
.stage-session-progress > p { margin: 1.15rem 0 0; color: var(--path-muted); font-size: .72rem; line-height: 1.6; }
.stage-content-heading { display: grid; grid-template-columns: minmax(0,.9fr) minmax(20rem,1.1fr); gap: 2rem clamp(2rem,6vw,5rem); align-items: end; margin: clamp(3.5rem,7vw,5.5rem) 0 1.5rem; }
.stage-content-heading h2 { max-width: 18ch; margin: 0; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(2rem,4vw,3rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.08; text-wrap: balance; }
.stage-content-heading p { margin: 0; color: var(--path-muted); line-height: 1.8; }
.stage-session-summary { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; margin: 1rem 0 1.2rem; padding: 1.15rem 1.25rem; border: 1px solid #dfd0c2; border-radius: .9rem; background: #f7e8dc; animation: stage-summary-enter 420ms cubic-bezier(.16,1,.3,1) both; }
.stage-session-summary > div { display: grid; gap: .25rem; }
.stage-session-summary span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; }
.stage-session-summary strong { font-family: "Songti SC","Yu Mincho",serif; font-size: 1.35rem; font-weight: 600; }
.stage-session-summary p { margin: 0; color: var(--path-muted); font-size: .82rem; line-height: 1.6; }
.stage-session-summary .primary-action { flex: 0 0 auto; }
.phrase-listen-status { min-height: 1.5em; margin: 1rem 0; color: var(--path-muted); font-size: .78rem; line-height: 1.6; }
@keyframes stage-summary-enter { from { opacity: .2; clip-path: inset(0 0 45% 0); transform: translateY(-8px); } to { opacity: 1; clip-path: inset(0); transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .stage-session-summary { animation: none; } }
@media (prefers-reduced-motion: reduce) { .progress-track i, .home-script-track i, .home-week-strip i, .home-route-meter i { transition: none; } }

.entry-course { margin-bottom: 1.4rem; overflow: hidden; border: 1px solid var(--path-line); border-radius: 1.2rem; background: rgba(255,253,249,.72); }
.entry-course > summary { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; cursor: pointer; list-style: none; }
.entry-course > summary::-webkit-details-marker { display: none; }
.entry-course > summary span { display: grid; gap: .25rem; }
.entry-course > summary strong { color: var(--path-ink); font-size: .9rem; }
.entry-course > summary small { color: var(--path-muted); font-size: .75rem; line-height: 1.5; }
.entry-course > summary svg { flex: 0 0 auto; width: 1.1rem; color: var(--path-accent-dark); transition: transform 180ms ease; }
.entry-course[open] > summary { border-bottom: 1px solid var(--path-line); }
.entry-course[open] > summary svg { transform: rotate(180deg); }
.entry-course > summary:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: -3px; }
.entry-course-body { padding: 0 clamp(1.35rem,3vw,2.2rem) clamp(1.35rem,3vw,2.2rem); }
.entry-course-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--path-line); border-left: 1px solid var(--path-line); list-style: none; }
.entry-course-steps li { display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: .75rem; min-height: 11.5rem; padding: 1rem; border-right: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); }
.entry-course-steps li > span { color: var(--path-accent-dark); font-family: ui-monospace,monospace; font-size: .72rem; font-weight: 820; }
.entry-course-steps b { font-size: .9rem; }
.entry-course-steps p { margin: .55rem 0 0; color: var(--path-muted); font-size: .76rem; line-height: 1.7; }
.entry-course-steps p span[lang="ja"] { color: var(--path-ink); font-family: var(--kana-print-font); font-size: .9rem; }
.entry-course-steps a { display: inline-block; margin-top: .65rem; color: var(--path-accent-dark); font-size: .7rem; font-weight: 760; text-decoration: none; text-underline-offset: .2em; }
.entry-course-steps a:hover { text-decoration: underline; }
.entry-course-steps a:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; border-radius: .2rem; }
.entry-lesson-loop { display: flex; flex-wrap: wrap; gap: .55rem .7rem; align-items: center; margin-top: 1rem; padding: .8rem 1rem; border-radius: .8rem; background: var(--path-soft); color: var(--path-muted); font-size: .72rem; }
.entry-lesson-loop b { flex: 0 0 100%; color: var(--path-ink); font-size: .78rem; }
.entry-lesson-loop i { color: var(--path-accent); font-style: normal; }

.learning-surface { overflow: hidden; border: 1px solid var(--path-line); border-radius: 2rem; background: rgba(255,253,249,.92); box-shadow: var(--path-shadow); }
.surface-toolbar { display: flex; gap: .65rem; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--path-line); }
.segmented { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: .8rem; background: #f3e9df; }
.segmented button { border: 0; border-radius: .6rem; background: transparent; color: var(--path-muted); padding: .55rem .85rem; cursor: pointer; font-weight: 700; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.segmented button.is-active { background: white; color: var(--path-ink); box-shadow: 0 4px 14px rgba(83,56,41,.09); }
.segmented button:active { transform: scale(.98); }
.surface-note { color: var(--path-muted); font-size: .82rem; }

.kana-layout { display: grid; grid-template-columns: minmax(15rem,.72fr) minmax(0,1.28fr); min-height: 34rem; }
.kana-focus { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 31rem; padding: 2rem; border-right: 1px solid var(--path-line); background: linear-gradient(160deg, rgba(247,232,220,.85), rgba(255,253,249,.4)); text-align: center; }
.kana-focus-glyphs { display: flex; gap: clamp(.8rem,2vw,1.5rem); align-items: flex-end; justify-content: center; }
.kana-form-print, .kana-form-hand { display: flex; flex-direction: column; align-items: center; }
.kana-glyph { font-family: var(--kana-print-font); font-size: clamp(5.5rem, 10vw, 8.5rem); font-weight: 500; line-height: 1; }
.kana-hand-glyph { font-family: var(--kana-hand-font); font-size: clamp(3rem,6vw,5rem); line-height: 1; opacity: .72; }
.kana-form-print i, .kana-form-hand i { margin-top: .4rem; color: var(--path-muted); font-size: .62rem; font-style: normal; font-weight: 680; letter-spacing: .05em; }
.kana-romaji { margin-top: .5rem; color: var(--path-accent-dark); font-size: 1.05rem; font-weight: 820; letter-spacing: .12em; }
.kana-replay { display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; color: inherit; padding: .5rem 1.5rem; cursor: pointer; }
.kana-replay small { margin-top: .65rem; color: var(--path-muted); font-size: .72rem; font-weight: 650; }
.kana-replay:hover .kana-glyph, .kana-replay:hover .kana-hand-glyph { transform: translateY(-2px); }
.kana-replay:active .kana-glyph, .kana-replay:active .kana-hand-glyph { transform: scale(.98); }
.kana-replay:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: .35rem; border-radius: 1rem; }
.kana-glyph, .kana-hand-glyph { transition: transform 180ms ease; }
.kana-stroke-order { margin: 0 1.15rem 1.15rem; padding: 1rem; border-block: 1px solid var(--path-line); }
.kana-stroke-order header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kana-stroke-order header b { font-size: .86rem; }
.kana-stroke-order header button { min-height: 36px; padding: 0 .8rem; border: 1px solid var(--path-line); border-radius: 10px; background: #fff; color: var(--path-accent-dark); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.kana-stroke-order header button:focus-visible { outline: 3px solid color-mix(in srgb, var(--path-accent) 34%, transparent); outline-offset: 2px; }
#kana-stroke-svg { display: grid; place-items: center; min-height: 13rem; margin-top: .7rem; border-radius: 12px; background: #fff8f1; --kana-stroke-duration: 1.25s; --kana-stroke-gap: 1.4s; --kana-stroke-delay: .5s; }
#kana-stroke-svg svg { display: block; width: min(100%, 13rem); height: auto; --shadow: #eadcd2; --stroke: #211b18; }
#kana-stroke-svg.is-playing svg[data-strokesvg] > g[data-strokesvg="strokes"] > * { animation: kana-stroke-draw var(--kana-stroke-duration) cubic-bezier(.16,1,.3,1) forwards calc(var(--i) * var(--kana-stroke-gap) + var(--kana-stroke-delay)); stroke-dasharray: 3333; stroke-dashoffset: 3333; }
#kana-stroke-svg.is-error { align-content: center; padding: 1rem; color: var(--path-muted); font-size: .82rem; line-height: 1.55; text-align: center; }
.kana-stroke-order > p { margin: .75rem 0 .35rem; color: var(--path-muted); font-size: .8rem; line-height: 1.5; }
.kana-stroke-order > small { color: var(--path-muted); font-size: .68rem; }
.kana-stroke-order a { color: var(--path-accent-dark); text-underline-offset: .2em; }
@keyframes kana-stroke-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { #kana-stroke-svg.is-playing svg[data-strokesvg] > g[data-strokesvg="strokes"] > * { animation: none; stroke-dashoffset: 0; } }
.kana-knowledge-card { width: min(100%, 24rem); margin-top: 1.2rem; padding: 1rem 1.1rem; border-top: 1px solid var(--path-line); text-align: left; }
.kana-knowledge-card b { color: var(--path-accent-dark); font-size: .78rem; letter-spacing: .08em; }
.kana-knowledge-card p { margin: .45rem 0 0; color: var(--path-muted); font-size: .82rem; line-height: 1.65; }
.kana-knowledge-card span { display: block; margin-top: .65rem; color: var(--path-ink); font-size: .82rem; font-weight: 720; }
.kana-focus-actions { display: flex; gap: .65rem; margin-top: 1.2rem; }
.primary-action, .secondary-action { min-height: 2.9rem; border-radius: .8rem; padding: .75rem 1.15rem; cursor: pointer; font-weight: 760; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease; }
.primary-action { border: 1px solid var(--path-accent); background: var(--path-accent); color: white; }
.primary-action:hover { background: var(--path-accent-dark); }
.secondary-action { border: 1px solid var(--path-line); background: white; color: var(--path-ink); }
.primary-action:active, .secondary-action:active { transform: scale(.98); }
.primary-action:focus-visible, .secondary-action:focus-visible, .kana-card:focus-visible, .answer-option:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; }
.primary-action:disabled { cursor: not-allowed; border-color: #d5c9bf; background: #d5c9bf; }
.kana-board { padding: 1.2rem 1.6rem 1.6rem; }
.kana-style-legend { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; align-items: center; justify-content: flex-end; margin-bottom: .85rem; color: var(--path-muted); font-size: .66rem; }
.kana-style-legend span { display: inline-flex; gap: .4rem; align-items: center; }
.kana-style-legend b { font-family: var(--kana-print-font); color: var(--path-ink); font-size: 1rem; font-weight: 500; }
.kana-style-legend i { font-family: var(--kana-hand-font); color: var(--path-ink); font-size: 1rem; font-style: normal; opacity: .72; }
.kana-grid { display: grid; grid-template-columns: repeat(5, minmax(3.25rem,1fr)); gap: .65rem; }
.kana-card { position: relative; min-height: 5.2rem; border: 1px solid var(--path-line); border-radius: 1rem; background: white; color: var(--path-ink); cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.kana-card:hover { transform: translateY(-2px); border-color: rgba(223,98,71,.55); }
.kana-card.is-selected { border-color: var(--path-accent); background: #fff4ec; }
.kana-card.is-mastered { border-color: rgba(82,113,95,.35); background: #edf4ef; }
.kana-card-glyphs { display: flex; gap: .45rem; align-items: baseline; justify-content: center; }
.kana-card-print { display: block; font-family: var(--kana-print-font); font-size: 1.8rem; font-weight: 500; }
.kana-card-hand { font-family: var(--kana-hand-font); font-size: 1.1rem; font-style: normal; opacity: .62; }
.kana-card small { display: block; margin-top: .1rem; color: var(--path-muted); font-size: .68rem; }
.kana-card.is-mastered::after { position: absolute; top: .35rem; right: .45rem; content: "✓"; color: var(--path-green); font-size: .7rem; font-weight: 900; }
.kana-word-bridge { margin-top: 1.2rem; padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--path-line); border-radius: 1.6rem; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(247,232,220,.72)); }
.kana-word-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; }
.kana-word-heading h2 { margin: .2rem 0 .55rem; font-family: "Songti SC", serif; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.08; }
.kana-word-heading p:last-child { max-width: 40rem; margin: 0; color: var(--path-muted); line-height: 1.7; }
.kana-word-heading-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: .65rem; align-items: flex-end; }
.kana-word-heading-actions strong { color: var(--path-accent-dark); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kana-word-toggle { min-width: 9rem; min-height: 2.75rem; padding: .65rem .9rem; }
.kana-word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.35rem; }
.kana-word-card { position: relative; min-height: 12.4rem; padding: 1rem; border: 1px solid var(--path-line); border-radius: 1rem; background: rgba(255,253,249,.96); }
.kana-word-card-top { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
.kana-word-headword strong { display: block; margin-top: .2rem; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 2rem; line-height: 1.15; }
.kana-word-label { display: block; color: var(--path-muted); font-size: .62rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.kana-word-reading { display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: baseline; margin-top: .85rem; }
.kana-word-reading .kana-word-label { flex: 0 0 100%; }
.kana-word-reading b { color: var(--path-accent-dark); font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 1.15rem; }
.kana-word-reading small { color: var(--path-muted); font-size: .78rem; letter-spacing: .04em; }
.kana-word-meaning { margin-top: .8rem; padding-top: .75rem; border-top: 1px solid var(--path-line); }
.kana-word-meaning p { margin: .22rem 0 0; color: var(--path-ink); font-size: 1rem; font-weight: 700; }
.kana-word-uses { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; margin-top: .8rem; color: var(--path-muted); font-size: .68rem; }
.kana-word-uses small { font-size: .7rem; white-space: nowrap; }
.kana-word-listen { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; border: 1px solid var(--path-line); border-radius: 50%; background: white; color: var(--path-accent-dark); cursor: pointer; }
.kana-word-listen:hover { border-color: var(--path-accent); background: #fff4ec; }
.kana-word-listen:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; }
.kana-word-empty { margin: 1.1rem 0 0; padding: .85rem 1rem; border-radius: .8rem; background: rgba(255,255,255,.62); color: var(--path-muted); font-size: .82rem; }
.kana-context-section { margin-top: 1.2rem; padding: clamp(1.4rem,3vw,2.2rem); border: 1px solid var(--path-line); border-radius: 1.6rem; background: rgba(255,253,249,.72); }
.kana-context-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.2rem; align-items: end; }
.kana-context-heading h2 { margin: .2rem 0 .55rem; font-family: "Songti SC", serif; font-size: clamp(1.8rem,4vw,2.8rem); line-height: 1.08; }
.kana-context-heading p:last-child { max-width: 42rem; margin: 0; color: var(--path-muted); line-height: 1.7; }
.kana-context-heading > strong { color: var(--path-accent-dark); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.kana-context-tabs { width: fit-content; margin-top: 1.2rem; }
.kana-context-section > .stage-teacher-note { max-width: none; margin-top: 1rem; }
.kana-context-news-note, .kana-context-empty { margin: 1rem 0 0; color: var(--path-muted); font-size: .78rem; line-height: 1.65; }
.kana-context-news-note { padding: .65rem .8rem; border: 1px solid var(--path-line); border-radius: .6rem; background: rgba(255,253,249,.7); }
.kana-context-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin-top: 1.15rem; }
.kana-context-card { min-height: 13rem; padding: 1.1rem; border: 1px solid var(--path-line); border-radius: 1rem; background: white; }
.kana-context-card-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.kana-context-card-top > span { color: var(--path-accent-dark); font-size: .65rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.kana-context-card-top button { width: 2.5rem; height: 2.5rem; border: 1px solid var(--path-line); border-radius: 50%; background: var(--path-card); color: var(--path-accent-dark); cursor: pointer; }
.kana-context-card-top button:hover { border-color: var(--path-accent); background: #fff4ec; }
.kana-context-card > strong { display: block; margin-top: .7rem; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(1.2rem,2.5vw,1.55rem); line-height: 1.5; }
.kana-context-card > small { display: block; margin-top: .25rem; color: var(--path-accent-dark); line-height: 1.6; }
.kana-context-card > p { margin: .7rem 0 0; color: var(--path-muted); line-height: 1.65; }
.kana-context-words { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--path-line); }
.kana-context-words span { margin-right: .2rem; color: var(--path-muted); font-size: .66rem; }
.kana-context-words b { padding: .24rem .42rem; border-radius: .4rem; background: var(--path-soft); color: var(--path-accent-dark); font-size: .7rem; }
.entry-listening, .entry-greetings { margin-top: 1.2rem; padding: clamp(1.4rem,3vw,2.2rem); border: 1px solid var(--path-line); border-radius: 1.6rem; background: rgba(255,253,249,.78); scroll-margin-top: calc(var(--site-nav-height) + .8rem); }
.entry-listening-heading, .entry-greetings-heading { display: grid; grid-template-columns: minmax(0,.85fr) minmax(18rem,1.15fr); gap: .25rem clamp(2rem,6vw,5rem); align-items: start; }
.entry-listening-heading .stage-kicker, .entry-listening-heading h2, .entry-greetings-heading .stage-kicker, .entry-greetings-heading h2 { grid-column: 1; }
.entry-listening-heading h2, .entry-greetings-heading h2 { max-width: 17ch; margin: 0; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(1.8rem,3.6vw,2.7rem); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.entry-listening-heading > p:last-child, .entry-greetings-heading > p:last-child { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: var(--path-muted); line-height: 1.8; }
.entry-listening-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1.35rem; }
.entry-listening-grid article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .2rem 1rem; padding: 1.15rem; border: 1px solid var(--path-line); border-radius: 1rem; background: white; }
.entry-listening-grid article > span { grid-column: 1 / -1; color: var(--path-accent-dark); font-size: .65rem; font-weight: 820; letter-spacing: .08em; }
.entry-listening-grid strong { grid-column: 1; margin-top: .35rem; font-family: var(--kana-print-font); font-size: clamp(1.4rem,3vw,2rem); font-weight: 600; }
.entry-listening-grid small { grid-column: 1; color: var(--path-muted); }
.entry-listening-grid p { grid-column: 1; margin: .65rem 0 0; color: var(--path-muted); font-size: .78rem; line-height: 1.7; }
.entry-listening-grid button { grid-column: 2; grid-row: 2 / span 3; align-self: center; min-height: 2.8rem; border: 1px solid var(--path-line); border-radius: .75rem; background: var(--path-card); color: var(--path-accent-dark); padding: .65rem .9rem; cursor: pointer; font-size: .74rem; font-weight: 760; }
.entry-listening-grid button:hover, .entry-greeting-grid button:hover { border-color: var(--path-accent); background: #fff4ec; }
.entry-listening-grid button:focus-visible, .entry-greeting-grid button:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; }
.entry-greeting-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin-top: 1.35rem; }
.entry-greeting-grid button { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .25rem .75rem; align-items: center; min-height: 5.3rem; border: 1px solid var(--path-line); border-radius: 1rem; background: white; color: var(--path-ink); padding: .85rem 1rem; cursor: pointer; text-align: left; }
.entry-greeting-grid span { font-family: var(--kana-print-font); font-size: 1.25rem; font-weight: 600; }
.entry-greeting-grid small { grid-column: 1; color: var(--path-muted); font-size: .7rem; }
.entry-greeting-grid i { grid-column: 2; grid-row: 1 / span 2; color: var(--path-accent-dark); font-style: normal; }
.stage-gate { display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; margin-top: 1.2rem; padding: 1.2rem 1.4rem; border-radius: 1.2rem; background: #f5eadf; }
.stage-gate strong { display: block; margin-bottom: .2rem; }
.stage-gate p { margin: 0; color: var(--path-muted); font-size: .88rem; }
.readiness-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.readiness-chips span { padding: .3rem .5rem; border-radius: .45rem; background: rgba(255,255,255,.55); color: var(--path-muted); font-size: .7rem; font-weight: 700; }
.readiness-chips span.is-complete { background: #e8f1eb; color: var(--path-green); }
.kana-rules-section { margin-top: 3.5rem; padding: 1.6rem 0 3.2rem; border-top: 1px solid var(--path-line); }
.kana-rules-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(16rem,.55fr); gap: .25rem clamp(2rem,6vw,5rem); align-items: center; }
.kana-rules-intro .stage-kicker, .kana-rules-intro h2, .kana-rules-intro > p:last-of-type, .kana-rules-start { grid-column: 1; }
.kana-rules-intro h2 { max-width: 18ch; margin: .25rem 0 .45rem; font-family: "Songti SC", serif; font-size: clamp(2rem,4vw,3.2rem); line-height: 1.04; letter-spacing: -.05em; text-wrap: balance; }
.kana-rules-intro > p:last-of-type { max-width: 39rem; margin: 0; color: var(--path-muted); line-height: 1.65; text-wrap: pretty; }
.kana-rules-start { width: fit-content; margin-top: .55rem; color: var(--path-accent-dark); font-size: .78rem; font-weight: 780; text-decoration: none; text-underline-offset: .2em; }
.kana-rules-start:hover { text-decoration: underline; }
.kana-rules-start:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; border-radius: .2rem; }
.kana-rules-intro ol { grid-column: 2; grid-row: 1 / span 4; display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.kana-rules-intro li { display: flex; gap: .65rem; align-items: center; padding: .5rem .7rem; border-bottom: 1px solid var(--path-line); color: var(--path-muted); font-size: .8rem; }
.kana-rules-intro li span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: .55rem; background: var(--path-soft); color: var(--path-accent-dark); font-size: .7rem; font-weight: 850; }
.kana-rule-grid { display: grid; grid-template-columns: 13.5rem minmax(0,1fr); gap: 1rem; margin-top: 1rem; scroll-margin-top: calc(var(--site-nav-height) + .8rem); }
.kana-rule-steps { display: flex; flex-direction: column; gap: .35rem; }
.kana-rule-steps button { display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: .1rem .55rem; align-items: center; min-height: 4.2rem; border: 0; border-left: 2px solid transparent; border-radius: .15rem .8rem .8rem .15rem; background: transparent; color: var(--path-muted); padding: .65rem .7rem; cursor: pointer; text-align: left; transition: background 180ms ease,border-color 180ms ease,transform 180ms ease; }
.kana-rule-steps button:hover { background: rgba(255,255,255,.58); transform: translateX(2px); }
.kana-rule-steps button.is-active { border-left-color: var(--path-accent); background: rgba(255,255,255,.86); color: var(--path-ink); }
.kana-rule-steps button > span { grid-row: 1 / span 2; color: var(--path-accent-dark); font-family: ui-monospace,monospace; font-size: .7rem; }
.kana-rule-steps button b { font-size: .78rem; font-weight: 760; }
.kana-rule-steps button small { color: var(--path-muted); font-size: .64rem; }
.kana-rule-steps button.is-complete small { color: var(--path-green); }
.kana-rule-lesson { min-height: 34rem; padding: clamp(1.4rem,4vw,2.6rem); border-radius: 1.45rem; background: linear-gradient(145deg,rgba(255,255,255,.96),rgba(247,232,220,.7)); box-shadow: 0 22px 55px rgba(110,76,52,.08); }
.kana-rule-lesson header > span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .08em; }
.kana-rule-lesson h3 { max-width: 18ch; margin: .45rem 0 .35rem; font-family: "Songti SC",serif; font-size: clamp(1.75rem,4vw,2.8rem); line-height: 1.15; text-wrap: balance; }
.kana-rule-lesson header p { margin: 0; color: var(--path-muted); font-size: .76rem; }
.kana-rule-lesson header .kana-rule-term-meaning { max-width: 46rem; margin-top: .35rem; color: var(--path-ink); font-size: .82rem; line-height: 1.65; }
.kana-rule-rhythm { display: grid; grid-template-columns: minmax(8rem,.3fr) minmax(0,1fr); gap: .2rem 1rem; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--path-line); border-radius: .7rem; background: rgba(255,253,249,.7); }
.kana-rule-rhythm > span { grid-row: 1 / span 2; align-self: center; color: var(--path-accent-dark); font-size: .76rem; font-weight: 820; }
.kana-rule-rhythm p { margin: 0; color: var(--path-muted); font-size: .78rem; line-height: 1.65; }
.kana-rule-rhythm small { color: var(--path-muted); font-size: .68rem; }
.kana-rule-change { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .8rem; align-items: center; margin-top: 1.5rem; }
.kana-rule-change span, .kana-rule-change strong { display: grid; place-items: center; min-height: 6rem; border-radius: 1rem; font-family: "Hiragino Mincho ProN","Yu Mincho",serif; font-size: clamp(1.35rem,3vw,2rem); }
.kana-rule-change span { border: 1px dashed var(--path-line); color: var(--path-muted); }
.kana-rule-change strong { background: var(--path-soft); color: var(--path-accent-dark); }
.kana-rule-change i { color: var(--path-accent); font-style: normal; font-size: 1.4rem; }
.kana-rule-plain { max-width: 50rem; margin: 1.2rem 0 0; color: var(--path-muted); line-height: 1.8; }
.kana-rule-real-word { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.25rem; padding: 1rem 1.1rem; border-top: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); }
.kana-rule-real-word > div > span { display: block; color: var(--path-muted); font-size: .66rem; font-weight: 720; letter-spacing: .08em; }
.kana-rule-real-word strong { display: inline-block; margin-top: .35rem; font-family: "Hiragino Mincho ProN","Yu Mincho",serif; font-size: 1.55rem; }
.kana-rule-real-word b { margin-left: .65rem; color: var(--path-accent-dark); font-family: "Hiragino Mincho ProN","Yu Mincho",serif; }
.kana-rule-real-word small { display: block; margin-top: .25rem; color: var(--path-muted); }
.kana-rule-beats { margin-top: 1rem; }
.kana-rule-beats > span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .05em; }
.kana-rule-beats > div { display: flex; gap: .4rem; margin-top: .55rem; }
.kana-rule-beats b { display: grid; place-items: center; min-width: 3.2rem; min-height: 3.2rem; border: 1px solid var(--path-line); border-radius: .75rem; background: white; font-family: "Hiragino Mincho ProN","Yu Mincho",serif; font-size: 1.2rem; }
.kana-rule-beats small { display: block; margin-top: .5rem; color: var(--path-muted); font-size: .72rem; line-height: 1.6; }
.kana-rule-listen { flex: 0 0 auto; min-height: 2.8rem; border: 1px solid var(--path-line); border-radius: .8rem; background: white; color: var(--path-accent-dark); padding: .65rem .9rem; cursor: pointer; font-size: .74rem; font-weight: 760; transition: border-color 180ms ease,background 180ms ease,transform 180ms ease; }
.kana-rule-listen:hover { border-color: var(--path-accent); background: #fff4ec; }
.kana-rule-listen:active { transform: scale(.98); }
.kana-rule-listen:focus-visible, .kana-rule-steps button:focus-visible, .kana-rule-mini-check button:focus-visible, .kana-rule-lesson footer button:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; }
.kana-rule-mini-check { margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(255,253,249,.78); }
.kana-rule-mini-check > span { color: var(--path-accent-dark); font-size: .66rem; font-weight: 820; letter-spacing: .08em; }
.kana-rule-mini-check p { margin: .4rem 0 .75rem; font-weight: 720; }
.kana-rule-mini-check > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.kana-rule-mini-check button { min-height: 2.8rem; border: 1px solid var(--path-line); border-radius: .75rem; background: white; color: var(--path-ink); padding: .6rem .75rem; cursor: pointer; text-align: left; }
.kana-rule-mini-check button:hover:not(:disabled) { border-color: var(--path-accent); }
.kana-rule-mini-check button.is-correct { border-color: rgba(82,113,95,.48); background: #edf4ef; color: var(--path-green); }
.kana-rule-mini-check button.is-wrong { border-color: rgba(216,136,111,.58); background: #fff0ea; }
.kana-rule-mini-check > strong { display: block; margin-top: .7rem; color: var(--path-muted); font-size: .76rem; }
.kana-rule-mini-check > strong.is-correct { color: var(--path-green); }
.kana-rule-mini-check > strong.is-wrong { color: var(--path-accent-dark); }
.kana-rule-lesson footer { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.kana-rule-lesson footer button { border: 0; background: transparent; color: var(--path-muted); padding: .55rem 0; cursor: pointer; font-weight: 720; }
.kana-rule-lesson footer button:last-child { color: var(--path-accent-dark); }
.kana-rule-lesson footer button:disabled { opacity: .35; cursor: default; }
.kana-check { margin-top: 1.4rem; padding: clamp(1.5rem,4vw,3rem); }
.kana-check h2 { margin: .4rem 0 .65rem; font-family: "Songti SC", serif; font-size: 2rem; }
.kana-check > div > p { color: var(--path-muted); line-height: 1.7; }
.kana-check .question-prompt { margin-top: 2.2rem; font-size: clamp(1.6rem,4vw,2.4rem); }

.unit-strip { display: flex; gap: .65rem; overflow-x: auto; padding: .25rem 0 1.2rem; scrollbar-width: none; }
.unit-strip::-webkit-scrollbar { display: none; }
.unit-chip { flex: 0 0 auto; min-width: 9.5rem; border: 1px solid var(--path-line); border-radius: 1rem; background: var(--path-card); padding: .85rem 1rem; color: var(--path-muted); cursor: pointer; text-align: left; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.unit-chip:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(223,98,71,.45); }
.unit-chip.is-active { border-color: var(--path-accent); background: #fff3eb; color: var(--path-ink); }
.unit-chip:disabled { cursor: not-allowed; opacity: .5; }
.unit-chip b, .unit-chip span { display: block; }
.unit-chip b { margin-bottom: .2rem; font-size: .75rem; color: var(--path-accent-dark); }
.unit-chip span { font-weight: 760; }
.quiz-stage { min-height: 32rem; padding: clamp(1.5rem,4vw,3rem); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.4rem; color: var(--path-muted); font-size: .82rem; }
.question-label { color: var(--path-accent-dark); font-weight: 800; }
.question-prompt { max-width: 18ch; margin: 0 auto .6rem; font-family: "Songti SC", serif; font-size: clamp(2.1rem,5vw,3.5rem); text-align: center; text-wrap: balance; }
.question-hint { margin: 0 auto 2rem; color: var(--path-muted); text-align: center; }
.answer-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; max-width: 48rem; margin: 0 auto; }
.answer-option { min-height: 5.4rem; border: 1px solid var(--path-line); border-radius: 1.1rem; background: white; color: var(--path-ink); cursor: pointer; padding: 1rem; text-align: left; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.answer-option:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--path-accent); }
.answer-option b { display: block; font-family: "Hiragino Mincho ProN", serif; font-size: 1.45rem; }
.answer-option small { color: var(--path-muted); }
.answer-option.is-correct { border-color: #6e927c; background: #eef5f0; }
.answer-option.is-wrong { border-color: #d8886f; background: #fff0ea; }
.answer-option:disabled { cursor: default; }
.feedback-bar { display: none; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem -3rem -3rem; padding: 1.2rem 3rem; background: #eef5f0; }
.feedback-bar.is-visible { display: flex; }
.feedback-bar[data-tone="retry"] { background: #fff0ea; }
.feedback-bar strong { display: block; }
.feedback-bar p { margin: .15rem 0 0; color: var(--path-muted); font-size: .86rem; }
.gate-banner { margin-bottom: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--path-line); border-radius: 1rem; background: rgba(247,232,220,.7); color: var(--path-muted); }
.gate-banner strong { color: var(--path-ink); }
.exam-vocab-section { margin-top: 3.6rem; padding-top: 2.4rem; border-top: 1px solid var(--path-line); }
.exam-vocab-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2rem; align-items: end; margin-bottom: 1.4rem; }
.exam-vocab-head h2 { margin: .4rem 0 .7rem; font-family: "Songti SC", serif; font-size: clamp(2.2rem,5vw,4rem); line-height: 1; letter-spacing: -.05em; }
.exam-vocab-head > div:first-child > p:last-child { max-width: 46rem; margin: 0; color: var(--path-muted); line-height: 1.75; }
.exam-coverage { display: grid; grid-template-columns: auto auto; gap: .15rem 1rem; min-width: 10rem; }
.exam-coverage strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.exam-coverage span { align-self: center; color: var(--path-muted); font-size: .75rem; }
.exam-vocab-surface { min-height: 26rem; }
.exam-vocab-surface #exam-vocab-intro { max-width: 42rem; margin: 4rem auto; text-align: center; }
.exam-vocab-surface #exam-vocab-intro h3 { font-family: "Songti SC", serif; font-size: 1.8rem; line-height: 1.35; }
.exam-vocab-surface #exam-vocab-intro p { color: var(--path-muted); line-height: 1.7; }
.exam-audio-action { display: block; margin: 0 auto 1.2rem; }

.travel-layout { display: grid; grid-template-columns: 15rem minmax(0,1fr); gap: 1.2rem; }
.scenario-list { display: flex; flex-direction: column; gap: .55rem; }
.scenario-button { border: 1px solid var(--path-line); border-radius: .9rem; background: var(--path-card); color: var(--path-muted); padding: .9rem 1rem; cursor: pointer; text-align: left; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.scenario-button:hover { transform: translateX(2px); }
.scenario-button.is-active { border-color: var(--path-accent); background: #fff3eb; color: var(--path-ink); }
.scenario-button b, .scenario-button span { display: block; }
.scenario-button span { margin-top: .2rem; font-size: .75rem; }
.scenario-button small { display: block; margin-top: .45rem; color: var(--path-green); font-size: .7rem; font-weight: 800; }
.scenario-button.is-complete:not(.is-active) { border-color: rgba(82,113,95,.28); background: #f4f8f5; }
.phrase-panel { padding: clamp(1.4rem,4vw,2.5rem); }
.scenario-head { margin-bottom: 1.5rem; }
.scenario-head h2 { margin: .3rem 0 .5rem; font-family: "Songti SC", serif; font-size: 2rem; }
.scenario-head p { margin: 0; color: var(--path-muted); }
.travel-scene-illustration { overflow: hidden; margin: 0 0 1.25rem; border: 1px solid var(--path-line); border-radius: 1.2rem; background: var(--path-soft); aspect-ratio: 3/2; }
.travel-scene-illustration[hidden] { display: none; }
.travel-scene-illustration img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phrase-list { display: grid; gap: .75rem; }
.phrase-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem; border-radius: 1rem; background: white; border: 1px solid var(--path-line); }
.phrase-card.is-heard { border-color: color-mix(in srgb, var(--path-green) 42%, var(--path-line)); background: color-mix(in srgb, var(--path-green) 5%, white); }
.phrase-heard-mark { display: block; margin-top: .45rem; color: var(--path-green); font-size: .68rem; font-weight: 780; }
.phrase-number { color: var(--path-accent-dark); font-size: .72rem; font-weight: 850; }
.phrase-japanese { font-family: "Hiragino Mincho ProN", serif; font-size: 1.35rem; font-weight: 700; }
.phrase-reading, .phrase-meaning { color: var(--path-muted); font-size: .8rem; }
.phrase-pattern { display: inline-block; margin-top: .45rem; padding: .25rem .5rem; border-radius: .4rem; background: var(--path-soft); color: var(--path-accent-dark); font-size: .72rem; }
.scenario-complete-action { margin: 1.25rem 0 0 auto; }
.listen-button { width: 2.6rem; height: 2.6rem; border: 1px solid var(--path-line); border-radius: 50%; background: var(--path-card); cursor: pointer; }
.listen-button:hover { border-color: var(--path-accent); }
.n5-entry-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2rem; align-items: center; margin-top: 3.6rem; padding: 2.2rem 0; border-top: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); }
.n5-entry-link h2 { max-width: 15ch; margin: .35rem 0 .65rem; font-family: "Songti SC", serif; font-size: clamp(2rem,4vw,3rem); line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
.n5-entry-link p:last-child { max-width: 38rem; margin: 0; color: var(--path-muted); line-height: 1.75; }
.n5-entry-link .primary-action { display: inline-flex; align-items: center; justify-content: center; min-width: 11rem; text-decoration: none; }
.exam-page-intro h1 { max-width: 10ch; }
.exam-back-link { display: inline-block; margin-top: 1.05rem; color: var(--path-accent-dark); font-size: .82rem; font-weight: 720; text-underline-offset: .2em; }
.n5-exam-program { margin-top: 3.6rem; padding-top: 2.5rem; border-top: 1px solid var(--path-line); }
.n5-exam-program.is-standalone { margin-top: .5rem; padding-top: 0; border-top: 0; }
.n5-exam-program.is-standalone .exam-route-summary { margin-bottom: 1rem; }
.exam-program-head { display: grid; grid-template-columns: minmax(18rem,.8fr) minmax(28rem,1.2fr); gap: clamp(2rem,5vw,4.5rem); align-items: end; margin-bottom: 1.5rem; }
.exam-program-copy h2 { max-width: 13ch; margin: .35rem 0 .7rem; scroll-margin-top: calc(var(--site-nav-height) + 1rem); font-family: "Songti SC", serif; font-size: clamp(2.4rem,4vw,3.65rem); line-height: 1.03; letter-spacing: -.05em; text-wrap: balance; }
.exam-program-copy > p:last-child { max-width: 38rem; margin: 0; color: var(--path-muted); line-height: 1.75; text-wrap: pretty; }
.exam-route-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); }
.exam-route-summary span { min-width: 0; padding: 1rem .9rem; border-left: 1px solid var(--path-line); color: var(--path-muted); font-size: .72rem; }
.exam-route-summary span:first-child { border-left: 0; }
.exam-route-summary b { display: block; margin-bottom: .15rem; color: var(--path-ink); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.n4-continuation { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.4rem; align-items: center; margin-top: 1.2rem; padding: clamp(1.3rem,3vw,2rem); border: 1px solid var(--path-line); border-radius: 1.4rem; background: linear-gradient(145deg,rgba(255,253,249,.94),rgba(247,232,220,.8)); }
.n4-continuation h2 { margin: .2rem 0 .5rem; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(1.8rem,3vw,2.5rem); line-height: 1.08; }
.n4-continuation p:last-child { max-width: 42rem; margin: 0; color: var(--path-muted); line-height: 1.7; }
.n4-continuation .primary-action, .n4-boundary .primary-action { display: inline-flex; align-items: center; justify-content: center; color: white; text-decoration: none; white-space: nowrap; }
.n4-map-page { width: min(1180px,calc(100% - 2rem)); }
.n4-map-intro h1 { max-width: 11ch; }
.n4-map-summary { margin: 0 0 1.2rem; }
.n4-unit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.n4-unit-card { overflow: hidden; border: 1px solid var(--path-line); border-radius: 1.45rem; background: rgba(255,253,249,.86); box-shadow: 0 18px 45px rgba(104,69,48,.07); }
.n4-unit-card > header { min-height: 12.5rem; padding: 1.35rem 1.4rem; border-bottom: 1px solid var(--path-line); background: linear-gradient(150deg,rgba(247,232,220,.88),rgba(255,253,249,.72)); }
.n4-unit-card > header > span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.n4-unit-card h2 { max-width: 17ch; margin: .45rem 0 .55rem; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(1.55rem,2.6vw,2.15rem); line-height: 1.12; letter-spacing: -.03em; }
.n4-unit-card header p { margin: 0; color: var(--path-muted); font-size: .8rem; line-height: 1.7; }
.n4-lesson-list { padding: .5rem 1rem 1rem; }
.n4-lesson-card { border-bottom: 1px solid var(--path-line); }
.n4-lesson-card:last-child { border-bottom: 0; }
.n4-lesson-card summary { display: grid; grid-template-columns: 4.8rem minmax(0,1fr) auto; gap: .65rem; align-items: center; min-height: 4.6rem; cursor: pointer; list-style: none; }
.n4-lesson-card summary::-webkit-details-marker { display: none; }
.n4-lesson-card summary > span { color: var(--path-accent-dark); font-size: .66rem; font-weight: 800; }
.n4-lesson-card summary > b { font-size: .83rem; line-height: 1.45; }
.n4-lesson-card summary > i { color: var(--path-accent-dark); font-size: 1.15rem; font-style: normal; transition: transform 180ms ease; }
.n4-lesson-card[open] summary > i { transform: rotate(45deg); }
.n4-lesson-card > div { padding: 0 0 1.1rem 5.45rem; }
.n4-lesson-card > div > small { color: var(--path-accent-dark); font-size: .62rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.n4-lesson-card > div > p { margin: .35rem 0 .8rem; color: var(--path-muted); font-size: .76rem; line-height: 1.7; }
.n4-lesson-card ul { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0 0; padding: 0; list-style: none; }
.n4-lesson-card li { padding: .32rem .5rem; border-radius: .45rem; background: var(--path-soft); color: var(--path-muted); font-size: .66rem; }
.n4-study-loop { margin-top: 1.2rem; padding: clamp(1.4rem,3vw,2.2rem); border: 1px solid var(--path-line); border-radius: 1.45rem; background: rgba(255,253,249,.78); }
.n4-study-loop h2 { margin: .2rem 0 1rem; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(1.8rem,3vw,2.5rem); }
.n4-study-loop > div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--path-line); border-left: 1px solid var(--path-line); }
.n4-study-loop span { min-height: 6.5rem; padding: .85rem; border-right: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); color: var(--path-muted); font-size: .74rem; line-height: 1.55; }
.n4-study-loop span b { display: block; margin-bottom: .6rem; color: var(--path-accent-dark); font-family: ui-monospace,monospace; font-size: .68rem; }
.n4-boundary { margin-top: 1.2rem; }
.textbook-course-page { width: min(1180px,calc(100% - 2rem)); }
.textbook-course-intro { grid-template-columns: 1fr; min-height: 16rem; padding-block: 2rem 2.5rem; }
.textbook-course-intro h1 { max-width: 18ch; font-size: clamp(2.4rem,5vw,3.8rem); line-height: 1.03; letter-spacing: -.04em; }
.textbook-course-summary { margin-bottom: 1rem; }
.textbook-course-tabs { width: fit-content; margin: 0 0 1rem; }
.textbook-course-panel { min-height: 24rem; scroll-margin-top: calc(var(--site-nav-height) + 1rem); }
.textbook-course-panel > .n4-unit-grid { grid-template-columns: 1fr; }
.textbook-entry-panel { display: grid; grid-template-columns: minmax(17rem,.72fr) minmax(0,1.28fr); gap: 1rem 2rem; padding: clamp(1.4rem,3vw,2.2rem); border: 1px solid var(--path-line); border-radius: 1.45rem; background: rgba(255,253,249,.82); }
.textbook-entry-panel > div:first-child h2 { max-width: 16ch; margin: .25rem 0 .7rem; font-family: "Songti SC","Yu Mincho",serif; font-size: clamp(1.9rem,3.5vw,2.8rem); line-height: 1.08; }
.textbook-entry-panel > div:first-child p:last-child { margin: 0; color: var(--path-muted); line-height: 1.8; }
.textbook-entry-panel ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 0; border-top: 1px solid var(--path-line); border-left: 1px solid var(--path-line); list-style: none; }
.textbook-entry-panel li { display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: .65rem; min-height: 9rem; padding: .9rem; border-right: 1px solid var(--path-line); border-bottom: 1px solid var(--path-line); }
.textbook-entry-panel li > span { color: var(--path-accent-dark); font-family: ui-monospace,monospace; font-size: .68rem; font-weight: 820; }
.textbook-entry-panel li b { font-size: .82rem; }
.textbook-entry-panel li p { margin: .45rem 0 0; color: var(--path-muted); font-size: .72rem; line-height: 1.65; }
.textbook-entry-panel > .primary-action { grid-column: 1; justify-self: start; color: white; text-decoration: none; }
.textbook-course-loop { margin-top: 1.2rem; }
.textbook-course-boundary .primary-action { display: inline-flex; align-items: center; color: white; text-decoration: none; white-space: nowrap; }
.textbook-course-link { display: inline-flex; align-items: center; margin-top: 1rem; color: var(--path-accent-dark); font-size: .78rem; font-weight: 780; text-underline-offset: .2em; }
.n4-lesson-card summary > b > small { display: block; margin-top: .18rem; color: var(--path-green); font-size: .6rem; font-weight: 760; letter-spacing: .04em; }
.textbook-lesson-content { margin: 1.2rem 0 0; padding: clamp(1rem,2.5vw,1.6rem); border: 1px solid var(--path-line); border-radius: 1rem; background: #fffdf9; }
.textbook-lesson-content small { color: var(--path-accent-dark); font-size: .62rem; font-weight: 820; letter-spacing: .07em; text-transform: uppercase; }
.textbook-pattern { padding: 1rem; border: 1px solid var(--path-line); border-radius: .75rem; background: var(--path-soft); }
.textbook-pattern code { display: block; margin-top: .45rem; color: var(--path-ink); font-family: ui-monospace,monospace; font-size: .88rem; font-weight: 760; white-space: normal; }
.textbook-pattern p { margin: .65rem 0 0; color: var(--path-muted); font-size: .78rem; line-height: 1.75; }
.textbook-sentence-block, .textbook-vocabulary, .textbook-dialogue, .textbook-quiz { margin-top: 1.25rem; }
.textbook-sentence-block > article, .textbook-dialogue > article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .75rem; align-items: center; margin-top: .55rem; padding: .85rem 0; border-bottom: 1px solid var(--path-line); }
.textbook-sentence-block > article:last-child, .textbook-dialogue > article:last-child { border-bottom: 0; }
.textbook-sentence-block strong, .textbook-dialogue strong { display: block; font-family: var(--kana-print-font); font-size: 1.05rem; line-height: 1.55; }
.textbook-sentence-block span, .textbook-dialogue span, .textbook-vocabulary span { display: block; margin-top: .18rem; color: var(--path-accent-dark); font-size: .68rem; }
.textbook-sentence-block p, .textbook-dialogue p, .textbook-vocabulary p { margin: .25rem 0 0; color: var(--path-muted); font-size: .72rem; line-height: 1.55; }
.textbook-audio-button { min-height: 2.45rem; border: 1px solid var(--path-line); border-radius: .65rem; background: white; color: var(--path-accent-dark); padding: .55rem .7rem; cursor: pointer; font-size: .66rem; font-weight: 760; }
.textbook-audio-button:hover { border-color: var(--path-accent); background: #fff4ec; }
.textbook-audio-button:focus-visible, .textbook-quiz button:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 3px; }
.textbook-vocabulary > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-top: .65rem; }
.textbook-vocabulary article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55rem; align-items: center; padding: .75rem; border: 1px solid var(--path-line); border-radius: .75rem; background: white; }
.textbook-vocabulary strong { font-family: var(--kana-print-font); font-size: 1rem; }
.textbook-dialogue > article { grid-template-columns: 1.8rem minmax(0,1fr) auto; }
.textbook-dialogue > article > b { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: var(--path-accent); color: white; font-size: .65rem; }
.textbook-quiz { padding: 1rem; border-radius: .85rem; background: rgba(247,232,220,.62); }
.textbook-quiz > p { margin: .45rem 0 .75rem; font-weight: 720; line-height: 1.55; }
.textbook-quiz > div { display: grid; gap: .45rem; }
.textbook-quiz button { min-height: 2.8rem; border: 1px solid var(--path-line); border-radius: .7rem; background: white; color: var(--path-ink); padding: .65rem .75rem; cursor: pointer; text-align: left; }
.textbook-quiz button.is-correct { border-color: rgba(82,113,95,.45); background: #edf4ef; color: var(--path-green); }
.textbook-quiz button.is-wrong { border-color: rgba(216,136,111,.58); background: #fff0ea; }
.textbook-quiz > strong { display: block; margin-top: .65rem; color: var(--path-muted); font-size: .72rem; line-height: 1.55; }
.textbook-quiz > strong.is-correct { color: var(--path-green); }
.textbook-quiz > strong.is-wrong { color: var(--path-accent-dark); }
.textbook-lesson-details { display: grid; gap: 1rem; margin-top: 1rem; }
.textbook-detail-section, .textbook-detail-disclosure, .textbook-culture { padding-top: 1rem; border-top: 1px solid var(--path-line); }
.textbook-detail-section > h4, .textbook-culture > h4 { margin: 0 0 .8rem; font-size: .82rem; }
.textbook-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.textbook-detail-grid article { padding: .9rem; border: 1px solid var(--path-line); border-radius: .8rem; background: rgba(255,253,249,.82); }
.textbook-detail-grid h5 { margin: 0 0 .4rem; font-size: .82rem; line-height: 1.45; }
.textbook-detail-grid code { display: block; color: var(--path-accent-dark); font-size: .72rem; white-space: normal; }
.textbook-detail-grid p { margin: .55rem 0; color: var(--path-muted); font-size: .75rem; line-height: 1.65; }
.textbook-detail-grid ul, .textbook-culture ul { display: grid; gap: .45rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.textbook-detail-grid li, .textbook-culture li { display: grid; gap: .15rem; }
.textbook-detail-grid li b, .textbook-culture li b { font-family: var(--kana-print-font); font-size: .83rem; }
.textbook-detail-grid li span, .textbook-culture li span { color: var(--path-muted); font-size: .7rem; line-height: 1.45; }
.textbook-detail-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.2rem; cursor: pointer; list-style: none; }
.textbook-detail-disclosure summary::-webkit-details-marker { display: none; }
.textbook-detail-disclosure summary b { font-size: .82rem; }
.textbook-detail-disclosure summary span { color: var(--path-accent-dark); font-size: .7rem; }
.textbook-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.textbook-detail-disclosure table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.textbook-detail-disclosure th, .textbook-detail-disclosure td { padding: .55rem .65rem; border: 1px solid var(--path-line); text-align: left; white-space: nowrap; }
.textbook-detail-disclosure th { background: #f6ebe3; }
.textbook-detail-disclosure > p { color: var(--path-muted); font-size: .72rem; line-height: 1.55; }
.textbook-detail-vocabulary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.textbook-detail-vocabulary li { display: grid; padding: .65rem; border: 1px solid var(--path-line); border-radius: .65rem; background: #fff; }
.textbook-detail-vocabulary b { font-family: var(--kana-print-font); font-size: .82rem; }
.textbook-detail-vocabulary span { color: var(--path-accent-dark); font-size: .65rem; }
.textbook-detail-vocabulary small { margin-top: .2rem; color: var(--path-muted); font-size: .66rem; line-height: 1.4; }
.textbook-practice-route { display: grid; gap: .45rem; margin: 0; padding-left: 1.35rem; color: var(--path-muted); font-size: .75rem; line-height: 1.55; }
.textbook-culture { padding: 1rem; border: 1px solid var(--path-line); border-radius: .8rem; background: #fff8f1; }
.textbook-culture h5 { margin: .2rem 0 .5rem; font-family: "Songti SC","Yu Mincho",serif; font-size: 1rem; line-height: 1.45; }
.textbook-culture > p { margin: 0; color: var(--path-muted); font-size: .75rem; line-height: 1.65; }
.textbook-culture > div { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.textbook-culture a { color: var(--path-accent-dark); font-size: .68rem; text-underline-offset: .2em; }
.textbook-unit-supplement { margin: 0 1rem 1rem; border-top: 1px solid var(--path-line); }
.textbook-unit-supplement > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; cursor: pointer; list-style: none; }
.textbook-unit-supplement > summary::-webkit-details-marker { display: none; }
.textbook-unit-supplement > summary b { font-size: .8rem; }
.textbook-unit-supplement > summary span { color: var(--path-accent-dark); font-size: .7rem; }
.textbook-unit-supplement > div { display: grid; gap: 1rem; padding: 0 0 .5rem; }
.textbook-unit-supplement section > h3 { margin: 0 0 .7rem; font-size: .82rem; }
.textbook-supplement-scenarios { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.textbook-supplement-scenarios > article { padding: .9rem; border: 1px solid var(--path-line); border-radius: .8rem; background: #fffdf9; }
.textbook-supplement-scenarios h4 { margin: 0 0 .35rem; font-size: .86rem; }
.textbook-supplement-scenarios > article > p { margin: 0 0 .7rem; color: var(--path-muted); font-size: .72rem; line-height: 1.55; }
.textbook-supplement-exchange { display: grid; gap: .35rem; padding: .55rem 0; border-top: 1px solid var(--path-line); }
.textbook-supplement-exchange p { display: grid; grid-template-columns: 1.3rem 1fr; gap: .15rem .4rem; margin: 0; }
.textbook-supplement-exchange p b { grid-row: 1 / span 2; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--path-soft); color: var(--path-accent-dark); font-size: .58rem; }
.textbook-supplement-exchange p span { font-family: var(--kana-print-font); font-size: .76rem; }
.textbook-supplement-exchange p small { grid-column: 2; color: var(--path-muted); font-size: .65rem; }
.textbook-currency-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem !important; }
.textbook-currency-grid > span { display: grid; padding: .65rem; border: 1px solid var(--path-line); border-radius: .65rem; background: #fff; }
.textbook-currency-grid b { font-variant-numeric: tabular-nums; }
.textbook-currency-grid small { color: var(--path-accent-dark); }
.textbook-currency-grid i { margin-top: .2rem; color: var(--path-muted); font-size: .66rem; font-style: normal; }
.textbook-topic-word-group { margin-top: .8rem; }
.textbook-topic-word-group h5 { margin: 0 0 .5rem; color: var(--path-accent-dark); font-size: .72rem; }
.textbook-sign-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem !important; }
.textbook-sign-grid article { display: grid; grid-template-columns: minmax(4rem,.7fr) minmax(5rem,1fr); gap: .2rem .6rem; padding: .75rem; border: 1px solid var(--path-line); border-radius: .7rem; background: #fff; }
.textbook-sign-grid article b { grid-row: 1 / span 2; align-self: center; font-family: var(--kana-print-font); font-size: 1rem; }
.textbook-sign-grid article span { color: var(--path-accent-dark); font-size: .68rem; }
.textbook-sign-grid article strong { font-size: .74rem; }
.textbook-sign-grid article small { grid-column: 1 / -1; margin-top: .25rem; color: var(--path-muted); font-size: .65rem; line-height: 1.55; }
.textbook-letter { display: grid !important; gap: .55rem !important; padding: .8rem; border: 1px solid var(--path-line); border-radius: .75rem; background: #fff; }
.textbook-letter p { display: grid; gap: .2rem; margin: 0; padding-bottom: .55rem; border-bottom: 1px solid var(--path-line); }
.textbook-letter p:last-child { padding-bottom: 0; border-bottom: 0; }
.textbook-letter b { font-family: var(--kana-print-font); font-size: .78rem; line-height: 1.75; }
.textbook-letter span { color: var(--path-muted); font-size: .67rem; line-height: 1.55; }
.textbook-reference-grid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem !important; }
.textbook-reference-grid article { display: grid; gap: .2rem; padding: .75rem; border: 1px solid var(--path-line); border-radius: .7rem; background: #fff; }
.textbook-reference-grid small { color: var(--path-accent-dark); font-size: .64rem; }
.textbook-reference-grid b { font-size: .84rem; }
.textbook-reference-grid span { color: var(--path-muted); font-size: .64rem; line-height: 1.5; }
.exam-workbench { border-radius: 1.55rem; }
.exam-track-tabs { display: flex; gap: .3rem; margin: 0; padding: .45rem; overflow-x: auto; border-bottom: 1px solid var(--path-line); background: rgba(247,232,220,.46); scrollbar-width: none; }
.exam-track-tabs::-webkit-scrollbar { display: none; }
.exam-track-tabs button { flex: 1 0 8.5rem; min-height: 3.25rem; border: 0; border-radius: .9rem; background: transparent; color: var(--path-muted); padding: .7rem 1rem; cursor: pointer; font-weight: 740; transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.exam-track-tabs button span { margin-right: .4rem; color: #a6968c; font-size: .64rem; font-weight: 850; letter-spacing: .08em; }
.exam-track-tabs button:hover { color: var(--path-ink); }
.exam-track-tabs button:active { transform: scale(.985); }
.exam-track-tabs button:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 1px; }
.exam-track-tabs button.is-active { background: var(--path-card); color: var(--path-accent-dark); box-shadow: 0 6px 18px rgba(104,69,48,.1); }
.exam-track-tabs button.is-active span { color: var(--path-accent-dark); }
.exam-track-content { padding: clamp(1.4rem,4vw,2.5rem); }
.official-standard-note { margin-top: .85rem; overflow: hidden; border: 1px solid var(--path-line); border-radius: 1rem; background: rgba(255,253,249,.58); }
.official-standard-note summary { position: relative; display: flex; gap: .8rem; align-items: center; padding: .9rem 3.1rem .9rem 1rem; cursor: pointer; color: var(--path-muted); list-style: none; }
.official-standard-note summary::-webkit-details-marker { display: none; }
.official-standard-note summary::after { position: absolute; right: 1rem; content: "+"; color: var(--path-accent-dark); font-size: 1.25rem; font-weight: 500; transition: transform 180ms ease; }
.official-standard-note[open] summary::after { transform: rotate(45deg); }
.official-standard-note summary span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 850; letter-spacing: .1em; }
.official-standard-note summary strong { color: var(--path-ink); font-size: .82rem; }
.official-standard-body { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 1.2rem; align-items: center; padding: 0 1rem 1rem; }
.official-time-grid { display: grid; grid-template-columns: repeat(3,auto); }
.official-time-grid span { min-width: 5.8rem; padding: .65rem .8rem; border-left: 1px solid var(--path-line); color: var(--path-muted); font-size: .68rem; }
.official-time-grid span:first-child { border-left: 0; }
.official-time-grid b { display: block; color: var(--path-ink); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.official-pass-line { padding: .65rem .8rem; border: 1px solid var(--path-line); border-radius: .6rem; background: rgba(247,232,220,.65); color: var(--path-muted); font-size: .74rem; line-height: 1.6; }
.official-pass-line b { color: var(--path-ink); }
.official-source-links { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .55rem; color: var(--path-muted); font-size: .7rem; }
.official-source-links a { color: var(--path-accent-dark); }
.track-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.track-heading h2, .track-heading h3 { margin: .3rem 0 0; font-family: "Songti SC", serif; font-size: 2rem; }
.track-heading > strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
#appendix-content { padding: clamp(1.25rem,2.5vw,2rem); }
#appendix-content .track-heading { margin-bottom: 1rem; }
#appendix-content .n4-lesson-list { padding: 0; }
.appendix-lesson-link { display: grid; grid-template-columns: 5rem minmax(12rem,.78fr) minmax(0,1.22fr); gap: 1rem; align-items: center; min-height: 5.25rem; padding: .9rem .75rem; border-bottom: 1px solid var(--path-line); color: var(--path-ink); text-decoration: none; transition: background 180ms ease, color 180ms ease; }
.appendix-lesson-link:last-child { border-bottom: 0; }
.appendix-lesson-link > b { color: var(--path-accent-dark); font-size: .68rem; font-weight: 820; letter-spacing: .02em; }
.appendix-lesson-link > strong { min-width: 0; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.appendix-lesson-link > p { min-width: 0; margin: 0; color: var(--path-muted); font-size: .78rem; line-height: 1.65; text-wrap: pretty; }
.appendix-lesson-link:hover { background: rgba(247,232,220,.42); color: var(--path-accent-dark); }
.appendix-lesson-link:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: -3px; border-radius: .75rem; }
.appendix-intro-copy { max-width: 66ch; margin: 0 0 1.2rem; color: var(--path-muted); font-size: .84rem; line-height: 1.7; }
#appendix-content .cta-row { margin-top: .8rem; }
#appendix-content .primary-action, #appendix-content .secondary-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
#appendix-content .textbook-reference-grid > span { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .2rem .55rem; align-items: center; min-width: 0; padding: .75rem; border: 1px solid var(--path-line); border-radius: .7rem; background: #fff; }
#appendix-content .textbook-reference-grid > span > b, #appendix-content .textbook-reference-grid > span > small, #appendix-content .textbook-reference-grid > span > em { min-width: 0; overflow-wrap: anywhere; }
#appendix-content .textbook-reference-grid > span > b { grid-column: 1; }
#appendix-content .textbook-reference-grid > span > small { grid-column: 1; }
#appendix-content .textbook-reference-grid > span > em { grid-column: 1; color: var(--path-muted); font-size: .68rem; font-style: normal; line-height: 1.5; }
#appendix-content .textbook-reference-grid > span > .textbook-audio-button { grid-column: 2; grid-row: 1 / span 3; min-height: 2.25rem; }
.appendix-sound-heading { margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--path-line); }
.grammar-coverage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.grammar-point-card { position: relative; padding: 1.1rem; border: 1px solid var(--path-line); border-radius: 1rem; background: white; }
.grammar-point-card.is-complete { background: #eef5f0; border-color: rgba(82,113,95,.35); }
.grammar-point-card > span { color: var(--path-accent-dark); font-size: .68rem; font-weight: 850; }
.grammar-point-card h4 { margin: .35rem 0; font-size: 1rem; }
.grammar-point-card code { display: block; color: var(--path-accent-dark); font-family: ui-monospace, monospace; font-size: .75rem; }
.grammar-point-card p { color: var(--path-muted); font-size: .78rem; line-height: 1.6; }
.grammar-point-card strong { display: block; font-size: .8rem; }
.grammar-point-card button { margin-top: .8rem; border: 1px solid var(--path-line); border-radius: .6rem; background: var(--path-card); color: var(--path-ink); padding: .5rem .7rem; cursor: pointer; font-size: .72rem; font-weight: 720; }
.grammar-point-card.is-complete button { color: var(--path-green); }
.grammar-mini-check { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--path-line); }
.grammar-mini-check p { margin: 0 0 .5rem; color: var(--path-ink); font-weight: 700; }
.grammar-mini-check button { display: block; width: 100%; margin-top: .35rem; text-align: left; }
.grammar-mini-check button.is-correct { border-color: #6e927c; background: #eef5f0; }
.grammar-mini-check button.is-wrong { border-color: #d8886f; background: #fff0ea; }
.grammar-mini-feedback { display: block; margin-top: .55rem; color: var(--path-accent-dark); font-size: .75rem; font-weight: 700; }
.drill-set-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.drill-set-list button { border: 1px solid var(--path-line); border-radius: 1rem; background: white; color: var(--path-ink); padding: 1rem; cursor: pointer; text-align: left; }
.drill-set-list b, .drill-set-list span { display: block; }
.drill-set-list span { margin-top: .45rem; color: var(--path-muted); font-size: .75rem; line-height: 1.55; }
.exam-runner { padding-top: .5rem; }
.exam-source { max-height: 16rem; overflow-y: auto; margin: 1rem 0; padding: 1rem; border-radius: .8rem; background: #f5ede5; white-space: pre-wrap; color: var(--path-muted); font-size: .86rem; line-height: 1.75; }
.exam-scene-visual { display: grid; place-items: center; gap: .35rem; width: min(100%, 18rem); min-height: 9rem; margin: 1rem auto; border: 1px solid var(--path-line); border-radius: 1.1rem; background: linear-gradient(145deg,#fff8ef,#f5e8dc); }
.exam-scene-visual[hidden] { display: none; }
.exam-scene-visual span { font-size: 4.2rem; line-height: 1; }
.exam-scene-visual small { color: var(--path-muted); font-size: .72rem; font-weight: 680; }
.exam-runner .question-prompt { font-size: clamp(1.4rem,3vw,2.1rem); }
.answer-grid[data-official-item-type="quick-response"] { grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 34rem; }
.answer-grid[data-official-item-type="verbal-expressions"] { grid-template-columns: repeat(4,minmax(0,1fr)); max-width: 42rem; }
.answer-option.is-audio-choice { min-height: 4.6rem; text-align: center; }
.answer-option.is-audio-choice b { font-family: ui-monospace, monospace; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.answer-option.is-audio-choice small { display: block; margin-top: .2rem; font-size: .68rem; }
.answer-option.is-selected { border-color: var(--path-accent); background: #fff3eb; }
.mock-next-action { display: block; margin: 1.2rem 0 0 auto; }
#mock-intro > p { max-width: 50rem; color: var(--path-muted); line-height: 1.8; }
.mock-history { display: grid; gap: .45rem; margin-top: 1rem; }
.mock-history span { padding: .65rem .8rem; border-radius: .6rem; background: #f5ede5; color: var(--path-muted); font-size: .76rem; }
.mock-result-card { max-width: 38rem; margin: 2rem auto; text-align: center; }
.mock-result-card h3 { margin: .4rem 0 1rem; font-family: "Songti SC", serif; font-size: 4rem; }
.mock-result-card > div { display: flex; justify-content: center; gap: 1rem; }
.mock-result-card > div span { padding: .75rem; border-radius: .7rem; background: #f5ede5; color: var(--path-muted); }
.mock-result-card p { color: var(--path-muted); }

.simple-footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 3rem; color: var(--path-muted); font-size: .8rem; }
.simple-footer a { color: inherit; }

@media (max-width: 860px) {
  .site-nav-inner { grid-template-columns: auto 1fr; gap: .8rem; padding: .6rem 0; }
  .site-nav-steps { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; padding-bottom: .15rem; }
  .site-nav-tools { justify-self: end; }
  .site-language { display: none; }
  .stage-intro { grid-template-columns: 1fr; }
  .home-session { grid-template-columns: 1fr; min-height: 0; }
  .home-session-progress { border-top: 1px solid var(--path-line); border-left: 0; }
  .home-route-heading, .home-chapter-heading { grid-template-columns: 1fr; }
  .home-route-heading > p, .home-chapter-heading > p { grid-column: 1; grid-row: auto; }
  .home-route-steps { grid-template-columns: 1fr; }
  .home-route-steps li { grid-template-rows: auto; min-height: 0; border-top: 1px solid var(--path-line); border-left: 0; }
  .home-route-steps li:first-child { border-top: 0; }
  .home-route-steps li::before { width: 3px; height: 100%; }
  .home-route-more { grid-template-columns: 1fr; }
  .stage-session { grid-template-columns: 1fr; }
  .stage-session-progress { padding: 1.4rem 0 0; border-top: 1px solid var(--path-line); border-left: 0; }
  .stage-content-heading { grid-template-columns: 1fr; align-items: start; }
  .entry-course-heading, .entry-listening-heading, .entry-greetings-heading { grid-template-columns: 1fr; }
  .entry-course-heading .stage-kicker, .entry-course-heading h2, .entry-course-heading > p:last-child, .entry-listening-heading .stage-kicker, .entry-listening-heading h2, .entry-listening-heading > p:last-child, .entry-greetings-heading .stage-kicker, .entry-greetings-heading h2, .entry-greetings-heading > p:last-child { grid-column: 1; grid-row: auto; }
  .entry-course-heading > p:last-child, .entry-listening-heading > p:last-child, .entry-greetings-heading > p:last-child { margin-top: .8rem; }
  .entry-course-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .entry-greeting-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .exam-vocab-head { grid-template-columns: 1fr; }
  .stage-progress { text-align: left; }
  .kana-layout, .travel-layout, .kana-rules-section { grid-template-columns: 1fr; }
  .kana-rules-intro { grid-template-columns: 1fr; }
  .kana-rules-intro .stage-kicker, .kana-rules-intro h2, .kana-rules-intro > p:last-of-type, .kana-rules-start, .kana-rules-intro ol { grid-column: 1; }
  .kana-rules-intro ol { grid-row: auto; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 1rem; }
  .kana-rules-intro li { align-items: flex-start; flex-direction: column; }
  .kana-rule-grid { grid-template-columns: 1fr; }
  .kana-rule-steps { flex-direction: row; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
  .kana-rule-steps::-webkit-scrollbar { display: none; }
  .kana-rule-steps button { flex: 0 0 11.5rem; }
  .kana-word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kana-context-grid { grid-template-columns: 1fr; }
  .kana-focus { min-height: 22rem; border-right: 0; border-bottom: 1px solid var(--path-line); }
  .scenario-list { flex-direction: row; overflow-x: auto; }
  .scenario-button { min-width: 10rem; }
  .n5-entry-link { grid-template-columns: 1fr; gap: 1.2rem; }
  .n5-entry-link .primary-action { justify-self: start; }
  .exam-program-head { grid-template-columns: 1fr; gap: 1.4rem; }
  .exam-route-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .exam-route-summary span:nth-child(3) { border-left: 0; border-top: 1px solid var(--path-line); }
  .exam-route-summary span:nth-child(4) { border-top: 1px solid var(--path-line); }
  .n4-continuation { grid-template-columns: 1fr; }
  .n4-continuation .primary-action { justify-self: start; }
  .n4-unit-grid { grid-template-columns: 1fr; }
  .n4-study-loop > div { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .textbook-entry-panel { grid-template-columns: 1fr; }
  .textbook-entry-panel > .primary-action { grid-column: 1; }
  .textbook-detail-grid { grid-template-columns: 1fr; }
  .textbook-detail-vocabulary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .textbook-supplement-scenarios { grid-template-columns: 1fr; }
  .official-standard-body { grid-template-columns: 1fr; }
  .official-time-grid { justify-content: start; }
  .grammar-coverage-grid { grid-template-columns: 1fr; }
  .drill-set-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --site-nav-height: 104px; }
  .textbook-table-scroll { width: 100%; overflow-x: visible; }
  .textbook-table-scroll table { width: 100%; table-layout: fixed; }
  .textbook-detail-disclosure .textbook-table-scroll th, .textbook-detail-disclosure .textbook-table-scroll td { padding: .5rem .35rem; white-space: normal; overflow-wrap: anywhere; word-break: normal; vertical-align: top; }
  .site-nav-inner { width: min(100% - 1rem, 1180px); }
  .site-brand span { display: none; }
  .site-nav-steps a { font-size: .76rem; }
  .site-nav-steps i { width: .7rem; margin: 0 .35rem; }
  .learning-page { width: min(100% - 1rem, 1120px); padding-top: 2.4rem; }
  .stage-intro h1 { font-size: 3rem; }
  .home-session { gap: 1.5rem; padding: 1.4rem; border-radius: 1.5rem; }
  .home-session h1 { font-size: 2.85rem; }
  .home-session .home-next-action { width: 100%; }
  .home-teacher-note { grid-template-columns: 1fr; }
  .home-teacher-note span { justify-self: start; }
  .home-session-progress { padding: 1.2rem 0 0; }
  .home-progress-stats div { padding-inline: .55rem; }
  .home-progress-stats dt { min-height: 2em; }
  .home-script-progress { gap: .65rem; }
  .home-week-strip { gap: .28rem; }
  .home-route { padding: 1.1rem; border-radius: 1.4rem; }
  .home-route-heading h2, .home-chapter-heading h2 { font-size: 2.05rem; }
  .home-route-steps li { padding: 1.25rem .6rem 1.25rem 1rem; }
  .home-route-more > a { align-items: flex-start; flex-direction: column; }
  .home-chapter-heading { margin-top: 4rem; }
  .stage-session { gap: 1.5rem; min-height: 0; padding: 1.4rem; border-radius: 1.25rem; }
  .stage-session h1 { font-size: 2.7rem; }
  .stage-session .home-next-action { width: 100%; }
  .stage-teacher-note { grid-template-columns: 1fr; }
  .stage-progress-stats div { padding-inline: .5rem; }
  .stage-progress-stats dt { min-height: 2em; }
  .stage-content-heading { margin-top: 3.5rem; }
  .stage-content-heading h2 { font-size: 2rem; }
  .stage-session-summary { align-items: stretch; flex-direction: column; }
  .stage-session-summary .primary-action { width: 100%; }
  .textbook-course-intro h1 { font-size: 2.35rem; }
  .entry-course-steps, .entry-listening-grid, .entry-greeting-grid { grid-template-columns: 1fr; }
  .entry-course-steps li { min-height: 0; }
  .entry-lesson-loop i { display: none; }
  .entry-lesson-loop span { flex: 0 0 100%; }
  .entry-listening-grid article { grid-template-columns: 1fr; }
  .entry-listening-grid button { grid-column: 1; grid-row: auto; width: 100%; margin-top: .5rem; }
  .surface-toolbar { align-items: flex-start; flex-direction: column; }
  .kana-board { padding: .8rem; }
  .kana-grid { gap: .4rem; }
  .kana-card { min-height: 3.9rem; border-radius: .75rem; }
  .kana-card-print { font-size: 1.5rem; }
  .kana-card-hand { font-size: .95rem; }
  .kana-rules-intro ol { grid-template-columns: 1fr; }
  .kana-rules-intro li { align-items: center; flex-direction: row; }
  .kana-rule-lesson { min-height: 0; padding: 1rem; }
  .kana-rule-rhythm { grid-template-columns: 1fr; }
  .kana-rule-rhythm > span { grid-row: auto; }
  .kana-rule-change { gap: .45rem; }
  .kana-rule-change span, .kana-rule-change strong { min-height: 4.8rem; border-radius: .8rem; }
  .kana-rule-real-word { align-items: stretch; flex-direction: column; }
  .kana-rule-listen { width: 100%; }
  .kana-rule-mini-check > div { grid-template-columns: 1fr; }
  .kana-word-heading { align-items: flex-start; flex-direction: column; }
  .kana-word-heading-actions { width: 100%; align-items: stretch; }
  .kana-word-heading-actions strong { text-align: left; }
  .kana-word-toggle { width: 100%; }
  .kana-word-grid { grid-template-columns: 1fr; }
  .kana-context-heading { grid-template-columns: 1fr; }
  .stage-gate { align-items: stretch; flex-direction: column; }
  .n4-study-loop > div { grid-template-columns: 1fr; }
  .n4-study-loop span { min-height: 0; }
  .n4-lesson-card summary { grid-template-columns: 4.2rem minmax(0,1fr) auto; }
  .n4-lesson-card > div { padding-left: 4.85rem; }
  .textbook-course-tabs { display: grid; width: 100%; }
  .textbook-entry-panel ol { grid-template-columns: 1fr; }
  .textbook-entry-panel li { min-height: 0; }
  .textbook-vocabulary > div { grid-template-columns: 1fr; }
  .textbook-detail-vocabulary { grid-template-columns: 1fr; }
  .textbook-currency-grid { grid-template-columns: 1fr; }
  .textbook-sign-grid { grid-template-columns: 1fr; }
  .textbook-reference-grid { grid-template-columns: 1fr; }
  .textbook-sentence-block > article, .textbook-dialogue > article { grid-template-columns: 1fr; }
  .textbook-dialogue > article > b { margin-bottom: .2rem; }
  .textbook-audio-button { width: 100%; }
  .answer-grid { grid-template-columns: 1fr; }
  .quiz-stage { padding: 1.2rem; }
  .feedback-bar { margin: 1.2rem -1.2rem -1.2rem; padding: 1rem 1.2rem; }
  .phrase-card { grid-template-columns: auto 1fr; }
  .listen-button { grid-column: 2; justify-self: start; }
  .exam-track-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
  .exam-track-tabs button { min-width: 0; }
  #appendix-content { padding: 1rem; }
  .appendix-lesson-link { grid-template-columns: 4.25rem minmax(0,1fr); gap: .35rem .75rem; min-height: 0; padding: .9rem .25rem; }
  .appendix-lesson-link > p { grid-column: 2; }
  #appendix-content .track-heading { align-items: flex-start; }
  #appendix-content .track-heading h2 { font-size: 1.65rem; }
  #appendix-content .textbook-reference-grid > span > .textbook-audio-button { width: auto; }
  .official-standard-note summary { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .official-time-grid { grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .official-time-grid span { min-width: 0; padding-inline: .6rem; }
}
/* Course-grounded question search */
.knowledge-page { max-width: 1520px; }
.entry-course-links { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.textbook-course-tools { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.textbook-course-links { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-end; }
.textbook-course-ask { flex: 0 0 auto; padding: 13px 18px; border: 1px solid var(--path-line); border-radius: 14px; background: #fffdfa; color: var(--path-accent-dark); font-size: 14px; font-weight: 800; text-decoration: none; }
.textbook-course-ask:hover { border-color: var(--path-accent); }
.knowledge-hero {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(480px, 1.1fr);
  grid-template-areas: "copy ask" "start ask";
  column-gap: clamp(42px, 6vw, 88px);
  row-gap: 12px;
  align-items: start;
  padding: clamp(52px, 7vw, 92px) clamp(24px, 5vw, 72px);
  border: 1px solid var(--path-line);
  border-radius: 42px;
  background: radial-gradient(circle at 84% 12%, rgba(223,98,71,.09), transparent 32%), var(--path-paper);
  box-shadow: 0 26px 70px rgba(81, 55, 40, .08);
}
.knowledge-hero-copy { grid-area: copy; }
.knowledge-hero-copy h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--path-ink);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.03;
  text-wrap: balance;
}
html[lang="en"] .knowledge-hero-copy h1 { font-size: clamp(38px, 4.5vw, 66px); letter-spacing: -.035em; }
.knowledge-hero-copy > p { max-width: 540px; margin: 20px 0 0; color: var(--path-muted); font-size: clamp(16px, 1.2vw, 19px); line-height: 1.7; }
.knowledge-start { grid-area: start; border-top: 1px solid var(--path-line); }
.knowledge-start-copy { padding: 22px 0 16px; }
.knowledge-start-copy h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.knowledge-start-copy p { margin: 8px 0 0; color: var(--path-muted); font-size: 14px; line-height: 1.65; }
.knowledge-start-links { border-bottom: 1px solid var(--path-line); }
.knowledge-start-links a { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 3px 10px; align-items: center; padding: 14px 0; border-top: 1px solid var(--path-line); color: var(--path-ink); text-decoration: none; }
.knowledge-start-links a:first-child { border-top: 0; }
.knowledge-start-links a > span { grid-row: 1 / span 2; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--path-soft); color: var(--path-accent-dark); font-size: 11px; font-weight: 850; }
.knowledge-start-links strong { font-size: 15px; }
.knowledge-start-links small { color: var(--path-muted); font-size: 12px; line-height: 1.45; }
.knowledge-start-links a:hover strong { color: var(--path-accent-dark); }
.knowledge-start-links a:focus-visible { outline: 3px solid rgba(223,98,71,.24); outline-offset: 4px; border-radius: 6px; }
.knowledge-ask { grid-area: ask; min-width: 0; align-self: center; }
.knowledge-search { align-self: center; }
.knowledge-search > label { display: block; margin: 0 0 14px; color: var(--path-ink); font-size: 15px; font-weight: 800; }
.knowledge-search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px; border: 1px solid rgba(76,57,47,.18); border-radius: 22px; background: #fffdfa; box-shadow: 0 18px 50px rgba(85, 54, 37, .09); }
.knowledge-search-row input { min-width: 0; height: 66px; padding: 0 20px; border: 0; outline: 0; background: transparent; color: var(--path-ink); font: inherit; font-size: 19px; }
.knowledge-search-row input::placeholder { color: #a49a93; }
.knowledge-search-row:focus-within { outline: 3px solid rgba(223,98,71,.22); border-color: var(--path-accent); }
.knowledge-search-row button { min-width: 126px; padding: 0 24px; border: 0; border-radius: 15px; background: var(--path-accent); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.knowledge-search-row button:hover { background: #c94f37; }
.knowledge-search-row button:disabled { cursor: wait; opacity: .62; }
.knowledge-privacy { margin: 14px 5px 0; color: var(--path-muted); font-size: 13px; line-height: 1.6; }
.knowledge-privacy span { color: var(--path-green); font-size: 9px; vertical-align: 2px; }
.knowledge-model-status { min-height: 22px; margin: 10px 5px 0; color: var(--path-accent-dark); font-size: 13px; font-weight: 700; line-height: 1.6; }
.knowledge-model-status[data-state="semantic"], .knowledge-model-status[data-state="direct"] { color: var(--path-green); }
.knowledge-thinking { display: flex; min-height: 220px; align-items: center; justify-content: center; border: 1px dashed rgba(76,57,47,.2); border-radius: 28px; color: var(--path-muted); font-size: 17px; }
.knowledge-suggestion-group { margin-top: 26px; }
.knowledge-suggestion-group > p { margin: 0 0 12px; color: var(--path-muted); font-size: 13px; font-weight: 700; }
.knowledge-suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.knowledge-suggestions button, .knowledge-related-list button { padding: 11px 16px; border: 1px solid rgba(76,57,47,.15); border-radius: 999px; background: rgba(255,255,255,.58); color: var(--path-ink); font: inherit; font-size: 14px; cursor: pointer; }
.knowledge-suggestions button:hover, .knowledge-related-list button:hover { border-color: var(--path-accent); color: #b8432d; background: #fff; }
.knowledge-results { scroll-margin-top: 90px; padding: clamp(52px, 7vw, 82px) clamp(8px, 3vw, 46px); }
.knowledge-results-head { display: flex; justify-content: space-between; gap: 32px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--path-line); }
.knowledge-results-head p { margin: 0 0 12px; color: var(--path-accent); font-size: 13px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.knowledge-results-head h2 { max-width: 860px; margin: 0; color: var(--path-ink); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; line-height: 1.14; }
.knowledge-question-echo { max-width: 70ch; margin: 12px 0 0; color: var(--path-muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.knowledge-ask-another { flex: 0 0 auto; padding: 10px 0; color: var(--path-accent-dark); font-size: 14px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.knowledge-answer { padding-top: 34px; }
.knowledge-empty, .knowledge-no-answer { padding: clamp(30px, 5vw, 64px); border: 1px dashed rgba(76,57,47,.2); border-radius: 28px; background: rgba(255,255,255,.48); }
.knowledge-empty strong, .knowledge-no-answer strong { color: var(--path-ink); font-size: clamp(22px, 2.4vw, 34px); }
.knowledge-empty p, .knowledge-no-answer p { margin: 12px 0 0; color: var(--path-muted); font-size: 16px; line-height: 1.7; }
.knowledge-answer-card { position: relative; padding: clamp(32px, 5vw, 70px); border: 1px solid var(--path-line); border-radius: 34px; background: #fffdfa; box-shadow: 0 24px 64px rgba(86, 58, 42, .07); }
.knowledge-answer-category { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(223,98,71,.1); color: #b74731; font-size: 12px; font-weight: 800; }
.knowledge-answer-card > h3 { max-width: 880px; margin: 24px 0 16px; color: var(--path-ink); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: clamp(30px, 3.7vw, 50px); font-weight: 600; line-height: 1.13; }
.knowledge-answer-copy { max-width: 1000px; margin: 0; color: #554942; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.85; }
.knowledge-example { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; margin-top: 34px; padding: 24px 0; border-block: 1px solid var(--path-line); }
.knowledge-example strong { color: var(--path-ink); font-family: "Noto Serif JP", "Yu Mincho", serif; font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; }
.knowledge-example span { color: var(--path-muted); font-size: 16px; }
.knowledge-answer-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.knowledge-play, .knowledge-open, .knowledge-boundary a { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 20px; border-radius: 14px; font: inherit; font-weight: 800; text-decoration: none; }
.knowledge-play { border: 0; background: var(--path-accent); color: #fff; cursor: pointer; }
.knowledge-play:disabled { opacity: .55; }
.knowledge-open { border: 1px solid var(--path-line); background: #fff; color: var(--path-ink); }
.knowledge-related { margin-top: 42px; }
.knowledge-related h3, .knowledge-more h3 { margin: 0 0 16px; color: var(--path-ink); font-size: 16px; }
.knowledge-related-list { display: flex; flex-wrap: wrap; gap: 9px; }
.knowledge-more { margin-top: 28px; }
.knowledge-more-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.knowledge-more-item { display: grid; gap: 8px; min-height: 112px; padding: 22px; border: 1px solid var(--path-line); border-radius: 20px; background: rgba(255,255,255,.55); color: var(--path-ink); text-decoration: none; }
.knowledge-more-item span { color: var(--path-muted); font-size: 12px; }
.knowledge-more-item strong { font-size: 17px; line-height: 1.45; }
.knowledge-more-item:hover { border-color: var(--path-accent); background: #fff; }
.knowledge-no-answer .knowledge-related-list { margin-top: 24px; }
.knowledge-boundary { display: flex; justify-content: space-between; gap: 30px; align-items: center; margin: 0 clamp(8px, 3vw, 46px) 70px; padding: 30px 34px; border-radius: 24px; background: var(--path-ink); color: #fffaf4; }
.knowledge-boundary-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: flex-end; }
.knowledge-boundary strong { font-size: 19px; }
.knowledge-boundary p { margin: 8px 0 0; color: rgba(255,250,244,.68); line-height: 1.6; }
.knowledge-boundary a { flex: 0 0 auto; background: var(--path-accent); color: #fff; }
@media (max-width: 880px) {
  .textbook-course-tools { align-items: stretch; flex-direction: column; }
  .textbook-course-links { justify-content: stretch; }
  .textbook-course-ask { text-align: center; }
  .knowledge-hero { grid-template-columns: 1fr; grid-template-areas: "copy" "ask" "start"; row-gap: 34px; align-items: start; border-radius: 28px; }
  .knowledge-hero-copy h1 { max-width: 14ch; }
  .knowledge-more-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .knowledge-page { padding-inline: 12px; }
  .knowledge-hero { padding: 48px 20px 34px; }
  .knowledge-search-row { grid-template-columns: 1fr; }
  .knowledge-search-row button { min-height: 52px; }
  .knowledge-results { padding-inline: 4px; }
  .knowledge-results-head { display: grid; }
  .knowledge-ask-another { justify-self: start; }
  .knowledge-answer-card { border-radius: 24px; }
  .knowledge-boundary { display: grid; margin-inline: 4px; padding: 26px; }
  .knowledge-boundary-actions { display: grid; justify-content: stretch; }
  .knowledge-boundary a { width: 100%; }
}
.course-static-index{margin-top:72px;padding-top:64px;border-top:1px solid var(--line,#e8ddd2)}
.course-static-index>div:first-child{display:grid;grid-template-columns:minmax(0,.78fr) minmax(22rem,1fr);gap:48px;align-items:end;margin-bottom:36px}
.course-static-index>div:first-child h2{max-width:10ch;margin:0;font-family:"Noto Serif SC","Songti SC",serif;font-size:clamp(2.4rem,5vw,4.8rem);font-weight:500;line-height:1.05;letter-spacing:-.035em}
.course-static-index>div:first-child p{max-width:48rem;margin:0;color:var(--muted,#756b65);font-size:1rem;line-height:1.8}
.course-static-unit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line,#e8ddd2);border-left:1px solid var(--line,#e8ddd2)}
.course-static-unit{min-width:0;padding:28px;border-right:1px solid var(--line,#e8ddd2);border-bottom:1px solid var(--line,#e8ddd2);background:rgba(255,255,255,.38)}
.course-static-unit header{display:grid;grid-template-columns:6rem 1fr;gap:16px;align-items:baseline;margin-bottom:18px}
.course-static-unit header span{color:var(--accent,#d9573f);font-size:.78rem;font-weight:750;letter-spacing:.05em}
.course-static-unit header h3{margin:0;font-family:"Noto Serif SC","Songti SC",serif;font-size:1.45rem;font-weight:500;line-height:1.25}
.course-static-unit ol{display:grid;margin:0;padding:0;list-style:none}
.course-static-unit li+li{border-top:1px solid var(--line,#e8ddd2)}
.course-static-unit a{display:grid;grid-template-columns:6rem 1fr;gap:16px;align-items:baseline;padding:12px 0;color:inherit;text-decoration:none}
.course-static-unit a span{color:var(--muted,#756b65);font-size:.78rem}
.course-static-unit a b{font-size:.92rem;font-weight:650;line-height:1.45}
.course-static-unit a:hover b,.course-static-unit a:focus-visible b{color:var(--accent,#d9573f)}
.course-static-unit a:focus-visible{outline:2px solid var(--accent,#d9573f);outline-offset:4px;border-radius:4px}
@media(max-width:820px){.course-static-index>div:first-child{grid-template-columns:1fr;gap:16px}.course-static-unit-grid{grid-template-columns:1fr}.course-static-unit{padding:24px}.course-static-index>div:first-child h2{font-size:clamp(2.2rem,11vw,3.7rem)}}
@media(max-width:520px){.course-static-index{margin-top:48px;padding-top:44px}.course-static-unit{padding:20px 16px}.course-static-unit header,.course-static-unit a{grid-template-columns:5rem 1fr;gap:12px}}
