/* Learning Spanish is a personal, master-portal-only page. Everything here is
   deliberately namespaced with ls- so none of it can alter a client website,
   the owner portal, or another personal page. */
:root {
  --ls-bg: #f6f0e5;
  --ls-surface: #fffdf8;
  --ls-surface-soft: #eee6d8;
  --ls-ink: #172139;
  --ls-muted: #657084;
  --ls-line: #cfc5b5;
  --ls-blue: #3357d6;
  --ls-blue-dark: #2343b5;
  --ls-blue-soft: #e2e8ff;
  --ls-coral: #e86645;
  --ls-coral-soft: #fde4dc;
  --ls-teal: #247f76;
  --ls-teal-soft: #d8eee9;
  --ls-yellow: #f0bf3f;
  --ls-yellow-soft: #fff0b9;
  --ls-green: #3c7c49;
  --ls-green-soft: #dcebd9;
  --ls-red: #b53936;
  --ls-red-soft: #f8dcd7;
  --ls-radius-sm: 12px;
  --ls-radius: 20px;
  --ls-radius-lg: 30px;
  --ls-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --ls-body: "IBM Plex Sans", "Avenir Next", sans-serif;
  --ls-mono: "IBM Plex Mono", monospace;
  --ls-bottom-nav-h: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ls-bg); }
body.ls-app { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ls-bg); color: var(--ls-ink); font-family: var(--ls-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.ls-app.is-locked { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { display: block; width: 1.25em; height: 1.25em; fill: currentColor; }
[hidden] { display: none !important; }

.ls-skip { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-140%); padding: 10px 14px; border: 2px solid var(--ls-ink); border-radius: 10px; background: var(--ls-surface); color: var(--ls-ink); font-weight: 700; }
.ls-skip:focus { transform: translateY(0); }
.ls-visually-hidden { 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; }

.ls-root { min-height: 100vh; }
.ls-root.is-session { --ls-bottom-nav-h: 0px; }
.ls-root.is-session .ls-mobile-nav { display: none; }
.ls-topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 2px solid var(--ls-ink); background: rgba(246, 240, 229, 0.96); }
.ls-brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--ls-ink); text-decoration: none; }
.ls-brand-mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 2px solid var(--ls-ink); border-radius: 14px; background: var(--ls-coral); color: #fff; font-family: var(--ls-display); font-size: 1.55rem; font-weight: 800; line-height: 1; transform: rotate(-3deg); }
.ls-brand-copy { min-width: 0; display: none; line-height: 1.05; }
.ls-brand-copy strong { display: block; font-family: var(--ls-display); font-size: 1.06rem; }
.ls-brand-copy small { display: block; margin-top: 4px; color: var(--ls-muted); font-size: 0.7rem; font-weight: 600; }
.ls-top-stats { display: flex; align-items: center; gap: 6px; }
.ls-top-stat { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 2px solid var(--ls-line); border-radius: 14px; background: var(--ls-surface); line-height: 1; }
.ls-top-stat-icon { font-size: 1.05rem; }
.ls-top-stat strong, .ls-top-stat small { display: block; }
.ls-top-stat strong { font-family: var(--ls-display); font-size: 0.92rem; }
.ls-top-stat small { display: none; color: var(--ls-muted); font-size: 0.64rem; margin-top: 3px; }
.ls-icon-button { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 2px solid var(--ls-line); border-radius: 14px; background: var(--ls-surface); cursor: pointer; }
.ls-icon-button:hover { border-color: var(--ls-ink); background: var(--ls-surface-soft); }

.ls-shell { min-height: calc(100vh - 72px); }
.ls-sidebar { display: none; }
.ls-main { width: 100%; max-width: 1120px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 24px 16px calc(var(--ls-bottom-nav-h) + 32px); }
.ls-main:focus { outline: none; }
.ls-view { animation: ls-rise 0.28s ease-out both; }

.ls-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.ls-page-head h1, .ls-question-card h1 { max-width: 780px; margin: 3px 0 8px; font-family: var(--ls-display); font-size: clamp(2rem, 8vw, 4rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; }
.ls-page-head p:not(.ls-eyebrow) { max-width: 680px; margin: 0; color: var(--ls-muted); font-size: 1rem; }
.ls-eyebrow { margin: 0; color: var(--ls-blue); font-family: var(--ls-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.ls-unit-back { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin: 0 0 14px; padding: 0; border: 0; background: none; color: var(--ls-muted); font-family: var(--ls-mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; }
.ls-unit-back svg { width: 18px; height: 18px; }
.ls-unit-back:hover { color: var(--ls-blue); }
.ls-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: var(--ls-yellow-soft); color: #6e4d00; font-family: var(--ls-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }

.ls-continue { position: relative; overflow: hidden; display: grid; gap: 20px; padding: 24px; border: 2px solid var(--ls-ink); border-radius: var(--ls-radius-lg); background: var(--ls-blue-soft); }
.ls-continue::after { content: "¿"; position: absolute; right: -8px; top: -36px; color: rgba(51, 87, 214, 0.12); font-family: var(--ls-display); font-size: 11rem; font-weight: 800; line-height: 1; transform: rotate(8deg); pointer-events: none; }
.ls-continue-copy { position: relative; z-index: 1; }
.ls-continue h2 { max-width: 680px; margin: 10px 0 7px; font-family: var(--ls-display); font-size: clamp(1.65rem, 6vw, 2.6rem); line-height: 1; }
.ls-continue p { max-width: 620px; margin: 0; color: #44506d; }
.ls-inline-progress { max-width: 520px; height: 10px; overflow: hidden; margin-top: 18px; border: 2px solid var(--ls-ink); border-radius: 999px; background: var(--ls-surface); }
.ls-inline-progress span { display: block; width: 0; height: 100%; background: var(--ls-blue); transition: width 0.35s ease; }
.ls-continue small { display: block; margin-top: 6px; color: #44506d; font-size: 0.78rem; font-weight: 700; }

.ls-primary-button, .ls-secondary-button, .ls-danger-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--ls-ink); border-radius: 14px; padding: 10px 18px; font-family: var(--ls-display); font-weight: 750; text-decoration: none; cursor: pointer; }
.ls-primary-button { position: relative; z-index: 1; background: var(--ls-blue); color: #fff; }
.ls-primary-button:hover { background: var(--ls-blue-dark); }
.ls-primary-button:disabled { border-color: var(--ls-line); background: var(--ls-surface-soft); color: var(--ls-muted); cursor: not-allowed; }
.ls-secondary-button { background: var(--ls-surface); color: var(--ls-ink); }
.ls-secondary-button:hover { background: var(--ls-surface-soft); }
.ls-danger-button { border-color: var(--ls-red); background: var(--ls-red-soft); color: var(--ls-red); }
.ls-danger-button:hover { background: #f2c8c1; }

.ls-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 42px 0 18px; }
.ls-section-head h2 { margin: 3px 0 0; font-family: var(--ls-display); font-size: clamp(1.45rem, 5vw, 2.15rem); line-height: 1.04; }
.ls-section-head > p { max-width: 520px; margin: 0; color: var(--ls-muted); font-size: 0.9rem; }
.ls-compact-head { margin: 0 0 18px; }

.ls-unit-path { position: relative; display: grid; gap: 14px; }
.ls-unit-path::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 4px; border-radius: 999px; background: var(--ls-line); }
.ls-unit-card { position: relative; z-index: 1; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 14px 14px 14px 0; border: 2px solid var(--ls-line); border-radius: var(--ls-radius); background: var(--ls-surface); text-align: left; cursor: pointer; }
.ls-unit-card:hover { border-color: var(--ls-ink); }
.ls-unit-card.is-current { border-color: var(--ls-blue); background: var(--ls-blue-soft); }
.ls-unit-node { width: 56px; height: 56px; display: grid; place-items: center; border: 2px solid var(--ls-ink); border-radius: 18px; background: var(--ls-surface-soft); font-family: var(--ls-display); font-size: 1.25rem; font-weight: 800; transform: translateX(-1px) rotate(-2deg); }
.ls-unit-card.is-current .ls-unit-node { background: var(--ls-blue); color: #fff; }
.ls-unit-card.is-complete .ls-unit-node { background: var(--ls-green); color: #fff; }
.ls-unit-copy { min-width: 0; }
.ls-unit-copy h3 { margin: 0 0 3px; font-family: var(--ls-display); font-size: 1.05rem; line-height: 1.1; }
.ls-unit-copy p { margin: 0; color: var(--ls-muted); font-size: 0.82rem; }
.ls-unit-meter { width: 58px; text-align: right; }
.ls-unit-meter strong { display: block; font-family: var(--ls-mono); font-size: 0.78rem; }
.ls-unit-meter span { display: block; width: 100%; height: 6px; overflow: hidden; margin-top: 7px; border-radius: 999px; background: var(--ls-surface-soft); }
.ls-unit-meter i { display: block; width: 0; height: 100%; background: var(--ls-blue); }

.ls-due-panel { display: grid; gap: 22px; padding: 24px; border: 2px solid var(--ls-ink); border-radius: var(--ls-radius-lg); background: var(--ls-yellow-soft); }
.ls-due-panel h2 { margin: 10px 0 6px; font-family: var(--ls-display); font-size: clamp(1.55rem, 5vw, 2.3rem); line-height: 1; }
.ls-due-panel p { max-width: 640px; margin: 0; color: #5c5234; }
.ls-due-actions { display: grid; gap: 10px; align-content: center; }
.ls-due-actions > span { color: #5c5234; font-size: 0.86rem; text-align: center; }
.ls-due-actions > span strong { font-family: var(--ls-display); font-size: 1.3rem; color: var(--ls-ink); }

.ls-practice-grid { display: grid; gap: 14px; }
.ls-practice-card { min-height: 170px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 2px solid var(--ls-line); border-radius: var(--ls-radius); background: var(--ls-surface); text-align: left; cursor: pointer; }
.ls-practice-card:hover { border-color: var(--ls-ink); }
.ls-practice-card[data-tone="coral"] { background: var(--ls-coral-soft); }
.ls-practice-card[data-tone="teal"] { background: var(--ls-teal-soft); }
.ls-practice-card[data-tone="blue"] { background: var(--ls-blue-soft); }
.ls-practice-card[data-tone="yellow"] { background: var(--ls-yellow-soft); }
.ls-practice-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border: 2px solid var(--ls-ink); border-radius: 14px; background: var(--ls-surface); font-size: 1.25rem; }
.ls-practice-card h3 { margin: 0 0 4px; font-family: var(--ls-display); font-size: 1.15rem; }
.ls-practice-card p { margin: 0; color: var(--ls-muted); font-size: 0.83rem; }
.ls-practice-count { margin-top: auto; padding-top: 16px; color: var(--ls-ink); font-family: var(--ls-mono); font-size: 0.7rem; font-weight: 600; }

.ls-notebook-head { align-items: stretch; }
.ls-search { min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 2px solid var(--ls-line); border-radius: 15px; background: var(--ls-surface); }
.ls-search:focus-within { border-color: var(--ls-blue); outline: 3px solid rgba(51, 87, 214, 0.18); }
.ls-search svg { flex: none; color: var(--ls-muted); }
.ls-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ls-ink); }
.ls-search input::placeholder { color: #7a8190; }
.ls-filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.ls-filter-row::-webkit-scrollbar { display: none; }
.ls-filter-chip { min-height: 44px; flex: none; padding: 8px 14px; border: 2px solid var(--ls-line); border-radius: 999px; background: var(--ls-surface); font-weight: 700; cursor: pointer; }
.ls-filter-chip.is-active { border-color: var(--ls-ink); background: var(--ls-ink); color: #fff; }
.ls-results-count { margin: 6px 0 14px; color: var(--ls-muted); font-size: 0.82rem; }
.ls-notebook-list { display: grid; gap: 10px; }
.ls-note-card { padding: 16px; border: 2px solid var(--ls-line); border-radius: 16px; background: var(--ls-surface); }
.ls-note-summary { width: 100%; min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.ls-note-title { min-width: 0; }
.ls-note-title strong { display: block; font-family: var(--ls-display); font-size: 1.05rem; }
.ls-note-title small { display: block; overflow: hidden; margin-top: 2px; color: var(--ls-muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.ls-note-meta { display: flex; align-items: center; gap: 8px; }
.ls-type-chip, .ls-source-chip, .ls-question-type, .ls-question-count { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; font-family: var(--ls-mono); font-size: 0.66rem; font-weight: 600; }
.ls-type-chip { background: var(--ls-teal-soft); color: #145b54; text-transform: uppercase; }
.ls-source-chip { background: var(--ls-surface-soft); color: var(--ls-muted); }
.ls-question-count { background: var(--ls-teal-soft); color: #145b54; }
.ls-note-chevron { transition: transform 0.2s ease; }
.ls-note-card.is-open .ls-note-chevron { transform: rotate(180deg); }
.ls-note-detail { padding-top: 14px; border-top: 2px solid var(--ls-surface-soft); margin-top: 12px; }
.ls-note-detail p { margin: 0 0 10px; }
.ls-note-detail dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.ls-note-detail dt { color: var(--ls-muted); font-size: 0.78rem; }
.ls-note-detail dd { margin: 0; font-weight: 600; }
.ls-conjugation-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 0.86rem; }
.ls-conjugation-table th, .ls-conjugation-table td { padding: 9px; border-bottom: 2px solid var(--ls-surface-soft); text-align: left; }
.ls-conjugation-table th { color: var(--ls-muted); font-size: 0.72rem; }
.ls-correction-list { margin-top: 14px; padding: 12px; border-left: 4px solid var(--ls-coral); background: var(--ls-coral-soft); }
.ls-correction-list > strong { font-family: var(--ls-display); font-size: 0.82rem; }
.ls-correction-list ul { margin: 8px 0 0; padding-left: 18px; }
.ls-correction-list li + li { margin-top: 7px; }
.ls-correction-list small { display: block; color: var(--ls-muted); }
.ls-note-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.ls-load-more { width: 100%; margin-top: 14px; }

.ls-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ls-metric { min-height: 122px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border: 2px solid var(--ls-line); border-radius: var(--ls-radius); background: var(--ls-surface); }
.ls-metric:nth-child(2) { background: var(--ls-blue-soft); }
.ls-metric:nth-child(3) { background: var(--ls-yellow-soft); }
.ls-metric:nth-child(4) { background: var(--ls-teal-soft); }
.ls-metric strong { font-family: var(--ls-display); font-size: clamp(1.8rem, 7vw, 2.7rem); line-height: 1; }
.ls-metric span { color: var(--ls-muted); font-size: 0.78rem; font-weight: 700; }
.ls-progress-columns { display: grid; gap: 16px; margin-top: 16px; }
.ls-panel { padding: 20px; border: 2px solid var(--ls-line); border-radius: var(--ls-radius); background: var(--ls-surface); }
.ls-mastery-row { display: grid; grid-template-columns: 94px minmax(0, 1fr) 36px; align-items: center; gap: 10px; margin-top: 12px; }
.ls-mastery-row:first-child { margin-top: 0; }
.ls-mastery-row span, .ls-mastery-row strong { font-size: 0.78rem; }
.ls-mastery-bar { height: 10px; overflow: hidden; border-radius: 999px; background: var(--ls-surface-soft); }
.ls-mastery-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ls-blue); }
.ls-achievement-list { display: grid; gap: 10px; }
.ls-achievement { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--ls-surface-soft); opacity: 0.55; }
.ls-achievement.is-earned { background: var(--ls-yellow-soft); opacity: 1; }
.ls-achievement-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--ls-line); border-radius: 13px; background: var(--ls-surface); font-size: 1.1rem; }
.ls-achievement strong, .ls-achievement small { display: block; }
.ls-achievement strong { font-family: var(--ls-display); font-size: 0.9rem; }
.ls-achievement small { color: var(--ls-muted); font-size: 0.72rem; }
.ls-coverage-panel { margin-top: 16px; }
.ls-coverage-grid { display: grid; gap: 10px; }
.ls-coverage-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 2px solid var(--ls-surface-soft); }
.ls-coverage-row:first-child { border-top: 0; }
.ls-coverage-row strong, .ls-coverage-row small { display: block; }
.ls-coverage-row small { color: var(--ls-muted); font-size: 0.76rem; }
.ls-coverage-row span { font-family: var(--ls-mono); font-size: 0.74rem; font-weight: 600; }

.ls-session { min-height: calc(100vh - 96px); padding-bottom: 190px; }
.ls-session-head { position: sticky; top: 72px; z-index: 20; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0 14px; background: var(--ls-bg); }
.ls-session-close { border-color: transparent; background: transparent; }
.ls-session-progress { height: 12px; overflow: hidden; border: 2px solid var(--ls-line); border-radius: 999px; background: var(--ls-surface); }
.ls-session-progress span { display: block; width: 0; height: 100%; background: var(--ls-teal); transition: width 0.3s ease; }
.ls-session-xp { min-width: 54px; color: var(--ls-blue); font-family: var(--ls-mono); font-size: 0.78rem; font-weight: 600; text-align: right; }
.ls-question-wrap { max-width: 780px; margin: 22px auto 0; }
.ls-question-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ls-question-type { background: var(--ls-blue-soft); color: var(--ls-blue-dark); text-transform: uppercase; }
.ls-question-card { min-height: 420px; display: flex; flex-direction: column; padding: 24px; border: 2px solid var(--ls-ink); border-radius: var(--ls-radius-lg); background: var(--ls-surface); }
.ls-question-instruction { margin: 0 0 12px; color: var(--ls-muted); font-family: var(--ls-mono); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ls-question-card h1 { margin: 0; font-size: clamp(2rem, 9vw, 4.1rem); }
.ls-question-support { margin: 12px 0 0; color: var(--ls-muted); }
.ls-answer-area { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
.ls-choice { width: 100%; min-height: 54px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--ls-line); border-radius: 14px; background: var(--ls-surface); text-align: left; cursor: pointer; }
.ls-choice:hover { border-color: var(--ls-ink); }
.ls-choice.is-selected { border-color: var(--ls-blue); background: var(--ls-blue-soft); }
.ls-choice.is-correct { border-color: var(--ls-green); background: var(--ls-green-soft); }
.ls-choice.is-wrong { border-color: var(--ls-red); background: var(--ls-red-soft); }
.ls-choice-key { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 8px; font-family: var(--ls-mono); font-size: 0.7rem; font-weight: 600; }
.ls-text-answer { width: 100%; min-height: 58px; border: 2px solid var(--ls-line); border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--ls-ink); font-size: 1.05rem; }
.ls-text-answer:focus { border-color: var(--ls-blue); outline: 3px solid rgba(51, 87, 214, 0.18); }
.ls-answer-note { color: var(--ls-muted); font-size: 0.78rem; }
.ls-tile-bank, .ls-tile-answer { min-height: 62px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 10px; border: 2px solid var(--ls-line); border-radius: 14px; }
.ls-tile-answer { margin-bottom: 10px; background: var(--ls-surface-soft); }
.ls-word-tile { min-height: 40px; padding: 7px 11px; border: 2px solid var(--ls-ink); border-radius: 10px; background: var(--ls-surface); font-weight: 700; cursor: pointer; }
.ls-match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.ls-match-option { min-height: 48px; padding: 8px; border: 2px solid var(--ls-line); border-radius: 12px; background: var(--ls-surface); cursor: pointer; }
.ls-match-option.is-selected { border-color: var(--ls-blue); background: var(--ls-blue-soft); }
.ls-match-option.is-matched { border-color: var(--ls-green); background: var(--ls-green-soft); opacity: 0.65; }
.ls-intro-note { padding: 18px; border: 2px solid var(--ls-line); border-radius: 16px; background: var(--ls-blue-soft); }
.ls-intro-note dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.ls-intro-note dt { color: var(--ls-muted); font-size: 0.78rem; }
.ls-intro-note dd { margin: 0; font-weight: 700; }
.ls-form-context { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ls-form-context span { padding: 5px 9px; border-radius: 9px; background: var(--ls-surface-soft); font-family: var(--ls-mono); font-size: 0.72rem; }

.ls-check-bar { position: fixed; z-index: 25; left: 0; right: 0; bottom: var(--ls-bottom-nav-h); min-height: 88px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 16px; border-top: 2px solid var(--ls-ink); background: var(--ls-surface); }
.ls-check-bar.is-correct { background: var(--ls-green-soft); }
.ls-check-bar.is-wrong { background: var(--ls-red-soft); }
.ls-check-bar.is-almost { background: var(--ls-yellow-soft); }
.ls-feedback { flex: 1; min-width: 0; }
.ls-feedback strong, .ls-feedback span { display: block; }
.ls-feedback strong { font-family: var(--ls-display); font-size: 1rem; }
.ls-feedback span { color: var(--ls-muted); font-size: 0.78rem; }
.ls-feedback-answer { margin-top: 4px; color: var(--ls-ink) !important; font-size: 0.9rem !important; }
.ls-feedback-reason { max-width: 760px; margin-top: 4px; }
.ls-check-button { min-width: 132px; }

.ls-mobile-nav { position: fixed; z-index: 28; left: 0; right: 0; bottom: 0; height: var(--ls-bottom-nav-h); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ls-ink); background: var(--ls-surface); }
.ls-mobile-nav-item { min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--ls-muted); font-size: 0.66rem; font-weight: 700; cursor: pointer; }
.ls-mobile-nav-item svg { width: 22px; height: 22px; }
.ls-mobile-nav-item.is-active { color: var(--ls-blue); }

.ls-modal-backdrop { position: fixed; z-index: 60; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(23, 33, 57, 0.6); }
.ls-modal { width: 100%; max-width: 620px; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--ls-ink); border-radius: 24px 24px 16px 16px; background: var(--ls-surface); }
.ls-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 18px 14px; border-bottom: 2px solid var(--ls-line); }
.ls-modal-head h2 { margin: 2px 0 0; font-family: var(--ls-display); font-size: 1.55rem; }
.ls-modal-body { overflow-y: auto; padding: 18px; }
.ls-modal-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 2px solid var(--ls-line); background: var(--ls-surface); }
.ls-setting-group { margin: 0 0 24px; padding: 0; border: 0; }
.ls-setting-group legend { margin-bottom: 10px; font-family: var(--ls-display); font-weight: 700; }
.ls-segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ls-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.ls-segmented span { min-height: 48px; display: grid; place-items: center; border: 2px solid var(--ls-line); border-radius: 12px; background: var(--ls-surface); font-weight: 700; cursor: pointer; }
.ls-segmented input:checked + span { border-color: var(--ls-ink); background: var(--ls-ink); color: #fff; }
.ls-setting-option { min-height: 64px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 0; border-top: 2px solid var(--ls-surface-soft); cursor: pointer; }
.ls-setting-option:first-of-type { border-top: 0; }
.ls-setting-option input { margin-top: 5px; accent-color: var(--ls-blue); }
.ls-setting-option strong, .ls-setting-option small { display: block; }
.ls-setting-option small { margin-top: 2px; color: var(--ls-muted); }
.ls-switch-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 2px solid var(--ls-line); cursor: pointer; }
.ls-switch-row strong, .ls-switch-row small { display: block; }
.ls-switch-row small { margin-top: 2px; color: var(--ls-muted); }
.ls-switch-row input { width: 50px; height: 28px; accent-color: var(--ls-blue); }
.ls-danger-zone { display: grid; gap: 12px; margin-top: 8px; padding: 16px; border: 2px solid var(--ls-red); border-radius: 16px; background: var(--ls-red-soft); }
.ls-danger-zone strong, .ls-danger-zone small { display: block; }
.ls-danger-zone small { margin-top: 3px; color: #744a48; }

.ls-celebration { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; overflow: auto; padding: 20px; background: rgba(23, 33, 57, 0.72); }
.ls-celebration-card { position: relative; width: min(100%, 540px); padding: 28px; border: 2px solid var(--ls-ink); border-radius: var(--ls-radius-lg); background: var(--ls-surface); text-align: center; }
.ls-celebration-card h2 { margin: 4px 0 8px; font-family: var(--ls-display); font-size: clamp(2rem, 9vw, 3.4rem); line-height: 0.96; }
.ls-celebration-card > p:not(.ls-eyebrow) { margin: 0 auto; color: var(--ls-muted); }
.ls-celebration-icon { display: block; margin-bottom: 8px; font-size: 3.6rem; }
.ls-celebration-burst span { position: fixed; z-index: -1; font-size: 2rem; color: var(--ls-yellow); animation: ls-pop 1.2s ease-out infinite alternate; }
.ls-celebration-burst span:nth-child(1) { left: 10%; top: 14%; }
.ls-celebration-burst span:nth-child(2) { right: 12%; top: 20%; animation-delay: 0.2s; }
.ls-celebration-burst span:nth-child(3) { left: 16%; bottom: 16%; animation-delay: 0.4s; }
.ls-celebration-burst span:nth-child(4) { right: 18%; bottom: 12%; color: var(--ls-coral); }
.ls-celebration-burst span:nth-child(5) { left: 50%; top: 6%; color: var(--ls-teal); animation-delay: 0.6s; }
.ls-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.ls-result { padding: 12px 6px; border: 2px solid var(--ls-line); border-radius: 14px; background: var(--ls-surface-soft); }
.ls-result strong, .ls-result span { display: block; }
.ls-result strong { font-family: var(--ls-display); font-size: 1.35rem; }
.ls-result span { color: var(--ls-muted); font-size: 0.68rem; }
.ls-celebration-card .ls-primary-button { width: 100%; }

.ls-toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--ls-bottom-nav-h) + 18px); width: min(calc(100% - 32px), 430px); transform: translateX(-50%); padding: 12px 16px; border: 2px solid var(--ls-ink); border-radius: 14px; background: var(--ls-ink); color: #fff; font-weight: 700; text-align: center; animation: ls-rise 0.2s ease-out both; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--ls-yellow); outline-offset: 3px; }

@keyframes ls-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ls-pop { from { transform: scale(0.8) rotate(-10deg); } to { transform: scale(1.15) rotate(8deg); } }

@media (min-width: 560px) {
  .ls-brand-copy { display: block; }
  .ls-top-stat { padding-inline: 10px; }
  .ls-top-stat small { display: block; }
  .ls-main { padding-inline: 24px; }
  .ls-continue, .ls-due-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 30px; }
  .ls-practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-notebook-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
  .ls-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ls-danger-zone { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .ls-modal-backdrop { align-items: center; }
  .ls-modal { border-radius: 24px; }
  .ls-answer-area { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-answer-area:has(.ls-text-answer), .ls-answer-area:has(.ls-tile-bank), .ls-answer-area:has(.ls-match-board), .ls-answer-area:has(.ls-intro-note) { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  :root { --ls-bottom-nav-h: 0px; }
  .ls-topbar { padding-inline: 24px; }
  .ls-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .ls-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; padding: 24px 16px; border-right: 2px solid var(--ls-ink); background: var(--ls-surface); }
  .ls-side-nav { display: grid; gap: 7px; }
  .ls-nav-item { min-height: 50px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid transparent; border-radius: 14px; background: transparent; color: var(--ls-muted); font-weight: 700; text-align: left; cursor: pointer; }
  .ls-nav-item:hover { border-color: var(--ls-line); color: var(--ls-ink); }
  .ls-nav-item.is-active { border-color: var(--ls-ink); background: var(--ls-blue-soft); color: var(--ls-blue-dark); }
  .ls-nav-badge { min-width: 25px; min-height: 25px; display: grid; place-items: center; border-radius: 999px; background: var(--ls-coral); color: #fff; font-family: var(--ls-mono); font-size: 0.67rem; }
  .ls-side-note { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; margin-top: auto; padding: 14px; border: 2px solid var(--ls-line); border-radius: 14px; background: var(--ls-yellow-soft); }
  .ls-side-note span { font-size: 1.35rem; }
  .ls-side-note p { margin: 0; color: #615736; font-size: 0.72rem; line-height: 1.35; }
  .ls-side-note strong { color: var(--ls-ink); }
  .ls-portal-link { min-height: 44px; display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ls-muted); font-size: 0.72rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
  .ls-portal-link:hover { color: var(--ls-blue); }
  .ls-main { max-width: 1180px; margin: 0; padding: 46px clamp(28px, 5vw, 72px) 64px; }
  .ls-mobile-nav { display: none; }
  .ls-progress-columns { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); }
  .ls-check-bar { left: 248px; bottom: 0; padding-inline: clamp(28px, 5vw, 72px); }
  .ls-root.is-session .ls-shell { display: block; }
  .ls-root.is-session .ls-sidebar { display: none; }
  .ls-root.is-session .ls-main { max-width: 1040px; margin-inline: auto; }
  .ls-root.is-session .ls-check-bar { left: 0; }
  .ls-toast { bottom: 22px; }
  .ls-session-head { top: 72px; }
}

@media (min-width: 1180px) {
  .ls-shell { grid-template-columns: 276px minmax(0, 1fr); }
  .ls-sidebar { padding-inline: 22px; }
  .ls-check-bar { left: 276px; }
  .ls-practice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ls-unit-card { grid-template-columns: 66px minmax(0, 1fr) 96px 18px; padding: 18px 20px 18px 0; }
  .ls-unit-node { width: 66px; height: 66px; border-radius: 20px; }
  .ls-unit-path::before { left: 32px; }
  .ls-unit-copy h3 { font-size: 1.18rem; }
  .ls-unit-meter { width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Modern, quiet surface system. Spacing and background contrast create the
   hierarchy; cards and controls do not need decorative outlines. */
:root {
  --ls-bg: #f5f7fb;
  --ls-surface: #ffffff;
  --ls-surface-soft: #edf1f6;
  --ls-ink: #182230;
  --ls-muted: #667085;
  --ls-line: #dfe4eb;
  --ls-blue: #5368d8;
  --ls-blue-dark: #4054bf;
  --ls-blue-soft: #edf0ff;
  --ls-coral-soft: #fff0eb;
  --ls-teal-soft: #e6f5f1;
  --ls-yellow-soft: #fff5d6;
  --ls-green-soft: #e8f5e9;
  --ls-red-soft: #ffebe8;
  --ls-radius-sm: 10px;
  --ls-radius: 16px;
  --ls-radius-lg: 22px;
}

body.ls-app { background: var(--ls-bg); }
.ls-topbar {
  min-height: 76px;
  gap: 16px;
  padding: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
}
.ls-brand { gap: 16px; }
.ls-brand-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  transform: none;
}
.ls-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.ls-top-stats { gap: 12px; }
.ls-top-stat {
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-bg);
}
.ls-icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-bg);
}
.ls-icon-button:hover { border-color: transparent; background: var(--ls-blue-soft); }
.ls-main { padding: 32px 20px calc(var(--ls-bottom-nav-h) + 40px); }
.ls-page-head { gap: 24px; margin-bottom: 32px; }
.ls-page-head h1 { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.02; }
.ls-question-card h1 { font-size: clamp(1.8rem, 6vw, 3.25rem); line-height: 1.08; }
.ls-kicker, .ls-type-chip, .ls-source-chip, .ls-question-type { padding: 8px 12px; }

.ls-continue,
.ls-due-panel,
.ls-question-card,
.ls-panel,
.ls-modal,
.ls-celebration-card {
  padding: 28px;
  border: 0;
  border-radius: var(--ls-radius-lg);
}
.ls-continue::after { display: none; }
.ls-continue, .ls-question-card, .ls-panel, .ls-modal, .ls-celebration-card { background: var(--ls-surface); }
.ls-due-panel { background: var(--ls-yellow-soft); }
.ls-inline-progress, .ls-session-progress {
  border: 0;
  background: var(--ls-surface-soft);
}

.ls-primary-button,
.ls-secondary-button,
.ls-danger-button {
  min-height: 52px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
}
.ls-secondary-button { background: var(--ls-surface-soft); }
.ls-primary-button:disabled { border: 0; }
.ls-danger-button { border: 0; }

.ls-section-head { gap: 16px 24px; margin: 48px 0 20px; }
.ls-unit-path, .ls-practice-grid, .ls-notebook-list, .ls-achievement-list, .ls-coverage-grid { gap: 16px; }
.ls-unit-path::before { display: none; }
.ls-unit-card {
  width: 100%;
  grid-template-columns: 52px minmax(0, 1fr) auto 18px;
  gap: 16px;
  min-height: 96px;
  padding: 20px;
  border: 0;
  border-radius: var(--ls-radius);
  background: var(--ls-surface);
}
.ls-unit-card:hover { border-color: transparent; background: var(--ls-blue-soft); }
.ls-unit-card.is-current { border: 0; background: var(--ls-blue-soft); }
.ls-unit-node {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  transform: none;
}
.ls-unit-meter { width: 72px; }
.ls-unit-arrow { width: 18px; height: 18px; color: var(--ls-muted); }
.ls-lesson-panel { padding: 20px; border-radius: var(--ls-radius); background: var(--ls-surface); }
.ls-lesson-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; color: var(--ls-muted); font-size: 0.78rem; }
.ls-lesson-panel-head strong, .ls-lesson-panel-head small { display: block; }
.ls-lesson-panel-head strong { color: var(--ls-ink); font-size: 0.9rem; }
.ls-lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ls-lesson-step { min-height: 76px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 0; border-radius: 14px; background: var(--ls-bg); color: var(--ls-ink); text-align: left; cursor: pointer; }
.ls-lesson-step:hover:not(:disabled) { background: var(--ls-blue-soft); }
.ls-lesson-step.is-current { background: var(--ls-blue-soft); }
.ls-lesson-step.is-complete { background: var(--ls-green-soft); }
.ls-lesson-step.is-locked { opacity: 0.55; cursor: not-allowed; }
.ls-lesson-step-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--ls-surface); font-family: var(--ls-display); font-weight: 800; }
.ls-lesson-step.is-current .ls-lesson-step-icon { background: var(--ls-blue); color: #fff; }
.ls-lesson-step.is-complete .ls-lesson-step-icon { background: var(--ls-green); color: #fff; }
.ls-lesson-step-copy strong, .ls-lesson-step-copy small { display: block; }
.ls-lesson-step-copy strong { font-family: var(--ls-display); }
.ls-lesson-step-copy small { margin-top: 2px; color: var(--ls-muted); font-size: 0.75rem; }
.ls-lesson-step-action { padding: 7px 10px; border-radius: 999px; background: var(--ls-surface); color: var(--ls-muted); font-size: 0.7rem; font-weight: 700; }
.ls-lesson-step.is-current .ls-lesson-step-action { background: var(--ls-blue); color: #fff; }
.ls-due-actions { gap: 16px; }
.ls-practice-card {
  min-height: 180px;
  padding: 24px;
  border: 0;
  border-radius: var(--ls-radius);
}
.ls-practice-card:hover { border-color: transparent; background: var(--ls-blue-soft); }
.ls-practice-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border: 0;
  border-radius: 12px;
}
.ls-practice-count { padding-top: 20px; }

.ls-search {
  min-height: 56px;
  gap: 12px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-surface);
}
.ls-search:focus-within { border: 0; outline: 0; background: var(--ls-blue-soft); }
.ls-filter-row { gap: 12px; padding: 4px 0 16px; }
.ls-filter-chip { min-height: 46px; padding: 12px 16px; border: 0; background: var(--ls-surface); }
.ls-filter-chip.is-active { border: 0; background: var(--ls-ink); }
.ls-note-card, .ls-metric, .ls-achievement, .ls-result {
  padding: 20px;
  border: 0;
  border-radius: var(--ls-radius);
}
.ls-note-card, .ls-metric { background: var(--ls-surface); }
.ls-note-summary { gap: 16px; }
.ls-note-detail { margin-top: 16px; padding-top: 16px; border: 0; background: var(--ls-bg); border-radius: 12px; }
.ls-note-detail > * { margin-inline: 16px; }
.ls-conjugation-table th, .ls-conjugation-table td { padding: 12px 16px; border: 0; }
.ls-conjugation-table tr:nth-child(even) { background: var(--ls-surface-soft); }
.ls-correction-list { padding: 16px; border: 0; border-radius: 12px; }
.ls-metric-grid, .ls-progress-columns { gap: 16px; }
.ls-achievement { gap: 16px; }
.ls-achievement-icon { border: 0; }
.ls-coverage-row { gap: 16px; padding: 16px; border: 0; border-radius: 12px; background: var(--ls-bg); }

.ls-session-head { gap: 16px; padding: 16px 0 20px; }
.ls-question-wrap { margin-top: 24px; }
.ls-question-meta { gap: 16px; margin-bottom: 16px; }
.ls-question-card { min-height: 0; }
.ls-question-instruction { margin-bottom: 16px; }
.ls-question-support { margin-top: 16px; }
.ls-answer-area { gap: 16px; margin-top: 28px; padding-top: 0; }
.ls-choice {
  min-height: 58px;
  gap: 16px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-bg);
}
.ls-choice:hover { border-color: transparent; background: var(--ls-surface-soft); }
.ls-choice.is-selected { border: 0; background: var(--ls-blue-soft); }
.ls-choice.is-correct { border: 0; background: var(--ls-green-soft); }
.ls-choice.is-wrong { border: 0; background: var(--ls-red-soft); }
.ls-choice-key { border: 0; background: var(--ls-surface); }
.ls-text-answer {
  min-height: 60px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-bg);
}
.ls-text-answer:focus { border: 0; outline: 0; background: var(--ls-blue-soft); }
.ls-tile-bank, .ls-tile-answer {
  min-height: 72px;
  gap: 12px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ls-bg);
}
.ls-word-tile, .ls-match-option {
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ls-surface-soft);
}
.ls-match-board { gap: 16px; }
.ls-match-option.is-selected { border: 0; background: var(--ls-blue-soft); }
.ls-match-option.is-matched { border: 0; background: var(--ls-green-soft); }
.ls-intro-note { padding: 20px; border: 0; border-radius: 14px; }
.ls-form-context { gap: 10px; margin-top: 16px; }
.ls-form-context span { padding: 8px 12px; }

.ls-check-bar {
  min-height: 96px;
  gap: 20px;
  padding: 16px 24px;
  border: 0;
}
.ls-mobile-nav { border: 0; background: rgba(255, 255, 255, 0.98); }
.ls-modal-backdrop { padding: 16px; }
.ls-modal { padding: 0; }
.ls-modal-head { gap: 20px; padding: 20px; border: 0; }
.ls-modal-body { padding: 20px; }
.ls-modal-foot { padding: 16px 20px; border: 0; }
.ls-setting-group { margin-bottom: 28px; }
.ls-setting-group legend { margin-bottom: 16px; }
.ls-setting-help { margin: -8px 0 16px; color: var(--ls-muted); font-size: 0.8rem; }
.ls-segmented { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ls-segmented span { min-height: 52px; padding: 16px; border: 0; background: var(--ls-bg); }
.ls-segmented input:checked + span { border: 0; background: var(--ls-ink); }
.ls-setting-option { gap: 16px; padding: 16px; border: 0; border-radius: 12px; }
.ls-setting-option:hover { background: var(--ls-bg); }
.ls-switch-row { gap: 20px; padding: 20px 16px; border: 0; border-radius: 12px; background: var(--ls-bg); }
.ls-danger-zone { gap: 16px; margin-top: 16px; padding: 20px; border: 0; }
.ls-result-grid { gap: 12px; }
.ls-celebration-actions { display: grid; gap: 12px; }
.ls-celebration-actions .ls-primary-button, .ls-celebration-actions .ls-secondary-button { width: 100%; }
.ls-toast { padding: 16px 20px; border: 0; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 0; }
button:focus-visible, .ls-nav-item:focus-visible, .ls-mobile-nav-item:focus-visible { background-color: var(--ls-yellow-soft); color: var(--ls-ink); }
a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (min-width: 560px) {
  .ls-main { padding-inline: 32px; }
  .ls-continue, .ls-due-panel { padding: 32px; }
  .ls-celebration-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-celebration-actions:has(.ls-secondary-button[hidden]) { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .ls-topbar { padding-inline: 24px; }
  .ls-sidebar { padding: 28px 20px; border: 0; background: var(--ls-surface); }
  .ls-side-nav { gap: 12px; }
  .ls-nav-item { min-height: 52px; gap: 16px; padding: 16px; border: 0; border-radius: 12px; }
  .ls-nav-item:hover { border: 0; background: var(--ls-bg); }
  .ls-nav-item.is-active { border: 0; background: var(--ls-blue-soft); }
  .ls-side-note { gap: 12px; padding: 16px; border: 0; }
  .ls-portal-link { gap: 12px; padding: 16px 0; }
  .ls-main { padding: 48px clamp(32px, 5vw, 72px) 72px; }
}

@media (max-width: 559px) {
  .ls-top-stat { padding: 10px 12px; }
  .ls-continue, .ls-due-panel, .ls-question-card, .ls-panel, .ls-celebration-card { padding: 24px 20px; }
  .ls-unit-card { grid-template-columns: 48px minmax(0, 1fr) 18px; padding: 20px 16px; }
  .ls-unit-node { width: 48px; height: 48px; }
  .ls-unit-meter { grid-column: 2 / span 2; grid-row: 2; width: 100%; text-align: left; }
  .ls-unit-arrow { grid-column: 3; grid-row: 1; }
  .ls-lesson-panel { padding: 16px; }
  .ls-lesson-panel-head { align-items: flex-start; flex-direction: column; }
  .ls-lesson-grid { grid-template-columns: 1fr; }
  .ls-segmented { grid-template-columns: repeat(2, 1fr); }
  .ls-check-bar { align-items: stretch; flex-direction: column; padding: 16px; }
  .ls-check-button { width: 100%; }
  .ls-session { padding-bottom: 320px; }
}
