:root {
  --ink: #14362c;
  --ink-soft: #527065;
  --cream: #f6f0e4;
  --paper: #fffdf8;
  --mint: #b9dfcf;
  --mint-bright: #d8f0e6;
  --coral: #f06f52;
  --coral-soft: #ffe0d7;
  --yellow: #f4ca64;
  --line: rgba(20, 54, 44, 0.14);
  --shadow: 0 24px 70px rgba(43, 63, 55, 0.13);
  --radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(244, 202, 100, .2), transparent 26rem),
    radial-gradient(circle at 90% 38%, rgba(185, 223, 207, .32), transparent 30rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea { font: inherit; }
button { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  opacity: .16;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--paper); background: var(--ink); border-radius: 14px;
  font-family: Georgia, serif; font-size: 25px; font-style: italic;
  box-shadow: 0 7px 20px rgba(20,54,44,.17);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { color: var(--ink-soft); margin-top: 2px; font-size: 11px; }
.account-button { display: inline-flex; align-items: center; gap: 9px; padding: 6px 11px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 12px; font-weight: 800; }
.account-button[hidden] { display: none; }
.account-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-bright); color: var(--ink); font-weight: 900; }
.filter-button {
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 850;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.filter-button b { font-weight: 900; }
.filter-button .filter-selection { display: inline-flex; align-items: center; gap: 7px; }
.filter-button .filter-selection > b { min-width: 24px; padding: 4px 7px; border-radius: 999px; background: rgba(20,54,44,.08); text-align: center; }
.filter-button .filter-divider { width: 1px; height: 22px; background: currentColor; opacity: .18; }
.filter-button .filter-goal { white-space: nowrap; }
.filter-button[data-filter="all"] { background: var(--paper); color: var(--ink); }
.filter-button[data-filter="unknown"] { border-color: rgba(168,69,49,.35); background: var(--coral-soft); color: #943b29; }
.filter-button[data-filter="known"] { border-color: rgba(47,125,98,.36); background: var(--mint-bright); color: #286b54; }
.filter-button:hover { border-color: rgba(20,54,44,.35); }
.goal-progress.met { color: #2f7d62; }
.goal-progress.behind { color: #a84531; }

.shell { width: min(880px, calc(100% - 36px)); margin: 38px auto 72px; }
[data-module][hidden], .cahier-module[hidden] { display: none !important; }
.module-tabs {
  position: sticky; top: 10px; z-index: 12; display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin: 0 0 42px; padding: 6px; border: 1px solid rgba(20,54,44,.08); border-radius: 20px;
  background: rgba(246,240,228,.9); box-shadow: 0 12px 34px rgba(20,54,44,.08); backdrop-filter: blur(14px);
}
.module-tab { min-height: 58px; padding: 10px 16px; border: 0; border-radius: 15px; background: transparent; cursor: pointer; text-align: left; }
.module-tab span, .module-tab strong { display: block; }
.module-tab span { margin-bottom: 2px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.module-tab strong { font-family: Georgia, serif; font-size: 20px; font-weight: 600; }
.module-tab.active { color: var(--paper); background: var(--ink); box-shadow: 0 7px 18px rgba(20,54,44,.17); }
.module-tab.active span { color: var(--mint); }

.cahier-hero { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 40px; margin: 30px 0 42px; }
.cahier-hero > p { margin: 0 0 7px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.cahier-next { padding: clamp(24px, 5vw, 42px); overflow: hidden; }
.cahier-next h2 { max-width: 680px; font-size: clamp(32px, 6vw, 54px); line-height: 1.05; }
.cahier-next-date { margin: 14px 0 0; color: var(--ink-soft); font-size: 14px; font-weight: 750; }
.cahier-day-picker { display: grid; grid-template-columns: 1fr minmax(130px, 190px); align-items: center; gap: 18px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 850; }
.cahier-day-picker select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font: inherit; font-weight: 800; }
.cahier-homework { margin-top: 42px; }
.cahier-homework-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 3px 18px; }
.cahier-homework-heading .eyebrow { margin-bottom: 7px; }
.cahier-homework-heading h2 { font-size: clamp(30px, 5vw, 42px); }
.cahier-homework-heading > span { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: var(--mint-bright); font-size: 11px; font-weight: 850; }
.cahier-assignment-list { display: grid; gap: 14px; }
.cahier-assignment { padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 0 11px 34px rgba(43,63,55,.07); }
.cahier-assignment-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.cahier-assignment h3 { margin: 0; font-family: Georgia, serif; font-size: clamp(22px, 4vw, 30px); font-weight: 600; line-height: 1.12; }
.cahier-vocabulary-button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid rgba(20,54,44,.18); border-radius: 999px; background: var(--mint-bright); cursor: pointer; font-size: 11px; font-weight: 850; }
.cahier-instructions { margin-top: 16px; color: var(--ink-soft); white-space: pre-line; }
.cahier-instructions p { margin: 0 0 12px; line-height: 1.62; }
.cahier-instructions p:last-child { margin-bottom: 0; }
.cahier-resources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.cahier-resource { display: inline-flex; align-items: center; min-height: 39px; padding: 8px 12px; border-radius: 12px; color: var(--ink); background: rgba(185,223,207,.42); font-size: 12px; font-weight: 780; text-decoration: none; }
.cahier-resource:hover { background: var(--mint-bright); text-decoration: underline; }
.cahier-empty { display: grid; gap: 6px; padding: 28px; border: 1px dashed rgba(20,54,44,.24); border-radius: 20px; color: var(--ink-soft); }
.cahier-empty strong { color: var(--ink); font-family: Georgia, serif; font-size: 24px; font-weight: 600; }
.hero { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 40px; margin: 30px 0 50px; }
.eyebrow { margin: 0 0 12px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.045em; line-height: .98; }
h1 { font-family: Georgia, serif; font-size: clamp(48px, 8vw, 78px); font-weight: 500; }
h1 em { color: var(--coral); font-weight: 500; }
h2 { font-family: Georgia, serif; font-size: clamp(31px, 5vw, 46px); font-weight: 500; }
.hero-copy { margin: 0 0 7px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }

.catalog { margin: -12px 0 28px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,248,.7); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.catalog-heading .eyebrow { margin-bottom: 6px; }
.catalog-heading h2 { font-family: inherit; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }
.course-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(20,54,44,.08); }
.course-tab { min-width: 50px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 900; }
.course-tab.active { background: var(--ink); color: var(--paper); box-shadow: 0 5px 14px rgba(20,54,44,.18); }
.set-list { display: grid; gap: 22px; }
.set-menu { min-width: 0; }
.set-menu h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.set-menu p { margin: 4px 0 9px; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.set-menu select {
  width: 100%; min-height: 48px; padding: 10px 42px 10px 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer;
}
.set-menu select:focus-visible { outline: 3px solid rgba(185,223,207,.8); outline-offset: 2px; }
.set-group { min-width: 0; }
.set-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 2px 9px; }
.set-group-heading h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.set-group-heading p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.set-group-heading > span { flex: 0 0 auto; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.set-card { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-align: left; cursor: pointer; }
.set-card:hover { border-color: rgba(20,54,44,.36); }
.set-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.set-card-copy { min-width: 0; }
.set-card-copy b, .set-card-copy small, .set-card-progress b, .set-card-progress small { display: block; }
.set-card-copy b { margin-bottom: 4px; font-size: 14px; }
.set-card-copy small { color: var(--ink-soft); line-height: 1.35; }
.set-card-progress { flex: 0 0 auto; text-align: right; }
.set-card-progress b { font-size: 14px; }
.set-card-progress small { color: var(--ink-soft); font-size: 10px; }
.set-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink-soft); }
.set-empty strong { color: var(--ink); }
.active-set-heading { display: flex; align-items: center; gap: 10px; margin: 0 2px 14px; }
.active-set-heading > span { padding: 6px 9px; border-radius: 9px; background: var(--coral); color: white; font-size: 11px; font-weight: 900; }
.active-set-heading > strong { min-width: 0; font-size: 13px; line-height: 1.35; }

.mode-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px;
  padding: 6px; margin-bottom: 34px; background: rgba(20,54,44,.08); border-radius: 18px;
}
.tab { border: 0; padding: 13px 16px; border-radius: 13px; background: transparent; font-weight: 750; cursor: pointer; }
.tab.active { background: var(--paper); box-shadow: 0 4px 20px rgba(20,54,44,.08); }
.view { display: none; animation: rise .32s ease both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.section-head h2 { font-family: inherit; font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.step-label { margin: 0 0 5px; color: var(--ink-soft); font-size: 13px; }
.study-controls-row {
  display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; padding: 2px 0;
  overflow-x: auto; scrollbar-width: none;
}
.study-controls-row::-webkit-scrollbar { display: none; }
.study-controls-row > * { flex: 0 0 auto; }
.study-tools { display: flex; align-items: center; gap: 8px; }
.play-button {
  height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer;
  color: var(--ink); font-size: 12px; font-weight: 850;
}
.play-button #playButtonIcon { color: var(--coral); }
.play-button.active { border-color: #000; background: #000; color: var(--paper); }
.play-button.active #playButtonIcon { color: var(--yellow); }
.reveal-mode-button, .slow-french-button {
  height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer;
  color: var(--ink); font-size: 12px; font-weight: 850;
}
.reveal-mode-button > span:first-child, .slow-french-button > span:first-child { color: var(--coral); font-size: 16px; }
.shuffle-button {
  height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer;
  color: var(--ink); font-size: 11px; font-weight: 850;
}
.shuffle-button > span { color: var(--coral); font-size: 18px; }
.reveal-mode-button.active, .slow-french-button.active, .shuffle-button.active { border-color: #000; background: #000; color: var(--paper); }
.reveal-mode-button.active > span:first-child, .slow-french-button.active > span:first-child, .shuffle-button.active > span { color: var(--yellow); }
.direction-button {
  height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer;
  font-size: 11px; font-weight: 900; letter-spacing: .06em;
}
.direction-button b { color: var(--coral); font-size: 17px; line-height: 1; transition: transform .2s ease; }
.direction-button:active b { transform: rotate(180deg); }
.audio-preferences {
  display: flex; align-items: center; gap: 8px;
  margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 700;
}
.sound-toggle { position: relative; cursor: pointer; }
.sound-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sound-toggle span {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 248, .72);
  color: var(--ink-soft); font-size: 11px; font-weight: 900; letter-spacing: .06em;
}
.sound-toggle span::before { content: "🔇"; font-size: 12px; filter: grayscale(1); }
.sound-toggle input:checked + span { border-color: #111; background: #111; color: #fff; }
.sound-toggle input:checked + span::before { content: "🔊"; filter: none; }
.sound-toggle input:focus-visible + span { outline: 3px solid rgba(185, 223, 207, .8); outline-offset: 2px; }
.voice-settings { margin: -2px 0 14px; padding: 0 2px; color: var(--ink-soft); }
.voice-settings summary { width: max-content; cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 850; }
.voice-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 10px; }
.voice-settings label { min-width: 0; }
.voice-settings label span { display: block; margin: 0 0 4px 2px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.voice-settings select, .voice-settings button { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 12px; }
.voice-settings select { width: 100%; padding: 8px 32px 8px 10px; }
.voice-settings button { padding: 8px 12px; cursor: pointer; font-weight: 800; }
.voice-settings > p { margin: 7px 0 0; font-size: 10px; }
.card-navigation { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.navigation-button {
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer;
}
.navigation-button:hover { border-color: rgba(20, 54, 44, .35); background: var(--mint-bright); }
.navigation-button:focus-visible { outline: 3px solid rgba(185, 223, 207, .8); outline-offset: 2px; }

.flashcard, .panel {
  background: var(--paper); border: 1px solid rgba(20,54,44,.1); border-radius: var(--radius); box-shadow: var(--shadow);
}
.flashcard { position: relative; min-height: 430px; padding: 28px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.flashcard { touch-action: pan-y pinch-zoom; }
.flashcard.known-card { background: var(--mint-bright); }
.flashcard::after {
  content: ""; position: absolute; width: 240px; height: 240px; right: -130px; top: -120px;
  border-radius: 50%; background: var(--mint-bright); z-index: 0;
}
.card-topline, .card-content, .answer-panel, .reveal { position: relative; z-index: 1; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-meta { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); }
.fullscreen-button {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.78);
  color: var(--ink); cursor: pointer; font-size: 19px; font-weight: 800; line-height: 1;
}
.fullscreen-button:hover { border-color: rgba(20,54,44,.35); background: var(--mint-bright); }
.fullscreen-button:focus-visible { outline: 3px solid rgba(185,223,207,.8); outline-offset: 2px; }
.card-number { font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.language-pill { display: inline-flex; padding: 7px 10px; color: var(--ink); background: var(--yellow); border-radius: 9px; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.card-note { color: var(--ink-soft); font-size: 12px; }
.card-content { min-height: 175px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.flashcard.answer-only .card-content { display: none; }
.flashcard.answer-only .answer-panel { padding-top: 0; }
.term { margin: 20px 0; max-width: 700px; font-family: Georgia, serif; font-size: clamp(30px, 6vw, 50px); line-height: 1.16; }
.term.answer { font-size: clamp(27px, 5vw, 42px); color: var(--coral); }
.audio-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 750;
}
.audio-button span { display: grid; place-items: center; width: 22px; height: 22px; color: white; background: var(--ink); border-radius: 50%; font-size: 9px; }
.audio-button.french span { background: var(--coral); }
.audio-button.large { margin: 18px auto 24px; padding: 13px 18px; }
.audio-button:active span { transform: scale(.9); }
.answer-panel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: reveal .28s ease both; }
.answer-panel[hidden] { display: none; }
.answer-divider { align-self: stretch; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
.answer-divider { display: flex; align-items: center; gap: 12px; color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .09em; }
.answer-divider::before, .answer-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.audio-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.primary-button, .secondary-button, .rating {
  border: 0; border-radius: 15px; padding: 15px 20px; cursor: pointer; font-weight: 800;
}
.primary-button { width: 100%; color: white; background: var(--ink); box-shadow: 0 9px 22px rgba(20,54,44,.16); }
.primary-button:hover { background: #0b2c21; }
.secondary-button { width: 100%; border: 1px solid var(--line); background: transparent; }
.reveal { margin-top: 28px; }
.rating-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.rating { background: var(--paper); border: 1px solid var(--line); }
.rating span { margin-right: 8px; }
.rating.again { color: #a84531; background: var(--coral-soft); }
.rating.known { background: var(--mint-bright); }

body.card-fullscreen { overflow: hidden; }
body.card-fullscreen #studyView {
  position: fixed; inset: 0; z-index: 100; display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto; gap: 12px;
  width: 100%; height: 100dvh; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: auto; background: var(--cream);
}
body.card-fullscreen #studyView > .section-head,
body.card-fullscreen #studyView > .study-controls-row,
body.card-fullscreen #studyView > .voice-settings,
body.card-fullscreen #studyView > .vocabulary-list { display: none; }
body.card-fullscreen #studyView .flashcard {
  min-height: 0; height: 100%; border-radius: 22px; overflow: auto;
  display: flex; flex-direction: column;
}
body.card-fullscreen #studyView .card-content { flex: 1; min-height: 180px; }
body.card-fullscreen #studyView .answer-panel { flex: 1; }
body.card-fullscreen #studyView .card-navigation,
body.card-fullscreen #studyView .rating-actions { margin-top: 0; }
body.card-fullscreen #studyView .term { font-size: clamp(34px, 7vw, 72px); }
body.card-fullscreen #studyView .term.answer { font-size: clamp(31px, 6vw, 62px); }

.vocabulary-list { margin-top: 42px; }
.vocabulary-list-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 4px 12px; }
.vocabulary-list-title h3 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
.vocabulary-list-title span { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.vocabulary-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.vocabulary-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.vocabulary-row + .vocabulary-row { border-top: 1px solid var(--line); }
.vocabulary-row > span { min-width: 0; padding: 12px 15px; overflow-wrap: anywhere; line-height: 1.35; }
.vocabulary-row > span + span { border-left: 1px solid var(--line); }
.vocabulary-heading { color: var(--ink-soft); background: rgba(20,54,44,.055); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.vocabulary-rows { border-top: 1px solid var(--line); }
.vocabulary-rows .vocabulary-row { font-size: 13px; }
.vocabulary-empty { grid-column: 1 / -1; color: var(--ink-soft); text-align: center; }

.panel { padding: clamp(24px, 5vw, 42px); }
.quiz-intro p:not(.eyebrow) { max-width: 580px; color: var(--ink-soft); line-height: 1.65; }
.quiz-intro .primary-button { max-width: 320px; margin-top: 26px; }
.quiz-features { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 23px; }
.quiz-features span { padding: 8px 11px; border-radius: 9px; background: var(--mint-bright); font-size: 12px; font-weight: 750; }
.quiz-progress-row { display: flex; justify-content: space-between; font-size: 13px; margin: 0 4px 10px; }
.progress-track { height: 8px; overflow: hidden; background: rgba(20,54,44,.1); border-radius: 999px; margin-bottom: 18px; }
.progress-fill { width: 10%; height: 100%; background: var(--coral); border-radius: inherit; transition: width .3s ease; }
.question-card { text-align: center; }
.question-prompt { margin: 24px auto; max-width: 680px; font-family: Georgia, serif; font-size: clamp(27px, 5vw, 43px); line-height: 1.2; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.choice { min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; line-height: 1.35; }
.choice:hover { border-color: var(--ink); }
.choice.correct { border-color: #4a9479; background: var(--mint-bright); }
.choice.wrong { border-color: var(--coral); background: var(--coral-soft); }
.choice:disabled { cursor: default; color: inherit; }
.feedback { margin: 18px 0; padding: 12px; border-radius: 12px; background: var(--mint-bright); font-weight: 750; }
.feedback.bad { background: var(--coral-soft); }
.question-card > .primary-button { margin-top: 16px; }

.result-card { text-align: center; }
.result-ring { width: 150px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 25px; border: 11px solid var(--mint); border-right-color: var(--coral); border-radius: 50%; }
.result-ring strong { font-size: 33px; }
.result-ring span { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.result-card > p:not(.eyebrow) { color: var(--ink-soft); }
.mistake-list { display: grid; gap: 7px; margin: 24px 0; text-align: left; }
.mistake-item { padding: 12px 14px; background: rgba(240,111,82,.09); border-radius: 11px; font-size: 13px; }
.mistake-item strong { display: block; margin-bottom: 3px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.import-panel > p:not(.eyebrow) { max-width: 620px; color: var(--ink-soft); line-height: 1.6; }
.import-panel label { display: block; margin: 25px 0 8px; font-size: 13px; font-weight: 800; }
textarea { width: 100%; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; line-height: 1.5; }
textarea:focus { outline: 3px solid rgba(185,223,207,.7); border-color: var(--ink); }
.import-status { font-size: 13px; }
.import-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

footer { max-width: 1080px; margin: 0 auto; padding: 24px 28px 36px; display: flex; justify-content: space-between; gap: 20px; color: var(--ink-soft); font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 999px; color: white; background: var(--ink); font-size: 13px; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.auth-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 22px; overflow-y: auto; background: rgba(246,240,228,.96); backdrop-filter: blur(16px); }
.auth-gate[hidden] { display: none; }
.auth-card { width: min(520px, 100%); padding: clamp(26px, 6vw, 46px); border: 1px solid var(--line); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.auth-brand { width: fit-content; margin-bottom: 34px; }
.auth-card h2 { font-size: clamp(32px, 6vw, 48px); }
.auth-copy { margin: 18px 0 28px; color: var(--ink-soft); line-height: 1.6; }
.google-sign-in { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; font-weight: 800; }
.google-sign-in span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: #4285f4; font-weight: 900; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.email-sign-in label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 850; }
.email-sign-in > div { display: flex; gap: 8px; }
.email-sign-in input { min-width: 0; flex: 1; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.email-sign-in button { flex: 0 0 auto; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--ink); color: white; cursor: pointer; font-weight: 800; }
.auth-status { min-height: 20px; margin: 14px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.access-email { margin: -12px 0 24px; font-weight: 850; overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .topbar { padding: 18px; }
  .brand small { display: none; }
  .account-button #accountName { display: none; }
  .filter-button { min-height: 40px; padding: 6px 9px; }
  .streak { font-size: 11px; }
  .shell { width: min(100% - 24px, 880px); margin-top: 20px; }
  .module-tabs { top: 7px; margin-bottom: 28px; }
  .module-tab { min-height: 54px; padding: 9px 12px; }
  .module-tab strong { font-size: 18px; }
  .cahier-hero { grid-template-columns: 1fr; gap: 18px; margin: 24px 5px 32px; }
  .cahier-assignment-heading { display: grid; }
  .cahier-vocabulary-button { justify-self: start; }
  .cahier-day-picker { grid-template-columns: 1fr; gap: 8px; }
  .cahier-homework-heading { align-items: start; }
  .hero { grid-template-columns: 1fr; gap: 18px; margin: 24px 5px 35px; }
  .hero-copy { max-width: 420px; }
  .catalog { margin-top: -10px; padding: 15px; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .catalog-heading h2 { font-size: 18px; }
  .course-tabs { width: 100%; min-width: 0; flex-wrap: wrap; }
  .course-tab { flex: 1 1 56px; min-width: 0; }
  .set-grid { grid-template-columns: 1fr; }
  .set-card { padding: 13px; }
  .mode-tabs { position: sticky; top: 8px; z-index: 5; backdrop-filter: blur(12px); }
  .tab { padding: 12px 8px; font-size: 13px; }
  .section-head { align-items: center; }
  .section-head h2 { max-width: 220px; }
  .direction-button { padding: 0 10px; }
  .audio-preferences { justify-content: flex-start; margin-left: 1px; }
  .voice-settings-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .navigation-button { flex: 1; padding-inline: 10px; }
  .flashcard { min-height: 440px; padding: 22px 18px; border-radius: 22px; }
  body.card-fullscreen #studyView { gap: 8px; }
  body.card-fullscreen #studyView .flashcard { padding: 18px 14px; border-radius: 18px; }
  body.card-fullscreen #studyView .card-meta { gap: 6px; }
  body.card-fullscreen #studyView .card-note { display: none; }
  body.card-fullscreen #studyView .navigation-button { min-height: 48px; }
  .vocabulary-list { margin-top: 34px; }
  .vocabulary-list-title h3 { font-size: 22px; }
  .vocabulary-row > span { padding: 10px; font-size: 12px; }
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: 60px; }
  .result-actions, .import-actions { grid-template-columns: 1fr; }
  footer { padding: 20px 18px 28px; flex-direction: column; }
  .auth-card { padding: 26px 20px; }
  .email-sign-in > div { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Per-student homework completion */
.cahier-tracked-resource { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff; min-width:0; }
.cahier-tracked-resource > .cahier-resource { flex:1 1 200px; min-width:0; overflow-wrap:anywhere; }
.cahier-tracked-resource.is-complete { background:#e5f4eb; border-color:#4f8568; }
.cahier-complete-control { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; font-size:13px; font-weight:700; }
.cahier-complete-control input { width:20px; height:20px; accent-color:#286743; cursor:pointer; }
.cahier-visited { font-size:12px; color:#465c53; }
.cahier-sync { font-size:12px; color:var(--ink-soft); }
#cahierHomeworkCount { text-align:right; }

.cahier-simple-title { margin:24px 0; font-size:32px; }

/* Minimal Cahier shell; vocabulary retains its own presentation. */
body.minimal-student-space { background:#fff; color:#202124; }
.minimal-student-space .grain, .minimal-student-space footer, .minimal-student-space .brand-mark,
.minimal-student-space .brand small, .minimal-student-space .module-tab span { display:none; }
.minimal-student-space .topbar { max-width:780px; padding:20px 24px; }
.minimal-student-space .brand strong { font-size:14px; font-weight:500; }
.minimal-student-space .shell { width:min(720px, calc(100% - 40px)); margin:16px auto 48px; }
.minimal-student-space .module-tabs { display:flex; position:static; border:0; border-bottom:1px solid #eee; border-radius:0; background:#fff; box-shadow:none; padding:0; margin:0 0 28px; gap:24px; backdrop-filter:none; }
.minimal-student-space .module-tab { min-height:44px; padding:8px 0; border-radius:0; background:none; box-shadow:none; color:#737373; }
.minimal-student-space .module-tab strong { font:500 14px system-ui,sans-serif; }
.minimal-student-space .module-tab.active { color:#202124; border-bottom:2px solid #202124; }
.minimal-student-space .cahier-simple-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.minimal-student-space .cahier-next { background:none; border:0; border-radius:0; box-shadow:none; padding:0; }
.minimal-student-space #cahierNextEyebrow { font-size:11px; font-weight:400; letter-spacing:0; color:#737373; margin-bottom:8px; }
.minimal-student-space .cahier-next h2 { font:500 clamp(20px,4vw,26px)/1.4 system-ui,sans-serif; letter-spacing:-.02em; }
.minimal-student-space .cahier-next-date { margin-top:5px; font-size:12px; font-weight:400; color:#737373; }
.minimal-student-space .cahier-day-picker { display:inline-flex; gap:8px; margin:14px 18px 0 0; padding:0; border:0; font-weight:400; }
.minimal-student-space .cahier-day-picker[hidden] { display:none; }
.minimal-student-space .cahier-day-picker select { border-radius:6px; min-height:36px; font-weight:400; padding:5px 8px; }
.minimal-student-space .cahier-homework { margin-top:28px; }
.minimal-student-space .cahier-homework-heading { align-items:center; margin:0 0 12px; }
.minimal-student-space .cahier-homework-heading h2 { font:500 14px/1.5 system-ui,sans-serif; letter-spacing:0; }
.minimal-student-space #cahierHomeworkCount { padding:0; border-radius:0; background:none; color:#737373; font-weight:400; }
.minimal-student-space .cahier-assignment-list { gap:0; }
.minimal-student-space .cahier-tracked-resource { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:6px 0; border:0; border-bottom:1px solid #f0f0f0; border-radius:0; background:none; }
.minimal-student-space .cahier-tracked-resource.is-complete { background:#f0f8f2; }
.minimal-student-space .cahier-resource, .minimal-student-space .cahier-vocabulary-button { display:block; border:0; border-radius:0; padding:10px 4px; min-height:44px; background:none; color:#202124; text-align:left; font:400 14px/1.6 system-ui,sans-serif; overflow-wrap:anywhere; }
.minimal-student-space .cahier-resource:hover, .minimal-student-space .cahier-vocabulary-button:hover { text-decoration:underline; background:none; }
.minimal-student-space .cahier-complete-control { justify-content:center; width:44px; min-height:44px; }
.minimal-student-space .cahier-visited { color:#888; font-size:11px; }
.minimal-student-space .cahier-visited:empty, .minimal-student-space .cahier-sync:empty { display:none; }
.minimal-student-space .cahier-complete-control { grid-column:2; }
.minimal-student-space .cahier-empty { padding:16px 0; border:0; background:none; font-size:14px; }

.minimal-student-space { --ink:#202124; --ink-soft:#737373; --paper:#fff; --cream:#fff; --line:#e8e8e8; --shadow:none; }
.minimal-student-space .vocab-minimal-heading { margin-bottom:16px; }
.minimal-student-space .vocab-minimal-heading .eyebrow { color:#737373; font-size:12px; font-weight:400; letter-spacing:0; text-transform:none; }
.minimal-student-space .catalog { padding:0; margin:0 0 24px; border:0; border-radius:0; background:none; }
.minimal-student-space .catalog-heading .eyebrow { display:none; }
.minimal-student-space .catalog-heading h2 { font-size:16px; font-weight:500; }
.minimal-student-space .set-card { border-radius:8px; background:#fff; padding:12px; box-shadow:none; }
.minimal-student-space .set-card.active { border-color:#555; box-shadow:none; }
.minimal-student-space .set-card-copy b { font-weight:500; }
.minimal-student-space .course-tab, .minimal-student-space .tab { border-radius:6px; font-weight:500; }
.minimal-student-space .mode-tabs { border-radius:8px; background:#f5f5f5; box-shadow:none; }
.minimal-student-space .tab.active { background:#fff; box-shadow:none; }
.minimal-student-space .panel, .minimal-student-space .flashcard { border-radius:10px; box-shadow:none; background:#fff; }
.minimal-student-space .flashcard.known-card { background:#f0f8f2; }
.minimal-student-space .flashcard::after { display:none; }
.minimal-student-space .section-head h2 { font:500 22px/1.3 system-ui,sans-serif; letter-spacing:0; }
.minimal-student-space .account-button, .minimal-student-space .brand-mark { box-shadow:none; }
.minimal-student-space .cahier-next { padding:0; border:0; }

/* Modern neutral palette shared by both learning modules. */
body.minimal-student-space {
  --ink:#242630; --ink-soft:#747784; --paper:#fff; --cream:#f7f8fa;
  --line:#e5e7ed; --mint:#e2e5ff; --mint-bright:#eceeff;
  --coral:#5b5bd6; --coral-soft:#f0efff;
  background:#f7f8fa; color:var(--ink);
}
.minimal-student-space .topbar { color:#343641; }
.minimal-student-space .module-tabs { background:transparent; border-color:#e2e4ec; }
.minimal-student-space .module-tab { color:#797c89; }
.minimal-student-space .module-tab.active { color:#5753cb; border-color:#6862dc; }
.minimal-student-space .account-button { background:#fff; border-color:#e5e7ed; }
.minimal-student-space .account-avatar { color:#5b56bf; background:#ebeaff; }
.minimal-student-space .cahier-next { background:transparent; }
.minimal-student-space .cahier-assignment-list { background:#fff; border:1px solid #e6e8ef; border-radius:12px; overflow:hidden; }
.minimal-student-space .cahier-tracked-resource { padding:4px 12px; border-bottom-color:#eef0f5; }
.minimal-student-space .cahier-tracked-resource:last-child { border-bottom:0; }
.minimal-student-space .cahier-tracked-resource:hover { background:#f7f7fc; }
.minimal-student-space .cahier-resource, .minimal-student-space .cahier-vocabulary-button { color:#44465c; }
.minimal-student-space .cahier-resource:hover, .minimal-student-space .cahier-vocabulary-button:hover { color:#5753cb; }
.minimal-student-space .cahier-tracked-resource.is-complete { background:#edf7f1; }
.minimal-student-space .cahier-complete-control input { accent-color:#48856a; }
.minimal-student-space .set-card { border-color:#e5e7ee; }
.minimal-student-space .set-card:hover { border-color:#b9b6e9; background:#fcfcff; }
.minimal-student-space .set-card.active { border-color:#8580db; background:#f2f1ff; }
.minimal-student-space .course-tab.active { background:#625dd0; color:#fff; }
.minimal-student-space .mode-tabs { background:#eceef3; }
.minimal-student-space .tab.active { color:#5753cb; background:#fff; }
.minimal-student-space .panel, .minimal-student-space .flashcard { border-color:#e5e7ee; background:#fff; }
.minimal-student-space .flashcard.known-card { background:#edf7f1; }
.minimal-student-space .cahier-next { border:0; background:transparent; }
.minimal-student-space .filter-button[data-filter="known"] { background:#edf7f1; color:#37705a; border-color:#cce3d5; }
.minimal-student-space .choice.correct, .minimal-student-space .feedback:not(.bad) { background:#edf7f1; }
.minimal-student-space :is(a,button,select,input):focus-visible { outline:2px solid #7973da; outline-offset:3px; }

.minimal-student-space .cahier-video-group { border-bottom:1px solid #eef0f5; }
.minimal-student-space .cahier-video-group:last-child { border-bottom:0; }
.minimal-student-space .cahier-video-branch > .cahier-tracked-resource .cahier-resource { font-weight:500; }
.minimal-student-space .cahier-resource-children { margin:0 12px 10px 23px; padding-left:10px; border-left:2px solid #e4e2f4; }
.minimal-student-space .cahier-resource-children .cahier-tracked-resource { padding-left:0; padding-right:0; }
.minimal-student-space .cahier-resource-children .cahier-resource { font-size:13px; color:#69687a; }

.minimal-student-space .cahier-comprehension { border-top:1px solid #e6e8ef; }
.minimal-student-space .cahier-comprehension h3 { margin:0; padding:18px 16px 8px; font-size:14px; font-weight:600; color:#5753cb; }

.minimal-student-space .cahier-section-summary { display:block; cursor:pointer; list-style:none; }
.minimal-student-space .cahier-section-summary::-webkit-details-marker { display:none; }
.minimal-student-space .cahier-section-summary .cahier-tracked-resource { grid-template-columns:minmax(0,1fr) 36px 44px; gap:4px; }
.minimal-student-space .cahier-section-title { display:flex; align-items:center; gap:8px; padding:10px 4px; min-height:44px; color:#44465c; font:500 14px/1.6 system-ui,sans-serif; }
.minimal-student-space .cahier-section-title::before { content:'›'; color:#858299; font-size:19px; transition:transform .12s; }
.minimal-student-space details[open] > summary .cahier-section-title::before { transform:rotate(90deg); }
.minimal-student-space .cahier-section-summary .cahier-open-video { grid-column:2; text-align:center; font-size:18px; padding:8px; }
.minimal-student-space .cahier-section-summary .cahier-complete-control { grid-column:3; }
.minimal-student-space .cahier-comprehension-summary { padding:4px 12px; }
.minimal-student-space .cahier-section-summary:focus-visible { outline:2px solid #7973da; outline-offset:-2px; }

.minimal-student-space .cahier-due-date { color:#747784; font-weight:400; }

.school-logo { display:block; width:32px; height:32px; flex:none; }
.minimal-student-space .brand { gap:10px; }
.minimal-student-space .brand strong { font-weight:550; letter-spacing:-.03em; }

.minimal-student-space .cahier-section-summary .cahier-open-video { display:grid; place-items:center; width:32px; height:32px; min-height:32px; padding:6px; border-radius:10px; background:#eceaff; color:#625dd0; align-self:center; transition:background .15s,transform .15s; }
.minimal-student-space .cahier-open-video svg { width:20px; height:20px; fill:currentColor; }
.minimal-student-space .cahier-section-summary .cahier-open-video:hover { background:#dedbff; color:#4841b2; transform:translateY(-1px); }

.minimal-student-space .admin-link { margin-left:auto; padding:9px 12px; border-radius:10px; background:#edeaff; color:#5144a6; font-size:13px; font-weight:600; text-decoration:none; }
.minimal-student-space .admin-link:hover { background:#dfd9ff; }
.admin-link[hidden] { display:none; }
@media(max-width:480px) { .minimal-student-space .topbar { gap:8px; padding:16px 12px; flex-wrap:wrap; } .minimal-student-space .admin-link { padding:9px; } }

.student-course-picker { display:flex; align-items:center; gap:12px; margin:0 0 18px; font-size:13px; color:#55586b; }
.student-course-picker[hidden] { display:none; }
.student-course-picker select { background:white; border:1px solid #d9dbe6; border-radius:10px; padding:10px 14px; color:#303344; font:600 14px system-ui; max-width:100%; }
#cahierLevelPicker, #courseTabs { display:none !important; }
.minimal-student-space .cahier-video-branch, .minimal-student-space .cahier-comprehension { margin-bottom:12px; border:1px solid #e0e2eb; border-radius:12px; background:#fff; overflow:hidden; }
.minimal-student-space .cahier-section-summary { background:#f0f0f8; }
.minimal-student-space .cahier-section-title { font-weight:600; }
.minimal-student-space .cahier-section-title::before { content:'▸'; color:#6254b1; font-size:18px; }
.minimal-student-space .cahier-resource-children { margin:8px 16px 14px 28px; padding-left:18px; border-left:2px solid #aaa1d5; }
.minimal-student-space .cahier-resource-children > .cahier-tracked-resource { position:relative; }
.minimal-student-space .cahier-resource-children > .cahier-tracked-resource::before { content:''; position:absolute; left:-18px; top:50%; width:12px; border-top:2px solid #aaa1d5; }
.minimal-student-space .cahier-resource-children .cahier-resource { color:#414459; }

.minimal-student-space #setList { display:flex; flex-direction:column; gap:4px; }
.minimal-student-space .vocab-set-option { text-align:left; padding:11px 14px; background:transparent; color:#414459; border:1px solid transparent; border-radius:9px; font:400 14px/1.4 system-ui; cursor:pointer; }
.minimal-student-space .vocab-set-option:hover { background:#efedf8; }
.minimal-student-space .vocab-set-option[aria-pressed="true"] { background:#e9e5fa; color:#5144a6; font-weight:600; }
/* Shared typography and controls across both learning modules. */
.minimal-student-space { --learning-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.minimal-student-space .cahier-module, .minimal-student-space [data-module="vocabulary"], .minimal-student-space .student-course-picker { font-family:var(--learning-font); }
.minimal-student-space .cahier-section-title, .minimal-student-space .cahier-resource-children .cahier-resource, .minimal-student-space .vocab-set-option { font-family:var(--learning-font); font-size:14px; line-height:1.5; }
.minimal-student-space .cahier-section-title, .minimal-student-space .vocab-set-option[aria-pressed="true"] { font-weight:600; }
.minimal-student-space .cahier-day-picker select, .minimal-student-space .student-course-picker select { min-height:40px; padding:9px 12px; border:1px solid #d9dbe6; border-radius:10px; background:#fff; color:#303344; font:400 14px/1.5 var(--learning-font); }
.minimal-student-space .cahier-resource, .minimal-student-space .vocab-set-option { min-height:40px; }

.minimal-student-space .vocab-set-select { min-height:40px; padding:9px 12px; border:1px solid #d9dbe6; border-radius:10px; background:#fff; color:#303344; font:400 14px/1.5 var(--learning-font); max-width:100%; width:100%; }

#musicModule[hidden], #verbsModule[hidden] { display:none; }
#spotifyPlaylist { display:block; border:0; border-radius:12px; max-width:100%; }
#musicModule a { color:#5753cb; font-size:14px; }
.music-note { color:var(--ink-soft); font-size:12px; }
.minimal-student-space .module-tabs { overflow-x:auto; }
.minimal-student-space .module-tab { flex-shrink:0; white-space:nowrap; }
#verbsList { display:flex; flex-direction:column; gap:8px; }
.verbs-video-link { display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid #e0e2eb; border-radius:12px; background:#fff; color:#414459; text-decoration:none; font:500 14px/1.5 var(--learning-font); }
.verbs-video-link:hover { background:#f0edf9; }
.verbs-play { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:#edeaff; color:#6254b1; }

.minimal-student-space .active-set-heading, .minimal-student-space #directionTitle { display:none; }
.minimal-student-space .rating.known { background:#86efac; border-color:#4ade80; color:#000; }
.minimal-student-space .rating.again { background:#fca5a5; border-color:#f87171; color:#000; }
.minimal-student-space .rating.known:hover { background:#4ade80; color:#000; }
.minimal-student-space .rating.again:hover { background:#f87171; color:#000; }
.minimal-student-space .rating span { color:inherit; }

#chumModule[hidden], #chumTab[hidden] { display:none; }
.chum-toolbar,.chum-actions { display:flex; align-items:center; gap:12px; font:400 13px/1.5 var(--learning-font); }
.chum-toolbar { justify-content:space-between; color:#707286; }
.chum-toolbar button,.chum-actions button { border:1px solid #d9dbe6; border-radius:10px; background:#fff; color:#414459; padding:9px 12px; font:500 14px var(--learning-font); cursor:pointer; }
.chum-actions #chumSend { margin-left:auto; background:#e9e5fa; color:#5144a6; }
.chum-messages { min-height:180px; max-height:50vh; overflow:auto; padding:12px 0; }
.chum-message { font:400 14px/1.6 var(--learning-font); white-space:pre-wrap; padding:12px 16px; border-radius:14px; max-width:90%; }
.chum-user { background:#e9e5fa; margin-left:auto; }
.chum-assistant { background:#fff; border:1px solid #e0e2eb; }
.chum-form textarea { width:100%; box-sizing:border-box; resize:vertical; border:1px solid #d9dbe6; border-radius:12px; padding:12px; background:#fff; color:#303344; font:400 14px/1.5 var(--learning-font); }
.chum-actions { flex-wrap:wrap; margin-top:10px; }
.chum-actions button:disabled,.chum-form textarea:disabled { opacity:.5; cursor:not-allowed; }
#chumStatus,.chum-privacy { font:400 12px/1.5 var(--learning-font); color:#73768a; margin-top:12px; }

.minimal-student-space .learning-frame {
  padding:20px; border:1px solid #d9d5ee; border-radius:24px;
  background:#eeecf8; box-shadow:0 8px 28px rgba(62,48,108,.04);
}
.minimal-student-space .learning-frame > .mode-tabs {
  position:static; margin-top:0; background:#e1ddef; border-radius:12px;
}
.minimal-student-space .learning-frame .flashcard { background:#fff; }
.minimal-student-space .learning-frame .flashcard.known-card { background:#edf7f1; }
@media(max-width:480px) {
  .minimal-student-space .learning-frame { padding:12px; border-radius:18px; }
}

/* Text-only modern wordmark in the student header. */
.minimal-student-space .topbar { gap:14px; flex-wrap:wrap; }
.minimal-student-space .topbar > .brand { min-width:0; }
.minimal-student-space .topbar > .brand strong {
  font-family:Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size:clamp(24px, 4.6vw, 34px);
  font-weight:850;
  line-height:1.05;
  letter-spacing:-.065em;
  color:#242630;
}

.vocab-set-toolbar { display:flex; align-items:center; gap:8px; width:100%; }
.vocab-set-toolbar select { flex:1; min-width:0; }
.share-set-button { display:grid; place-items:center; width:40px; height:40px; flex-shrink:0; padding:0; border:1px solid #d9dbe6; border-radius:10px; background:#fff; color:#5554bb; cursor:pointer; }
.share-set-button:hover { background:#eeedf9; }
.share-set-button:focus-visible { outline:2px solid #5554bb; outline-offset:2px; }
