/* flats, sharps and naturals only: Garamond has none, so they come from a symbol font that sets them close */
@font-face {
  font-family: "Lune Accidentals";
  src: local("Apple Symbols"), local("Segoe UI Symbol"), local("Noto Music"), local("Noto Sans Symbols 2"), local("DejaVu Sans");
  unicode-range: U+266D-266F;
  size-adjust: 118%;
}
/* ==========================================================================
   Lune design layer (November 2026)

   One system on top of the older layers: Apple's system typeface for the
   interface, Apple's serif (New York) for titles, a calm reading column for
   Lune AI, Apple's grey surfaces and separators, and one accent colour.
   Loaded after styles.css and theme-light.css, so it wins without fighting.
   ========================================================================== */

:root {
  /* EB Garamond for words, everywhere; the system face only for numbers that must line up */
  --ui: "Lune Accidentals", "EB Garamond", "Cormorant Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  --display: "Lune Accidentals", "EB Garamond", "Cormorant Garamond", Garamond, Georgia, serif;
  --nums: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  /* navy, in small doses */
  --navy-deep: #16244a;
  --navy-mid: #22386e;
  --navy-hi: #9fb2e4;
  --serif: var(--ui);
  --garamond: var(--ui);
  /* the older layers used a monospace font for labels and Lune AI's reading lines;
     here every one of them speaks in the system typeface */
  --mono: var(--ui);
  --lune-blue-hi: rgba(235, 235, 245, 0.6);

  /* dark (Apple's dark system colours) */
  --d-bg: #000;
  --d-surface: #1c1c1e;
  --d-surface-2: #2c2c2e;
  --d-surface-3: #3a3a3c;
  --d-label: #f5f5f7;
  --d-label-2: rgba(235, 235, 245, 0.66);
  --d-label-3: rgba(235, 235, 245, 0.42);
  --d-sep: rgba(84, 84, 88, 0.55);
  /* the accent is the ink itself: white on dark, navy on light (set below) */
  --accent: #f5f5f7;
  --accent-ink: #000;
  --accent-press: #d8d8dc;

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ---------- type ---------- */
body, button, input, select, textarea, dialog {
  font-family: var(--ui) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
}
h1, h2, .member-title, .rep-title, #chat-h, .explain-title, #explain-title, .ask-empty-h, .chat-lead-h {
  font-family: var(--display) !important;
  font-weight: 500 !important;
  letter-spacing: -0.012em !important;
}
h3, .lp-h, .rep-card h3 { font-family: var(--ui) !important; font-weight: 600 !important; letter-spacing: -0.01em !important; }

/* small labels: quiet sentence case, not shouting mono capitals */
.about-kicker, .member-kicker, .member-next-k, .ai-scene-k, .sm-h, .coach-kicker, .chat-sub, .ask-where,
.chapter-label, .auth-kicker, .rep-section h2 + .dim, .home-continue-k, .explain-era, #explain-era {
  font-family: var(--ui) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--d-label-2) !important;
}

/* ==========================================================================
   Lune AI: a reading column, like a good chat app
   ========================================================================== */
.lune-chat { background: var(--d-bg) !important; }
.lune-chat .chat-hist {
  background: var(--g-card, #0d0d0f) !important;
  border-right: 1px solid var(--d-sep) !important;
}
.lune-chat .ch-h { font-size: 13px !important; font-weight: 600; color: var(--d-label-2) !important; letter-spacing: 0 !important; text-transform: none !important; }
.lune-chat .ch-new { border-radius: var(--radius-s) !important; font-size: 15px !important; font-weight: 500; }
.lune-chat .ch-item > button { font-size: 14.5px !important; border-radius: var(--radius-s) !important; }
.lune-chat .ch-item.on { background: var(--d-surface-2) !important; border-radius: var(--radius-s) !important; }

.lune-chat .chat-head {
  border-bottom: 1px solid transparent !important;
  background: rgba(0, 0, 0, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.lune-chat #chat-h { font-family: var(--ui) !important; font-size: 16px !important; font-weight: 600 !important; letter-spacing: -0.01em !important; text-transform: none !important; }
.lune-chat #chat-h .fx-shiny { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--d-label) !important; }
.lune-chat #chat-sub { font-size: 12px !important; font-weight: 500 !important; color: var(--d-label-3) !important; }

/* the conversation: centred, 720 px, room above the composer */
.lune-chat .chat-log {
  padding: 28px max(20px, calc((100% - 720px) / 2)) 180px !important;
  scroll-padding-bottom: 180px;
}
.lune-chat .chat-row { margin: 0 0 28px !important; max-width: none !important; }
.lune-chat .chat-from-you { display: flex; justify-content: flex-end; }
.lune-chat .chat-from-you .chat-bubble {
  background: var(--d-surface-2) !important;
  color: var(--d-label) !important;
  border: 0 !important;
  border-radius: 20px !important;
  padding: 10px 16px !important;
  max-width: min(78%, 560px);
  font-size: 16px !important;
  line-height: 1.45 !important;
  font-family: var(--ui) !important;
  box-shadow: none !important;
}
.lune-chat .chat-from-lune .chat-bubble,
.lune-chat .chat-from-lune .chat-bubble * ,
.lune-chat .chat-log p {
  font-family: var(--ui) !important;
  letter-spacing: -0.003em !important;
  word-spacing: normal !important;
}
.lune-chat .chat-from-lune .chat-bubble {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--d-label) !important;
  font-size: 16.5px !important;
  line-height: 1.65 !important;
  max-width: 100% !important;
  text-align: left !important;
  hyphens: none;
}
.lune-chat .chat-from-lune .chat-bubble p { margin: 0 0 0.85em !important; font-size: inherit !important; line-height: inherit !important; }
.lune-chat .chat-from-lune .chat-bubble p:last-child { margin-bottom: 0 !important; }
.lune-chat .chat-from-lune .chat-bubble ol,
.lune-chat .chat-from-lune .chat-bubble ul { margin: 0.4em 0 0.9em !important; padding-left: 1.4em !important; }
.lune-chat .chat-from-lune .chat-bubble li { margin: 0 0 0.55em !important; padding-left: 0.2em; line-height: 1.6 !important; }
.lune-chat .chat-from-lune .chat-bubble li::marker { color: var(--d-label-2); font-weight: 600; }
.lune-chat .chat-from-lune .chat-bubble strong { font-weight: 600 !important; }
.lune-chat .la-bar {
  color: inherit !important; text-decoration: underline; text-decoration-color: var(--d-label-3);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; font: inherit !important; background: none; border: 0; padding: 0; cursor: pointer;
}
.lune-chat .la-bar:hover { text-decoration-color: var(--d-label); }

/* answer tools: quiet until hovered */
.lune-chat .ask-actions { margin-top: 10px !important; gap: 2px !important; opacity: 0.55; transition: opacity 0.15s ease; }
.lune-chat .chat-row:hover .ask-actions, .lune-chat .ask-actions:focus-within { opacity: 1; }
.lune-chat .lc-mini { width: 30px !important; height: 30px !important; border-radius: 8px !important; }
.lune-chat .lc-mini:hover { background: var(--d-surface-2) !important; }

/* quick replies: proper pills; once one is chosen the others step back */
.la-replies { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.la-reply {
  min-height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--d-sep); background: var(--d-surface); color: var(--d-label);
  font: 500 15px/1 var(--ui) !important; transition: background 0.15s ease, border-color 0.15s ease;
}
.la-reply:hover { background: var(--d-surface-2); border-color: var(--d-surface-3); }
.la-reply:disabled { cursor: default; opacity: 0.4; }
.la-reply.on { opacity: 1 !important; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.la-replies:has(.on) .la-reply:not(.on) { display: none; }

/* plan steps */
.la-plan-start {
  margin-left: 10px !important; min-height: 28px !important; padding: 0 12px !important;
  border-radius: 999px !important; border: 0 !important; background: var(--d-surface-2) !important;
  color: var(--d-label) !important; font: 600 13px/28px var(--ui) !important;
}
.la-plan-start:hover { background: var(--d-surface-3) !important; }
.la-plan-save {
  margin-top: 6px !important; min-height: 36px !important; padding: 0 16px !important; border-radius: 999px !important;
  background: var(--d-surface-2) !important; border: 0 !important; color: var(--d-label) !important; font: 500 15px var(--ui) !important;
}

/* the empty state */
.lune-chat .ask-empty-h, .lune-chat .chat-lead-h { font-size: 30px !important; font-weight: 500 !important; }
.lune-chat .chat-starters { justify-content: center; padding: 0 20px 12px !important; -webkit-mask-image: none !important; mask-image: none !important; flex-wrap: wrap !important; max-width: 760px; margin: 0 auto; }
.lune-chat .chat-starters button {
  border-radius: 999px !important; border: 1px solid var(--d-sep) !important; background: var(--d-surface) !important;
  color: var(--d-label) !important; font: 500 14.5px var(--ui) !important; min-height: 36px !important; padding: 0 14px !important;
}
.lune-chat .chat-starters button:hover { background: var(--d-surface-2) !important; }

/* the composer: one rounded field, centred on the column */
.lune-chat .chat-form { max-width: 760px !important; margin: 0 auto !important; width: 100% !important; padding: 0 20px !important; box-sizing: border-box; }
.lune-chat .lc-composer {
  background: var(--d-surface) !important;
  border: 1px solid var(--d-sep) !important;
  border-radius: 26px !important;
  box-shadow: var(--shadow-1) !important;
  padding: 6px 6px 6px 18px !important;
  min-height: 52px;
  align-items: center !important;
}
.lune-chat .lc-composer:focus-within { border-color: var(--d-surface-3) !important; }
.lune-chat .lc-composer textarea {
  font: 400 16px/1.45 var(--ui) !important; color: var(--d-label) !important; background: transparent !important; padding: 9px 0 !important;
}
.lune-chat .lc-composer textarea::placeholder { color: var(--d-label-3) !important; }
.lune-chat .lc-round { width: 38px !important; height: 38px !important; background: var(--accent) !important; color: var(--accent-ink) !important; box-shadow: none !important; }
.lune-chat .chat-fine { font: 400 12px var(--ui) !important; color: var(--d-label-3) !important; text-align: center; max-width: 720px; margin: 8px auto 12px !important; }

/* the same reading rules for Ask Lune beside the score */
.ask-lune .ask-msg, .ask-lune .ask-from-lune .ask-msg, .ask-row .ask-msg:not(.ask-from-you) {
  font-family: var(--ui) !important; font-size: 15.5px !important; line-height: 1.6 !important; letter-spacing: -0.003em !important;
}
.ask-lune .ask-from-you .ask-msg, .ask-row .ask-from-you {
  background: var(--d-surface-2) !important; border-radius: 18px !important; border: 0 !important;
}

/* ==========================================================================
   App surfaces: header, buttons, cards, sheets
   ========================================================================== */
header.bar {
  background: rgba(0, 0, 0, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--d-sep) !important;
}
.primary, button.primary, a.primary {
  background: var(--accent) !important; color: var(--accent-ink) !important; border: 0 !important;
  border-radius: 999px !important; font-weight: 600 !important; letter-spacing: -0.01em !important;
  box-shadow: none !important;
}
.primary:hover { background: var(--accent-press) !important; }
.quiet, button.quiet {
  border-radius: 999px !important; font-weight: 500 !important;
}

/* dialogs and sheets */
dialog.settings-dialog, dialog.work-dialog, .studio-menu {
  font-family: var(--ui) !important;
}
.settings-row {
  border-radius: var(--radius-m) !important; background: var(--d-surface) !important; border: 0 !important;
}
.settings-row:hover { background: var(--d-surface-2) !important; }
.settings-row strong { font-weight: 600 !important; font-size: 15.5px !important; }
.settings-row span { color: var(--d-label-2) !important; font-size: 13.5px !important; }

/* ---------- Repertoire ---------- */
.rep-section { border: 0 !important; }
.rep-section h2 { font-size: 24px !important; margin-bottom: 12px !important; }
.rep-card, .rep-plan-card {
  background: var(--d-surface) !important;
  border: 0 !important;
  border-radius: var(--radius-l) !important;
  box-shadow: none !important;
  padding: 18px 20px !important;
}
.rep-card:hover { background: #222224 !important; }
.rep-card h3, .rep-plan-card h3 { font-size: 18px !important; margin: 0 0 2px !important; }
.rep-card-by { font-style: normal !important; color: var(--d-label-2) !important; font-size: 14px !important; }
.rep-card-meta { color: var(--d-label-3) !important; font-size: 13px !important; }
.rp-bar { height: 6px !important; border-radius: 3px !important; background: var(--d-surface-3) !important; overflow: hidden; }
.rp-bar i { background: var(--accent) !important; border-radius: 3px; }
.rep-add input, #rep-add-q {
  border-radius: 12px !important; background: var(--d-surface) !important; border: 1px solid var(--d-sep) !important;
  font: 400 16px var(--ui) !important; min-height: 44px;
}
.rep-empty { color: var(--d-label-2) !important; font-size: 15px !important; }
.task-origin { font-size: 12px !important; font-weight: 600 !important; border-radius: 999px !important; }

/* ---------- The piece: Explain ---------- */
#explain-title, .explain-title { font-size: clamp(34px, 4.4vw, 52px) !important; line-height: 1.05 !important; }
#explain-by { color: var(--d-label-2) !important; font-size: 17px !important; }
#explain-hook { font-size: 19px !important; line-height: 1.5 !important; color: var(--d-label-2) !important; font-family: var(--ui) !important; }
.chapter { border-top: 1px solid var(--d-sep) !important; padding-top: 28px !important; }
.chapter-title { font-family: var(--display) !important; font-size: 26px !important; font-weight: 500 !important; letter-spacing: -0.01em !important; }
.chapter-body, .chapter-body p, .chapter-body li { font-family: var(--ui) !important; font-size: 16.5px !important; line-height: 1.65 !important; color: rgba(245, 245, 247, 0.86) !important; }
.chapter-body ul { padding-left: 1.2em !important; }
.chapter-body li { margin-bottom: 0.4em; }

/* ---------- The piece: score chrome ---------- */
.score-tools .seg, .fx-seg, .sm-seg, .st-seg-panels, .st-seg-anno { background: rgba(118, 118, 128, 0.24) !important; }
.studio-tab, .studio-tabs button { font-weight: 500 !important; }
.coach, .coach-sheet { font-family: var(--ui) !important; }
/* the bar panel is drawn light and inverted for dark mode (styles.css), so it keeps its own colours */
.lp-grade { border-radius: 999px !important; font-weight: 600 !important; }
.lp-tools button, .lp-ai-row button { border-radius: 999px !important; font-weight: 500 !important; }

/* ---------- Toasts ---------- */
.toast {
  font: 500 14.5px/1.4 var(--ui) !important; border-radius: 14px !important; padding: 12px 16px !important;
  background: rgba(44, 44, 46, 0.92) !important; color: var(--d-label) !important; border: 0 !important;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-1) !important;
}

/* ==========================================================================
   Light mode: Apple's light system colours
   ========================================================================== */
:root[data-theme="light"] {
  --d-bg: #fff;
  --d-surface: #f2f2f7;
  --d-surface-2: #e9e9ee;
  --d-surface-3: #d1d1d6;
  --d-label: #000;
  --d-label-2: rgba(60, 60, 67, 0.72);
  --d-label-3: rgba(60, 60, 67, 0.5);
  --d-sep: rgba(60, 60, 67, 0.2);
  --accent: #14213d;
  --accent-ink: #fff;
  --accent-press: #0c1529;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
}
:root[data-theme="light"] .lune-chat .chat-hist { background: #f7f7f9 !important; }
:root[data-theme="light"] .lune-chat .chat-head, :root[data-theme="light"] header.bar { background: rgba(255, 255, 255, 0.78) !important; }
:root[data-theme="light"] .la-plan-start { color: #14213d !important; background: #e9ecf4 !important; }
:root[data-theme="light"] .rep-card:hover { background: #ebebf0 !important; }
:root[data-theme="light"] .chapter-body, :root[data-theme="light"] .chapter-body p, :root[data-theme="light"] .chapter-body li { color: rgba(0, 0, 0, 0.82) !important; }
:root[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.92) !important; }
@media (prefers-reduced-motion: reduce) {
  .lune-chat .ask-actions { transition: none; }
}


/* ---------- labels and reading lines from the older layers ---------- */
/* section headings: Apple's large title style, with no extra eyebrow above */
#rep-week-h, #rep-plan-h, #rep-list-h, #home-member .member-recs h2 {
  font-family: var(--ui) !important; font-weight: 700 !important; font-size: 22px !important; letter-spacing: -0.02em !important;
}
#rep-week-h::before, #rep-plan-h::before, #rep-list-h::before, #home-member .member-recs h2::before { content: none !important; display: none !important; }
/* small labels that remain: quiet, sentence case */
.rep-sum-k, .wk-k, .po-st, .mh-phase, .mr-kicker, .member-rec-role, .lw-stage, .home-footer-line, .onboard-progress li.on em {
  letter-spacing: 0.02em !important; font-weight: 600 !important; text-transform: none !important; font-size: 12.5px !important;
}
/* Lune AI's "reading" lines and note lists: normal text, normal spacing */
.la .la-read, .la .la-line, :is(#ask-lune, #lune-chat, #home-member, body) .la :is(.la-read, .la-line, .la-line *, .la-read *),
.po-sum, .hd-line, .wk-n {
  font-family: var(--ui) !important; letter-spacing: -0.003em !important; word-spacing: normal !important;
}
.la .la-read { font-size: 13.5px !important; color: var(--d-label-3) !important; }
.la .la-line { font-size: 15px !important; line-height: 1.6 !important; }
.lune-chat .chat-head h2, .lune-chat .chat-id, .ask-title { letter-spacing: -0.01em !important; text-transform: none !important; font-size: 16px !important; font-weight: 600 !important; }
.scrub-meta { font-variant-numeric: tabular-nums; letter-spacing: 0 !important; }


/* ==========================================================================
   Premium pass: no glows, no gradients, no electric blue. Quiet surfaces,
   one ink, depth from spacing and type rather than effects.
   ========================================================================== */
:root { --lune-blue: var(--accent); --navy: var(--accent); --navy-ink: var(--accent-ink); --navy-line: var(--d-surface-3); }

/* glows and coloured shadows, everywhere */
.home-feat-device, body.is-home:not(.is-signed-in) .home-feat-device, #home-member .member-next, #home-member .member-rec:hover,
.lune-chat[open], .lune-talk[open], dialog#ask-panel[open], .ask-panel[open], .hd, .hd-card, .mr-keys, .lc-send, .lc-round, .hd-send,
#home-member .member-next .primary, #home-member .member-next button.primary {
  box-shadow: none !important;
}
.lune-chat[open], .lune-talk[open], dialog#ask-panel[open], .ask-panel[open] {
  background: var(--d-bg) !important; border: 1px solid var(--d-sep) !important;
}
:root[data-theme="light"] .lune-chat[open], :root[data-theme="light"] .lune-talk[open], :root[data-theme="light"] dialog#ask-panel[open], :root[data-theme="light"] .ask-panel[open] { background: #fff !important; }
/* the animated rainbow ring around every text field */
.lc-composer::before, .chat-form::before, .ask-form::before, #home-member .home-ask::before, .lp-askbar::before { display: none !important; content: none !important; }
.fx-shiny { background: none !important; -webkit-text-fill-color: currentColor !important; animation: none !important; }

/* header: Sign in is a quiet white pill; the landing nav never wraps */
header.bar .bar-auth {
  background: var(--accent) !important; color: var(--accent-ink) !important; border: 0 !important; box-shadow: none !important;
  font: 600 14px var(--ui) !important; height: 34px !important; min-height: 34px !important;
}
html[data-theme="light"] header.bar .bar-auth { background: var(--accent) !important; color: var(--accent-ink) !important; }
.lp-nav { flex-wrap: nowrap !important; gap: 2px !important; }
.lp-nav a { white-space: nowrap !important; font: 500 14px var(--ui) !important; color: var(--d-label-2) !important; padding: 6px 12px !important; border-radius: 999px !important; }
.lp-nav a:hover { color: var(--d-label) !important; }
body.is-home:not(.is-signed-in) .lp-nav a.on { background: var(--d-surface-2) !important; color: var(--d-label) !important; }
.lp-nav a.on::before { display: none !important; }
.lp-nav-cta { background: var(--accent) !important; color: var(--accent-ink) !important; }
@media (max-width: 1080px) { .lp-nav { display: none !important; } }

/* buttons: one shape, two weights */
.quiet, button.quiet { background: transparent !important; border: 1px solid var(--d-sep) !important; color: var(--d-label) !important; }
.quiet:hover { background: var(--d-surface) !important; }
.link-btn { color: var(--d-label-2) !important; }
.link-btn:hover { color: var(--d-label) !important; }
.hero-cta-alt { border: 1px solid var(--d-sep) !important; background: transparent !important; color: var(--d-label) !important; box-shadow: none !important; }

/* progress and status: ink, not neon */
.rp-bar i, #member-streak .po-bar i, .lw-bar i { background: var(--d-label) !important; box-shadow: none !important; }
.wp-check[aria-pressed="true"] { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink) !important; }
html body .onboard-progress li.done span { background: var(--d-label) !important; border-color: var(--d-label) !important; box-shadow: none !important; }
.rep-sum { background: var(--d-surface) !important; border-left: 2px solid var(--d-surface-3) !important; }
#home .mr-tonight .hd-tag { color: var(--d-label-2) !important; background: var(--d-surface-2) !important; }
#home .mr-tonight .hd-send, .hd-send { background: var(--accent) !important; color: var(--accent-ink) !important; }
.chat-starters button:hover, .ask-chips button:hover { border-color: var(--d-surface-3) !important; background: var(--d-surface-2) !important; }
.lc-send, .lc-round { background: var(--accent) !important; color: var(--accent-ink) !important; }
body.studio-compact.is-studio header.bar .st-play.on { background: var(--accent) !important; color: var(--accent-ink) !important; }
.member-next-actions .primary { background: var(--accent) !important; color: var(--accent-ink) !important; }

/* the landing piano: lit keys and falling notes in soft white, not electric blue */
.mr-keys { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) !important; }
.mr-wk.is-lit, .mr-wk.is-hit { background: linear-gradient(to bottom, #e4e4e8 0%, #f6f6f8 40%, #fff 100%) !important; box-shadow: inset 0 -4px 0 #cfcfd4 !important; }
.mr-bk.is-lit, .mr-bk.is-hit { background: linear-gradient(to bottom, #1a1a1c 0%, #3a3a3e 100%) !important; }
.mr-n, .mr-n.mr-nb { background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.78) 60%, #fff) !important; box-shadow: none !important; }
.mr-ripple { border-color: rgba(255, 255, 255, 0.5) !important; }
.home-footer-line, body.is-home:not(.is-signed-in) #home-guest > .home-footer .home-footer-line { color: var(--d-label-2) !important; }

/* Lune AI's orb: a calm moon, not a glowing blue marble */
.ask-empty-orb, .lune-orb-sm, .lune-orb { filter: grayscale(1) brightness(1.15) !important; box-shadow: none !important; }

/* cards everywhere share one surface */
#home-member .member-rec, #home-member .member-next, .hd-card, .ai-chapter .ai-scene, .home-feat-device {
  background: var(--d-surface) !important; border: 1px solid var(--d-sep) !important; border-radius: var(--radius-l) !important;
}
#home-member .member-rec:hover { transform: none !important; background: var(--d-surface-2) !important; }

/* light mode keeps the same restraint */
:root[data-theme="light"] .mr-n, :root[data-theme="light"] .mr-n.mr-nb { background: linear-gradient(to bottom, rgba(20,33,61,0), rgba(20,33,61,0.7) 60%, #14213d) !important; }
#hero .mr-n { background: rgba(245, 245, 247, 0.92) !important; box-shadow: none !important; }
#hero .mr-n.mr-nb { background: #8e8e93 !important; }
:root[data-theme="light"] #hero .mr-n { background: #14213d !important; }
:root[data-theme="light"] #hero .mr-n.mr-nb { background: #8e8e93 !important; }
html body .about-kicker, html body .home-feat-copy .about-kicker, html body .member-kicker, html body .ai-scene-k, html body .coach-kicker {
  color: var(--d-label-2) !important; font: 600 13px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important;
}

/* the last periwinkle accents from the older layers */
html body #home .mr-kicker, html body #home-guest .about-kicker, html body .mh-phase { color: var(--d-label-2) !important; }
.hd-tag, .la .la-mark, .la .la-tag, .po-sum .la-tag, #member-streak .po-sum .la-tag, html body #home .mr-tonight .hd-tag { color: var(--d-label) !important; background: none !important; }
.la-stage.done .la-dot { background: var(--d-label-2) !important; }
#home-member .member-quick .mq svg { color: var(--d-label-2) !important; }
html body .onboard-progress li.on span { border-color: var(--d-label) !important; box-shadow: inset -5px 0 0 0 var(--d-label) !important; }
html body .onboard-progress li.on em { color: var(--d-label) !important; }
.fx-aurora { display: none !important; }
.lw-stage { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--d-label-2) !important; animation: none !important; }

/* small capitals anywhere but the wordmark: sentence case, quiet grey */
html body :is(.home-app-sub, .mr-hint, .sim-piano-meta, .piano-tut-kicker, .tut-rh, .tut-lh, .hello-kicker, .eyebrow,
  .onboard-search-label, .lune-loader-text, .lune-tour-kicker, .search-go, dialog h3, .settings-dialog h3, .onboard-stage label) {
  text-transform: none !important; letter-spacing: 0 !important; font-family: var(--ui) !important;
  font-weight: 600 !important; font-size: 13px !important; color: var(--d-label-2) !important;
}
html body .settings-dialog h3, html body dialog h3 { margin: 22px 0 8px 4px !important; }


html[data-theme="light"] body .lune-chat .chat-from-you .chat-bubble, html[data-theme="light"] body .ask-from-you .ask-msg {
  background: #f2f2f7 !important; color: #000 !important; border: 0 !important; box-shadow: none !important;
}
html[data-theme="light"] body .lune-chat .lc-composer { background: #fff !important; }

html body .lune-chat .chat-from-lune .chat-bubble li::marker, html body .la2 li::marker, html body .rich li::marker { color: #8e8e93 !important; }
/* phones outside the studio: open pieces live in the menu, not squeezed into the header */
@media (max-width: 700px) {
  body:not(.is-studio) header.bar #piece-tabs { display: none !important; }
}

html body .wk-opts .wk-go, html body button.wk-go { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
html[data-theme="light"] .tone-finger { color: #14213d !important; border-color: #14213d !important; }

/* Lune AI's empty state: the crescent and one large line, like a good chat app's greeting */
html body .lune-chat .ask-empty { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: auto 0 28px !important; }
html body .lune-chat .ask-empty-orb {
  width: 34px !important; height: 34px !important; min-height: 0 !important; filter: none !important; background: none !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  background-color: var(--d-label) !important; box-shadow: none !important; border: 0 !important;
}
html body .lune-chat .ask-empty-orb * { display: none !important; }
html body .lune-chat .ask-empty-h {
  font-family: var(--display) !important; font-size: clamp(28px, 3.4vw, 36px) !important; font-weight: 500 !important;
  letter-spacing: -0.015em !important; color: var(--d-label) !important; margin: 0 !important; text-align: center;
}

/* the landing keyboard: a plain top edge, and keys that press in grey rather than glow blue */
#hero .mr-keys::before { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 0 rgba(255, 255, 255, 0.06) !important; }
#hero .mr-k.mr-wk.is-lit, #hero .mr-k.mr-wk.is-hit { background: #e3e3e7 !important; box-shadow: inset 0 -4px 0 #c7c7cc !important; }
#hero .mr-k.mr-bk.is-lit, #hero .mr-k.mr-bk.is-hit { background: #3a3a3e !important; box-shadow: inset 0 -3px 0 #1c1c1e !important; }


/* ==========================================================================
   Garamond everywhere, set to read comfortably, with hints of navy
   ========================================================================== */
/* Garamond's small x-height, evened out: every size reads like the size it says */
html body, html body * { font-size-adjust: 0.47; }
html body svg, html body svg *, html body #osmd *, html body .score-page * , html body .lune-kbd-host * { font-size-adjust: none; }
html body { font-feature-settings: "kern", "liga", "onum" 0; }
/* figures that line up: timers, tempo, counts */
.scrub-meta, #scrub-time, .bpm-readout, .st-bpm b, .impact-num, .lp-proof dt, .rep-card-meta time { font-family: var(--nums) !important; font-variant-numeric: tabular-nums; font-size-adjust: none !important; }
.lp-proof dt { font-family: var(--display) !important; font-weight: 400 !important; font-variant-numeric: lining-nums; }

/* titles: Garamond at display weight, a touch of italic for the second line */
h1, h2, .member-title, #explain-title, .chapter-title, .ask-empty-h { font-weight: 400 !important; letter-spacing: -0.01em !important; }
#hero h1 .mr-l2, .mr-promise em, .home-feat-copy h2 em { font-style: italic; }
h3, .rep-card h3, .rep-plan-card h3 { font-weight: 600 !important; letter-spacing: 0 !important; }

/* buttons and labels in Garamond read best a little larger and a little bolder */
.primary, .quiet, .bar-auth, .lp-nav a, .st-seg-panels button, .st-seg-anno button, .studio-tab, .la-reply, .chat-starters button,
.settings-row strong, .ch-new, .ch-item > button, .lp-grade, .lp-tools button, .lp-ai-row button, .hero-cta-alt, .wk-opts button {
  font-family: var(--ui) !important; font-weight: 500 !important; letter-spacing: 0.005em !important;
}

/* navy, sparingly: the account button, the send button, what is chosen, what is in progress */
header.bar .bar-auth, html[data-theme="light"] header.bar .bar-auth {
  background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; border: 1px solid rgba(159, 178, 228, 0.28) !important;
}
header.bar .bar-auth:hover { background: #2a4482 !important; }
.lune-chat .lc-round, .lc-send, .lc-round { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; }
.la-reply.on { background: var(--navy-mid) !important; border-color: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; }
.rp-bar i, #member-streak .po-bar i, .lw-bar i { background: var(--navy-hi) !important; }
body:not(.studio-compact) .studio-seg .studio-tab[aria-selected="true"]::before { background: var(--navy-hi) !important; box-shadow: none !important; }
.st-seg-panels button[aria-pressed="true"] { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; }
.lune-chat .la-bar { text-decoration-color: rgba(159, 178, 228, 0.55) !important; }
.lune-chat .la-bar:hover { text-decoration-color: var(--navy-hi) !important; }
/* the small labels above sections: Garamond italic in soft navy */
html body .about-kicker, html body .home-feat-copy .about-kicker, html body .member-kicker, html body #home .mr-kicker, html body #home-guest .about-kicker,
html body .chapter-label, html body .explain-era, html body #explain-era, html body .auth-kicker, html body .mh-phase {
  font-family: var(--ui) !important; font-style: italic !important; font-weight: 500 !important; font-size: 16px !important;
  letter-spacing: 0 !important; text-transform: none !important; color: var(--navy-hi) !important;
}
/* a hairline of navy under the header, nowhere else */
header.bar { border-bottom: 1px solid rgba(34, 56, 110, 0.55) !important; }

/* light mode: deep navy for the same few things */
html[data-theme="light"] .rp-bar i, html[data-theme="light"] #member-streak .po-bar i { background: var(--navy-mid) !important; }
html[data-theme="light"] body .about-kicker, html[data-theme="light"] body .chapter-label, html[data-theme="light"] body .explain-era,
html[data-theme="light"] body #explain-era, html[data-theme="light"] body .member-kicker, html[data-theme="light"] body .auth-kicker,
html[data-theme="light"] body #home-guest .about-kicker, html[data-theme="light"] body .mh-phase { color: var(--navy-mid) !important; }
html[data-theme="light"] header.bar { border-bottom-color: rgba(22, 36, 74, 0.18) !important; }

/* signed-in home: the main action in white like every other primary, the Ask bar with the crescent */
html body #home-member .member-next .primary, html body #home-member .member-next button.primary {
  background: var(--accent) !important; color: var(--accent-ink) !important; border: 0 !important; box-shadow: none !important;
}
html body .home-ask .lune-orb-sm, html body .home-ask .lune-orb, html body #home-member .home-ask [class*="orb"] {
  width: 18px !important; height: 18px !important; filter: none !important; box-shadow: none !important; border: 0 !important;
  background: var(--navy-hi) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body .home-ask [class*="orb"] * { display: none !important; }
html body #home-member .member-rec-role {
  font-family: var(--ui) !important; font-style: italic !important; font-size: 14px !important; letter-spacing: 0 !important;
  text-transform: none !important; color: var(--navy-hi) !important;
}
html body #home-member .home-ask .lc-round, html body #home-member .home-ask button[type="submit"] { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; box-shadow: none !important; }

/* Repertoire cards: one clear action (Open, in navy), the rest as quiet words */
html body #repertoire .rep-card .rep-card-actions .primary, html body .rep-card .primary {
  background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; border: 1px solid rgba(159, 178, 228, 0.28) !important; box-shadow: none !important;
}
html body .rep-card .rep-card-actions .quiet {
  border: 0 !important; background: transparent !important; color: var(--d-label-2) !important; padding: 0 10px !important; min-height: 36px !important;
}
html body .rep-card .rep-card-actions .quiet:hover { color: var(--d-label) !important; background: var(--d-surface-2) !important; }
html body .rep-card .rep-card-actions select {
  font: 500 15px var(--ui) !important; border-radius: 999px !important; background: var(--d-surface-2) !important; border: 0 !important; color: var(--d-label) !important;
}
html body #home-member .member-next-k, html body #member-streak .wk-k, html body .member-week-k {
  font-family: var(--ui) !important; font-style: italic !important; font-size: 15px !important; letter-spacing: 0 !important;
  text-transform: none !important; color: var(--navy-hi) !important;
}
html[data-theme="light"] body .rep-card .primary { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; }

/* Explain: reading and access as one quiet row, not a second panel competing with the title */
html body #explain-access.access-card { background: none !important; border: 0 !important; padding: 0 !important; margin-top: 18px !important; box-shadow: none !important; }
html body #explain-access .access-card-h { font: italic 500 16px var(--ui) !important; color: var(--navy-hi) !important; margin: 0 0 10px !important; letter-spacing: 0 !important; }
html body #explain-access .access-card-grid { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
html body #explain-access .access-option {
  display: inline-flex !important; align-items: center; min-height: 36px; padding: 0 14px !important; border-radius: 999px !important;
  background: var(--d-surface) !important; border: 1px solid var(--d-sep) !important; width: auto !important;
}
html body #explain-access .access-option strong { font: 500 15px var(--ui) !important; color: var(--d-label) !important; }
html body #explain-access .access-option span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body #explain-access .access-option[aria-pressed="true"] { background: var(--navy-mid) !important; border-color: var(--navy-mid) !important; }
html body #explain-access .access-option[hidden] { display: none !important; }
html[data-theme="light"] body #explain-access .access-card-h { color: var(--navy-mid) !important; }

/* one divider between the hero and the chapters, not two */
html body #explain-chapters .chapter:first-child { border-top: 0 !important; padding-top: 8px !important; }

/* suggestion chips: centred when they fit, scrolling from the left edge when they don't */
html body #home-member .home-ask-chips, html body .home-ask-chips { justify-content: safe center !important; }
@media (max-width: 700px) {
  html body #home-member .home-ask-chips, html body .home-ask-chips {
    justify-content: flex-start !important; flex-wrap: nowrap !important; overflow-x: auto !important;
    margin-inline: -16px !important; padding-inline: 16px !important; scroll-padding-inline: 16px;
  }
}

/* ==========================================================================
   Hero: the product itself, in the first screen
   ========================================================================== */
.hero-demo {
  position: relative; z-index: 2; box-sizing: border-box;
  width: min(560px, calc(100vw - 32px)); margin: 40px auto 0; padding: 22px 24px 20px; text-align: left;
  background: rgba(18, 20, 28, 0.62); border: 1px solid rgba(159, 178, 228, 0.18); border-radius: 22px;
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0; transform: translateY(14px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-demo.is-asking, .hero-demo.is-done { opacity: 1; transform: none; }
.hd2-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.hd2-piece { font: 500 19px var(--display); color: var(--d-label); }
.hd2-piece em { color: var(--d-label-3); font-style: italic; }
.hd2-tag { font: italic 500 15px var(--ui); color: var(--navy-hi); }
.hd2-notes { display: flex; gap: 10px; margin: 0 0 18px; }
.hd2-chord { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07); }
.hd2-chord b { font: 500 16px/1.25 var(--ui); color: var(--d-label); }
.hd2-chord sup { font: 600 11px var(--nums); color: var(--navy-hi); margin-left: 3px; vertical-align: super; font-size-adjust: none; }
.hd2-q {
  margin: 0 0 12px auto; width: fit-content; max-width: 80%; padding: 8px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--navy-mid); color: var(--on-navy, #fff); font: 400 16px/1.4 var(--ui);
  opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}
.hero-demo.is-asking .hd2-q, .hero-demo.is-done .hd2-q { opacity: 1; transform: none; }
.hd2-a { margin: 0 0 14px; min-height: 3.1em; font: 400 17.5px/1.55 var(--ui); color: rgba(245, 245, 247, 0.92); }
.hero-demo.is-answering:not(.is-done) .hd2-a::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: var(--navy-hi); animation: hd2-caret 0.9s steps(1) infinite; }
@keyframes hd2-caret { 50% { opacity: 0; } }
.hd2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hd2-steps li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); font: 400 15px/1.35 var(--ui); color: var(--d-label-2);
  opacity: 0; transform: translateY(6px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.hd2-steps li:nth-child(2) { transition-delay: 0.15s; }
.hero-demo.is-done .hd2-steps li { opacity: 1; transform: none; }
.hd2-steps i { flex: none; font: 600 12.5px var(--ui); font-style: normal; padding: 5px 12px; border-radius: 999px; background: var(--d-label); color: #000; }
/* the older hero card this replaces */
#hero .hd, #hero .mr-tonight { display: none !important; }
@media (max-width: 560px) {
  .hero-demo { padding: 18px 16px 16px; margin-top: 28px; }
  .hd2-notes { gap: 6px; }
  .hd2-chord { padding: 6px 9px; }
  .hd2-a { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-demo, .hd2-q, .hd2-steps li { transition: none !important; opacity: 1 !important; transform: none !important; }
}
html[data-theme="light"] .hero-demo { background: rgba(255, 255, 255, 0.78); border-color: rgba(22, 36, 74, 0.12); box-shadow: 0 30px 80px -40px rgba(22, 36, 74, 0.35); }
html[data-theme="light"] .hd2-chord, html[data-theme="light"] .hd2-steps li { background: rgba(22, 36, 74, 0.04); border-color: rgba(22, 36, 74, 0.08); }
html[data-theme="light"] .hd2-chord b, html[data-theme="light"] .hd2-piece { color: #111; }
html[data-theme="light"] .hd2-a { color: rgba(0, 0, 0, 0.82); }
html[data-theme="light"] .hd2-chord sup, html[data-theme="light"] .hd2-tag { color: var(--navy-mid); }
html[data-theme="light"] .hd2-steps i { background: var(--navy-mid); color: var(--on-navy, #fff); }
/* the product moment, right under the hero */
.demo-moment { padding: 96px 16px 72px; text-align: center; background: var(--g-bg, #000); }
.demo-moment h2 { margin: 6px auto 0; max-width: 18ch; font-size: clamp(32px, 4.2vw, 52px) !important; line-height: 1.08; color: var(--d-label); }
.demo-moment .hero-demo { margin-top: 44px; }
html[data-theme="light"] .demo-moment { background: #fff; }

/* ==========================================================================
   Phone score page: one slim control, nothing stray
   ========================================================================== */
@media (max-width: 900px) {
  body.studio-compact.is-studio header.bar { padding-bottom: 0 !important; }
  body.studio-compact.is-studio header.bar .st-btn { width: 38px !important; height: 38px !important; min-width: 38px !important; }
  body.studio-compact.is-studio header.bar .st-play { width: 40px !important; height: 40px !important; }
  body.studio-compact.is-studio header.bar #studio-piece-quiet { font: 500 19px var(--display) !important; }
  body.studio-compact.is-studio header.bar > #st-seg { flex-wrap: nowrap !important; gap: 8px !important; padding: 2px 14px 10px !important; }
  html body .st-seg-panels { flex: 1 1 auto; padding: 2px !important; background: rgba(118, 118, 128, 0.22) !important; border-radius: 10px !important; }
  html body .st-seg-panels button {
    min-height: 32px !important; border-radius: 8px !important; font: 500 15.5px var(--ui) !important; opacity: 0.75;
  }
  html body .st-seg-panels button[aria-pressed="true"] {
    background: #3a3a3e !important; color: #fff !important; opacity: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
  }
  html[data-theme="light"] body .st-seg-panels button[aria-pressed="true"] { background: #fff !important; color: #000 !important; }
  html body .st-more {
    flex: none; width: 36px; height: 36px; min-height: 36px !important; padding: 0 !important; display: grid; place-items: center;
    border-radius: 50% !important; border: 0 !important; background: rgba(118, 118, 128, 0.22) !important; color: var(--d-label) !important;
  }
  /* letters, fingers and pedal live in More on a phone */
  html body #st-seg .st-seg-anno { display: none !important; }
  body.studio-compact.is-studio .score-tools-head, body.studio-compact.is-studio .piece-head.slim { display: none !important; }
  /* Ask Lune in the dock: the crescent, in navy */
  html body #st-bottom .st-ask { min-height: 38px; padding: 0 16px 0 12px; border-color: rgba(159, 178, 228, 0.28) !important; }
  html body #st-bottom .lune-orb-sm {
    width: 16px !important; height: 16px !important; flex: 0 0 16px; filter: none !important; box-shadow: none !important; border: 0 !important;
    background: var(--navy-hi) !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  html body #st-bottom .lune-orb-sm * { display: none !important; }
}

/* ==========================================================================
   First-run tour: a spotlight on the real control, a quiet card beside it
   ========================================================================== */
.lt-ring {
  position: fixed; z-index: 9000; pointer-events: none; border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62), 0 0 0 1.5px rgba(159, 178, 228, 0.85), 0 0 24px rgba(159, 178, 228, 0.25);
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1), top 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1), height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s;
}
.lt-card {
  position: fixed; z-index: 9001; box-sizing: border-box; padding: 18px 20px 14px; border-radius: 18px;
  background: rgba(22, 24, 32, 0.92); border: 1px solid rgba(159, 178, 228, 0.22); color: var(--d-label);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1), top 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: lt-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes lt-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.lt-count { margin: 0 0 4px; font: italic 500 15px var(--ui); color: var(--navy-hi); }
.lt-title { margin: 0 0 6px; font: 500 24px/1.15 var(--display) !important; letter-spacing: -0.01em; color: var(--d-label); }
.lt-body { margin: 0 0 14px; font: 400 16.5px/1.5 var(--ui); color: rgba(245, 245, 247, 0.82); }
.lt-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lt-skip { background: none; border: 0; padding: 8px 4px; font: 500 15px var(--ui); color: var(--d-label-3); cursor: pointer; }
.lt-skip:hover { color: var(--d-label); }
.lt-next { min-height: 38px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--d-label); color: #000; font: 600 15px var(--ui); cursor: pointer; }
.lt-ring[hidden], .lt-card[hidden] { display: none !important; }
html[data-theme="light"] .lt-card { background: rgba(255, 255, 255, 0.95); border-color: rgba(22, 36, 74, 0.14); color: #111; }
html[data-theme="light"] .lt-title { color: #111; }
html[data-theme="light"] .lt-body { color: rgba(0, 0, 0, 0.75); }
html[data-theme="light"] .lt-count { color: var(--navy-mid); }
html[data-theme="light"] .lt-next { background: var(--navy-mid); color: var(--on-navy, #fff); }
@media (prefers-reduced-motion: reduce) { .lt-ring, .lt-card { transition: none; animation: none; } }

/* the bar panel's Ask box: crescent instead of the glowing ball; navy send button.
   The panel is drawn light and inverted in dark mode, so its colours are set pre-inversion there. */
html body #coach .lune-orb-sm, html body #coach [class*="orb"] {
  width: 18px !important; height: 18px !important; flex: 0 0 18px; filter: none !important; box-shadow: none !important; border: 0 !important;
  background: var(--navy-mid) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body #coach [class*="orb"] * { display: none !important; }
html:not([data-theme="light"]) body #coach .lc-round, html:not([data-theme="light"]) body #coach .lc-send { background: #c3d0f2 !important; color: #000 !important; }
html[data-theme="light"] body #coach .lc-round, html[data-theme="light"] body #coach .lc-send { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; }

/* ==========================================================================
   Header, Apple-simple: open-piece tabs belong to the studio only; a guest on
   the landing sees the wordmark, four links and Sign in.
   ========================================================================== */
html body:not(.is-studio) header.bar #piece-tabs { display: none !important; }
html body.is-home:not(.is-signed-in) header.bar #btn-repertoire,
html body.is-home:not(.is-signed-in) header.bar #btn-share { display: none !important; }
html body.is-home:not(.is-signed-in) header.bar .lp-nav { margin-left: auto; margin-right: 8px; }
header.bar .brand-name, header.bar .fx-brand { letter-spacing: 0.32em !important; font: 500 13px var(--ui) !important; }

/* hero type at Apple scale on large screens */
@media (min-width: 900px) {
  html body #hero h1.mr-h, html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 { font-size: clamp(64px, 6vw, 96px) !important; line-height: 1 !important; }
  html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 { display: block; white-space: nowrap; }
  html body #hero .mr-sub { font-size: clamp(20px, 1.6vw, 24px) !important; max-width: 34ch; margin-inline: auto; color: rgba(245, 245, 247, 0.72) !important; }
}

/* tour: the welcome and the finish, full screen */
.lt-moment {
  position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 50% at 50% 38%, rgba(34, 56, 110, 0.35), rgba(0, 0, 0, 0.88) 70%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.38s ease;
}
.lt-moment.on { opacity: 1; }
.lt-moment-in { max-width: 460px; text-align: center; transform: translateY(10px) scale(0.98); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.lt-moment.on .lt-moment-in { transform: none; }
.lt-moment .lt-moon {
  display: block; width: 46px; height: 46px; margin: 0 auto 22px; background: #f5f5f7;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.45));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lt-moment h2 { margin: 0 0 12px; font: 400 clamp(36px, 6vw, 52px)/1.05 var(--display) !important; color: #f5f5f7; letter-spacing: -0.015em; }
.lt-moment p { margin: 0 auto 28px; max-width: 34ch; font: 400 18.5px/1.55 var(--ui); color: rgba(245, 245, 247, 0.78); }
.lt-moment-nav { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.lt-moment .lt-next { min-height: 46px; padding: 0 26px; font-size: 16.5px; }
.lt-moment .lt-skip { min-height: 46px; padding: 0 20px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: rgba(245, 245, 247, 0.8); }
@media (prefers-reduced-motion: reduce) { .lt-moment, .lt-moment-in { transition: none; } }

/* ==========================================================================
   Lune AI inside the score: a full-height side panel like Claude's, not a box
   floating over the bar panel. Same reading style as the main chat.
   ========================================================================== */
html body aside#ask-lune.ask-lune {
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: auto !important;
  width: min(440px, 100vw) !important; height: 100dvh !important; max-height: none !important;
  border-radius: 0 !important; margin: 0 !important; transform: none !important;
  background: var(--g-bg, #000) !important; border: 0 !important; border-left: 1px solid var(--d-sep) !important;
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.8) !important; z-index: 1200 !important;
  display: flex !important; flex-direction: column !important;
}
html body aside#ask-lune[hidden] { display: none !important; }
html body #ask-lune .ask-head {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px !important;
  border-bottom: 1px solid var(--d-sep) !important; background: transparent !important;
}
html body #ask-lune .ask-id { flex: 1; text-align: center; }
html body #ask-lune .ask-title, html body #ask-lune .ask-title * {
  font: 600 16px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--d-label) !important;
  background: none !important; -webkit-text-fill-color: currentColor !important;
}
html body #ask-lune .ask-where { font: italic 500 14px var(--ui) !important; color: var(--navy-hi) !important; margin: 2px 0 0 !important; }
html body #ask-lune .ask-log { flex: 1 1 auto; overflow-y: auto; padding: 22px 20px 16px !important; }
html body #ask-lune .ask-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 100%; }
html body #ask-lune .ask-empty-orb {
  width: 30px !important; height: 30px !important; min-height: 0 !important; background: var(--d-label) !important; box-shadow: none !important; filter: none !important; border: 0 !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html body #ask-lune .ask-empty-orb * { display: none !important; }
html body #ask-lune .ask-empty-h { font: 400 30px/1.15 var(--display) !important; color: var(--d-label) !important; text-align: center; margin: 0 !important; }
/* messages */
html body #ask-lune .ask-row { margin: 0 0 22px !important; }
html body #ask-lune .ask-row-you { display: flex; justify-content: flex-end; }
html body #ask-lune .ask-from-you .ask-msg, html body #ask-lune .ask-msg.ask-from-you {
  background: var(--d-surface-2) !important; color: var(--d-label) !important; border: 0 !important; border-radius: 18px !important;
  padding: 9px 14px !important; max-width: 82%; font: 400 16px/1.45 var(--ui) !important;
}
html body #ask-lune .ask-msg:not(.ask-from-you), html body #ask-lune .ask-from-lune .ask-msg, html body #ask-lune .la2, html body #ask-lune .rich {
  background: transparent !important; border: 0 !important; padding: 0 !important; color: var(--d-label) !important;
  font: 400 16.5px/1.62 var(--ui) !important; letter-spacing: 0 !important;
}
html body #ask-lune .rich p { margin: 0 0 0.8em !important; }
html body #ask-lune .rich ol, html body #ask-lune .rich ul { padding-left: 1.3em !important; margin: 0.3em 0 0.8em !important; }
html body #ask-lune .rich li { margin: 0 0 0.5em !important; }
/* suggestions and composer */
html body #ask-lune .ask-chips { flex: none; display: flex !important; flex-wrap: wrap !important; gap: 8px !important; padding: 0 16px 10px !important; -webkit-mask-image: none !important; mask-image: none !important; }
html body #ask-lune .ask-chips button {
  min-height: 34px !important; padding: 0 14px !important; border-radius: 999px !important; border: 1px solid var(--d-sep) !important;
  background: var(--d-surface) !important; color: var(--d-label) !important; font: 500 15px var(--ui) !important;
}
html body #ask-lune .ask-chips button:hover { background: var(--d-surface-2) !important; }
html body #ask-lune .ask-form { flex: none; padding: 0 14px 16px !important; background: transparent !important; }
html body #ask-lune .lc-composer {
  background: var(--d-surface) !important; border: 1px solid var(--d-sep) !important; border-radius: 24px !important;
  padding: 5px 5px 5px 16px !important; min-height: 50px; align-items: center !important; box-shadow: none !important;
}
html body #ask-lune .lc-composer textarea { font: 400 16px/1.45 var(--ui) !important; color: var(--d-label) !important; background: transparent !important; }
html body #ask-lune .lc-round { width: 38px !important; height: 38px !important; background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; box-shadow: none !important; }
/* when Lune AI is open, the bar panel beneath it steps aside */
body:has(#ask-lune:not([hidden])) #coach { visibility: hidden; }
@media (max-width: 700px) {
  html body aside#ask-lune.ask-lune { width: 100vw !important; border-left: 0 !important; }
}
html[data-theme="light"] body aside#ask-lune.ask-lune { background: #fff !important; }

/* Lune AI: actions after adding a score look like the quick replies */
.la-act {
  min-height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--d-sep); background: var(--d-surface); color: var(--d-label); font: 500 15px var(--ui);
}
.la-act:hover { background: var(--d-surface-2); }
.la-act:disabled { opacity: 0.4; cursor: default; }
.la-act.on { opacity: 1 !important; background: var(--navy-mid); border-color: var(--navy-mid); color: var(--on-navy, #fff); }
.la-actions:has(.on) .la-act:not(.on) { display: none; }
html body .lune-chat .lc-attach { width: 36px; height: 36px; border-radius: 50%; color: var(--d-label-2); flex: none; margin-left: -8px; }
html body .lune-chat .lc-attach:hover { color: var(--d-label); background: var(--d-surface-2); }

/* header: the search field holds its own arrow; Repertoire is the size of its neighbours */
html body header.bar .top-search { position: relative !important; display: flex !important; align-items: center !important; }
html body header.bar .top-search input { height: 38px !important; padding: 0 40px 0 16px !important; border-radius: 999px !important; font: 400 15.5px var(--ui) !important; }
html body header.bar .top-search .search-go { position: absolute !important; right: 4px !important; top: 50% !important; transform: translateY(-50%) !important; width: 30px !important; height: 30px !important; min-width: 30px !important; }
html body header.bar #btn-repertoire { height: 38px !important; min-height: 38px !important; padding: 0 14px !important; font: 500 15px var(--ui) !important; border-radius: 999px !important; }

/* ==========================================================================
   Signed-in home: Tonight's piece with its composer, suggestions as portraits
   ========================================================================== */
html body #home-member .member-next {
  position: relative; overflow: hidden; min-height: 240px; padding: 30px 30px 26px !important;
  background: linear-gradient(120deg, #0e1220 0%, #0b0b0e 55%) !important; border: 1px solid rgba(159, 178, 228, 0.16) !important;
}
html body #home-member .member-next-face {
  position: absolute; inset: 0 0 0 auto; width: 48%; background-size: cover; background-position: center 20%;
  filter: grayscale(1) contrast(1.05) brightness(0.85);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%); mask-image: linear-gradient(to right, transparent 0%, #000 55%);
  opacity: 0.85; pointer-events: none;
}
html body #home-member .member-next > :not(.member-next-face) { position: relative; z-index: 1; max-width: 58%; }
html body #home-member #member-next-h { font: 400 clamp(34px, 4vw, 48px)/1.04 var(--display) !important; margin: 4px 0 4px !important; color: #f5f5f7 !important; }
html body #home-member .member-next-by { margin: 0 0 12px; font: italic 400 18px var(--ui); color: rgba(245, 245, 247, 0.7); }
html body #home-member .member-next-why, html body #home-member .member-next-detail { font: 400 16px/1.5 var(--ui) !important; color: rgba(245, 245, 247, 0.72) !important; }
html body #home-member .member-next .primary { min-height: 44px !important; padding: 0 24px !important; font-size: 16px !important; margin-top: 8px; }

/* suggestions: portrait cards, like album covers */
html body #home-member .member-recs-grid, html body #home-member .member-rec-grid, html body #home-member #member-recs > div:has(.member-rec) {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important;
}
html body #home-member .member-rec {
  position: relative; overflow: hidden; display: flex !important; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  min-height: 210px; padding: 16px 16px 14px !important; text-align: left;
  background: var(--g-card, #121216) !important; border: 1px solid rgba(255, 255, 255, 0.07) !important; border-radius: 18px !important;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease !important;
}
html body #home-member .member-rec:hover { transform: translateY(-3px) !important; border-color: rgba(159, 178, 228, 0.35) !important; background: var(--g-card, #121216) !important; }
html body #home-member .member-rec-face {
  position: absolute; inset: 0; background-size: cover; background-position: center 22%;
  filter: grayscale(1) contrast(1.05) brightness(0.8); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
html body #home-member .member-rec:hover .member-rec-face { transform: scale(1.04); }
html body #home-member .member-rec.has-face::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.05) 100%);
}
html body #home-member .member-rec > :not(.member-rec-face) { position: relative; z-index: 1; }
html body #home-member .member-rec-title { font: 500 20px/1.15 var(--display) !important; color: #fff !important; }
html body #home-member .member-rec-by { font: italic 400 15px var(--ui) !important; color: rgba(255, 255, 255, 0.72) !important; margin-top: 3px; }
html body #home-member .member-rec-role { margin-bottom: auto; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: rgba(22, 36, 74, 0.75); color: #dfe6fb !important; font-style: italic; }
@media (max-width: 700px) {
  html body #home-member .member-recs-grid, html body #home-member .member-rec-grid, html body #home-member #member-recs > div:has(.member-rec) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important;
  }
  html body #home-member .member-rec { min-height: 180px; }
  html body #home-member .member-next-face { width: 60%; opacity: 0.55; }
  html body #home-member .member-next > :not(.member-next-face) { max-width: 78%; }
}
html body #home-member .member-rec { min-height: 210px !important; }
html body #home-member .member-rec .member-rec-face {
  position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important; height: 100% !important; display: block !important; margin: 0 !important; z-index: 0 !important;
}
html body #home-member .member-rec.has-face::after { z-index: 0 !important; width: 100%; height: 100%; top: 0; left: 0; }
@media (max-width: 700px) { html body #home-member .member-rec { min-height: 180px !important; } }

/* ==========================================================================
   Repertoire: a library, like Apple Music's — portrait, title, where it stands
   ========================================================================== */
html body .rep-stats { display: flex; gap: 0; margin: 22px 0 0; border-top: 1px solid var(--d-sep); border-bottom: 1px solid var(--d-sep); }
html body .rep-stats div { flex: 1; padding: 14px 4px; }
html body .rep-stats div + div { border-left: 1px solid var(--d-sep); padding-left: 18px; }
html body .rep-stats dt { font: 400 34px/1 var(--display); color: var(--d-label); font-variant-numeric: lining-nums; }
html body .rep-stats dd { margin: 4px 0 0; font: italic 400 15px var(--ui); color: var(--navy-hi); }
html body #repertoire .rep-card { display: grid !important; grid-template-columns: 76px 1fr; column-gap: 18px; align-items: start; }
html body #repertoire .rep-card .rep-card-actions { grid-column: 1 / -1; }
html body .rep-face {
  width: 76px; height: 76px; border-radius: 14px; background-size: cover; background-position: center 22%;
  filter: grayscale(1) contrast(1.05); border: 1px solid rgba(255, 255, 255, 0.08);
}
html body .rep-face-letter { display: grid; place-items: center; filter: none; background: linear-gradient(140deg, #1d2a50, #0d0f18); font: italic 400 38px var(--display); color: #dfe6fb; }
html body .rep-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
html body .rep-chip { padding: 3px 10px; border-radius: 999px; font: 500 13.5px var(--ui); background: var(--d-surface-2); color: var(--d-label-2); }
html body .rep-chip-due { background: var(--navy-mid); color: var(--on-navy, #fff); }
html body .rep-chip-ok { color: #cfe8d6; background: rgba(48, 120, 80, 0.22); }
html body .rep-sum { border-left: 2px solid var(--navy-mid) !important; background: transparent !important; padding: 2px 0 2px 12px !important; margin-top: 10px !important; font: 400 15.5px/1.5 var(--ui); color: var(--d-label-2); }
html body .rep-sum-k { display: block; font: italic 500 14px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--navy-hi) !important; }
@media (max-width: 560px) {
  html body #repertoire .rep-card { grid-template-columns: 56px 1fr; column-gap: 12px; }
  html body .rep-face { width: 56px; height: 56px; border-radius: 12px; }
  html body .rep-stats dt { font-size: 28px; }
}

/* ==========================================================================
   Session report: one quiet page after practice
   ========================================================================== */
.lr-sheet {
  position: fixed; inset: 0; z-index: 9200; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 0.38s ease;
}
.lr-sheet.on { opacity: 1; }
.lr-card {
  position: relative; overflow: hidden; width: min(520px, 100%); box-sizing: border-box; padding: 34px 30px 24px; border-radius: 26px;
  background: linear-gradient(160deg, #10162a 0%, #0a0a0d 60%); border: 1px solid rgba(159, 178, 228, 0.18);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); color: #f5f5f7;
  transform: translateY(14px) scale(0.98); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.lr-sheet.on .lr-card { transform: none; }
.lr-face {
  position: absolute; top: 0; right: 0; width: 46%; height: 230px; background-size: cover; background-position: center 20%;
  filter: grayscale(1) brightness(0.8); opacity: 0.7;
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent), linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to left, #000 20%, transparent); pointer-events: none;
}
.lr-card > :not(.lr-face) { position: relative; }
.lr-k { margin: 0 0 6px; font: italic 500 16px var(--ui); color: var(--navy-hi); }
.lr-card h2 { margin: 0; max-width: 70%; font: 400 40px/1.04 var(--display) !important; color: #f5f5f7; }
.lr-by { margin: 6px 0 0; font: italic 400 18px var(--ui); color: rgba(245, 245, 247, 0.7); }
.lr-stats { display: flex; margin: 26px 0 6px; border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.lr-stats div { flex: 1; padding: 14px 0; }
.lr-stats div + div { border-left: 1px solid rgba(255, 255, 255, 0.1); padding-left: 16px; }
.lr-stats dt { font: 400 36px/1 var(--display); font-variant-numeric: lining-nums; }
.lr-stats dd { margin: 4px 0 0; font: 400 14.5px var(--ui); color: rgba(245, 245, 247, 0.6); }
.lr-h { margin: 20px 0 8px; font: italic 500 15px var(--ui); color: var(--navy-hi); }
.lr-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lr-bars li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font: 400 15px var(--ui); }
.lr-bars li b { font-weight: 600; }
.lr-bars li span { color: rgba(245, 245, 247, 0.7); }
.lr-bars li.g-again span, .lr-bars li.g-hard span { color: #f0b7a8; }
.lr-bars li.g-good span, .lr-bars li.g-strong span, .lr-bars li.g-easy span { color: #b9e2c6; }
.lr-text { margin: 0; font: 400 17.5px/1.55 var(--ui); color: rgba(245, 245, 247, 0.9); }
.lr-soon { margin: 0; font: 400 16px/1.5 var(--ui); color: rgba(245, 245, 247, 0.78); }
.lr-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }
.lr-rep { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #f5f5f7; font: 500 15.5px var(--ui); cursor: pointer; }
.lr-done { min-height: 44px; padding: 0 26px; border-radius: 999px; border: 0; background: #f5f5f7; color: #000; font: 600 15.5px var(--ui); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .lr-sheet, .lr-card { transition: none; } }
/* the library comes first: pieces, then the week and tasks */
html body #repertoire .rep-wrap, html body #repertoire > div { display: flex; flex-direction: column; }
html body #repertoire .rep-hero { order: 0; }
html body #repertoire .rep-section:has(#rep-list) { order: 1; }
html body #repertoire .rep-section.rep-week { order: 2; }
html body #repertoire .rep-section:has(#rep-today) { order: 3; }
html body #repertoire #rep-add-section { order: 4; }
html body #repertoire .rep-foot { order: 9; }

/* the search arrow: one centred arrow, drawn on the button itself */
html body header.bar .top-search .search-go::before, html body header.bar .top-search .search-go::after { display: none !important; content: none !important; }
html body header.bar .top-search .search-go {
  display: block !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; font-size: 0 !important; color: transparent !important;
  background: rgba(255, 255, 255, 0.08) center / 15px 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='%23f5f5f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
html body header.bar .top-search .search-go:hover { background-color: rgba(255, 255, 255, 0.16) !important; }
html[data-theme="light"] body header.bar .top-search .search-go {
  background: rgba(0, 0, 0, 0.06) center / 15px 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* ==========================================================================
   Lune AI's first screen, as Claude and ChatGPT do it: the greeting and the
   message box together in the middle, suggestions just under the box.
   ========================================================================== */
html body .lune-chat.is-empty .chat-main { justify-content: center; }
html body .lune-chat.is-empty .chat-head { position: absolute; top: 0; left: 0; right: 0; }
html body .lune-chat.is-empty .chat-log { flex: 0 0 auto !important; overflow: visible !important; padding: 0 20px 22px !important; }
html body .lune-chat.is-empty .ask-empty { margin: 0 !important; }
html body .lune-chat.is-empty .chat-form { order: 3; }
html body .lune-chat.is-empty .chat-starters { order: 4; padding-top: 14px !important; }
html body .lune-chat.is-empty .chat-fine { order: 5; position: absolute; bottom: 8px; left: 0; right: 0; }
html body .lune-chat.is-empty .lc-composer { min-height: 58px; }
html body .lune-chat.is-empty .ask-empty-h { font-size: clamp(32px, 3.6vw, 42px) !important; }
/* message actions under an answer: the small grey icons Claude and ChatGPT use */
html body .lune-chat .ask-actions { display: flex; gap: 2px; margin-left: -6px !important; }
html body .lune-chat .lc-mini { color: var(--d-label-3) !important; }
html body .lune-chat .lc-mini:hover { color: var(--d-label) !important; }
/* the user's message: a soft grey bubble, right-aligned, generous radius */
html body .lune-chat .chat-from-you .chat-bubble { border-radius: 22px !important; padding: 10px 18px !important; }
/* the header: just the title, centred, no rule */
html body .lune-chat .chat-head { border-bottom: 0 !important; }
html body .lune-chat #chat-sub:empty { display: none; }
html body .lune-chat.is-empty .chat-log { margin-top: 0 !important; margin-bottom: 0 !important; }
html body .lune-chat.is-empty .chat-starters { margin-bottom: 48px !important; }

/* the landing's first screen stays the promise: no Continue box above the headline */
html body #hero #home-continue { display: none !important; }
/* Settings: section labels in the same italic navy as the rest of Lune */
html body .settings-dialog .settings-sub, html body .settings-dialog h4 {
  font: italic 500 16px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--navy-hi) !important; margin: 22px 0 8px 4px !important;
}
html body .set-ai-note { color: var(--d-label-2); font-size: 15px; }

/* Settings section labels (Lune AI, Practice, Look, App): italic navy, no tracking */
html body #settings-dialog h3[id^="set-h-"], html body .settings-dialog h3[id^="set-h-"] {
  font: italic 500 16px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--navy-hi) !important; margin: 24px 0 8px 4px !important;
}
html[data-theme="light"] body #settings-dialog h3[id^="set-h-"] { color: var(--navy-mid) !important; }

/* switches: on is clearly on (navy track), as on an iPhone */
html body .lp-switch input:checked, html body .lp-switch input[type="checkbox"]:checked {
  background: var(--navy-mid) !important; border-color: var(--navy-mid) !important;
}
html[data-theme="light"] body .lp-switch input:checked { background: var(--navy-mid) !important; }

/* ==========================================================================
   Signed-in home, the way Claude's opens: a quiet black page, the crescent
   beside a large greeting, one generous box to ask Lune, then tonight's
   piece and suggestions. No starfield, no glow, no extra lines.
   ========================================================================== */
html body #home-member > canvas.lune-stars, html body #home-member .mh-moon,
html body #home-member #member-today, html body #home-member #mh-phase,
html body #home-member .member-quick, html body #home-member .member-ai,
html body #home-member #member-feedback { display: none !important; }
html body #home-member { background: var(--g-bg, #000) !important; }
html body #home-member .member-hero { padding-top: clamp(64px, 14vh, 140px) !important; max-width: 720px; margin: 0 auto; }
html body #home-member #member-greeting {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 30px !important;
  font: 400 clamp(40px, 5vw, 58px)/1.05 var(--display) !important; letter-spacing: -0.015em !important; color: #f5f5f7 !important;
}
html body #home-member #member-greeting::before {
  content: ""; flex: none; width: 0.62em; height: 0.62em; background: var(--navy-hi);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* the ask box: two rows, words above, tools below, like Claude's */
html body #home-member form#home-ask.home-ask {
  display: grid !important; grid-template-columns: 1fr auto auto; align-items: end; gap: 6px;
  min-height: 116px; padding: 18px 12px 12px 20px !important; border-radius: 24px !important;
  background: var(--g-card, #141416) !important; border: 1px solid rgba(255, 255, 255, 0.09) !important; box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.9) !important;
}
html body #home-member form#home-ask:focus-within { border-color: rgba(159, 178, 228, 0.35) !important; }
html body #home-member form#home-ask .home-ask-orb { display: none !important; }
html body #home-member form#home-ask input#home-ask-input {
  grid-column: 1 / -1; align-self: start; width: 100%; background: transparent !important; border: 0 !important; outline: none;
  font: 400 18px/1.4 var(--ui) !important; color: #f5f5f7 !important; padding: 0 !important; min-height: 32px;
}
html body #home-member form#home-ask input#home-ask-input::placeholder { color: rgba(245, 245, 247, 0.42) !important; }
html body #home-member form#home-ask .lc-tool { grid-column: 2; width: 38px; height: 38px; }
html body #home-member form#home-ask .lc-round { grid-column: 3; width: 38px !important; height: 38px !important; background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; box-shadow: none !important; }
html body #home-member .home-ask-chips { margin: 14px 0 0 !important; justify-content: safe center !important; }
html body #home-member .home-ask-chips button {
  min-height: 36px !important; padding: 0 16px !important; border-radius: 999px !important; background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important; color: rgba(245, 245, 247, 0.8) !important; font: 500 15px var(--ui) !important;
}
html body #home-member .home-ask-chips button:hover { background: var(--g-card, #141416) !important; color: #fff !important; }
/* rhythm below the box */
html body #home-member #member-next { margin-top: 64px !important; }
html body #home-member #member-streak { margin-top: 14px !important; }
html body #home-member #member-recs { margin-top: 72px !important; max-width: 720px; margin-left: auto !important; margin-right: auto !important; }
html body #home-member #member-recs-h { font: 400 30px var(--display) !important; letter-spacing: -0.01em !important; }
@media (max-width: 700px) {
  html body #home-member .member-hero { padding-top: 48px !important; }
  html body #home-member form#home-ask.home-ask { min-height: 104px; }
}
html[data-theme="light"] body #home-member { background: #fff !important; }
html[data-theme="light"] body #home-member #member-greeting { color: #111 !important; }
html[data-theme="light"] body #home-member #member-greeting::before { background: var(--navy-mid); }
html[data-theme="light"] body #home-member form#home-ask.home-ask { background: #f6f6f8 !important; border-color: rgba(0, 0, 0, 0.08) !important; box-shadow: none !important; }
html[data-theme="light"] body #home-member form#home-ask input#home-ask-input { color: #111 !important; }
/* phones: search opens from its icon; the field doesn't sit in the header the rest of the time */
@media (max-width: 700px) {
  html body:not(.phone-search-open):not(.studio-search-open) header.bar .top-search { display: none !important; }
  html body header.bar { flex-wrap: nowrap !important; }
}

/* ==========================================================================
   The bar panel, calm: how to practise it, how it went, the notes, ask
   ========================================================================== */
html body #help-body { display: flex !important; flex-direction: column !important; gap: 0; }
html body #help-body > section.coach-bar-block, html body #help-body > section.lp-coach { display: contents !important; }
html body #help-body h4:has(+ .coach-advice) { order: 1; margin-top: 4px !important; }
html body #help-body .coach-advice { order: 2; }
html body #help-body .coach-advice p { font: 400 16.5px/1.55 var(--ui) !important; }
html body #help-body .lp-rate { order: 3; margin-top: 18px !important; }
html body #help-body h4:not(:has(+ .coach-advice)), html body #help-body .hand-label, html body #help-body .notes { order: 4; }
html body #help-body h4:not(:has(+ .coach-advice)) { margin-top: 22px !important; }
html body #help-body .notes { gap: 6px !important; margin-bottom: 6px !important; }
html body #help-body .chip.letter { font-size: 13px !important; padding: 5px 8px !important; line-height: 1.25 !important; border-radius: 9px !important; }
html body #help-body .lp-askbar { order: 6; margin-top: 22px !important; }
html body #help-body .lp-note-form { order: 7; margin-top: 10px !important; }
html body #help-body .lp-tools { order: 8; margin-top: 12px !important; display: flex !important; gap: 4px !important; flex-wrap: wrap; }
html body #help-body .lp-tools button {
  flex-direction: row !important; min-height: 32px !important; height: auto !important; padding: 0 12px !important; gap: 6px !important;
  font: 500 14px var(--ui) !important; background: transparent !important; border: 1px solid rgba(0, 0, 0, 0.14) !important;
}
html body #help-body .lp-tools button svg { width: 14px !important; height: 14px !important; }
html body #help-body .lp-ai-row, html body #help-body .lp-asked, html body #help-body .coach-more-btn { display: none !important; }
html body #help-body .lp-h { font: 600 17px var(--ui) !important; letter-spacing: 0 !important; }

/* home suggestions: clean text cards, no portrait on every piece (only tonight's piece keeps its composer) */
html body #home-member .member-rec .member-rec-face, html body #home-member .member-rec.has-face::after { display: none !important; }
html body #home-member .member-rec { min-height: 0 !important; padding: 18px 18px 16px !important; justify-content: flex-start !important; background: var(--g-card, #121216) !important; }
html body #home-member .member-rec-title { font: 500 19px/1.2 var(--display) !important; color: #f5f5f7 !important; }
html body #home-member .member-rec-by { color: rgba(245, 245, 247, 0.6) !important; }
html body #home-member .member-rec-role { margin-bottom: 8px !important; }
html[data-theme="light"] body #home-member .member-rec { background: #f6f6f8 !important; }
html[data-theme="light"] body #home-member .member-rec-title { color: #111 !important; }
html[data-theme="light"] body #home-member .member-rec-by { color: rgba(0, 0, 0, 0.6) !important; }

/* ==========================================================================
   Voice mode, as Claude does it: the whole screen, one living shape,
   a caption, two round buttons
   ========================================================================== */
html body dialog#lune-talk.lune-talk[open] {
  position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; max-width: none !important; max-height: none !important;
  margin: 0 !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important;
  background: radial-gradient(90% 60% at 50% 42%, #0f1730 0%, #050508 62%, #000 100%) !important; box-shadow: none !important;
  display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
}
html body #lune-talk .lt-top { position: absolute; top: 22px; left: 0; right: 0; text-align: center; }
html body #lune-talk .lt-title { font: 500 17px var(--ui) !important; color: rgba(245, 245, 247, 0.7) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }
html body #lune-talk .lt-orb {
  --lv: 0; position: relative; width: min(280px, 62vw) !important; height: min(280px, 62vw) !important;
  border: 0 !important; background: none !important; box-shadow: none !important; display: grid; place-items: center;
}
html body #lune-talk .lt-orb canvas { display: none !important; }
html body #lune-talk .lt-moon {
  position: relative; z-index: 2; width: 34%; height: 34%; background: #f5f5f7;
  filter: drop-shadow(0 0 28px rgba(200, 214, 255, 0.55));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(calc(1 + var(--lv) * 0.12)); transition: transform 0.12s ease-out;
}
html body #lune-talk .lt-ring {
  position: absolute; inset: 0; margin: auto; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(159, 178, 228, 0.28); background: radial-gradient(circle, rgba(60, 90, 170, 0.18), transparent 70%);
  transform: scale(calc(var(--s) + var(--lv) * 0.25)); transition: transform 0.14s ease-out; animation: lt-breathe 5s ease-in-out infinite;
}
html body #lune-talk .lt-ring.r1 { --s: 0.55; width: 100%; height: 100%; }
html body #lune-talk .lt-ring.r2 { --s: 0.78; width: 100%; height: 100%; animation-delay: -1.6s; opacity: 0.7; }
html body #lune-talk .lt-ring.r3 { --s: 1; width: 100%; height: 100%; animation-delay: -3.2s; opacity: 0.45; }
@keyframes lt-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
html body #lune-talk .lt-orb[data-mode="listening"] .lt-ring { border-color: rgba(200, 214, 255, 0.5); animation-duration: 2.2s; }
html body #lune-talk .lt-orb[data-mode="thinking"] .lt-ring { animation: lt-think 1.4s ease-in-out infinite; }
html body #lune-talk .lt-orb[data-mode="thinking"] .lt-ring.r2 { animation-delay: -0.45s; }
html body #lune-talk .lt-orb[data-mode="thinking"] .lt-ring.r3 { animation-delay: -0.9s; }
@keyframes lt-think { 0%, 100% { opacity: 0.25; transform: scale(calc(var(--s) * 0.96)); } 50% { opacity: 0.85; transform: scale(calc(var(--s) * 1.04)); } }
html body #lune-talk .lt-orb[data-mode="speaking"] .lt-ring { border-color: rgba(220, 230, 255, 0.6); animation-duration: 1.6s; }
html body #lune-talk .lt-state { margin: 34px 0 0 !important; font: italic 400 20px var(--ui) !important; color: var(--navy-hi) !important; text-align: center; max-width: 30ch; }
html body #lune-talk .lt-bar { display: none !important; }
html body #lune-talk .lt-caption { margin: 14px auto 0 !important; max-width: 34ch; min-height: 3em; text-align: center; font: 400 21px/1.45 var(--ui) !important; color: #f5f5f7 !important; }
html body #lune-talk .lt-actions { position: absolute; bottom: max(36px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 28px; }
html body #lune-talk .lt-round {
  width: 64px !important; height: 64px !important; border-radius: 50% !important; border: 0 !important; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1) !important; color: #f5f5f7 !important; box-shadow: none !important;
}
html body #lune-talk .lt-round svg { width: 24px !important; height: 24px !important; }
html body #lune-talk .lt-round.off { background: rgba(255, 255, 255, 0.06) !important; color: rgba(245, 245, 247, 0.55) !important; }
html body #lune-talk .lt-round.lt-end { background: #f5f5f7 !important; color: #000 !important; }
@media (prefers-reduced-motion: reduce) { html body #lune-talk .lt-ring, html body #lune-talk .lt-moon { animation: none !important; transition: none !important; } }
html body #lune-talk .lt-caption { flex: 0 0 auto !important; height: auto !important; min-height: 3em !important; }
html body #lune-talk .lt-orb { margin-top: 0 !important; }

/* Lune AI in the score, like Claude: suggestions only on an empty chat; + beside the words */
html body #ask-lune:has(#ask-log .ask-row) #ask-chips { display: none !important; }
html body #ask-lune .lc-attach { width: 36px; height: 36px; border-radius: 50%; color: var(--d-label-2); flex: none; margin-left: -8px; }
html body #ask-lune .lc-attach:hover { color: var(--d-label); background: var(--d-surface-2); }
/* empty: the crescent, the question and the box together in the middle */
html body #ask-lune:not(:has(#ask-log .ask-row)) .ask-log { flex: 0 0 auto !important; margin-top: auto !important; padding-bottom: 18px !important; }
html body #ask-lune:not(:has(#ask-log .ask-row)) .ask-form { order: 3; }
html body #ask-lune:not(:has(#ask-log .ask-row)) #ask-chips { order: 4; margin-bottom: auto !important; padding-top: 12px !important; justify-content: center; }

/* ==========================================================================
   Practise with Lune: a mini-player at the bottom of the score
   ========================================================================== */
.ls-panel {
  position: fixed; z-index: 1300; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px)); box-sizing: border-box; padding: 16px 20px 18px; border-radius: 22px;
  background: rgba(18, 20, 30, 0.86); border: 1px solid rgba(159, 178, 228, 0.22); color: #f5f5f7;
  -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85); animation: ls-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ls-panel[hidden] { display: none !important; }
@keyframes ls-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ls-head { display: flex; align-items: center; gap: 10px; }
.ls-moon {
  width: 16px; height: 16px; background: var(--navy-hi); flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ls-title { font: italic 500 15px var(--ui); color: var(--navy-hi); }
.ls-steps { display: inline-flex; gap: 5px; margin-left: auto; }
.ls-steps i { width: 18px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.ls-steps i.done { background: var(--navy-hi); }
.ls-steps i.on { background: #f5f5f7; }
.ls-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); color: #f5f5f7; font: 400 20px/1 var(--ui); cursor: pointer; margin-left: 6px; }
.ls-bar { margin: 10px 0 4px; font: 400 30px/1.1 var(--display); }
.ls-say { margin: 0 0 14px; font: 400 17px/1.5 var(--ui); color: rgba(245, 245, 247, 0.86); }
.ls-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ls-main { min-height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: #f5f5f7; color: #000; font: 600 15.5px var(--ui); cursor: pointer; }
.ls-quiet { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #f5f5f7; font: 500 15px var(--ui); cursor: pointer; }
.ls-turn { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ls-clock {
  --p: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--navy-hi) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.1) 0); -webkit-mask: radial-gradient(circle, transparent 55%, #000 56%); position: relative;
}
.ls-clock b { position: absolute; font: 500 16px var(--nums); color: #f5f5f7; -webkit-mask: none; }
.ls-grades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ls-grades button { min-height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: #f5f5f7; font: 500 15px var(--ui); cursor: pointer; }
.ls-grades button:hover { background: rgba(255, 255, 255, 0.1); }
.ls-grades button.on { background: var(--navy-mid); border-color: var(--navy-mid); }
body.ls-on #companion-bar, body.ls-on #st-bottom { visibility: hidden; }
/* the entry button above the score: navy, the one way to start */
html body #btn-session.ls-start { background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; border: 0 !important; border-radius: 999px !important; }
html body #btn-session svg { width: 14px !important; height: 14px !important; }
@media (max-width: 560px) { .ls-panel { bottom: 12px; padding: 14px 16px 16px; } .ls-bar { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .ls-panel { animation: none; } }
html body .score-tools #btn-session, html body #btn-session.lp-tool.ls-start {
  background: var(--navy-mid) !important; color: var(--on-navy, #fff) !important; border: 0 !important; border-radius: 999px !important; padding: 0 14px !important; min-height: 34px !important;
}
/* during a session the session asks how it went; the bar panel doesn't ask twice */
body.ls-on #help-body .lp-rate { display: none !important; }
.ls-clock { background: none !important; -webkit-mask: none !important; mask: none !important; }
.ls-clock::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--navy-hi) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.1) 0);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%); mask: radial-gradient(circle, transparent 58%, #000 59%);
}
.ls-clock b { position: relative; z-index: 1; }

/* ---------- signed-in: no blue haze; Practise with Lune is the main action ---------- */
html body.is-signed-in main#home#home.home, html body.is-repertoire main#home#home.home, html body[data-mode="repertoire"] main#home#home.home { background: var(--g-bg, #000) !important; background-image: none !important; }
html[data-theme="light"] body main#home#home.home { background: #fff !important; background-image: none !important; }
html body #home-member .member-next .ls-home {
  display: inline-flex !important; align-items: center; gap: 8px;
}
html body #home-member .member-next-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* the Next card uses its full width when there is no portrait beside it */
html body #home-member .member-next:not(:has(img)) > * { max-width: 34em !important; }
html body #home-member .member-next h2 { margin-bottom: 10px !important; text-wrap: balance; }
html body #home-member .member-next .member-next-why { margin-bottom: 22px !important; line-height: 1.55; }

/* ---------- landing: free while in pilot, and the way to partners ---------- */
html body .lp-pilot { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; font-size: 15px; color: rgba(245, 245, 247, 0.72); background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(10px); }
html body .lp-pilot i { width: 7px; height: 7px; border-radius: 50%; background: var(--navy-hi); box-shadow: 0 0 0 4px rgba(159, 178, 228, 0.2); }
html body .lp-pilot a { color: #f5f5f7; text-decoration: none; border-bottom: 1px solid var(--navy-hi); }
html body .lp-partner-line { margin-top: 28px !important; font-size: 17px; color: rgba(245, 245, 247, 0.6); }
html body .lp-partner-line a { color: inherit; border-bottom: 1px solid var(--navy-hi); text-decoration: none; }
html[data-theme="light"] body .lp-pilot { color: rgba(0, 0, 0, 0.7); background: rgba(255, 255, 255, 0.6); border-color: rgba(0, 0, 0, 0.12); }
html[data-theme="light"] body .lp-pilot a { color: #111; border-color: var(--navy-mid); }
html[data-theme="light"] body .lp-partner-line { color: rgba(0, 0, 0, 0.6); }
@media (max-width: 480px) { html body .lp-pilot { font-size: 14px; } }

/* ---------- QC: hero headline centred on its own text; notes fade in instead of colliding with the buttons ---------- */
html body #hero-h.mr-h { max-width: none !important; width: auto !important; margin-left: auto !important; margin-right: auto !important; }
@media (max-width: 760px) { html body #hero-h.mr-h .mr-l1, html body #hero-h.mr-h .mr-l2 { white-space: normal !important; } }
html body #hero .mr-fall { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 70%); mask-image: linear-gradient(to bottom, transparent 0, #000 70%); }
html body #hero .hero-cta { margin-bottom: 8px; }
/* QC: the headline is not held back by three wrapper fades on top of its own reveal; only the moon and the words animate */
html body.is-home:not(.is-signed-in) main#home, html body #home-guest, html body #hero .mr-inner, html body #hero h1.mr-h { animation: none !important; }
/* QC (phone): the live demo's controls meet the 36pt touch minimum and read at 14px; carousel dots get a larger hit area without growing */
@media (max-width: 600px) {
  html body #home-guest .fx-seg button, html body #home-guest .fx-transport button { min-height: 36px !important; font-size: 14px !important; padding-inline: 14px !important; }
  html body #home-guest .fx-transport .fx-bpm, html body #home-guest .fx-transport .fx-orig { font-size: 13px !important; }
  html body #home-guest .ai-dots button { position: relative; }
  html body #home-guest .ai-dots button::after { content: ""; position: absolute; inset: -14px -8px; }
  html body .home-footer .home-footer-line { font-size: 14px !important; }
}
/* QC: the home mark is a 44pt target, drawn the same size */
html body header.bar #btn-home.brand { position: relative; }
html body header.bar #btn-home.brand::after { content: ""; position: absolute; inset: -13px; }

/* ---------- QC round 3 ---------- */
/* access chips: one line, text optically centred (the old layer stacked them as columns, pinning the text to the top) */
html body #explain-access .access-option { flex-direction: row !important; justify-content: center !important; gap: 6px; min-height: 38px !important; padding: 0 16px !important; line-height: 1 !important; }
html body #explain-access .access-option strong { line-height: 1 !important; padding-top: 2px; display: inline-flex; align-items: center; gap: 6px; }
html body #explain-access .access-option[aria-pressed="true"] strong::after { content: "" !important; width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: 0.9; margin-left: 2px; }
html body #explain-access .access-option[aria-pressed="true"] strong { color: #fff !important; }

/* hero: the column is the page's width (capped), so its centre is the page's centre at every size;
   the headline scales with the window instead of overflowing it */
html body #hero .mr-inner { width: 100% !important; max-width: 1100px !important; margin-inline: auto !important; padding-inline: 24px !important; box-sizing: border-box; align-self: center; }
html body #hero h1.mr-h, html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 { font-size: clamp(40px, 6.2vw, 92px) !important; }
html body #hero h1.mr-h .mr-l2 { margin-top: 0.04em; }
/* the falling notes were cut off short of the keys and read as a glitch: the keys alone carry the moment */
html body #hero .mr-fall { display: none !important; }
html body #hero .mr-stage { justify-content: flex-end; }
html body #hero .mr-hint { margin: 28px 0 14px !important; }

/* ---------- Lune AI page, Claude-grade ---------- */
/* the header and the fine print belong to the conversation column, not the window: they no longer cover the sidebar */
html body #lune-chat.is-page .chat-main { contain: layout; position: relative; }
html body #lune-chat.is-page .chat-head { left: 0 !important; right: 0 !important; width: auto !important; background: transparent !important; border: 0 !important; backdrop-filter: none !important; }
html body #lune-chat.is-page .chat-fine { left: 0 !important; right: 0 !important; margin-inline: auto !important; text-align: center; }
/* no model names on screen: it is Lune, not a build */
html body #lune-chat .chat-sub { display: none !important; }
html body #lune-chat .chat-id h2 { font: 500 17px var(--ui) !important; letter-spacing: 0.01em; margin-top: 8px !important; }
/* sidebar: Claude's quiet rail */
html body #lune-chat .chat-hist { padding-top: 6px !important; }
html body #lune-chat .ch-new { font: 500 16px var(--ui) !important; border-radius: 12px !important; }
html body #lune-chat .ch-empty, html body #lune-chat .ch-foot { font-size: 14px !important; color: rgba(245, 245, 247, 0.42) !important; }

/* empty state: the crescent beside the greeting, as Claude sets its mark beside "Good evening" */
html body #lune-chat.is-empty .ask-empty { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 16px !important; }
html body #lune-chat.is-empty .ask-empty-orb { margin: 0 !important; width: 36px !important; height: 36px !important; flex: none; }
html body #lune-chat.is-empty .ask-empty-h { font: 400 clamp(32px, 3.4vw, 44px)/1.1 var(--display) !important; margin: 0 !important; width: auto !important; letter-spacing: -0.01em; }

/* the composer: two rows like Claude's, words on top and tools beneath */
html body #lune-chat .lc-composer {
  display: grid !important; grid-template-columns: auto 1fr auto auto; grid-template-areas: "input input input input" "attach . mic talk";
  align-items: center; row-gap: 4px; column-gap: 6px; min-height: 112px; padding: 14px 12px 10px 16px !important;
  border-radius: 24px !important; background: var(--g-card, #17171a) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 50px -24px rgba(0, 0, 0, 0.9) !important; transition: border-color .2s ease, box-shadow .2s ease;
}
html body #lune-chat .lc-composer:focus-within { border-color: rgba(159, 178, 228, 0.42) !important; box-shadow: 0 0 0 4px rgba(34, 56, 110, 0.35), 0 18px 50px -24px rgba(0, 0, 0, 0.9) !important; }
html body #lune-chat .lc-composer textarea { grid-area: input; width: 100% !important; min-height: 48px; padding: 4px 4px 0 !important; font: 400 18px/1.5 var(--ui) !important; background: transparent !important; border: 0 !important; resize: none; }
html body #lune-chat .lc-composer .lc-attach { grid-area: attach; justify-self: start; }
html body #lune-chat .lc-composer .lc-mic { grid-area: mic; }
html body #lune-chat .lc-composer .lc-talk { grid-area: talk; }
html body #lune-chat .lc-composer .lc-tool { border-radius: 10px !important; color: rgba(245, 245, 247, 0.62) !important; }
html body #lune-chat .lc-composer .lc-tool:hover { background: rgba(255, 255, 255, 0.07) !important; color: #fff !important; }
html body #lune-chat .lc-composer .lc-round { width: 36px !important; height: 36px !important; border-radius: 12px !important; }
html body #lune-chat .chat-starters button { border-radius: 12px !important; font-size: 15px !important; }
html[data-theme="light"] body #lune-chat .lc-composer { background: #fff !important; border-color: rgba(0, 0, 0, 0.12) !important; box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.25) !important; }
html[data-theme="light"] body #lune-chat .ch-empty, html[data-theme="light"] body #lune-chat .ch-foot { color: rgba(0, 0, 0, 0.45) !important; }

/* ---------- voice mode: a living orb, not a radar ---------- */
html body dialog#lune-talk.lune-talk[open] { background: var(--g-bg, #000) !important; }
@property --lt-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
html body #lune-talk .lt-orb { width: min(300px, 66vw) !important; height: min(300px, 66vw) !important; }
html body #lune-talk .lt-ring { border: 0 !important; animation: none; }
/* the outer halo: a slow aurora of navy and moonlight, breathing with your voice */
html body #lune-talk .lt-ring.r3 {
  opacity: 0.9 !important; filter: blur(34px);
  background: conic-gradient(from var(--lt-a), #22386e, #9fb2e4 18%, #16244a 36%, #5b74c4 58%, #0b1430 76%, #22386e) !important;
  transform: scale(calc(1.02 + var(--lv) * 0.22)) !important; animation: lt-spin 14s linear infinite !important;
}
/* the sphere itself: deep glass with a lit edge */
html body #lune-talk .lt-ring.r2 {
  opacity: 1 !important; width: 74% !important; height: 74% !important;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 32%), radial-gradient(circle at 50% 60%, #1b2c5c 0%, #0a1230 58%, #050814 100%) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28), inset 0 -18px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(91, 116, 196, 0.35) !important;
  transform: scale(calc(1 + var(--lv) * 0.08)) !important; animation: lt-breathe2 5.5s ease-in-out infinite !important;
}
html body #lune-talk .lt-ring.r1 { display: none !important; }
html body #lune-talk .lt-moon { width: 26% !important; height: 26% !important; z-index: 3; }
html body #lune-talk .lt-orb[data-mode="listening"] .lt-ring.r3 { animation-duration: 7s !important; opacity: 1 !important; }
html body #lune-talk .lt-orb[data-mode="thinking"] .lt-ring.r3 { animation-duration: 2.4s !important; opacity: 0.75 !important; }
html body #lune-talk .lt-orb[data-mode="thinking"] .lt-ring.r2 { animation: lt-breathe2 1.4s ease-in-out infinite !important; }
html body #lune-talk .lt-orb[data-mode="speaking"] .lt-ring.r3 { animation-duration: 5s !important; filter: blur(28px); }
@keyframes lt-spin { to { --lt-a: 360deg; } }
@keyframes lt-breathe2 { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
/* words: the state quiet, the caption large and readable, like live captions */
html body #lune-talk .lt-state { font: 400 17px var(--ui) !important; font-style: normal !important; color: rgba(245, 245, 247, 0.55) !important; max-width: 36ch !important; margin-top: 44px !important; line-height: 1.45; }
html body #lune-talk .lt-caption { font: 400 24px/1.4 var(--display) !important; max-width: 30ch !important; color: #f5f5f7 !important; }
/* controls: glass circles with their names beneath, as on a FaceTime call */
html body #lune-talk .lt-actions { gap: 72px !important; bottom: max(56px, calc(env(safe-area-inset-bottom) + 28px)) !important; }
html body #lune-talk .lt-round { position: relative; width: 64px !important; height: 64px !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; border: 0 !important; backdrop-filter: blur(20px); transition: transform .15s ease, background .2s ease; }
html body #lune-talk .lt-round:hover { background: rgba(255, 255, 255, 0.22) !important; }
html body #lune-talk .lt-round:active { transform: scale(0.94); }
html body #lune-talk .lt-round.off { background: #f5f5f7 !important; color: #000 !important; }
html body #lune-talk .lt-round.lt-end { background: #e5484d !important; color: #fff !important; }
html body #lune-talk .lt-round::after { content: attr(aria-label); position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; white-space: nowrap; font: 400 14px var(--ui); color: rgba(245, 245, 247, 0.7); }
@media (prefers-reduced-motion: reduce) { html body #lune-talk .lt-ring { animation: none !important; } }
html body #lune-talk .lt-ring.r3 { z-index: 0; opacity: 0.62 !important; filter: blur(42px) !important; }
html body #lune-talk .lt-ring.r2 { z-index: 1; }
html body #lune-talk .lt-moon { z-index: 2 !important; position: relative; }
html body #lune-talk .lt-orb[data-mode="listening"] .lt-ring.r3 { opacity: 0.85 !important; }

/* ==========================================================================
   Hero, final: keynote restraint. Smaller, tighter type in moonlit silver,
   a light badge, slim buttons, room to breathe, and one signature moment:
   a sheen of moonlight that passes across the headline.
   ========================================================================== */
html body #hero .mr-moon { --size: min(11vw, 12vh, 118px) !important; margin-bottom: clamp(18px, 3.2vh, 34px) !important;
  filter: drop-shadow(0 0 40px rgba(170, 190, 255, 0.35)) drop-shadow(0 0 120px rgba(90, 120, 220, 0.25)) !important; }
html body #hero .lp-pilot {
  border: 0 !important; background: rgba(255, 255, 255, 0.06) !important; padding: 7px 16px 7px 12px !important; margin: 0 0 26px !important;
  font-size: 15px !important; color: rgba(245, 245, 247, 0.62) !important; gap: 10px !important; backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
html body #hero .lp-pilot a { border: 0 !important; color: #f5f5f7 !important; }
html body #hero .lp-pilot a::after { content: " →"; color: var(--navy-hi); }
html body #hero .lp-pilot i { width: 6px !important; height: 6px !important; }

html body #hero h1.mr-h, html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 {
  font-size: clamp(42px, 5.4vw, 82px) !important; line-height: 1.02 !important; letter-spacing: -0.022em !important;
}
html body #hero h1.mr-h { margin: 0 !important; }
/* moonlit silver, with a sheen that crosses once as the page opens, then every few seconds, slowly */
html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 {
  background: linear-gradient(100deg, #c9cfdc 0%, #ffffff 38%, #ffffff 46%, #dfe6ff 50%, #ffffff 54%, #ffffff 62%, #b9c1d3 100%) !important;
  background-size: 250% 100% !important; background-position: 100% 0; -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  animation: mr-word 1.3s cubic-bezier(0.22, 1, 0.36, 1) both, lune-sheen 9s ease-in-out 1.8s infinite !important;
}
html body #hero h1.mr-h .mr-l1 { animation-delay: 0.45s, 1.8s !important; }
html body #hero h1.mr-h .mr-l2 { animation-delay: 0.7s, 2.1s !important; padding-bottom: 0.08em; }
@keyframes lune-sheen { 0% { background-position: 100% 0; } 28%, 100% { background-position: 0% 0; } }

html body #hero .mr-sub { font-size: clamp(18px, 1.45vw, 21px) !important; line-height: 1.5 !important; max-width: 31em !important; margin-top: 22px !important; color: rgba(245, 245, 247, 0.62) !important; }
html body #hero .hero-cta { margin-top: 34px !important; gap: 12px !important; }
html body #hero .hero-cta button { min-height: 46px !important; padding: 0 24px !important; font-size: 17px !important; border-radius: 999px !important; }
html body #hero .hero-cta .hero-cta-main { background: #f5f5f7 !important; color: #000 !important; box-shadow: 0 8px 30px -10px rgba(170, 190, 255, 0.45) !important; }
html body #hero .hero-cta .hero-cta-alt { background: rgba(255, 255, 255, 0.06) !important; border: 0 !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important; color: #f5f5f7 !important; }
html body #hero .hero-cta .hero-cta-alt:hover { background: rgba(255, 255, 255, 0.11) !important; }
html body #hero .mr-hint { font-size: 13px !important; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245, 245, 247, 0.38) !important; }
/* moonlight pooling behind the words, so the type sits in light rather than on a flat sky */
html body #hero .mr-inner::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 38%; width: min(900px, 90vw); height: 420px; translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(60, 86, 170, 0.22), transparent 70%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html body #hero h1.mr-h .mr-l1, html body #hero h1.mr-h .mr-l2 { animation: none !important; background-position: 50% 0; } }
html[data-theme="light"] body #hero h1.mr-h .mr-l1, html[data-theme="light"] body #hero h1.mr-h .mr-l2 { -webkit-text-fill-color: currentColor !important; background: none !important; }
/* the logo: crescent and wordmark on one optical centre line, at every state (also while the page is still loading) */
html body header.bar #btn-home.brand { display: inline-flex !important; align-items: center !important; gap: 12px !important; line-height: 1 !important; }
html body header.bar #btn-home.brand .lune-mark { width: 17px !important; height: 17px !important; margin: 0 !important; transform: translateY(-0.5px); }
html body header.bar #btn-home.brand .brand-name { line-height: 1 !important; padding-top: 2px; letter-spacing: 0.34em; }

/* ---------- Lune AI on the phone, as Claude's iPhone app: greeting in the open space,
   suggestions in one swipeable row, the message box at the bottom under the thumb ---------- */
@media (max-width: 600px) {
  html body #lune-chat.is-page.is-empty .chat-main { justify-content: flex-start !important; padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; }
  html body #lune-chat.is-page.is-empty #chat-log { flex: 1 1 auto !important; display: flex !important; align-items: center; justify-content: center; width: 100% !important; padding: 0 24px !important; }
  html body #lune-chat.is-empty .ask-empty { flex-direction: column !important; gap: 14px !important; padding: 0 !important; }
  html body #lune-chat.is-empty .ask-empty-orb { width: 34px !important; height: 34px !important; }
  html body #lune-chat.is-empty .ask-empty-h { font-size: 30px !important; text-align: center; max-width: 11em; text-wrap: balance; }
  html body #lune-chat.is-page.is-empty #chat-starters {
    order: 3 !important; display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important; overflow-x: auto !important;
    width: 100% !important; max-width: none !important; padding: 0 16px 10px !important; margin: 0 !important; gap: 8px !important; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
  }
  html body #lune-chat.is-page.is-empty #chat-starters::-webkit-scrollbar { display: none; }
  html body #lune-chat.is-page.is-empty #chat-starters button { flex: 0 0 auto !important; white-space: nowrap; min-height: 40px; padding: 0 16px !important; text-align: left; }
  html body #lune-chat.is-page #chat-form { order: 4 !important; width: auto !important; margin: 0 12px !important; padding: 0 !important; }
  html body #lune-chat .lc-composer { min-height: 96px !important; border-radius: 22px !important; }
  html body #lune-chat.is-page #chat-fine { order: 5 !important; position: static !important; margin: 8px 20px 0 !important; font-size: 11px !important; line-height: 1.4; }
}
/* phone home: the chip row fades at the edge instead of being chopped; the Next card's two actions match */
@media (max-width: 600px) {
  html body #home-ask-chips { scrollbar-width: none; justify-content: flex-start !important; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 28px !important; }
  html body #home-ask-chips::-webkit-scrollbar { display: none; }
  html body #home-member .member-next-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
  html body #home-member .member-next-actions > button { width: 100% !important; min-height: 46px; justify-content: center; padding: 0 12px !important; margin: 0 !important; }
}

/* ---------- every button: Garamond carries extra room above its letters, so text sat high in pills and
   arrows sat low beside it. Trimming the font box to the letters centres both exactly. ---------- */
@supports (text-box: trim-both cap alphabetic) {
  html body button, html body .btn, html body a.primary, html body a.quiet, html body .lp-pilot, html body .rep-chip, html body .access-option strong {
    text-box: trim-both cap alphabetic;
  }
}
html body button svg, html body .btn svg { flex: none; vertical-align: middle; }
@media (max-width: 600px) {
  html body #home-member .member-next-actions > button { white-space: nowrap; font-size: 16px !important; }
}

/* ---------- Plan my week, inside Lune AI ---------- */
html body .lune-chat .la-week { list-style: none; margin: 14px 0 16px !important; padding: 0 !important; border-top: 1px solid rgba(255, 255, 255, 0.1); }
html body .lune-chat .la-week li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 11px 0 !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin: 0 !important; }
html body .lune-chat .la-week li strong { font-weight: 500; color: var(--navy-hi); font-style: italic; }
html body .lune-chat .la-week li span { color: rgba(245, 245, 247, 0.86); }
html body .lune-chat .la-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
html body .lune-chat .la-plan-actions .la-act { min-height: 40px; padding: 0 18px; border-radius: 999px; font: 400 16px var(--ui); border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: #f5f5f7; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
html body .lune-chat .la-plan-actions .la-act.primary { background: #f5f5f7; color: #000; box-shadow: none; }
html body .lune-chat .la-plan-actions .la-act.on { background: var(--navy-mid); color: var(--on-navy, #fff); box-shadow: none; }
html body .lune-chat .la-planning { color: rgba(245, 245, 247, 0.6); font-style: italic; animation: la-pulse 1.6s ease-in-out infinite; }
@keyframes la-pulse { 50% { opacity: 0.45; } }
html body .lune-chat .la-replies { margin-top: 12px; }
@media (max-width: 600px) { html body .lune-chat .la-week li { grid-template-columns: 1fr; gap: 2px; } }
html[data-theme="light"] body .lune-chat .la-week, html[data-theme="light"] body .lune-chat .la-week li { border-color: rgba(0, 0, 0, 0.1); }
html[data-theme="light"] body .lune-chat .la-week li strong { color: var(--navy-mid); }
html[data-theme="light"] body .lune-chat .la-week li span { color: rgba(0, 0, 0, 0.8); }
html[data-theme="light"] body .lune-chat .la-plan-actions .la-act { background: rgba(0, 0, 0, 0.05); color: #111; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
html[data-theme="light"] body .lune-chat .la-plan-actions .la-act.primary { background: var(--g-card, #111); color: #fff; }
/* the Lune AI top bar: close and history at the left edge, the title centred, voice at the right; solid, so answers scroll beneath it cleanly */
html body #lune-chat.is-page .chat-head { display: grid !important; grid-template-columns: 1fr auto 1fr !important; align-items: center !important; padding: 8px 12px !important;
  background: rgba(0, 0, 0, 0.82) !important; backdrop-filter: saturate(1.4) blur(18px) !important; -webkit-backdrop-filter: saturate(1.4) blur(18px) !important; z-index: 5; }
html body #lune-chat.is-page .chat-head .chat-lead { justify-self: start; display: flex; gap: 2px; }
html body #lune-chat.is-page .chat-head .chat-id { justify-self: center; width: auto !important; }
html body #lune-chat.is-page .chat-head .chat-id h2 { margin: 0 !important; }
html body #lune-chat.is-page .chat-head .ask-head-end { justify-self: end; }
html[data-theme="light"] body #lune-chat.is-page .chat-head { background: rgba(255, 255, 255, 0.85) !important; }
html body #lune-chat .chat-bubble .la-week + p, html body #lune-chat .chat-bubble > p + p { margin-top: 10px; }
html body #lune-chat.is-page .chat-head { max-width: none !important; width: auto !important; margin: 0 !important; }
/* the keyboard makes room for the bar panel, as the score and the play bar already do */
@media (min-width: 801px) {
  html body.coach-open.is-panel-score #piano-dock { padding-right: min(380px, 42vw) !important; box-sizing: border-box; transition: padding-right .25s ease; }
}
/* phone hero: the two actions stack at one width */
@media (max-width: 520px) {
  html body #hero .hero-cta { display: grid !important; grid-template-columns: 1fr; width: min(300px, 100%); margin-inline: auto; }
  html body #hero .hero-cta button { width: 100% !important; }
}
/* planner replies: long names wrap inside their chip; "Type my own" is the quiet dashed one */
html body .lune-chat .la-replies { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
html body .lune-chat .la-replies .la-reply { white-space: normal !important; text-align: left; max-width: 100%; }
html body .lune-chat .la-own { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 400 15px var(--ui); color: rgba(245, 245, 247, 0.7); background: transparent; border: 1px dashed rgba(255, 255, 255, 0.22); }
html body .lune-chat .la-own:hover, html body .lune-chat .la-own.is-typing { color: #fff; border-color: var(--navy-hi); border-style: solid; }
html body .lune-chat .la-sub { color: rgba(245, 245, 247, 0.55); font-size: 0.92em; margin-top: 6px !important; }
html[data-theme="light"] body .lune-chat .la-own { color: rgba(0, 0, 0, 0.6); border-color: rgba(0, 0, 0, 0.2); }
html[data-theme="light"] body .lune-chat .la-sub { color: rgba(0, 0, 0, 0.55); }

/* ---------- landing: the morning email ---------- */
html body .lp-mail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1120px; margin: 0 auto; padding: clamp(80px, 12vh, 140px) 24px; }
html body .lp-mail-copy h2 { font: 400 clamp(36px, 4.2vw, 58px)/1.06 var(--display) !important; letter-spacing: -0.015em; margin: 8px 0 18px !important; color: #f5f5f7; text-wrap: balance; }
html body .lp-mail-copy > p:not(.about-kicker) { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: rgba(245, 245, 247, 0.66); margin: 0 0 22px; max-width: 32em; }
html body .lp-mail-points { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
html body .lp-mail-points li { padding: 12px 0 12px 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: rgba(245, 245, 247, 0.82); font-size: 17px; position: relative; }
html body .lp-mail-points li::before { content: ""; position: absolute; left: 2px; top: 50%; width: 10px; height: 10px; translate: 0 -50%; border-radius: 50%; background: var(--navy-hi); box-shadow: 0 0 0 4px rgba(159, 178, 228, 0.16); }
/* the email itself, floating in moonlight */
html body .lp-mail-stage { position: relative; perspective: 1400px; padding: 20px 0; }
html body .lp-mail-stage::before { content: ""; position: absolute; inset: -10% -6%; background: radial-gradient(closest-side, rgba(60, 90, 190, 0.32), transparent 72%); filter: blur(10px); pointer-events: none; }
html body .lp-mail-note {
  position: relative; background: #fbfbfd; color: #111114; border-radius: 22px; padding: 26px 28px 28px; max-width: 460px; margin: 0 auto;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); transform: rotateX(6deg) rotateY(-9deg) rotateZ(1deg);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); animation: lp-float 7s ease-in-out infinite;
}
html body .lp-mail-stage:hover .lp-mail-note { transform: rotateX(0) rotateY(0) rotateZ(0); }
@keyframes lp-float { 50% { translate: 0 -10px; } }
html body .lp-mail-from { display: flex; align-items: center; gap: 12px; font: 400 15px var(--nums); color: #6e6e76; padding-bottom: 14px; border-bottom: 1px solid #ececf0; }
html body .lp-mail-from b { display: block; color: #111114; font-weight: 600; }
html body .lp-mail-from i { font-style: normal; font-size: 13px; }
html body .lp-mail-from time { margin-left: auto; font-size: 13px; }
html body .lp-mail-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #16244a; color: #dfe6ff; font-size: 18px; flex: none; }
html body .lp-mail-subj { margin: 14px 0 2px !important; font: 600 15px var(--nums); color: #111114; }
html body .lp-mail-hi { margin: 14px 0 6px !important; font: 400 28px/1.15 var(--display); color: #111114 !important; }
html body .lp-mail-body { margin: 0 0 14px !important; font: 400 17px/1.55 var(--ui); color: #3a3a40 !important; }
html body .lp-mail-tasks { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: t; }
html body .lp-mail-tasks li { counter-increment: t; padding: 10px 0; border-top: 1px solid #ececf0; font: 400 17px var(--ui); color: #111114; }
html body .lp-mail-tasks li::before { content: counter(t); color: #7d90c8; font-style: italic; margin-right: 12px; }
html body .lp-mail-cta { display: inline-block; background: var(--g-card, #111114); color: #fff; border-radius: 999px; padding: 11px 22px; font: 400 16px var(--ui); }
@media (max-width: 860px) {
  html body .lp-mail { grid-template-columns: 1fr; padding-inline: 16px; }
  html body .lp-mail-note { transform: none; padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) { html body .lp-mail-note { animation: none; transform: none; } }
html[data-theme="light"] body .lp-mail-copy h2 { color: #111114; }
html[data-theme="light"] body .lp-mail-copy > p:not(.about-kicker), html[data-theme="light"] body .lp-mail-points li { color: rgba(0, 0, 0, 0.7); }
html[data-theme="light"] body .lp-mail-note { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06); }
html body .lune-chat .la-replies.is-done { opacity: 0.38; pointer-events: none; }
html body .lune-chat .la-replies.is-done .la-own { display: none; }

/* ---------- Lune AI conversation, as Claude reads: one column the width of the message box ---------- */
html body #lune-chat.is-page #chat-log { padding: 76px 20px 200px !important; max-width: 760px !important; width: 100% !important; margin: 0 auto !important; box-sizing: border-box; }
html body #lune-chat .chat-from-lune { width: 100% !important; max-width: none !important; margin-left: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble { font: 400 18px/1.65 var(--ui) !important; color: #ececf0 !important; max-width: 100% !important; }
html body #lune-chat .chat-from-lune .chat-bubble p { margin: 0 0 14px !important; }
html body #lune-chat .chat-from-lune .chat-bubble strong { color: #fff; font-weight: 600; }
/* lists: plain and roomy, numbers in navy italic, no boxes */
html body #lune-chat .chat-from-lune .chat-bubble :is(ol, ul) { margin: 4px 0 16px !important; padding: 0 0 0 1.6em !important; }
html body #lune-chat .chat-from-lune .chat-bubble li { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 0 0 4px !important; margin: 0 0 10px !important; border-radius: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble ol { list-style: decimal !important; counter-reset: none !important; }
html body #lune-chat .chat-from-lune .chat-bubble ol > li::before { content: none !important; display: none !important; }
html body #lune-chat .chat-from-lune .chat-bubble ol > li::marker { color: var(--navy-hi); font-style: italic; }
html body #lune-chat .chat-from-lune .chat-bubble ul > li::marker { color: var(--navy-hi); }
/* your messages: a soft rounded block on the right, as in Claude */
html body #lune-chat .chat-from-you { display: flex; justify-content: flex-end; margin: 8px 0 26px !important; }
html body #lune-chat .chat-from-you .chat-bubble { max-width: min(80%, 560px) !important; padding: 12px 18px !important; border-radius: 20px !important; background: #1f1f23 !important; color: #f5f5f7 !important; font: 400 17px/1.5 var(--ui) !important; }
html[data-theme="light"] body #lune-chat .chat-from-lune .chat-bubble { color: #1b1b1f !important; }
html[data-theme="light"] body #lune-chat .chat-from-lune .chat-bubble strong { color: #000; }
html[data-theme="light"] body #lune-chat .chat-from-you .chat-bubble { background: #f0f0f3 !important; color: #111 !important; }
@media (max-width: 600px) { html body #lune-chat.is-page #chat-log { padding: 64px 16px 180px !important; } html body #lune-chat .chat-from-lune .chat-bubble { font-size: 17px !important; } }

/* ---------- Audio walkthrough: one number, three controls, two choices ---------- */
html body .lw-panel {
  position: fixed; z-index: 60; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); translate: -50% 0;
  width: min(440px, calc(100vw - 24px)); box-sizing: border-box; padding: 18px 20px 20px; border-radius: 28px;
  background: rgba(16, 18, 26, 0.92); backdrop-filter: saturate(1.5) blur(24px); -webkit-backdrop-filter: saturate(1.5) blur(24px);
  color: #f5f5f7; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px -24px rgba(0, 0, 0, 0.9); font-family: var(--ui);
}
html body .lw-panel[hidden] { display: none !important; }
html body .lw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
html body .lw-panel h2 { margin: 0; font: 500 17px var(--ui); color: #f5f5f7; letter-spacing: 0.01em; }
html body .lw-piece { margin: 2px 0 0; font-size: 15px; color: rgba(245, 245, 247, 0.5); }
html body .lw-close { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); color: rgba(245, 245, 247, 0.75); cursor: pointer; padding: 0; }
html body .lw-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
html body .lw-panel .lw-barnum { margin: 18px 0 2px; text-align: center; font: 400 64px/1 var(--display); letter-spacing: -0.02em; color: #f5f5f7; }
html body .lw-panel .lw-barnum i { font-style: normal; font-size: 22px; color: rgba(245, 245, 247, 0.4); letter-spacing: 0; margin-left: 6px; }
html body .lw-status { margin: 0 0 18px; text-align: center; font-size: 15px; font-style: italic; color: var(--navy-hi); min-height: 1.4em; }
html body .lw-transport { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 0 0 22px; }
html body .lw-btn { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: transparent; color: #f5f5f7; transition: transform 0.12s ease, background 0.2s ease; }
html body .lw-btn:hover { background: rgba(255, 255, 255, 0.08); }
html body .lw-btn:active { transform: scale(0.94); }
html body .lw-btn.lw-main { width: 80px; height: 80px; background: #f5f5f7; color: #10131a; box-shadow: 0 10px 30px -10px rgba(159, 178, 228, 0.5); }
html body .lw-btn.lw-main:hover { background: #fff; }
html body .lw-btn.lw-main svg { width: 32px; height: 32px; }
html body .lw-btn:focus-visible, html body .lw-close:focus-visible, html body .lw-seg label:has(input:focus-visible), html body .lw-row:has(input:focus-visible), html body .lw-range input:focus-visible { outline: 2px solid #9fb2e4; outline-offset: 3px; }
/* hands: one segmented control */
html body .lw-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 0; margin: 0 0 10px; border-radius: 12px; background: rgba(118, 118, 128, 0.24); }
html body .lw-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html body .lw-seg label { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-size: 16px; color: rgba(245, 245, 247, 0.75); cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
html body .lw-seg label:has(input:checked) { background: #f5f5f7; color: #10131a; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
html body .lw-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
/* repeat: a single switch row */
html body .lw-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 4px 0 6px; font-size: 16px; color: rgba(245, 245, 247, 0.85); cursor: pointer; }
html body .lw-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .lw-sw { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s ease; flex: none; }
html body .lw-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
html body .lw-row input:checked + .lw-sw { background: var(--navy-mid); }
html body .lw-row input:checked + .lw-sw::after { transform: translateX(18px); }
/* range: one quiet line */
html body .lw-range { display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 15px; color: rgba(245, 245, 247, 0.5); }
html body .lw-range input { width: 64px; min-height: 36px; border-radius: 9px; border: 0; background: rgba(118, 118, 128, 0.24); color: #f5f5f7; font: 400 16px var(--nums); text-align: center; padding: 0 6px; -moz-appearance: textfield; }
html body .lw-range input::-webkit-outer-spin-button, html body .lw-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* desktop: a side panel, so the highlighted bar stays in view */
@media (min-width: 900px) {
  html body .lw-panel { left: auto; right: 16px; top: 72px; bottom: auto; translate: none; width: 360px; }
  html body.lw-on.is-panel-score .studio-dock, html body.lw-on.is-panel-score #piano-dock, html body.lw-on.is-panel-score .score-pane { padding-right: 392px !important; box-sizing: border-box; }
}
/* High contrast: black on white, heavier strokes */
html body.lp-contrast .lw-panel { background: #fff; color: #000; box-shadow: 0 0 0 3px #000; backdrop-filter: none; }
html body.lp-contrast .lw-panel h2, html body.lp-contrast .lw-panel .lw-barnum, html body.lp-contrast .lw-row, html body.lp-contrast .lw-btn { color: #000; }
html body.lp-contrast .lw-piece, html body.lp-contrast .lw-range, html body.lp-contrast .lw-panel .lw-barnum i { color: #222; }
html body.lp-contrast .lw-status { color: #000; font-weight: 600; }
html body.lp-contrast .lw-btn { box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .lw-btn.lw-main { background: var(--g-bg, #000); color: #fff; box-shadow: none; }
html body.lp-contrast .lw-seg { background: #fff; box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .lw-seg label { color: #000; }
html body.lp-contrast .lw-seg label:has(input:checked) { background: var(--g-bg, #000); color: #fff; }
html body.lp-contrast .lw-range input { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .lw-close { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }
html[data-theme="light"] body:not(.lp-contrast) .lw-panel { background: rgba(251, 251, 253, 0.94); color: #111; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 70px -24px rgba(0, 0, 0, 0.3); }
html[data-theme="light"] body:not(.lp-contrast) :is(.lw-panel h2, .lw-barnum, .lw-row, .lw-btn) { color: #111; }
html[data-theme="light"] body:not(.lp-contrast) .lw-btn.lw-main { background: var(--g-card, #111); color: #fff; }
html[data-theme="light"] body:not(.lp-contrast) .lw-seg label { color: rgba(0, 0, 0, 0.7); }
html[data-theme="light"] body:not(.lp-contrast) .lw-seg label:has(input:checked) { background: #fff; color: #111; }
html[data-theme="light"] body:not(.lp-contrast) .lw-range input { color: #111; }
html[data-theme="light"] body:not(.lp-contrast) .lw-status { color: #22386e; }

/* ---------- the score menu: an iOS grouped list ---------- */
html body .studio-menu .sm-group { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
html body .studio-menu .sm-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-radius: 0; background: transparent; color: #f5f5f7; font: 400 17px var(--ui); text-align: left; text-decoration: none; cursor: pointer; position: relative; }
html body .studio-menu .sm-row + .sm-row::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: 1px; background: rgba(255, 255, 255, 0.08); }
html body .studio-menu .sm-row:hover, html body .studio-menu .sm-row:active { background: rgba(255, 255, 255, 0.05); }
html body .studio-menu .sm-row:focus-visible { outline: 2px solid #9fb2e4; outline-offset: -2px; }
html body .studio-menu .sm-ic { flex: none; color: var(--navy-hi); }
html body .studio-menu .sm-l { flex: 1; min-width: 0; }
html body .studio-menu .sm-trail { display: flex; color: rgba(245, 245, 247, 0.3); }
html body .studio-menu .sm-sw { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s ease; }
html body .studio-menu .sm-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
html body .studio-menu .sm-row[aria-checked="true"] .sm-sw { background: var(--navy-mid); }
html body .studio-menu .sm-row[aria-checked="true"] .sm-sw::after { transform: translateX(18px); }
html body .studio-menu .sm-signin { display: block; width: 100%; min-height: 50px; margin: 4px 0 0; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.06) !important; color: var(--navy-hi) !important; font: 500 17px var(--ui); box-shadow: none !important; }
html body .studio-menu .sm-h { margin: 18px 0 8px 16px !important; }
html body .lw-panel .lw-status { margin: 20px 0 4px; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; font-style: normal; }
html body .lw-panel .lw-barnum { margin: 0 0 22px; }
html body .lw-close { position: relative; }
html body .lw-close::after { content: ""; position: absolute; inset: -6px; }

/* ---------- Homework: the teacher's dialog ---------- */
html body #assign-dialog { width: min(480px, calc(100vw - 24px)); padding: 26px 26px 24px !important; border-radius: 24px !important; }
html body #assign-dialog h2 { margin: 0 !important; font: 400 30px/1.1 var(--display) !important; letter-spacing: -0.01em; }
html body #assign-dialog .as-sub { margin: 6px 0 22px !important; font-size: 16px; color: rgba(245, 245, 247, 0.55); }
html body #assign-dialog .as-form { display: flex; flex-direction: column; gap: 14px; }
html body #assign-dialog .as-field { display: flex; flex-direction: column; gap: 6px; }
html body #assign-dialog .as-field label, html body #assign-dialog .as-label { font-size: 14px; color: rgba(245, 245, 247, 0.55); letter-spacing: 0.02em; }
html body #assign-dialog .as-label { display: flex; align-items: center; justify-content: space-between; }
html body #assign-dialog input:not([type=checkbox]), html body #assign-dialog textarea {
  width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; padding: 12px 14px; background: rgba(118, 118, 128, 0.2);
  color: #f5f5f7; font: 400 17px/1.45 var(--ui); resize: none; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.2s ease;
}
html body #assign-dialog input:focus, html body #assign-dialog textarea:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(159, 178, 228, 0.6), 0 0 0 4px rgba(34, 56, 110, 0.4); }
html body #assign-dialog .as-polish { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--navy-hi); font: 400 14px var(--ui); cursor: pointer; }
html body #assign-dialog .as-polish:hover { background: rgba(159, 178, 228, 0.1); }
html body #assign-dialog .as-polish.is-busy svg { animation: lw-spin 1s linear infinite; }
@keyframes lw-spin { to { transform: rotate(360deg); } }
html body #assign-dialog .as-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 16px; color: rgba(245, 245, 247, 0.85); cursor: pointer; }
html body #assign-dialog .as-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body #assign-dialog .as-sw { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s ease; }
html body #assign-dialog .as-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
html body #assign-dialog .as-row input:checked + .as-sw { background: var(--navy-mid); }
html body #assign-dialog .as-row input:checked + .as-sw::after { transform: translateX(18px); }
html body #assign-dialog .as-row:has(input:focus-visible) .as-sw { outline: 2px solid #9fb2e4; outline-offset: 2px; }
html body #assign-dialog .as-make { margin-top: 6px; min-height: 50px; border-radius: 999px !important; font-size: 17px !important; }
html body #assign-dialog .as-actions { display: flex; gap: 10px; align-items: center; }
html body #assign-dialog .as-actions button { min-height: 50px; border-radius: 999px !important; font-size: 17px !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
html body #assign-dialog .as-actions #as-wa { flex: 1; }
html body #assign-dialog .as-actions .as-share { width: 50px; padding: 0 !important; flex: none; }
html body #assign-dialog .as-foot { margin: 14px 0 0 !important; font-size: 14px; line-height: 1.5; color: rgba(245, 245, 247, 0.5); }
html[data-theme="light"] body #assign-dialog input:not([type=checkbox]), html[data-theme="light"] body #assign-dialog textarea { color: #111; background: rgba(0, 0, 0, 0.05); }
html[data-theme="light"] body #assign-dialog :is(.as-sub, .as-foot, .as-field label, .as-label) { color: rgba(0, 0, 0, 0.55); }
html[data-theme="light"] body #assign-dialog .as-row { color: #111; }

/* ---------- Homework: one quiet card at the top of the score ---------- */
html body #lp-assign-banner.hw {
  display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin: 0 auto 16px; max-width: 980px; box-sizing: border-box;
  padding: 18px 18px 18px 22px; border-radius: 20px; border: 0; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
html body #lp-assign-banner.hw[hidden] { display: none !important; }
html body .hw .hw-main { flex: 1; min-width: 0; }
html body .hw .hw-k { margin: 0 0 4px !important; font-size: 14px; letter-spacing: 0.02em; color: var(--navy-hi); font-style: italic; }
html body .hw .hw-note { margin: 0 0 12px !important; font: 400 19px/1.45 var(--ui); color: #f5f5f7; }
html body .hw .hw-bars { display: flex; flex-wrap: wrap; gap: 6px; }
html body .hw .hw-bar { min-width: 40px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: rgba(159, 178, 228, 0.14); color: #dfe6ff; font: 400 15px var(--nums); cursor: pointer; }
html body .hw .hw-bar::before { content: "Bar "; font-family: var(--ui); opacity: 0.7; }
html body .hw .hw-bar:hover { background: rgba(159, 178, 228, 0.24); }
html body .hw .hw-side { display: flex; align-items: center; gap: 8px; flex: none; }
html body .hw .hw-side button:not(.hw-x) { min-height: 40px; padding: 0 18px !important; border-radius: 999px !important; font-size: 15px !important; }
html body .hw .hw-x { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: rgba(245, 245, 247, 0.5); cursor: pointer; position: relative; }
html body .hw .hw-x::after { content: ""; position: absolute; inset: -6px; }
html body .hw .hw-x:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
html body .hw .hw-check { display: flex; gap: 8px; margin-top: 12px; max-width: 420px; }
html body .hw .hw-check[hidden] { display: none; }
html body .hw .hw-check input { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 999px; padding: 0 16px; background: rgba(118, 118, 128, 0.22); color: #f5f5f7; font: 400 16px var(--ui); }
html body .hw .hw-check input:focus { outline: none; box-shadow: 0 0 0 2px rgba(159, 178, 228, 0.6); }
html body .hw .hw-check button { min-height: 40px; padding: 0 18px !important; border-radius: 999px !important; }
html body .hw .hw-done { margin: 12px 0 0 !important; font-size: 15px; color: rgba(245, 245, 247, 0.65); }
html body .hw .hw-done::before { content: "✓ "; color: var(--navy-hi); }
html body .hw .hw-progress { margin-top: 14px; }
html body .hw .hw-dim { margin: 0 !important; font-size: 15px; color: rgba(245, 245, 247, 0.5); }
html body .hw .hw-list { list-style: none; margin: 0; padding: 0; }
html body .hw .hw-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 15px; }
html body .hw .hw-who { color: #f5f5f7; font-size: 16px; }
html body .hw .hw-when { color: rgba(245, 245, 247, 0.5); }
html body .hw .hw-rate { flex-basis: 100%; color: var(--navy-hi); }
@media (max-width: 640px) {
  html body #lp-assign-banner.hw { flex-direction: column; gap: 14px; margin: 0 12px 12px; padding: 16px; }
  html body .hw .hw-side { width: 100%; }
  html body .hw .hw-side button:not(.hw-x) { flex: 1; }
  html body .hw .hw-x { position: absolute; top: 10px; right: 10px; }
  html body #lp-assign-banner.hw { position: relative; }
  html body .hw .hw-main { padding-right: 28px; }
}
html[data-theme="light"] body #lp-assign-banner.hw { background: rgba(0, 0, 0, 0.03); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
html[data-theme="light"] body .hw :is(.hw-note, .hw-who) { color: #111; }
html[data-theme="light"] body .hw .hw-bar { background: rgba(34, 56, 110, 0.08); color: #22386e; }
html[data-theme="light"] body .hw .hw-check input { background: rgba(0, 0, 0, 0.05); color: #111; }
html body.lp-contrast #lp-assign-banner.hw { background: #fff; box-shadow: 0 0 0 3px #000; }
html body.lp-contrast .hw :is(.hw-note, .hw-who, .hw-k, .hw-rate, .hw-done, .hw-dim, .hw-when) { color: #000; }
html body.lp-contrast .hw .hw-bar { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }
@media (max-width: 640px) {
  html body .hw .hw-note { font-size: 17px; line-height: 1.4; margin-bottom: 10px !important; }
  html body .hw .hw-bar { height: 28px; font-size: 14px; }
  html body .hw .hw-done { font-size: 14px; margin-top: 10px !important; }
  html body .hw .hw-side button:not(.hw-x) { min-height: 40px; }
  html body #lp-assign-banner.hw { gap: 12px; padding: 14px 16px; }
}

/* ---------- Practise with Lune: the lesson card ---------- */
html body #lune-session.ls2 {
  position: fixed; z-index: 60; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); top: auto; right: auto; translate: -50% 0; transform: none;
  width: min(440px, calc(100vw - 24px)); box-sizing: border-box; padding: 18px 20px 20px; border-radius: 28px; border: 0;
  background: rgba(16, 18, 26, 0.92); backdrop-filter: saturate(1.5) blur(24px); -webkit-backdrop-filter: saturate(1.5) blur(24px);
  color: #f5f5f7; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px -24px rgba(0, 0, 0, 0.9); font-family: var(--ui); animation: ls2-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes ls2-in { from { opacity: 0; translate: -50% 14px; } to { opacity: 1; translate: -50% 0; } }
html body #lune-session.ls2[hidden] { display: none !important; }
html body .ls2 .ls2-head { display: flex; align-items: center; gap: 12px; }
html body .ls2 h2 { margin: 0; font: 500 17px var(--ui); color: #f5f5f7; }
html body .ls2 .ls2-dots { display: inline-flex; gap: 5px; margin-left: auto; }
html body .ls2 .ls2-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
html body .ls2 .ls2-dots i.done { background: var(--navy-hi); }
html body .ls2 .ls2-dots i.on { background: #f5f5f7; width: 18px; border-radius: 4px; }
html body .ls2 .ls2-x { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: rgba(245, 245, 247, 0.75); cursor: pointer; position: relative; }
html body .ls2 .ls2-x::after { content: ""; position: absolute; inset: -6px; }
html body .ls2 .ls2-x:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
html body .ls2 .ls2-bar { margin: 16px 0 10px; text-align: center; font: 400 52px/1 var(--display); letter-spacing: -0.02em; color: #f5f5f7; }
html body .ls2 .ls2-trail { display: flex; justify-content: center; gap: 6px; margin: 0 0 16px; }
html body .ls2 .ls2-trail span { padding: 5px 12px; border-radius: 999px; font-size: 14px; color: rgba(245, 245, 247, 0.4); background: transparent; transition: background 0.25s ease, color 0.25s ease; }
html body .ls2 .ls2-trail span.on { background: rgba(159, 178, 228, 0.16); color: #f5f5f7; }
html body .ls2 .ls2-trail span.done { color: var(--navy-hi); }
html body .ls2 .ls2-trail span.done::before { content: "✓ "; }
html body .ls2 .ls2-say { margin: 0 0 20px; min-height: 2.9em; text-align: center; font: 400 18px/1.45 var(--ui); color: rgba(245, 245, 247, 0.88); text-wrap: balance; }
html body .ls2 .ls2-live { display: inline-flex; align-items: center; gap: 8px; color: var(--navy-hi); }
html body .ls2 .ls2-live svg { animation: ls2-pulse 1.2s ease-in-out infinite; }
@keyframes ls2-pulse { 50% { opacity: 0.35; } }
html body .ls2 .ls2-transport { display: flex; align-items: center; justify-content: center; gap: 14px; }
html body .ls2 .ls2-btn { width: 52px; height: 52px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.07); color: #f5f5f7; cursor: pointer; transition: background 0.2s ease, transform 0.12s ease; }
html body .ls2 .ls2-btn:hover { background: rgba(255, 255, 255, 0.13); }
html body .ls2 .ls2-main { flex: 1; max-width: 240px; min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px; background: #f5f5f7; color: #10131a; font: 500 17px var(--ui); cursor: pointer; box-shadow: 0 10px 30px -12px rgba(159, 178, 228, 0.5); transition: transform 0.12s ease, background 0.2s ease; }
html body .ls2 .ls2-main:hover { background: #fff; }
html body .ls2 .ls2-quiet { min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: #f5f5f7; font: 400 17px var(--ui); cursor: pointer; }
html body .ls2 :is(.ls2-btn, .ls2-main, .ls2-quiet):active { transform: scale(0.96); }
html body .ls2 .ls2-grades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 3px; border-radius: 14px; background: rgba(118, 118, 128, 0.24); }
html body .ls2 .ls2-grades button { min-height: 46px; border: 0; border-radius: 11px; background: transparent; color: rgba(245, 245, 247, 0.85); font: 400 15px var(--ui); cursor: pointer; transition: background 0.2s ease; }
html body .ls2 .ls2-grades button:hover { background: rgba(255, 255, 255, 0.08); }
html body .ls2 .ls2-grades button.on { background: #f5f5f7; color: #10131a; }
html body .ls2 :is(.ls2-btn, .ls2-main, .ls2-quiet, .ls2-x, .ls2-grades button):focus-visible { outline: 2px solid #9fb2e4; outline-offset: 3px; }
@media (min-width: 900px) {
  html body #lune-session.ls2 { left: auto; right: 16px; top: 72px; bottom: auto; translate: none; width: 360px; animation-name: ls2-side; }
  @keyframes ls2-side { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  html body.ls-on.is-panel-score .studio-dock, html body.ls-on.is-panel-score #piano-dock, html body.ls-on.is-panel-score .score-pane { padding-right: 392px !important; box-sizing: border-box; }
}
html body.lp-contrast #lune-session.ls2 { background: #fff; color: #000; box-shadow: 0 0 0 3px #000; backdrop-filter: none; }
html body.lp-contrast .ls2 :is(h2, .ls2-bar, .ls2-say) { color: #000; }
html body.lp-contrast .ls2 .ls2-main { background: var(--g-bg, #000); color: #fff; }
html body.lp-contrast .ls2 :is(.ls2-btn, .ls2-quiet, .ls2-x) { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .ls2 .ls2-grades { background: #fff; box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .ls2 .ls2-grades button { color: #000; }
html[data-theme="light"] body:not(.lp-contrast) #lune-session.ls2 { background: rgba(251, 251, 253, 0.94); color: #111; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 70px -24px rgba(0, 0, 0, 0.3); }
html[data-theme="light"] body:not(.lp-contrast) .ls2 :is(h2, .ls2-bar, .ls2-say) { color: #111; }
html[data-theme="light"] body:not(.lp-contrast) .ls2 .ls2-main { background: var(--g-card, #111); color: #fff; }
html[data-theme="light"] body:not(.lp-contrast) .ls2 :is(.ls2-btn, .ls2-quiet) { background: rgba(0, 0, 0, 0.05); color: #111; }
html[data-theme="light"] body:not(.lp-contrast) .ls2 .ls2-grades button { color: #111; }
/* during a lesson the play bar stays on desktop; on a phone the card sits where it was */
@media (min-width: 900px) { html body.ls-on #companion-bar { visibility: visible !important; } }
/* the lesson, seamless: each step fades in, the bar number settles, the demo draws a line as it plays */
html body .ls2 .ls2-body { animation: ls2-swap 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes ls2-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html body .ls2 .ls2-bar.is-new { animation: ls2-settle 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes ls2-settle { from { opacity: 0; transform: scale(0.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
html body .ls2 .ls2-meter { height: 2px; margin: -4px auto 18px; width: 60%; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; opacity: 0; transition: opacity 0.3s ease; }
html body .ls2 .ls2-meter.on { opacity: 1; }
html body .ls2 .ls2-meter i { display: block; height: 100%; background: var(--navy-hi); transform: scaleX(0); transform-origin: left; transition: transform 0.08s linear; }
html body .ls2 .ls2-nice { color: #f5f5f7; }
html body .ls2 .ls2-tick { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; border-radius: 50%; background: var(--navy-mid); color: var(--on-navy, #fff); font-size: 14px; vertical-align: 1px; animation: ls2-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes ls2-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html body .ls2 :is(.ls2-body, .ls2-bar.is-new, .ls2-tick) { animation: none; } }
html body.lp-contrast .ls2 .ls2-meter { background: #ddd; } html body.lp-contrast .ls2 .ls2-meter i { background: var(--g-bg, #000); }
html[data-theme="light"] body:not(.lp-contrast) .ls2 .ls2-nice { color: #111; }

/* the score toolbar: one main action. Ask Lune joins the quiet controls; Practise with Lune leads */
html body .score-tools #btn-tell, html body .score-tools .lp-ask-btn, html body .score-tools [data-ask-lune] { background: transparent !important; color: #f5f5f7 !important; box-shadow: none !important; }
html body .lp-tools-bar #btn-tell.lp-tool { background: transparent !important; color: #f5f5f7 !important; box-shadow: none !important; border: 0 !important; }
html body .lp-tools-bar #btn-tell.lp-tool:hover { background: rgba(255, 255, 255, 0.08) !important; }
html[data-theme="light"] body .lp-tools-bar #btn-tell.lp-tool { color: #111 !important; }
/* no blue haze anywhere in the app: Repertoire and the page behind it sit on plain night */
html body.is-repertoire, html body.is-repertoire main#repertoire#repertoire.repertoire, html body main#repertoire#repertoire { background-image: none !important; background-color: var(--g-bg, #000) !important; }
html[data-theme="light"] body.is-repertoire, html[data-theme="light"] body main#repertoire#repertoire { background-color: #fff !important; }
/* Explain: the four reading and access options as an even two-by-two grid */
html body #explain-access .access-card-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; max-width: 520px; }
html body #explain-access .access-option { width: 100% !important; justify-content: flex-start !important; padding: 0 16px !important; }
html body #explain-access .access-option[hidden] { display: none !important; }
@media (max-width: 420px) { html body #explain-access .access-card-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   The practice room: only the bars you are working on, and one goal.
   ========================================================================== */
html body #lune-room.lr {
  position: fixed; inset: 0; z-index: 80; display: grid;
  grid-template-rows: auto auto minmax(160px, 1fr) auto auto auto; gap: 0;
  padding: max(10px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) max(16px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 50% 0%, #0d1328 0%, #06070c 55%, #040507 100%); color: #f5f5f7; font-family: var(--ui);
  animation: lr-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; overflow: hidden;
}
html body #lune-room.lr[hidden] { display: none !important; }
@keyframes lr-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
html body.lr-on { overflow: hidden; }
html body.lr-on :is(#companion-bar, #st-bottom, .studio-menu) { visibility: hidden; }
html body #lune-room > * { width: 100%; max-width: 1080px; margin-inline: auto; }

html body .lr .lr-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; }
html body .lr .lr-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: transparent; color: rgba(245, 245, 247, 0.75); font: 400 16px var(--ui); cursor: pointer; }
html body .lr .lr-back:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
html body .lr .lr-id { text-align: center; }
html body .lr .lr-piece { margin: 0; font-size: 14px; color: rgba(245, 245, 247, 0.5); letter-spacing: 0.02em; }
html body .lr h2 { margin: 2px 0 0; font: 400 28px/1.1 var(--display); color: #f5f5f7; }
html body .lr .lr-queue { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font: 400 14px var(--nums); color: rgba(245, 245, 247, 0.55); }
html body .lr .lr-qbtn { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.07); color: #f5f5f7; cursor: pointer; }
html body .lr .lr-qbtn:disabled { opacity: 0.3; cursor: default; }

/* the goal: why you are here, and how far you have come */
html body .lr .lr-goal { margin-top: 14px; text-align: center; }
html body .lr .lr-goal-line { margin: 0 0 12px; font-size: 16px; color: rgba(245, 245, 247, 0.6); }
html body .lr .lr-goal-line strong { color: #f5f5f7; font-weight: 500; }
html body .lr .lr-goal-row { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
html body .lr .lr-ladder { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(118, 118, 128, 0.2); }
html body .lr .lr-step { min-width: 44px; height: 30px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: rgba(245, 245, 247, 0.45); font: 400 14px var(--nums); cursor: pointer; transition: background 0.3s ease, color 0.3s ease; }
html body .lr .lr-step::after { content: "%"; font-size: 11px; opacity: 0.7; }
html body .lr .lr-step.done { color: var(--navy-hi); }
html body .lr .lr-step.on { background: #f5f5f7; color: #10131a; }
html body .lr .lr-streak { display: inline-flex; gap: 8px; }
html body .lr .lr-streak i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(245, 245, 247, 0.35); transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease; }
html body .lr .lr-streak i.on { background: var(--navy-hi); box-shadow: 0 0 12px rgba(159, 178, 228, 0.6); transform: scale(1.1); }
html body .lr .lr-msg { min-height: 1.5em; margin: 12px 0 0; font-size: 16px; color: rgba(245, 245, 247, 0.7); font-style: italic; }
html body .lr .lr-msg.is-good { color: var(--navy-hi); }
html body .lr .lr-msg.is-up { color: #fff; animation: lr-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes lr-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* the bars themselves, as large as the room allows */
html body .lr .lr-stage { min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 8px 0; }
html body .lr .lr-sheet { opacity: 0; transition: opacity 0.4s ease; max-width: 100%; }
html body .lr .lr-sheet.in { opacity: 1; }
html body .lr .lr-sheet svg { display: block; max-width: 100%; height: auto; }
html body .lr .lr-nostage { font: 400 48px var(--display); color: rgba(245, 245, 247, 0.5); }
html body .lr .lr-meter { height: 2px; margin-bottom: 14px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
html body .lr .lr-meter i { display: block; height: 100%; background: var(--navy-hi); transform: scaleX(0); transform-origin: left; transition: transform 0.06s linear; }

/* every note, spelled out, lit in time */
html body .lr .lr-notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
html body .lr .lr-row { display: flex; align-items: center; gap: 12px; transition: opacity 0.3s ease; }
html body .lr .lr-row.is-dim { opacity: 0.25; }
html body .lr .lr-k { flex: none; width: 46px; font-size: 13px; font-style: italic; color: var(--navy-hi); }
html body .lr .lr-chips { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
html body .lr .lr-chips::-webkit-scrollbar { display: none; }
html body .lr .lr-chip { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; padding: 7px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease; }
html body .lr .lr-chip.on { background: var(--navy-mid); transform: translateY(-3px); box-shadow: 0 8px 20px -8px rgba(159, 178, 228, 0.7); }
html body .lr .lr-n { display: inline-flex; align-items: baseline; gap: 1px; line-height: 1.1; }
html body .lr .lr-n b { font: 500 18px var(--ui); color: #f5f5f7; }
html body .lr .lr-n small { font: 400 10px var(--nums); color: rgba(245, 245, 247, 0.45); }
html body .lr .lr-n i { margin-left: 4px; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font: 500 10px var(--nums); font-style: normal; color: #10131a; background: #c9d3f0; }
html body .lr .lr-chip.on .lr-n i { background: #fff; }
html body .lr .lr-barline { flex: none; align-self: stretch; width: 1px; margin: 0 4px; background: rgba(255, 255, 255, 0.2); }
html body .lr .lr-rest { flex: none; padding: 7px 10px; font-size: 14px; font-style: italic; color: rgba(245, 245, 247, 0.35); }

/* the controls: tools above, the practice loop below */
html body .lr .lr-controls { display: flex; flex-direction: column; align-items: center; gap: 14px; }
html body .lr .lr-tools { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
html body .lr .lr-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(118, 118, 128, 0.22); }
html body .lr .lr-seg button { min-width: 64px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: rgba(245, 245, 247, 0.7); font: 400 15px var(--ui); cursor: pointer; }
html body .lr .lr-seg button[aria-pressed="true"] { background: #f5f5f7; color: #10131a; }
html body .lr .lr-tog { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: rgba(245, 245, 247, 0.7); font: 400 15px var(--ui); cursor: pointer; }
html body .lr .lr-tog[aria-pressed="true"] { background: rgba(159, 178, 228, 0.18); color: #fff; }
html body .lr .lr-act { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 620px; }
html body .lr .lr-listen { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; height: 56px; padding: 0 20px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font: 500 17px var(--ui); cursor: pointer; }
html body .lr .lr-listen:hover { background: rgba(255, 255, 255, 0.16); }
html body .lr .lr-quiet { height: 56px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; color: rgba(245, 245, 247, 0.75); font: 400 17px var(--ui); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
html body .lr .lr-main { flex: 1; height: 56px; padding: 0 24px; border: 0; border-radius: 999px; background: #f5f5f7; color: #10131a; font: 500 17px var(--ui); cursor: pointer; box-shadow: 0 12px 34px -14px rgba(159, 178, 228, 0.6); }
html body .lr .lr-main:hover { background: #fff; }
html body .lr :is(button):active { transform: scale(0.97); }
html body .lr :is(button):focus-visible { outline: 2px solid #9fb2e4; outline-offset: 3px; }

/* perfected */
html body .lr .lr-done { position: absolute; inset: 0; max-width: none; display: grid; place-items: center; background: rgba(4, 5, 7, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: lr-in 0.4s ease both; }
html body .lr .lr-done-in { width: min(460px, calc(100vw - 32px)); text-align: center; }
html body .lr .lr-done-mark { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--navy-mid); color: var(--on-navy, #fff); font-size: 34px; box-shadow: 0 0 60px rgba(159, 178, 228, 0.45); animation: ls2-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
html body .lr .lr-done h3 { margin: 22px 0 8px; font: 400 34px/1.1 var(--display); color: #fff; }
html body .lr .lr-done p { margin: 0 0 26px; font-size: 17px; line-height: 1.5; color: rgba(245, 245, 247, 0.7); }
html body .lr .lr-done-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
html body .lr .lr-done-act button { min-width: 180px; }

@media (max-width: 640px) {
  html body #lune-room.lr { padding-inline: 14px; }
  html body .lr h2 { font-size: 22px; }
  html body .lr .lr-back span { display: none; }
  html body .lr .lr-goal-line { font-size: 14px; }
  html body .lr .lr-goal-row { gap: 14px; }
  html body .lr .lr-step { min-width: 38px; padding: 0 4px; }
  html body .lr .lr-k { width: 34px; font-size: 12px; }
  html body .lr .lr-act { flex-wrap: wrap; }
  html body .lr .lr-listen { min-width: 0; flex: 1; }
  html body .lr .lr-quiet { flex: 1; }
  html body .lr .lr-main { flex-basis: 100%; }
  html body .lr .lr-tog span { display: none; }
  html body .lr .lr-tog { width: 38px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { html body .lr, html body .lr * { animation: none !important; transition: none !important; } }
html body.lp-contrast #lune-room.lr { background: #fff; color: #000; }
html body.lp-contrast .lr :is(h2, .lr-n b, .lr-goal-line strong, .lr-done h3) { color: #000; }
html body.lp-contrast .lr .lr-chip { background: #fff; box-shadow: inset 0 0 0 2px #000; }
html body.lp-contrast .lr .lr-chip.on { background: var(--g-bg, #000); } html body.lp-contrast .lr .lr-chip.on .lr-n b { color: #fff; }
html body.lp-contrast .lr .lr-main, html body.lp-contrast .lr .lr-step.on { background: var(--g-bg, #000); color: #fff; }

/* ---------- the score page, with less on it ---------- */
html body.is-studio header.bar :is(#piece-tab-new, #btn-bookmark, #btn-share) { display: none !important; }
html body .lr .lr-stage { place-items: center stretch; }
html body .lr .lr-sheet { width: 100%; }
html body .lr .lr-sheet svg { margin: 0 auto; }
html body .lr .lr-stage { position: relative; }
html body .lr .lr-sheet { position: absolute; inset: 8px 0; display: grid; place-items: center; }
html body .lr .lr-sheet svg { width: 100%; height: 100%; max-height: 100%; }
html body #lune-room .lr-sheet { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
/* lighter note chips, so the music has the room */
html body .lr .lr-notes { gap: 4px; margin-bottom: 14px; }
html body .lr .lr-chip { min-width: 38px; padding: 5px 7px; gap: 1px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
html body .lr .lr-n b { font-size: 15px; }
html body .lr .lr-n i { width: 14px; height: 14px; font-size: 9px; margin-left: 3px; }
html body .lr .lr-goal { margin-top: 6px; }
html body .lr .lr-goal-line { margin-bottom: 10px; font-size: 15px; }
html body .lr .lr-msg { margin-top: 8px; font-size: 15px; }
html body .lr .lr-row { justify-content: center; }
html body .lr .lr-chips { justify-content: safe center; min-width: 0; }
html body #lune-room .lr-sheet > div, html body #lune-room [id^="osmdCanvasPage"] { position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; display: block !important; }
html body #lune-room .lr-sheet svg { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-height: none !important; }

/* ==========================================================================
   Studio: the teacher's home. Quiet, editorial, no dashboard clutter.
   ========================================================================== */
html body .studio-home { max-width: 760px; margin: 0 auto; padding: clamp(48px, 9vh, 96px) 20px 96px; color: #f5f5f7; font-family: var(--ui); }
html body .studio-home[hidden] { display: none !important; }
html body .sd-hero { margin-bottom: 52px; }
html body .sd-kicker { margin: 0 0 8px; font-size: 15px; font-style: italic; color: var(--navy-hi); }
html body .sd-hero h1 { margin: 0 0 10px; font: 400 clamp(40px, 6vw, 60px)/1.05 var(--display); letter-spacing: -0.015em; color: #f5f5f7; }
html body .sd-sum { margin: 0 0 24px; font-size: 18px; color: rgba(245, 245, 247, 0.6); }
html body .sd-hero-act { display: flex; gap: 10px; flex-wrap: wrap; }
html body .sd-hero-act button { min-height: 46px; padding: 0 22px !important; border-radius: 999px !important; font-size: 17px !important; }
html body .sd-sec { margin-bottom: 48px; }
html body .sd-sec-head h2 { margin: 0 0 12px; font: 400 26px var(--display); color: #f5f5f7; }
html body .sd-list { border-top: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd-empty { margin: 0; padding: 22px 0; color: rgba(245, 245, 247, 0.5); font-size: 16px; line-height: 1.5; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd-empty strong { color: #f5f5f7; font-weight: 500; }
html body .sd-student { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd-st-main { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
html body .sd-av { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(159, 178, 228, 0.14); color: #dfe6ff; font: 500 17px var(--display); }
html body .sd-st-text { flex: 1; min-width: 0; }
html body .sd-st-text h3 { margin: 0 0 3px; font: 500 18px var(--ui); color: #f5f5f7; }
html body .sd-status { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; color: rgba(245, 245, 247, 0.55); }
html body .sd-bars { display: inline-flex; gap: 10px; }
html body .sd-bars em { font-style: normal; }
html body .sd-bars .is-hard { color: #f0b39a; }
html body .sd-bars .is-good { color: var(--navy-hi); }
html body .sd-st-act { display: flex; align-items: center; gap: 4px; flex: none; }
html body .sd-st-act .quiet { min-height: 36px; padding: 0 14px !important; border-radius: 999px !important; font-size: 15px !important; }
html body .sd-more { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: rgba(245, 245, 247, 0.35); font-size: 20px; cursor: pointer; }
html body .sd-more:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
html body .sd-prep { margin: 0 0 18px 54px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
html body .sd-prep[hidden] { display: none; }
html body .sd-prep ol { margin: 0; padding-left: 1.3em; }
html body .sd-prep li { margin: 0 0 8px; font-size: 16px; line-height: 1.5; color: #ececf0; }
html body .sd-prep li::marker { color: var(--navy-hi); font-style: italic; }
html body .sd-via, html body .sd-dim { margin: 6px 0 0; font-size: 13px; color: rgba(245, 245, 247, 0.45); }
html body .sd-add { display: flex; gap: 8px; margin-top: 14px; }
html body .sd-add input { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 12px; padding: 0 14px; background: rgba(118, 118, 128, 0.18); color: #f5f5f7; font: 400 16px var(--ui); }
html body .sd-add input:focus { outline: none; box-shadow: 0 0 0 2px rgba(159, 178, 228, 0.55); }
html body .sd-add button { height: 44px; padding: 0 18px !important; border-radius: 12px !important; }
html body .sd-hw { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd-hw h3 { margin: 0 0 3px; font: 500 17px var(--ui); color: #f5f5f7; }
html body .sd-hw h3 span { font-weight: 400; color: rgba(245, 245, 247, 0.55); }
html body .sd-hw p { margin: 0; font-size: 14px; color: rgba(245, 245, 247, 0.5); }
html body .sd-hw .sd-hw-status { font-size: 14px; color: rgba(245, 245, 247, 0.45); text-align: right; }
html body .sd-hw .sd-hw-status.is-done { color: var(--navy-hi); }
html body .sd-hw .sd-open { min-height: 34px; padding: 0 14px !important; border-radius: 999px !important; font-size: 14px !important; }
html body .sd-mail { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 6px; }
html body .sd-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
html body .sd-switch strong { display: block; font-weight: 500; font-size: 17px; color: #f5f5f7; }
html body .sd-switch small { display: block; margin-top: 3px; font-size: 14px; color: rgba(245, 245, 247, 0.5); }
html body .sd-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .sd-sw { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s ease; }
html body .sd-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
html body .sd-switch input:checked + .sd-sw { background: var(--navy-mid); }
html body .sd-switch input:checked + .sd-sw::after { transform: translateX(18px); }
html body .sd-switch:has(input:focus-visible) .sd-sw { outline: 2px solid #9fb2e4; outline-offset: 2px; }
html body .sd-mail-when { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 0 10px; }
html body .sd-mail-when[hidden] { display: none; }
html body .sd-days { display: inline-flex; gap: 4px; }
html body .sd-days button { width: 40px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: rgba(245, 245, 247, 0.6); font: 400 14px var(--ui); cursor: pointer; }
html body .sd-days button[aria-pressed="true"] { background: #f5f5f7; color: #10131a; }
html body .sd-hour { font-size: 15px; color: rgba(245, 245, 247, 0.6); }
html body .sd-hour select { margin-left: 6px; height: 34px; border: 0; border-radius: 10px; padding: 0 10px; background: rgba(118, 118, 128, 0.2); color: #f5f5f7; font: 400 15px var(--nums); }
html body .sd-note { margin: 4px 0 0; font-size: 14px; color: rgba(245, 245, 247, 0.45); }
@media (max-width: 640px) {
  html body .sd-st-main { flex-wrap: wrap; }
  html body .sd-st-act { width: 100%; padding-left: 54px; }
  html body .sd-prep { margin-left: 0; }
  html body .sd-hw { grid-template-columns: 1fr auto; }
  html body .sd-hw .sd-hw-status { grid-column: 1; text-align: left; }
}
html[data-theme="light"] body .studio-home { color: #111; }
html[data-theme="light"] body .studio-home :is(h1, h2, h3, strong) { color: #111 !important; }
html[data-theme="light"] body :is(.sd-list, .sd-student, .sd-hw, .sd-empty, .sd-mail) { border-color: rgba(0, 0, 0, 0.08) !important; }

/* the student's home: the teacher's homework first */
html body .member-homework { margin: 0 auto 18px; max-width: 640px; padding: 20px 22px; border-radius: 20px; background: rgba(159, 178, 228, 0.07); box-shadow: inset 0 0 0 1px rgba(159, 178, 228, 0.16); text-align: left; }
html body .member-homework[hidden] { display: none; }
html body .member-homework .mh-k { margin: 0 0 4px; font-size: 14px; font-style: italic; color: var(--navy-hi); }
html body .member-homework h2 { margin: 0 0 6px; font: 400 24px var(--display); color: #f5f5f7; }
html body .member-homework h2 span { color: rgba(245, 245, 247, 0.55); }
html body .member-homework .mh-note { margin: 0 0 14px; font-size: 16px; line-height: 1.5; color: rgba(245, 245, 247, 0.8); }
html body .member-homework .mh-act a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 999px; text-decoration: none; background: #f5f5f7; color: #10131a; font-size: 16px; }

/* sign in: student or teacher */
html body .auth-role { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px; margin: 0 0 16px; border: 0; border-radius: 12px; background: rgba(118, 118, 128, 0.22); }
html body .auth-role legend { grid-column: 1 / -1; padding: 0; margin: 0 0 8px; font-size: 14px; color: rgba(245, 245, 247, 0.6); }
html body .auth-role label { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-size: 16px; color: rgba(245, 245, 247, 0.75); cursor: pointer; }
html body .auth-role label:has(input:checked) { background: #f5f5f7; color: #10131a; }
html body .auth-role input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
html body .auth-role label:has(input:focus-visible) { outline: 2px solid #9fb2e4; outline-offset: 2px; }

/* the builder: tempo, goal and bar notes folded away */
html body #assign-dialog select { width: 100%; height: 46px; border: 0; border-radius: 12px; padding: 0 12px; background: rgba(118, 118, 128, 0.2); color: #f5f5f7; font: 400 16px var(--ui); }
html body #assign-dialog .as-more { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 10px; }
html body #assign-dialog .as-more summary { cursor: pointer; list-style: none; font-size: 15px; color: var(--navy-hi); padding: 4px 0; }
html body #assign-dialog .as-more summary::-webkit-details-marker { display: none; }
html body #assign-dialog .as-more summary::before { content: "+ "; }
html body #assign-dialog .as-more[open] summary::before { content: "− "; }
html body #assign-dialog .as-more > .as-field, html body #assign-dialog .as-more > .as-two { margin-top: 12px; }
html body #assign-dialog .as-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Assign on the score: teachers only */
html body:not(.is-teacher) #btn-assign { display: none !important; }
html body .hw .hw-meta { margin: -6px 0 12px !important; font-size: 15px; color: var(--navy-hi); }
html body .lr .lr-teacher { margin: 0 0 6px; font-size: 14px; font-style: italic; color: var(--navy-hi); }

/* ---------- landing: what Lune does, for students and for teachers ---------- */
html body .lp-show { max-width: 1120px; margin: 0 auto; padding: clamp(80px, 12vh, 140px) 24px; text-align: center; }
html body .lp-show > h2 { margin: 8px auto 30px !important; max-width: 16em; font: 400 clamp(36px, 4.6vw, 62px)/1.05 var(--display) !important; letter-spacing: -0.015em; color: #f5f5f7; text-wrap: balance; }
html body .lp-show-switch { display: inline-flex; padding: 4px; margin-bottom: 40px; border-radius: 999px; background: rgba(118, 118, 128, 0.22); }
html body .lp-show-switch button { min-width: 150px; height: 42px; border: 0; border-radius: 999px; background: transparent; color: rgba(245, 245, 247, 0.7); font: 400 17px var(--ui); cursor: pointer; transition: background 0.25s ease, color 0.25s ease; }
html body .lp-show-switch button[aria-selected="true"] { background: #f5f5f7; color: #10131a; }
html body .lp-show-switch button:focus-visible { outline: 2px solid #9fb2e4; outline-offset: 3px; }
html body .lp-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; animation: lr-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
html body .lp-bento[hidden] { display: none; }
html body .lp-tile { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 28px 28px 24px; border-radius: 28px; background: linear-gradient(180deg, #111420 0%, #10131a 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); overflow: hidden; }
html body .lp-tile-wide { grid-column: span 2; }
html body .lp-tile-k { margin: 0 0 10px; font-size: 14px; font-style: italic; color: var(--navy-hi); }
html body .lp-tile h3 { margin: 0 0 10px; font: 400 clamp(24px, 2.4vw, 32px)/1.12 var(--display); color: #f5f5f7; letter-spacing: -0.01em; }
html body .lp-tile p:not(.lp-tile-k) { margin: 0 0 22px; font-size: 16px; line-height: 1.5; color: rgba(245, 245, 247, 0.6); max-width: 30em; }
html body .lp-viz { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
html body .lp-viz-notes span { min-width: 48px; padding: 12px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); text-align: center; font: 500 22px var(--ui); color: #f5f5f7; }
html body .lp-viz-notes span i { margin-left: 4px; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 500 11px var(--nums); font-style: normal; color: #10131a; background: #c9d3f0; vertical-align: 3px; }
html body .lp-viz-notes span.on { background: var(--navy-mid); box-shadow: 0 10px 24px -10px rgba(159, 178, 228, 0.7); transform: translateY(-4px); }
html body .lp-viz-ladder b { min-width: 44px; padding: 8px 6px; border-radius: 999px; text-align: center; font: 400 14px var(--nums); color: rgba(245, 245, 247, 0.4); background: rgba(255, 255, 255, 0.04); }
html body .lp-viz-ladder b.done { color: var(--navy-hi); }
html body .lp-viz-ladder b.on { background: #f5f5f7; color: #10131a; }
html body .lp-viz-ladder em { display: inline-flex; gap: 6px; margin-left: 6px; padding-bottom: 10px; }
html body .lp-viz-ladder em i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(245, 245, 247, 0.35); }
html body .lp-viz-ladder em i.on { background: var(--navy-hi); box-shadow: 0 0 10px rgba(159, 178, 228, 0.6); }
html body .lp-viz-chat { flex-direction: column; align-items: stretch; }
html body .lp-viz-chat span { padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.4; max-width: 90%; }
html body .lp-viz-chat .me { align-self: flex-end; background: #23283a; color: #f5f5f7; }
html body .lp-viz-chat .lune { align-self: flex-start; color: rgba(245, 245, 247, 0.85); background: rgba(159, 178, 228, 0.08); }
html body .lp-viz-mail, html body .lp-viz-wa, html body .lp-viz-prep, html body .lp-viz-roster { flex-direction: column; align-items: stretch; gap: 0; padding: 16px 18px; border-radius: 16px; background: #fbfaf6; color: #14182a; }
html body .lp-viz-mail b, html body .lp-viz-wa b { font: 400 20px var(--display); margin-bottom: 8px; }
html body .lp-viz-mail span, html body .lp-viz-wa span, html body .lp-viz-prep span, html body .lp-viz-roster span { padding: 7px 0; border-top: 1px solid #e7e4dc; font-size: 15px; color: #2b2f3e; }
html body .lp-viz-wa { background: #e7ffdb; } html body .lp-viz-wa span { border-color: #cdebbd; }
html body .lp-viz-roster b, html body .lp-viz-prep span { color: #14182a; }
html body .lp-viz-roster em { font-style: normal; } html body .lp-viz-roster .h { color: #b5562f; } html body .lp-viz-roster .g { color: #22386e; }
html body .lp-viz-braille { font-size: 34px; letter-spacing: 0.08em; color: #dfe6ff; }
html body .lp-viz-days b { width: 38px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 400 14px var(--ui); color: rgba(245, 245, 247, 0.5); background: rgba(255, 255, 255, 0.05); }
html body .lp-viz-days b.on { background: #f5f5f7; color: #10131a; }
@media (max-width: 900px) { html body .lp-bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { html body .lp-bento { grid-template-columns: 1fr; } html body .lp-tile-wide { grid-column: auto; } html body .lp-tile { min-height: 0; } html body .lp-show-switch button { min-width: 0; padding: 0 20px; } }
html[data-theme="light"] body .lp-show > h2 { color: #111; }
html[data-theme="light"] body .lp-tile { background: #f4f4f6; box-shadow: none; }
html[data-theme="light"] body .lp-tile h3 { color: #111; }
html[data-theme="light"] body .lp-tile p:not(.lp-tile-k) { color: rgba(0, 0, 0, 0.6); }
html body #lune-room.lr { grid-template-columns: minmax(0, 1fr); }
html body #lune-room .lr-notes, html body #lune-room .lr-row { min-width: 0; }
@media (max-width: 640px) {
  html body #lune-room.lr { grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto; }
  html body .lr .lr-top { min-height: 44px; }
  html body .lr .lr-gl-more { display: none; }
  html body .lr .lr-goal-line { margin-bottom: 8px; font-size: 14px; }
  html body .lr .lr-goal-row { flex-wrap: nowrap; gap: 10px; }
  html body .lr .lr-step { min-width: 34px; height: 28px; font-size: 13px; }
  html body .lr .lr-msg { margin-top: 6px; font-size: 14px; min-height: 1.3em; }
  html body .lr .lr-notes { margin-bottom: 10px; }
  html body .lr .lr-controls { gap: 10px; }
  html body .lr .lr-tools { flex-wrap: nowrap; }
  html body .lr .lr-seg button { min-width: 54px; }
  html body .lr .lr-listen, html body .lr .lr-quiet, html body .lr .lr-main { height: 50px; }
}

/* ==========================================================================
   Studio, redesigned: an opening line, three numbers, student cards.
   ========================================================================== */
html body .studio-home { max-width: 1040px; padding: clamp(40px, 8vh, 88px) 24px 96px; }
html body .sd2-hero { margin-bottom: 64px; }
html body .sd2-kicker { margin: 0 0 10px; font-size: 15px; font-style: italic; color: var(--navy-hi); }
html body .sd2-hero h1 { margin: 0 0 14px !important; font: 400 clamp(40px, 5.4vw, 64px)/1.04 var(--display) !important; letter-spacing: -0.02em; color: #f5f5f7; }
html body .sd2-lede { margin: 0 0 34px; max-width: 36em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: rgba(245, 245, 247, 0.68); }
html body .sd2-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 620px; margin: 0 0 34px; border-top: 1px solid rgba(255, 255, 255, 0.09); }
html body .sd2-stats div { padding: 18px 0 0; }
html body .sd2-stats div + div { padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, 0.09); }
html body .sd2-stats b { display: block; font: 400 clamp(40px, 4.6vw, 56px)/1 var(--display); color: #f5f5f7; letter-spacing: -0.02em; }
html body .sd2-stats span { display: block; margin-top: 6px; font-size: 15px; color: rgba(245, 245, 247, 0.5); }
html body .sd2-cta { display: flex; gap: 10px; flex-wrap: wrap; }
html body .sd2-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: #f5f5f7; color: #10131a; font: 500 17px var(--ui); cursor: pointer; box-shadow: 0 12px 30px -14px rgba(159, 178, 228, 0.6); transition: transform 0.12s ease, background 0.2s ease; }
html body .sd2-primary:hover { background: #fff; }
html body .sd2-primary:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
html body .sd2-quiet { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: #f5f5f7; font: 400 15px var(--ui); cursor: pointer; transition: background 0.2s ease; }
html body .sd2-quiet:hover { background: rgba(255, 255, 255, 0.13); }
html body .sd2-cta .sd2-quiet { min-height: 48px; padding: 0 22px; font-size: 17px; }
html body :is(.sd2-primary, .sd2-quiet, .sd2-link, .sd2-x, .sd2-icon):active { transform: scale(0.97); }
html body :is(.sd2-primary, .sd2-quiet, .sd2-link, .sd2-x, .sd2-icon, .sd2-days button):focus-visible { outline: 2px solid #9fb2e4; outline-offset: 3px; }
html body .sd2-link { padding: 0; border: 0; background: none; color: var(--navy-hi); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(159, 178, 228, 0.4); }
html body .sd2-sec { margin-bottom: 56px; }
html body .sd2-head h2 { margin: 0 0 16px !important; font: 400 28px var(--display) !important; color: #f5f5f7; }

/* student cards */
html body .sd2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
html body .sd2-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 24px; background: linear-gradient(180deg, #12151f, #0c0e15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); transition: box-shadow 0.25s ease, transform 0.25s ease; }
html body .sd2-card:hover { box-shadow: inset 0 0 0 1px rgba(159, 178, 228, 0.22); }
html body .sd2-card.is-open { grid-column: 1 / -1; }
html body .sd2-card header { display: flex; align-items: center; gap: 12px; }
html body .sd2-av { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2d4483, #16244a); color: #eef1fa; font: 400 20px var(--display); box-shadow: 0 6px 18px -8px rgba(91, 116, 196, 0.8); }
html body .sd2-who { flex: 1; min-width: 0; }
html body .sd2-who h3 { margin: 0 !important; font: 500 19px var(--ui) !important; color: #f5f5f7; }
html body .sd2-who p { margin: 2px 0 0; font-size: 14px; color: rgba(245, 245, 247, 0.5); }
html body .sd2-x { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(245, 245, 247, 0.3); cursor: pointer; opacity: 0; transition: opacity 0.2s ease, background 0.2s ease; }
html body .sd2-card:hover .sd2-x, html body .sd2-x:focus-visible { opacity: 1; }
html body .sd2-x:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
@media (hover: none) { html body .sd2-x { opacity: 1; } }
html body .sd2-status { margin: 0 !important; font-size: 15px; color: rgba(245, 245, 247, 0.72); }
html body .sd2-card.is-quiet .sd2-status { color: rgba(245, 245, 247, 0.45); }
html body .sd2-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
html body .sd2-chips span { min-width: 30px; height: 28px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 9px; font: 500 14px var(--nums); }
html body .sd2-chips .is-hard { background: rgba(240, 160, 130, 0.14); color: #f3b9a2; }
html body .sd2-chips .is-good { background: rgba(159, 178, 228, 0.14); color: #c9d3f0; }
html body .sd2-chips .is-none { padding: 0; font: 400 14px var(--ui); color: rgba(245, 245, 247, 0.35); background: none; place-items: start; }
html body .sd2-card footer { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
html body .sd2-card footer .sd2-quiet { flex: 1; }
html body .sd2-prep { padding: 16px 18px; border-radius: 16px; background: rgba(159, 178, 228, 0.07); animation: lr-rise 0.35s ease both; }
html body .sd2-prep[hidden] { display: none; }
html body .sd2-prep-k { margin: 0 0 8px; font-size: 13px; font-style: italic; color: var(--navy-hi); }
html body .sd2-prep ol { margin: 0; padding-left: 1.3em; }
html body .sd2-prep li { margin: 0 0 8px; font-size: 16px; line-height: 1.5; color: #ececf0; }
html body .sd2-prep li::marker { color: var(--navy-hi); font-style: italic; }
html body .sd2-via, html body .sd2-dim { margin: 6px 0 0; font-size: 13px; color: rgba(245, 245, 247, 0.45); }
html body .sd2-add { justify-content: center; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.08); background: transparent; }
html body .sd2-add:focus-within { box-shadow: inset 0 0 0 1.5px rgba(159, 178, 228, 0.45); }
html body .sd2-av-add { background: rgba(255, 255, 255, 0.06); box-shadow: none; color: rgba(245, 245, 247, 0.6); font-family: var(--ui); }
html body .sd2-add-k { font: 500 17px var(--ui); color: #f5f5f7; }
html body .sd2-add input { height: 44px; border: 0; border-radius: 12px; padding: 0 14px; background: rgba(118, 118, 128, 0.18); color: #f5f5f7; font: 400 16px var(--ui); }
html body .sd2-add input:focus { outline: none; }
html body .sd2-add .sd2-quiet { align-self: flex-start; }
html body .sd2-add-note { margin: 0 !important; font-size: 13px; color: rgba(245, 245, 247, 0.4); }

/* homework */
html body .sd2-hw { border-top: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd2-hw-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
html body .sd2-hw-row h3 { margin: 0 0 3px !important; font: 500 17px var(--ui) !important; color: #f5f5f7; }
html body .sd2-hw-row h3 span { font-weight: 400; color: rgba(245, 245, 247, 0.5); }
html body .sd2-hw-row p { margin: 0 !important; font-size: 14px; color: rgba(245, 245, 247, 0.5); }
html body .sd2-pill { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: rgba(245, 245, 247, 0.55); background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
html body .sd2-pill.is-done { color: #dfe6ff; background: rgba(34, 56, 110, 0.6); }
html body .sd2-icon { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #f5f5f7; cursor: pointer; }
html body .sd2-empty { margin: 0; padding: 22px 0; font-size: 16px; color: rgba(245, 245, 247, 0.5); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

/* the email */
html body .sd2-mail { padding: 6px 22px 18px; border-radius: 24px; background: linear-gradient(180deg, #12151f, #0c0e15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
html body .sd2-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; cursor: pointer; }
html body .sd2-switch strong { display: block; font: 500 17px var(--ui); color: #f5f5f7; }
html body .sd2-switch small { display: block; margin-top: 3px; font-size: 14px; color: rgba(245, 245, 247, 0.5); }
html body .sd2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .sd2-sw { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s ease; }
html body .sd2-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.6, 1); }
html body .sd2-switch input:checked + .sd2-sw { background: #3a5aa8; }
html body .sd2-switch input:checked + .sd2-sw::after { transform: translateX(20px); }
html body .sd2-switch:has(input:focus-visible) .sd2-sw { outline: 2px solid #9fb2e4; outline-offset: 2px; }
html body .sd2-when { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 4px 0 10px; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 14px; }
html body .sd2-when[hidden] { display: none; }
html body .sd2-days { display: inline-flex; gap: 4px; }
html body .sd2-days button { width: 40px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: rgba(245, 245, 247, 0.55); font: 400 14px var(--ui); cursor: pointer; transition: background 0.2s ease; }
html body .sd2-days button[aria-pressed="true"] { background: #f5f5f7; color: #10131a; }
html body .sd2-hour { font-size: 15px; color: rgba(245, 245, 247, 0.6); }
html body .sd2-hour select { margin-left: 6px; height: 36px; border: 0; border-radius: 10px; padding: 0 10px; background: rgba(118, 118, 128, 0.2); color: #f5f5f7; font: 400 15px var(--nums); }
html body .sd2-note { margin: 8px 0 0 !important; font-size: 14px; color: rgba(245, 245, 247, 0.45); }
html body .sd2-foot { text-align: center; font-size: 15px; }

/* send homework: the sheet */
html body dialog.sd2-sheet { width: min(480px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 26px; background: var(--g-card, #0f121b); color: #f5f5f7; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
html body dialog.sd2-sheet::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
html body .sd2-sheet-in { padding: 22px 22px 20px; }
html body .sd2-sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
html body .sd2-sheet h2 { margin: 0 !important; font: 400 28px var(--display) !important; }
html body .sd2-sheet .sd2-x { opacity: 1; background: rgba(255, 255, 255, 0.07); color: rgba(245, 245, 247, 0.7); }
html body .sd2-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
html body .sd2-field span, html body .sd2-sheet-k { font-size: 14px; color: rgba(245, 245, 247, 0.55); }
html body .sd2-field select { height: 46px; border: 0; border-radius: 12px; padding: 0 12px; background: rgba(118, 118, 128, 0.2); color: #f5f5f7; font: 400 16px var(--ui); }
html body .sd2-sheet-k { margin: 0 0 8px; }
html body .sd2-pieces { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
html body .sd2-pieces button { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 10px; padding: 12px 16px; border: 0; background: transparent; color: #f5f5f7; text-align: left; cursor: pointer; }
html body .sd2-pieces button + button { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
html body .sd2-pieces button:hover { background: rgba(255, 255, 255, 0.05); }
html body .sd2-pieces strong { font: 500 16px var(--ui); }
html body .sd2-pieces span { grid-row: 2; font-size: 13px; color: rgba(245, 245, 247, 0.5); }
html body .sd2-pieces svg { grid-row: 1 / span 2; grid-column: 2; color: rgba(245, 245, 247, 0.35); }
html body .sd2-pieces .sd2-find strong { color: var(--navy-hi); }
html body .sd2-sheet-foot { margin: 14px 0 0 !important; font-size: 13px; color: rgba(245, 245, 247, 0.45); text-align: center; }

/* on the score: the guide while bars are chosen */
html body .sd2-guide { position: fixed; z-index: 70; left: 50%; bottom: max(96px, calc(env(safe-area-inset-bottom) + 96px)); translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-radius: 999px; background: rgba(16, 18, 26, 0.94); backdrop-filter: blur(20px); box-shadow: 0 0 0 1px rgba(159, 178, 228, 0.25), 0 20px 50px -20px rgba(0, 0, 0, 0.9); color: #f5f5f7; animation: lr-rise 0.35s ease both; }
html body .sd2-guide[hidden] { display: none; }
html body .sd2-guide p { margin: 0 8px 0 0; display: flex; flex-direction: column; line-height: 1.25; }
html body .sd2-guide strong { font: 500 15px var(--ui); }
html body .sd2-guide span { font-size: 13px; color: rgba(245, 245, 247, 0.6); }
html body .sd2-guide .sd2-primary { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* the Studio tour */
html body .sd2-tour { position: fixed; inset: 0; z-index: 90; }
html body .sd2-tour[hidden] { display: none; }
html body .sd2-tour-ring { position: fixed; border-radius: 24px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62), 0 0 0 2px rgba(159, 178, 228, 0.6); transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1); pointer-events: none; }
html body .sd2-tour-card { position: fixed; width: min(360px, calc(100vw - 32px)); padding: 20px 22px; border-radius: 22px; background: #f5f5f7; color: #111114; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8); transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1), left 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
html body .sd2-tour-k { margin: 0 0 6px; font-size: 13px; color: #5b6aa0; font-style: italic; }
html body .sd2-tour-card h3 { margin: 0 0 6px !important; font: 400 24px var(--display) !important; color: #111114 !important; }
html body .sd2-tour-card p:not(.sd2-tour-k) { margin: 0 0 16px; font-size: 16px; line-height: 1.5; color: #3a3a40; }
html body .sd2-tour-act { display: flex; justify-content: flex-end; gap: 8px; }
html body .sd2-tour-card .sd2-primary { background: var(--g-card, #111114); color: #fff; min-height: 40px; padding: 0 18px; font-size: 15px; box-shadow: none; }
html body .sd2-tour-card .sd2-quiet { background: rgba(0, 0, 0, 0.06); color: #111114; }

@media (max-width: 640px) {
  html body .studio-home { padding: 32px 16px 80px; }
  html body .sd2-stats div + div { padding-left: 14px; }
  html body .sd2-stats span { font-size: 13px; }
  html body .sd2-cta > * { flex: 1; }
  html body .sd2-grid { grid-template-columns: 1fr; }
  html body .sd2-hw-row { grid-template-columns: 1fr auto; }
  html body .sd2-hw-row .sd2-icon { display: none; }
  html body .sd2-mail { padding: 4px 16px 14px; }
  html body .sd2-guide { left: 12px; right: 12px; translate: none; }
}
@media (prefers-reduced-motion: reduce) { html body :is(.sd2-tour-ring, .sd2-tour-card, .sd2-prep, .sd2-guide) { transition: none; animation: none; } }

/* ==========================================================================
   Bar panel, drawn dark on purpose (no colour flip): actions first, then
   how to practise it, how it went, the notes, and a quiet Ask Lune field
   ========================================================================== */
html body #coach {
  --cp-bg: #0f1118; --cp-raise: rgba(255, 255, 255, 0.055); --cp-raise-2: rgba(255, 255, 255, 0.1);
  --cp-line: rgba(255, 255, 255, 0.08); --cp-text: #f2f2f5; --cp-dim: rgba(235, 235, 245, 0.64);
  --cp-faint: rgba(235, 235, 245, 0.55); --cp-accent: #dde5f2; --cp-accent-ink: #10131a;
  filter: none !important; background: var(--cp-bg) !important; color: var(--cp-text) !important;
  border: 0 !important; border-left: 1px solid var(--cp-line) !important; box-shadow: none !important;
  border-radius: 0 !important;
}
html[data-theme="light"] body #coach {
  --cp-bg: #ffffff; --cp-raise: #f3f3f6; --cp-raise-2: #e9e9ee; --cp-line: rgba(0, 0, 0, 0.08);
  --cp-text: #1c1c1e; --cp-dim: rgba(60, 60, 67, 0.82); --cp-faint: rgba(60, 60, 67, 0.7);
  --cp-accent: #1d2b52; --cp-accent-ink: #ffffff;
}
html body #coach [hidden] { display: none !important; }
html body #coach .coach-sheet { background: transparent !important; }
html body #coach .coach-head { order: 0; padding: 22px 22px 14px !important; border: 0 !important; align-items: flex-start !important; }
html body #coach .coach-kicker { display: none !important; }
html body #coach .coach-title { font: 500 30px/1.1 var(--display, var(--ui)) !important; color: var(--cp-text) !important; letter-spacing: -0.01em !important; margin: 0 !important; }
html body #coach .coach-diff {
  background: none !important; border: 0 !important; padding: 0 !important; margin: 6px 0 0 !important;
  font: 400 14px/1.3 var(--ui) !important; color: var(--cp-dim) !important; text-transform: none !important; letter-spacing: 0 !important;
}
html body #coach .coach-diff::first-letter { text-transform: uppercase; }
html body #coach .coach-close {
  width: 32px !important; height: 32px !important; min-height: 0 !important; border-radius: 50% !important; padding: 0 !important;
  background: var(--cp-raise) !important; color: var(--cp-dim) !important; border: 0 !important; display: grid !important; place-items: center !important;
}
html body #coach .coach-close:hover { background: var(--cp-raise-2) !important; color: var(--cp-text) !important; }
html body #coach .coach-close svg { width: 14px !important; height: 14px !important; }
html body #coach .coach-handle { background: var(--cp-raise-2) !important; }

/* Play and Practise sit right under the title */
html body #coach .help-actions {
  order: 1; display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important;
  padding: 0 22px 18px !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
  position: static !important;
}
html body #coach .help-actions > button:not([hidden]) {
  height: 44px !important; min-height: 44px !important; border-radius: 12px !important; padding: 0 14px !important; margin: 0 !important;
  font: 600 15px var(--ui) !important; letter-spacing: 0 !important; border: 0 !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; width: 100% !important;
  transition: background-color .15s ease, transform .1s ease !important;
}
html body #coach .help-actions > button:active { transform: scale(0.98); }
html body #coach #btn-hear { background: var(--cp-accent) !important; color: var(--cp-accent-ink) !important; }
html body #coach #btn-hear::before {
  content: ""; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor; margin-left: 2px;
}
html body #coach #btn-hear.is-playing::before, html body #coach #btn-hear[aria-pressed="true"]::before {
  border: 0; width: 10px; height: 12px; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%);
}
html body #coach #btn-practise-bar { background: var(--cp-raise) !important; color: var(--cp-text) !important; }
html body #coach #btn-practise-bar:hover { background: var(--cp-raise-2) !important; }

html body #coach #help-body { order: 2; padding: 6px 22px 32px !important; border-top: 1px solid var(--cp-line) !important; background: transparent !important; color: var(--cp-text) !important; }
html body #coach #help-body h4, html body #coach #help-body .lp-h {
  font: 600 13px/1.2 var(--ui) !important; color: var(--cp-faint) !important; text-transform: none !important; letter-spacing: 0.01em !important;
  margin: 22px 0 10px !important; padding: 0 !important; border: 0 !important;
}
html body #coach #help-body h4:has(+ .coach-advice) { margin-top: 18px !important; }
html body #coach .coach-advice { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
html body #coach .coach-advice p { color: var(--cp-text) !important; font: 400 17px/1.55 var(--ui) !important; margin: 0 !important; border: 0 !important; padding: 0 !important; }

/* how it went: one segmented control */
html body #coach .lp-rate { background: none !important; border: 0 !important; padding: 0 !important; }
html body #coach .lp-grades {
  display: grid !important; grid-template-columns: repeat(5, 1fr) !important; gap: 2px !important;
  background: var(--cp-raise) !important; border-radius: 11px !important; padding: 3px !important; border: 0 !important;
}
html body #coach .lp-grade {
  height: 34px !important; min-height: 0 !important; padding: 0 2px !important; border-radius: 8px !important; border: 0 !important;
  background: transparent !important; color: var(--cp-dim) !important; font: 500 13.5px var(--ui) !important; box-shadow: none !important;
  transition: background-color .15s ease, color .15s ease !important;
}
html body #coach .lp-grade:hover { color: var(--cp-text) !important; background: var(--cp-raise) !important; }
html body #coach .lp-grade.picked { background: var(--cp-accent) !important; color: var(--cp-accent-ink) !important; font-weight: 600 !important; }
html body #coach .lp-due { font: 400 13px/1.45 var(--ui) !important; color: var(--cp-faint) !important; margin: 10px 2px 0 !important; }

/* notes: quiet chips, finger numbers as small superscripts */
html body #coach .hand-label { font: 500 13px var(--ui) !important; color: var(--cp-dim) !important; margin: 4px 0 6px !important; text-transform: none !important; letter-spacing: 0 !important; }
html body #coach .notes { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; margin: 0 0 10px !important; }
html body #coach .chip.letter {
  background: var(--cp-raise) !important; border: 0 !important; color: var(--cp-text) !important; border-radius: 10px !important;
  padding: 6px 9px !important; font: 500 14px/1.3 var(--ui) !important; box-shadow: none !important; display: inline-flex !important; flex-direction: column !important; gap: 1px !important;
}
html body #coach .chord-tone { display: flex !important; align-items: baseline !important; gap: 3px !important; }
html body #coach .tone-letter { color: var(--cp-text) !important; font-weight: 500 !important; }
html body #coach .tone-finger {
  color: var(--cp-accent) !important; border: 0 !important; background: none !important; font: 600 10.5px var(--ui) !important;
  font-style: normal !important; padding: 0 !important; min-width: 0 !important; height: auto !important; transform: translateY(-4px);
}

/* Ask Lune: a single rounded field like Claude's composer */
html body #coach .lp-askbar {
  display: flex !important; align-items: center !important; gap: 4px !important; min-height: 48px !important;
  padding: 4px 5px 4px 16px !important; border-radius: 24px !important; background: var(--cp-raise) !important;
  border: 1px solid var(--cp-line) !important; box-shadow: none !important; transition: border-color .15s ease !important;
}
html body #coach .lp-askbar:focus-within { border-color: color-mix(in srgb, var(--cp-accent) 55%, transparent) !important; }
html body #coach .lp-askbar-orb { display: none !important; }
html body #coach #lp-ask-input {
  flex: 1 1 auto !important; min-width: 0 !important; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important;
  color: var(--cp-text) !important; font: 400 15.5px var(--ui) !important; padding: 0 !important; height: 38px !important;
}
html body #coach #lp-ask-input::placeholder { color: var(--cp-faint) !important; }
html body #coach .lp-askbar .lc-tool { width: 34px !important; height: 34px !important; border-radius: 50% !important; background: transparent !important; color: var(--cp-dim) !important; border: 0 !important; display: grid !important; place-items: center !important; padding: 0 !important; }
html body #coach .lp-askbar .lc-tool:hover { background: var(--cp-raise-2) !important; color: var(--cp-text) !important; }
html body #coach .lp-askbar .lc-round { width: 36px !important; height: 36px !important; border-radius: 50% !important; background: var(--cp-accent) !important; color: var(--cp-accent-ink) !important; border: 0 !important; display: grid !important; place-items: center !important; padding: 0 !important; flex: 0 0 auto !important; }
html body #coach .lp-askbar svg { width: 17px !important; height: 17px !important; }

/* note field */
html body #coach .lp-note-form { display: flex !important; gap: 8px !important; align-items: flex-end !important; }
html body #coach .lp-note-grow { flex: 1 1 auto !important; position: relative !important; background: var(--cp-raise) !important; border-radius: 14px !important; border: 1px solid transparent !important; display: flex !important; align-items: center !important; }
html body #coach .lp-note-grow:focus-within { border-color: var(--cp-line) !important; }
html body #coach #lp-note-input {
  flex: 1 1 auto !important; background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; resize: none !important;
  color: var(--cp-text) !important; font: 400 15px/1.4 var(--ui) !important; padding: 11px 6px 11px 14px !important; min-height: 44px !important;
}
html body #coach #lp-note-input::placeholder { color: var(--cp-faint) !important; }
html body #coach .lp-mic { background: transparent !important; color: var(--cp-dim) !important; border: 0 !important; width: 36px !important; height: 36px !important; border-radius: 50% !important; }
html body #coach .lp-save {
  height: 44px !important; min-height: 0 !important; border-radius: 12px !important; padding: 0 16px !important; border: 0 !important;
  background: var(--cp-raise-2) !important; color: var(--cp-text) !important; font: 600 14.5px var(--ui) !important;
}
html body #coach .lp-notes { list-style: none !important; padding: 0 !important; margin: 0 0 8px !important; display: grid !important; gap: 6px !important; }
html body #coach .lp-notes li { background: var(--cp-raise) !important; border: 0 !important; border-radius: 12px !important; padding: 10px 12px !important; color: var(--cp-text) !important; font: 400 14.5px/1.45 var(--ui) !important; }
html body #coach .lp-notes li * { color: inherit; }
html body #coach .lp-notes li :is(small, time, .dim, button) { color: var(--cp-faint) !important; background: none !important; border: 0 !important; }
html body #coach .lp-teacher { background: var(--cp-raise) !important; border: 0 !important; border-radius: 14px !important; padding: 12px 14px !important; color: var(--cp-text) !important; margin: 14px 0 0 !important; order: 0; }
html body #coach .lp-teacher * { color: inherit !important; }

/* small extras at the end */
html body #coach #help-body .lp-tools { gap: 6px !important; margin-top: 16px !important; }
html body #coach #help-body .lp-tools button {
  background: transparent !important; border: 1px solid var(--cp-line) !important; color: var(--cp-dim) !important;
  min-height: 32px !important; border-radius: 999px !important; font: 500 13.5px var(--ui) !important;
}
html body #coach #help-body .lp-tools button:hover { color: var(--cp-text) !important; background: var(--cp-raise) !important; }

/* scrollbars inside the panel stay out of the way */
html body #coach #help-body { scrollbar-width: thin; scrollbar-color: var(--cp-raise-2) transparent; }
html body #coach .chip.letter:not(.chord) { flex-direction: row !important; align-items: baseline !important; gap: 3px !important; }
html body #coach .chip.letter .tone-finger { transform: none !important; vertical-align: super !important; font-size: 10.5px !important; line-height: 1 !important; }
html body #coach .chip.letter.chord { padding: 5px 9px !important; }
html body #coach .lp-askbar button[hidden], html body #coach .help-actions > button[hidden], html body #coach #help-body [hidden] { display: none !important; }

/* Score toolbar: labels never wrap; the extra toggles drop to their own row under the main one */
html body .score-tools-head :is(button, .lp-tool-label, .access-chip, .anno-opt span, .kbd-tog-label, .pedal-tog-label) { white-space: nowrap !important; }
html body:not(.studio-compact) .score-tools-head.tools-open { flex-wrap: wrap !important; row-gap: 4px !important; justify-content: center !important; border-radius: 22px !important; }
html body:not(.studio-compact) .score-tools-head.tools-open #score-toggles { display: contents !important; }
html body:not(.studio-compact) .score-tools-head .anno-control { order: 0; }
html body:not(.studio-compact) .score-tools-head .lp-tools-bar { order: 1; flex: 0 0 auto !important; }
html body:not(.studio-compact) .score-tools-head.tools-open::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
html body:not(.studio-compact) .score-tools-head.tools-open :is(#score-access, #btn-toggle-kbd, #btn-pedal) { order: 3; }
html body:not(.studio-compact) .score-tools-head.tools-open #score-access { display: flex !important; gap: 2px !important; }

/* Practice room: the title chooses the bars; Listen pauses and resumes */
html body .lr .lr-pickbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 14px; margin: 0; border: 0; border-radius: 999px;
  background: transparent; color: inherit; font: inherit; cursor: pointer; transition: background-color .15s ease;
}
html body .lr .lr-pickbtn:hover, html body .lr .lr-pickbtn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.07); }
html body .lr .lr-pickbtn svg { opacity: 0.55; transition: transform .2s ease; }
html body .lr .lr-pickbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
html body .lr .lr-picker {
  position: absolute; z-index: 5; top: calc(max(10px, env(safe-area-inset-top)) + 64px); left: 50%; transform: translateX(-50%);
  width: min(520px, calc(100vw - 28px)); max-width: none; margin: 0; padding: 18px 18px 16px; border-radius: 20px;
  background: rgba(22, 25, 36, 0.96); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: lr-pk-in .22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html body .lr .lr-picker[hidden] { display: none !important; }
@keyframes lr-pk-in { from { opacity: 0; transform: translate(-50%, -6px) scale(0.98); } to { opacity: 1; transform: translateX(-50%); } }
html body .lr .lr-pk-head { text-align: center; margin-bottom: 12px; }
html body .lr .lr-pk-title { margin: 0; font: 600 17px var(--ui); color: #f5f5f7; }
html body .lr .lr-pk-hint { margin: 4px 0 0; font: 400 14px var(--ui); color: rgba(235, 235, 245, 0.6); }
html body .lr .lr-pk-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: min(260px, 42vh); overflow-y: auto; padding: 2px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
html body .lr .lr-pk-grid button {
  position: relative; height: 40px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 247, 0.85); font: 500 15px var(--nums, var(--ui)); cursor: pointer; transition: background-color .12s ease, color .12s ease;
}
html body .lr .lr-pk-grid button:hover { background: rgba(255, 255, 255, 0.11); }
html body .lr .lr-pk-grid button.is-in { background: rgba(159, 178, 228, 0.22); color: #fff; }
html body .lr .lr-pk-grid button:is(.is-a, .is-b) { background: #f5f5f7; color: #10131a; font-weight: 600; }
html body .lr .lr-pk-grid button.is-hard::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: #e8a87c;
}
html body .lr .lr-pk-act { display: flex; gap: 8px; margin-top: 14px; }
html body .lr .lr-pk-act .lr-quiet, html body .lr .lr-pk-act .lr-main { height: 46px; font-size: 16px; box-shadow: none; }
html body .lr .lr-pk-act .lr-quiet { flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }

html body .lr .lr-play { display: inline-flex; align-items: center; gap: 6px; }
html body .lr .lr-listen { min-width: 140px; transition: background-color .15s ease; }
html body .lr .lr-listen.is-on { background: rgba(159, 178, 228, 0.22); }
html body .lr .lr-restart {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: rgba(245, 245, 247, 0.75); cursor: pointer; animation: lr-pk-pop .2s ease both;
}
html body .lr .lr-restart:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
@keyframes lr-pk-pop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  html body .lr .lr-play { flex: 1; }
  html body .lr .lr-play .lr-listen { flex: 1; }
  html body .lr .lr-pk-grid { grid-template-columns: repeat(6, 1fr); }
  html body .lr .lr-picker { top: calc(max(10px, env(safe-area-inset-top)) + 54px); }
}
html body #lune-room > .lr-picker { width: min(520px, calc(100vw - 28px)); max-width: none; margin: 0; }
html body #lune-room > .lr-picker { z-index: 50; background: #161924; backdrop-filter: none; -webkit-backdrop-filter: none; }
html body #lune-room #lr-stage { isolation: isolate; z-index: 0; }
html body #lune-room #lr-stage .lr-sheet { z-index: auto !important; }

/* a button at work: the moon in the button's own text colour, never a white blot */
html body button.is-busy::after { background: var(--busy-c, currentColor) !important; opacity: 0.9; }
html body button.is-busy { transition: none !important; }
html body #panel-score.is-engraving .score-scroll::before {
  width: 96px !important; height: 3px !important; margin-left: -48px !important; border-radius: 3px !important;
  background: linear-gradient(90deg, transparent, rgba(221, 229, 242, 0.55), transparent) 0 0 / 200% 100% !important;
  opacity: 1 !important; animation: lune-engrave-line 1.4s ease-in-out infinite !important;
}
html[data-theme="light"] body #panel-score.is-engraving .score-scroll::before {
  background: linear-gradient(90deg, transparent, rgba(29, 43, 82, 0.4), transparent) 0 0 / 200% 100% !important;
}
@keyframes lune-engrave-line { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* the opening screen: the moon breathing over a thin line of light (no bright keys) */
html body .lune-loader { background: var(--bg, #000) !important; animation-delay: 0.25s !important; }
html body .lune-loader-stage { gap: 18px !important; }
html body .lune-loader-mark { width: 30px !important; height: 30px !important; color: #e9ecf7 !important; opacity: 1 !important; animation: lune-breathe 2.2s ease-in-out infinite !important; }
html[data-theme="light"] body .lune-loader-mark { color: #1d2b52 !important; }
html body .lune-loader-keys { width: 120px !important; height: 2px !important; gap: 0 !important; border-radius: 2px !important; overflow: hidden !important;
  background: linear-gradient(90deg, transparent, rgba(221, 229, 242, 0.7), transparent) 0 0 / 200% 100% !important; animation: lune-engrave-line 1.4s ease-in-out infinite !important; }
html[data-theme="light"] body .lune-loader-keys { background: linear-gradient(90deg, transparent, rgba(29, 43, 82, 0.45), transparent) 0 0 / 200% 100% !important; }
html body .lune-loader-keys > * { display: none !important; }
html body .lune-loader-text { font: 400 15px var(--ui) !important; letter-spacing: 0 !important; text-transform: none !important; -webkit-text-fill-color: currentColor !important; background: none !important; color: rgba(235, 235, 245, 0.55) !important; animation: none !important; }
html[data-theme="light"] body .lune-loader-text { color: rgba(60, 60, 67, 0.6) !important; }
@keyframes lune-breathe { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { html body .lune-loader-mark, html body .lune-loader-keys { animation: none !important; } }

/* sign-up: who Lune is for, as two clear cards */
html body .auth-role { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; padding: 0 !important; background: none !important; border: 0 !important; margin: 0 0 18px !important; }
html body .auth-role legend { margin: 0 0 10px !important; font: 500 14px var(--ui) !important; color: rgba(235, 235, 245, 0.6) !important; }
html body .auth-role label {
  display: flex !important; place-items: initial !important; align-items: center !important; min-height: 60px !important; padding: 12px 16px 12px 46px !important;
  border-radius: 14px !important; background: rgba(255, 255, 255, 0.05) !important; color: #f5f5f7 !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  transition: background-color .15s ease, box-shadow .15s ease !important; text-align: left !important;
}
html body .auth-role label::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(235, 235, 245, 0.35); transition: box-shadow .15s ease;
}
html body .auth-role label:has(input:checked) { background: rgba(221, 229, 242, 0.1) !important; color: #fff !important; box-shadow: inset 0 0 0 1.5px #dde5f2 !important; }
html body .auth-role label:has(input:checked)::before { box-shadow: inset 0 0 0 5.5px #dde5f2; }
html body .auth-role label > span { display: flex; flex-direction: column; gap: 2px; }
html body .auth-role label b { font: 600 16px var(--ui); }
html body .auth-role label small { font: 400 13.5px var(--ui); color: rgba(235, 235, 245, 0.6); }
html[data-theme="light"] body .auth-role label { background: #f4f4f6 !important; color: #1c1c1e !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06) !important; }
html[data-theme="light"] body .auth-role label:has(input:checked) { background: rgba(29, 43, 82, 0.06) !important; color: #1c1c1e !important; box-shadow: inset 0 0 0 1.5px #1d2b52 !important; }
html[data-theme="light"] body .auth-role label:has(input:checked)::before { box-shadow: inset 0 0 0 5.5px #1d2b52; }
html[data-theme="light"] body .auth-role label small, html[data-theme="light"] body .auth-role legend { color: rgba(60, 60, 67, 0.65) !important; }

/* Studio: a student, and their homework email */
html body .sd2-add { cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
html body .sd2-add:hover { background: rgba(255, 255, 255, 0.03); }
html body .sd2-add .sd2-add-note { font: 400 14px/1.45 var(--ui); color: rgba(235, 235, 245, 0.55); }
html body .sd2-card header .sd2-edit { margin-left: auto; }
html body .sd2-card header .sd2-edit + .sd2-x { margin-left: 4px; }
html body .sd2-mailline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; font: 400 14px/1.4 var(--ui); color: rgba(235, 235, 245, 0.6); }
html body .sd2-mailline svg { flex: none; opacity: 0.7; }
html body .sd2-mailline .sd2-link { padding: 0; font-size: 14px; }
html body .sd2-mailline span + .sd2-link::before { content: "·"; margin-right: 6px; color: rgba(235, 235, 245, 0.35); }

html body dialog#sd2-student { width: min(520px, calc(100vw - 24px)); }
html body .sd2-stu .sd2-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
html body .sd2-stu .sd2-field { margin-bottom: 14px; }
html body .sd2-stu .sd2-field span i { font-style: normal; color: rgba(235, 235, 245, 0.38); }
html body .sd2-stu .sd2-field input, html body .sd2-stu .sd2-field select {
  height: 46px; width: 100%; box-sizing: border-box; border: 1px solid transparent; border-radius: 12px; padding: 0 14px;
  background: rgba(118, 118, 128, 0.2); color: #f5f5f7; font: 400 16px var(--ui); outline: none; transition: border-color .15s ease;
}
html body .sd2-stu .sd2-field input:focus, html body .sd2-stu .sd2-field select:focus { border-color: rgba(221, 229, 242, 0.55); }
html body .sd2-stu .sd2-field input::placeholder { color: rgba(235, 235, 245, 0.3); }
html body .sd2-sched { margin: 4px 0 0; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); transition: opacity .2s ease; }
html body .sd2-sched.is-dim { opacity: 0.55; }
html body .sd2-sched-k { margin: 0 0 10px; font: 600 15px var(--ui); color: #f5f5f7; }
html body .sd2-stu .sd2-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 11px; background: rgba(118, 118, 128, 0.22); margin-bottom: 12px; }
html body .sd2-stu .sd2-seg label { position: relative; display: grid; place-items: center; height: 34px; border-radius: 8px; font: 500 14px var(--ui); color: rgba(235, 235, 245, 0.7); cursor: pointer; white-space: nowrap; }
html body .sd2-stu .sd2-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
html body .sd2-stu .sd2-seg label:has(input:checked) { background: #f5f5f7; color: #10131a; }
html body .sd2-stu .sd2-seg label:has(input:focus-visible) { outline: 2px solid #9fb2e4; outline-offset: 1px; }
html body .sd2-stu .sd2-seg label:has(input:disabled) { cursor: default; }
html body .sd2-sched-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html body .sd2-sched-when[hidden] { display: none; }
html body .sd2-sched-when .sd2-field { margin-bottom: 0; }
html body .sd2-sched-when .sd2-day[hidden] { display: none; }
html body .sd2-sched-when:has(.sd2-day[hidden]) { grid-template-columns: 1fr; }
html body .sd2-sched-note { margin: 12px 0 0; font: 400 14px/1.5 var(--ui); color: rgba(235, 235, 245, 0.6); }
html body .sd2-err { min-height: 1.2em; margin: 10px 2px 0; font: 400 14px var(--ui); color: #f2a7a0; }
html body .sd2-err:empty { min-height: 0; margin: 0; }
html body .sd2-stu-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
html body .sd2-stu-act button { height: 44px; padding: 0 20px; }
@media (max-width: 520px) {
  html body .sd2-stu .sd2-pair { grid-template-columns: 1fr; gap: 0; }
  html body .sd2-stu-act button { flex: 1; }
}

/* homework dialog: Email it now */
html body #assign-dialog .as-mail { width: 100%; height: 48px; margin: 0 0 8px; border-radius: 14px; font: 600 16px var(--ui); }
html body #assign-dialog .as-mail.is-sent { background: rgba(159, 178, 228, 0.2) !important; color: #fff !important; }
html body #assign-dialog .as-mail-note { margin: 0 0 14px; font: 400 14px/1.5 var(--ui); color: rgba(235, 235, 245, 0.6); text-align: center; }
html body #home-studio .sd2-card p.sd2-mailline { display: flex !important; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
html body #home-studio button.sd2-add { border: 0 !important; outline: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.08) !important; background: transparent !important; }
html body #home-studio button.sd2-add:hover { background: rgba(255, 255, 255, 0.03) !important; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14) !important; }
html body #home-studio button.sd2-add:focus-visible { box-shadow: inset 0 0 0 2px #9fb2e4 !important; }

/* ==========================================================================
   Lune AI, laid out like Claude: warm charcoal, a quiet sidebar, one reading
   column, plain answers, your messages in soft bubbles, one rounded composer
   ========================================================================== */
html body #lune-chat {
  --cc-bg: #191918; --cc-side: #141413; --cc-raise: #272725; --cc-bubble: #2a2a28; --cc-line: rgba(255, 255, 255, 0.08);
  --cc-text: #ecebe6; --cc-dim: #a3a199; --cc-faint: #8d8a82; --cc-accent: #dde5f2; --cc-accent-ink: #10131a;
  background: var(--cc-bg) !important; color: var(--cc-text) !important;
}
html[data-theme="light"] body #lune-chat {
  --cc-bg: #faf9f5; --cc-side: #f3f2ec; --cc-raise: #ffffff; --cc-bubble: #efeee8; --cc-line: rgba(0, 0, 0, 0.09);
  --cc-text: #1f1e1c; --cc-dim: #5f5d57; --cc-faint: #6f6d66; --cc-accent: #1d2b52; --cc-accent-ink: #ffffff;
}
/* sidebar */
html body #lune-chat #chat-hist { background: var(--cc-side) !important; border-right: 1px solid var(--cc-line) !important; padding: 10px 8px 12px !important; }
html body #lune-chat .ch-top { padding: 4px 8px 8px !important; }
html body #lune-chat .ch-h { font: 500 13px var(--ui) !important; color: var(--cc-faint) !important; letter-spacing: 0 !important; text-transform: none !important; }
html body #lune-chat .ch-new {
  height: 38px !important; padding: 0 10px !important; gap: 10px !important; border-radius: 9px !important; background: transparent !important;
  color: var(--cc-text) !important; font: 500 15px var(--ui) !important; border: 0 !important; box-shadow: none !important; margin-bottom: 10px !important;
}
html body #lune-chat .ch-new:hover { background: var(--cc-raise) !important; }
html body #lune-chat .ch-new svg { width: 22px !important; height: 22px !important; padding: 4px; border-radius: 50%; background: var(--cc-accent); color: var(--cc-accent-ink); box-sizing: border-box; }
html body #lune-chat .ch-list::before { content: "Recents"; display: block; padding: 6px 10px 6px; font: 500 12.5px var(--ui); color: var(--cc-faint); }
html body #lune-chat .ch-item { background: transparent !important; border-radius: 8px !important; min-height: 34px !important; }
html body #lune-chat .ch-item:hover { background: var(--cc-raise) !important; }
html body #lune-chat .ch-item.on { background: var(--cc-raise) !important; }
html body #lune-chat .ch-item > button:first-child { font: 400 14.5px var(--ui) !important; color: var(--cc-text) !important; padding: 0 10px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body #lune-chat .ch-item:not(.on) > button:first-child { color: var(--cc-dim) !important; }
html body #lune-chat .ch-del { opacity: 0; color: var(--cc-dim) !important; background: transparent !important; }
html body #lune-chat .ch-item:hover .ch-del, html body #lune-chat .ch-item.on .ch-del { opacity: 1; }
html body #lune-chat .ch-foot { font: 400 12.5px var(--ui) !important; color: var(--cc-faint) !important; }

/* header: small and quiet */
html body #lune-chat .chat-head { background: var(--cc-bg) !important; border-bottom: 0 !important; box-shadow: none !important; height: 52px !important; }
html body #lune-chat .chat-head .fx-shiny { background: none !important; -webkit-text-fill-color: currentColor !important; animation: none !important; }
html body #lune-chat #chat-h { font: 500 15px var(--ui) !important; color: var(--cc-text) !important; letter-spacing: 0 !important; }
html body #lune-chat .chat-head .lc-tool { width: 34px !important; height: 34px !important; border-radius: 8px !important; color: var(--cc-dim) !important; background: transparent !important; }
html body #lune-chat .chat-head .lc-tool:hover { background: var(--cc-raise) !important; color: var(--cc-text) !important; }

/* the conversation: one column, answers as plain text */
html body #lune-chat #chat-log { width: min(768px, 100%) !important; max-width: 768px !important; margin-inline: auto !important; padding-left: 24px !important; padding-right: 24px !important; box-sizing: border-box; gap: 26px !important; }
html body #lune-chat .chat-row { max-width: 100% !important; }
html body #lune-chat .chat-from-you { justify-content: flex-end !important; }
html body #lune-chat .chat-from-you .chat-bubble {
  max-width: min(80%, 560px) !important; background: var(--cc-bubble) !important; color: var(--cc-text) !important;
  border-radius: 18px !important; padding: 10px 16px !important; font: 400 16.5px/1.55 var(--ui) !important; box-shadow: none !important; border: 0 !important;
}
html body #lune-chat .chat-from-lune .chat-bubble {
  max-width: 100% !important; background: none !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
  color: var(--cc-text) !important; font: 400 18px/1.7 var(--ui) !important;
}
html body #lune-chat .chat-from-lune .chat-bubble :is(p, li) { color: var(--cc-text) !important; font: inherit !important; }
html body #lune-chat .chat-from-lune .chat-bubble p { margin: 0 0 0.85em !important; }
html body #lune-chat .chat-from-lune .chat-bubble p:last-child { margin-bottom: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble :is(h3, h4, strong) { color: var(--cc-text) !important; }
html body #lune-chat .chat-from-lune .chat-bubble :is(ul, ol) { padding-left: 1.3em !important; margin: 0.4em 0 0.9em !important; }
html body #lune-chat .chat-from-lune .chat-bubble li { margin: 0.3em 0 !important; }
html body #lune-chat .chat-row .ask-actions { gap: 2px !important; margin-top: 8px !important; opacity: 0.85; }
html body #lune-chat .chat-row .lc-mini { width: 30px !important; height: 30px !important; border-radius: 7px !important; color: var(--cc-faint) !important; background: transparent !important; }
html body #lune-chat .chat-row .lc-mini:hover { background: var(--cc-raise) !important; color: var(--cc-text) !important; }
html body #lune-chat .la-replies { gap: 8px !important; margin-top: 14px !important; }
html body #lune-chat :is(.la-reply, .la-own) {
  height: 36px !important; padding: 0 14px !important; border-radius: 10px !important; border: 1px solid var(--cc-line) !important;
  background: transparent !important; color: var(--cc-text) !important; font: 400 15px var(--ui) !important;
}
html body #lune-chat :is(.la-reply, .la-own):hover { background: var(--cc-raise) !important; }
html body #lune-chat .la-own { color: var(--cc-dim) !important; }

/* the composer: text on top, tools along the bottom */
html body #lune-chat #chat-form { background: linear-gradient(to bottom, transparent, var(--cc-bg) 30%) !important; }
html body #lune-chat #chat-composer {
  width: min(720px, calc(100% - 32px)) !important; max-width: 720px !important; margin-inline: auto !important; box-sizing: border-box;
  display: grid !important; grid-template-columns: auto 1fr auto auto auto !important; grid-template-rows: auto auto !important; align-items: center !important;
  column-gap: 6px !important; row-gap: 6px !important; padding: 14px 12px 10px !important; border-radius: 20px !important;
  background: var(--cc-raise) !important; border: 1px solid var(--cc-line) !important;
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.35) !important; transition: border-color .15s ease, box-shadow .15s ease !important;
}
html body #lune-chat #chat-composer:focus-within { border-color: rgba(255, 255, 255, 0.16) !important; box-shadow: 0 6px 28px -8px rgba(0, 0, 0, 0.45) !important; }
html[data-theme="light"] body #lune-chat #chat-composer { box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.15) !important; }
html[data-theme="light"] body #lune-chat #chat-composer:focus-within { border-color: rgba(0, 0, 0, 0.18) !important; }
html body #lune-chat #chat-input {
  grid-column: 1 / -1 !important; grid-row: 1 !important; width: 100% !important; min-height: 28px !important; max-height: 220px;
  padding: 0 6px !important; margin: 0 !important; font: 400 17px/1.55 var(--ui) !important; color: var(--cc-text) !important; background: transparent !important; border: 0 !important; outline: 0 !important; resize: none !important;
}
html body #lune-chat #chat-input::placeholder { color: var(--cc-faint) !important; }
html body #lune-chat #chat-attach { grid-column: 1 !important; grid-row: 2 !important; }
html body #lune-chat #chat-mic { grid-column: 3 !important; grid-row: 2 !important; }
html body #lune-chat #chat-talk, html body #lune-chat .chat-send, html body #lune-chat .lc-stop { grid-column: 5 !important; grid-row: 2 !important; }
html body #lune-chat #chat-composer :is(#chat-attach, #chat-mic) {
  width: 32px !important; height: 32px !important; border-radius: 8px !important; border: 1px solid var(--cc-line) !important;
  background: transparent !important; color: var(--cc-dim) !important; display: grid !important; place-items: center !important; padding: 0 !important;
}
html body #lune-chat #chat-composer #chat-mic { border: 0 !important; }
html body #lune-chat #chat-composer :is(#chat-attach, #chat-mic):hover { background: var(--cc-bubble) !important; color: var(--cc-text) !important; }
html body #lune-chat #chat-composer :is(#chat-talk, .chat-send, .lc-stop) {
  width: 32px !important; height: 32px !important; border-radius: 8px !important; background: var(--cc-accent) !important; color: var(--cc-accent-ink) !important;
  display: grid !important; place-items: center !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
}
html body #lune-chat #chat-composer :is(#chat-talk, .chat-send, .lc-stop)[hidden] { display: none !important; }
html body #lune-chat #chat-composer .chat-send:disabled { opacity: 0.4; }
html body #lune-chat #chat-composer svg { width: 17px !important; height: 17px !important; }
html body #lune-chat #chat-fine { color: var(--cc-faint) !important; text-align: center !important; }

/* a new chat: the greeting and the composer meet in the middle, as on Claude */
html body #lune-chat.is-empty .ask-empty { margin: auto 0 22px !important; }
html body #lune-chat.is-empty .ask-empty :is(h3, p, .ask-empty-h) { color: var(--cc-text) !important; }
html body #lune-chat #chat-starters { width: min(720px, calc(100% - 32px)) !important; margin-inline: auto !important; justify-content: center !important; gap: 8px !important; }
html body #lune-chat #chat-starters button {
  height: 34px !important; padding: 0 14px !important; border-radius: 10px !important; border: 1px solid var(--cc-line) !important;
  background: transparent !important; color: var(--cc-dim) !important; font: 400 14.5px var(--ui) !important;
}
html body #lune-chat #chat-starters button:hover { background: var(--cc-raise) !important; color: var(--cc-text) !important; }
html body #lune-chat #chat-composer:not(.is-writing) .lc-stop { display: none !important; }
html body #lune-chat #chat-composer.is-writing :is(#chat-talk, .chat-send) { display: none !important; }
html body #lune-chat #chat-log { scrollbar-width: thin; scrollbar-color: var(--cc-raise) transparent; }
html body #lune-chat.lune-chat .chat-main > header.chat-head { background: var(--cc-bg) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html body #lune-chat .ch-h { visibility: hidden; }
html body #lune-chat #chat-composer:not(.is-writing) :is(.lc-stop, #chat-no-such) { display: none !important; }
html body #lune-chat #chat-composer.is-writing :is(#chat-talk, .chat-send, #chat-no-such) { display: none !important; }
html body #lune-chat #chat-composer :is(.chat-send, #chat-no-such)[hidden] { display: none !important; }
html body #lune-chat #chat-composer :is(#chat-talk, #chat-no-such)[hidden] { display: none !important; }
/* new chat: greeting sits just above the composer, the pair centred, like Claude */
html body #lune-chat.is-empty .chat-main { justify-content: center !important; }
html body #lune-chat.is-empty #chat-log { flex: 0 0 auto !important; padding-top: 0 !important; padding-bottom: 8px !important; min-height: 0 !important; overflow: visible !important; }
html body #lune-chat.is-empty #chat-log .ask-empty { margin: 0 0 18px !important; padding: 0 !important; }
html body #lune-chat.is-empty #chat-starters { margin-bottom: 0 !important; }
html body #lune-chat.is-empty .chat-main::after { content: ""; flex: 0 0 9vh; }
@media (max-width: 899px) {
  html body #lune-chat.hist-open .chat-main::before { content: ""; position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.5); animation: lr-in .2s ease both; }
  html body #lune-chat #chat-hist { box-shadow: 12px 0 40px -12px rgba(0, 0, 0, 0.6) !important; }
}

/* ==========================================================================
   Signed in: deep grey instead of black, and the muted blue as the accent
   (the same palette as Lune AI). Light mode is untouched.
   ========================================================================== */
html:not([data-theme="light"]) body {
  --g-bg: #191918; --g-side: #141413; --g-card: #212120; --g-raise: #272725; --g-raise-2: #30302e;
  --g-line: rgba(255, 255, 255, 0.08); --g-text: #ecebe6; --g-dim: #a3a199; --g-faint: #8d8a82;
  --bg: var(--g-bg); --d-bg: var(--g-bg); --surface: var(--g-card); --d-surface: var(--g-card); --d-surface-2: var(--g-raise); --d-surface-3: var(--g-raise-2);
  --line: var(--g-line); --d-sep: var(--g-line);
  --navy-mid: #dde5f2; --navy-hi: #dde5f2; --on-navy: #10131a;
  --d-label-3: rgba(235, 235, 245, 0.56); --muted: #b3b0a8;
  background: var(--g-bg) !important;
}
html:not([data-theme="light"]) { background: #191918 !important; }
html:not([data-theme="light"]) body :is(#home, #home-member, #home-studio, main, .studio, .studio-panel, #panel-score, #panel-explain, #panel-piano, .score-scroll, .score-pane, #piano-dock, #companion-bar, #st-bottom) {
  background-color: var(--g-bg) !important;
}
html:not([data-theme="light"]) body header.bar { background: rgba(25, 25, 24, 0.86) !important; border-bottom: 1px solid var(--g-line) !important; backdrop-filter: saturate(1.4) blur(18px) !important; -webkit-backdrop-filter: saturate(1.4) blur(18px) !important; }
html:not([data-theme="light"]) body .score-tools-head { background: transparent !important; }
/* the score page itself is inverted in dark mode: this light grey prints as the deep grey */
html:not([data-theme="light"]) body :is(.score-page, .fx-paper) { background-color: #e6e6e7 !important; border-color: #e6e6e7 !important; }
/* cards, sheets and fields on grey */
html:not([data-theme="light"]) body :is(.sd2-card:not(.sd2-add), .sd2-mail, .member-rec, .member-homework, .rep-card, #home-member form#home-ask, .home-ask, dialog.sd2-sheet, #assign-dialog, #settings-dialog, .settings-dialog, .studio-menu) {
  background-color: var(--g-card) !important;
}
html:not([data-theme="light"]) body :is(.sd2-card, .member-rec, .member-homework, .rep-card, #home-member form#home-ask) { border-color: var(--g-line) !important; }
html:not([data-theme="light"]) body #home-member .member-rec { background: var(--g-card) !important; }
/* the bar panel and the practice room in the same palette */
html:not([data-theme="light"]) body #coach { --cp-bg: #212120; --cp-raise: rgba(255, 255, 255, 0.06); --cp-raise-2: rgba(255, 255, 255, 0.11); --cp-text: #ecebe6; --cp-dim: #a3a199; --cp-faint: #8d8a82; }
html:not([data-theme="light"]) body #lune-room.lr { background: radial-gradient(120% 70% at 50% 0%, #2a2b2f 0%, #191918 60%, #1b1b1a 100%) !important; }
html:not([data-theme="light"]) body #lune-room > .lr-picker { background: #272725; }
html:not([data-theme="light"]) body .lr .lr-chip.on .lr-n b, html:not([data-theme="light"]) body .lr .lr-chip.on .lr-n small { color: #10131a !important; }
html:not([data-theme="light"]) body .lr .lr-chip.on .lr-n i { background: var(--g-card, #10131a); color: #dde5f2; }
html:not([data-theme="light"]) body .lune-loader { background: var(--g-bg) !important; }
/* the toolbar's Practise and the other accent buttons: muted blue, dark ink */
html:not([data-theme="light"]) body #btn-session.ls-start, html:not([data-theme="light"]) body #btn-session.ls-start * { color: #10131a !important; }
html:not([data-theme="light"]) body .lp-switch input:checked::after, html:not([data-theme="light"]) body .lp-switch input:checked::before { background-color: var(--g-card, #10131a); }
html:not([data-theme="light"]) body #home-studio .sd2-card:not(.sd2-add) { background: var(--g-card) !important; background-image: none !important; box-shadow: inset 0 0 0 1px var(--g-line) !important; }
html:not([data-theme="light"]) body #home-studio .sd2-av:not(.sd2-av-add) { background: rgba(221, 229, 242, 0.14) !important; background-image: none !important; color: #dde5f2 !important; box-shadow: none !important; }
html:not([data-theme="light"]) body #home-studio .sd2-pill.is-done { background: rgba(221, 229, 242, 0.16) !important; color: #dde5f2 !important; }
html:not([data-theme="light"]) body #home-studio .sd2-primary, html:not([data-theme="light"]) body dialog.sd2-sheet .sd2-primary { background: #dde5f2 !important; color: #10131a !important; box-shadow: none !important; }
html:not([data-theme="light"]) body :is(#home-studio, dialog.sd2-sheet) .sd2-quiet { background: var(--g-raise) !important; color: var(--g-text) !important; }
html:not([data-theme="light"]) body :is(#home-studio, dialog.sd2-sheet) .sd2-quiet:hover { background: var(--g-raise-2) !important; }
html:not([data-theme="light"]) body dialog.sd2-sheet { background: #212120 !important; }
html:not([data-theme="light"]) body #home-member .member-next, html:not([data-theme="light"]) body #home-member [class*="member-week"] { background-color: var(--g-card) !important; }
@media (max-width: 760px) {
  html body #coach { border-radius: 20px 20px 0 0 !important; border-left: 0 !important; border-top: 1px solid var(--cp-line) !important; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.6) !important; overflow: hidden; }
  html body #coach .coach-head { padding-top: 14px !important; }
}
html body .auth-role label, html body .auth-role label :is(b, small, span) { text-transform: none !important; letter-spacing: 0 !important; }
html body .auth-role label b { font: 600 16px/1.25 var(--ui) !important; }
html body .auth-role label small { font: 400 13.5px/1.35 var(--ui) !important; }

/* landing: the same off-black, the night sky kept only as a faint glow */
html:not([data-theme="light"]) body #home #hero.home-hero.mr-hero {
  background: radial-gradient(90% 60% at 50% 0%, #24252a 0%, #1c1c1d 45%, #191918 75%) !important;
}
html:not([data-theme="light"]) body #home #hero.mr-hero::after { background: radial-gradient(520px circle at var(--mx) var(--my), rgba(221, 229, 242, 0.05), transparent 70%) !important; }
html:not([data-theme="light"]) body :is(.home-guest, .lp-show, .lp-tile, #morning, .home-section) { --navy-deep: #212120; }

/* anything lit in the pale blue reads in dark ink */
html:not([data-theme="light"]) body #explain-access .access-option[aria-pressed="true"],
html:not([data-theme="light"]) body #explain-access .access-option[aria-pressed="true"] :is(strong, span, b, i),
html:not([data-theme="light"]) body .ls-grades button.on,
html:not([data-theme="light"]) body .lp-viz-notes span.on, html:not([data-theme="light"]) body .lp-viz-notes span.on * { color: #10131a !important; -webkit-text-fill-color: #10131a !important; }
html:not([data-theme="light"]) body #explain-access .access-option[aria-pressed="true"] span { opacity: 0.72; }
/* switches: a dark knob on the pale track */
html:not([data-theme="light"]) body :is(.lw-row input:checked + .lw-sw, .studio-menu .sm-row[aria-checked="true"] .sm-sw, #assign-dialog .as-row input:checked + .as-sw, .sd-switch input:checked + .sd-sw)::after,
html:not([data-theme="light"]) body :is(.lw-row input:checked + .lw-sw, .studio-menu .sm-row[aria-checked="true"] .sm-sw, #assign-dialog .as-row input:checked + .as-sw, .sd-switch input:checked + .sd-sw)::before { background: #10131a !important; }
html:not([data-theme="light"]) body .sd2-switch input:checked + .sd2-sw { background: #dde5f2; }
html:not([data-theme="light"]) body .sd2-switch input:checked + .sd2-sw::after { background: #191918; box-shadow: none; }
html:not([data-theme="light"]) body :is(.lw-row input:checked + .lw-sw, .studio-menu .sm-row[aria-checked="true"] .sm-sw, #assign-dialog .as-row input:checked + .as-sw, .sd-switch input:checked + .sd-sw)::after { background: #191918 !important; box-shadow: none !important; }

/* ==========================================================================
   Plan your piano schedule
   ========================================================================== */
html body dialog.sch {
  --s-bg: #1e1e1d; --s-card: #262624; --s-raise: #2e2e2c; --s-line: rgba(255, 255, 255, 0.08); --s-text: #ecebe6; --s-dim: #a3a199; --s-faint: #8d8a82;
  --s-accent: #dde5f2; --s-ink: #10131a;
  width: min(640px, calc(100vw - 24px)); max-width: none; max-height: min(92vh, 960px); padding: 0; border: 0; border-radius: 24px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--s-bg); color: var(--s-text); box-shadow: 0 0 0 1px var(--s-line), 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  scrollbar-width: thin; scrollbar-color: var(--s-raise) transparent; animation: sch-in .32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html[data-theme="light"] body dialog.sch { --s-bg: #faf9f5; --s-card: #ffffff; --s-raise: #f0efe9; --s-line: rgba(0, 0, 0, 0.08); --s-text: #1f1e1c; --s-dim: #57554f; --s-faint: #6f6d66; --s-accent: #1d2b52; --s-ink: #ffffff; }
html body dialog.sch:has(.sch-wide) { width: min(1040px, calc(100vw - 24px)); }
html body dialog.sch::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes sch-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
html body .sch-in { padding: 26px 26px 0; }
html body .sch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
html body .sch-head h2 { margin: 0; font: 400 30px/1.15 var(--display); color: var(--s-text); letter-spacing: -0.01em; }
html body .sch-sub { margin: 6px 0 0; font: 400 15.5px/1.45 var(--ui); color: var(--s-dim); }
html body .sch-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--s-raise); color: var(--s-dim); display: grid; place-items: center; cursor: pointer; }
html body .sch-x:hover { color: var(--s-text); }
html body .sch-sec { margin-top: 22px; }
html body .sch-sec h3 { margin: 0 0 10px 2px; font: 600 14px var(--ui); color: var(--s-dim); letter-spacing: 0; text-transform: none; }
html body .sch textarea#sch-goal {
  width: 100%; box-sizing: border-box; resize: none; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--s-line); background: var(--s-card);
  color: var(--s-text); font: 400 17px/1.45 var(--ui); outline: none; transition: border-color .15s ease;
}
html body .sch textarea#sch-goal:focus { border-color: color-mix(in srgb, var(--s-accent) 50%, transparent); }
html body .sch textarea::placeholder { color: var(--s-faint); }
html body .sch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
html body .sch-chips button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--s-line); background: transparent; color: var(--s-dim); font: 400 14px var(--ui); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
html body .sch-chips button:hover { background: var(--s-raise); color: var(--s-text); }

html body .sch-pieces { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--s-card); overflow: hidden; }
html body .sch-pieces li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
html body .sch-pieces li + li { border-top: 1px solid var(--s-line); }
html body .sch-check { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 200px; cursor: pointer; }
html body .sch-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .sch-box { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--s-faint); display: grid; place-items: center; transition: background-color .15s ease, box-shadow .15s ease; }
html body .sch-check input:checked + .sch-box { background: var(--s-accent); box-shadow: none; }
html body .sch-check input:checked + .sch-box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--s-ink); border-bottom: 2px solid var(--s-ink); transform: translateY(-1px) rotate(-45deg); }
html body .sch-check input:focus-visible + .sch-box { outline: 2px solid var(--s-accent); outline-offset: 2px; }
html body .sch-pt { display: flex; flex-direction: column; min-width: 0; font: 500 16px/1.3 var(--ui); color: var(--s-text); }
html body .sch-pt small { font: 400 13.5px var(--ui); color: var(--s-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .sch-pieces li:not(.is-on) .sch-pt { color: var(--s-dim); }

html body .sch-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 11px; background: var(--s-raise); }
html body .sch-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--s-dim); font: 500 14px var(--ui); cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
html body .sch-seg button[aria-checked="true"] { background: var(--s-accent); color: var(--s-ink); }
html body .sch-seg button:disabled { opacity: 0.4; cursor: default; }
html body .sch-seg-wide { display: grid; width: 100%; box-sizing: border-box; margin-bottom: 10px; }

html body .sch-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
html body .sch-days button { height: 46px; border: 0; border-radius: 12px; background: var(--s-card); color: var(--s-dim); font: 500 15px var(--ui); cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .1s ease; }
html body .sch-days button[aria-pressed="true"] { background: var(--s-accent); color: var(--s-ink); }
html body .sch-days button:active { transform: scale(0.96); }

html body .sch-rows { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--s-card); overflow: hidden; }
html body .sch-rows > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; font: 400 16px var(--ui); color: var(--s-text); }
html body .sch-rows > li + li { border-top: 1px solid var(--s-line); }
html body .sch-rows > li[hidden] { display: none; }
html body .sch-rows select { height: 36px; border: 0; border-radius: 10px; padding: 0 10px; background: var(--s-raise); color: var(--s-text); font: 400 15px var(--ui); }
html body .sch-step { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; background: var(--s-raise); }
html body .sch-step button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--s-text); font: 400 18px/1 var(--ui); cursor: pointer; }
html body .sch-step button:hover:not(:disabled) { background: var(--s-card); }
html body .sch-step button:disabled { opacity: 0.3; cursor: default; }
html body .sch-step output { min-width: 62px; text-align: center; font: 500 14px var(--nums, var(--ui)); color: var(--s-text); font-variant-numeric: tabular-nums; }
html body .sch-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; cursor: pointer; }
html body .sch-toggle > span:first-child { display: flex; flex-direction: column; gap: 2px; font: 400 16px var(--ui); color: var(--s-text); }
html body .sch-toggle small { font: 400 13.5px var(--ui); color: var(--s-faint); }
html body .sch-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html body .sch-sw { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: rgba(120, 120, 128, 0.32); transition: background-color .2s ease; }
html body .sch-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #f5f5f2; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform .2s cubic-bezier(0.22, 1, 0.36, 1), background-color .2s ease; }
html body .sch-toggle input:checked + .sch-sw { background: var(--s-accent); }
html body .sch-toggle input:checked + .sch-sw::after { transform: translateX(18px); background: var(--s-ink); box-shadow: none; }
html body .sch-toggle input:focus-visible + .sch-sw { outline: 2px solid var(--s-accent); outline-offset: 2px; }
html body .sch-note { margin: 10px 2px 0; font: 400 14px/1.5 var(--ui); color: var(--s-faint); }

html body .sch-foot {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 26px -26px 0; padding: 14px 26px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--s-bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--s-line);
}
html body .sch-primary, html body .sch-quiet { height: 46px; padding: 0 22px; border: 0; border-radius: 12px; font: 600 15.5px var(--ui); cursor: pointer; transition: background-color .15s ease, transform .1s ease; }
html body .sch-primary { background: var(--s-accent); color: var(--s-ink); }
html body .sch-primary:disabled { opacity: 0.45; cursor: default; }
html body .sch-quiet { background: var(--s-raise); color: var(--s-text); font-weight: 500; }
html body :is(.sch-primary, .sch-quiet):active { transform: scale(0.98); }
html body .sch :is(button, select, textarea):focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }

/* the week, block by block */
html body .sch-goal { margin: 14px 0 0; font: italic 400 18px/1.4 var(--display); color: var(--s-text); }
html body .sch-tune { margin-top: 4px; }
html body .sch-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 18px; }
html body .sch-day { display: flex; flex-direction: column; border-radius: 18px; background: var(--s-card); padding: 14px 14px 10px; box-shadow: inset 0 0 0 1px var(--s-line); }
html body .sch-day.is-today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--s-accent) 55%, transparent); }
html body .sch-day header { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
html body .sch-day h3 { margin: 0; font: 500 18px var(--ui); color: var(--s-text); display: flex; align-items: center; gap: 8px; }
html body .sch-day h3 span { font: 600 11.5px var(--ui); padding: 2px 8px; border-radius: 999px; background: var(--s-accent); color: var(--s-ink); }
html body .sch-dt { margin: 0; font: 500 14px var(--nums, var(--ui)); color: var(--s-dim); font-variant-numeric: tabular-nums; }
html body .sch-day ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html body .sch-item { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "top top" "text text" ". step"; gap: 4px 8px; padding: 10px 10px 8px 14px; border-radius: 12px; background: var(--s-raise); }
html body .sch-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--s-faint); opacity: 0.5; }
html body .sch-item.k-learn::before { background: #9ec5a8; opacity: 1; }
html body .sch-item.k-polish::before { background: #e3b48c; opacity: 1; }
html body .sch-item.k-fresh::before, html body .sch-item.k-perform::before { background: var(--s-accent); opacity: 1; }
html body .sch-item-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
html body .sch-kind { font: 600 12.5px var(--ui); color: var(--s-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .sch-ops { display: inline-flex; gap: 2px; opacity: 0.55; transition: opacity .15s ease; }
html body .sch-item:hover .sch-ops, html body .sch-item:focus-within .sch-ops { opacity: 1; }
html body .sch-ops button { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--s-dim); display: grid; place-items: center; cursor: pointer; }
html body .sch-ops button:hover:not(:disabled) { background: var(--s-card); color: var(--s-text); }
html body .sch-ops button:disabled { opacity: 0.25; cursor: default; }
html body .sch-item textarea { grid-area: text; width: 100%; box-sizing: border-box; resize: none; padding: 2px 0; border: 0; background: transparent; color: var(--s-text); font: 400 15.5px/1.45 var(--ui); outline: none; overflow: hidden; }
html body .sch-item .sch-step { grid-area: step; justify-self: end; background: var(--s-card); padding: 2px; }
html body .sch-item .sch-step button { width: 26px; height: 26px; font-size: 16px; }
html body .sch-item .sch-step output { min-width: 54px; font-size: 13px; }
html body .sch-add { margin-top: 8px; align-self: flex-start; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--s-dim); font: 500 14px var(--ui); cursor: pointer; }
html body .sch-add:hover { background: var(--s-raise); color: var(--s-text); }

@media (max-width: 600px) {
  html body dialog.sch, html body dialog.sch:has(.sch-wide) { width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  html body .sch-in { padding: 20px 16px 0; }
  html body .sch-foot { margin: 22px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  html body .sch-foot button { flex: 1; }
  html body .sch-head h2 { font-size: 26px; }
  html body .sch-pieces .sch-seg { width: 100%; }
  html body .sch-week { grid-template-columns: 1fr; }
  html body .sch-days button { height: 42px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html body dialog.sch { animation: none; } }

/* the saved schedule, with its minutes */
html body .wp-dmins { margin-left: 8px; font: 500 13px var(--nums, var(--ui)); color: var(--d-label-3, #74726b); font-variant-numeric: tabular-nums; }
html body .wp-min { display: inline-block; min-width: 46px; margin-right: 6px; font: 500 12.5px var(--nums, var(--ui)); color: var(--d-label-2, #a3a199); font-variant-numeric: tabular-nums; }
html body .wp-day ul { list-style: none !important; padding-left: 0 !important; margin: 6px 0 0 !important; display: grid; gap: 4px; }
html body .wp-day ul li { display: flex; align-items: baseline; gap: 4px; font: 400 15px/1.45 var(--ui); color: var(--d-label-2, #a3a199); }
html body .wp-day ul li::marker { content: none; }
html body .wp-day ul li strong { color: var(--d-label, #ecebe6); font-weight: 500; }
html body .wp-day.today { box-shadow: inset 0 0 0 1.5px rgba(221, 229, 242, 0.45) !important; }
html body .wp-day.done ul li { opacity: 0.55; }

/* ==========================================================================
   Settings: grouped lists, as on an iPhone
   ========================================================================== */
html:not([data-theme="light"]) body #settings-dialog { background: var(--g-bg, #191918) !important; color: var(--g-text, #ecebe6) !important; }
html body #settings-dialog { --row-bg: var(--g-card, #212120); --row-line: var(--g-line, rgba(255,255,255,0.08)); }
html[data-theme="light"] body #settings-dialog { --row-bg: #ffffff; --row-line: rgba(0, 0, 0, 0.08); background: #f3f2ee !important; }
html body #settings-dialog .settings-top {
  position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--g-bg, #191918) 86%, transparent) !important;
  backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important; border-bottom: 1px solid transparent !important;
}
html[data-theme="light"] body #settings-dialog .settings-top { background: color-mix(in srgb, #f3f2ee 86%, transparent) !important; }
html body #settings-dialog .settings-top h2 { font: 500 30px var(--display) !important; letter-spacing: -0.01em !important; }
html body #settings-dialog .settings-done { background: none !important; border: 0 !important; color: var(--navy-mid, #dde5f2) !important; font: 600 16px var(--ui) !important; padding: 6px 4px !important; box-shadow: none !important; }
html body #settings-dialog .settings-sec { margin: 0 0 26px !important; padding: 0 !important; border: 0 !important; background: none !important; }
html body #settings-dialog .settings-sec > h3:not(.visually-hidden) {
  margin: 0 0 8px 16px !important; font: 400 13.5px var(--ui) !important; font-style: normal !important; color: var(--d-label-3, rgba(235,235,245,0.56)) !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
html body #settings-dialog .settings-sec > :is(.settings-row, .lp-switch, .settings-goal, .settings-theme) {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; width: 100% !important; box-sizing: border-box !important;
  min-height: 52px !important; margin: 0 !important; padding: 10px 16px !important; border: 0 !important; border-radius: 0 !important;
  background: var(--row-bg) !important; box-shadow: none !important; text-align: left !important;
}
/* hairline between rows of one group, inset like iOS */
html body #settings-dialog .settings-sec > :is(.settings-row, .lp-switch, .settings-goal, .settings-theme) + :is(.settings-row, .lp-switch, .settings-goal, .settings-theme) {
  background-image: linear-gradient(var(--row-line), var(--row-line)) !important; background-size: calc(100% - 16px) 1px !important; background-position: right top !important; background-repeat: no-repeat !important;
}
/* each run of rows is one rounded group */
html body #settings-dialog .settings-sec > :is(.settings-row, .lp-switch, .settings-goal, .settings-theme):not(:is(.settings-row, .lp-switch, .settings-goal, .settings-theme) + *) { border-top-left-radius: 14px !important; border-top-right-radius: 14px !important; }
html body #settings-dialog .settings-sec > :is(.settings-row, .lp-switch, .settings-goal, .settings-theme):not(:has(+ :is(.settings-row, .lp-switch, .settings-goal, .settings-theme))) { border-bottom-left-radius: 14px !important; border-bottom-right-radius: 14px !important; }
html body #settings-dialog .settings-row { cursor: pointer; transition: background-color .12s ease !important; }
html:not([data-theme="light"]) body #settings-dialog .settings-row:hover { background-color: var(--g-raise, #272725) !important; }
html body #settings-dialog .settings-row strong { font: 400 16.5px var(--ui) !important; color: var(--d-label, #ecebe6) !important; }
html body #settings-dialog .settings-row span { font: 400 14px var(--ui) !important; color: var(--d-label-3, rgba(235,235,245,0.56)) !important; }
html body #settings-dialog .settings-row { flex-direction: column !important; align-items: flex-start !important; justify-content: center !important; gap: 1px !important; padding-right: 38px !important; position: relative !important; }
html body #settings-dialog .settings-row::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-right: 1.6px solid var(--d-label-3, #8d8a82); border-top: 1.6px solid var(--d-label-3, #8d8a82); transform: rotate(45deg);
}
html body #settings-dialog .settings-row svg { display: none !important; }
/* days and minutes: label left, value right, two rows */
html body #settings-dialog .settings-goal { display: grid !important; grid-template-columns: 1fr auto !important; row-gap: 0 !important; padding: 0 16px !important; }
html body #settings-dialog .settings-goal label { min-height: 52px; display: flex; align-items: center; font: 400 16.5px var(--ui) !important; color: var(--d-label, #ecebe6) !important; text-transform: none !important; letter-spacing: 0 !important; }
html body #settings-dialog .settings-goal select { justify-self: end; height: 34px !important; min-width: 84px; border: 0 !important; border-radius: 9px !important; padding: 0 28px 0 12px !important; background-color: var(--g-raise, #272725) !important; color: var(--d-label, #ecebe6) !important; font: 400 15.5px var(--ui) !important; }
html body #settings-dialog .settings-goal label:nth-of-type(2), html body #settings-dialog .settings-goal label:nth-of-type(2) + select { border-top: 1px solid var(--row-line); }
html body #settings-dialog .settings-goal label:nth-of-type(2) + select { align-self: stretch; height: auto !important; margin: 9px 0; border-top: 0; }
/* notes under a group */
html body #settings-dialog .settings-sec > .settings-note { margin: 8px 16px 12px !important; font: 400 13.5px/1.45 var(--ui) !important; color: var(--d-label-3, rgba(235,235,245,0.56)) !important; }
html body #settings-dialog #set-account-ai { margin: 0 0 10px !important; padding: 14px 16px !important; border-radius: 14px; background: var(--row-bg); }
html body #settings-dialog #set-account-ai strong { font: 500 16.5px var(--ui) !important; color: var(--d-label, #ecebe6) !important; }
/* the theme: one segmented control */
html body #settings-dialog .settings-theme { justify-content: flex-start !important; }
html body #settings-dialog .settings-theme { display: grid !important; grid-template-columns: 1fr 1fr !important; padding: 8px 12px !important; gap: 2px !important; }
html body #settings-dialog .settings-theme button { height: 34px !important; border: 0 !important; border-radius: 8px !important; background: var(--g-raise, #272725) !important; color: var(--d-label-2, #b3b0a8) !important; font: 500 14.5px var(--ui) !important; box-shadow: none !important; }
html body #settings-dialog .settings-theme button:is([aria-pressed="true"], .on) { background: var(--navy-mid, #dde5f2) !important; color: var(--on-navy, #10131a) !important; }
/* switches inside the group */
html body #settings-dialog .lp-switch { flex-direction: row-reverse !important; }
html body #settings-dialog .lp-switch > span { flex: 1; display: flex !important; flex-direction: column !important; gap: 1px !important; }
html body #settings-dialog .lp-switch strong { font: 400 16.5px var(--ui) !important; color: var(--d-label, #ecebe6) !important; }
html body #settings-dialog .lp-switch small { font: 400 13.5px var(--ui) !important; color: var(--d-label-3, rgba(235,235,245,0.56)) !important; }
html body #settings-dialog .settings-advanced { margin-top: 4px !important; padding: 14px 16px !important; border-radius: 14px !important; background: var(--row-bg) !important; border: 0 !important; }
html body #settings-dialog .settings-advanced summary { font: 400 16.5px var(--ui) !important; color: var(--d-label, #ecebe6) !important; cursor: pointer; }
html body #settings-dialog .settings-sec, html body #settings-dialog .settings-advanced { width: min(560px, calc(100% - 32px)) !important; max-width: 560px !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box !important; }
html body #settings-dialog .settings-sec > .settings-row { flex-direction: column !important; align-items: flex-start !important; justify-content: center !important; gap: 1px !important; padding-right: 40px !important; position: relative !important; }
html body #settings-dialog .settings-sec > .lp-switch { flex-direction: row !important; }
html body #settings-dialog .settings-sec > .lp-switch > input { order: 2; flex: none; }
html body #settings-dialog .settings-sec > .settings-goal { display: grid !important; }
html body #settings-dialog .settings-sec > .settings-theme { display: grid !important; }
html:not([data-theme="light"]) body dialog#settings-dialog#settings-dialog { background: #191918 !important; }
html:not([data-theme="light"]) body dialog#settings-dialog#settings-dialog .settings-top { background: rgba(25, 25, 24, 0.88) !important; }
html body #settings-dialog .settings-sec > .settings-goal select, html body #settings-dialog .settings-goal label:nth-of-type(2) + select { align-self: center !important; height: 34px !important; margin: 0 !important; border-top: 0 !important; }
html body #settings-dialog .settings-goal label { min-height: 50px !important; }
html body #settings-dialog .settings-goal label:nth-of-type(2) { border-top: 1px solid var(--row-line) !important; }
html body #settings-dialog .settings-goal label:nth-of-type(2) + select { box-shadow: 0 -8px 0 -7px var(--row-line); }
html body #settings-dialog #set-account-ai br { display: none; }
html body #settings-dialog #set-account-ai .set-ai-note { display: block; margin-top: 2px; font: 400 14px var(--ui); color: var(--d-label-3, rgba(235,235,245,0.56)); }
html body #settings-dialog .settings-sec > .settings-goal { padding-top: 0 !important; padding-bottom: 0 !important; }
html body #settings-dialog .settings-goal label { min-height: 48px !important; }
/* secondary and tertiary text that always reads */
html:not([data-theme="light"]) body :is(#home-studio .sd2-status, #home-studio .sd2-note, #home-studio .sd2-mailline, dialog.sd2-sheet .sd2-sheet-foot, dialog.sd2-sheet .sd2-pieces span, dialog.sd2-sheet .sd2-field span, #sd2-student .sd2-sched-note) { color: #b3b0a8 !important; }
html:not([data-theme="light"]) body :is(#home-studio .sd2-chips .is-none, #sd2-student .sd2-field span i, #home-studio .sd2-hw-row p) { color: #9a978e !important; }
html:not([data-theme="light"]) body #coach .coach-lead { color: var(--cp-dim) !important; }
/* the bar panel with several bars: one block per bar */
html body #coach #help-body.is-multi > section.coach-bar-block { display: flex !important; flex-direction: column !important; order: 0; padding: 16px 0 6px !important; border-bottom: 1px solid var(--cp-line) !important; }
html body #coach #help-body.is-multi > section.coach-bar-block:first-child { padding-top: 6px !important; }
html body #coach #help-body.is-multi .coach-bar-k { order: 0; margin: 0 0 2px !important; font: 500 19px var(--display, var(--ui)) !important; color: var(--cp-text) !important; }
html body #coach #help-body.is-multi .coach-bar-block h4:has(+ .coach-advice) { order: 1; margin-top: 8px !important; }
html body #coach #help-body.is-multi .coach-bar-block .coach-advice { order: 2; }
html body #coach #help-body.is-multi .coach-bar-block :is(h4:not(:has(+ .coach-advice)), .hand-label, .notes) { order: 3; }
html body #coach #help-body.is-multi .coach-advice p { font-size: 16px !important; }
html:not([data-theme="light"]) body .fx-seg button:not(.on) { color: #b3b0a8 !important; }

/* one calm entrance for every sheet and dialog */
@keyframes lune-dlg-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes lune-dlg-fade { from { opacity: 0; } to { opacity: 1; } }
html body dialog[open]:not(.sch):not(#lune-chat):not(.lune-talk) { animation: lune-dlg-in .28s cubic-bezier(0.22, 1, 0.36, 1) both; }
html body dialog[open]::backdrop { animation: lune-dlg-fade .24s ease both; }
@media (prefers-reduced-motion: reduce) { html body dialog[open], html body dialog[open]::backdrop { animation: none !important; } }

/* ==========================================================================
   Light mode: the signed-in home and its cards in dark ink
   ========================================================================== */
html[data-theme="light"] body #home-ask-chips button { color: #3a3a3c !important; background: #f4f4f6 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
html[data-theme="light"] body #home-ask-chips button:hover { background: #ebebef !important; }
html[data-theme="light"] body #member-homework { background: #f4f5fa !important; border-color: rgba(29, 43, 82, 0.1) !important; }
html[data-theme="light"] body #member-homework :is(h2, .mh-note) { color: #1c1c1e !important; }
html[data-theme="light"] body #member-homework h2 span { color: #6e6e73 !important; }
html[data-theme="light"] body #member-homework .mh-k { color: #1d2b52 !important; }
html[data-theme="light"] body #member-homework .primary { background: #1d2b52 !important; color: #fff !important; }
/* the next piece stays a dark photo card, as Apple's feature tiles do in light mode */
html[data-theme="light"] body #member-next { background: #1d1d1f !important; color: #f5f5f7 !important; }
html[data-theme="light"] body #member-next :is(h2, .member-next-by, .member-next-detail, .member-next-why, .member-next-k) { color: #f5f5f7 !important; }
html[data-theme="light"] body #member-next :is(.member-next-by, .member-next-why) { color: rgba(245, 245, 247, 0.72) !important; }
html[data-theme="light"] body #member-streak .wk-k, html[data-theme="light"] body .wk-k { color: #57554f !important; }
html[data-theme="light"] body #lune-chat :is(.ch-foot, #chat-fine) { color: #6f6d66 !important; }
html[data-theme="light"] body #home-member section#member-next.member-next, html[data-theme="light"] body #home-member #member-next { background: #1d1d1f !important; background-color: #1d1d1f !important; }
html[data-theme="light"] body { --d-label-3: rgba(60, 60, 67, 0.72); }
html[data-theme="light"] body #settings-dialog :is(.settings-row span, .lp-switch small, .settings-note, .set-ai-note, .settings-sec > h3, .settings-sub) { color: #6e6e73 !important; }
html[data-theme="light"] body #settings-dialog .settings-theme button { background: #ebebef !important; color: #3a3a3c !important; }
html[data-theme="light"] body #settings-dialog .settings-theme button:is([aria-pressed="true"], .on) { background: #1d2b52 !important; color: #fff !important; }
html[data-theme="light"] body #settings-dialog .settings-goal select { background-color: #f0f0f3 !important; color: #1c1c1e !important; }
html[data-theme="light"] body #settings-dialog .settings-row::after { border-color: #a1a1a6 !important; }
html[data-theme="light"] body #settings-dialog .settings-row:hover { background-color: #f6f6f8 !important; }
html[data-theme="light"] body #settings-dialog .settings-done { color: #1d2b52 !important; }
html[data-theme="light"] body #settings-dialog :is(.settings-row span, .lp-switch small, .settings-note, .set-ai-note, .settings-sec > h3, .settings-sub) { color: #5e5e63 !important; }
html[data-theme="light"] body #member-next button.quiet, html[data-theme="light"] body #member-next .quiet { color: #f5f5f7 !important; background: rgba(255, 255, 255, 0.08) !important; border-color: rgba(255, 255, 255, 0.2) !important; }

/* ==========================================================================
   Light mode: the Studio and its sheets
   ========================================================================== */
html[data-theme="light"] body #home-studio { color: #1c1c1e; }
html[data-theme="light"] body #home-studio :is(p, span, small, label, li) { color: #5e5e63 !important; }
html[data-theme="light"] body #home-studio :is(h1, h2, h3, b, strong, .sd2-add-k, .sd2-hw-text h3) { color: #1c1c1e !important; }
html[data-theme="light"] body #home-studio .sd2-kicker { color: #1d2b52 !important; }
html[data-theme="light"] body #home-studio .sd2-lede { color: #3a3a3c !important; }
html[data-theme="light"] body #home-studio .sd2-stats { border-color: rgba(0, 0, 0, 0.1) !important; }
html[data-theme="light"] body #home-studio .sd2-stats > div { border-color: rgba(0, 0, 0, 0.1) !important; }
html[data-theme="light"] body #home-studio .sd2-card:not(.sd2-add), html[data-theme="light"] body #home-studio .sd2-mail { background: #f5f5f7 !important; background-image: none !important; box-shadow: none !important; border: 0 !important; }
html[data-theme="light"] body #home-studio button.sd2-add { background: transparent !important; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1) !important; }
html[data-theme="light"] body #home-studio .sd2-av { background: rgba(29, 43, 82, 0.1) !important; background-image: none !important; color: #1d2b52 !important; }
html[data-theme="light"] body #home-studio .sd2-primary, html[data-theme="light"] body dialog.sd2-sheet .sd2-primary { background: #1d2b52 !important; color: #fff !important; box-shadow: none !important; }
html[data-theme="light"] body :is(#home-studio, dialog.sd2-sheet) .sd2-quiet { background: #e9e9ee !important; color: #1c1c1e !important; }
html[data-theme="light"] body :is(#home-studio, dialog.sd2-sheet) .sd2-link { color: #1d2b52 !important; }
html[data-theme="light"] body #home-studio .sd2-pill { background: #e9e9ee !important; color: #3a3a3c !important; }
html[data-theme="light"] body #home-studio .sd2-pill.is-done { background: rgba(29, 43, 82, 0.1) !important; color: #1d2b52 !important; }
html[data-theme="light"] body #home-studio .sd2-chips .is-hard { background: #fbe9dc !important; color: #8a3f12 !important; }
html[data-theme="light"] body #home-studio .sd2-chips .is-good { background: #e3efe6 !important; color: #2b5a37 !important; }
html[data-theme="light"] body #home-studio .sd2-chips .is-none { color: #6e6e73 !important; }
html[data-theme="light"] body #home-studio .sd2-hw-row { border-color: rgba(0, 0, 0, 0.08) !important; }
html[data-theme="light"] body #home-studio .sd2-icon, html[data-theme="light"] body #home-studio .sd2-x { background: #e9e9ee !important; color: #3a3a3c !important; }
html[data-theme="light"] body #home-studio .sd2-days button { background: #e9e9ee !important; color: #3a3a3c !important; }
html[data-theme="light"] body #home-studio .sd2-days button[aria-pressed="true"] { background: #1d2b52 !important; color: #fff !important; }
html[data-theme="light"] body #home-studio select { background: #e9e9ee !important; color: #1c1c1e !important; }
html[data-theme="light"] body #home-studio .sd2-switch input:checked + .sd2-sw { background: #1d2b52; }
html[data-theme="light"] body #home-studio .sd2-switch input:checked + .sd2-sw::after { background: #fff; }
/* sheets */
html[data-theme="light"] body dialog.sd2-sheet { background: #ffffff !important; color: #1c1c1e !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 40px 90px -30px rgba(0, 0, 0, 0.35) !important; }
html[data-theme="light"] body dialog.sd2-sheet :is(h2, strong, .sd2-sched-k) { color: #1c1c1e !important; }
html[data-theme="light"] body dialog.sd2-sheet :is(.sd2-field span, .sd2-sheet-k, .sd2-sheet-foot, .sd2-pieces span, .sd2-sched-note) { color: #5e5e63 !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-field span i { color: #6e6e73 !important; }
html[data-theme="light"] body dialog.sd2-sheet :is(input, select) { background: #f2f2f5 !important; color: #1c1c1e !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-pieces button { background: #f5f5f7 !important; color: #1c1c1e !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-sched { background: #f5f5f7 !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-seg { background: #e9e9ee !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-seg label { color: #3a3a3c !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-seg label:has(input:checked) { background: #1d2b52 !important; color: #fff !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-x { background: #e9e9ee !important; color: #3a3a3c !important; }
html[data-theme="light"] body dialog.sd2-sheet .sd2-err { color: #b3261e !important; }
html body #home-studio .sd2-card p.sd2-mailline { display: grid !important; grid-template-columns: auto 1fr; align-items: start; column-gap: 7px; row-gap: 2px; }
html body #home-studio .sd2-mailline svg { margin-top: 3px; }
html body #home-studio .sd2-mailline > :not(svg) { grid-column: 2; }
html body #home-studio .sd2-mailline span + .sd2-link::before { content: none !important; }
html body #home-studio .sd2-mailline .sd2-link { justify-self: start; }
/* light mode: the landing hero is the same off-black night, and labels read */
html[data-theme="light"] body #home #hero.home-hero.mr-hero { background: radial-gradient(90% 60% at 50% 0%, #24252a 0%, #1c1c1d 45%, #191918 75%) !important; }
html[data-theme="light"] body #home #hero.mr-hero::after { background: radial-gradient(520px circle at var(--mx) var(--my), rgba(221, 229, 242, 0.05), transparent 70%) !important; }
html[data-theme="light"] body .lp-tile-k { color: #1d2b52 !important; }
html[data-theme="light"] body .lp-tile p:not(.lp-tile-k) { color: #5e5e63 !important; }
html[data-theme="light"] body .fx-seg button:not(.on) { color: #5e5e63 !important; }
html:not([data-theme="light"]) body .lp-nav a { color: rgba(245, 245, 247, 0.84) !important; }
html[data-theme="light"] body nav#lp-nav.lp-nav { background: rgba(255, 255, 255, 0.78) !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 20px -8px rgba(0, 0, 0, 0.18) !important; }
html[data-theme="light"] body nav#lp-nav.lp-nav a { color: #3a3a3c !important; }
html[data-theme="light"] body nav#lp-nav.lp-nav a:is(:hover, .on, [aria-current]) { color: #1c1c1e !important; }
html[data-theme="light"] body [data-show] { color: #3a3a3c !important; }
html[data-theme="light"] body [data-show][aria-selected="true"] { background: #fff !important; color: #1c1c1e !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important; }
html[data-theme="light"] body nav#lp-nav.lp-nav a:is(.on, [aria-current], .is-active, .active) { background: #1d2b52 !important; color: #fff !important; }
html:not([data-theme="light"]) body nav#lp-nav.lp-nav a:is(.on, [aria-current], .is-active, .active) { background: #dde5f2 !important; color: #10131a !important; }

/* audio walkthrough: the same quiet grey panel as the bar panel */
html:not([data-theme="light"]) body #lune-walk.lw-panel { background: rgba(33, 33, 32, 0.94) !important; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -20px rgba(0, 0, 0, 0.7) !important; backdrop-filter: blur(20px) saturate(1.3) !important; -webkit-backdrop-filter: blur(20px) saturate(1.3) !important; }
html body #lune-walk .lw-status { text-transform: none !important; letter-spacing: 0 !important; font: 500 14px var(--ui) !important; color: var(--d-label-2, #b3b0a8) !important; }
html:not([data-theme="light"]) body #lune-walk :is(.lw-seg button[aria-pressed="true"], .lw-seg button.on) { background: #dde5f2 !important; color: #10131a !important; }
html:not([data-theme="light"]) body #lune-walk :is(input[type="number"], input[type="text"]) { background: #2a2a28 !important; color: #ecebe6 !important; border: 0 !important; }
/* phones: the view switch shares the header row and shrinks to fit */
@media (max-width: 480px) {
  html body header.bar .st-seg { flex: 1 1 auto !important; min-width: 0 !important; max-width: none !important; }
  html body header.bar .st-seg .st-seg-panels { flex: 1 1 auto !important; min-width: 0 !important; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html body header.bar .st-seg .st-seg-panels button { min-width: 0 !important; padding: 0 4px !important; font-size: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body header.bar .st-seg .st-more { flex: none !important; width: 34px !important; }
  html body header.bar { gap: 6px !important; padding-left: 10px !important; padding-right: 10px !important; }
}
@media (max-width: 600px) {
  html body dialog.sd2-sheet, html body dialog#sd2-student { width: 100vw !important; max-width: 100vw !important; margin: auto 0 0 !important; border-radius: 22px 22px 0 0 !important; max-height: 94vh; overflow-y: auto; }
  html body dialog.sd2-sheet .sd2-sheet-in { padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
  html body dialog.sd2-sheet[open] { animation: lune-sheet-up .32s cubic-bezier(0.22, 1, 0.36, 1) both !important; }
  html body dialog.sch[open] { animation: lune-sheet-up .32s cubic-bezier(0.22, 1, 0.36, 1) both !important; }
}
@keyframes lune-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* toasts: rise in, settle away */
html body #toast.toast {
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 14px)) !important; z-index: 500 !important;
  font: 500 15px/1.4 var(--ui) !important; padding: 12px 20px !important; border-radius: 14px !important; max-width: min(520px, calc(100vw - 32px));
  background: rgba(46, 46, 44, 0.96) !important; color: #f2f1ec !important; border: 0 !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 18px 44px -14px rgba(0, 0, 0, 0.7) !important;
  opacity: 0; transform: translate(-50%, 14px) scale(0.98) !important;
  transition: opacity .24s ease, transform .32s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body #toast.toast.is-in { opacity: 1; transform: translate(-50%, 0) !important; }
html[data-theme="light"] body #toast.toast { background: rgba(255, 255, 255, 0.97) !important; color: #1c1c1e !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 44px -14px rgba(0, 0, 0, 0.25) !important; }
@media (prefers-reduced-motion: reduce) { html body #toast.toast { transition: opacity .2s ease !important; transform: translate(-50%, 0) !important; } }
html body #lune-room.lr.is-leaving { animation: lr-out .22s ease both !important; pointer-events: none; }
@keyframes lr-out { to { opacity: 0; transform: scale(0.99); } }
@media (prefers-reduced-motion: reduce) { html body #lune-room.lr.is-leaving { animation: none !important; } }

/* ==========================================================================
   Lune AI's questions: one card per question, numbered answers, as ChatGPT asks
   ========================================================================== */
html body #lune-chat .qa-bubble { width: 100%; }
html body #lune-chat .qa {
  max-width: 560px; border: 1px solid var(--cc-line); border-radius: 18px; background: var(--cc-raise);
  padding: 16px 16px 12px; margin: 2px 0; animation: qa-in .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes qa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html body #lune-chat .qa-k { margin: 0 0 4px !important; font: 500 13px var(--ui) !important; color: var(--cc-dim) !important; }
html body #lune-chat .qa-q { margin: 0 0 4px !important; font: 500 19px/1.35 var(--ui) !important; color: var(--cc-text) !important; }
html body #lune-chat .qa-sub { margin: 0 0 4px !important; font: 400 15px var(--ui) !important; color: var(--cc-dim) !important; }
html body #lune-chat .qa-opts { list-style: none !important; margin: 12px 0 0 !important; padding: 0 !important; display: grid; gap: 6px; }
html body #lune-chat .qa-opts li { margin: 0 !important; padding: 0 !important; }
html body #lune-chat .qa-opts li::marker { content: none; }
html body #lune-chat .qa-opt, html body #lune-chat .qa-other {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; box-sizing: border-box;
  border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-bg); color: var(--cc-text);
  font: 400 16px/1.35 var(--ui); text-align: left; cursor: pointer; transition: background-color .12s ease, border-color .12s ease;
}
html body #lune-chat .qa-opt:hover:not(:disabled) { background: var(--cc-bubble); border-color: rgba(255, 255, 255, 0.14); }
html[data-theme="light"] body #lune-chat .qa-opt:hover:not(:disabled) { border-color: rgba(0, 0, 0, 0.16); }
html body #lune-chat .qa-n {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px;
  background: var(--cc-bubble); color: var(--cc-dim); font: 500 13px var(--nums, var(--ui)); font-variant-numeric: tabular-nums;
}
html body #lune-chat .qa-t { flex: 1; min-width: 0; }
html body #lune-chat .qa-opt[aria-pressed="true"] { border-color: var(--cc-accent); background: color-mix(in srgb, var(--cc-accent) 10%, var(--cc-bg)); }
html body #lune-chat .qa-opt[aria-pressed="true"] .qa-n { background: var(--cc-accent); color: var(--cc-accent-ink); }
html body #lune-chat .qa-tick { flex: none; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--cc-faint); }
html body #lune-chat .qa-opt[aria-pressed="true"] .qa-tick { background: var(--cc-accent); box-shadow: none; position: relative; }
html body #lune-chat .qa-opt[aria-pressed="true"] .qa-tick::after { content: ""; position: absolute; left: 6px; top: 4px; width: 6px; height: 10px; border-right: 2px solid var(--cc-accent-ink); border-bottom: 2px solid var(--cc-accent-ink); transform: rotate(45deg); }
html body #lune-chat .qa-other { cursor: text; padding-right: 6px; }
html body #lune-chat .qa-other:focus-within { border-color: color-mix(in srgb, var(--cc-accent) 60%, transparent); }
html body #lune-chat .qa-other input { flex: 1; min-width: 0; height: 30px; border: 0; outline: 0; background: transparent; color: var(--cc-text); font: 400 16px var(--ui); padding: 0; }
html body #lune-chat .qa-other input::placeholder { color: var(--cc-faint); }
html body #lune-chat .qa-go { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--cc-accent); color: var(--cc-accent-ink); display: grid; place-items: center; cursor: pointer; opacity: 0.35; transition: opacity .15s ease; }
html body #lune-chat .qa-other:focus-within .qa-go, html body #lune-chat .qa-other:has(input:not(:placeholder-shown)) .qa-go { opacity: 1; }
html body #lune-chat .qa-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
html body #lune-chat .qa-foot:empty { display: none; }
html body #lune-chat .qa-skip { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--cc-dim); font: 500 15px var(--ui); cursor: pointer; }
html body #lune-chat .qa-skip:hover { background: var(--cc-bubble); color: var(--cc-text); }
html body #lune-chat .qa-done { height: 36px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--cc-accent); color: var(--cc-accent-ink); font: 600 15px var(--ui); cursor: pointer; }
html body #lune-chat .qa :is(button, input):focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
/* answered: the card quietens, the choice stays visible */
html body #lune-chat .qa.is-done { background: transparent; }
html body #lune-chat .qa.is-done .qa-opt:not([aria-pressed="true"]), html body #lune-chat .qa.is-done .qa-other, html body #lune-chat .qa.is-done .qa-foot { display: none; }
html body #lune-chat .qa.is-done .qa-opt { cursor: default; }
html body #lune-chat .qa.is-done .qa-sub { display: none; }
/* the finished schedule */
html body #lune-chat .la-week { list-style: none !important; margin: 12px 0 14px !important; padding: 0 !important; border: 1px solid var(--cc-line); border-radius: 16px; overflow: hidden; max-width: 620px; }
html body #lune-chat .la-week li { display: grid !important; grid-template-columns: 110px auto 1fr; gap: 4px 12px; padding: 12px 14px !important; margin: 0 !important; border-top: 1px solid var(--cc-line); font-size: 15.5px !important; line-height: 1.45 !important; }
html body #lune-chat .la-week li:first-child { border-top: 0; }
html body #lune-chat .la-week li::marker { content: none; }
html body #lune-chat .la-week strong { font-weight: 500 !important; color: var(--cc-text) !important; }
html body #lune-chat .la-week .la-wm { color: var(--cc-dim); font-variant-numeric: tabular-nums; }
html body #lune-chat .la-week li > span:last-child { color: var(--cc-dim) !important; }
html body #lune-chat .la-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
html body #lune-chat .la-plan-actions .la-act { height: 40px !important; padding: 0 16px !important; border-radius: 10px !important; border: 1px solid var(--cc-line) !important; background: transparent !important; color: var(--cc-text) !important; font: 500 15px var(--ui) !important; }
html body #lune-chat .la-plan-actions .la-act.primary { background: var(--cc-accent) !important; color: var(--cc-accent-ink) !important; border-color: transparent !important; }
html body #lune-chat .la-planning { color: var(--cc-dim) !important; font-style: italic; }
@media (max-width: 560px) {
  html body #lune-chat .la-week li { grid-template-columns: 1fr auto; }
  html body #lune-chat .la-week li > span:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html body #lune-chat .qa { animation: none; } }
html body #lune-chat .chat-from-lune .chat-bubble .qa p.qa-k { margin: 0 0 4px !important; font: 500 13px var(--ui) !important; color: var(--cc-dim) !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa p.qa-q { margin: 0 0 4px !important; font: 500 19px/1.35 var(--ui) !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa p.qa-sub { margin: 0 !important; font: 400 15px/1.4 var(--ui) !important; color: var(--cc-dim) !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa ol.qa-opts { margin: 12px 0 0 !important; padding: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa ol.qa-opts > li { margin: 0 !important; padding: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week { padding: 0 !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week > li { margin: 0 !important; }
html body #lune-chat .chat-bubble.qa-bubble, html body #lune-chat .chat-bubble .qa, html body #lune-chat .chat-bubble :is(.la-week, .la-plan-actions) { white-space: normal !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa ol.qa-opts > li.qa-other { padding: 6px 6px 6px 12px !important; border: 1px dashed var(--cc-line) !important; background: transparent !important; }
html body #lune-chat .chat-from-lune .chat-bubble .qa ol.qa-opts > li.qa-other:focus-within { border-style: solid !important; border-color: color-mix(in srgb, var(--cc-accent) 60%, transparent) !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week strong { font: 500 16px var(--ui) !important; font-style: normal !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week .la-wm { font: 400 15px var(--ui) !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week li > span:last-child { font: 400 15px/1.45 var(--ui) !important; }
html body #lune-chat .chat-from-lune .chat-bubble ul.la-week > li { padding: 12px 16px !important; align-items: baseline; }
html body .sch-item textarea { min-height: 2.9em; }

/* guests: no Repertoire or Lune AI controls, just an invitation where Lune AI would be */
html body:not(.is-signed-in) :is(#btn-repertoire, .lp-tools-bar #btn-tell, .st-ask, #coach .lp-ai-row) { display: none !important; }
html body:not(.is-signed-in) #coach .lp-askbar { cursor: pointer; justify-content: center !important; }
html body:not(.is-signed-in) #coach .lp-askbar > * { display: none !important; }
html body:not(.is-signed-in) #coach .lp-askbar::after {
  content: "Sign in to ask Lune AI about this bar"; display: block; font: 500 15px var(--ui); color: var(--cp-dim);
}
html body:not(.is-signed-in) #coach .lp-askbar:hover::after { color: var(--cp-text); }

/* ==========================================================================
   Landing: Practise with Lune, and Plan my schedule (product miniatures)
   ========================================================================== */
html body .home-feat-device:is(.fx-room, .fx-plan) {
  --m-bg: #1d1d1c; --m-card: #262624; --m-raise: #2e2e2c; --m-line: rgba(255, 255, 255, 0.08); --m-text: #ecebe6; --m-dim: #a3a199; --m-acc: #dde5f2; --m-ink: #10131a;
  background: var(--m-bg) !important; color: var(--m-text); border-radius: 22px !important; padding: 18px !important; box-shadow: 0 0 0 1px var(--m-line), 0 40px 80px -40px rgba(0, 0, 0, 0.7) !important;
  font-family: var(--ui);
}
/* the practice room */
html body .fx-room-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 8px; }
html body .fx-room-back { font-size: 14px; color: var(--m-dim); }
html body .fx-room-id { text-align: center; font: 400 22px/1.1 var(--display); color: var(--m-text); }
html body .fx-room-id small { display: block; font: 400 12.5px var(--ui); color: var(--m-dim); margin-bottom: 2px; }
html body .fx-room-id i { font-style: normal; font-size: 13px; color: var(--m-dim); }
html body .fx-room-goal { text-align: center; margin: 4px 0 12px; font-size: 14px; color: var(--m-dim); }
html body .fx-room-goal b { color: var(--m-text); font-weight: 500; }
html body .fx-room-row { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 16px; }
html body .fx-ladder { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(118, 118, 128, 0.22); }
html body .fx-ladder i { font: 400 12.5px var(--nums); font-style: normal; padding: 4px 9px; border-radius: 999px; color: var(--m-dim); }
html body .fx-ladder i.on { background: var(--m-text); color: var(--m-ink); }
html body .fx-streak { display: inline-flex; gap: 6px; }
html body .fx-streak i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(236, 235, 230, 0.4); }
html body .fx-streak i.on { background: var(--m-acc); box-shadow: 0 0 10px rgba(221, 229, 242, 0.5); }
html body .fx-room-notes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 18px 8px; margin-bottom: 16px; border-radius: 14px; background: var(--m-card); }
html body .fx-room-notes .fx-k { font-size: 12.5px; font-style: italic; color: var(--m-dim); margin-right: 4px; }
html body .fx-chip { display: inline-flex; align-items: baseline; gap: 1px; padding: 7px 9px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font: 500 17px var(--ui); color: var(--m-text);
  animation: fx-lit 3.6s ease-in-out infinite; animation-delay: calc(var(--d) * 0.45s); }
html body .fx-chip sup { font: 400 9.5px var(--nums); color: var(--m-dim); vertical-align: baseline; }
html body .fx-chip em { margin-left: 4px; font: 600 9.5px var(--nums); font-style: normal; width: 15px; height: 15px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(221, 229, 242, 0.85); color: var(--m-ink); align-self: center; }
@keyframes fx-lit {
  0%, 9%, 100% { background: rgba(255, 255, 255, 0.05); color: var(--m-text); transform: none; }
  3%, 7% { background: var(--m-acc); color: var(--m-ink); transform: translateY(-3px); }
}
html body .fx-room-act { display: flex; gap: 8px; }
html body .fx-btn { flex: none; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font: 500 14.5px var(--ui); color: var(--m-text); white-space: nowrap; }
html body .fx-btn.fx-quiet { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); color: var(--m-dim); }
html body .fx-btn.fx-main { flex: 1; justify-content: center; background: var(--m-text); color: var(--m-ink); }
/* the schedule */
html body .fx-plan-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 4px 12px; }
html body .fx-plan-head b { font: 400 22px var(--display); }
html body .fx-plan-head span { font-size: 13.5px; color: var(--m-dim); }
html body .fx-plan-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html body .fx-day { border-radius: 14px; background: var(--m-card); padding: 12px 10px 10px; box-shadow: inset 0 0 0 1px var(--m-line); }
html body .fx-day.is-today { box-shadow: inset 0 0 0 1.5px rgba(221, 229, 242, 0.5); }
html body .fx-day p { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 8px; font: 500 14px var(--ui); color: var(--m-text); }
html body .fx-day p span { font: 400 11.5px var(--ui); color: var(--m-dim); }
html body .fx-day.is-today p span { padding: 1px 7px; border-radius: 999px; background: var(--m-acc); color: var(--m-ink); font-weight: 600; }
html body .fx-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
html body .fx-day li { position: relative; padding: 7px 8px 7px 12px; border-radius: 9px; background: var(--m-raise); font: 400 12.5px/1.35 var(--ui); color: var(--m-dim); }
html body .fx-day li::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2.5px; border-radius: 0 2px 2px 0; background: #8d8a82; }
html body .fx-day li.k-l::before { background: #9ec5a8; }
html body .fx-day li.k-p::before { background: #e3b48c; }
html body .fx-day li.k-f::before { background: var(--m-acc); }
html body .fx-day li b { display: block; font: 500 11.5px var(--nums); color: var(--m-text); margin-bottom: 1px; }
html body .fx-day li b::after { content: " min"; font-weight: 400; color: var(--m-dim); }
@media (max-width: 640px) {
  html body .fx-plan-days { grid-template-columns: 1fr; }
  html body .fx-day:not(.is-today) { display: none; }
  html body .fx-room-act .fx-btn.fx-quiet { display: none; }
}
@media (prefers-reduced-motion: reduce) { html body .fx-chip { animation: none; } }

/* the Next card: grey, calm, and its buttons always fit */
html:not([data-theme="light"]) body #home-member #member-next { background: #212120 !important; background-image: none !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07) !important; }
html body #home-member #member-next .member-next-face { opacity: 0.55 !important; mask-image: linear-gradient(90deg, transparent 0%, #000 55%) !important; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%) !important; }
html body #home-member #member-next .member-next-actions { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; position: relative; z-index: 1; }
html body #home-member #member-next .member-next-actions button { white-space: nowrap; max-width: 100%; }
html:not([data-theme="light"]) body #home-member #member-next .member-next-actions .primary { background: #dde5f2 !important; color: #10131a !important; }
html:not([data-theme="light"]) body #home-member #member-next .member-next-actions .quiet { background: rgba(255, 255, 255, 0.08) !important; color: #ecebe6 !important; border: 0 !important; }
@media (max-width: 600px) {
  html body #home-member #member-next { padding: 22px 20px 20px !important; border-radius: 22px !important; min-height: 0 !important; }
  html body #home-member #member-next h2 { font-size: 34px !important; line-height: 1.05 !important; }
  html body #home-member #member-next .member-next-by { font-size: 16px !important; }
  html body #home-member #member-next .member-next-detail, html body #home-member #member-next .member-next-why { font-size: 16px !important; line-height: 1.45 !important; max-width: 70% ; }
  html body #home-member #member-next .member-next-actions { flex-direction: column !important; margin-top: 18px !important; }
  html body #home-member #member-next .member-next-actions button { width: 100% !important; height: 48px !important; min-height: 48px !important; justify-content: center !important; font-size: 16px !important; padding: 0 16px !important; border-radius: 14px !important; }
  html body #home-member #member-next .member-next-face { width: 62% !important; opacity: 0.4 !important; }
}
/* phone polish: scrolling chip rows fade at the edge; quiet text links in sentence case */
@media (max-width: 600px) {
  html body #home-ask-chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); scrollbar-width: none; padding-right: 24px !important; }
  html body #home-ask-chips::-webkit-scrollbar { display: none; }
}
html body .wk-change, html body #member-streak .link-btn {
  text-transform: none !important; letter-spacing: 0 !important; text-decoration: none !important; font: 500 15px var(--ui) !important;
  color: var(--navy-mid, #dde5f2) !important; padding: 6px 0 !important;
}
html[data-theme="light"] body .wk-change, html[data-theme="light"] body #member-streak .link-btn { color: #1d2b52 !important; }
@media (max-width: 600px) {
  html body #home-member #home-ask-chips { margin-bottom: 22px !important; }
  html body #home-member #member-homework { margin: 0 0 14px !important; border-radius: 22px !important; padding: 20px !important; }
  html body #home-member #member-homework + * { margin-top: 0 !important; }
  html body #home-member #member-next { margin-top: 0 !important; margin-bottom: 14px !important; }
  html body #home-member #member-homework .primary { width: 100% !important; height: 48px !important; justify-content: center !important; border-radius: 14px !important; }
}
/* phone bottom bar: Practise leads */
html body #st-bottom { gap: 8px !important; }
html body #st-bottom .st-practise {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: #dde5f2; color: #10131a; font: 600 15px var(--ui); cursor: pointer;
}
html[data-theme="light"] body #st-bottom .st-practise { background: #1d2b52; color: #fff; }
html body #st-bottom .st-ask { flex: 0 1 auto; min-width: 0; }
@media (max-width: 480px) {
  html body #st-bottom .st-ask { flex: none !important; width: 40px !important; height: 40px !important; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important; justify-content: center !important; gap: 0 !important; }
  html body #st-bottom .st-ask .lune-orb-sm { display: inline-block !important; margin: 0 !important; }
  html body #st-bottom .st-tempo .st-bpm small { display: none; }
}
@media (max-width: 480px) { html body #st-bottom .st-ask .st-ask-t { display: none !important; } }

/* dictation: the composer gives way to the live waveform (hidden must win over the layout rules) */
html body #lune-chat #chat-composer[hidden], html body #lune-chat .lc-composer[hidden], html body #coach .lp-askbar[hidden], html body .lc-composer[hidden] { display: none !important; }
html body #lune-chat #chat-listen:not([hidden]) {
  display: flex !important; width: min(720px, calc(100% - 32px)); margin-inline: auto; box-sizing: border-box;
  border-radius: 20px !important; background: var(--cc-raise) !important; border: 1px solid var(--cc-line) !important; min-height: 64px;
}
html body #lune-chat #chat-listen .lc-wave { color: var(--cc-accent); }

/* Repertoire card: Open on its own row, then four equal actions */
html body .rep-card .rep-card-actions { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 8px !important; margin-top: 16px !important; align-items: stretch !important; }
html body .rep-card .rep-card-actions [hidden] { display: none !important; }
html body .rep-card .rep-card-actions > button[data-open] { grid-column: 1 / -1; order: -1; }
html body .rep-card .rep-card-actions > :is(button, select) {
  width: 100% !important; min-width: 0 !important; height: 44px !important; min-height: 44px !important; margin: 0 !important; padding: 0 10px !important;
  border-radius: 12px !important; font: 500 15px var(--ui) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; text-align: center; box-shadow: none !important;
}
html:not([data-theme="light"]) body .rep-card .rep-card-actions > button.primary { background: #dde5f2 !important; color: #10131a !important; border: 0 !important; }
html:not([data-theme="light"]) body .rep-card .rep-card-actions > :is(button.quiet, select) { background: rgba(255, 255, 255, 0.07) !important; color: #ecebe6 !important; border: 0 !important; }
html[data-theme="light"] body .rep-card .rep-card-actions > :is(button.quiet, select) { background: #f0f0f3 !important; color: #1c1c1e !important; border: 0 !important; }
html body .rep-card .rep-card-actions > select { text-align-last: center; appearance: none; -webkit-appearance: none; background-image: none !important; cursor: pointer; }
@media (max-width: 600px) {
  html body .rep-card .rep-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* signed in: no landing page flashes first; the home fades in when it's ready */
html.boot-signed:not(.signed-ready) :is(#home-guest, #lune-intro, nav#lp-nav, #btn-bar-auth) { display: none !important; }
html.boot-signed:not(.signed-ready) #home { background: var(--g-bg, #191918) !important; }
html.boot-signed:not(.signed-ready) #home::before {
  content: ""; position: fixed; left: 50%; top: 42%; width: 30px; height: 30px; margin: -15px 0 0 -15px; background: #e9ecf7; opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 26 26'%3E%3Cpath d='M17.61 4.58A12 12 0 1 0 27.70 24.77A11.4 11.4 0 1 1 17.61 4.58Z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: lune-breathe 2.2s ease-in-out .3s infinite both;
}
html[data-theme="light"].boot-signed:not(.signed-ready) #home::before { background: #1d2b52; }
html.boot-signed.signed-ready :is(#home-member, #home-studio) { animation: lune-dlg-fade .35s ease both; }
@media (prefers-reduced-motion: reduce) { html.boot-signed :is(#home-member, #home-studio), html.boot-signed #home::before { animation: none !important; } }
