/* ============================================================
   FocusKai — calm pastel design system
   ============================================================ */

:root {
  /* warm cream backgrounds + soft warm grays */
  --bg:          #faf5ec;
  --bg-tint:     #f6efdf;
  --surface:     #fffdf8;
  --surface2:    #f3ecdc;
  --border:      #ebe2cd;
  --border-2:    #ddd0b3;

  --text:        #2a241c;
  --text2:       #6b6258;
  --text3:       #a89e8c;

  /* pastel accents — share roughly equal lightness/chroma */
  --peach:        #d97a52;   /* primary action */
  --peach-bg:     #fae3d4;
  --peach-tint:   #f6ddc9;
  --peach-press:  #c66a44;
  --sage:         #6b9b6f;   /* success / breaks */
  --sage-bg:      #d9ead5;
  --lavender:     #8674b8;   /* generator / focus content */
  --lavender-bg:  #e6dff0;
  --butter:       #c89c3f;   /* highlight / tips */
  --butter-bg:    #f5e8c5;
  --blush:        #c46868;   /* warnings */
  --blush-bg:     #f3d8d6;
  --sky:          #5e8db5;
  --sky-bg:       #d9e5ee;

  /* per-course tint defaults (used when a course doesn't pick one) */
  --course-tints: var(--peach-bg), var(--sage-bg), var(--lavender-bg), var(--butter-bg), var(--sky-bg);

  --r:           16px;
  --r-sm:        10px;
  --r-xs:        8px;
  --r-pill:      999px;

  --shadow-sm:   0 1px 2px rgba(74, 56, 30, 0.04), 0 1px 3px rgba(74, 56, 30, 0.06);
  --shadow:      0 1px 2px rgba(74, 56, 30, 0.05), 0 8px 24px -8px rgba(74, 56, 30, 0.12);
  --shadow-lg:   0 4px 12px rgba(74, 56, 30, 0.06), 0 24px 48px -16px rgba(74, 56, 30, 0.18);

  --trans:       0.18s cubic-bezier(.4, 0, .2, 1);
  --trans-slow:  0.35s cubic-bezier(.4, 0, .2, 1);

  --font-display: 'Bricolage Grotesque', 'Georgia', serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --sidebar-w:    260px;
}

[data-theme="dark"] {
  --bg:          #1a1612;
  --bg-tint:     #221d17;
  --surface:     #25201a;
  --surface2:    #2e2820;
  --border:      #3d352a;
  --border-2:    #4a4032;

  --text:        #f0e8d8;
  --text2:       #b8a890;
  --text3:       #7a6f60;

  --peach:       #e89870;
  --peach-bg:    #3a2820;
  --peach-tint:  #4a3326;
  --peach-press: #f3a984;
  --sage:        #9bc09e;
  --sage-bg:     #1f2e22;
  --lavender:    #b8a8de;
  --lavender-bg: #2a2438;
  --butter:      #e6c46e;
  --butter-bg:   #3a2f1a;
  --blush:       #db8e8e;
  --blush-bg:    #3a2222;
  --sky:         #92b5d4;
  --sky-bg:      #1e2a35;

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:      0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg:   0 4px 12px rgba(0, 0, 0, 0.3), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
}

/* ---- Lavender Mist (soft cool light) ---- */
[data-theme="lavender"] {
  --bg:          #f5f3fb;
  --bg-tint:     #ece8f7;
  --surface:     #fdfcff;
  --surface2:    #ede9f7;
  --border:      #e4ddf2;
  --border-2:    #d3c9ea;

  --text:        #292336;
  --text2:       #635b76;
  --text3:       #998fae;

  --peach:       #7b69c0;   /* primary action — lavender */
  --peach-bg:    #e7e0f6;
  --peach-tint:  #d9d0f0;
  --peach-press: #6a58ad;

  --shadow-sm:   0 1px 2px rgba(50, 40, 80, 0.04), 0 1px 3px rgba(50, 40, 80, 0.06);
  --shadow:      0 1px 2px rgba(50, 40, 80, 0.05), 0 8px 24px -8px rgba(50, 40, 80, 0.12);
  --shadow-lg:   0 4px 12px rgba(50, 40, 80, 0.06), 0 24px 48px -16px rgba(50, 40, 80, 0.18);
}

/* ---- Sky Calm (soft cool blue light) ---- */
[data-theme="sky"] {
  --bg:          #eef4f9;
  --bg-tint:     #e3edf4;
  --surface:     #fbfdff;
  --surface2:    #e7f0f7;
  --border:      #d8e6ef;
  --border-2:    #c1d5e3;

  --text:        #1f2a33;
  --text2:       #556571;
  --text3:       #8ba0ac;

  --peach:       #3f82bb;   /* primary action — sky blue */
  --peach-bg:    #dcebf6;
  --peach-tint:  #cae0f1;
  --peach-press: #346ea0;

  --shadow-sm:   0 1px 2px rgba(30, 50, 70, 0.04), 0 1px 3px rgba(30, 50, 70, 0.06);
  --shadow:      0 1px 2px rgba(30, 50, 70, 0.05), 0 8px 24px -8px rgba(30, 50, 70, 0.12);
  --shadow-lg:   0 4px 12px rgba(30, 50, 70, 0.06), 0 24px 48px -16px rgba(30, 50, 70, 0.18);
}

/* ============================================================
   NIGHT MODE OVERLAY — dark background, keeps the theme's accent
   (applied via data-night="on", independent of the color theme)
   Must come AFTER the theme blocks so its neutral tokens win.
   ============================================================ */
[data-night="on"] {
  --bg:        #15120e;
  --bg-tint:   #1d1813;
  --surface:   #221d17;
  --surface2:  #2b251d;
  --border:    #3a3328;
  --border-2:  #473d30;

  --text:      #f0e8d8;
  --text2:     #b8a890;
  --text3:     #7a6f60;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:    0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
}
/* keep each theme's accent hue, but darken its tint surfaces for dark bg */
[data-theme="light"][data-night="on"]    { --peach: #e89870; --peach-bg: #3a2820; --peach-tint: #4a3326; --peach-press: #f3a984; }
[data-theme="lavender"][data-night="on"] { --peach: #b8a8de; --peach-bg: #2a2438; --peach-tint: #352d48; --peach-press: #c7b9e8; }
[data-theme="sky"][data-night="on"]      { --peach: #92b5d4; --peach-bg: #1e2a35; --peach-tint: #273846; --peach-press: #a6c4de; }

/* ============================================================
   reset + base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  background: var(--bg);
  color: var(--text);
}
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--trans-slow), color var(--trans-slow);
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--peach-bg); color: var(--text); }

/* ============================================================
   APP LAYOUT — sidebar (desktop) + drawer (mobile)
   ============================================================ */

.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

/* mobile top bar — visible <1024px only */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(56px + env(safe-area-inset-top, 0px));
  position: sticky;
  top: 0;
  z-index: 50;
}
.hamburger {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--r-xs);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background var(--trans);
}
.hamburger:hover { background: var(--surface2); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.topbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.topbar-spacer { flex: 1; }

/* sidebar */
.sidebar {
  background: var(--bg-tint);
  border-right: 1px solid var(--border);
  width: var(--sidebar-w);
  padding: 20px 12px 24px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-w) * -1);
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: left var(--trans-slow);
}
.sidebar.open { left: 0; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 28, 0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans);
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.sb-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.sb-brand-tag {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.sidebar-close {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text2);
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--r-xs);
}
.sidebar-close:hover { background: var(--surface2); color: var(--text); }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 18px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background var(--trans), color var(--trans);
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: var(--peach-bg);
  color: var(--peach);
  font-weight: 600;
}
.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text3);
}
.nav-item.active .nav-badge { background: rgba(255,255,255,0.5); color: var(--peach); }

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 12px;
}

.nav-add-course {
  margin-top: 4px;
  background: transparent;
  border: 1px dashed var(--border-2);
  color: var(--text2);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--trans);
}
.nav-add-course:hover {
  border-color: var(--peach);
  color: var(--peach);
  background: var(--peach-bg);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 6px 0;
  display: flex;
  gap: 6px;
  align-items: center;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans);
}
.theme-toggle:hover { border-color: var(--text3); }
.mochi-footer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.mf-name { display: flex; flex-direction: column; }
.mf-tag {
  font-size: 10px;
  font-weight: 400;
  color: var(--text3);
  letter-spacing: 0.02em;
}

/* main content area */
.main {
  min-width: 0;
  padding: 24px 18px 80px;
}

/* paw print logo (simple circles only) */
.paw {
  display: inline-block;
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.paw .pad,
.paw .toe {
  position: absolute;
  background: var(--peach);
  border-radius: 50%;
}
.paw .pad {
  width: 14px;
  height: 11px;
  left: 6px;
  bottom: 1px;
  border-radius: 50% 50% 45% 45%;
}
.paw .toe { width: 5px; height: 5px; }
.paw .t1 { left: 3px;  top: 7px; }
.paw .t2 { left: 9px;  top: 1px; }
.paw .t3 { left: 15px; top: 1px; }
.paw .t4 { right: 1px; top: 7px; }

.paw.lg { width: 40px; height: 40px; }
.paw.lg .pad { width: 22px; height: 17px; left: 9px; bottom: 1px; }
.paw.lg .toe { width: 8px; height: 8px; }
.paw.lg .t1 { left: 4px;  top: 11px; }
.paw.lg .t2 { left: 13px; top: 1px; }
.paw.lg .t3 { left: 23px; top: 1px; }
.paw.lg .t4 { right: 2px; top: 11px; }

/* ============================================================
   TYPE
   ============================================================ */

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}
.page-sub {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 28px;
  max-width: 60ch;
}

/* ===== per-page "How to use" help ===== */
.help-block {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 22px;
  overflow: hidden;
}
.help-block > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}
.help-block > summary::-webkit-details-marker { display: none; }
.help-ico {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--peach);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-chev {
  margin-left: auto;
  font-size: 20px;
  color: var(--text3);
  transition: transform var(--trans);
}
.help-block[open] > summary .help-chev { transform: rotate(90deg); }
.help-body {
  padding: 2px 18px 18px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}
.help-intro { margin: 0 0 10px; }
.help-sec-h {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 14px 0 6px;
}
.help-list { margin: 0; padding-left: 18px; }
.help-list li { margin-bottom: 5px; text-wrap: pretty; }
.help-list b { color: var(--text); font-weight: 600; }
.sec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  margin-bottom: 8px;
}

/* ============================================================
   CARD
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card-sm { padding: 16px 18px; }
.card-tint { background: var(--bg-tint); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--trans);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--peach); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--peach-press, #c66a44); }
.btn-ghost { background: var(--surface2); color: var(--text); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--border); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-outline:hover:not(:disabled) { background: var(--surface2); }
.btn-lavender { background: var(--lavender); color: #fff; }
.btn-lavender:hover:not(:disabled) { background: #6f5fa0; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sm { font-size: 13px; padding: 7px 14px; border-radius: var(--r-xs); }
.btn-lg { font-size: 15px; padding: 13px 22px; }
.btn-block { width: 100%; }

/* ============================================================
   INPUTS
   ============================================================ */

input[type=text], input[type=date], textarea, select {
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--trans), background var(--trans);
  width: 100%;
  line-height: 1.5;
}
input[type=text]:focus, input[type=date]:focus, textarea:focus, select:focus {
  border-color: var(--peach);
  background: var(--surface);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.f-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

/* ============================================================
   BADGE / PILL
   ============================================================ */

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  display: inline-block;
  letter-spacing: 0.01em;
}
.badge-peach    { background: var(--peach-bg); color: var(--peach); }
.badge-sage     { background: var(--sage-bg); color: var(--sage); }
.badge-lavender { background: var(--lavender-bg); color: var(--lavender); }
.badge-butter   { background: var(--butter-bg); color: var(--butter); }
.badge-blush    { background: var(--blush-bg); color: var(--blush); }
.badge-sky      { background: var(--sky-bg); color: var(--sky); }
.badge-soft     { background: var(--surface2); color: var(--text2); }

/* ============================================================
   PROGRESS
   ============================================================ */

.prog-track {
  height: 5px;
  background: var(--surface2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.prog-fill {
  height: 100%;
  background: var(--peach);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--text);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================================
   HOME
   ============================================================ */

.home-hero {
  padding: 12px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-hero .greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.home-hero .lead {
  font-size: 16px;
  color: var(--text2);
  max-width: 50ch;
  line-height: 1.6;
}

.home-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 18px 16px;
  text-align: left;
  cursor: pointer;
  transition: var(--trans);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}
.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: var(--peach-bg);
}
.tile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.tile-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.tile.tint-peach    .tile-icon { background: var(--peach-bg); }
.tile.tint-sage     .tile-icon { background: var(--sage-bg); }
.tile.tint-lavender .tile-icon { background: var(--lavender-bg); }
.tile.tint-butter   .tile-icon { background: var(--butter-bg); }
.tile.tint-sky      .tile-icon { background: var(--sky-bg); }

.home-tip {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.home-tip .tip-mascot { flex-shrink: 0; padding-top: 2px; }
.home-tip strong { color: var(--text); font-weight: 700; }

/* ============================================================
   HOME — Kai hero, streak strip, weak-area radar, heatmap
   ============================================================ */

.home-mochi-hero {
  background: linear-gradient(180deg, var(--bg-tint) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.home-mochi-hero .mochi { margin-bottom: 4px; }
/* soft halo so pale companions (e.g. the cream cat) read on any background */
.home-mochi-hero .kai-tap .mochi::before {
  content: '';
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,0.07), rgba(0,0,0,0.025) 58%, transparent 76%);
  z-index: 0;
}
.home-mochi-hero .kai-tap .m-photo { z-index: 1; }
.home-mochi-hero .mhh-greeting {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text3);
  text-transform: uppercase;
}
.home-mochi-hero .mhh-status {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 32ch;
  color: var(--text);
}
.home-mochi-hero .mhh-sub {
  font-size: 13px;
  color: var(--text2);
  max-width: 38ch;
  line-height: 1.55;
}
.home-mochi-hero .mhh-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  width: 100%;
}

/* big hero "next action" button */
.btn-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  max-width: 360px;
  padding: 15px 22px;
  border-radius: var(--r);
  text-align: center;
  line-height: 1.25;
  box-shadow: var(--shadow-sm);
}
.btn-hero .bh-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.82;
}
.btn-hero .bh-main {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-hero .bh-meta {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.78;
}
.home-mochi-hero .mhh-secondary {
  color: var(--text2);
}

/* ----- this-week momentum line ----- */
.momentum {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.momentum .mom-lead {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
}
.momentum .mom-stats {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text2);
}
.momentum .mom-item b {
  font-weight: 700;
  color: var(--text);
}
.momentum .mom-sep { color: var(--border-2); }
.momentum.momentum-zero {
  font-size: 14px;
  color: var(--text2);
  display: block;
}

.home-mochi-hero .garden {
  margin-top: 8px;
  max-width: 100%;
}
.home-mochi-hero .mochi { margin-bottom: 2px; }
.home-mochi-hero .kai-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
.home-mochi-hero .kai-tagline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peach);
  margin-top: -6px;
}

/* ----- streak strip ----- */
.streak-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.streak-info { flex: 1; min-width: 0; }
.streak-info .si-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.1;
  margin-bottom: 2px;
  color: var(--text);
}
.streak-info .si-sub {
  font-size: 12px;
  color: var(--text2);
}
.week-dots {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.wd-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.wd-day .wd-letter {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.05em;
}
.wd-day .wd-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  transition: var(--trans);
}
.wd-day.active .wd-dot {
  background: var(--peach);
  border-color: var(--peach);
}
.wd-day.today .wd-dot {
  outline: 2px solid var(--peach);
  outline-offset: 2px;
}
.wd-day.today.active .wd-dot {
  background: var(--peach);
}
.wd-day.future .wd-dot {
  opacity: 0.4;
}

/* ----- weak area radar card ----- */
.weak-card {
  background: var(--lavender-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: var(--trans);
}
.weak-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.weak-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lavender);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.weak-card-body { flex: 1; min-width: 0; }
.weak-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lavender);
  margin-bottom: 4px;
}
.weak-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-bottom: 3px;
}
.weak-card-meta {
  font-size: 12px;
  color: var(--text2);
}
.weak-card-arrow {
  font-size: 20px;
  color: var(--text3);
  flex-shrink: 0;
}

/* ----- heatmap ----- */
.heatmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.heatmap-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.heatmap-head .hh-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
}
.heatmap-head .hh-totals {
  font-size: 12px;
  color: var(--text2);
}
.heatmap-grid {
  display: flex;
  gap: 4px;
  align-items: center;
}
.hm-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.hm-row-label {
  font-size: 9px;
  color: var(--text3);
  height: 14px;
  display: flex;
  align-items: center;
  letter-spacing: 0.04em;
  padding-right: 4px;
}
.hm-cols {
  display: flex;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.hm-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 8px;
}
.hm-cell {
  height: 14px;
  border-radius: 3px;
  background: var(--surface2);
  border: 1px solid transparent;
  position: relative;
}
.hm-cell.l1 { background: var(--peach-bg); }
.hm-cell.l2 { background: var(--peach-tint); }
.hm-cell.l3 { background: var(--peach); }
.hm-cell.l4 { background: var(--peach); filter: brightness(0.85); }
.hm-cell.today { outline: 1.5px solid var(--peach); outline-offset: 1px; }
.hm-cell.future { background: transparent; border-style: dashed; border-color: var(--border); }
.hm-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
  justify-content: flex-end;
}
.hm-legend-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--surface2);
}

/* ----- daily study log ----- */
.log-divider { height: 1px; background: var(--border); margin: 18px 0 0; }
.log-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin: 16px 0 10px;
}
.study-log { display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow-y: auto; }
.log-empty { font-size: 13px; color: var(--text3); padding: 14px 0 4px; }
.log-day { display: flex; flex-direction: column; gap: 4px; }
.log-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
}
.log-day-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.log-day-meta { font-size: 12px; color: var(--text3); }
.log-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.le-time {
  flex: none;
  width: 62px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}
.le-icon { flex: none; font-size: 15px; }
.le-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.le-subject {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.le-detail { font-size: 11.5px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.le-right {
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--peach);
  font-variant-numeric: tabular-nums;
}

/* ----- today's mission card (used when there's a recommendation) ----- */
.mission-card {
  background: var(--peach-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mission-card .mc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--peach);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mission-card .mc-body { flex: 1; min-width: 0; }
.mission-card .mc-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--peach);
  margin-bottom: 3px;
}
.mission-card .mc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}
.mission-card .mc-sub {
  font-size: 12px;
  color: var(--text2);
}

/* ============================================================
   BRAG CARD (share modal)
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 36, 28, 0.55);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--r);
  max-width: 460px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text2);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-xs);
}
.modal-close:hover { background: var(--surface2); color: var(--text); }

/* the actual shareable card — designed to look great as a screenshot */
.brag-card {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
  margin-bottom: 16px;
  overflow: hidden;
}
.brag-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--peach), var(--butter), var(--sage), var(--lavender));
  opacity: 0.7;
}
.brag-card .brag-mochi { margin-bottom: 12px; display: inline-block; }
.brag-card .brag-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 6px;
}
.brag-card .brag-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 18px;
}
.brag-card .brag-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.brag-stat {
  text-align: center;
}
.brag-stat .bs-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--peach);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brag-stat .bs-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-top: 4px;
}
.brag-card .brag-footer {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.brag-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.brag-actions .btn { flex: 1; min-width: 0; }

/* ============================================================
   ONBOARDING
   ============================================================ */

.onboard-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.onboard-card {
  max-width: 480px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.onboard-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 24px;
}
.onboard-pip {
  width: 24px;
  height: 4px;
  border-radius: 4px;
  background: var(--surface2);
  transition: var(--trans);
}
.onboard-pip.done { background: var(--peach); }
.onboard-pip.current { background: var(--peach); width: 36px; }
.onboard-card .onb-mochi { margin-bottom: 18px; display: inline-block; }
.onboard-card .onb-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.onboard-card .onb-body {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 22px;
}
.onboard-card input[type=text] {
  text-align: center;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 18px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.onboard-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 8px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.section-head .more {
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
}

/* ============================================================
   COURSE CARDS (home My Courses)
   ============================================================ */

.course-grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--course-color, var(--peach));
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}
.course-card-emoji {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--course-tint, var(--peach-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.course-card-body { flex: 1; min-width: 0; }
.course-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.course-card-meta {
  font-size: 12px;
  color: var(--text2);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.course-card-arrow {
  color: var(--text3);
  font-size: 18px;
  flex-shrink: 0;
}

.course-empty {
  background: var(--bg-tint);
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 28px;
}
.course-empty .ce-mascot { margin-bottom: 12px; }
.course-empty h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}
.course-empty p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 16px;
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* ============================================================
   FOCUS TIMER
   ============================================================ */

.timer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 12px;
}
.ring-svg { position: relative; width: 220px; height: 220px; }
.ring-svg svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface2); stroke-width: 8; }
.ring-fill {
  fill: none;
  stroke: var(--peach);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.ring-fill.brk { stroke: var(--sage); }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ring-mode {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  margin-top: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timer-ctrls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0 16px;
  flex-wrap: wrap;
}
.s-dots {
  display: flex;
  gap: 7px;
  margin-top: 4px;
  margin-bottom: 8px;
  justify-content: center;
}
.s-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--trans);
}
.s-dot.done { background: var(--peach); }
.s-dot.cur { background: var(--peach); opacity: 0.4; animation: pdot 1.2s ease-in-out infinite alternate; }
@keyframes pdot { to { opacity: 1; } }

.mode-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 16px;
}
.mode-tab {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text2);
  transition: var(--trans);
}
.mode-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.t-settings {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 14px;
}
.t-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.t-row:last-child { margin-bottom: 0; }
.t-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  min-width: 92px;
}
.t-row input[type=range] {
  flex: 1;
  accent-color: var(--peach);
  height: 4px;
  background: none;
  padding: 0;
}
.t-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.log-row:last-child { border-bottom: none; }
.log-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.log-lbl { flex: 1; font-weight: 500; }
.log-time { color: var(--text3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ============================================================
   COURSE / STUDY VIEW (D491 + generated)
   ============================================================ */

.topic-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.t-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: var(--trans);
  white-space: nowrap;
  flex-shrink: 0;
}
.t-tab:hover { border-color: var(--border-2); color: var(--text); }
.t-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.t-tab.fin {
  border-style: dashed;
}
.t-tab.fin.active {
  background: var(--peach);
  color: #fff;
  border-color: var(--peach);
  border-style: solid;
}

/* topic-nav grouping into sub-sections */
.topic-tabs .t-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.t-subsection {
  flex-basis: 100%;
  padding: 8px 11px;
  border: 1px dashed var(--border-2);
  border-radius: 14px;
  background: var(--surface);
}
.t-sub-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  padding-right: 2px;
}
.t-tab.t-add {
  border-style: dashed;
  color: var(--text2);
}
.t-tab.t-final-add {
  border-style: dashed;
  border-color: var(--peach);
  color: var(--peach);
}
.t-tab.t-final-add:hover { background: var(--peach-bg); }
.t-tab.t-final-add.locked { opacity: .6; }

/* management bar below the study tabs */
.topic-actionbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -6px 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tb-sep {
  width: 1px;
  align-self: stretch;
  min-height: 22px;
  margin: 0 6px;
  background: var(--border-2);
}

.view-tog {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 18px;
}
.v-btn {
  flex: 1 1 auto;
  min-width: 76px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text2);
  transition: var(--trans);
}
.v-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.sum-body { font-size: 15px; line-height: 1.75; }
.sum-body p { margin-bottom: 14px; }
.sum-body ul { margin: 0 0 14px 20px; }
.sum-body li { margin-bottom: 6px; }
.sum-body strong { font-weight: 700; color: var(--peach); }

/* ============================================================
   Study games — Fill-in-the-blanks + Definition matching
   (both derived from a topic's flashcards)
   ============================================================ */
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.game-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text3);
}
.game-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* completion panel shared by both games */
.game-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px 24px;
}
.gd-emoji { font-size: 40px; }
.gd-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
  color: var(--peach);
}
.gd-msg { font-size: 17px; font-weight: 700; color: var(--text); }
.gd-sub { font-size: 14px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; }

/* ---- Fill in the blanks ---- */
.blank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: border-color var(--trans), background var(--trans);
}
.blank-card.ok { border-color: var(--sage); background: var(--sage-bg); }
.blank-card.no { border-color: var(--blush); background: var(--blush-bg); }
.blank-clue {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}
.blank-eg {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text2);
  font-style: italic;
}
.blank-pattern {
  margin-top: 18px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--text3);
}
.blank-input {
  margin-top: 14px;
  width: 100%;
  padding: 13px 15px;
  font-size: 16px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--trans);
}
.blank-input:focus { border-color: var(--peach); }
.blank-reveal {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
}
.blank-reveal.ok { color: var(--sage); }
.blank-reveal.no { color: var(--blush); }
.blank-given {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text2);
}

/* ---- Definition matching ---- */
.match-grid {
  display: grid;
  grid-template-columns: minmax(96px, 0.85fr) 1.35fr;
  gap: 10px;
  align-items: start;
}
.match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-tile {
  text-align: left;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color var(--trans), background var(--trans), transform 0.08s ease, opacity var(--trans);
}
.match-tile.term { font-weight: 700; }
.match-tile:hover:not(:disabled) { border-color: var(--peach); }
.match-tile.sel {
  border-color: var(--peach);
  background: var(--peach-bg);
  color: var(--peach);
  box-shadow: 0 0 0 1.5px var(--peach) inset;
}
.match-tile.done {
  border-color: var(--sage);
  background: var(--sage-bg);
  color: var(--sage);
  opacity: 0.65;
  cursor: default;
}
.match-tile.bad {
  border-color: var(--blush);
  background: var(--blush-bg);
  color: var(--blush);
  animation: matchShake 0.4s ease;
}
@keyframes matchShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---- True / False ---- */
.tf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  text-align: center;
  transition: border-color var(--trans), background var(--trans);
}
.tf-card.ok { border-color: var(--sage); background: var(--sage-bg); }
.tf-card.no { border-color: var(--blush); background: var(--blush-bg); }
.tf-term {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 8px;
}
.tf-claim {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}
.tf-q { margin-top: 16px; font-size: 13px; color: var(--text3); }
.tf-verdict { margin-top: 16px; font-size: 15px; font-weight: 600; }
.tf-verdict.ok { color: var(--sage); }
.tf-verdict.no { color: var(--blush); }
.tf-real {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text2);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.tf-btn { flex: 1; font-size: 15px; font-weight: 700; padding: 14px; }
.tf-true { background: var(--sage-bg); color: var(--sage); }
.tf-true:hover:not(:disabled) { background: var(--sage); color: #fff; }
.tf-false { background: var(--blush-bg); color: var(--blush); }
.tf-false:hover:not(:disabled) { background: var(--blush); color: #fff; }

/* ---- Self-explanation ---- */
.explain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}
.explain-prompt { font-size: 13px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.explain-term {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  margin: 6px 0 16px;
}
.explain-input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 13px 15px;
  font-size: 15px;
  line-height: 1.55;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--trans);
}
.explain-input:focus { border-color: var(--peach); }
.explain-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.explain-fb {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--lavender);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  background: var(--surface);
}
.explain-fb.good { border-left-color: var(--sage); }
.explain-fb.mid { border-left-color: var(--butter); }
.explain-fb.low { border-left-color: var(--blush); }
.explain-fb.reveal { border-left-color: var(--peach); }
.efb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}
.efb-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--peach);
}
.efb-line { display: flex; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--text2); margin-bottom: 5px; }
.efb-ic { color: var(--peach); font-weight: 700; }
.efb-model, .efb-body { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--text2); }
.efb-body strong, .efb-model strong { color: var(--text); }

/* ---- Read-aloud / Listen ---- */
.tts-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.tts-play { min-width: 120px; }
.tts-step { font-size: 16px; }
.tts-selects { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tts-rate { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
.tts-hint { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.tts-list { display: flex; flex-direction: column; gap: 8px; }
.tts-line {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color var(--trans), background var(--trans);
}
.tts-line:hover { border-color: var(--peach); }
.tts-line.now {
  border-color: var(--peach);
  background: var(--peach-bg);
  box-shadow: 0 0 0 1px var(--peach) inset;
}
.tts-term { font-weight: 700; font-size: 14.5px; color: var(--text); }
.tts-line.now .tts-term { color: var(--peach); }
.tts-def { font-size: 13px; color: var(--text2); line-height: 1.45; }
.sum-body .k { font-weight: 700; color: var(--lavender); }
.tip-block {
  border-left: 3px solid var(--peach);
  padding: 12px 16px;
  background: var(--peach-bg);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px;
  font-weight: 500;
  margin: 18px 0;
  line-height: 1.6;
  color: var(--text);
}

/* flashcards */
.fc-scene {
  width: 100%;
  height: 240px;
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 18px;
}
.fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(.4, 0, .2, 1);
}
.fc-scene.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.fc-front { background: var(--surface); }
.fc-back { transform: rotateY(180deg); background: var(--bg-tint); }
.fc-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.fc-term {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.fc-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 14px;
}
.fc-def {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}
.fc-ex {
  font-size: 13px;
  color: var(--text2);
  margin-top: 10px;
  font-style: italic;
}
.fc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fc-cnt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}

/* flashcard tools (shuffle, restart) */
.fc-tools {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* flashcard self-rating (spaced repetition) */
.fc-rate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.fc-rate .btn { padding: 12px 16px; font-size: 14px; font-weight: 600; }
.fc-again {
  background: var(--blush-bg);
  color: var(--blush);
  border: 1px solid transparent;
}
.fc-again:hover:not(:disabled) { background: var(--blush); color: #fff; }
.fc-good {
  background: var(--sage-bg);
  color: var(--sage);
  border: 1px solid transparent;
}
.fc-good:hover:not(:disabled) { background: var(--sage); color: #fff; }
.fc-srbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  min-height: 22px;
}
.fc-srpill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.01em;
}
.fc-srpill.again { background: var(--blush-bg); color: var(--blush); }
.fc-srpill.new   { background: var(--surface2); color: var(--text2); }
.fc-srpill.good  { background: var(--sage-bg); color: var(--sage); }
.final-ctrls {
  background: var(--peach-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.final-ctrls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}
.final-ctrls .fc-lbl {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--peach);
}
.final-ctrls .fc-sel {
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  width: auto;
}
.final-ctrls .fc-pool-note {
  font-size: 11px;
  color: var(--text3);
  flex-basis: 100%;
}

/* quiz */
.qz-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.sc-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--trans);
}
.q-card.ok { border-color: var(--sage); }
.q-card.ng { border-color: var(--blush); }
.q-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.q-txt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 16px;
}
.q-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-opt {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: var(--trans);
}
.q-opt:hover:not(:disabled) {
  border-color: var(--peach);
  background: var(--peach-bg);
  color: var(--peach);
}
.q-opt.correct {
  background: var(--sage-bg);
  border-color: var(--sage);
  color: var(--sage);
}
.q-opt.wrong {
  background: var(--blush-bg);
  border-color: var(--blush);
  color: var(--blush);
}
.q-opt:disabled { cursor: default; }
.q-fb {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  display: none;
  line-height: 1.55;
}
.q-fb.show { display: block; }
.fb-ok { background: var(--sage-bg); color: var(--sage); }
.fb-ng { background: var(--blush-bg); color: var(--blush); }
.retry-btn {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--blush);
  background: transparent;
  color: var(--blush);
  cursor: pointer;
  transition: var(--trans);
}
.retry-btn.show { display: inline-block; }
.retry-btn:hover { background: var(--blush); color: #fff; }

.final-res {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  text-align: center;
  display: none;
  margin-top: 14px;
  box-shadow: var(--shadow);
}
.final-res.show { display: block; }
.final-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--peach);
}
.final-msg {
  font-size: 14px;
  color: var(--text2);
  margin-top: 10px;
}

/* course header (study view) */
.study-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.study-header-emoji {
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  background: var(--course-tint, var(--peach-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.study-header-body { flex: 1; min-width: 0; }
.study-header-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.15;
}
.study-header-meta {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.study-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* focus banner */
.focus-banner {
  background: var(--lavender-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.focus-banner-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lavender);
  margin-bottom: 12px;
}
.focus-items { display: flex; flex-direction: column; gap: 10px; }
.focus-item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
}
.focus-item-row .fi-emoji { flex-shrink: 0; font-size: 18px; line-height: 1.2; }
.focus-item-row .fi-body strong { font-weight: 700; display: block; font-size: 13px; margin-bottom: 2px; }
.focus-item-row .fi-body span { color: var(--text2); font-size: 13px; line-height: 1.55; }

/* schedule */
.sched-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 18px;
}
.sched-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
.sched-row {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: flex-start;
}
.sched-row:last-child { border-bottom: none; }
.sched-day {
  font-weight: 700;
  min-width: 54px;
  color: var(--lavender);
  font-size: 13px;
}
.sched-task { color: var(--text2); line-height: 1.55; flex: 1; }

/* ============================================================
   COURSE GENERATOR
   ============================================================ */

.gen-hero {
  text-align: center;
  padding: 16px 0 24px;
}
.gen-hero .gen-mascot { margin-bottom: 16px; display: flex; justify-content: center; }
.gen-hero h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.15;
}
.gen-hero p {
  font-size: 15px;
  color: var(--text2);
  max-width: 50ch;
  margin: 0 auto;
  line-height: 1.6;
}

.gen-steps { /* container */ }
.gen-step {
  position: relative;
  padding-left: 44px;
  margin-bottom: 24px;
}
.gen-step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--lavender);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
}
.gen-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.gen-step-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.55;
}

.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-tint);
  cursor: pointer;
  transition: var(--trans);
  margin-bottom: 10px;
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--lavender);
  background: var(--lavender-bg);
}
.drop-zone .dz-icon { font-size: 30px; margin-bottom: 10px; }
.drop-zone h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.drop-zone p { font-size: 13px; color: var(--text2); margin-top: 4px; }
.drop-zone input { display: none; }

.f-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.f-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
}
.f-chip-rm {
  cursor: pointer;
  color: var(--text3);
  font-size: 15px;
  line-height: 1;
}
.f-chip-rm:hover { color: var(--blush); }

.iq-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 12px;
}
.iq-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lavender);
  margin-bottom: 16px;
}
.iq-row { margin-bottom: 16px; }
.iq-row:last-child { margin-bottom: 0; }
.iq-row label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}
.iq-row label span {
  font-weight: 400;
  color: var(--text3);
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

.chk-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chk-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: var(--trans);
  color: var(--text2);
}
.chk-pill:hover { border-color: var(--border-2); color: var(--text); }
.chk-pill.on {
  background: var(--lavender-bg);
  border-color: var(--lavender);
  color: var(--lavender);
}

.r2 { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }

.depth-block {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-top: 14px;
}
.depth-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.depth-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.depth-sub {
  font-size: 11px;
  color: var(--text3);
}
.depth-row { margin-bottom: 10px; }
.depth-row:last-child { margin-bottom: 0; }
.depth-row .t-lbl { min-width: 76px; font-size: 12px; }
.depth-row .t-val { font-size: 12px; min-width: 80px; }
.depth-row input[type=range] { accent-color: var(--lavender); }

/* loading */
.gen-loading {
  display: none;
  text-align: center;
  padding: 56px 20px;
}
.gen-loading.show { display: block; }
.gen-loading .gen-paw {
  display: inline-block;
  animation: pawSpin 2s ease-in-out infinite;
}
@keyframes pawSpin {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}
.gen-loading .gen-status {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 18px;
  font-family: var(--font-display);
}
.gen-loading .gen-detail {
  font-size: 13px;
  color: var(--text2);
  margin-top: 6px;
}
.gen-prog-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px auto 0;
  max-width: 320px;
}
.gen-prog-fill {
  height: 100%;
  background: var(--lavender);
  border-radius: 10px;
  transition: width 0.8s ease;
  width: 0%;
}

/* ============================================================
   AUDIO RECORDER
   ============================================================ */

.mic-area {
  text-align: center;
  padding: 24px 0 12px;
}
.mic-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--peach);
  border: none;
  font-size: 32px;
  cursor: pointer;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px -4px rgba(217, 122, 82, 0.4);
  transition: var(--trans);
}
.mic-ring:hover { transform: scale(1.04); }
.mic-ring.rec {
  background: var(--blush);
  box-shadow: 0 0 0 0 rgba(196, 104, 104, 0.4);
  animation: rpulse 1.4s infinite;
}
@keyframes rpulse {
  0%   { box-shadow: 0 0 0 0 rgba(196, 104, 104, 0.4); }
  70%  { box-shadow: 0 0 0 16px rgba(196, 104, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 104, 104, 0); }
}
.rec-clock {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--blush);
  display: none;
  font-variant-numeric: tabular-nums;
}
.rec-status {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 16px;
}
.t-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  min-height: 100px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.t-box.empty {
  color: var(--text3);
  font-style: italic;
}

/* ============================================================
   INSTRUCTOR Q PAGE (standalone)
   ============================================================ */

.iq-step { margin-bottom: 18px; }
.iq-step label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}
.iq-step label span {
  font-weight: 400;
  color: var(--text3);
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

.focus-plan { display: none; margin-top: 20px; }
.focus-plan.show { display: block; }
.plan-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.plan-item:last-child { border-bottom: none; }
.plan-emoji { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.plan-body strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}
.plan-body span { font-size: 13px; color: var(--text2); line-height: 1.55; }

/* ============================================================
   KAI — CSS-shape cat mascot
   ============================================================ */

.mochi {
  --ms: 140px;
  --m-body: #e8b89a;            /* peach-tan body */
  --m-inner: #f4c6c0;           /* pink ear/cheek */
  --m-cheek: #f4b8b4;           /* cheek pink */
  --m-eye: #3a2a1c;             /* dark warm brown */
  --m-nose: #c97d6e;            /* nose */
  --m-whisker: rgba(58, 42, 28, 0.4);
  position: relative;
  display: inline-block;
  width: var(--ms);
  height: calc(var(--ms) * 0.96);
  flex-shrink: 0;
  vertical-align: middle;
}
[data-theme="dark"] .mochi {
  --m-body: #c89878;
  --m-inner: #d4a8a0;
  --m-cheek: #d49ea0;
  --m-eye: #1a1208;
  --m-nose: #a86555;
  --m-whisker: rgba(26, 18, 8, 0.5);
}
.mochi-xs { --ms: 22px; }
.mochi-sm { --ms: 48px; }
.mochi-md { --ms: 84px; }
.mochi-lg { --ms: 140px; }
.mochi-xl { --ms: 200px; }

.mochi > * { position: absolute; }

/* photo portrait — full animal on the page background (no crop) */
.m-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  transition: filter 0.5s ease, opacity 0.5s ease;
}
/* mood visibly changes the companion's look (single illustration, styled) */
.mochi-mood-sad .m-photo     { filter: grayscale(45%) brightness(0.9) contrast(0.95); opacity: 0.8; }
.mochi-mood-sleepy .m-photo  { filter: grayscale(20%) brightness(0.96) saturate(0.92); opacity: 0.9; }
.mochi-mood-neutral .m-photo { filter: none; opacity: 1; }
.mochi-mood-happy .m-photo   { filter: saturate(1.1) brightness(1.03); opacity: 1; }
.mochi-mood-thriving .m-photo{ filter: saturate(1.18) brightness(1.06) drop-shadow(0 0 10px rgba(255,205,120,0.5)); opacity: 1; }

/* ears */
.m-ear {
  width: 28%;
  height: 28%;
  top: 2%;
  background: var(--m-body);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.m-ear-l { left: 7%; transform: rotate(-12deg); }
.m-ear-r { right: 7%; transform: rotate(12deg); }
.m-inner-ear {
  width: 10%;
  height: 13%;
  top: 9%;
  background: var(--m-inner);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.m-inner-ear-l { left: 17%; transform: rotate(-12deg); }
.m-inner-ear-r { right: 17%; transform: rotate(12deg); }

/* head — slight oval covering most of the body */
.m-head {
  width: 86%;
  height: 78%;
  bottom: 0;
  left: 7%;
  background: var(--m-body);
  border-radius: 48% 48% 50% 50% / 50% 50% 52% 52%;
}

/* eyes — change per mood */
.m-eye {
  width: 8%;
  height: 11%;
  top: 49%;
  background: var(--m-eye);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.m-eye-l { left: 30%; }
.m-eye-r { right: 30%; }

/* cheeks */
.m-cheek {
  width: 13%;
  height: 9%;
  top: 60%;
  background: var(--m-cheek);
  border-radius: 50%;
  opacity: 0.65;
}
.m-cheek-l { left: 15%; }
.m-cheek-r { right: 15%; }

/* nose */
.m-nose {
  width: 7%;
  height: 5%;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--m-nose);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
}

/* mouth — tiny curve below nose (default: gentle smile) */
.m-mouth {
  width: 10%;
  height: 5%;
  top: 67%;
  left: 50%;
  transform: translateX(-50%);
  border: 1.5px solid var(--m-eye);
  border-color: transparent transparent var(--m-eye) transparent;
  border-radius: 0 0 50% 50%;
  background: transparent;
}

/* whiskers */
.m-whisker {
  width: 14%;
  height: 1.5px;
  background: var(--m-whisker);
  top: 64%;
  border-radius: 1px;
}
.m-whisker-l1 { left: 0;  transform: rotate(-8deg); }
.m-whisker-l2 { left: 0;  top: 69%; transform: rotate(6deg); }
.m-whisker-r1 { right: 0; transform: rotate(8deg); }
.m-whisker-r2 { right: 0; top: 69%; transform: rotate(-6deg); }

/* sparkles for thriving */
.m-sparkle {
  color: var(--butter);
  font-size: calc(var(--ms) * 0.13);
  font-weight: 700;
  animation: mSparkle 1.8s ease-in-out infinite;
}
.m-sparkle-1 { top: 4%; right: -4%; }
.m-sparkle-2 { top: 20%; left: -6%; animation-delay: 0.6s; font-size: calc(var(--ms) * 0.09); }
@keyframes mSparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* zzz for sleepy */
.m-zzz {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text3);
  font-weight: 700;
  font-size: calc(var(--ms) * 0.16);
  top: 5%;
  right: 11%;
  animation: mZzz 2.4s ease-in-out infinite;
}
@keyframes mZzz {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* ===== SPECIES VARIANTS (companions) ===== */
/* Dog — floppy ears at the sides, golden fur, no whiskers */
.mochi-sp-dog { --m-body: #cda56e; --m-inner: #ead0a6; --m-cheek: #e3b59c; }
[data-theme="dark"] .mochi-sp-dog { --m-body: #a8865a; --m-inner: #c8aa78; --m-cheek: #b58a72; }
.mochi-sp-dog .m-ear {
  width: 25%;
  height: 46%;
  top: 13%;
  clip-path: none;
  border-radius: 50% 50% 48% 48% / 32% 32% 68% 68%;
  background: var(--m-body);
  filter: brightness(0.92);
}
.mochi-sp-dog .m-ear-l { left: -4%; transform: rotate(11deg); }
.mochi-sp-dog .m-ear-r { right: -4%; transform: rotate(-11deg); }
.mochi-sp-dog .m-inner-ear { display: none; }
.mochi-sp-dog .m-whisker { display: none; }

/* Bunny — long upright ears, soft cream fur, no whiskers */
.mochi-sp-bunny { --m-body: #e8e2dc; --m-inner: #f0c9cf; --m-cheek: #f3c9cb; }
[data-theme="dark"] .mochi-sp-bunny { --m-body: #cfc8c0; --m-inner: #d8a8b0; --m-cheek: #c89aa0; }
.mochi-sp-bunny .m-ear {
  width: 15%;
  height: 54%;
  top: -22%;
  clip-path: none;
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
  background: var(--m-body);
}
.mochi-sp-bunny .m-ear-l { left: 28%; transform: rotate(-9deg); }
.mochi-sp-bunny .m-ear-r { right: 28%; transform: rotate(9deg); }
.mochi-sp-bunny .m-inner-ear {
  display: block;
  width: 6%;
  height: 34%;
  top: -14%;
  clip-path: none;
  border-radius: 50%;
  background: var(--m-inner);
}
.mochi-sp-bunny .m-inner-ear-l { left: 32.5%; transform: rotate(-9deg); }
.mochi-sp-bunny .m-inner-ear-r { right: 32.5%; transform: rotate(9deg); }
.mochi-sp-bunny .m-whisker { display: none; }

/* Fox — orange fur, sharp dark-tipped ears, keeps whiskers */
.mochi-sp-fox { --m-body: #e08a4e; --m-inner: #f6dcc4; --m-cheek: #f0b48c; }
[data-theme="dark"] .mochi-sp-fox { --m-body: #c0703a; --m-inner: #e0c0a0; --m-cheek: #cc8a64; }
.mochi-sp-fox .m-ear { height: 32%; }
.mochi-sp-fox .m-ear-l { left: 5%; }
.mochi-sp-fox .m-ear-r { right: 5%; }

/* Tiny (xs) faces: keep them legible — two clear round eyes, no merged detail */
.mochi-xs .m-eye,
.mochi-xs.mochi-mood-happy .m-eye,
.mochi-xs.mochi-mood-thriving .m-eye,
.mochi-xs.mochi-mood-sleepy .m-eye,
.mochi-xs.mochi-mood-sad .m-eye {
  width: 13%;
  height: 15%;
  top: 48%;
  border: none;
  border-radius: 50%;
  background: var(--m-eye);
}
.mochi-xs .m-eye-l { left: 26%; }
.mochi-xs .m-eye-r { right: 26%; }
.mochi-xs .m-mouth,
.mochi-xs .m-whisker,
.mochi-xs .m-cheek,
.mochi-xs .m-nose,
.mochi-xs .m-sparkle,
.mochi-xs .m-zzz { display: none; }

/* === mood: happy === (arc-shaped eyes, smile) */
.mochi-mood-happy .m-eye {
  height: 7%;
  border-radius: 50% 50% 0 0;
  background: transparent;
  border-top: 2.5px solid var(--m-eye);
  border-left: 2.5px solid var(--m-eye);
  border-right: 2.5px solid var(--m-eye);
}
.mochi-mood-happy .m-mouth { width: 12%; height: 6%; }

/* === mood: thriving === (closed arcs + sparkles + bigger smile) */
.mochi-mood-thriving .m-eye {
  height: 8%;
  border-radius: 50% 50% 0 0;
  background: transparent;
  border-top: 3px solid var(--m-eye);
  border-left: 3px solid var(--m-eye);
  border-right: 3px solid var(--m-eye);
}
.mochi-mood-thriving .m-mouth { width: 14%; height: 7%; }
.mochi-mood-thriving .m-cheek { opacity: 0.85; }

/* === mood: neutral === (default circles, slight smile) */
/* default styles cover this */

/* === mood: sleepy === (horizontal lines, smaller smile) */
.mochi-mood-sleepy .m-eye {
  height: 2.5px;
  width: 9%;
  border-radius: 2px;
  top: 53%;
}
.mochi-mood-sleepy .m-mouth { width: 7%; height: 3%; top: 66%; }
.mochi-mood-sleepy .m-cheek { opacity: 0.4; }
.mochi-mood-sleepy .m-head { transform: translateY(2%); }

/* === mood: sad === (downturned mouth, eyes lower) */
.mochi-mood-sad .m-eye {
  top: 53%;
  height: 7%;
  width: 7%;
}
.mochi-mood-sad .m-mouth {
  width: 9%;
  height: 5%;
  top: 70%;
  border-color: var(--m-eye) transparent transparent transparent;
  border-radius: 50% 50% 0 0;
}
.mochi-mood-sad .m-cheek { opacity: 0.3; }

/* gentle bobbing for the hero */
.mochi-bob { animation: mBob 4s ease-in-out infinite; }
@keyframes mBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .mochi-bob,
  .m-sparkle,
  .m-zzz { animation: none; }
}

/* ============================================================
   GARDEN — small plants accumulating along a row
   ============================================================ */

.garden {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 4px 0;
  min-height: 44px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.g-slot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  opacity: 0.45;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.g-plant {
  width: 14px;
  height: 30px;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  animation: gPlant 0.6s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
@keyframes gPlant {
  0%   { transform: scale(0) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .g-plant { animation: none; }
}

/* stem (real element) */
.g-stem {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 18px;
  background: var(--sage);
  border-radius: 1px;
  transform: translateX(-50%);
  display: block;
}
/* head (real element) */
.g-head {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  transform: translateX(-50%);
}
.g-leaf .g-head {
  width: 12px;
  height: 16px;
  background: var(--sage);
  border-radius: 0 100% 0 100%;
  transform: translateX(-50%) rotate(40deg);
}
.g-peach .g-head,
.g-lavender .g-head,
.g-butter .g-head,
.g-sage .g-head {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--flower);
  border: 2px solid var(--bg-tint);
}
.g-peach    { --flower: var(--peach); }
.g-lavender { --flower: var(--lavender); }
.g-butter   { --flower: var(--butter); }
.g-sage     { --flower: var(--sage); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  body { font-size: 16px; }
  .main { padding: 32px 28px 100px; }
  .home-hero { padding: 18px 0 36px; }
  .home-hero h1 { font-size: 44px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .course-grid-cards { grid-template-columns: repeat(2, 1fr); }
  .r2 { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 34px; }
  .ring-svg { width: 260px; height: 260px; }
  .ring-time { font-size: 50px; }
  .fc-scene { height: 280px; }
  .fc-term { font-size: 26px; }
}

/* desktop — sidebar visible */
@media (min-width: 1024px) {
  .app {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
  .topbar { display: none; }
  .sidebar {
    position: sticky;
    left: 0;
  }
  .sidebar-close { display: none; }
  .sidebar-backdrop { display: none; }
  .main {
    padding: 40px 48px 100px;
    max-width: 1100px;
  }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .home-hero h1 { font-size: 52px; }
  .page-title { font-size: 36px; }

  /* course generator: 2-col */
  .gen-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
  }
  .gen-grid .gen-step:first-child { grid-row: span 2; margin-bottom: 0; }

  /* study view: schedule sidebar */
  .study-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: start;
  }
  .study-grid .study-header,
  .study-grid .focus-banner { grid-column: 1 / -1; }
  .study-grid .course-progress { grid-column: 1 / -1; }
  .study-grid .sched-card { grid-column: 2; grid-row: 3 / span 4; position: sticky; top: 24px; margin-bottom: 0; }
  .study-grid .topic-tabs,
  .study-grid .study-body { grid-column: 1; }

  /* focus timer 2-col */
  .focus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
  }
  .focus-left { display: flex; flex-direction: column; align-items: center; }

  /* iq 2-col */
  .iq-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .iq-grid .iq-submit,
  .iq-grid .focus-plan { grid-column: 1 / -1; }

  /* audio 2-col */
  .audio-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    align-items: start;
  }
}

@media (min-width: 1280px) {
  .main { max-width: 1180px; padding-left: 64px; padding-right: 64px; }
}

/* ============================================================
   REWARDS
   ============================================================ */

/* home strip */
.rwd-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans);
}
.rwd-strip:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.rwd-strip-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rwd-strip-trophy {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--butter-bg);
  border-radius: var(--r-sm);
}
.rwd-strip-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.rwd-strip-next {
  font-size: 12px;
  color: var(--text2);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46ch;
}
.rwd-strip-icons { display: flex; gap: 4px; flex: none; }
.rwd-strip-chip {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  border-radius: 50%;
}
.rwd-strip-chip--empty { background: var(--surface2); opacity: 0.6; }

/* progress card on rewards screen */
.rwd-progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.rwd-progress-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.rwd-progress-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}
.rwd-progress-den { color: var(--text3); font-size: 20px; }
.rwd-progress-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.rwd-progress-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  overflow: hidden;
}
.rwd-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--peach), var(--butter));
  transition: width 0.6s cubic-bezier(.4, 0, .2, 1);
}

/* trophy case grid */
.rwd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .rwd-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .rwd-grid { grid-template-columns: repeat(4, 1fr); } }
.rwd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform var(--trans), box-shadow var(--trans);
}
.rwd-card.unlocked { border-color: color-mix(in srgb, var(--tint) 40%, var(--border)); }
.rwd-card.unlocked:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rwd-card.locked { background: var(--bg-tint); }
.rwd-card-badge {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  margin-bottom: 4px;
}
.rwd-card.unlocked .rwd-card-badge { background: var(--tintbg); }
.rwd-card.locked .rwd-card-badge { background: var(--surface2); filter: grayscale(1); opacity: 0.7; font-size: 20px; }
.rwd-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.rwd-card.locked .rwd-card-name { color: var(--text2); }
.rwd-card-desc { font-size: 11.5px; line-height: 1.4; color: var(--text2); }
.rwd-card.locked .rwd-card-desc { color: var(--text3); }

/* celebration overlay */
.reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(42, 36, 28, 0.32);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.reward-overlay.open { opacity: 1; }
.reward-pop {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), opacity 0.25s ease;
}
.reward-overlay.open .reward-pop { transform: scale(1); opacity: 1; }
.reward-pop .mochi { margin-bottom: 6px; }
.rwd-pop-badge {
  width: 84px; height: 84px;
  margin: 6px auto 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--tintbg);
  font-size: 40px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tint) 16%, transparent);
  animation: rwdBadgePop 0.5s cubic-bezier(.34, 1.56, .64, 1) backwards 0.15s;
}
@keyframes rwdBadgePop {
  0% { transform: scale(0) rotate(-30deg); }
  100% { transform: scale(1) rotate(0); }
}
.rwd-pop-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 4px;
}
.rwd-pop-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 6px;
}
.rwd-pop-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 18px;
}
.reward-pop .btn { width: 100%; }

/* confetti */
.rwd-confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rwd-confetti {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation-name: rwdFall;
  animation-timing-function: ease-in;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
@keyframes rwdFall {
  0% { transform: translateY(-10vh) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .rwd-confetti { display: none; }
  .reward-pop, .rwd-pop-badge { transition: opacity 0.2s ease; animation: none; transform: none; }
}

/* ============================================================
   DAILY WELCOME SPLASH
   ============================================================ */
.welcome-splash {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(42, 36, 28, 0.42);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.welcome-splash.open { opacity: 1; }
.welcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 16px 16px 20px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1), opacity 0.3s ease;
}
.welcome-splash.open .welcome-card { transform: scale(1) translateY(0); opacity: 1; }
.welcome-vid-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 528 / 384;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface);
}
.welcome-vid {
  position: absolute;
  top: -12.5%;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
}
.welcome-sound {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(42, 36, 28, 0.55);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background var(--trans);
}
.welcome-sound:hover { background: rgba(42, 36, 28, 0.78); }
.welcome-hi {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  margin-top: 16px;
}
.welcome-tag {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.5;
  margin: 4px 0 16px;
}
.welcome-go { width: 100%; }

/* ============================================================
   WEEKS STEPPER (course setup)
   ============================================================ */
.weeks-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.ws-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.ws-btn:hover { border-color: var(--peach); color: var(--peach); }
.ws-btn:active { transform: scale(0.94); }
.ws-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  min-width: 110px;
  text-align: center;
}
.ws-unit { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--text2); }

/* ============================================================
   COURSE PROGRESS (study view)
   ============================================================ */
.course-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.cp-stats { display: flex; gap: 28px; margin-bottom: 12px; }
.cp-stat { text-align: left; }
.cp-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}
.cp-den { font-size: 17px; color: var(--text3); font-weight: 700; }
.cp-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 5px;
}
.cp-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  overflow: hidden;
}
.cp-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--course-color, var(--peach));
  transition: width 0.6s cubic-bezier(.4, 0, .2, 1);
}
.cp-caption { font-size: 12px; color: var(--text2); margin-top: 8px; }

/* ============================================================
   HOME COURSE-PROGRESS CARD
   ============================================================ */
.cprog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.cprog-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 12px;
}
.cprog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  text-align: left;
  border-top: 1px solid var(--border);
}
.cprog-row:first-of-type { border-top: none; }
.cprog-emoji {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.cprog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cprog-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cprog-bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  overflow: hidden;
}
.cprog-fill { display: block; height: 100%; border-radius: var(--r-pill); transition: width 0.6s cubic-bezier(.4, 0, .2, 1); }
.cprog-meta {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  text-align: right;
  line-height: 1.3;
}
.cprog-wk { font-weight: 500; color: var(--text3); font-size: 11px; }

/* ============================================================
   TAP TO WAKE KAI
   ============================================================ */
.kai-tap {
  position: relative;
  cursor: pointer;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}
.kai-tap:focus-visible { outline: 2px solid var(--peach); outline-offset: 6px; border-radius: 50%; }
.kai-wiggle { animation: kaiWiggle 0.8s ease; transform-origin: center bottom; }
@keyframes kaiWiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-8deg) scale(1.05); }
  40% { transform: rotate(8deg) scale(1.07); }
  65% { transform: rotate(-4deg) scale(1.03); }
  85% { transform: rotate(2deg); }
}
.kai-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  margin-bottom: 10px;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 12px;
  width: max-content;
  max-width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
  z-index: 5;
}
.kai-bubble.show { opacity: 1; transform: translate(-50%, 0); }
.kai-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
}
@media (prefers-reduced-motion: reduce) { .kai-wiggle { animation: none; } }

/* ============================================================
   ASK KAI — in-app AI tutor
   ============================================================ */
.ask-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--peach);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 9px 16px 9px 11px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans);
}
.ask-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ask-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }

.ask-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 195;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.ask-panel.open { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 520px) {
  .ask-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 84vh; border-radius: var(--r) var(--r) 0 0; }
}
.ask-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ask-head-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text); }
.ask-close { background: transparent; border: none; font-size: 24px; line-height: 1; color: var(--text2); cursor: pointer; padding: 0 4px; }
.ask-close:hover { color: var(--text); }
.ask-context { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--bg-tint); }
.ask-ctx-chip { font-size: 12px; font-weight: 600; color: var(--text2); background: var(--surface); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--r-pill); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.ask-ctx-chip--none { color: var(--text3); }
.ask-clear { margin-left: auto; background: transparent; border: none; font-size: 12px; color: var(--text3); cursor: pointer; }
.ask-clear:hover { color: var(--peach); }
.ask-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ask-empty { text-align: center; color: var(--text2); padding: 18px 8px; }
.ask-empty p { font-size: 14px; line-height: 1.6; margin: 10px 0 16px; }
.ask-suggests { display: flex; flex-direction: column; gap: 8px; }
.ask-suggests button { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-pill); padding: 8px 14px; font-size: 13px; color: var(--text); cursor: pointer; transition: var(--trans); }
.ask-suggests button:hover { border-color: var(--peach); color: var(--peach); }
.ask-msg { display: flex; gap: 8px; align-items: flex-end; }
.ask-msg.ask-user { justify-content: flex-end; }
.ask-msg .mochi { flex: none; margin-bottom: 2px; }
.ask-bubble { max-width: 80%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.ask-user .ask-bubble { background: var(--peach); color: #fff; border-bottom-right-radius: 4px; }
.ask-assistant .ask-bubble { background: var(--bg-tint); color: var(--text); border-bottom-left-radius: 4px; }
.ask-bubble code { background: var(--surface2); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.ask-li { display: block; }
.ask-typing { display: flex; gap: 4px; align-items: center; }
.ask-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); animation: askDot 1.2s infinite; }
.ask-typing span:nth-child(2) { animation-delay: 0.2s; }
.ask-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes askDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ask-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.ask-input textarea { flex: 1; resize: none; border: 1px solid var(--border-2); border-radius: 14px; padding: 10px 12px; font-family: var(--font-body); font-size: 14px; color: var(--text); background: var(--surface); max-height: 120px; line-height: 1.4; }
.ask-input textarea:focus { outline: none; border-color: var(--peach); }
.ask-send { width: 40px; height: 40px; flex: none; border: none; border-radius: 50%; background: var(--peach); color: #fff; font-size: 18px; cursor: pointer; transition: var(--trans); }
.ask-send:hover { transform: scale(1.06); }

/* ask-about-this-topic button */
.ask-topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lavender-bg);
  color: var(--lavender);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 7px 14px 7px 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: var(--trans);
}
.ask-topic-btn:hover { border-color: var(--lavender); transform: translateY(-1px); }
.ask-topic-btn .mochi { flex: none; }

/* generate-more controls (cards / quiz) */
.gen-more {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--peach-bg);
  border: 1px dashed var(--peach);
  border-radius: var(--r);
}
.gen-more-label { font-size: 13px; font-weight: 700; color: var(--text); }
.gen-more-sel {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.gen-more-status { font-size: 12px; color: var(--text2); }

/* ============================================================
   GARDEN CARD + FRIENDS
   ============================================================ */
.garden-card {
  background: linear-gradient(180deg, var(--sage-bg) 0%, var(--surface) 60%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.garden-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gc-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.gc-add {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--trans);
}
.gc-add:hover { border-color: var(--sage); color: var(--sage); }
.garden-friends {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
  padding: 4px 2px 14px;
}
.gf { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.gf .mochi { flex: none; }
.gf-name { font-size: 12px; font-weight: 600; color: var(--text2); }
.gf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  height: 64px;
  background: transparent;
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans);
}
.gf-empty:hover { border-color: var(--sage); color: var(--sage); }
.gf-empty-plus { font-size: 18px; line-height: 1; }
.gc-caption { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* friend picker modal */
.friend-modal { max-width: 460px; width: 100%; }
.friend-sub { font-size: 13.5px; color: var(--text2); line-height: 1.5; margin-bottom: 16px; }
.friend-list { display: flex; flex-direction: column; gap: 12px; }
.friend-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  transition: var(--trans);
}
.friend-row.owned { border-color: var(--sage); background: var(--sage-bg); }
.friend-av { flex: none; width: 52px; display: flex; justify-content: center; }
.friend-info { flex: 1; min-width: 0; }
.friend-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); }
.friend-species { font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--text3); text-transform: capitalize; }
.friend-name-in {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  padding: 3px 8px;
  width: 130px;
  max-width: 100%;
}
.friend-name-in:focus { outline: none; border-color: var(--sage); }
.friend-blurb { font-size: 12px; color: var(--text2); line-height: 1.45; margin-top: 4px; }

/* ============================================================
   RECORDER course picker
   ============================================================ */
.rec-course-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.rec-pick-label { font-weight: 600; font-size: 14px; color: var(--text); }
.rec-course-sel {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.rec-course-sel:focus { outline: none; border-color: var(--peach); }
.rec-newclass { background: transparent; border: none; color: var(--peach); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ============================================================
   NOTES (Cornell-style) + note cards
   ============================================================ */
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.note-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.note-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.note-date { font-size: 12px; color: var(--text3); margin-top: 2px; }
.note-del { background: transparent; border: none; cursor: pointer; font-size: 15px; opacity: 0.55; padding: 2px 4px; }
.note-del:hover { opacity: 1; }
.note-plain { font-size: 14px; line-height: 1.7; color: var(--text); }
.note-quiz-btn { margin-top: 12px; }
.notes-empty { text-align: center; }
.notes-empty .mochi { margin: 0 auto 10px; }
.notes-empty p { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 14px; max-width: 42ch; margin-left: auto; margin-right: auto; }
.notes-formats { font-size: 12.5px !important; color: var(--text3) !important; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 16px !important; }
.notes-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.addnote-quiz-toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text2); margin-top: 12px; cursor: pointer; }
.addnote-quiz-toggle input { width: 16px; height: 16px; accent-color: var(--peach); }

/* Cornell layout: cue column | notes column, with a summary band */
.cornell {
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 12px;
}
.cornell-grid-head { display: grid; grid-template-columns: 32% 68%; background: var(--bg-tint); border-bottom: 1px solid var(--border-2); }
.cornell-grid-head span { padding: 7px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); }
.cornell-grid-head span:first-child { border-right: 1px solid var(--border-2); }
.cornell-row { display: grid; grid-template-columns: 32% 68%; border-bottom: 1px solid var(--border); }
.cornell-row:last-child { border-bottom: none; }
.cornell-cue { padding: 12px; border-right: 1px solid var(--border-2); font-weight: 600; font-size: 13px; color: var(--text); background: var(--bg-tint); line-height: 1.4; }
.cornell-notes { padding: 12px; }
.cornell-pt { font-size: 14px; line-height: 1.55; color: var(--text); padding-left: 16px; position: relative; margin-bottom: 6px; }
.cornell-pt:last-child { margin-bottom: 0; }
.cornell-pt::before { content: '•'; position: absolute; left: 2px; color: var(--course-color, var(--peach)); font-weight: 700; }
.cornell-summary {
  background: var(--course-tint, var(--peach-bg));
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}
.cs-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 4px; }

/* note-quiz modal */
.nq-modal { max-width: 560px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; }
.nq-body { overflow-y: auto; padding-right: 2px; }
.nq-score { text-align: center; font-size: 15px; color: var(--text2); padding: 12px 0 4px; }
.nq-score strong { font-family: var(--font-display); font-size: 22px; color: var(--text); }

/* course-card delete button */
.course-card { position: relative; }
.course-card-del {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.4;
  padding: 6px;
  border-radius: var(--r-xs);
  flex: none;
  transition: opacity var(--trans), background var(--trans);
}
.course-card-del:hover { opacity: 1; background: var(--blush-bg); }

/* delete-confirmation modal */
.del-modal { max-width: 400px; width: 100%; text-align: center; }
.del-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: var(--blush-bg);
  border-radius: 50%;
}
.del-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--text); margin-bottom: 8px; }
.del-text { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 18px; }
.del-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.del-check input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--blush); cursor: pointer; }
.del-actions { display: flex; gap: 10px; }
.del-actions .btn { flex: 1; }
.btn-danger {
  background: var(--blush);
  color: #fff;
  border: none;
}
.btn-danger:hover:not(:disabled) { filter: brightness(0.93); }
.btn-danger:disabled { background: var(--surface2); color: var(--text3); cursor: not-allowed; }

/* add-material modal */
.addmat-modal { max-width: 460px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.addmat-scroll { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.addmat-sub { font-size: 13.5px; color: var(--text2); line-height: 1.55; margin-bottom: 16px; }
.addmat-counts { display: flex; gap: 12px; margin-bottom: 12px; }
.addmat-counts label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.addmat-counts select {
  padding: 9px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.addmat-counts select:focus { outline: none; border-color: var(--peach); }
.addmat-title-in {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 12px;
}
.addmat-title-in:focus { outline: none; border-color: var(--peach); }
.addmat-drop { margin-bottom: 12px; padding: 18px; }
.addmat-text {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.addmat-text:focus { outline: none; border-color: var(--peach); }
.addmat-actions { display: flex; gap: 10px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); flex: none; }
.addmat-actions .btn { flex: 1; }
.addmat-status { font-size: 13px; color: var(--text2); text-align: center; margin-top: 12px; min-height: 18px; }

/* material folder (course tab) */
.mat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mat-count { font-size: 13px; font-weight: 600; color: var(--text2); }
.mat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.mat-icon {
  width: 36px; height: 36px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  background: var(--bg-tint);
  border-radius: var(--r-sm);
}
.mat-body { flex: 1; min-width: 0; }
.mat-name { font-weight: 600; font-size: 14px; color: var(--text); word-break: break-word; }
.mat-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.mat-preview {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.5;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-tint);
  border-radius: var(--r-xs);
  max-height: 70px;
  overflow: hidden;
}

/* ============================================================
   FOCUS MUSIC (Endel) tab
   ============================================================ */
.endel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.endel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.endel-logo {
  width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: var(--lavender-bg);
  border-radius: var(--r-sm);
}
.endel-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--text); }
.endel-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.endel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 640px) { .endel-grid { grid-template-columns: repeat(4, 1fr); } }
.endel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  text-decoration: none;
  transition: var(--trans);
}
.endel-btn:hover { border-color: var(--lavender); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.eb-emoji { font-size: 26px; }
.eb-label { font-weight: 600; font-size: 14px; color: var(--text); }
.eb-go { font-size: 11px; font-weight: 600; color: var(--lavender); }
.endel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.endel-note { font-size: 12px; color: var(--text3); line-height: 1.55; }
.endel-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.endel-tip-link { color: var(--lavender); font-weight: 600; cursor: pointer; }

/* Ask Claude tab — re-skins the shared card to the peach accent */
.claude-card .endel-logo { background: var(--peach-bg); color: var(--peach); font-weight: 800; }
.claude-card .endel-btn:hover { border-color: var(--peach); }
.claude-card .eb-go { color: var(--peach); }

/* ============================================================
   TIMER END ALERT (chime toggle + screen flash)
   ============================================================ */
.snd-toggle {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--trans);
}
.snd-toggle:hover { border-color: var(--peach); color: var(--peach); }

.timer-flash {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.timer-flash.show { opacity: 1; pointer-events: auto; }
.timer-flash::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--peach);
  opacity: 0;
}
.timer-flash.show::before { animation: tfPulse 1s ease-in-out 3; }
@keyframes tfPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.35; }
}
.tf-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 28px 32px;
  text-align: center;
  max-width: 340px;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1);
}
.timer-flash.show .tf-card { transform: scale(1); }
.tf-card .mochi { margin: 0 auto 12px; }
.tf-msg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.25;
}
@media (prefers-reduced-motion: reduce) {
  .timer-flash.show::before { animation: none; opacity: 0.25; }
  .tf-card { transition: none; transform: none; }
}

/* ============================================================
   DAILY LOG
   ============================================================ */
.dl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dl-saved {
  flex: none;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-bg);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.dl-saved.show { opacity: 1; transform: none; }

/* week strip */
.dl-weekstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 18px 0 4px;
}
.dl-wcell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.dl-wcell:hover:not(:disabled) { border-color: var(--border-2); transform: translateY(-1px); }
.dl-wcell.cur { border-color: var(--peach); background: var(--peach-bg); }
.dl-wcell.today .dl-wnum { color: var(--peach); font-weight: 700; }
.dl-wcell.future { opacity: .45; cursor: default; }
.dl-wlbl { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--text3); text-transform: uppercase; }
.dl-wdot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border-2); }
.dl-wcell.filled .dl-wdot { background: var(--sage); border-color: var(--sage); }
.dl-wcell.cur .dl-wdot { box-shadow: 0 0 0 3px var(--peach-tint); }
.dl-wnum { font-size: 13px; font-weight: 600; color: var(--text2); }

/* header card */
.dl-header { margin-top: 14px; display: flex; flex-direction: column; gap: 18px; }
.dlh-day { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dlh-nav {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text2);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dlh-nav:hover { background: var(--peach-bg); color: var(--peach); border-color: var(--peach); }
.dlh-nav.disabled { opacity: .3; pointer-events: none; }
.dlh-date-main { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); white-space: nowrap; }
.dlh-date { display: flex; flex-direction: column; }
.dlh-date-rel { font-size: 12px; font-weight: 600; color: var(--peach); text-transform: uppercase; letter-spacing: .05em; }
.dlh-meta { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; padding-top: 16px; border-top: 1px solid var(--border); }
.dlh-field { display: flex; flex-direction: column; gap: 6px; }
.dlh-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); white-space: nowrap; }
.dl-select, .dl-input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
}
.dl-select:focus, .dl-input:focus { outline: none; border-color: var(--peach); background: var(--bg-tint); }
.dl-select { min-width: 200px; cursor: pointer; }
.dl-week-in { width: 84px; text-align: center; }
.dlh-week { flex: none; }
.dlh-progress { display: flex; flex-direction: column; gap: 8px; margin-left: auto; align-items: center; }
.dlh-ring-wrap { position: relative; width: 52px; height: 52px; }
.dlh-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--text); }

/* blocks */
.dl-block { margin-top: 16px; }
.dl-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.dl-h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text); margin: 0; white-space: nowrap; flex-shrink: 0; }
.dl-hint { font-size: 12.5px; color: var(--text3); }
.dl-empty-mini { font-size: 13px; color: var(--text3); padding: 6px 0; }
.dl-add {
  margin-top: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--peach);
  background: none; border: none; cursor: pointer;
  padding: 4px 0;
}
.dl-add:hover { text-decoration: underline; }

/* goals */
.dl-goals { display: flex; flex-direction: column; gap: 8px; }
.dl-goal { display: flex; align-items: center; gap: 10px; }
.dl-check {
  flex: none; width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  background: var(--surface);
  color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dl-goal.done .dl-check { background: var(--sage); border-color: var(--sage); }
.dl-goal-in {
  flex: 1; font-family: var(--font-body); font-size: 14.5px; color: var(--text);
  background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px;
}
.dl-goal-in:focus { outline: none; border-color: var(--peach); background: var(--surface); }
.dl-goal.done .dl-goal-in { text-decoration: line-through; color: var(--text3); }
.dl-row-x {
  flex: none; width: 26px; height: 26px;
  border: none; background: none; color: var(--text3);
  font-size: 19px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.dl-row-x:hover { background: var(--blush-bg); color: var(--blush); }

/* sessions table */
.dl-stable { display: flex; flex-direction: column; gap: 7px; }
.dl-srow { display: grid; grid-template-columns: 78px 110px 1fr 64px 64px 1.2fr 26px; gap: 7px; align-items: center; }
.dl-shead .dl-cell { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); padding: 0 4px; background: none; border: none; }
.dl-cell {
  font-family: var(--font-body); font-size: 13px; color: var(--text);
  background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--r-xs);
  padding: 8px 9px; min-width: 0;
}
.dl-cell:focus { outline: none; border-color: var(--peach); background: var(--surface); }
.dl-c-num { text-align: center; }
.dl-row-x-sp { width: 26px; }

/* totals */
.dl-totals { display: flex; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.dl-tot {
  flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center;
  background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px 8px;
}
.dl-tot-num { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--peach); }
.dl-tot-lbl { font-size: 11.5px; font-weight: 600; color: var(--text2); }

/* reflection */
.dl-reflect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dl-reflect-field { display: flex; flex-direction: column; gap: 7px; }
.dl-rl { font-size: 12.5px; font-weight: 600; color: var(--text2); }
.dl-textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--text); line-height: 1.55;
  background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; resize: vertical; min-height: 56px;
}
.dl-textarea:focus { outline: none; border-color: var(--peach); background: var(--surface); }
.dl-energy { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.dl-energy-face { font-weight: 700; color: var(--text); margin-left: 6px; }
.dl-energy-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-edot {
  width: 38px; height: 38px; flex: none;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text3); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s, transform .1s;
}
.dl-edot:hover { transform: translateY(-1px); border-color: var(--peach); }
.dl-edot.on { background: var(--peach-tint); color: var(--text); border-color: var(--peach-tint); }
.dl-edot.cur { background: var(--peach); color: #fff; border-color: var(--peach); }

/* tomorrow */
.dl-tomorrow-in { width: 100%; font-size: 15px; padding: 13px 14px; }
.dl-tomorrow-note { font-size: 12.5px; color: var(--text3); margin: 10px 0 0; }

/* tips */
.dl-tips { margin-top: 18px; }
.dl-tips-toggle {
  font-size: 13.5px; font-weight: 600; color: var(--text2);
  background: none; border: none; cursor: pointer; padding: 6px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.dl-tips-chev { transition: transform .2s; display: inline-block; }
.dl-tips-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.dl-tips-body.open { max-height: 320px; }
.dl-tips-body ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.dl-tips-body li { font-size: 13.5px; color: var(--text2); line-height: 1.6; }
.dl-tips-body.open + .dl-tips-toggle .dl-tips-chev,
.dl-tips:has(.dl-tips-body.open) .dl-tips-chev { transform: rotate(90deg); }

@media (max-width: 760px) {
  .dl-reflect { grid-template-columns: 1fr; }
  .dl-srow { grid-template-columns: 64px 90px 1fr 52px 52px 26px; }
  .dl-c-notes { display: none; }
  .dl-shead .dl-c-notes { display: none; }
  .dl-select { min-width: 0; width: 100%; }
}

/* ============================================================
   FOCUS PRESETS (quick session length)
   ============================================================ */
.focus-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.focus-presets .fp-lead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-right: 2px;
}
.fpreset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: var(--trans);
}
.fpreset:hover { border-color: var(--peach); transform: translateY(-1px); }
.fpreset .fp-label { font-size: 14px; font-weight: 700; color: var(--text); }
.fpreset .fp-mins { font-size: 11.5px; color: var(--text3); font-variant-numeric: tabular-nums; }
.fpreset.active {
  background: var(--peach-bg);
  border-color: var(--peach);
}
.fpreset.active .fp-label { color: var(--peach); }
.fpreset.active .fp-mins { color: var(--peach); opacity: 0.85; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-card { margin-bottom: 16px; padding: 4px 4px; }
.settings-card .set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}
.settings-card .set-row + .set-row { border-top: 1px solid var(--border); }
.settings-card .set-sub.is-off { opacity: 0.5; }
.set-text { flex: 1; min-width: 0; }
.set-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.set-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  max-width: 52ch;
}
.set-desc b { color: var(--text); font-weight: 700; }
.snd-toggle.on {
  background: var(--peach-bg);
  border-color: var(--peach);
  color: var(--peach);
}
.set-time, .set-name {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
}
.set-time:focus, .set-name:focus { outline: none; border-color: var(--peach); }
.set-name { width: 180px; max-width: 46vw; }
.set-time:disabled { opacity: 0.5; cursor: not-allowed; }
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}
.restore-msg {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 10px;
}
.restore-msg b { color: var(--text); font-weight: 700; }
.restore-warn { color: var(--blush); }
.restore-warn b { color: var(--blush); }
.restore-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.paste-box {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  color: var(--text);
}
.paste-box:focus { outline: none; border-color: var(--peach); }

/* theme picker swatches */
.theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 110px;
  padding: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: var(--trans);
}
.theme-swatch:hover { transform: translateY(-2px); border-color: var(--peach); }
.theme-swatch.active {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px var(--peach-bg);
}
.ts-chip {
  position: relative;
  width: 100%;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.ts-buddy {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  pointer-events: none;
}
.ts-buddy .mochi { width: 42px; height: 42px; }
.ts-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.ts-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ts-buddy-name {
  font-size: 11px;
  color: var(--text3);
  text-transform: capitalize;
  margin-top: -3px;
}

/* ============================================================
   AI & academic honesty disclaimer
   ============================================================ */
.disc-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.disc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.disc-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 5px;
}
.disc-body p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text2);
  text-wrap: pretty;
}
.disc-body strong { color: var(--text); font-weight: 600; }
.disc-note {
  margin-top: 8px;
  padding: 14px 18px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text3);
}
