:root {
  color-scheme: dark;
  --page-pad: clamp(13px, 4vw, 18px);
  --frame-w: min(100vw, 520px);
  --topbar-h: 82px;
  --tabbar-h: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #030711;
  --surface: #0b111c;
  --surface-soft: #111827;
  --surface-high: #161f2d;
  --line: #202a38;
  --line-soft: #141d29;
  --text: #f3f6ff;
  --muted: #9aa3b2;
  --faint: #626c7a;
  --accent: #7886b2;
  --accent-dark: #111827;
  --on-accent: #f8f9ff;
  --green: #58cc02;
  --green-light: #77e63b;
  --bad: #ff8a8a;
  --warn: #d7b86a;
  --on-warn: #111827;
  --radius: 16px;
  --shadow: 0 18px 42px rgb(0 0 0 / 30%);
  --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow: hidden;
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow: hidden;
  width: var(--frame-w);
  height: 100dvh;
  margin: 0;
  margin-inline: auto;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 3%), 0 26px 90px rgb(0 0 0 / 48%);
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell,
.lesson-header,
.lesson-stage,
.lesson-actions {
  width: calc(100% - (var(--page-pad) * 2));
  margin-inline: auto;
}

.home-body {
  position: relative;
}

.home-body::after {
  position: fixed;
  right: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  z-index: 14;
  width: var(--frame-w);
  height: 54px;
  transform: translateX(50%);
  pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
  content: "";
}

.home-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: var(--frame-w);
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: calc(12px + var(--safe-top)) var(--page-pad) 10px;
  transform: translateX(-50%);
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  background: rgb(3 7 17 / 88%);
  backdrop-filter: blur(18px) saturate(1.25);
}

.home-header h1,
.home-section h2,
.lesson-content h1 {
  font-family: var(--font-heading);
  letter-spacing: 0;
}

.home-header h1 {
  margin: 0 0 3px;
  font-size: 1.65rem;
  font-weight: 750;
  line-height: 1.08;
}

.top-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgb(255 255 255 / 8%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
  cursor: pointer;
}

.focus-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-high);
}

.focus-ring::before,
.focus-ring::after {
  position: absolute;
  content: "";
  border-radius: inherit;
}

.focus-ring::before {
  inset: 10px;
  border: 2px solid var(--accent);
}

.focus-ring::after {
  inset: 18px;
  background: var(--accent);
}

.home-stack {
  overflow-y: auto;
  height: 100dvh;
  display: grid;
  align-content: start;
  gap: 30px;
  padding-top: calc(var(--topbar-h) + var(--safe-top) + 16px);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 34px);
  scrollbar-width: none;
}

.home-stack::-webkit-scrollbar,
.lesson-stage::-webkit-scrollbar {
  display: none;
}

.home-section h2 {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 760;
  line-height: 1.2;
}

.active-course {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 20px;
  padding: 14px;
  background: rgb(255 255 255 / 7%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}

.active-course .course-accent {
  grid-row: span 2;
}

.active-course h3,
.course-copy strong,
.lesson-item h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.active-course p,
.lesson-item p,
.course-copy span:not(.progress-track) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.progress-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-track {
  display: block;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgb(243 246 255 / 10%);
}

.progress-track > span,
.progress-track > div {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.active-course .lesson-start {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.course-list,
.lesson-list {
  display: grid;
  gap: 7px;
}

.lesson-list {
  margin-top: 12px;
}

.course-card,
.lesson-item {
  display: grid;
  align-items: center;
  border: 0;
  border-bottom: 0;
  border-radius: 16px;
  color: var(--text);
  background: rgb(255 255 255 / 5%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}

.course-card {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 56px;
  padding: 10px 11px;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
}

.course-card:hover,
.course-card.is-active {
  background: rgb(255 255 255 / 7%);
}

.course-card:active,
.choice-button:active,
.button:active,
.icon-button:active,
.quick-button:active,
.bottom-nav a:active,
.bottom-nav span:active {
  transform: scale(0.98);
}

.course-accent {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--surface-high);
  font-size: 0.72rem;
  font-weight: 900;
}

.accent-fr,
.accent-es {
  color: var(--on-accent);
  background: var(--surface-high);
}

.course-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.course-copy strong,
.course-copy span:not(.progress-track) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-progress {
  min-width: 42px;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--accent);
  background: rgb(142 162 255 / 12%);
  font-size: 0.7rem;
  font-weight: 850;
  text-align: center;
}

.lesson-item {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  min-height: 58px;
  padding: 10px 11px;
}

.compact-lesson {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 52px;
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.compact-lesson:hover {
  background: rgb(255 255 255 / 7%);
}

.compact-lesson:active {
  transform: scale(0.985);
}

.compact-lesson .lesson-index {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.compact-lesson h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
}

.compact-lesson-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.lesson-open {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.lesson-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--surface-high);
  font-weight: 900;
}

.lesson-tags,
.lesson-item .lesson-start {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 0 13px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.button:hover:not(:disabled) {
  filter: brightness(1.06);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  color: var(--on-accent);
  background: var(--accent);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.bottom-nav {
  position: fixed;
  right: auto;
  bottom: calc(12px + var(--safe-bottom));
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(var(--frame-w) - (var(--page-pad) * 2) - 70px), 360px);
  height: var(--tabbar-h);
  margin-inline: auto;
  transform: translateX(calc(-50% - 28px));
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 32px;
  padding: 7px;
  color: var(--faint);
  background: rgb(10 16 27 / 92%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.25);
  font-size: 0.7rem;
  font-weight: 750;
  text-align: center;
}

.bottom-nav a,
.bottom-nav span,
.bottom-nav button {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 24px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: color 180ms ease, transform 180ms ease;
}

.bottom-nav .is-active {
  color: var(--text);
  background: rgb(142 162 255 / 16%);
}

.nav-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  color: currentColor;
}

.nav-home::before {
  position: absolute;
  inset: 8px 4px 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
  content: "";
}

.nav-home::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.nav-practice::before,
.nav-practice::after {
  position: absolute;
  content: "";
}

.nav-practice::before {
  inset: 4px 4px 3px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.nav-practice::after {
  top: 6px;
  bottom: 5px;
  left: 12px;
  border-left: 2px solid currentColor;
}

.nav-profile::before {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
}

.nav-profile::after {
  position: absolute;
  right: 4px;
  bottom: 3px;
  left: 4px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 6px 6px;
  content: "";
}

.quick-button {
  position: fixed;
  right: calc(50% - (var(--frame-w) / 2) + var(--page-pad));
  bottom: calc(17px + var(--safe-bottom));
  z-index: 31;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 999px;
  color: var(--text);
  background: rgb(10 16 27 / 92%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.25);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 500;
}

.empty-state,
.skeleton-card {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
}

.lesson-body {
  position: relative;
}

.lesson-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
  width: var(--frame-w);
  height: calc(62px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) var(--page-pad) 8px;
  transform: translateX(-50%);
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  background: rgb(3 7 17 / 88%);
  backdrop-filter: blur(18px) saturate(1.25);
}

.icon-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
}

.lesson-progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgb(243 246 255 / 12%);
}

.lesson-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

.step-counter {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.lesson-stage {
  overflow-y: auto;
  height: 100dvh;
  display: block;
  padding-top: calc(62px + var(--safe-top) + 20px);
  padding-bottom: calc(84px + var(--safe-bottom));
  scrollbar-width: none;
}

.lesson-card {
  width: 100%;
  padding: 0;
}

.lesson-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lesson-content {
  min-height: 400px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.lesson-content.is-entering {
  opacity: 1;
  transform: translateY(0);
}

.block-shell {
  animation: float-in 260ms ease both;
}

.block-context {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
  padding-bottom: 12px;
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 850;
}

.mode-pill {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mode-uebung .mode-pill {
  color: var(--on-accent);
  background: var(--accent);
}

.mode-review .mode-pill {
  color: var(--on-warn);
  background: var(--warn);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mode-uebung .eyebrow {
  color: var(--accent);
}

.mode-review .eyebrow {
  color: var(--warn);
}

.chip {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgb(243 246 255 / 7%);
  font-size: 0.74rem;
  font-weight: 800;
}

.lesson-content h1 {
  max-width: 17ch;
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 750;
  line-height: 1.12;
}

.lesson-copy,
.lesson-note,
.lesson-subtitle {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.lesson-subtitle {
  margin: -6px 0 18px;
  color: #c8d3e4;
  font-weight: 650;
}

.lesson-note {
  margin-top: 18px;
}

.grammar-study {
  margin-top: 28px;
}

.grammar-sentence,
.token-line {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 760;
  line-height: 1.55;
}

.token-line {
  font-size: clamp(1.12rem, 4vw, 1.45rem);
}

.grammar-word {
  display: inline;
  border-radius: 5px;
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.grammar-word.grammar-subject {
  color: #d8ddff;
  background: rgb(142 162 255 / 18%);
}

.grammar-word.grammar-verb {
  color: #efe2bd;
  background: rgb(215 184 106 / 18%);
}

.grammar-word.grammar-negation {
  color: #ffd0d0;
  background: rgb(255 138 138 / 18%);
}

.grammar-word.grammar-object {
  color: #cfd6e4;
  background: rgb(154 163 178 / 16%);
}

.grammar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.grammar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grammar-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.grammar-dot.grammar-subject {
  background: var(--accent);
}

.grammar-dot.grammar-verb {
  background: var(--warn);
}

.grammar-dot.grammar-negation {
  background: var(--bad);
}

.grammar-dot.grammar-object {
  background: var(--muted);
}

.example-stack {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.info-table {
  display: grid;
  gap: 7px;
  margin-top: 22px;
}

.info-table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border-radius: 12px;
  padding: 9px 10px;
  background: var(--surface);
}

.info-table-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.info-table-row span:first-child {
  color: var(--text);
  font-weight: 750;
}

.example-label {
  display: block;
  margin-bottom: 9px;
  color: var(--faint);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memory-diagram {
  margin: 28px 0 0;
}

.diagram-bracket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 28px 0;
}

.diagram-bracket::before {
  position: absolute;
  right: 18%;
  left: 18%;
  height: 2px;
  border-radius: 999px;
  background: var(--line);
  content: "";
}

.diagram-node {
  position: relative;
  z-index: 1;
  justify-self: center;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 900;
  animation: soft-pop 420ms ease both;
}

.diagram-node.is-negation {
  color: var(--text);
  background: var(--surface-high);
}

.diagram-node.is-verb {
  color: var(--on-warn);
  background: var(--warn);
}

.memory-diagram figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.choice-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.choice-list-split {
  grid-template-columns: 1fr 1fr;
}

.choice-button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  background: rgb(16 26 43 / 86%);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice-button:hover,
.choice-button.is-selected {
  border-color: rgb(142 162 255 / 62%);
  background: var(--surface-high);
}

.cloze-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  font-size: 1.22rem;
  font-weight: 850;
}

.cloze-input {
  width: 86px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding: 9px 4px;
  color: var(--text);
  background: transparent;
  text-align: center;
}

.cloze-input:focus {
  border-color: var(--accent);
  outline: none;
}

.transform-source {
  border-radius: 14px;
  margin: 18px 0 12px;
  padding: 13px;
  color: var(--text);
  background: var(--surface);
  font-weight: 750;
}

.text-answer-input,
.writing-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.text-answer-input:focus,
.writing-input:focus {
  border-color: var(--accent);
}

.writing-input {
  min-height: 116px;
  margin-top: 14px;
  resize: vertical;
}

.hint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hint-list span {
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 750;
}

.matching-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.matching-column {
  display: grid;
  gap: 10px;
}

.match-card {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--text);
  background: rgb(16 26 43 / 78%);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.match-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.match-card:hover,
.match-card.is-selected {
  border-color: rgb(142 162 255 / 62%);
  background: var(--surface-high);
}

.match-card-answer {
  text-align: center;
}

.word-bank,
.answer-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.answer-zone {
  min-height: 60px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin: 22px 0 20px;
  padding-bottom: 12px;
}

.answer-zone .answer-placeholder {
  color: var(--faint);
  font-weight: 700;
}

.word-chip,
.answer-chip {
  border: 0;
  border-radius: 7px;
  padding: 9px 11px;
  cursor: pointer;
  font-weight: 900;
}

.word-chip {
  color: var(--text);
  background: var(--surface-high);
}

.word-chip:hover {
  background: #1a2434;
}

.word-chip:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.answer-chip {
  color: var(--on-accent);
  background: var(--accent);
  animation: soft-pop 180ms ease both;
}

.ai-generate-button {
  width: 100%;
  margin-top: 18px;
}

.ai-generated-block {
  border-top: 1px solid var(--line-soft);
  margin-top: 18px;
  padding-top: 18px;
}

.feedback {
  margin-top: 22px;
  border-radius: var(--radius);
  padding: 14px;
  font-weight: 800;
}

.feedback.is-correct {
  color: var(--green-light);
  background: rgb(88 204 2 / 12%);
}

.feedback.is-incorrect {
  color: #ffb0b0;
  background: rgb(255 138 138 / 13%);
}

.completion-mark {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 999px;
  margin-top: 24px;
  color: var(--on-warn);
  background: var(--warn);
  font-size: 1.65rem;
  font-weight: 900;
}

.lesson-actions {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: var(--frame-w);
  padding: 10px var(--page-pad) calc(12px + var(--safe-bottom));
  transform: translateX(50%);
  border-top: 1px solid rgb(255 255 255 / 6%);
  background: linear-gradient(transparent, rgb(3 7 17 / 92%) 18%, rgb(3 7 17 / 96%));
  backdrop-filter: blur(16px) saturate(1.2);
}

.lesson-actions .feedback[hidden] {
  display: none;
}

.lesson-actions .feedback {
  min-height: 20px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 400;
  line-height: 1.4;
}

.lesson-actions .feedback.is-correct {
  color: var(--green-light);
  background: transparent;
}

.lesson-actions .feedback.is-incorrect {
  color: #ffb0b0;
  background: transparent;
}

.app-tab-view[hidden] {
  display: none;
}

.practice-lessons {
  margin-top: 14px;
}

.practice-item .lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.practice-item .lesson-tags span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgb(255 255 255 / 5%);
  font-size: 0.72rem;
  font-weight: 700;
}

.practice-item .lesson-start {
  display: inline-flex;
  grid-column: 1 / -1;
  min-height: 38px;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-pop {
  0% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width: 820px) {
  .app-shell {
    width: calc(100% - (var(--page-pad) * 2));
  }
}

@media (max-width: 520px) {
  .lesson-content {
    min-height: 420px;
  }

  .lesson-actions {
    grid-template-columns: 1fr;
  }

  .choice-list-split,
  .matching-board {
    grid-template-columns: 1fr;
  }
}
