/* SIMODA Japanese N5. Local fonts and a brick texture in the header. */
:root {
  color-scheme: light;
  --white: #fff;
  --ink: #272823;
  --muted: #65665f;
  --accent: #c5381c;
  --accent-hover: #a72c16;
  --line: #deded6;
  --line-soft: #e9e8e1;
  --warm: #f8f6f0;
  --green: #38654b;
  --red: #a62e20;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --japanese: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --gutter: clamp(16px, 4.4vw, 64px);
  --container: 1248px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-width: 0;
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--white);
}
::selection { color: var(--ink); background: #f4dcd4; }
[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; height: auto; }
img { object-fit: contain; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select, textarea { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
label.button:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(36px, 5.5vw, 70px); letter-spacing: -.045em; text-wrap: balance; }
h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.025em; }
h3 { font-size: 25px; letter-spacing: -.015em; }
h4 { font-size: 21px; }
p, h1, h2, h3, h4, li, label, legend, th, td, .brand-text { overflow-wrap: anywhere; }
p + p { margin-top: 16px; }
ul, ol { padding-left: 24px; }
li + li { margin-top: 7px; }
small { font-size: 13px; line-height: 1.6; }
strong { font-weight: 600; }

.header-inner, .nav-inner, .page-shell {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='24' viewBox='0 0 64 24' preserveAspectRatio='none'%3E%3Cpath d='M0 .5H64M0 12.5H64M.5 0V12M32.5 12V24' fill='none' stroke='%23d9d6ce' stroke-width='.6' stroke-opacity='.44'/%3E%3C/svg%3E");
  background-size: 64px 24px;background-repeat: repeat round; background-position: left top;
  box-shadow: inset 0 1px 0 #eeede9;
}
.header-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 18px; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 17px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 64px; flex: 0 0 44px; }
.brand-text { font: 400 25px/1.25 var(--serif); }
.brand-text strong { display: block; font: inherit; }
.brand-text small, .brand-text span { display: block; margin-top: 3px; font: 400 11px/1.5 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.header-note { max-width: 30ch; color: var(--muted); font-size: 13px; text-align: right; line-height: 1.6; }
.header-note > span, .header-note > small { display: block; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; max-width: calc(100% - 32px); min-height: 44px; padding: 11px 18px; color: #fff; background: var(--ink); border-radius: 3px; transform: translateY(calc(-100% - 28px)); }
.skip-link:focus { color: #fff; transform: translateY(0); }
.course-nav { border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0 25px; padding-block: 6px; }
.course-nav a { min-height: 44px; display: inline-flex; align-items: center; position: relative; color: var(--muted); text-decoration: none; font-size: 14px; padding: 8px 0; }
.course-nav a:hover, .course-nav a[aria-current="page"] { color: var(--accent); }
.course-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; background: var(--accent); }
.page-shell { padding-block: 28px 64px; }
#app, main, aside, section, article, .hero-copy, .hero-aside { min-width: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.reading-toggle { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; margin-left: auto; font-size: 13px; cursor: pointer; }
.reading-toggle input { flex: 0 0 20px; margin: 0; }
#app > h1 + .lede { margin-top: 22px; margin-bottom: 28px; }
#app > h1 + p:not(.lede) { margin-top: 20px; }
.eyebrow { margin-bottom: 15px; color: var(--accent); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; line-height: 1.6; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .38fr); gap: clamp(28px, 5vw, 68px); align-items: center; padding-block: 26px 45px; }
.hero-copy > .lede { margin-top: 24px; }
.hero-copy > p:not(.eyebrow):not(.lede) { margin-top: 18px; }
.hero-aside { padding: 22px 0 22px 32px; border-left: 1px solid var(--line); }
.hero-aside p { color: var(--muted); font-size: 14px; }
.hero-aside h2, .hero-aside h3 { margin-bottom: 15px; }
.hero-mark { display: block; color: var(--accent); font: 400 clamp(72px, 8vw, 112px)/1.2 var(--japanese); letter-spacing: -.06em; margin-bottom: 24px; }
.lede { max-width: 65ch; color: #4b4d45; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.button, :where(button:not(.kana-cell):not(.option)) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--white);
  background: var(--accent);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition: color .16s, background .16s, border-color .16s;
}
.button:hover, :where(button:not(.kana-cell):not(.option)):hover { color: var(--white); background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary, button.secondary { color: var(--accent); background: transparent; border-color: #d6a496; }
.button.secondary:hover, button.secondary:hover { color: var(--accent-hover); background: #f9eeea; border-color: var(--accent); }
.button.quiet, button.quiet { color: var(--ink); background: transparent; border-color: var(--line); }
.button.quiet:hover, button.quiet:hover { color: var(--accent); background: #ffffff80; border-color: #c7b5ac; }
.button[aria-disabled="true"] { pointer-events: none; opacity: .55; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); margin-block: 16px 40px; }
.stat { min-width: 0; padding: 23px 18px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat strong { display: block; color: var(--accent); font: 400 clamp(28px, 3vw, 40px)/1.15 var(--serif); }
.stat span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }
.panel { margin-block: 24px; padding: clamp(18px, 2.8vw, 32px); border: 1px solid var(--line); border-radius: 3px; background: transparent; }
.panel > h2, .panel > h3 { margin-bottom: 18px; }
.panel > p { max-width: 78ch; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 25px; margin-block: 40px 22px; }
.section-heading p { max-width: 60ch; color: var(--muted); font-size: 14px; }
.section-heading > a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lesson-card { min-width: 0; display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 3px; padding: 23px; background: transparent; }
.lesson-card, .practice-card { color: var(--ink); text-decoration: none; }
.lesson-card:hover, .practice-card:hover { color: var(--ink); }
.lesson-card.is-complete { border-top: 3px solid var(--green); padding-top: 21px; }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.lesson-number { color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.status { color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.is-complete .status { color: var(--green); }
.lesson-card h3 { font-size: 25px; margin-bottom: 13px; }
.lesson-card p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 10px; }
.lesson-card .button { align-self: flex-start; margin-top: 19px; }
.week-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.week-card { min-width: 0; border: 1px solid var(--line); border-top: 2px solid var(--accent); padding: 23px; }
.week-card h3 { margin-bottom: 14px; }
.week-card p, .week-card li { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
a.chip, button.chip { min-height: 44px; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 40px; }
.lesson-body { min-width: 0; }
.lesson-body > h1 { margin-bottom: 22px; }
.lesson-body > .lede { margin-bottom: 28px; }
.lesson-sidebar { min-width: 0; position: sticky; top: 24px; }
.lesson-sidebar.panel { margin: 36px 0 0; padding: 23px; }
.lesson-sidebar .panel { margin-top: 0; padding: 23px; }
.lesson-sidebar h2, .lesson-sidebar h3 { font-size: 23px; }
.lesson-sidebar nav a { display: block; min-height: 44px; padding-block: 10px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.lesson-sidebar p, .lesson-sidebar li { font-size: 14px; }
.lesson-sidebar > a { display: flex; align-items: center; min-height: 44px; font-size: 14px; }
.lesson-sidebar > p:last-child { margin-top: 16px; color: var(--muted); font-size: 13px; }
hr { margin-block: 20px; border: 0; border-top: 1px solid var(--line); }
.lesson-section { margin-block: 36px; }
.lesson-section > h2 { margin-bottom: 21px; }
.lesson-section > h3 { margin-bottom: 17px; }
.lesson-section p { max-width: 78ch; }
.example-list { display: grid; gap: 12px; }
.example { min-width: 0; padding: 17px 20px; border-left: 2px solid var(--accent); background: #ffffff38; }
.ja { font-family: var(--japanese); font-size: 24px; line-height: 1.8; overflow-wrap: anywhere; }
.kana { margin-top: 4px; font-family: var(--japanese); font-size: 14px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.translation { margin-top: 7px; font-size: 16px; line-height: 1.65; }
.reading-off .kana { display: none; }
.reading-off .table-wrap th:nth-child(2) { display: none; }
.table-wrap { max-width: 100%; overflow-x: auto; margin-block: 18px; border: 1px solid var(--line); border-radius: 3px; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; font-size: 15px; }
th, td { padding: 13px 14px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .03em; background: #ffffff45; }
tr:last-child td { border-bottom: 0; }
td .ja { font-size: 22px; }
td .kana { font-size: 13px; }
.dialogue-line { min-width: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 3px 16px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.dialogue-line > .speaker { grid-column: 1; grid-row: 1 / span 4; padding-top: 7px; color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.dialogue-line > :not(.speaker) { grid-column: 2; min-width: 0; }
.dialogue-line:last-child { border-bottom: 0; }
.quiz-form { margin-block: 24px; }
.question { min-width: 0; margin-block: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 3px; }
.quiz-form fieldset.question { min-inline-size: 0; }
.question fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.question legend { width: 100%; padding: 0; margin-bottom: 16px; font-size: 17px; font-weight: 600; line-height: 1.65; }
.question legend > span { color: var(--accent); }
.options { min-width: 0; }
.question .input-answer { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.completion { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-top: 28px; padding-block: 22px; border-block: 1px solid var(--line); }
.completion p { flex: 1 1 200px; color: var(--muted); font-size: 14px; }
.completion button { flex: 0 1 auto; }
.option { display: flex; min-width: 0; align-items: flex-start; gap: 12px; min-height: 48px; margin-top: 9px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; line-height: 1.6; }
.option:hover { border-color: #b9a499; background: #ffffff55; }
.option:has(input:checked) { border-color: var(--accent); background: #fbf1eb80; }
.option input { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 3px 0 0; accent-color: var(--accent); }
.option span { min-width: 0; overflow-wrap: anywhere; }
.question-feedback { margin-top: 16px; padding: 13px 16px; border-left: 3px solid var(--line); font-size: 14px; }
.question-feedback:empty { display: none; }
.question-feedback.correct { color: #284f38; border-color: var(--green); background: #edf5ee8c; }
.question-feedback.incorrect { color: #873025; border-color: var(--red); background: #fbefea9c; }
.quiz-summary { margin-block: 24px; padding: 24px; border-block: 1px solid var(--accent); font-size: 18px; }
.quiz-summary strong { font-family: var(--serif); font-size: 29px; font-weight: 400; }
.notice, .success, .error { margin-block: 20px; padding: 17px 20px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 2px; font-size: 14px; }
.success { border-left-color: var(--green); color: #284f38; }
.error { border-left-color: var(--red); color: #873025; }
.notice p + p, .success p + p, .error p + p { margin-top: 10px; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { min-height: 44px; width: 100%; padding: 10px 12px; border: 1px solid #c8c7bd; border-radius: 3px; background: #ffffffc9; font-size: 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #77786f; opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); }
.question > label, .question fieldset > label:not(.option) { display: block; margin-top: 12px; }
.tool-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-block: 24px; }
.tool-bar label { display: flex; flex: 1 1 180px; min-width: 0; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; }
.tool-bar > .button, .tool-bar > button { flex: 0 0 auto; }
.kana-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 76px), 1fr)); gap: 8px; margin-block: 20px; }
.kana-cell { min-width: 0; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 12px 7px; border: 1px solid var(--line); border-radius: 3px; background: transparent; text-align: center; }
.kana-cell strong { color: var(--ink); font: 400 29px/1.25 var(--japanese); }
.kana-cell span { color: var(--muted); font-size: 12px; line-height: 1.4; }
button.kana-cell:hover { border-color: var(--accent); background: #ffffff70; }
.trainer { max-width: 760px; margin: 24px auto; padding: clamp(18px, 4vw, 40px); border: 1px solid var(--line); border-radius: 3px; text-align: center; }
.trainer-glyph { padding-block: 20px 30px; font: 400 clamp(72px, 16vw, 128px)/1.3 var(--japanese); color: var(--accent); }
.trainer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trainer-options { margin-top: 18px; }
.trainer-options button { min-height: 62px; font-size: 23px; }
.trainer-feedback { min-height: 30px; margin-top: 20px; font-size: 16px; }
.trainer-feedback + button { margin-top: 15px; }
.trainer-feedback.correct { color: var(--green); }
.trainer-feedback.incorrect { color: var(--red); }
.dictionary-results { margin-block: 24px; min-width: 0; }
.result-count { margin-block: 18px; color: var(--muted); font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; font-size: 14px; color: var(--muted); }
.flashcard { min-height: 320px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; margin-block: 24px; padding: 30px 22px; border: 1px solid var(--line); border-radius: 3px; text-align: center; }
.flash-ja { max-width: 100%; font: 400 clamp(34px, 7vw, 57px)/1.6 var(--japanese); overflow-wrap: anywhere; }
.flash-answer { width: 100%; max-width: 52ch; padding-top: 23px; border-top: 1px solid var(--line); font-size: 18px; }
.flash-answer .kana { font-size: 19px; }
.kanji-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kanji-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 3px; }
.kanji-glyph { display: block; margin-bottom: 16px; color: var(--accent); font: 400 70px/1.25 var(--japanese); }
.readings { color: var(--muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.kanji-words { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.8; }
.kanji-words .ja { font-size: 19px; }
.kanji-words p > [lang="ja"]:first-child { font-size: 20px; }
.kanji-words .kana { margin-left: 6px; }
.kanji-words small { display: block; margin-top: 4px; color: var(--muted); }
.practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.practice-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 3px; }
.practice-card h3 { margin-bottom: 14px; }
.practice-card h2 { margin-block: 14px; font-size: 26px; }
.practice-card p { font-size: 14px; color: var(--muted); }
.practice-card > span:last-child { display: block; margin-top: 20px; color: var(--accent); font-size: 14px; }
.practice-card .button { margin-top: 20px; }
.passage { margin-block: 20px; padding: 22px 24px; border-left: 2px solid var(--accent); font-size: 18px; line-height: 2.1; overflow-wrap: anywhere; }
.passage .ja { font-size: 24px; line-height: 2; }
.passage .kana { line-height: 1.9; }
details { min-width: 0; margin-block: 16px; border: 1px solid var(--line); border-radius: 3px; }
details.panel { padding: 0; }
summary { min-height: 48px; padding: 13px 18px; font-size: 16px; cursor: pointer; overflow-wrap: anywhere; }
summary::marker { color: var(--accent); }
details[open] > summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { margin-inline: 18px; }
details > :last-child:not(summary) { margin-bottom: 18px; }
.audio-block { min-width: 0; margin-block: 22px; }
.audio-block audio { display: block; min-width: 0; width: 100%; max-width: 100%; height: 44px; }
.audio-block small { display: block; color: var(--muted); margin-top: 8px; }
.audio-error { margin-bottom: 0; }
.progress-track { height: 8px; width: 100%; overflow: hidden; margin-block: 12px; background: #eae8df; border-radius: 2px; }
.progress-fill { display: block; max-width: 100%; height: 100%; background: var(--accent); transition: width .24s ease; }
.progress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.progress-grid > * { min-width: 0; }
.error-list { padding-left: 23px; }
.error-list li { padding-block: 7px; }
.settings { display: grid; gap: 12px; }
.settings label { min-height: 44px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.settings input[type="checkbox"], .settings input[type="radio"] { flex: 0 0 20px; }
.site-footer { border-top: 1px solid var(--line); padding: 30px var(--gutter) 38px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-footer > * { max-width: var(--container); margin-inline: auto; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 40px); overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); }
dialog::backdrop { background: #25252266; }
dialog h2 { margin-bottom: 20px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.empty-state, .loading { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin-bottom: 16px; }
.loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 17px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: turn 1s linear infinite; }
.step-links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: stretch; gap: 12px; margin-block: 30px; }
.step-links > * { min-width: 0; max-width: 100%; }
.step-links a { min-height: 44px; display: inline-flex; align-items: center; padding-block: 10px; }
.story-portrait { display: block; flex: none; width: 112px; height: 112px; object-fit: cover; object-position: center; background: var(--warm); border-radius: 3px; }
.story-portrait-placeholder { display: grid; place-items: center; color: var(--accent); font: 400 50px/1 var(--serif); }
.story-portrait-hero { width: min(100%, 250px); height: 250px; margin-bottom: 20px; object-fit: contain; }
.has-story .eyebrow { color: var(--accent); font-size: 11px; }
.has-story .progress-track { margin-top: 19px; }
.story-introduction { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; margin: 0 0 32px; padding: clamp(22px, 3vw, 36px); background: var(--warm); border-block: 1px solid var(--line); }
.story-introduction .eyebrow { margin-bottom: 10px; }
.story-introduction h2 { font-size: clamp(30px, 3.6vw, 44px); }
.story-premise { max-width: 77ch; margin-top: 18px; font-size: 17px; line-height: 1.8; }
.story-format { max-width: 78ch; color: var(--muted); font-size: 14px; }
.story-series-number { color: #a69f92; font: 400 32px/1.2 var(--serif); white-space: nowrap; }
.lesson-story-label { display: block; margin: 0 0 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--accent); font-size: 12px; line-height: 1.6; }
.story-prologue { margin-top: 28px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 3px; background: var(--warm); }
.story-episode-heading { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 22px; }
.story-episode-heading .eyebrow { margin-bottom: 9px; font-size: 10px; }
.story-episode-heading h2 { font-size: clamp(26px, 3vw, 34px); }
.story-chapter { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.story-focus { padding: 2px 9px; border: 1px solid #d9d1c4; border-radius: 20px; color: #64594d; white-space: nowrap; }
details.story-narration { margin: 21px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.story-narration > summary { padding: 12px 0; color: var(--muted); font-size: 13px; }
.story-narration[open] > summary { border: 0; }
.story-narration > div, .story-narration > div:last-child { margin: 0; padding-bottom: 4px; }
.story-narration p { font-size: 15px; line-height: 1.85; }
.story-prologue-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 13px; }
.story-prologue-links a, .story-to-exercises { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.story-prologue-links a:last-child { color: var(--muted); }
.story-scene { padding-block: 27px 20px; border-block: 1px solid var(--line); border-top: 2px solid var(--accent); }
.story-scene-heading .eyebrow { margin-bottom: 10px; }
.story-scene-heading h2 { margin-bottom: 14px; font-size: clamp(27px, 3vw, 35px); }
.story-scene-heading > p:last-child { color: var(--muted); font-size: 14px; }
.story-dialogue { margin-top: 23px; }
.story-line { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding: 19px 0; border-top: 1px solid var(--line-soft); }
.story-line > .speaker { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.story-line.is-sasha > .speaker { color: var(--accent); }
.story-line .ja { font-size: 23px; line-height: 1.7; }
.story-line .kana { margin-top: 5px; font-size: 15px; line-height: 1.8; }
.story-line .translation { margin-top: 7px; font-size: 14px; line-height: 1.75; }
.story-challenge { margin-top: 14px; padding: clamp(17px, 3vw, 24px); background: var(--warm); border-radius: 3px; }
.story-challenge h3 { font: 500 19px/1.55 var(--sans); letter-spacing: 0; }
.story-choice-note { margin-top: 10px; color: var(--muted); font-size: 12px; }
.story-options { display: grid; gap: 10px; margin-top: 20px; }
.story-choice { display: grid; width: 100%; grid-template-columns: 24px minmax(0, 1fr); align-items: start; justify-content: start; gap: 13px; min-height: 52px; padding: 14px; border: 1px solid #d6d2c8; border-radius: 3px; color: var(--ink); background: var(--white); text-align: left; font-size: 15px; line-height: 1.65; }
.story-option-number { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; color: #7b7468; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; }
.story-choice:hover:not([aria-disabled="true"]), .story-choice.is-selected { border-color: var(--accent); background: #fff9f6; }
.story-choice.is-correct { border-color: var(--green); background: #f0f6ef; }
.story-choice.is-correct .story-option-number { color: var(--green); border-color: var(--green); }
.story-choice[aria-disabled="true"] { cursor: default; }
.story-choice[aria-disabled="true"]:not(.is-correct) { color: var(--muted); background: #fbfaf7; }
.story-feedback { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--white); font-size: 14px; line-height: 1.75; }
.story-feedback p { margin-top: 5px; }
.story-feedback.is-correct { border-left-color: var(--green); }
.story-feedback.is-correct strong { color: var(--green); }
.story-ending { margin-top: 23px; padding-top: 21px; border-top: 1px solid #d9d3c7; font-size: 15px; line-height: 1.85; }
.story-ending .eyebrow { margin-bottom: 9px; font-size: 10px; }
.story-ending p + p { margin-top: 0; }
.story-to-exercises { margin-top: 18px; }

/* A lesson shows one short learning step at a time. Reference pages keep their layout. */
body.is-lesson-flow .nav-inner {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding-block: 2px;
}
body.is-lesson-flow .course-nav a { flex: 0 0 auto; white-space: nowrap; }
body.is-beginner-lesson .reading-toggle { display: none; }
.lesson-flow { width: 100%; max-width: 760px; margin-inline: auto; }
.lesson-flow > * { min-width: 0; }
.flow-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; color: var(--muted); font-size: 13px; }
.flow-lesson-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.flow-count { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.flow-progress { height: 4px; margin-block: 7px 24px; overflow: hidden; border-radius: 2px; background: var(--line-soft); }
.flow-progress-fill { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--accent); transition: width .18s ease; }
.flow-heading { margin-bottom: 22px; }
.flow-heading h1 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2; letter-spacing: -.025em; text-wrap: pretty; }
.flow-heading .eyebrow { margin-bottom: 10px; font-size: 11px; }
.flow-subtitle { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.flow-card { min-width: 0; min-height: 320px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.flow-card:focus { outline: none; }
.flow-step-label { margin: 0 0 12px; color: var(--accent); font-size: 11px; line-height: 1.6; letter-spacing: .1em; text-transform: uppercase; }
.flow-card h2 { margin-bottom: 20px; font-size: clamp(25px, 2.8vw, 32px); line-height: 1.25; letter-spacing: -.02em; text-wrap: pretty; }
.flow-card h3 { margin-block: 20px 12px; font: 600 19px/1.5 var(--sans); letter-spacing: 0; }
.flow-copy { max-width: 56ch; font-size: 18px; line-height: 1.75; }
.flow-copy > p + p { margin-top: 13px; }
.flow-copy > ul, .flow-copy > ol { margin-block: 16px 0; }
.flow-copy li + li { margin-top: 9px; }
.flow-copy:empty { display: none; }
.flow-copy + .flow-copy { margin-top: 16px; }
.flow-sasha { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 17px; align-items: center; margin-block: 22px; }
.flow-sasha > img, .flow-sasha .story-portrait { width: 64px; height: 72px; margin: 0; border-radius: 3px; object-fit: contain; background: transparent; }
.flow-sasha > div { min-width: 0; }
.flow-sasha p { font-size: 16px; line-height: 1.7; }
.flow-sasha p + p { margin-top: 7px; }
.flow-sasha small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.flow-glyph { max-width: 100%; margin-block: 24px 8px; color: var(--ink); font: 400 clamp(76px, 12vw, 120px)/1.3 var(--japanese); text-align: center; overflow-wrap: anywhere; }
.flow-glyph.is-word { font-size: clamp(44px, 8vw, 68px); line-height: 1.6; }
.flow-reading { margin: 0; color: var(--accent); font-size: 21px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.flow-meaning { margin-top: 5px; color: var(--muted); font-size: 16px; line-height: 1.7; text-align: center; }
.flow-recap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-block: 24px; }
.flow-recap > span { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 15px 5px; border-radius: 3px; background: var(--warm); }
.flow-recap strong { color: var(--ink); font: 400 56px/1.3 var(--japanese); }
.flow-recap small { color: var(--accent); font-size: 18px; }
.flow-glyph + .flow-copy, .flow-reading + .flow-copy, .flow-meaning + .flow-copy { margin-top: 24px; }
.flow-card .audio-block { margin-block: 21px 0; }
.flow-card .audio-block small { font-size: 12px; }
.flow-options { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; margin-top: 23px; }
.lesson-flow .flow-option { min-width: 0; width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin: 0; padding: 14px 17px; color: var(--ink); background: var(--white); border: 1px solid #cecec4; border-radius: 3px; font-size: 18px; line-height: 1.55; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.flow-option > span { min-width: 0; }
.flow-option input[type="radio"] { flex: 0 0 20px; margin: 0; }
.flow-option .ja { font-size: 28px; }
body.is-beginner-lesson .flow-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.is-beginner-lesson .flow-option { justify-content: center; padding-inline: 8px; font-size: 22px; }
.lesson-flow .flow-option:hover:not(:disabled):not([aria-disabled="true"]), .lesson-flow .flow-option.is-selected, .lesson-flow .flow-option:has(input:checked) { color: var(--ink); border-color: var(--accent); background: #fff7f3; }
.lesson-flow .flow-option.is-correct { color: #284f38; border-color: var(--green); background: #f1f7f1; }
.lesson-flow .flow-option.is-incorrect { color: #873025; border-color: var(--red); background: #fff4ef; }
.lesson-flow .flow-option[aria-disabled="true"] { cursor: default; }
.lesson-flow .flow-option:disabled { opacity: 1; cursor: default; }
.flow-feedback { margin-top: 22px; padding: 15px 17px; border-left: 3px solid var(--accent); background: #faf8f3; font-size: 16px; line-height: 1.7; }
.flow-feedback:empty { display: none; }
.flow-feedback p + p { margin-top: 7px; }
.flow-feedback.is-correct { color: #284f38; border-color: var(--green); background: #f1f7f1; }
.flow-feedback.is-incorrect { color: #873025; border-color: var(--red); background: #fff4ef; }
.flow-navigation { display: flex; align-items: stretch; justify-content: space-between; gap: 14px; margin-top: 20px; }
.flow-navigation > * { min-width: 0; max-width: 100%; }
.flow-navigation .flow-back, .flow-navigation .flow-next { min-height: 48px; margin: 0; padding: 13px 22px; font-size: 16px; line-height: 1.4; }
.flow-navigation .flow-back { flex: 0 1 auto; color: var(--muted); background: var(--white); border-color: var(--line); }
.flow-navigation .flow-back:hover:not(:disabled) { color: var(--ink); background: var(--warm); border-color: #b8b8ad; }
.flow-navigation .flow-next { flex: 0 1 auto; margin-left: auto; min-width: 156px; color: var(--white); background: var(--accent); border-color: var(--accent); }
.flow-navigation .flow-next:hover:not(:disabled) { color: var(--white); background: var(--accent-hover); border-color: var(--accent-hover); }
.flow-details { margin-top: 24px; border-color: var(--line-soft); }
.flow-details > summary { min-height: 48px; color: var(--muted); font-size: 14px; }
.flow-details > :not(summary) { font-size: 15px; line-height: 1.75; }
.flow-details h3 { font-size: 22px; margin-block: 20px 12px; }
.flow-card form { min-width: 0; margin: 0; }
.flow-card fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.flow-card legend { max-width: 100%; margin-bottom: 8px; padding: 0; font-size: 18px; line-height: 1.7; }
.flow-card .input-answer { display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.flow-card input:not([type="radio"]):not([type="checkbox"]) { min-height: 50px; font-size: 18px; }
.flow-card .notice, .flow-card .success, .flow-card .error { margin-block: 20px 0; }
.flow-card .story-line { padding-block: 15px; }
.flow-card .story-dialogue { margin-top: 0; }
.flow-card .story-choice { display: block; font-size: 16px; }
.flow-card .story-scene, .flow-card .story-challenge { margin: 0; padding: 0; border: 0; background: transparent; }
.flow-save-note { max-width: 58ch; margin-top: 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.flow-card[data-step-type="result"] > [data-action="flow-finish"] { min-height: 48px; margin-top: 24px; font-size: 16px; }
.flow-card[data-step-type="result"] > .actions { margin-top: 16px; }

@media (max-width: 38rem) {
  body.is-lesson-flow .breadcrumb { margin-bottom: 12px; }
  body.is-lesson-flow .nav-inner { gap: 0 20px; }
  .flow-topline { gap: 4px 14px; font-size: 12px; }
  .flow-count { font-size: 12px; }
  .flow-progress { margin-bottom: 19px; }
  .flow-heading { margin-bottom: 18px; }
  .flow-heading h1 { font-size: 28px; line-height: 1.25; }
  .flow-card { min-height: 280px; padding: 22px 19px; }
  .flow-card h2 { margin-bottom: 17px; font-size: 25px; }
  .flow-copy { font-size: 17px; line-height: 1.75; }
  .flow-step-label { font-size: 10px; letter-spacing: .08em; }
  .flow-sasha { grid-template-columns: 48px minmax(0, 1fr); gap: 13px; margin-block: 19px; }
  .flow-sasha > img, .flow-sasha .story-portrait { width: 48px; height: 60px; }
  .flow-sasha p { font-size: 15px; }
  .flow-glyph { margin-top: 18px; font-size: 88px; }
  .flow-glyph.is-word { font-size: 43px; }
  .flow-reading { font-size: 20px; }
  .flow-meaning { font-size: 15px; }
  .flow-recap { gap: 6px; margin-block: 20px; }
  .flow-recap > span { gap: 6px; padding: 13px 2px; }
  .flow-recap strong { font-size: 32px; }
  .flow-recap small { font-size: 15px; }
  .flow-options { margin-top: 20px; gap: 10px; }
  .lesson-flow .flow-option { min-height: 54px; padding: 12px 14px; font-size: 17px; }
  body.is-beginner-lesson .flow-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.is-beginner-lesson .flow-option { padding-inline: 8px; font-size: 22px; }
  .flow-feedback { padding: 13px 14px; font-size: 15px; }
  .flow-navigation { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; margin-top: 16px; }
  .flow-navigation .flow-back, .flow-navigation .flow-next { width: 100%; min-width: 0; padding: 13px 10px; font-size: 15px; }
  .flow-navigation .flow-next:only-child { grid-column: 1 / -1; }
  .flow-details { margin-top: 20px; }
}

@media print {
  .flow-topline, .flow-progress, .flow-navigation { display: none !important; }
  .lesson-flow { max-width: none; }
  .flow-card { min-height: 0; padding: 0; border: 0; }
  .flow-heading h1 { font-size: 28pt; }
}

@keyframes turn { to { transform: rotate(360deg); } }

@media (hover: hover) {
  .lesson-card:hover, .kanji-card:hover, .practice-card:hover { border-color: #b9b5a8; background: #ffffff45; }
  .lesson-card.is-complete:hover { border-top-color: var(--green); }
}
@media (max-width: 68rem) {
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 28px; }
  .hero { grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; }
  .hero-aside { padding-left: 25px; }
}
@media (max-width: 50rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 14px; }
  .hero-aside { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .hero-mark { font-size: 72px; margin-bottom: 16px; }
  .hero-aside p { max-width: 65ch; }
  .hero-aside.has-story { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 0 22px; }
  .has-story .story-portrait-hero { width: 120px; height: 140px; margin: 0; grid-row: 1 / 3; }
  .has-story > .eyebrow { margin: 0 0 9px; }
  .has-story > p:not(.eyebrow) { grid-column: 2; margin-top: 0; }
  .has-story > .progress-track, .has-story > small { grid-column: 1 / -1; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lesson-sidebar { position: static; }
  .kanji-grid, .practice-grid, .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-note { max-width: 24ch; font-size: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 16px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat:nth-child(3) { padding-left: 0; }
}
@media (max-width: 38rem) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding-block: 16px; }
  .brand { gap: 13px; }
  .brand-text { font-size: 23px; }
  .brand-text small, .brand-text span { font-size: 10px; letter-spacing: .1em; }
  .header-note { width: 100%; max-width: none; text-align: left; }
  .nav-inner { gap: 0 18px; }
  .course-nav a { font-size: 13px; }
  .page-shell { padding-top: 18px; padding-bottom: 40px; }
  .breadcrumb { margin-bottom: 16px; }
  .reading-toggle { width: 100%; margin-left: 0; }
  .hero { padding-bottom: 28px; }
  .hero-copy > .lede { margin-top: 20px; }
  .hero-aside.has-story { grid-template-columns: 88px minmax(0, 1fr); gap: 0 16px; }
  .has-story .story-portrait-hero { width: 88px; height: 120px; }
  .story-introduction { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 24px; }
  .story-series-number { font-size: 23px; }
  .story-premise { font-size: 15px; }
  .story-format { font-size: 13px; }
  .story-episode-heading { grid-template-columns: 66px minmax(0, 1fr); gap: 14px; align-items: start; }
  .story-portrait-small { width: 66px; height: 84px; }
  .story-episode-heading h2 { font-size: 25px; }
  .story-episode-heading .eyebrow { letter-spacing: .09em; }
  .story-chapter { margin-top: 10px; font-size: 11px; }
  .story-focus { white-space: normal; }
  .story-prologue-links { flex-direction: column; gap: 0; }
  .story-line { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 17px; }
  .story-line > .speaker { margin: 0 0 4px; }
  .story-line .ja { font-size: 21px; }
  .story-choice { padding: 12px; gap: 10px; font-size: 14px; }
  .story-challenge h3 { font-size: 17px; }
  .actions { gap: 10px; }
  .actions .button, .actions > button { width: 100%; }
  .stats { margin-bottom: 30px; }
  .stat strong { font-size: 32px; }
  .stat span { font-size: 12px; }
  .section-heading { margin-top: 30px; }
  .lesson-grid, .week-grid, .kanji-grid, .practice-grid, .progress-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-card, .week-card, .kanji-card, .practice-card { padding: 21px; }
  .lesson-card.is-complete { padding-top: 19px; }
  .lesson-card .button { width: 100%; }
  .panel { margin-block: 20px; }
  .lesson-section { margin-block: 29px; }
  .example { padding: 14px 16px; }
  .question { padding: 18px 15px; }
  .question legend { font-size: 16px; }
  .completion button { width: 100%; }
  .option { padding: 11px; gap: 10px; }
  .dialogue-line { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-block: 17px; }
  .dialogue-line > .speaker { grid-column: 1; grid-row: auto; padding: 0 0 5px; }
  .dialogue-line > :not(.speaker) { grid-column: 1; }
  th, td { padding: 10px 7px; }
  table { font-size: 14px; }
  td .ja { font-size: 20px; }
  .tool-bar { gap: 12px; }
  .tool-bar label { flex-basis: 100%; }
  .tool-bar > .button, .tool-bar > button { width: 100%; }
  .kana-grid { gap: 6px; }
  .trainer-options { gap: 9px; }
  .trainer-options button { min-height: 58px; padding-inline: 10px; font-size: 20px; }
  .flashcard { min-height: 280px; padding-inline: 16px; }
  .passage { padding: 16px; }
  .notice, .success, .error { padding: 15px; }
  .pagination { justify-content: center; }
  .pagination > span { width: 100%; text-align: center; }
  .step-links { flex-direction: column; align-items: stretch; }
  .step-links > * { width: 100%; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions > * { width: 100%; }
  dialog { padding: 22px 18px; }
}
.is-course-program .reading-toggle { display: none; }
.is-course-program .nav-inner { flex-wrap: nowrap; overflow-x: auto; gap: 0 22px; }
.is-course-program .course-nav a { flex-shrink: 0; }
.course-entry h1 { font-size: clamp(36px, 4.8vw, 62px); }
.course-entry .hero-copy > .lede { max-width: 48ch; margin-top: 20px; }
.course-entry .hero-copy > .course-access { font-size: 14px; color: var(--muted); }
.course-entry .hero-copy > .course-level-note { max-width: 65ch; margin-top: 24px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.course-level-note strong { color: var(--ink); }
.course-entry .hero-aside p { max-width: 34ch; }
.course-entry .story-portrait-hero { width: 140px; height: 140px; }
.program-details { margin-block: 28px; }
.program-details > summary { font-family: var(--serif); font-size: 25px; line-height: 1.4; letter-spacing: -.015em; }
.program-details > .lesson-grid { margin-top: 22px; }
.course-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-block: 14px; }
.course-facts dt { color: var(--muted); font-size: 13px; }
.course-facts dd { margin: 4px 0 0; font-size: 20px; }
.program-details .story-introduction { margin-top: 28px; }
.course-study-plan { margin-top: 24px; }
.course-study-plan .week-grid { margin-top: 24px; }
@media (max-width: 50rem) {
  .course-entry { gap: 22px; }
  .course-entry .hero-aside.has-story { grid-template-columns: 88px minmax(0, 1fr); gap: 0 16px; }
  .course-entry .story-portrait-hero { width: 88px; height: 104px; }
}
@media (max-width: 38rem) {
  .is-course-program .breadcrumb { margin-bottom: 4px; }
  .course-entry .hero-copy > .lede { margin-top: 16px; }
  .course-entry .hero-copy > .course-access { margin-top: 12px; }
  .course-entry .actions { margin-top: 20px; }
  .course-entry .hero-copy > .course-level-note { margin-top: 20px; }
  .course-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .course-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
  .course-facts dd { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  @page { margin: 15mm; }
  :root, body { color: #000; background: #fff !important; font-size: 11pt; }
  .site-header, .course-nav, .site-footer, .breadcrumb, .skip-link, .actions, .button, button, form, .completion, .lesson-sidebar, .step-links, .tool-bar, .audio-block, dialog, .loading { display: none !important; }
  .page-shell { width: 100%; max-width: none; margin: 0; padding: 0; }
  .hero, .lesson-layout { display: block; }
  .hero { padding: 0 0 18pt; }
  .hero-aside { display: none; }
  h1 { font-size: 28pt; }
  h2 { font-size: 21pt; }
  h3 { font-size: 17pt; }
  p, li { orphans: 3; widows: 3; }
  h1, h2, h3, h4 { break-after: avoid; }
  .panel, .lesson-section { padding: 0; border: 0; margin-block: 18pt; }
  .example, .dialogue-line, tr, .kanji-card { break-inside: avoid; background: transparent; }
  .example { border-color: #777; padding: 10pt; }
  .ja { font-size: 16pt; }
  .kana, .reading-off .kana { display: block; color: #444; font-size: 10pt; }
  td.kana, th.kana, .reading-off td.kana, .reading-off th.kana, .reading-off .table-wrap th:nth-child(2) { display: table-cell; }
  .translation { font-size: 11pt; }
  .table-wrap { overflow: visible; border: 0; }
  table { font-size: 10pt; }
  th, td { padding: 7pt; }
  details { border: 0; }
  details > summary { padding-inline: 0; border: 0 !important; }
  details:not([open]) > :not(summary):not([hidden]) { display: block !important; }
  details > :not(summary) { margin-inline: 0; }
  a { color: #000; text-decoration: none; }
}
