/* ============ Mobile-first base ============ */

.study-body { overflow-x: hidden; }

.study-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-bottom: 1px solid var(--sidebar-border);
}
.topbar-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--sidebar-border);
  background: transparent;
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.icon-btn svg { width: 18px; height: 18px; }
.study-topbar #icon-moon { position: absolute; opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .study-topbar #icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .study-topbar #icon-moon { opacity: 1; transform: rotate(0); position: absolute; }
.study-topbar #icon-sun { position: absolute; transition: opacity .2s, transform .3s; }
.study-topbar #icon-moon { transition: opacity .2s, transform .3s; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.scrim.show { opacity: 1; pointer-events: auto; }

.study-layout {
  display: block;
  max-width: 1800px;
  margin: 0 auto;
}

.study-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 84vw;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  z-index: 46;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.study-sidebar.open { transform: translateX(0); }

.sidebar-inner { padding: 28px 24px 40px; display: flex; flex-direction: column; gap: 24px; min-height: 100%; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-dim);
  text-decoration: none;
  font-size: 0.85rem;
  width: fit-content;
}
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { color: var(--accent-2); }

.plan-head .eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--accent-2);
  font-weight: 600;
}
.plan-head h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 6px 0;
}
.plan-sub { color: var(--sidebar-dim); font-size: 0.85rem; }

.overall-progress { display: flex; flex-direction: column; gap: 8px; }
.progress-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--sidebar-border);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
}
.progress-pct { font-size: 0.78rem; color: var(--sidebar-dim); }

.week-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.week-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--sidebar-dim);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.week-btn:hover { background: rgba(255,255,255,0.05); color: var(--sidebar-text); }
.week-btn.active { background: rgba(61,90,254,0.18); color: var(--sidebar-text); }
.wk-icon {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--accent-2);
  font-weight: 700;
  min-width: 20px;
}

.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--sidebar-border); }

.ghost-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.study-sidebar .ghost-btn { border-color: var(--sidebar-border); color: var(--sidebar-dim); }
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

.study-main {
  padding: 24px 16px 100px;
}

.study-view { display: none; }
.study-view.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.view-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}
.view-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 8px 0 12px;
}
.view-lede { color: var(--text-dim); font-size: 1rem; max-width: 760px; margin-bottom: 28px; }

/* Dashboard week grid */
.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 32px;
}
.week-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.week-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(20,22,26,0.2); }
.week-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.week-card h3 { font-family: var(--font-display); font-size: 1.05rem; }
.week-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.week-badge.done { background: rgba(0,194,168,0.15); color: var(--accent-2); border-color: transparent; }
.week-card p { color: var(--text-dim); font-size: 0.88rem; }
.week-mini-bar { height: 6px; border-radius: 999px; background: var(--border); margin-top: 12px; overflow: hidden; }
.week-mini-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.dashboard-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.dashboard-note h3 { font-family: var(--font-display); margin-bottom: 10px; }
.dashboard-note ul { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-dim); font-size: 0.92rem; }

/* Reading list */
.reading-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.reading-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.reading-card p { margin-top: 8px; font-size: 0.92rem; color: var(--text-dim); }
.book-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.book-tag.career { background: rgba(61,90,254,0.15); color: var(--accent); }
.book-tag.interview { background: rgba(0,194,168,0.15); color: var(--accent-2); }

.block-title { font-family: var(--font-display); font-size: 1.15rem; margin: 32px 0 14px; }

.concept-block, .bridge-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.concept-block p, .bridge-callout p { color: var(--text-dim); font-size: 0.96rem; margin-bottom: 12px; }
.concept-sublist { padding-left: 20px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.concept-sublist li { color: var(--text-dim); font-size: 0.94rem; }
.concept-sublist li::marker { color: var(--accent); }
.concept-block p:last-child, .bridge-callout p:last-child { margin-bottom: 0; }
.bridge-callout {
  border-left: 4px solid var(--accent-2);
  background: linear-gradient(180deg, rgba(0,194,168,0.06), transparent 60%);
}
.bridge-callout h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 10px; color: var(--accent-2); }

/* Highlighting */
mark.hl-yellow {
  background: rgba(255, 214, 0, 0.45);
  color: inherit;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
}
mark.hl-yellow:hover { background: rgba(255, 90, 90, 0.45); }

/* STAR builder */
.star-builder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.star-prompt { font-size: 0.92rem; color: var(--text); font-weight: 500; }
.star-builder label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--text-dim); font-weight: 600; }
.star-builder textarea, .metrics-tree input, .rice-calc input, .design-canvas input, .design-canvas textarea, .notes-panel textarea, .timer-drill textarea, .mock-sim textarea {
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  font-size: 0.92rem;
}
.star-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.ai-settings-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--text-dim); font-weight: 600; }
.ai-settings-label input {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: var(--bg); color: var(--text); font-size: 0.9rem; font-family: var(--font-body);
}
.ai-btn { width: auto; flex: none; padding: 10px 16px; }
.ai-feedback {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(124,58,237,0.08), rgba(61,90,254,0.04));
  border: 1px solid rgba(124,58,237,0.25);
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}
.ai-feedback::before {
  content: "AI Coach";
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c3aed;
  font-weight: 700;
  margin-bottom: 8px;
}
.ai-feedback.loading::before { content: "AI Coach — thinking..."; }
.ai-feedback.error { border-color: rgba(229,72,77,0.4); background: rgba(229,72,77,0.06); }
.ai-feedback.error::before { content: "AI Coach — couldn't get feedback"; color: #e5484d; }
.save-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.save-btn:hover { filter: brightness(1.08); }
.save-status { font-size: 0.8rem; color: var(--accent-2); }

/* Flashcards */
.flashcard-deck { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 8px; }
.flashcard { perspective: 1000px; height: 130px; cursor: pointer; }
.flashcard-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
}
.flashcard-front { background: var(--surface); font-family: var(--font-display); font-weight: 600; }
.flashcard-back { background: var(--bg); transform: rotateY(180deg); color: var(--text-dim); font-size: 0.85rem; }
.deck-hint { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 24px; }
.deck-grade { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

/* RICE calculator */
.rice-calc, .metrics-tree, .design-canvas, .timer-drill, .mock-sim, .story-bank {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.rice-row label, .metrics-tree label, .design-canvas label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--text-dim); font-weight: 600; margin-bottom: 12px; }
.rice-row input, .rice-grid input, .metrics-tree input, .design-canvas input {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg); color: var(--text); font-size: 0.92rem;
}
.rice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.rice-result { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--bg); margin-bottom: 14px; }
.rice-result strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); }
.rice-list, .dc-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.rice-item, .dc-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: 0.85rem;
}
.rice-item strong { color: var(--accent); }

/* Metrics tree */
.mt-branches { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
#mt-add-branch { margin-bottom: 14px; }

/* Timer drill */
.drill-question { font-size: 1.02rem; font-weight: 500; margin-bottom: 16px; min-height: 48px; }
.drill-controls { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.drill-timer { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.timer-drill textarea, .mock-sim textarea { width: 100%; margin-bottom: 12px; }

.answer-input-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
.answer-input-row textarea { flex: 1; margin-bottom: 0; }
.mic-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.mic-btn svg { width: 19px; height: 19px; }
.mic-btn:hover { border-color: var(--accent); color: var(--accent); }
.mic-btn.recording {
  background: #e5484d;
  border-color: #e5484d;
  color: #fff;
  animation: mic-pulse 1.4s ease-in-out infinite;
}
.mic-btn.unsupported { opacity: 0.4; cursor: not-allowed; }
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0.45); }
  50% { box-shadow: 0 0 0 8px rgba(229,72,77,0); }
}
.mic-hint { font-size: 0.8rem; color: #e5484d; margin-bottom: 14px; font-weight: 600; }
.drill-checklist { padding-left: 18px; color: var(--text-dim); font-size: 0.88rem; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* Design canvas */
.dc-columns { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
.dc-col h5 { font-size: 0.82rem; color: var(--accent); margin-bottom: 6px; }
.dc-col textarea { width: 100%; }

/* Story bank */
.story-hint { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 14px; }
.story-prompts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.story-prompt-btn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}
.story-prompt-btn.done { border-color: var(--accent-2); }
.story-prompt-btn.done::after { content: " ✓"; color: var(--accent-2); font-weight: 700; }
.story-prompt-btn:hover { border-color: var(--accent); }

/* Mock sim */
.mock-score { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.score-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; font-weight: 700;
}
.score-btn:hover { border-color: var(--accent); color: var(--accent); }
.mock-history { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mock-history-item { padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: 0.85rem; display: flex; justify-content: space-between; gap: 10px; }

/* Deliverables */
.deliverable-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}
.deliverable-box h4 { font-family: var(--font-display); margin-bottom: 12px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text-dim); padding: 6px 0; cursor: pointer; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }

/* ============ Floating action buttons ============ */
.fab {
  position: fixed;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(61,90,254,0.5);
  z-index: 55;
  font-weight: 700;
  font-size: 1.1rem;
}
.fab svg { width: 22px; height: 22px; }
.fab-notes { bottom: 148px; }
.fab-help { bottom: 84px; }
.fab-ai { bottom: 20px; background: linear-gradient(120deg, #7c3aed, var(--accent)); }

/* Notes panel — full sheet on mobile */
.notes-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 82vh;
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  z-index: 70;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notes-panel.open { transform: translateY(0); }
.panel-header { display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { font-family: var(--font-display); }
.panel-sub { font-size: 0.8rem; color: var(--text-dim); }
#notes-input { min-height: 90px; }
.notes-filter select {
  width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.85rem;
}
.notes-list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.note-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.86rem;
}
.note-item-tag { font-size: 0.7rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.note-item-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.note-item-actions button { background: none; border: none; color: var(--text-dim); font-size: 0.75rem; cursor: pointer; }
.note-item-actions button:hover { color: #e5484d; }

/* Bottom sheet — glossary */
.bottom-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 78vh;
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  z-index: 70;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-header { display: flex; justify-content: space-between; align-items: center; }
.sheet-header h3 { font-family: var(--font-display); }
#glossary-search {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.92rem;
}
.glossary-list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.glossary-item { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.glossary-item h4 { font-family: var(--font-display); font-size: 0.92rem; margin-bottom: 4px; color: var(--accent); }
.glossary-item p { font-size: 0.85rem; color: var(--text-dim); }

/* Standalone highlights page */
.highlights-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}
.desktop-back { display: none; margin-bottom: 20px; color: var(--text-dim); }
.desktop-back svg { width: 15px; height: 15px; }
@media (min-width: 860px) {
  .study-topbar ~ .highlights-page { padding-top: 56px; }
  .desktop-back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
}

/* Highlights list (used on highlights.html) */
.highlights-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.highlight-item { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 0.92rem; border-left: 4px solid var(--accent-2); }
.highlight-item-meta { font-size: 0.75rem; color: var(--text-dim); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.highlight-item-meta button { background: none; border: none; color: var(--text-dim); font-size: 0.78rem; cursor: pointer; }
.highlight-item-meta button:hover { color: #e5484d; }
.highlights-group-title { font-family: var(--font-display); font-size: 0.9rem; color: var(--accent); margin: 24px 0 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.highlights-group-title:first-of-type { margin-top: 0; }
.highlights-empty { color: var(--text-dim); font-size: 0.95rem; }

/* ============ Desktop enhancements (min-width) ============ */
@media (min-width: 860px) {
  .study-topbar { display: none; }
  .scrim { display: none; }

  .study-layout { display: grid; grid-template-columns: 320px 1fr; }

  .study-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    max-width: none;
  }

  .study-main { padding: 56px 64px 100px; max-width: 1000px; }

  .view-title { font-size: 2.1rem; }

  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .dc-columns { grid-template-columns: repeat(2, 1fr); }
  .flashcard-deck { grid-template-columns: repeat(2, 1fr); }
  .story-prompts { grid-template-columns: repeat(2, 1fr); display: grid; }

  .notes-panel {
    left: auto;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: 380px;
    border-radius: 0;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
  }
  .notes-panel.open { transform: translateX(0); }

  .bottom-sheet {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 380px;
    max-height: 560px;
    border-radius: 20px;
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .bottom-sheet.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

  .fab-ai { bottom: 24px; right: 24px; }
  .fab-help { bottom: 88px; right: 24px; }
  .fab-notes { bottom: 152px; right: 24px; }
}
