:root {
  --bg: #FBF7EF;
  --surface: #FFFFFF;
  --ink: #1B2A2F;
  --ink-soft: #3F4F54;
  --primary: #0F5C5C;
  --primary-ink: #FFFFFF;
  --accent: #E0892B;
  --line: #E4DAC6;
  --pill-bg: #F1E3C8;
  --radius: 14px;
  --gutter: 16px;
}

* { box-sizing: border-box; }

html { font-size: 18px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR",
    "Noto Sans Lao", "Leelawadee UI", system-ui, sans-serif;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.topbar, main {
  max-width: 480px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.topbar { padding-top: 14px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 28%, transparent 30%),
    var(--primary);
}
.brand-name { margin: 0; font-weight: 800; letter-spacing: .06em; line-height: 1.2; }
.brand-tagline { margin: 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.3; }

.lang-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lang-btn {
  flex: 1 1 30%;
  min-width: 0;
  min-height: 48px;
  padding: 0 6px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #FFF4E3;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

main { padding-top: 6px; padding-bottom: 24px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 18px 0 8px; }
h2 { font-size: 1rem; margin: 18px 0 8px; color: var(--primary); }
p { margin: 0 0 10px; }
.lead { font-size: 1rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 12px 10px 52px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: .89rem;
  display: grid;
  place-items: center;
}

.notice, .status {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--pill-bg);
  border-radius: 8px;
  font-size: .89rem;
}

.btn {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { border: 0; background: var(--primary); color: var(--primary-ink); font-size: 1.05rem; }
.btn-quiet {
  margin-top: 16px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}

/* The main action stays reachable without scrolling. */
.actionbar {
  position: sticky;
  bottom: 0;
  margin: 14px calc(var(--gutter) * -1) 0;
  padding: 10px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(251, 247, 239, 0), var(--bg) 22%);
}

.modules { list-style: none; margin: 12px 0 0; padding: 0; }
.module {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.module > div { min-width: 0; }
.module-name { margin: 0; font-weight: 700; }
.module-desc { margin: 2px 0 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.4; }
.pill {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink);
  font-size: .89rem;
  font-weight: 600;
  white-space: nowrap;
}

.load-error {
  margin-top: 20px;
  padding: 14px;
  border: 2px solid #A32020;
  border-radius: var(--radius);
  background: var(--surface);
}
.load-error::before { content: "⚠ "; font-weight: 700; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .lang-btn { transition: background-color .15s, border-color .15s; }
}

/* Welcome voice controls */
.voice { margin: 12px 0 4px; }
.voice-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-voice {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 6px 12px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #FFF4E3;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-voice-main { flex-basis: 100%; border-color: var(--primary); color: var(--primary); font-size: 1rem; }
.btn-voice-main[data-state="playing"] { background: var(--primary); color: var(--primary-ink); }
.btn-voice-main[data-state="blocked"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 137, 43, .35); }
.btn-voice:disabled { opacity: .45; cursor: not-allowed; }
.btn-voice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.voice-icon::before { content: "▶ "; }
[data-state="playing"] > .voice-icon::before { content: "⏸ "; }
[data-state="loading"] > .voice-icon::before { content: "… "; }
.voice-status { min-height: 1.5em; margin: 8px 0 0; color: var(--ink-soft); font-size: .89rem; }

/* Home: a module that is open */
.modules > li { list-style: none; }
.module-open { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 2px solid var(--primary); min-height: 64px; }
.module-open > span:first-child { min-width: 0; display: block; }
.module-open .module-name, .module-open .module-desc { display: block; }
.module-arrow { flex: none; color: var(--primary); font-size: 1.8rem; line-height: 1; font-weight: 700; }

/* Find an expression */
.btn-back {
  min-height: 48px;
  margin-top: 6px;
  padding: 0 14px 0 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.field-label { display: block; margin: 16px 0 6px; font-weight: 700; }
.field {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #FFF4E3;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.result-count { margin: 16px 0 8px; color: var(--ink-soft); font-size: .89rem; }
.results { list-style: none; margin: 0; padding: 0; }
.card {
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-meaning { margin: 0 0 6px; font-weight: 700; }
.card-lao {
  margin: 0;
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
  font-size: 1.7rem;
  line-height: 1.6;
  color: var(--primary);
}
.card-roman { margin: 0 0 6px; color: var(--ink-soft); font-size: .89rem; }
.card-roman b { color: var(--ink); font-size: 1rem; }
.card-note { margin: 0 0 8px; font-size: .89rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.btn-audio {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-size: .89rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-audio[data-state="playing"] { background: var(--accent); color: var(--ink); }
.badge {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink);
  font-size: .89rem;
}
.card-error { margin: 8px 0 0; color: #8A1C1C; font-size: .89rem; font-weight: 600; }
.card-error::before { content: "⚠ "; }

/* Lao basics */
.lesson-list { list-style: none; margin: 8px 0 0; padding: 0; }
.lesson-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 10px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.lesson-row > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.lesson-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pill-bg); color: var(--ink); font-weight: 700;
}
.lesson-row[data-done="true"] .lesson-num { background: var(--primary); color: var(--primary-ink); }
.lesson-row .module-name, .lesson-row .module-desc { display: block; }
.lesson-number { margin: 12px 0 0; color: var(--ink-soft); font-size: .89rem; font-weight: 700; }
#lesson-title { margin-top: 2px; }
.lesson-text { margin: 0 0 12px; white-space: pre-line; }
.lesson-heading { margin: 22px 0 8px; font-size: 1.05rem; color: var(--primary); }
.tip {
  margin: 14px 0; padding: 12px 14px;
  background: #E6F1EF; border-left: 4px solid var(--primary); border-radius: 8px;
}
.item-grid { list-style: none; margin: 0 0 12px; padding: 0; }
.item {
  display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center;
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.item-main { min-width: 0; }
.item-head {
  margin: 0; color: var(--primary); line-height: 1.5; font-size: 1.9rem;
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
}
.item-head small { margin-left: 10px; color: var(--ink); font-size: 1rem; font-weight: 700; font-family: inherit; }
.item-lao {
  margin: 0; line-height: 1.6; font-size: 1.45rem;
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
}
.item-lao b { margin-left: 10px; font-size: 1rem; font-family: "Segoe UI", system-ui, sans-serif; }
.item-gloss { margin: 2px 0 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.45; }
.item-play {
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); font-size: 1.1rem; cursor: pointer;
}
.item-play[data-state="playing"] { background: var(--accent); color: var(--ink); }
.item .card-error { grid-column: 1 / -1; }

/* Language menu (five languages no longer fit as buttons on a phone) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar .brand { min-width: 0; }
.lang { flex: none; }
.lang-select {
  min-height: 48px; max-width: 132px; padding: 0 10px;
  border: 2px solid var(--primary); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: .89rem; font-weight: 700;
}
body { font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans Lao", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif; }
.home-section { margin: 22px 0 0; font-size: 1.05rem; color: var(--primary); }
.lesson-figure { margin: 0 0 12px; }
.lesson-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

/* EPS-TOPIK practice */
.exam-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.exam-meta { margin: 0; color: var(--ink-soft); font-size: .89rem; font-weight: 700; text-align: right; }
.exam-timer { margin: 4px 0 0; padding: 6px 12px; border-radius: 8px; background: var(--pill-bg); font-weight: 700; text-align: center; }
.exam-passage {
  margin: 12px 0 0; padding: 12px 14px; white-space: pre-line;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; font-size: 1.05rem; line-height: 1.7;
}
.exam-prompt { margin: 14px 0 10px; font-size: 1.15rem; line-height: 1.5; }
.options { display: grid; gap: 8px; margin-top: 12px; }
.option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 8px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer;
}
.option-num {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 700; font-size: .89rem;
}
.option[aria-pressed="true"] { border-color: var(--primary); background: #E6F1EF; }
.option[aria-pressed="true"] .option-num { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.option[data-mark="right"] { border-color: #1E6B34; background: #E4F3E7; }
.option[data-mark="right"]::after { content: "✓"; margin-left: auto; color: #1E6B34; font-weight: 700; }
.option[data-mark="wrong"] { border-color: #8A1C1C; background: #F8E6E6; }
.option[data-mark="wrong"]::after { content: "✕"; margin-left: auto; color: #8A1C1C; font-weight: 700; }
.option:disabled { cursor: default; opacity: 1; }
.exam-feedback { min-height: 1.6em; margin: 12px 0 0; font-weight: 700; }
.exam-feedback[data-kind="right"] { color: #1E6B34; }
.exam-feedback[data-kind="wrong"] { color: #8A1C1C; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.result-score { margin: 8px 0 4px; color: var(--primary); font-size: 2.2rem; font-weight: 800; line-height: 1.2; }
.floor-list { list-style: none; margin: 0 0 12px; padding: 0; }
.floor-row { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.floor-mark { flex: none; font-weight: 800; }
.floor-row[data-cleared="true"] .floor-mark { color: #1E6B34; }
.floor-row[data-cleared="false"] .floor-mark { color: #8A1C1C; }
#result-again { margin-top: 16px; }

/* Dictation */
.btn-audio-wide { display: block; width: 100%; min-height: 54px; font-size: 1rem; }
.hint { margin: 8px 0 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.45; }
.actionbar-pair { display: flex; gap: 8px; }
.actionbar-pair .btn { flex: 1 1 0; min-width: 0; margin-top: 0; }
.actionbar-pair .btn-quiet { background: var(--surface); }
.exam-feedback[data-kind="spacing"] { color: #6B4300; }
.exam-feedback[data-kind="empty"] { color: #8A1C1C; }
.compare { margin-top: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.compare-label { margin: 0; color: var(--ink-soft); font-size: .89rem; font-weight: 700; }
.compare-text { margin: 0 0 10px; font-size: 1.35rem; line-height: 1.7; white-space: pre-wrap; }
.compare-meaning { margin: 0; }
/* A differing character: boxed, bold and underlined, so it shows without colour. */
.diff {
  display: inline-block; min-width: .6em; padding: 0 2px; margin: 0 1px;
  background: #F8E6E6; color: #8A1C1C; font-weight: 800;
  border: 1px solid #8A1C1C; border-bottom-width: 4px; border-radius: 4px; white-space: pre;
}

/* Speaking practice */
.speak-card { margin-top: 10px; }
.speak-text { margin: 0; font-size: 1.35rem; line-height: 1.6; color: var(--primary); font-weight: 700; }
.speak-gloss { margin: 0 0 8px; }
.speak-play { margin-top: 4px; }
.btn-audio:disabled { opacity: .45; cursor: not-allowed; }
.recorder { margin-top: 12px; padding: 12px 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.recorder-status { margin: 0; font-weight: 700; }
.recorder-status[data-state="recording"]::before { content: "● "; color: #A32020; }
.recorder-status[data-state="ready"]::before { content: "✓ "; color: #1E6B34; }
.recorder .btn-audio-wide { margin-top: 10px; }
.record-icon::before { content: "● "; }
.btn-record[data-state="recording"] { background: #A32020; }
.btn-record[data-state="recording"] .record-icon::before { content: "■ "; }
.btn-record[data-state="requesting"] .record-icon::before { content: "… "; }
.nav-pair { margin-top: 8px; }
.nav-pair .btn { min-height: 48px; padding: 6px 10px; }

/* My record */
.record-block { margin-top: 6px; }
.record-line { margin: 0 0 6px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.notice[data-kind="warn"]::before { content: "⚠ "; font-weight: 700; }

/* Korean voice choice */
.voice-choice { margin-top: 14px; }
.voice-choice .field-label { margin-top: 0; }
.voice-choice .chip::before { content: "○ "; }
.voice-choice .chip[aria-pressed="true"]::before { content: "● "; }

/* Picture questions: the photos are tall, so a centred square shows the object at a sensible height. */
.exam-figure { margin: 10px 0 0; }
.exam-figure img {
  display: block; width: min(100%, 260px); aspect-ratio: 1 / 1; margin: 0 auto;
  object-fit: cover; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface);
}

/* Bottom bar: previous screen / home. Fixed, so it is reachable without scrolling back to the top. */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 2px solid var(--line);
}
.bottomnav-inner { display: flex; gap: 8px; max-width: 448px; margin: 0 auto; }
.bottomnav-btn {
  flex: 1 1 0; min-width: 0; min-height: 48px; padding: 4px 8px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--primary);
  font: inherit; font-size: .89rem; font-weight: 700; line-height: 1.25; cursor: pointer;
}
/* The page ends above the bar, and a sticky action bar sits on top of it instead of under it. */
.has-bottomnav main { padding-bottom: calc(24px + var(--nav-h, 62px)); }
.has-bottomnav .actionbar { bottom: var(--nav-h, 62px); padding-bottom: 10px; }

/* A question that needs an answer before anything else (leave the app, stop a test). */
.confirm {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center;
  padding: var(--gutter); background: rgba(27, 42, 47, .6);
}
.confirm-box {
  width: 100%; max-width: 420px; padding: 18px 16px 16px;
  background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius);
}
.confirm-box h2 { margin: 0 0 8px; font-size: 1.25rem; color: var(--ink); }
.confirm-buttons { display: grid; gap: 8px; margin-top: 14px; }
.confirm-buttons .btn { margin-top: 0; }

/* "What this screen is": the first thing on every screen, with a button that reads it aloud. */
.about {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 10px 0 14px; padding: 12px 14px;
  background: #E6F1EF; border-left: 4px solid var(--primary); border-radius: 8px;
}
.about:empty { display: none; }
.about-text { flex: 1 1 100%; margin: 0; }
.about .card-error { flex: 1 1 100%; margin: 0; }
#home-voice-off { margin-top: 8px; }

/* One sentence in depth: the card opens it; the detail screen takes it apart and asks three questions. */
.card-open {
  display: block; width: 100%; min-height: 48px; padding: 0; border: 0;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.card-open > span { display: block; }
.card-more { margin: 2px 0 8px; color: var(--primary); font-weight: 700; }
.detail-block { margin-top: 4px; }
.quiz-question {
  margin: 0 0 14px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.quiz-title { margin: 0 0 8px; font-size: 1rem; }
.quiz-prompt { margin: 0 0 4px; font-weight: 700; }
.quiz-lao {
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
  font-size: 1.45rem; font-weight: 400; line-height: 1.9; color: var(--primary);
}
/* The place of the missing word: a dashed box, so it shows without colour. */
.gap {
  display: inline-block; min-width: 3.2em; min-height: 1.5em; padding: 0 6px;
  border: 2px dashed var(--ink); border-radius: 8px; text-align: center; vertical-align: middle; line-height: 1.5;
}
.build {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  min-height: 76px; margin: 8px 0; padding: 8px;
  border: 2px dashed var(--line); border-radius: var(--radius);
}
.build .hint { margin: 0; }
.chip-lao { min-height: 60px; padding: 4px 14px; border-radius: var(--radius); text-align: center; }
.chip:disabled { cursor: default; }
.piece {
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
  font-size: 1.3rem; font-weight: 400; line-height: 1.5;
}
.piece small { display: block; font-family: "Segoe UI", system-ui, sans-serif; font-size: .89rem; color: var(--ink-soft); }

/* Photos of Laos: a fixed 3:2 frame (no jump while loading), never wider than the page, credit underneath. */
.photo { margin: 0 0 10px; }
.photo img {
  display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); background: var(--pill-bg);
}
.photo-credit {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--ink-soft); font-size: .89rem; line-height: 1.35; text-decoration: underline;
}
#credits-list .photo { margin-bottom: 0; }

/* End-of-lesson check */
.check-meaning { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; }
.check-word { font-size: 1.35rem; line-height: 1.5; }
.check-word[lang="lo"], .check-answer b[lang="lo"] {
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
}
.check-answer {
  margin: 8px 0 0; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.check-answer b { font-size: 1.2rem; }

/* Tone lessons: the measured pitch picture of a clip, slow listening, comparison strip, ear training. */
.item-tone { grid-template-columns: 1fr; row-gap: 8px; }
.tone-item { min-width: 0; }
.tone-figure { display: flex; align-items: stretch; gap: 8px; }
.tone-scale {
  flex: none; display: flex; flex-direction: column; justify-content: space-around;
  color: var(--ink-soft); font-size: .89rem; line-height: 1.2;
}
.tone-svg { display: block; flex: 1 1 auto; min-width: 0; width: 100%; height: auto; background: var(--bg); border-radius: 8px; }
.tone-guide { stroke: var(--ink-soft); stroke-width: 1; opacity: .6; }
.tone-line { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tone-dot { fill: var(--primary); }
.tone-says { margin: 6px 0 0; font-size: .89rem; line-height: 1.45; color: var(--ink-soft); }
.tone-says span { display: block; }
.tone-says span + span { color: var(--ink); font-weight: 700; }
.tone-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn-audio-soft { background: var(--surface); color: var(--primary); border: 2px solid var(--primary); }
.tone-compare {
  margin: 0 0 18px; padding: 12px 14px;
  background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius);
}
.tone-title { margin: 0 0 4px; font-size: 1rem; color: var(--primary); }
.tone-compare .hint { margin-top: 4px; }
.tone-strip { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; }
.tone-cell { min-width: 0; padding: 4px; border: 2px solid transparent; border-radius: 8px; }
/* The word being played: a frame and a ▶ before the word, not colour alone. */
.tone-cell[data-now="true"] { border-color: var(--accent); background: var(--pill-bg); }
.tone-word { margin: 4px 0 0; text-align: center; line-height: 1.35; overflow-wrap: anywhere; }
.tone-word span { display: block; }
.tone-word .tone-now { display: inline; margin-right: 4px; font-size: .89rem; }
.tone-word .tone-now[hidden] { display: none; }
.tone-lao {
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
  font-size: 1.3rem; color: var(--primary);
}
.tone-word .tone-lao { display: inline; }
.tone-meaning { font-size: .89rem; color: var(--ink-soft); }
.tone-status { min-height: 1.5em; margin: 8px 0 0; font-weight: 700; }
.tone-same { margin-top: 10px; }
.tone-quiz { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.tone-quiz .btn { margin-top: 8px; }
.tone-score { min-height: 1.5em; margin: 10px 0 0; font-weight: 700; }

/* The situation list: a short row of buttons and one that opens them all. */
.chip-more { margin-top: 8px; border-style: dashed; border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* Learn words: a flip card (word, pronunciation, sound; the meaning after a tap) and the deck screens */
.word-card { padding: 20px 14px; text-align: center; }
.word-lao { font-size: 2.6rem; line-height: 1.5; }
.word-card .btn-audio { margin: 6px auto 0; }
.word-meaning {
  margin: 14px 0 0; padding-top: 12px; border-top: 2px dashed var(--line);
  font-size: 1.3rem; font-weight: 700;
}
.word-pair { margin-top: 12px; }
.module-known { color: var(--primary); font-weight: 700; }
#scenario-words { margin-top: 10px; }

/* Go-deeper questions: wide buttons, one question each */
.ask-block { margin-top: 10px; }
.ask-list { list-style: none; margin: 8px 0 12px; padding: 0; }
.ask-chip {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 10px 14px; margin-bottom: 8px;
  background: #E6F1EF; border: 2px solid var(--primary); border-radius: var(--radius);
  color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.ask-mark {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); font-weight: 800; text-align: center; line-height: 30px;
}
.ask-text { flex: 1 1 auto; min-width: 0; }
.ask-answer { font-size: 1.05rem; }

/* Recordings of a Lao speaker in the tone lessons */

/* Grammar guide: pattern strip (labelled boxes), sentences cut into words, tap-the-place questions */
.pattern { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; padding: 0; }
.slot {
  flex: 1 1 auto; min-width: 76px; padding: 8px 6px; text-align: center;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
}
/* Four looks in turn (fill and frame); what a box is, is always written inside it. */
.slot[data-tone="0"] { background: #E6F1EF; border-color: var(--primary); }
.slot[data-tone="1"] { background: #FBE9D2; border-color: #8A4A08; border-style: dashed; }
.slot[data-tone="2"] { background: #EDE7F6; border-color: #4B3A8C; border-style: double; border-width: 4px; }
.slot[data-tone="3"] { background: var(--pill-bg); border-style: dotted; }
.slot .piece { white-space: nowrap; }
.slot-label { display: block; margin-bottom: 2px; font-size: .89rem; font-weight: 700; line-height: 1.3; }
.chunks { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 6px 0 4px; }
.chunk {
  min-width: 48px; min-height: 60px; padding: 4px 10px; text-align: center;
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font: inherit; cursor: pointer;
}
.chunk[data-focus="true"] { border-color: var(--primary); border-width: 4px; }
.chunk[data-state="playing"] { background: var(--pill-bg); border-color: var(--accent); }
.chunk-gloss { display: block; color: var(--ink-soft); font-size: .89rem; line-height: 1.3; }
.chunk-static { display: inline-flex; flex-direction: column; justify-content: center; background: var(--surface); cursor: default; }
.chunk.gap { border: 2px dashed var(--ink); font-size: 1.3rem; font-weight: 700; }
.place {
  min-width: 48px; min-height: 60px; padding: 4px 8px;
  background: #E6F1EF; border: 2px dashed var(--primary); border-radius: var(--radius);
  color: var(--primary); font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer;
}
.place:disabled { cursor: default; }
.place[data-mark="right"] { border-style: solid; border-color: #1E6B34; background: #E4F3E7; color: #1E6B34; }
.place[data-mark="wrong"] { border-style: solid; border-color: #8A1C1C; background: #F8E6E6; color: #8A1C1C; }
.turn-word { margin: 4px 0 8px; }
.turn-word .piece { display: inline-block; margin: 0 6px; padding: 2px 10px; vertical-align: middle; border: 2px solid var(--primary); border-radius: var(--radius); }
.lao-pair { margin: 0; }
.pair-lao {
  display: block; color: var(--primary); font-size: 1.45rem; font-weight: 400; line-height: 1.6;
  font-family: "Noto Sans Lao", "Leelawadee UI", "Lao Sangam MN", "Saysettha OT", sans-serif;
}
.pair-roman { display: block; font-size: 1rem; font-weight: 700; }
.check-answer .btn-audio { margin-top: 8px; }

/* "Start without the script": the choice on the first screen */
.script-choice { margin-top: 8px; }
.script-choice .field-label { margin-top: 8px; }
.script-choice .modules { margin-top: 6px; }
.script-choice .module-open[aria-pressed="true"] { background: #E6F1EF; border-width: 4px; }
.script-choice .btn-quiet { margin-top: 0; min-height: 48px; }
.lao-pair > span { display: block; }
.lao-pair > p { margin: 0; }
.pair-roman { margin: 0 0 4px; }

/* Speak first: how a word is said is large and comes first; the Lao letters are small beneath it. Nothing is hidden. */
.speak-first .lao-pair { display: flex; flex-direction: column-reverse; }
.speak-first .card-lao, .speak-first .pair-lao, .speak-first .quiz-lao { font-size: 1.05rem; line-height: 1.6; }
.speak-first .card-roman { margin: 0; }
.speak-first .card-roman b, .speak-first .pair-roman { font-size: 1.5rem; line-height: 1.4; }
.speak-first .word-card .card-roman b { display: block; font-size: 2.2rem; }
.speak-first .word-lao { font-size: 1.2rem; }
.speak-first .piece { display: flex; flex-direction: column-reverse; font-size: 1rem; line-height: 1.4; }
.speak-first .piece small { color: var(--ink); font-size: 1.3rem; font-weight: 700; line-height: 1.35; }
.speak-first .turn-word .piece { display: inline-flex; }
.speak-first .item-lao[lang="lo"] { display: flex; flex-direction: column-reverse; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.5; }
.speak-first .item-lao[lang="lo"] b { margin-left: 0; color: var(--ink); font-size: 1.45rem; line-height: 1.4; }

/* The 14-day course: the bar inside a step, progress with its numbers in words, the card of a finished day */
.plan-bar {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px;
  margin: 6px calc(var(--gutter) * -1) 0; padding: 8px var(--gutter);
  background: var(--pill-bg); border-bottom: 2px solid var(--accent);
}
.plan-bar-text { flex: 1 1 0; min-width: 0; margin: 0; font-size: .89rem; font-weight: 700; line-height: 1.3; }
.plan-bar-btn {
  flex: 0 1 auto; max-width: 64%; min-height: 48px; padding: 4px 14px;
  border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink);
  font: inherit; font-size: .89rem; font-weight: 700; line-height: 1.25; cursor: pointer;
}
.plan-progress { margin: 8px 0 10px; }
.plan-meter { display: block; width: 100%; height: 18px; accent-color: var(--primary); }
.plan-progress-text { margin: 4px 0 0; font-weight: 700; }
.done-card { background: #E6F1EF; border: 2px solid var(--primary); }
.done-title { margin: 0 0 6px; color: var(--primary); font-size: 1.3rem; }
.plan-summary { margin: 8px 0 0; font-size: 1.15rem; font-weight: 700; }
.share-card .lesson-heading { margin-top: 0; }
.share-link { margin: 8px 0 0; color: var(--ink-soft); font-size: .89rem; user-select: all; }

/* Word boxes: every Lao sentence cut into words (word-boxes.js). The row itself is .chunks / .chunk. */
.wb { margin: 4px 0 6px; }
.wb .chunk { max-width: 100%; }
.wb-original { margin: 2px 0 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.5; }
.wb-original span { font-size: 1rem; }
.option .wb { flex: 1; min-width: 0; margin: 0; text-align: left; }
.option .wb .chunks { margin: 0; }
.card-foot .card-more { margin: 0; }

/* Teacher mode: one thing at a time, large; the word being said stands out (border, size and an arrow — not colour alone). */
.teach-step { margin: 0 0 6px; color: var(--ink-soft); font-size: .89rem; }
.teach-dots { margin: 0 0 8px; color: var(--primary); font-size: 1rem; letter-spacing: 3px; line-height: 1.2; overflow-wrap: anywhere; }
.teach-stage { min-height: 150px; }
.teach-meaning { margin: 8px 0; font-size: 1.6rem; font-weight: 700; line-height: 1.35; }
.teach-meaning-small { font-size: 1.2rem; }
.teach-boxes .chunks { gap: 10px 8px; padding-top: 22px; }
.teach-boxes .chunk { position: relative; padding: 8px 10px; font-size: 1.25rem; transition: transform .15s; }
.teach-boxes .chunk[data-now="true"] { border: 4px solid var(--primary); background: var(--pill-bg); transform: scale(1.08); z-index: 1; }
.teach-boxes .chunk[data-now="true"]::before {
  content: "▼"; position: absolute; top: -24px; left: 0; right: 0; text-align: center; color: var(--primary); font-size: 1rem; line-height: 1;
}
.teach-boxes .chunk[data-dim="true"] { opacity: .45; }
.teach-boxes .chunk[data-changed="true"] { border-style: dashed; border-color: var(--ink); border-width: 3px; }
.teach-tag { display: block; font-size: .89rem; font-weight: 700; color: var(--ink); }
.teach-caption { margin: 12px 0 8px; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--surface); font-size: 1.1rem; line-height: 1.5; }
.teach-dock { position: sticky; bottom: var(--nav-h, 0px); z-index: 2; margin-top: 12px; padding: 6px 0 8px; background: var(--bg); }
.teach-row { display: flex; gap: 6px; margin-top: 6px; }
.teach-row .btn { flex: 1 1 0; min-width: 0; min-height: 48px; margin-top: 0; padding: 6px 4px; font-size: .89rem; line-height: 1.25; }
.teach-row-main .teach-main { flex: 1.4 1 0; font-size: 1rem; }
.teach-start { width: 100%; min-height: 96px; font-size: 1.4rem; }
.card-foot .card-lesson { margin: 0; }
#scenario-lesson { width: 100%; margin: 8px 0 0; }

/* Level map */
.facts { margin: 0; }
.facts dt { margin-top: 10px; color: var(--ink-soft); font-size: .89rem; font-weight: 700; }
.facts dd { margin: 0; }
.level-soon { list-style: none; border-style: dashed; }
.level-soon .card-meaning { color: var(--ink-soft); }
.teach-help { width: 100%; }

/* Letter lessons in teacher mode (letter-lesson-view.js) and the letters of a word (word-boxes.js). */
.lesson-voice { width: 100%; min-height: 64px; font-size: 1.1rem; }
.letter-stage { text-align: center; }
.letter-big { margin: 18px auto 6px; padding: 4px 18px; width: fit-content; max-width: 100%; border: 3px solid transparent; border-radius: var(--radius); font-family: var(--lao-font, inherit); font-size: 5rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.letter-big-small { font-size: 1.6rem; }
.letter-label { margin: 6px 0 2px; color: var(--ink-soft); font-size: .89rem; }
.letter-word { display: inline-flex; margin: 0 auto; padding: 8px 16px; border: 3px solid var(--line, var(--ink-soft)); font-size: 1.6rem; max-width: 100%; }
.letter-mark { font-weight: 700; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; text-decoration-color: var(--primary); background: var(--pill-bg); }
.letter-pieces { justify-content: center; gap: 10px 8px; padding-top: 22px; }
.letter-pieces .chunk { position: relative; padding: 8px 12px; font-size: 1.4rem; border-width: 3px; }
.letter-stage [data-now="true"] { border-color: var(--primary); border-style: solid; background: var(--pill-bg); }
.letter-stage .letter-pieces .chunk[data-now="true"] { border-width: 4px; transform: scale(1.08); }
.letter-stage .letter-pieces .chunk[data-now="true"]::before { content: "▼"; position: absolute; top: -24px; left: 0; right: 0; text-align: center; color: var(--primary); font-size: 1rem; line-height: 1; }
.letter-stage .letter-word[data-now="true"] { border-width: 4px; }
.letters-open { min-height: 48px; margin-top: 6px; }
.letters-hint { margin-top: 2px; }
.letters-panel { margin: 8px 0; padding: 10px 12px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--surface); }
.letters-title { margin: 0 0 6px; font-weight: 700; }
.letters-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.letters-pick { min-height: 48px; min-width: 48px; margin: 0; font-size: 1.1rem; }
.letters-pick[aria-pressed="true"] { border: 3px solid var(--primary); font-weight: 700; }
.letters-word { margin: 4px 0; font-size: 1.6rem; font-weight: 700; }
.letters-word small { font-size: 1rem; font-weight: 400; color: var(--ink-soft); }
.letters-list { margin: 0 0 8px; padding: 0; list-style: none; }
.letters-list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line, #ddd); font-size: 1rem; line-height: 1.4; }
.letters-letter { flex: 0 0 3.2em; font-size: 1.5rem; text-align: center; }
.letters-note { color: var(--ink-soft); }

/* A grammar unit in teacher mode (unit-lesson-view.js): the place of the pattern being explained stands out. */
.teach-pattern { gap: 10px 8px; padding-top: 22px; }
.teach-pattern .slot { position: relative; transition: transform .15s; }
.teach-pattern .slot[data-now="true"] { border: 4px solid var(--ink); transform: scale(1.08); z-index: 1; box-shadow: 0 0 0 3px var(--accent); }
.teach-pattern .slot[data-now="true"]::before { content: "▼"; position: absolute; top: -24px; left: 0; right: 0; text-align: center; color: var(--primary); font-size: 1rem; line-height: 1; }
.teach-pattern .slot[data-dim="true"] { opacity: .45; }
/* An example sentence of a basic lesson as word boxes. */
.item-boxed .wb { margin-top: 0; }
.item-meaning { font-weight: 700; color: var(--ink); }

/* The guide (guide.js): her picture beside what the app says. Without pictures the bubbles simply stand alone. */
.guide-avatar { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid var(--primary); background: var(--pill-bg); }
.guide-avatar[width="72"] { width: 72px; height: 72px; display: block; margin: 0 auto 6px; }
.guide-avatar-credit { width: 96px; height: 96px; }
.guide-credit { display: flex; align-items: center; gap: 12px; }
.guide-credit .photo-credit { flex: 1 1 0; min-width: 0; margin: 0; }
.guide-standing { display: block; width: 112px; height: 200px; max-width: 100%; margin: 0 auto 8px; border-radius: 16px; object-fit: cover; border: 2px solid var(--primary); background: var(--pill-bg); }
.guide-hello { display: flex; justify-content: center; }
.guide-picture { width: 220px; height: 220px; max-width: 100%; border-radius: 50%; object-fit: cover; object-position: center top; border: 4px solid var(--primary); background: var(--pill-bg); margin: 4px 0 10px; }
.guide-name { display: block; margin: 0 0 2px; color: var(--primary); font-size: .89rem; line-height: 1.3; }
.bubble-welcome { margin: 0 0 14px; padding: 12px 14px; background: #E6F1EF; border: 2px solid var(--primary); border-radius: 18px 18px 18px 4px; }
.bubble-welcome h1 { margin-top: 2px; }
.about.bubble { align-items: flex-start; border-left-width: 2px; border: 2px solid var(--primary); border-radius: 18px 18px 18px 4px; }
.about-said { flex: 1 1 0; min-width: 0; }
.teach-said { display: flex; align-items: flex-start; gap: 10px; min-height: 60px; margin: 12px 0 8px; }
.teach-said .teach-caption { flex: 1 1 0; min-width: 0; margin: 0; }

/* A word lesson (word-lesson-view.js): one word large, then all of the group. */
.word-big { display: flex; margin: 24px auto 8px; padding: 16px 20px; font-size: 2.4rem; }
.word-big .chunk-gloss { font-size: 1.2rem; color: var(--ink); }
.word-all { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 10px; padding-top: 26px; }
.word-all .letter-word { position: relative; margin: 0; font-size: 1.25rem; transition: transform .15s; }
.word-all .letter-word[data-now="true"] { transform: scale(1.08); }
.word-all .letter-word[data-now="true"]::before { content: "▼"; position: absolute; top: -24px; left: 0; right: 0; text-align: center; color: var(--primary); font-size: 1rem; line-height: 1; }
.word-all .letter-word[data-dim="true"] { opacity: .45; }

/* The opening picture of the welcome screen. */
.hero { position: relative; height: 300px; margin-top: 8px; border-radius: 22px; overflow: hidden; background: var(--primary); box-shadow: 0 10px 28px rgba(15, 92, 92, .28); }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: hero-drift 30s linear infinite; animation-delay: calc(var(--i) * 6s - 1.2s); }
@keyframes hero-drift {
  0% { opacity: 0; transform: scale(1.02); }
  4% { opacity: 1; }
  20% { opacity: 1; }
  25% { opacity: 0; transform: scale(1.16) translateX(-1.5%); }
  100% { opacity: 0; transform: scale(1.16); }
}
/* Eight pictures (Global Bridge: Seoul and the world): the same 6 seconds each, in a 48-second round. */
.hero-slides[data-count="8"] .hero-slide { animation-name: hero-drift-8; animation-duration: 48s; }
@keyframes hero-drift-8 {
  0% { opacity: 0; transform: scale(1.02); }
  2.5% { opacity: 1; }
  12.5% { opacity: 1; }
  15.6% { opacity: 0; transform: scale(1.16) translateX(-1.5%); }
  100% { opacity: 0; transform: scale(1.16); }
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 40, 44, .10) 0%, rgba(8, 40, 44, .25) 40%, rgba(8, 40, 44, .88) 100%); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px 18px 18px; color: #FFFFFF; }
.hero-text h1 { margin: 0 0 6px; font-size: 2rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.hero-promise { margin: 0; font-size: 1rem; line-height: 1.45; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
#view-welcome .guide-hello { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:first-child { opacity: 1; }
}

.install { margin: 18px 0 6px; padding: 14px; border: 2px dashed var(--accent); border-radius: var(--radius); background: #FFF4E3; }
.install .btn { width: 100%; margin-bottom: 8px; }
.install .hint { margin: 0; }
.hero-langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.hero-lang { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 12px; border-radius: 999px; background: #FFFFFF; color: var(--primary); font-weight: 800; font-size: 1rem; }
.hero-lang.soon { background: rgba(255, 255, 255, .22); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .7); }
.hero-lang small { font-size: 1rem; font-weight: 600; opacity: .9; }
html[data-app="global"] .hero { height: 360px; }

/* "Start here" (v0.49.0) */
.start-all { width: 100%; margin-top: 4px; font-size: 1rem; }
.start-contents { margin: 16px 0 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.start-contents ol { margin: 4px 0 0; padding-left: 1.4em; }
.start-contents li { margin: 0; }
.start-contents a { display: block; min-height: 48px; padding: 10px 0; color: var(--primary); font-weight: 600; }
.start-part { margin-top: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 12px; }
.start-head { display: flex; align-items: center; gap: 10px; }
.start-head .guide-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.start-title { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.start-part > .btn-audio { margin-top: 10px; }
.start-lines, .start-steps { margin: 10px 0 0; }
.start-steps { padding-left: 1.4em; }
.start-line p { margin: 0 0 10px; font-size: 1rem; }
.start-now { background: var(--pill-bg); border-radius: 8px; }
.start-examples { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.start-lao {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 48px; min-width: 48px; max-width: 100%;
  padding: 6px 12px; border: 2px solid var(--primary); border-radius: 12px; background: var(--bg); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.start-lao[data-state="playing"] { background: var(--accent); }
.start-lao-word { font-size: 1.3rem; line-height: 1.5; }
.start-lao-roman { font-size: 1rem; font-weight: 700; color: var(--primary); }
.start-lao-gloss { font-size: 1rem; color: var(--ink-soft); }
.start-links .btn { margin-top: 8px; }
.start-begin { margin-top: 12px; }
.feedback { margin-top: 18px; }
.feedback .hint { margin: 0 0 4px; font-size: 1rem; }
.feedback-btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; margin-top: 6px; }

/* Home, "Learn Lao" (v0.50.0): one coloured button is the step to take now; the others are plain. */
.home-routine { margin: 8px 0 4px; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--pill-bg); border-radius: 8px; font-size: 1rem; line-height: 1.5; }
#lao-modules .module-open { border: 1px solid var(--line); }
#lao-modules .module-open.module-next { background: var(--primary); border: 2px solid var(--primary); color: var(--primary-ink); box-shadow: 0 3px 10px rgba(15, 92, 92, .25); }
#lao-modules .module-next .module-desc, #lao-modules .module-next .module-known, #lao-modules .module-next .module-arrow { color: var(--primary-ink); }
.module-badge { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 1rem; font-weight: 700; }
#lao-modules .module-compact { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
#lao-modules .module-compact .module-desc { display: none; }

/* "Lao grammar at a glance" (v0.51.0): the first row of the grammar guide, and its unit buttons. */
.lesson-row-overview { border-color: var(--accent); background: var(--pill-bg); }
.start-link { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.start-link-kind { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
