/* ── BGA Practice Studio — Design tokens ── */
:root {
  --orange: #f58220;
  --orange-light: #ff922e;
  --orange-dim: #c96818;
  --orange-glow: rgba(245, 130, 32, 0.45);
  --orange-soft: rgba(245, 130, 32, 0.1);
  --black: #111111;
  --dark-grey: #222222;
  --surface: #181818;
  --surface-raised: #242424;
  --mid-grey: #333333;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --light-grey: #999999;
  --muted: #6e6e6e;
  --white: #ffffff;
  --white-glow: rgba(255, 255, 255, 0.4);
  /* Keep in sync with PRACTICE_STUDIO_BUILD in embed.js / script.js */
  --ps-build: "2026-09-19-pause-cloud-poll-1";
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-orange: 0 4px 20px rgba(245, 130, 32, 0.22);
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 440px;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;
  --touch-min: 44px;
  --bga-ps-panel-width: min(440px, 100vw);
  --bga-ps-panel-height: min(88dvh, 780px);
  --bga-ps-z-launcher: 10050;
  --bga-ps-z-backdrop: 10060;
  --brand-logo-width: 152px;
  --header-logo-top-offset: 0.875rem;
  --header-logo-nav-gap: 0;
  --header-nav-content-gap: var(--space-md);
  --bga-ps-z-panel: 10070;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -30%, rgba(245, 130, 32, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(255, 255, 255, 0.015), transparent);
}

body.bga-ps-standalone {
  background: #ececec;
  background-image: none;
  color: #222;
}

body.bga-ps-embed {
  background: transparent;
  background-image: none;
  min-height: 0;
}

html.bga-ps-iframe,
html.bga-ps-iframe body {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  /* Avoid dark/light canvas fill that paints a rectangle behind the FAB. */
  color-scheme: only light;
  /* Visible so the logo tooltip can paint outside the shell within the frame. */
  overflow: visible;
  margin: 0;
  padding: 0;
  min-height: 0;
  height: auto;
  /* No shadow/filter should ever be painted at the document root — only the
     circular .bga-ps-launcher-open button is allowed a shadow. */
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.bga-ps-iframe body.bga-ps-embed {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  min-height: 0;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.bga-ps-iframe .bga-ps-root {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.bga-ps-iframe .bga-ps-root:not(.bga-ps-open) .bga-ps-panel,
html.bga-ps-iframe .bga-ps-root:not(.bga-ps-open) .bga-ps-panel *,
html.bga-ps-iframe .bga-ps-root:not(.bga-ps-open) .bga-ps-backdrop {
  visibility: hidden;
  pointer-events: none !important;
}

/* Iframe embed: launcher layout follows host breakpoint (iframe viewport is smaller than 769px when closed). */
html.bga-ps-iframe .bga-ps-launcher {
  overflow: visible;
  transition: opacity var(--transition);
}

html.bga-ps-iframe .bga-ps-launcher-shell {
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}

html.bga-ps-iframe .bga-ps-root.bga-ps-open .bga-ps-launcher {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Top-align shell in the closed iframe so room below is available for the tooltip. */
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher {
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: max-content;
  max-width: none;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border-right: none;
  padding-right: var(--space-2xs);
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* Embed iframe viewports are narrower than 769px when closed — keep expand
   gated on is-expanded even when mobile media queries would otherwise match. */
html.bga-ps-iframe .bga-ps-launcher:not(.is-expanded):not(.bga-ps-launcher--draft-pending)
  .bga-ps-launcher-controls {
  max-width: 0 !important;
  padding: 0.2rem 0 !important;
  opacity: 0 !important;
  transform: translateX(4px) !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-panel {
  top: 50%;
  right: 0;
  left: auto;
  bottom: auto;
  width: 168px;
  max-width: 480px;
  height: 88px;
  max-height: 100dvh;
  transform: translateY(-50%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(245, 130, 32, 0.07);
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-root.bga-ps-open .bga-ps-panel {
  top: 0;
  width: min(440px, 100vw);
  height: 100%;
  transform: translateY(0);
  border-radius: 0;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.45);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher {
  /* This IS the placement decision — the FAB's fixed, final 16px inset from the
     right/bottom edges of the host iframe's own canvas (embed.js MOBILE_VIEWPORT_GAP).
     The host iframe itself now sits flush with the true viewport corner
     (right:0, bottom:env(safe-area-inset-bottom)), so this 16px inset IS the real
     on-screen gap — one number, one layer, no arithmetic split with a second offset.
     Extra canvas for the shadow/badges/hint lives to the LEFT and ABOVE (the iframe's
     width/height grow that direction; see embed.js closedMobileWidth/Height), so this
     right/bottom inset never has to change to make room for any of that. If this value
     changes, embed.js's MOBILE_VIEWPORT_GAP must change with it so the two stay in sync. */
  left: auto !important;
  right: 16px !important;
  top: auto !important;
  bottom: 16px !important;
  transform: none !important;
  width: auto;
  max-width: none;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  outline: none !important;
  border: none !important;
}

/* Compact circular FAB: icon-only, no border/ring in idle — active states add a thin ring. */
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.24) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--timer-active:not(.is-expanded) .bga-ps-launcher-open {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.24),
    0 0 0 3px rgba(245, 130, 32, 0.55) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--paused:not(.is-expanded) .bga-ps-launcher-open {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.24),
    0 0 0 3px rgba(245, 170, 70, 0.6) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-open {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.24),
    0 0 0 3px rgba(62, 207, 142, 0.65) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-hero,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-controls,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-chrome {
  display: none !important;
}

/* Closed mobile: shell is a transparent wrapper only — never a painted rectangle. */
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--session-active .bga-ps-launcher-shell,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--timer-active .bga-ps-launcher-shell,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--paused .bga-ps-launcher-shell {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  outline: none !important;
  isolation: auto !important;
  overflow: visible !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell::before,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Mobile host closed FAB — host layout wins even when iframe viewport is wide.
   Compact 56px circle, icon-only: no label/divider, no idle border/ring. */
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  min-width: 56px !important;
  min-height: 56px !important;
  width: 56px !important;
  height: 56px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: none !important;
  background: linear-gradient(155deg, var(--orange-light) 0%, var(--orange) 55%, var(--orange-dim) 100%) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-logo-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-logo {
  height: 1.6rem !important;
  max-height: 1.6rem !important;
  width: auto !important;
  transform: none !important;
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-divider,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-idle-label {
  display: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-idle-label[hidden],
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-state-mark[hidden] {
  display: none !important;
}

/* Elapsed-time badge: small pill overlapping the bottom edge of the circle — never widens the FAB itself. */
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-collapsed-time {
  position: absolute !important;
  left: 50% !important;
  bottom: -0.5rem !important;
  transform: translate(-50%, 0) !important;
  margin: 0 !important;
  padding: 0.1rem 0.4rem !important;
  min-width: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: #161616 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  font-size: 0.625rem !important;
  color: rgba(255, 255, 255, 0.96) !important;
  z-index: 2 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-collapsed-time.is-long {
  min-width: 0 !important;
}

/* Status badge (pause / draft check): small circular overlay on the top-right corner of the FAB. */
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-state-mark {
  position: absolute !important;
  top: -0.2rem !important;
  right: -0.2rem !important;
  margin: 0 !important;
  width: 1.15rem !important;
  height: 1.15rem !important;
  border-radius: 50% !important;
  background: #161616 !important;
  z-index: 2 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open-tooltip {
  display: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-root,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-main {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-root:not(.bga-ps-open) .bga-ps-panel,
html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-root:not(.bga-ps-open) .bga-ps-backdrop {
  display: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded {
  inset: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  top: 0 !important;
  width: 100% !important;
  max-width: none !important;
  transform: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-panel {
  left: 50%;
  right: auto;
  bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 1.5rem), 380px);
  height: 88px;
  max-height: 100dvh;
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(245, 130, 32, 0.07);
}

html.bga-ps-iframe[data-bga-ps-host-layout="mobile"] .bga-ps-root.bga-ps-open .bga-ps-panel {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--bga-ps-panel-height);
  transform: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Lesson page (demo / embed host) ── */
.bga-lesson-page {
  min-height: 100dvh;
  padding: var(--space-xl) var(--space-lg);
  padding-bottom: calc(var(--space-2xl) + 80px);
}

.bga-lesson-demo {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xl);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.bga-lesson-demo-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: var(--space-sm);
}

.bga-lesson-demo h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: #111;
}

.bga-lesson-demo p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #555;
}

body.bga-ps-embed .bga-lesson-page {
  display: none;
}

/* ── Practice Studio embed shell ── */
/**
 * Pointer-events safety: the mobile closed-FAB iframe canvas is bigger than
 * the FAB itself (room for its shadow/badges, and — while the first-visit
 * hint is shown — the tooltip too), and that extra canvas is real, unused,
 * transparent space that may be sitting over host-page content. `.bga-ps-root`
 * fills the whole canvas and starts inert; only actual, on-screen controls
 * opt back into `auto` below, so a tap on the empty canvas can never be
 * captured by an invisible wrapper div that happens to span it.
 *
 * Caveat worth being explicit about: this only governs hit-testing *inside*
 * this iframe's own document. An `<iframe>` is a single opaque rectangle
 * from the HOST page's point of view — no amount of internal
 * `pointer-events` can make a host-page link literally reachable through
 * the iframe's box. What actually keeps host content tappable is the host
 * (embed.js) keeping that box tightly sized to the FAB/tooltip region and
 * shrinking it back the instant the hint is dismissed — this internal rule
 * is what stops an idle, do-nothing click from being wasted on an invisible
 * div inside that box, not a way to click through the iframe itself.
 */
.bga-ps-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--bga-ps-z-launcher);
  overflow: visible;
}

.bga-ps-root * {
  pointer-events: auto;
}

/* Outer wrapper: overflow visible so the logo tooltip can sit outside the shell.
   pointer-events: none on the wrapper itself (real children re-enable auto below,
   see .bga-ps-root * above) — with the hint now `position: absolute` (out of this
   flex flow), this wrapper's own box is just the shell's footprint, but staying
   inert by default costs nothing and keeps the "only real controls are clickable"
   contract obvious without depending on exact sizing. */
.bga-ps-launcher {
  position: fixed;
  z-index: var(--bga-ps-z-launcher);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--white);
  font-family: inherit;
  overflow: visible;
  pointer-events: none;
  touch-action: manipulation;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

/* Mobile sheet chrome — hidden on desktop; revealed only in mobile expanded CSS. */
.bga-ps-launcher-sheet-backdrop,
.bga-ps-launcher-sheet-chrome {
  display: none;
}

.bga-ps-launcher-open-studio {
  display: none;
}

.bga-ps-launcher-sheet-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bga-ps-launcher-sheet-status {
  display: none;
  margin: 0;
}

.bga-ps-mini-btn-label {
  display: none;
}

/* Inner shell: rounded chrome + clipping; does not include the tooltip. */
.bga-ps-launcher-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0.25rem 0.25rem 0.25rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: linear-gradient(165deg, #1a1a1a 0%, #121212 100%);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(245, 130, 32, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}

.bga-ps-launcher-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 23%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.bga-ps-launcher-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  overflow: visible;
}

.bga-ps-launcher--timer-active .bga-ps-launcher-shell,
.bga-ps-launcher--session-active .bga-ps-launcher-shell {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(245, 130, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bga-ps-launcher--paused:not(.is-expanded) .bga-ps-launcher-collapsed-time.is-visible {
  opacity: 0.72;
}

.bga-ps-launcher-open {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 4.25rem;
  min-height: 0;
  padding: 0.2rem 0.85rem 0.2rem 0.45rem;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
  pointer-events: auto;
  transition: background 180ms ease;
}

.bga-ps-launcher-open:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bga-ps-launcher-open:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.04);
}

/**
 * First-visit mobile launcher tip — premium, non-modal coaching callout.
 *
 * Deliberately `position: absolute` with a FIXED px width and NO `vw`-based
 * max-width at all, not a flex-flow sibling sized from `width: max-content`
 * + a `vw`-based clamp:
 *
 *   - `position: absolute` takes it out of `.bga-ps-launcher`'s column
 *     flex flow entirely, so it can never stretch/shift the shell or the
 *     FAB inside it — the FAB's own on-screen position is unaffected by
 *     whether this card is visible. (script.js's measurement — see
 *     measureClosedLauncherRect — has to union this element's own rect in
 *     explicitly for the same reason: a positioned/overflowing child does
 *     not enlarge its ancestor's own getBoundingClientRect().)
 *   - A FIXED width (not `vw`-derived) sidesteps a chicken/egg trap: `vw`
 *     inside this iframe is the iframe's OWN current width, which is only
 *     ~92px while the card is hidden — sizing the card from that before
 *     the host ever sees a reason to widen the iframe is what caused the
 *     one-word-per-line wrapping regression. 220px is an intentional
 *     horizontal card width (target range ~210–230px) that reads two
 *     natural lines ("Practice Studio" / "Tap here to start tracking your
 *     practice.") on every supported phone width — see
 *     embed.js MOBILE_CLOSED_W_MAX for the host-side headroom this needs.
 *   - `right: 0` keeps it flush with `.bga-ps-launcher`'s own right edge —
 *     i.e. the FAB's right edge — matching the arrow below that points
 *     down at the button; `bottom: calc(100% + 12px)` sits it just above
 *     the shell with a fixed 12px gap (must match embed.js
 *     MOBILE_TOOLTIP_GAP — that constant reasons about this same gap on
 *     the host side).
 *   - NO `max-width: calc(100vw - …)` clamp is applied. `100vw` here is
 *     still the IFRAME's own viewport, not the phone's — on the initial
 *     92px idle canvas that resolves to roughly 60px, which would silently
 *     override the 220px fixed width and reintroduce the exact
 *     one-word-per-line regression this fix exists to remove. A 220px
 *     tooltip, right-aligned with a FAB that already sits 16px inside the
 *     real viewport edge, fits comfortably even on the narrowest supported
 *     phone (320px: 320 - 16 - 220 = 84px of clearance to the left, still
 *     on-screen). If a genuine host-viewport cap is ever needed, it must
 *     be computed from the REAL parent viewport width and passed in from
 *     embed.js (which can see `window.innerWidth` on the host page) —
 *     never from an iframe-local `vw` value.
 */
.bga-ps-launcher-hint {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px); /* MOBILE_TOOLTIP_GAP (embed.js) */
  z-index: calc(var(--bga-ps-z-launcher) + 3);
  box-sizing: border-box;
  width: 220px; /* intentional horizontal card, ~210-230px target — the only sizing rule */
  padding: 0.7rem 0.85rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font);
  box-shadow: var(--shadow-md);
  text-align: left;
  pointer-events: auto;
}

.bga-ps-launcher-hint.is-visible {
  display: block;
}

.bga-ps-launcher-hint-title {
  margin: 0 1.4rem 0.2rem 0;
  color: var(--orange);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.bga-ps-launcher-hint-body {
  margin: 0 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.bga-ps-launcher-hint-close {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  touch-action: manipulation;
}

.bga-ps-launcher-hint-close:hover {
  color: rgba(255, 255, 255, 0.88);
}

.bga-ps-launcher-hint-close:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.bga-ps-launcher-hint-close-icon,
.bga-ps-launcher-hint-close-icon svg {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
}

.bga-ps-launcher-hint-arrow {
  position: absolute;
  left: auto;
  right: 1.35rem;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-raised);
  transform: rotate(45deg);
  pointer-events: none;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-hint {
  display: none !important;
}

@keyframes bga-ps-launcher-hint-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bga-ps-launcher-hint-pulse {
  0%,
  70%,
  100% {
    transform: scale(1);
  }
  85% {
    transform: scale(1.04);
  }
}

@media (max-width: 768px) {
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-hint.is-visible {
    animation: bga-ps-launcher-hint-enter 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.has-hint:not(.is-expanded) .bga-ps-launcher-open {
    animation: bga-ps-launcher-hint-pulse 2.6s ease-in-out infinite;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-hint {
    display: none !important;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-hint.is-visible {
    animation: none;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.has-hint:not(.is-expanded) .bga-ps-launcher-open {
    animation: none;
  }
}

/* CSS tooltip — below the logo, outside the shell (absolute; no layout impact). */
.bga-ps-launcher-open-tooltip {
  position: absolute;
  z-index: calc(var(--bga-ps-z-launcher) + 2);
  top: calc(100% + 8px);
  bottom: auto;
  /* Horizontally centred on the logo button area (left of the shell). */
  left: 2.55rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.4rem;
  background: rgba(18, 18, 18, 0.94);
  color: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-2px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

/* Invisible bridge so the pointer can move from logo → tooltip without flicker. */
.bga-ps-launcher-open-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 120%;
  min-width: 5rem;
  height: 14px;
  transform: translateX(-50%);
}

.bga-ps-launcher-open-tooltip::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: auto;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-bottom-color: rgba(18, 18, 18, 0.94);
}

.bga-ps-launcher-collapsed-time {
  display: block;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  user-select: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    max-height 180ms ease,
    margin 180ms ease;
}

.bga-ps-launcher-collapsed-time.is-visible {
  max-height: 1.25rem;
  margin-top: 0.1rem;
  opacity: 1;
  transform: translateY(0);
}

.bga-ps-launcher-collapsed-time.is-exiting {
  max-height: 1.25rem;
  margin-top: 0.1rem;
  opacity: 0;
  transform: translateY(2px);
}

.bga-ps-launcher.is-expanded .bga-ps-launcher-collapsed-time {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(2px);
  pointer-events: none;
}

.bga-ps-launcher-collapsed-time[hidden]:not(.is-exiting) {
  display: none !important;
}

.bga-ps-launcher-logo {
  display: block;
  height: 76px;
  width: auto;
  max-height: 76px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  opacity: 0;
  filter: brightness(1);
  transform: translateY(-1px) scale(1);
  transform-origin: center center;
  animation: bga-ps-launcher-logo-fade 0.4s ease forwards;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    opacity 180ms ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes bga-ps-launcher-logo-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Premium logo cue — logo area only; does not shift launcher or controls. */
@media (hover: hover) and (pointer: fine) {
  /* Vertical logo nudge is mobile/standalone only — desktop host stays stationary.
     Collapsed mobile FAB keeps its white (inverted) mark on hover/focus — only the
     expanded sheet's open-studio logo uses the brightness cue. */
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open:hover .bga-ps-launcher-logo,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open:focus-visible .bga-ps-launcher-logo {
    filter: brightness(1.14);
    transform: translateY(-2px) scale(1.02);
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open:hover .bga-ps-launcher-logo,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open:focus-visible .bga-ps-launcher-logo {
    transform: translateY(-1px) scale(1.04);
  }

  .bga-ps-launcher:has(.bga-ps-launcher-open:hover) .bga-ps-launcher-open-tooltip,
  .bga-ps-launcher:has(.bga-ps-launcher-open-tooltip:hover) .bga-ps-launcher-open-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .bga-ps-launcher:has(.bga-ps-launcher-open:hover) .bga-ps-launcher-open-tooltip {
    transition-delay: 520ms, 520ms, 520ms;
  }

  .bga-ps-launcher:has(.bga-ps-launcher-open-tooltip:hover) .bga-ps-launcher-open-tooltip {
    transition-delay: 0ms;
  }

  .bga-ps-launcher:has(.bga-ps-launcher-open:focus-visible) .bga-ps-launcher-open-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 40ms, 40ms, 40ms;
  }

  .bga-ps-launcher:not(:has(.bga-ps-launcher-open:hover)):not(
      :has(.bga-ps-launcher-open:focus-visible)
    ):not(:has(.bga-ps-launcher-open-tooltip:hover))
    .bga-ps-launcher-open-tooltip {
    /* Short hide delay covers the logo → tooltip gap without keeping it stuck open. */
    transition-delay: 90ms, 90ms, 90ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-launcher-logo {
    opacity: 1;
    animation: none;
    transition: filter 180ms ease, opacity 180ms ease;
    transform: translateY(-1px);
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open:hover .bga-ps-launcher-logo,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open:focus-visible .bga-ps-launcher-logo {
    transform: translateY(-1px);
    filter: brightness(1.14);
  }

  .bga-ps-launcher-open-tooltip {
    transition: opacity 140ms ease, visibility 140ms ease;
    transform: translateX(-50%) translateY(-2px);
  }
}

.bga-ps-launcher-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  flex-shrink: 0;
  max-width: 0;
  padding: 0.2rem 0;
  margin-left: 0;
  border-left: none;
  opacity: 0;
  overflow: hidden;
  transform: translateX(4px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    max-width 180ms ease,
    padding 180ms ease;
}

/* Presentation expand is driven only by is-expanded — never by lifecycle or CSS :hover. */
.bga-ps-launcher.is-expanded .bga-ps-launcher-controls {
  max-width: 13.5rem;
  padding: 0.2rem 0.4rem 0.2rem 0.35rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.bga-ps-launcher-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  margin-right: 0.1rem;
  padding: 0 0.1rem;
  color: var(--white);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.bga-ps-launcher-time[hidden] {
  display: none !important;
}

.bga-ps-launcher-time.is-long {
  min-width: 3.5rem;
  font-size: 0.75rem;
}

.bga-ps-launcher-draft {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(245, 130, 32, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(245, 130, 32, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.bga-ps-launcher-draft[hidden] {
  display: none !important;
}

.bga-ps-launcher-draft:hover {
  background: rgba(245, 130, 32, 0.18);
  border-color: rgba(245, 130, 32, 0.55);
}

.bga-ps-launcher-draft:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.bga-ps-launcher-draft-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(245, 130, 32, 0.55);
}

/* Compact Draft chip while collapsed — no transport controls. */
.bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-controls {
  max-width: 6.5rem;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-time,
.bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-mini-btn {
  display: none !important;
}

.bga-ps-launcher--draft-pending.is-expanded .bga-ps-launcher-controls {
  max-width: 9.5rem;
}

.bga-ps-mini-btn {
  width: 31px;
  height: 31px;
  min-width: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--light-grey);
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 180ms ease,
    transform 150ms ease;
}

.bga-ps-mini-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
}

.bga-ps-mini-btn-svg {
  display: block;
  width: 0.8125rem;
  height: 0.8125rem;
}

.bga-ps-mini-btn:hover {
  border-color: var(--border-strong);
  color: var(--white);
}

.bga-ps-mini-btn:active {
  transform: scale(0.94);
}

.bga-ps-mini-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.bga-ps-mini-btn--toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  color: var(--orange);
  border: 1.5px solid rgba(245, 130, 32, 0.48);
  background: rgba(245, 130, 32, 0.1);
  box-shadow: 0 0 0 0 rgba(245, 130, 32, 0);
}

.bga-ps-mini-btn--toggle .bga-ps-mini-btn-icon,
.bga-ps-mini-btn--toggle .bga-ps-mini-btn-svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.bga-ps-mini-btn--toggle:hover {
  border-color: rgba(245, 130, 32, 0.72);
  color: var(--orange);
  background: rgba(245, 130, 32, 0.16);
  box-shadow: 0 0 14px rgba(245, 130, 32, 0.28);
}

.bga-ps-mini-btn--toggle.is-running {
  color: var(--black);
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 12px rgba(245, 130, 32, 0.35);
}

.bga-ps-mini-btn--toggle.is-running .bga-ps-mini-btn-svg {
  color: var(--black);
}

.bga-ps-mini-btn--toggle.is-running:hover {
  color: var(--black);
  background: var(--orange-light);
  border-color: var(--orange-light);
  box-shadow: 0 0 16px rgba(245, 130, 32, 0.4);
}

.bga-ps-mini-btn--stop {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(245, 130, 32, 0.35);
  background: rgba(245, 130, 32, 0.08);
}

.bga-ps-mini-btn--stop:hover:not(:disabled) {
  color: var(--white);
  border-color: rgba(245, 130, 32, 0.55);
  background: rgba(245, 130, 32, 0.16);
  box-shadow: 0 0 10px rgba(245, 130, 32, 0.18);
}

.bga-ps-mini-btn--stop:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.bga-ps-mini-btn--reset:hover:not(:disabled) {
  color: #ff8a8a;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
}

.bga-ps-mini-btn--reset:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-launcher-controls,
  .bga-ps-launcher-collapsed-time {
    transition: none;
  }

  .bga-ps-launcher-collapsed-time.is-visible,
  .bga-ps-launcher-collapsed-time.is-exiting {
    transform: none;
  }
}

/* Desktop launcher variant — original edge-tab expanding control
   (restored from pre-mobile redesign). Explicit host-layout owner only. */
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher {
  top: 50%;
  right: 0;
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
  width: max-content;
  max-width: none;
  align-items: stretch;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border-right: none;
  padding: 0.25rem 0.25rem 0.25rem 0.3rem;
  padding-right: 0.2rem;
  background: linear-gradient(165deg, #1a1a1a 0%, #121212 100%);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(245, 130, 32, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0 0 auto 0;
  height: 23%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 4.25rem;
  min-height: 0;
  width: auto;
  height: auto;
  padding: 0.2rem 0.85rem 0.2rem 0.45rem;
  border: none;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: transparent;
  box-shadow: none;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Mobile chrome must not appear on desktop.
   Do NOT hide .bga-ps-launcher-sheet-surface — current markup wraps
   .bga-ps-launcher-main inside it; hiding it collapses the launcher to a sliver. */
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-idle-label,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-divider,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-state-mark,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-backdrop,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-chrome,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-hero,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-status,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-subtitle,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open-studio,
html[data-bga-ps-host-layout="desktop"] .bga-ps-mini-btn-label,
html[data-bga-ps-host-layout="desktop"] .bga-ps-studio-logo-tip,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-hint {
  display: none !important;
}

/* Passthrough wrappers so desktop layout matches 488bb4e shell > main > open */
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-surface,
html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-logo-badge {
  display: contents;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-logo {
  display: block;
  height: 76px;
  width: auto;
  max-height: 76px;
  opacity: 1;
  animation: none;
  transform: translateY(-1px) scale(1);
}

/* Original desktop hover — logo cue only; does not move the shell */
@media (hover: hover) and (pointer: fine) {
  html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open:hover .bga-ps-launcher-logo,
  html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open:focus-visible .bga-ps-launcher-logo {
    filter: brightness(1.14);
    transform: translateY(-2px) scale(1.02);
  }

  html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher:has(.bga-ps-launcher-open:hover) .bga-ps-launcher-open-tooltip,
  html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher:has(.bga-ps-launcher-open-tooltip:hover) .bga-ps-launcher-open-tooltip,
  html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher:has(.bga-ps-launcher-open:focus-visible) .bga-ps-launcher-open-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-launcher.is-expanded .bga-ps-launcher-controls {
  max-width: 13.5rem;
  padding: 0.2rem 0.4rem 0.2rem 0.35rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-root.bga-ps-open .bga-ps-launcher {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}


/* Non-launcher touch targets — viewport based */
@media (max-width: 768px) {
.btn-filter,
  .stage-toggle-btn {
    min-height: var(--touch-min);
  }
.btn-icon-delete {
    width: var(--touch-min);
    height: var(--touch-min);
  }
}

/* Mobile launcher variant — compact circular FAB + timer bottom sheet.
   Explicit host-layout owner only; never selected by iframe width. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher {
    left: auto;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    align-items: flex-end;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open-tooltip {
    display: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-chrome {
    display: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-backdrop {
    display: none;
  }
/* Idle / running / paused: premium pill — shell stays a transparent layout wrapper. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--session-active .bga-ps-launcher-shell,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--timer-active .bga-ps-launcher-shell,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded).bga-ps-launcher--paused .bga-ps-launcher-shell {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: none !important;
    border-radius: 0;
    justify-content: center;
    overflow: visible;
    isolation: auto !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell::after,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-shell::before {
    content: none !important;
    display: none !important;
  }
/* Collapsed: only the FAB/open control may paint — no hero/controls siblings. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-chrome,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-hero,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-controls {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-surface {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    filter: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-main {
    justify-content: center;
    width: auto;
    height: auto;
    background: transparent !important;
    box-shadow: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 56px;
    min-height: 56px;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 999px;
    border: none;
    background: linear-gradient(155deg, var(--orange-light) 0%, var(--orange) 55%, var(--orange-dim) 100%);
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.32),
      0 2px 6px rgba(0, 0, 0, 0.24);
    transition:
      transform 160ms ease,
      box-shadow 180ms ease;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open:active {
    transform: scale(0.97);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-logo {
    height: 1.6rem;
    max-height: 1.6rem;
    width: auto;
    transform: none;
    filter: brightness(0) invert(1);
    opacity: 1;
  }
/* Icon-only FAB: no divider/label row in the closed state (accessible name lives on aria-label). */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-divider {
    display: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-idle-label {
    display: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-idle-label[hidden] {
    display: none !important;
  }
/* Elapsed-time badge: small pill overlapping the bottom edge of the circle — never widens the FAB itself. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-collapsed-time {
    position: absolute;
    left: 50%;
    bottom: -0.5rem;
    max-height: none;
    transform: translate(-50%, 3px);
    margin: 0;
    padding: 0.1rem 0.4rem;
    font-family: var(--font);
    font-size: 0.625rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -0.01em;
    min-width: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-pill);
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.14);
    z-index: 2;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-collapsed-time.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-collapsed-time.is-long {
    min-width: 0;
  }
/* Status badge (pause / draft check): small circular overlay on the top-right corner of the FAB. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-state-mark {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    border-radius: 50%;
    background: #161616;
    border: 1px solid rgba(245, 170, 90, 0.7);
    color: rgba(245, 180, 100, 0.9);
    z-index: 2;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-state-mark[hidden] {
    display: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-state-mark-svg {
    width: 0.55rem;
    height: 0.55rem;
  }
/* Running / paused / draft: thin ring around the circle — a restrained active indication, never a pulse. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--timer-active:not(.is-expanded) .bga-ps-launcher-open {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.32),
      0 2px 6px rgba(0, 0, 0, 0.24),
      0 0 0 3px rgba(245, 130, 32, 0.55);
    animation: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--timer-active:not(.is-expanded) .bga-ps-launcher-collapsed-time.is-visible {
    color: rgba(255, 255, 255, 0.96);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--paused:not(.is-expanded) .bga-ps-launcher-open {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.32),
      0 2px 6px rgba(0, 0, 0, 0.24),
      0 0 0 3px rgba(245, 170, 70, 0.6);
    animation: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--paused:not(.is-expanded) .bga-ps-launcher-collapsed-time.is-visible {
    color: rgba(255, 255, 255, 0.96);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-controls {
    max-width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-open {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.32),
      0 2px 6px rgba(0, 0, 0, 0.24),
      0 0 0 3px rgba(62, 207, 142, 0.65);
    animation: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-state-mark {
    border-color: rgba(62, 207, 142, 0.75);
    color: #3ecf8e;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher--draft-pending:not(.is-expanded) .bga-ps-launcher-open::after {
    content: none;
  }
/* ── Expanded bottom sheet ── */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded {
    inset: 0;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    width: 100%;
    max-width: none;
    transform: none;
    align-items: stretch;
    justify-content: flex-end;
    z-index: calc(var(--bga-ps-z-panel) + 5);
    pointer-events: auto;
    overflow: visible;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    cursor: pointer;
    pointer-events: auto;
    animation: bga-ps-sheet-backdrop-enter 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    isolation: auto;
    transition: none;
    animation: bga-ps-sheet-enter 0.38s cubic-bezier(0.32, 0.72, 0, 1) both;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-surface {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0.2rem 1.25rem calc(1.05rem + env(safe-area-inset-bottom, 0px));
    border-radius: 1.5rem 1.5rem 0 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-left: none;
    border-right: none;
    background: #1a1a1a;
    box-shadow:
      0 -12px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-shell::before,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-shell::after {
    content: none !important;
    display: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open {
    transition: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-chrome {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0.05rem 0 0;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-handle {
    display: block;
    width: 2.25rem;
    height: 0.22rem;
    margin: 0.15rem auto 0.45rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.22);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-toolbar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    min-height: 0;
    padding: 0.15rem 0 0.2rem;
    text-align: center;
  }
/* Timer sheet: logo is the only header control (opens full studio). */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0.1rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 160ms ease;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio:active {
    transform: scale(0.98);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio:hover {
    background: transparent;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open-studio-logo {
    display: block;
    width: 4.375rem;
    height: auto;
    max-width: 4.75rem;
    object-fit: contain;
    pointer-events: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
  }
/* Tip anchors above the centred sheet logo; shell overflow stays visible. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.45rem);
    z-index: 4;
    width: max-content;
    max-width: min(14rem, calc(100vw - 2rem));
    padding: 0.45rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(245, 130, 32, 0.45);
    background: #1c1c1c;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.94);
    opacity: 0;
    transform: translate(-50%, 4px);
    pointer-events: none;
    transition:
      opacity 200ms ease,
      transform 200ms ease;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip[hidden] {
    display: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip-text {
    margin: 0;
    font-family: var(--font);
    font-size: 0.84375rem;
    font-weight: 550;
    letter-spacing: -0.01em;
    line-height: 1.25;
    white-space: nowrap;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip-arrow {
    position: absolute;
    left: 50%;
    bottom: -0.28rem;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: -0.25rem;
    border-right: 1px solid rgba(245, 130, 32, 0.45);
    border-bottom: 1px solid rgba(245, 130, 32, 0.45);
    background: #1c1c1c;
    transform: rotate(45deg);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-title {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: rgba(255, 255, 255, 0.96);
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-sheet-subtitle {
    display: none;
    margin: 0;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.42);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 450;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-align: center;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-subtitle {
    display: block;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher:not(.is-expanded) .bga-ps-studio-logo-tip {
    display: none !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-main {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.05rem;
    width: 100%;
    padding: 0.7rem 0 0.05rem;
  }
/* Logo FAB control is not part of the sheet content hierarchy */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.15rem 0 0.1rem;
    text-align: center;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-time {
    display: block;
    min-width: 5.5ch;
    margin: 0;
    padding: 0;
    color: var(--white);
    font-family: var(--font);
    font-size: clamp(2.75rem, 11.5vw, 3.35rem);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -0.035em;
    line-height: 1;
    text-align: center;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-time.is-long {
    min-width: 7.5ch;
    font-size: clamp(2.25rem, 10vw, 2.9rem);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-time[hidden] {
    display: block !important;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.42);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 550;
    letter-spacing: 0.005em;
    line-height: 1.2;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded.bga-ps-launcher--timer-active .bga-ps-launcher-sheet-status,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded.bga-ps-launcher--paused .bga-ps-launcher-sheet-status {
    color: var(--orange);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded.bga-ps-launcher--timer-active .bga-ps-launcher-sheet-status::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.16);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded.bga-ps-launcher--paused .bga-ps-launcher-sheet-status::before {
    content: "";
    width: 0.55rem;
    height: 0.7rem;
    border-radius: 0;
    background:
      linear-gradient(var(--orange), var(--orange)) left / 0.18rem 100% no-repeat,
      linear-gradient(var(--orange), var(--orange)) right / 0.18rem 100% no-repeat;
    box-shadow: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded.bga-ps-launcher--draft-pending .bga-ps-launcher-sheet-status {
    color: #3ecf8e;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-controls {
    max-width: none;
    width: 100%;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    justify-content: stretch;
    gap: 0.75rem;
    padding: 0.35rem 0 0;
    margin: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-draft {
    grid-column: 1 / -1;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded:not(.bga-ps-launcher--session-active):not(.bga-ps-launcher--draft-pending)
    .bga-ps-mini-btn--toggle {
    grid-column: 1 / -1;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--reset {
    grid-column: 1 / -1;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 3.4rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.95rem;
    background: #222;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn:active {
    transform: scale(0.98);
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn-label {
    display: block;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: inherit;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn-icon .bga-ps-mini-btn-svg,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn-svg {
    width: 1.05rem;
    height: 1.05rem;
  }
/* Primary actions — Start / Resume / Finish (when running) */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn.is-primary,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--toggle.is-primary,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--stop.is-primary {
    border-color: transparent;
    background: var(--orange);
    color: #111;
    box-shadow: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn.is-secondary,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--toggle.is-secondary,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--stop.is-secondary {
    border-color: rgba(255, 255, 255, 0.16);
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    box-shadow: none;
  }
/* Reset Session — low-emphasis text action */
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--reset {
    min-height: 2.5rem;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.46);
    box-shadow: none;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--reset .bga-ps-mini-btn-label {
    font-size: 0.875rem;
    font-weight: 550;
    color: inherit;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn--reset .bga-ps-mini-btn-svg {
    width: 0.95rem;
    height: 0.95rem;
    opacity: 0.85;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-draft {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    min-height: 3.4rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(62, 207, 142, 0.35);
    border-radius: 0.95rem;
    background: rgba(62, 207, 142, 0.08);
    color: #3ecf8e;
  }
html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn[hidden],
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-draft[hidden] {
    display: none !important;
  }


@keyframes bga-ps-sheet-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bga-ps-sheet-backdrop-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-shell,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-backdrop {
    animation: none;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-studio-logo-tip {
    transition: none;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-shell,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio {
    transition: none;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher-open:active,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-mini-btn:active,
  html[data-bga-ps-host-layout="mobile"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open-studio:active {
    transform: none;
  }
}

/* Desktop-host embed: original expanding edge-tab launcher.
 * Iframe viewports are narrow (~204–320px); host-layout — not media width —
 * selects this variant. Launcher stays fully inside the measured frame.
 */
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher {
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: max-content !important;
  max-width: none !important;
  /* Fully contained — no overhang past the iframe right edge */
  margin: 0 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-backdrop,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-chrome,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open-studio,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-status,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-subtitle,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-mini-btn-label,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-idle-label,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-divider,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-state-mark,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-studio-logo-tip,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-hint {
  display: none !important;
}

/* sheet-surface wraps launcher-main in current markup — passthrough, never hide */
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-sheet-surface,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-logo-badge {
  display: contents !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher.is-expanded {
  inset: auto !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: max-content !important;
  max-width: none !important;
  transform: none !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  z-index: var(--bga-ps-z-launcher) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0.25rem 0.25rem 0.25rem 0.3rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-right: none !important;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
  flex-direction: row !important;
  overflow: hidden !important;
  isolation: isolate !important;
  background: linear-gradient(165deg, #1a1a1a 0%, #121212 100%) !important;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(245, 130, 32, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  filter: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell::before {
  content: none !important;
  display: none !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-shell::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 23% !important;
  border-radius: inherit !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 55%,
    transparent 100%
  ) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-open {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 4.25rem !important;
  min-height: 0 !important;
  padding: 0.2rem 0.85rem 0.2rem 0.45rem !important;
  border: none !important;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 0 !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-logo {
  display: block !important;
  height: 76px !important;
  max-height: 76px !important;
  width: auto !important;
  opacity: 1 !important;
  animation: none !important;
  transform: translateY(-1px) scale(1) !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher.is-expanded .bga-ps-launcher-controls {
  max-width: 13.5rem !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher.is-expanded .bga-ps-launcher-open {
  position: relative !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  clip: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher-open-tooltip {
  display: block !important;
}

html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher:not(.is-expanded) .bga-ps-launcher-sheet-hero,
html.bga-ps-iframe[data-bga-ps-host-layout="desktop"] .bga-ps-launcher.is-expanded .bga-ps-launcher-sheet-hero {
  display: none !important;
}

/* Touch / no-hover: still require explicit expand — do not force controls open.
   (Closed embed iframes are ~320px wide, so max-width:768px and hover:none
   previously left the launcher permanently expanded on staging.) */

.bga-ps-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--bga-ps-z-backdrop);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  transition:
    opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    -webkit-backdrop-filter 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.bga-ps-backdrop[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none !important;
}

/* Shared centred overlay modals (Welcome + Help + session recovery) */
.bga-ps-overlay-dialog {
  position: fixed;
  inset: 0;
  width: min(calc(100vw - 2rem), 420px);
  height: fit-content;
  max-height: min(88dvh, 640px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(245, 130, 32, 0.28);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(245, 130, 32, 0.12) 0%, rgba(245, 130, 32, 0.03) 48%, transparent 100%),
    var(--surface);
  color: var(--white);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  z-index: calc(var(--bga-ps-z-panel) + 20);
}

.bga-ps-overlay-dialog[open] {
  animation: bga-ps-overlay-enter 0.32s cubic-bezier(0.32, 0.72, 0, 1) both;
}

.bga-ps-overlay-dialog--session {
  width: min(calc(100vw - 2rem), 400px);
}

.session-lifecycle-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.25rem;
}

.session-lifecycle-title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.session-lifecycle-copy {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.session-lifecycle-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.15rem 0 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.session-lifecycle-meta-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.session-lifecycle-meta-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--white);
}

.session-lifecycle-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.session-lifecycle-actions .btn,
.session-start-blocked-actions .btn {
  width: 100%;
}

.session-start-blocked-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bga-ps-overlay-dialog.bga-ps-overlay-dialog--about {
  width: min(calc(100vw - 1.5rem), 920px);
  max-height: min(92dvh, 900px);
  border: 1px solid rgba(245, 130, 32, 0.28);
  background:
    radial-gradient(ellipse 70% 45% at 12% -5%, rgba(245, 130, 32, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(245, 130, 32, 0.08), transparent 50%),
    linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 130, 32, 0.08),
    0 0 48px rgba(245, 130, 32, 0.12);
}

.bga-ps-overlay-dialog--about .bga-ps-overlay-inner {
  position: relative;
  max-height: min(92dvh, 900px);
  gap: 0;
  padding: 0;
  box-shadow: none;
}

.about-intro {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.about-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(245, 130, 32, 0.45);
  background: rgba(18, 18, 18, 0.85);
  color: var(--orange);
  box-shadow:
    0 0 0 1px rgba(245, 130, 32, 0.08),
    0 0 18px rgba(245, 130, 32, 0.18);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease,
    color 0.18s ease;
}

.about-close:hover {
  background: rgba(245, 130, 32, 0.14);
  border-color: rgba(245, 130, 32, 0.75);
  box-shadow:
    0 0 0 1px rgba(245, 130, 32, 0.16),
    0 0 24px rgba(245, 130, 32, 0.32);
  color: #ff9a3d;
}

.about-close:active {
  transform: scale(0.94);
}

.about-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--orange-soft),
    0 0 20px rgba(245, 130, 32, 0.28);
}

.about-close-icon,
.about-close-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.about-intro-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 1.85rem 2.35rem 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.about-hero,
.about-included,
.about-quote,
.about-principles {
  width: 86%;
  max-width: 46.5rem;
  margin-inline: auto;
}

.about-intro-body::-webkit-scrollbar {
  width: 5px;
}

.about-intro-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 0.75rem 0;
}

.about-intro-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.about-intro-body:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}

.about-intro-body::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

.about-reveal {
  opacity: 0;
  transform: translateY(14px);
}

.bga-ps-overlay-dialog--about[open] .about-reveal {
  animation: about-reveal-in 0.45s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.bga-ps-overlay-dialog--about[open] .about-hero.about-reveal { animation-delay: 0.05s; }
.bga-ps-overlay-dialog--about[open] .about-section-label.about-reveal { animation-delay: 0.12s; }
.bga-ps-overlay-dialog--about[open] .about-quote.about-reveal { animation-delay: 0.42s; }
.bga-ps-overlay-dialog--about[open] .about-principles.about-reveal { animation-delay: 0.5s; }
.bga-ps-overlay-dialog--about[open] .about-cloud-sync.about-reveal { animation-delay: 0.56s; }

.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: about-reveal-in 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(1) { animation-delay: 0.16s; }
.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(2) { animation-delay: 0.2s; }
.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(3) { animation-delay: 0.24s; }
.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(4) { animation-delay: 0.28s; }
.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(5) { animation-delay: 0.32s; }
.bga-ps-overlay-dialog--about[open] .about-feature-card--reveal:nth-child(6) { animation-delay: 0.36s; }

@keyframes about-reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 0.35rem 0;
}

.about-hero-logo {
  display: block;
  height: 92px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(245, 130, 32, 0.22));
}

.about-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.about-hero-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.about-hero-brand {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--white);
}

.about-hero-title {
  margin: 0.1rem 0 0;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.68);
}

.about-hero-motto {
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(245, 130, 32, 0.92);
}

.about-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.about-feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.about-feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
  padding: 1.05rem 1.05rem 1.1rem;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(155deg, rgba(245, 130, 32, 0.1) 0%, rgba(245, 130, 32, 0.02) 42%, transparent 100%),
    rgba(32, 32, 32, 0.78);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  transition:
    transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    border-color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .about-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 130, 32, 0.28);
    box-shadow:
      0 14px 32px rgba(0, 0, 0, 0.28),
      0 0 24px rgba(245, 130, 32, 0.1);
  }
}

.about-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.2rem;
  border-radius: 0.7rem;
  color: var(--orange);
  background: rgba(245, 130, 32, 0.12);
  border: 1px solid rgba(245, 130, 32, 0.16);
}

.about-feature-icon svg,
.about-principle-check svg,
.about-inline-icon {
  display: block;
}

.about-feature-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.about-feature-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.about-feature-copy {
  margin: 0;
  font-size: 0.78125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.about-quote {
  position: relative;
  margin-top: 0.25rem;
  padding: 1.5rem 1.6rem 1.45rem;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(245, 130, 32, 0.14);
  background:
    linear-gradient(160deg, rgba(245, 130, 32, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%),
    rgba(28, 28, 28, 0.9);
  box-shadow:
    inset 2px 0 0 rgba(245, 130, 32, 0.5),
    0 10px 28px rgba(0, 0, 0, 0.16);
  text-align: left;
}

.about-quote-mark {
  display: block;
  margin: -0.35rem 0 0.15rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 0.8;
  color: rgba(245, 130, 32, 0.55);
}

.about-quote-text {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.92);
}

.about-quote-by {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-style: normal;
  color: var(--orange);
}

.about-principles .about-section-label {
  text-align: center;
}

.about-principle-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.about-principle-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.about-principle-list li:last-child {
  border-right: none;
}

.about-principle-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: #5cb85c;
}

.about-principle-check svg {
  width: 1.15rem;
  height: 1.15rem;
}

.about-cloud-sync {
  margin-top: 0.5rem;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(32, 32, 32, 0.72);
}

.about-cloud-sync-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.about-cloud-sync-head .about-section-label {
  margin: 0;
  text-align: left;
}

.about-cloud-sync-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  color: var(--orange);
  background: rgba(245, 130, 32, 0.12);
  border: 1px solid rgba(245, 130, 32, 0.16);
}

.about-cloud-sync-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.about-cloud-sync-rows {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

.about-cloud-sync-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.about-cloud-sync-row dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
}

.about-cloud-sync-row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  overflow-wrap: anywhere;
}

.about-cloud-sync-message {
  margin: 0.85rem 0 0;
  font-size: 0.78125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.about-cloud-sync-secondary,
.about-cloud-sync-troubleshooting {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.about-cloud-sync-secondary[hidden],
.about-cloud-sync-troubleshooting[hidden] {
  display: none !important;
}

.about-cloud-sync-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.about-cloud-sync-actions[hidden] {
  display: none !important;
}

.about-cloud-sync-now {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 0.55rem;
  cursor: pointer;
}

.about-cloud-sync-now:hover:not(:disabled) {
  border-color: rgba(245, 130, 32, 0.35);
  background: rgba(245, 130, 32, 0.1);
}

.about-cloud-sync-now:disabled {
  opacity: 0.45;
  cursor: default;
}

.about-cloud-sync-hint {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 640px) {
  .about-cloud-sync-rows {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-cloud-sync-now {
    transition: none;
  }
}

.about-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  /* No margin-top: the divider is border-top on this footer. Any margin here
     would paint as an empty band ABOVE the divider (between the scroll region
     and the footer). Separation below the rule comes from padding-top instead. */
  margin-top: 0;
  padding: 1.45rem 2.35rem 1.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.about-footer-logo {
  display: block;
  height: 28px;
  width: auto;
  margin-bottom: 0.35rem;
  opacity: 0.72;
  object-fit: contain;
}

.about-footer-brand {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.78);
}

.about-footer-meta {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
}

.about-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  min-height: 2.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 130, 32, 0.28);
  background: rgba(245, 130, 32, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.about-feedback-btn:hover {
  background: rgba(245, 130, 32, 0.14);
  border-color: rgba(245, 130, 32, 0.45);
  color: var(--white);
}

.about-feedback-icon,
.about-feedback-icon svg {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--orange);
}

@media (max-width: 860px) {
  .bga-ps-overlay-dialog.bga-ps-overlay-dialog--about {
    width: min(calc(100vw - 1.25rem), 720px);
  }

  .about-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-principle-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0;
  }

  .about-principle-list li {
    border-right: none;
    padding: 0.5rem 0.75rem;
  }

  .about-principle-list li:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Mobile-only: premium breathing room for the Info popup.
   Footer stays pinned outside the scroll region; do NOT invent a large
   margin-top above its border-top (that painted the empty dark band).
   Scroll clearance for the last card lives as modest padding-bottom on
   .about-intro-body instead. */
@media (max-width: 768px) {
  .bga-ps-overlay-dialog--about .about-intro-body {
    flex: 1 1 auto;
    min-height: 0;
    gap: 2.15rem;
    /* Bottom padding only — enough for the final card to scroll fully clear
       of the static footer edge; not a visible empty block outside the scroller. */
    padding: 2.25rem 2rem var(--space-md);
  }

  .bga-ps-overlay-dialog--about .about-close {
    top: 1rem;
    right: 1rem;
  }

  .bga-ps-overlay-dialog--about .about-hero {
    gap: 1.15rem;
  }

  .bga-ps-overlay-dialog--about .about-hero-copy {
    gap: 0.5rem;
  }

  .bga-ps-overlay-dialog--about .about-hero-title {
    margin-top: 0.2rem;
  }

  .bga-ps-overlay-dialog--about .about-hero-motto {
    margin-top: 0.7rem;
  }

  .bga-ps-overlay-dialog--about .about-section-label {
    margin-bottom: 1.2rem;
  }

  .bga-ps-overlay-dialog--about .about-feature-card {
    gap: 0.7rem;
    padding: 1.4rem 1.35rem 1.45rem;
  }

  .bga-ps-overlay-dialog--about .about-feature-icon {
    margin-bottom: 0.4rem;
  }

  .bga-ps-overlay-dialog--about .about-footer {
    margin-top: 0;
    padding: 1.85rem 2rem 2rem;
  }
}

@media (max-width: 640px) {
  .bga-ps-overlay-dialog.bga-ps-overlay-dialog--about {
    width: min(calc(100vw - 1rem), 520px);
    max-height: min(94dvh, 900px);
  }

  .bga-ps-overlay-dialog--about .bga-ps-overlay-inner {
    max-height: min(94dvh, 900px);
  }

  .about-hero,
  .about-included,
  .about-quote,
  .about-principles {
    width: 100%;
    max-width: none;
  }

  .about-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    padding-right: 2.5rem;
  }

  .about-hero-logo {
    height: 72px;
  }

  .about-hero-brand {
    font-size: 1.625rem;
  }

  .about-feature-grid {
    grid-template-columns: 1fr;
  }

  .about-quote {
    padding: 1.25rem 1.2rem 1.3rem;
  }

  .about-quote-text {
    font-size: 0.975rem;
  }

  .about-principle-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-principle-list li,
  .about-principle-list li:nth-child(odd) {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    border-right: none;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-overlay-dialog--about[open] .about-reveal,
  .bga-ps-overlay-dialog--about[open] .about-feature-card--reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .about-feature-card,
  .about-feature-card:hover,
  .about-close,
  .about-close:active {
    transition: none;
    transform: none;
  }
}

/* First-launch welcome card */
.bga-ps-overlay-dialog.bga-ps-overlay-dialog--welcome {
  width: min(calc(100vw - 1.5rem), 440px);
  max-height: min(90dvh, 640px);
  border: 1px solid rgba(245, 130, 32, 0.3);
  background:
    radial-gradient(ellipse 80% 55% at 8% -8%, rgba(245, 130, 32, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(245, 130, 32, 0.06), transparent 50%),
    linear-gradient(165deg, #1c1c1c 0%, #131313 100%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 130, 32, 0.08),
    0 0 42px rgba(245, 130, 32, 0.14);
}

.bga-ps-overlay-dialog--welcome .bga-ps-overlay-inner.welcome-intro {
  position: relative;
  gap: 1.35rem;
  max-height: min(90dvh, 640px);
  padding: 1.65rem 1.55rem 1.45rem;
  overflow: hidden;
  box-shadow: none;
}

.welcome-close {
  top: 0.85rem;
  right: 0.85rem;
}

.welcome-deco {
  position: absolute;
  right: -0.35rem;
  top: 3.25rem;
  width: 9.5rem;
  height: 9.5rem;
  pointer-events: none;
  opacity: 0.07;
  color: var(--orange);
  transform: rotate(-12deg);
}

.welcome-deco-icon,
.welcome-deco-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.welcome-reveal {
  opacity: 0;
  transform: translateY(12px);
}

.bga-ps-overlay-dialog--welcome[open] .welcome-reveal {
  animation: about-reveal-in 0.42s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.bga-ps-overlay-dialog--welcome[open] .welcome-hero.welcome-reveal {
  animation-delay: 0.06s;
}

.bga-ps-overlay-dialog--welcome[open] .welcome-point.welcome-reveal:nth-child(1) {
  animation-delay: 0.16s;
}

.bga-ps-overlay-dialog--welcome[open] .welcome-point.welcome-reveal:nth-child(2) {
  animation-delay: 0.24s;
}

.bga-ps-overlay-dialog--welcome[open] .welcome-point.welcome-reveal:nth-child(3) {
  animation-delay: 0.32s;
}

.bga-ps-overlay-dialog--welcome[open] .welcome-cta.welcome-reveal {
  animation-delay: 0.42s;
}

.welcome-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-right: 2.25rem;
}

.welcome-hero-logo {
  display: block;
  height: 64px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(245, 130, 32, 0.22));
}

.welcome-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.welcome-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.welcome-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--white);
}

.welcome-copy {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

.welcome-points {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0.15rem 0;
  display: flex;
  flex-direction: column;
}

.welcome-point {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.welcome-point:last-child {
  border-bottom: none;
  padding-bottom: 0.35rem;
}

.welcome-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  color: var(--orange);
  background: rgba(245, 130, 32, 0.12);
  border: 1px solid rgba(245, 130, 32, 0.18);
  box-shadow: 0 0 16px rgba(245, 130, 32, 0.08);
}

.welcome-point-icon svg,
.welcome-inline-icon,
.welcome-cta-icon svg {
  display: block;
}

.welcome-point-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.welcome-point-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.welcome-point-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--white);
}

.welcome-point-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.welcome-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 100%);
  color: #111;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(245, 130, 32, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.welcome-cta:hover {
  filter: brightness(1.05);
  box-shadow:
    0 14px 34px rgba(245, 130, 32, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.welcome-cta:active {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    0 6px 16px rgba(245, 130, 32, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.welcome-cta:focus {
  outline: none;
}

.welcome-cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(17, 17, 17, 0.9),
    0 0 0 6px rgba(245, 130, 32, 0.55),
    0 12px 30px rgba(245, 130, 32, 0.35);
}

.welcome-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.welcome-cta-icon svg {
  width: 1rem;
  height: 1rem;
}

.welcome-cta-label {
  line-height: 1;
}

@media (max-width: 480px) {
  .bga-ps-overlay-dialog.bga-ps-overlay-dialog--welcome {
    width: min(calc(100vw - 1rem), 420px);
  }

  .bga-ps-overlay-dialog--welcome .bga-ps-overlay-inner.welcome-intro {
    padding: 1.35rem 1.2rem 1.25rem;
    gap: 1.15rem;
  }

  .welcome-hero {
    flex-direction: column;
    gap: 0.75rem;
  }

  .welcome-hero-logo {
    height: 56px;
  }

  .welcome-title {
    font-size: 1.35rem;
  }

  .welcome-deco {
    width: 7.5rem;
    height: 7.5rem;
    top: 4.5rem;
    opacity: 0.05;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-overlay-dialog--welcome[open] .welcome-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .welcome-cta,
  .welcome-cta:hover,
  .welcome-cta:active {
    transition: none;
    transform: none;
  }
}

.bga-ps-overlay-dialog::backdrop {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bga-ps-overlay-backdrop-enter 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes bga-ps-overlay-enter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bga-ps-overlay-backdrop-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bga-ps-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: min(88dvh, 640px);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  overflow: hidden;
  box-shadow: inset 3px 0 0 var(--orange);
}

.bga-ps-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.bga-ps-overlay-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bga-ps-overlay-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--orange);
  flex-shrink: 0;
}

.bga-ps-overlay-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.bga-ps-overlay-close {
  flex-shrink: 0;
  margin-top: -0.15rem;
}

.bga-ps-overlay-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--white);
  flex-shrink: 0;
}

.bga-ps-overlay-copy {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--light-grey);
}

.bga-ps-overlay-points {
  margin: 0.2rem 0 0.35rem;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.74);
}

.bga-ps-overlay-points li::marker {
  color: var(--orange);
}

.bga-ps-overlay-inner > .btn {
  align-self: stretch;
  margin-top: 0.35rem;
}

.bga-ps-overlay-body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  flex: 1;
  min-height: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--light-grey);
}

.bga-ps-overlay-footer {
  flex-shrink: 0;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .bga-ps-overlay-dialog {
    width: min(calc(100vw - 1rem), 520px);
    max-height: min(94dvh, 820px);
  }

  .bga-ps-overlay-inner {
    padding: var(--space-md);
    max-height: min(94dvh, 820px);
  }

  .bga-ps-overlay-dialog--about .bga-ps-overlay-inner {
    padding: 0;
  }

  .bga-ps-overlay-title {
    font-size: 1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-overlay-dialog[open],
  .bga-ps-overlay-dialog::backdrop {
    animation: none;
  }
}

.bga-ps-root.bga-ps-overlay-open .bga-ps-launcher,
.bga-ps-root.bga-ps-overlay-open .bga-ps-panel {
  pointer-events: none;
}

.bga-ps-root.bga-ps-open .bga-ps-backdrop {
  opacity: 1;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  visibility: visible;
}

.bga-ps-panel {
  position: fixed;
  z-index: var(--bga-ps-z-panel);
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.46s,
    width 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    height 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    max-height 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    top 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    bottom 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    left 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    right 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    border-radius 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.46s cubic-bezier(0.4, 0, 0.2, 1);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -30%, rgba(245, 130, 32, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(255, 255, 255, 0.015), transparent);
  --bga-ps-practice-flow-top: calc(
    env(safe-area-inset-top, 0px) + var(--space-sm) + var(--space-md) + 4.5rem + var(--space-md) + var(--touch-min) + 6px + var(--space-sm)
  );
}

/* Closed panel must never intercept launcher clicks (children default to pointer-events: auto). */
.bga-ps-root:not(.bga-ps-open) .bga-ps-panel,
.bga-ps-root:not(.bga-ps-open) .bga-ps-panel *,
.bga-ps-root:not(.bga-ps-open) .bga-ps-backdrop {
  pointer-events: none !important;
}

.bga-ps-panel-inner {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Studio panel chrome — above sticky app-header (z-index 100) during scroll. */
.bga-ps-panel-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  height: 0;
  pointer-events: none;
}

.bga-ps-panel-chrome > [data-ps-info],
.bga-ps-panel-chrome > [data-ps-close],
.bga-ps-panel-chrome > .btn-help,
.bga-ps-panel-chrome > .bga-ps-close {
  pointer-events: auto;
}

.bga-ps-close {
  position: absolute;
  top: calc(var(--space-sm) + env(safe-area-inset-top, 0px));
  right: var(--space-sm);
  z-index: 10;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(24, 24, 24, 0.72);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition),
    opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1) 0.18s,
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) 0.18s;
}

.bga-ps-root.bga-ps-open .bga-ps-close {
  opacity: 1;
  transform: none;
}

.bga-ps-close:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-raised);
}

.bga-ps-close:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Desktop: expand from launcher edge into full side panel */
@media (min-width: 769px) {
  .bga-ps-panel {
    top: 50%;
    right: 0;
    width: 168px;
    max-width: 480px;
    height: 88px;
    max-height: 100dvh;
    transform: translateY(-50%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.28),
      0 0 18px rgba(245, 130, 32, 0.07);
  }

  .bga-ps-root.bga-ps-open .bga-ps-panel {
    top: 0;
    width: var(--bga-ps-panel-width);
    height: 100dvh;
    transform: translateY(0);
    border-radius: 0;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.45);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .bga-ps-root.bga-ps-open .bga-ps-launcher {
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.16s ease,
      visibility 0s linear 0.16s;
    visibility: hidden;
  }
}

/* Mobile: expand upward from bottom launcher */
@media (max-width: 768px) {
  html[data-bga-ps-host-layout="mobile"] .bga-ps-panel {
    left: 50%;
    right: auto;
    bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 1.5rem), 380px);
    height: 88px;
    max-height: 100dvh;
    transform: translateX(-50%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.28),
      0 0 18px rgba(245, 130, 32, 0.07);
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-root.bga-ps-open .bga-ps-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--bga-ps-panel-height);
    transform: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  html[data-bga-ps-host-layout="mobile"] .bga-ps-root.bga-ps-open .bga-ps-launcher {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

/* Small mobile: nearly full screen */
@media (max-width: 480px) {
  .bga-ps-root.bga-ps-open .bga-ps-panel {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

.bga-ps-root.bga-ps-open .bga-ps-panel {
  pointer-events: auto;
}

/* Staggered content reveal after panel expands */
.bga-ps-reveal {
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 280ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bga-ps-root.bga-ps-open .bga-ps-reveal--brand {
  opacity: 1;
  transform: none;
  transition-delay: 0.06s;
}

.bga-ps-root.bga-ps-open .bga-ps-reveal--nav {
  opacity: 1;
  transform: none;
  transition-delay: 0.14s;
}

.bga-ps-root.bga-ps-open .bga-ps-reveal--content {
  opacity: 1;
  transform: none;
  transition-delay: 0.28s;
}

.bga-ps-panel .app-header {
  position: sticky;
  top: 0;
  padding-top: calc(var(--space-xs) + env(safe-area-inset-top, 0px));
}

.bga-ps-panel .header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--header-logo-nav-gap);
  padding-inline: calc(var(--space-md) + 1.25rem);
  padding-top: var(--header-logo-top-offset);
  padding-bottom: var(--header-nav-content-gap);
}

.bga-ps-panel .header-brand {
  width: 100%;
  padding-right: 2.5rem;
  padding-left: 2.5rem;
  margin-bottom: 0;
}

.bga-ps-panel .header-top {
  margin-bottom: 0;
}

.bga-ps-panel .brand-logo {
  width: min(100%, var(--brand-logo-width, 152px));
  height: auto;
}

.bga-ps-panel .app {
  flex: 1;
}

body.bga-ps-panel-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  body.bga-ps-panel-open {
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bga-ps-backdrop,
  .bga-ps-panel,
  .bga-ps-close,
  .btn-help,
  .bga-ps-reveal {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .bga-ps-reveal {
    opacity: 1;
    transform: none;
  }

  .bga-ps-root.bga-ps-open .btn-help,
  .bga-ps-root.bga-ps-open .bga-ps-close {
    opacity: 1;
    transform: none;
  }

  .brand-logo,
  .bga-ps-root.bga-ps-open .brand-logo {
    animation: none !important;
  }

  .header-brand-heading::before {
    filter: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout ── */
.bga-ps-panel-inner .app {
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
}

.app {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
}

.main-content {
  flex: 1;
}

/* ── Header ── */
.app-header {
  background: rgba(17, 17, 17, 0.94);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--header-logo-nav-gap);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--header-logo-top-offset) var(--space-md) var(--header-nav-content-gap);
}

.header-top {
  position: relative;
  margin-bottom: 0;
  width: 100%;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 0;
}

.header-brand-heading {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 0;
}

.header-brand-heading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(17.5rem, 100%);
  height: 5.5rem;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 52% 50% at 50% 50%,
    rgba(245, 130, 32, 0.075) 0%,
    rgba(245, 130, 32, 0.045) 38%,
    rgba(245, 130, 32, 0.015) 58%,
    transparent 74%
  );
  filter: blur(26px);
}

@keyframes brand-logo-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, var(--brand-logo-width));
  height: auto;
  aspect-ratio: 1536 / 1024;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
}

.bga-ps-root.bga-ps-open .brand-logo {
  animation: brand-logo-in 280ms cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.btn-help,
.bga-ps-panel-info {
  position: absolute;
  top: calc(var(--space-sm) + env(safe-area-inset-top, 0px));
  left: var(--space-sm);
  right: auto;
  z-index: 10;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(245, 130, 32, 0.42);
  border-radius: 50%;
  background: transparent;
  color: var(--orange);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1) 0.18s,
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) 0.18s;
}

.bga-ps-root.bga-ps-open .btn-help,
.bga-ps-root.bga-ps-open .bga-ps-panel-info {
  opacity: 1;
  transform: none;
}

.btn-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
}

.btn-help-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn-help:hover {
  background: rgba(245, 130, 32, 0.08);
  border-color: rgba(245, 130, 32, 0.55);
  color: var(--orange);
}

.btn-help:active {
  transform: scale(0.96);
}

.btn-help:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Studio chrome layout — driven by data-ps-studio-chrome + host layout (not viewport width).
   Mobile studio header balance: the info button sits top-LEFT (~16px inset) and the Cloud
   Sync status pill — appended into .header-top by data/practice-sync-service.js — sits
   top-RIGHT (~16px inset, see .practice-cloud-sync-status mobile override below). Both are
   position:absolute (out of the header's normal flow), so neither can push or shift the
   centred logo as the sync label's text length changes. .header-brand keeps a fixed,
   SYMMETRIC left/right clearance (2.5rem each) sized for the 44px info button's footprint,
   so the logo's own margin-inline:auto centering is never state- or text-length-dependent. */
html[data-bga-ps-host-layout="mobile"] .bga-ps-panel[data-ps-studio-chrome="info-only"] [data-ps-info] {
  left: 16px;
  right: auto;
}

html[data-bga-ps-host-layout="mobile"] .bga-ps-panel[data-ps-studio-chrome="info-only"] .header-brand {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-panel[data-ps-studio-chrome="info-close"] [data-ps-info],
html:not([data-bga-ps-host-layout="mobile"]) .bga-ps-panel[data-ps-studio-chrome="info-close"] [data-ps-info] {
  left: var(--space-sm);
  right: auto;
}

html[data-bga-ps-host-layout="desktop"] .bga-ps-panel[data-ps-studio-chrome="info-close"] .header-brand,
html:not([data-bga-ps-host-layout="mobile"]) .bga-ps-panel[data-ps-studio-chrome="info-close"] .header-brand {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.practice-cloud-sync-status {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  z-index: 2;
  max-width: 9.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 18, 18, 0.55);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.9;
}

.practice-cloud-sync-status[data-state="synced"] {
  color: rgba(120, 190, 140, 0.95);
}

.practice-cloud-sync-status[data-state="offline"],
.practice-cloud-sync-status[data-state="waiting"],
.practice-cloud-sync-status[data-state="pull_error"] {
  color: rgba(255, 255, 255, 0.55);
}

.practice-cloud-sync-status[data-state="syncing"],
.practice-cloud-sync-status[data-state="uploading"],
.practice-cloud-sync-status[data-state="checking"],
.practice-cloud-sync-status[data-state="downloading"] {
  color: rgba(245, 180, 100, 0.95);
}

.practice-cloud-sync-status[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .practice-cloud-sync-status {
    right: 0.35rem;
    max-width: 7.5rem;
    font-size: 0.5625rem;
  }
}

/* Mobile studio header balance: ~16px right inset to mirror the info button's ~16px
   left inset (above), with enough max-width for the longest live status text
   ("Sync failed — retrying") to render without truncation. The header is at least
   320px wide and the info button's footprint is only ~60px (16px inset + 44px), so a
   ~176px pill anchored 16px from the right edge never approaches the info button —
   this selector's host-layout attribute gives it higher specificity than both rules
   above, so it wins regardless of viewport width. */
html[data-bga-ps-host-layout="mobile"] .practice-cloud-sync-status {
  right: 16px;
  max-width: 11rem;
}

/*
 * Mobile running-session pill must clear the Info button.
 * Info (panel chrome): left 16px, width var(--touch-min) 44px.
 * Session pill lives in .header-top inside .header-inner, whose horizontal
 * padding is (var(--space-md) + 1.25rem). Offset within .header-top =
 * infoInset + infoSize + gap − headerInlinePadding so the pill starts one
 * --space-sm to the right of the Info button at every supported width.
 */
html[data-bga-ps-host-layout="mobile"] .practice-session-indicator {
  --ps-session-indicator-info-inset: 16px;
  --ps-session-indicator-info-size: var(--touch-min);
  --ps-session-indicator-gap: var(--space-sm);
  --ps-session-indicator-header-inline: calc(var(--space-md) + 1.25rem);
  left: calc(
    var(--ps-session-indicator-info-inset) + var(--ps-session-indicator-info-size) +
      var(--ps-session-indicator-gap) - var(--ps-session-indicator-header-inline)
  );
  /* Keep clear of the top-right Cloud Sync pill. */
  max-width: min(calc(100% - 7.5rem), 9.5rem);
}

/*
 * Desktop: clear the Info button with one --space-sm gap.
 * Info chrome inset is var(--space-sm); pill is inside .header-top, so subtract
 * the same header-inner inline padding used on mobile. Vertical position (top: 0)
 * and mobile left calc are unchanged.
 */
html[data-bga-ps-host-layout="desktop"] .practice-session-indicator,
html:not([data-bga-ps-host-layout="mobile"]) .practice-session-indicator {
  --ps-session-indicator-info-inset: var(--space-sm);
  --ps-session-indicator-info-size: var(--touch-min);
  --ps-session-indicator-gap: var(--space-sm);
  --ps-session-indicator-header-inline: calc(var(--space-md) + 1.25rem);
  left: calc(
    var(--ps-session-indicator-info-inset) + var(--ps-session-indicator-info-size) +
      var(--ps-session-indicator-gap) - var(--ps-session-indicator-header-inline)
  );
}

.practice-session-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: min(calc(100% - 5rem), 11.5rem);
  min-height: 1.75rem;
  padding: 0.3125rem 0.6875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(24, 24, 24, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 280ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

/* Expand the tap/click target to ~44px without enlarging the visible pill. */
.practice-session-indicator::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, var(--touch-min));
  height: max(100%, var(--touch-min));
  transform: translate(-50%, -50%);
}

.practice-session-indicator[hidden] {
  display: none;
}

.practice-session-indicator.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.practice-session-indicator.is-exiting {
  opacity: 0;
  transform: translateY(-4px);
}

.practice-session-indicator.is-paused {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(32, 32, 32, 0.82);
  color: rgba(255, 255, 255, 0.72);
}

.practice-session-indicator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  line-height: 0;
}

.practice-session-indicator-dot {
  display: block;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #5cb85c;
  box-shadow: 0 0 6px rgba(92, 184, 92, 0.55);
}

.practice-session-indicator-glyph.transport-btn-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
}

.practice-session-indicator.is-paused .practice-session-indicator-glyph {
  color: rgba(255, 255, 255, 0.62);
}

.practice-session-indicator-copy {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.practice-session-indicator-text {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.practice-session-indicator-text--compact {
  display: none;
}

.practice-session-indicator-hint {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(24, 24, 24, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--light-grey);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .practice-session-indicator:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 130, 32, 0.28);
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.24),
      0 0 16px rgba(245, 130, 32, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .practice-session-indicator.is-visible:hover {
    transform: translateY(-1px);
  }

  .practice-session-indicator:hover .practice-session-indicator-hint,
  .practice-session-indicator:focus-visible .practice-session-indicator-hint {
    opacity: 1;
    transform: translateY(0);
  }
}

.practice-session-indicator:active {
  transform: scale(0.98);
}

.practice-session-indicator:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

body.has-practice-session-indicator .header-brand {
  padding-top: 1.875rem;
}

@media (min-width: 640px) {
  body.has-practice-session-indicator .header-brand {
    padding-top: 0;
  }

  .practice-session-indicator {
    max-width: 13rem;
  }
}

@media (max-width: 520px) {
  .practice-session-indicator-text--full {
    display: none;
  }

  .practice-session-indicator-text--compact {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .practice-session-indicator,
  .practice-session-indicator-hint {
    transition: none !important;
  }

  .practice-session-indicator.is-visible,
  .practice-session-indicator.is-exiting {
    opacity: 1;
    transform: none;
  }
}

/* ── Navigation ── */
.header-nav {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  align-self: center;
  flex-shrink: 0;
}

@media (max-height: 720px) {
  :root {
    --brand-logo-width: 136px;
    --header-logo-top-offset: 0.625rem;
    --header-nav-content-gap: var(--space-sm);
  }

  .bga-ps-panel .app-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--touch-min);
  padding: 0 var(--space-sm);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--light-grey);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--white);
}

.tab.active {
  color: var(--black);
  background: var(--orange);
  box-shadow: var(--shadow-orange);
}

.tab:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── Panels ── */
.panel {
  display: none;
  animation: fadeIn 0.15s ease;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.placeholder-panel {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  min-height: min(52vh, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.placeholder-panel::before {
  content: "Soon";
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-soft);
  border: 1px solid rgba(245, 130, 32, 0.22);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.875rem;
  margin-bottom: var(--space-xs);
}

.placeholder-panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.placeholder-panel p {
  color: var(--light-grey);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 22rem;
}

/* ── Shared card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .card.dashboard-mission:hover,
  .card.dashboard-achievement:hover,
  .card.dashboard-weekly-goal:hover,
  .card.dashboard-stat:hover,
  .card.dashboard-tip:hover,
  .card.insights-achievements:hover,
  .card.insights-focus:hover,
  .card.insights-goals:hover,
  .card.insights-pattern:hover,
  .card.insights-lifetime:hover,
  .my-song-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      var(--shadow-sm),
      0 8px 22px rgba(0, 0, 0, 0.2);
  }
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--light-grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-label--hero {
  text-align: center;
  margin-bottom: var(--space-xs);
}

/* ── Metronome layout ── */
.metronome {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.metronome-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(245, 130, 32, 0.06), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metronome-core {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  width: 100%;
}

.metronome-slider {
  width: 100%;
}

.metronome-transport {
  width: 100%;
}

.metronome-adjust {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.metronome-adjust .setting-card {
  min-height: auto;
}

.metronome-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Hero BPM */
.metronome-hero {
  text-align: center;
  width: 100%;
  padding: 0;
}

.metronome-hero .section-label {
  margin-bottom: var(--space-xs);
}

.bpm-display {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1;
  position: relative;
  isolation: isolate;
}

.bpm-display::before {
  content: "";
  position: absolute;
  inset: -0.35rem -0.75rem 0;
  background: radial-gradient(ellipse 85% 75% at 50% 100%, rgba(245, 130, 32, 0.14), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.bpm-value {
  position: relative;
  z-index: 1;
  font-size: clamp(4rem, 20vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 28px rgba(245, 130, 32, 0.22);
}

.bpm-unit {
  position: relative;
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 0.55rem;
}

/* Beat indicator */
.metronome-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.beat-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.beat-indicator::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 130, 32, 0.07) 0%, transparent 68%);
  opacity: 0.85;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.beat-circle {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(165deg, var(--surface-raised) 0%, #1e1e1e 100%);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    background 0.07s ease,
    border-color 0.07s ease,
    box-shadow 0.07s ease,
    transform 0.07s ease;
}

.beat-circle::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color 0.07s ease, opacity 0.07s ease;
}

.beat-circle.flash {
  background: var(--orange);
  border-color: var(--orange-light);
  box-shadow: var(--shadow-md), 0 0 36px var(--orange-glow);
  transform: scale(1.04);
}

.beat-circle.flash::after {
  border-color: rgba(245, 130, 32, 0.3);
}

.beat-circle.flash-accent {
  background: var(--white);
  border-color: var(--white);
  box-shadow: var(--shadow-md), 0 0 44px var(--white-glow);
  transform: scale(1.08);
}

.beat-circle.flash-accent::after {
  border-color: rgba(255, 255, 255, 0.35);
}

.beat-circle.flash-secondary {
  background: linear-gradient(165deg, #ffe8d6 0%, var(--orange-light) 100%);
  border-color: var(--orange-light);
  box-shadow: var(--shadow-md), 0 0 32px rgba(245, 130, 32, 0.42);
  transform: scale(1.05);
}

.beat-circle.flash-secondary::after {
  border-color: rgba(245, 130, 32, 0.35);
}

.beat-indicator:has(.beat-circle.flash)::before,
.beat-indicator:has(.beat-circle.flash-accent)::before,
.beat-indicator:has(.beat-circle.flash-secondary)::before {
  transform: scale(1.12);
  opacity: 1;
}

.beat-number {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.07s ease;
  position: relative;
  z-index: 1;
}

.beat-circle.flash .beat-number,
.beat-circle.flash-accent .beat-number,
.beat-circle.flash-secondary .beat-number {
  color: var(--black);
}

.time-sig-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--light-grey);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.beat-pattern-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.settings-row--single {
  grid-template-columns: 1fr;
}

.settings-row--metronome {
  grid-template-columns: 1fr 1fr;
}

.settings-row--metronome .setting-card {
  min-height: 84px;
}

.settings-row--metronome .setting-card select {
  font-size: 0.875rem;
  padding-right: var(--space-lg);
}

/* Transport */
.transport-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-md);
  width: 100%;
}

.metronome-transport .btn-play-hero {
  width: 100%;
}

.btn-play-hero {
  width: 100%;
  min-height: 56px;
  max-width: none;
  padding: 0 var(--space-xl);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--orange);
  color: var(--black);
  box-shadow: var(--shadow-orange);
  transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition);
}

.btn-play-hero:hover {
  background: var(--orange-light);
}

.btn-play-hero:active {
  transform: scale(0.985);
}

.btn-play-hero[aria-pressed="true"] {
  background: var(--white);
  color: var(--black);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

.btn-play-hero:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.play-icon,
#timer-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  line-height: 0;
}

/* Filled Start / Pause / Resume glyphs — shared across Practice Timer,
   Metronome, song practice, and launcher transport controls. */
.transport-btn-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.btn-play-hero .transport-btn-icon,
#timer-toggle-icon .transport-btn-icon,
.play-icon .transport-btn-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.tempo-nudge {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  width: 100%;
  max-width: none;
}

.btn-nudge {
  flex: unset;
  min-height: var(--touch-min);
  padding: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), border-color var(--transition), transform 0.1s ease;
  box-shadow: none;
}

.btn-nudge:hover {
  background: var(--surface-raised);
  border-color: var(--border-strong);
}

.btn-nudge:active {
  transform: scale(0.96);
}

.btn-nudge:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.btn-nudge:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-nudge:disabled:hover {
  background: var(--surface);
  border-color: var(--border);
}

/* Tempo section */
.tempo-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tempo-section:has(.btn-tap:only-child) {
  gap: 0;
  padding-block: var(--space-sm);
}

.bpm-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xs) 0;
}

.slider-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 1.75rem;
  text-align: center;
}

#bpm-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(90deg, var(--mid-grey) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
}

#bpm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9.5px;
  border-radius: 50%;
  background: var(--orange);
  border: 2.5px solid var(--white);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

#bpm-slider::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

#bpm-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--orange);
  border: 2.5px solid var(--white);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

#bpm-slider:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 6px;
}

.btn-tap {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(245, 130, 32, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(245, 130, 32, 0.06);
  color: var(--orange);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), border-color var(--transition), transform 0.1s ease;
}

.btn-tap:hover {
  background: var(--orange-soft);
  border-color: rgba(245, 130, 32, 0.28);
}

.btn-tap:active {
  transform: scale(0.985);
}

.btn-tap:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Shared pill button base */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-pill {
  border-radius: var(--radius-pill);
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform 0.1s ease;
}

.btn-pill:active {
  transform: scale(0.97);
}

.btn-pill:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Sound selector */
.sound-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
}

@media (max-width: 399px) {
  .btn-sound:nth-child(5) {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
}

.btn-sound[data-sound="voice-count"] {
  grid-column: 1 / -1;
}

.btn-sound {
  min-height: var(--touch-min);
  padding: 0 var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--surface-raised);
  color: var(--light-grey);
  border: 1px solid var(--border);
}

.btn-sound:hover {
  color: var(--white);
  border-color: var(--border-strong);
}

.btn-sound.active {
  background: var(--orange);
  color: var(--black);
  border-color: var(--orange);
  box-shadow: var(--shadow-orange);
}

.btn-sound:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.metronome-volume {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
}

.metronome-volume--transport {
  padding: 0 var(--space-2xs);
}

.metronome-volume-label {
  flex-shrink: 0;
  width: 3rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#metronome-volume {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(90deg, var(--mid-grey) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
}

#metronome-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--light-grey);
  border: 2px solid var(--mid-grey);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition);
}

#metronome-volume::-webkit-slider-thumb:hover {
  transform: scale(1.06);
  background: var(--white);
}

#metronome-volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--light-grey);
  border: 2px solid var(--mid-grey);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

#metronome-volume:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Settings */
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.setting-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 92px;
}

.setting-card label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.setting-card select {
  width: 100%;
  min-height: var(--touch-min);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0 var(--space-xl) 0 var(--space-sm);
  margin-top: auto;
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-raised);
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999999' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.setting-card select:hover {
  color: var(--orange);
  border-color: var(--border-strong);
}

.setting-card select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  color: var(--orange);
}

.setting-card select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.setting-card .bga-select {
  margin-top: auto;
  width: 100%;
}

.setting-card .bga-select-trigger {
  min-height: var(--touch-min);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Level presets */
.level-presets {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.btn-preset--level-one {
  width: 100%;
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--surface-raised);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.preset-level-group {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: var(--space-xs) var(--space-sm);
  align-items: center;
}

.preset-level-label {
  font-size: 0.6875rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.preset-level-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.btn-preset {
  min-height: 2.75rem;
  padding: 0.4rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--surface-raised);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  cursor: pointer;
  touch-action: manipulation;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-preset span {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-preset--level-one:hover,
.btn-preset:hover {
  border-color: var(--border-strong);
}

.btn-preset--level-one.active,
.btn-preset.active {
  background: var(--orange);
  color: var(--black);
  border-color: var(--orange);
  box-shadow: var(--shadow-orange);
}

.btn-preset.active span {
  color: rgba(17, 17, 17, 0.72);
}

.status-message {
  font-size: 0.8125rem;
  color: var(--orange);
  min-height: 1.375rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-top: var(--space-2xs);
}

.app-footer {
  display: none;
}

.app-footer-beta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  max-width: 21rem;
}

.app-footer-heading {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.62);
}

.app-footer-copy,
.app-footer-support {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.36);
}

.app-footer-support {
  margin-top: -0.125rem;
}

.app-footer-meta {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.app-footer-copyright {
  margin-top: 0.125rem;
}

.btn-feedback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2rem;
  margin-top: 0.25rem;
  padding: 0.3125rem 0.875rem;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--orange);
  background: transparent;
  border: 1px solid rgba(245, 130, 32, 0.32);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.btn-feedback-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  flex-shrink: 0;
}

.btn-feedback:hover {
  background: rgba(245, 130, 32, 0.08);
  border-color: rgba(245, 130, 32, 0.42);
}

.btn-feedback:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.status-message:empty {
  visibility: hidden;
}

.bga-ps-toast {
  position: fixed;
  right: calc(var(--space-lg) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  z-index: calc(var(--bga-ps-z-panel) + 5);
  box-sizing: border-box;
  width: min(320px, calc(100vw - 2rem));
  padding: 0.875rem 1.125rem;
  color: var(--white);
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  border: 1px solid rgba(245, 130, 32, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), 0 0 20px rgba(245, 130, 32, 0.15);
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  transform: translateY(12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

/*
 * Mobile closed-launcher toast (Practice Session Started, etc.).
 *
 * After a timer start the mobile sheet collapses and the host iframe shrinks
 * to the ~92×92 FAB canvas. The base rule's `width: min(320px, calc(100vw - 2rem))`
 * then resolves against the IFRAME viewport (~60px), so the toast is clipped
 * against the right edge. Same chicken/egg as the first-visit hint — do NOT
 * use iframe-local `vw` here. Use an intentional fixed width, right-align with
 * the FAB (16px inset), sit above the FAB with a 12px gap, and let
 * measureClosedLauncherRect() expand the host frame to the toast∪FAB union
 * while it is visible. Desktop and open-panel mobile keep the base rule.
 *
 * Geometry (iframe coords; host iframe is flush right:0 / bottom:safe-area):
 *   right: 16px  (= MOBILE_VIEWPORT_GAP — same as the FAB)
 *   bottom: 16 + 56 + 12 = 84px  (viewport gap + FAB + toast gap)
 *   width: 240px — fits 320px phones: 320 - 16 - 240 = 64px left clearance
 */
html[data-bga-ps-host-layout="mobile"] .bga-ps-root:not(.bga-ps-open) .bga-ps-toast {
  position: absolute;
  right: 16px;
  bottom: calc(16px + 56px + 12px);
  left: auto;
  z-index: calc(var(--bga-ps-z-launcher) + 5);
  width: 240px;
  max-width: none;
  box-sizing: border-box;
  overflow: visible;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}

html[data-bga-ps-host-layout="mobile"] .bga-ps-root:not(.bga-ps-open) .bga-ps-toast-title,
html[data-bga-ps-host-layout="mobile"] .bga-ps-root:not(.bga-ps-open) .bga-ps-toast-message {
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}

.bga-ps-toast--error {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: var(--shadow-md), 0 0 20px rgba(239, 68, 68, 0.12);
}

.bga-ps-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.bga-ps-toast--interactive.is-visible {
  pointer-events: auto;
}

.bga-ps-toast-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.bga-ps-toast-message {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.bga-ps-toast-message[hidden] {
  display: none;
}

.bga-ps-toast-actions {
  margin-top: 0.75rem;
}

.bga-ps-toast-actions[hidden] {
  display: none;
}

.bga-ps-toast-action {
  width: 100%;
  min-height: 2.5rem;
  margin-top: 0;
  padding: 0 1rem;
  font-size: 0.8125rem;
}

.tracker-dialog {
  position: fixed;
  inset: 0;
  width: min(100% - 2rem, 420px);
  height: fit-content;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  margin: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--white);
  box-shadow: var(--shadow-md);
  z-index: calc(var(--bga-ps-z-panel) + 20);
}

.tracker-dialog[open] {
  display: block;
  opacity: 1;
  visibility: visible;
}

.tracker-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.tracker-dialog-inner {
  padding: var(--space-lg) var(--space-md);
}

.tracker-dialog-inner h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.tracker-dialog-message {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--light-grey);
  margin-bottom: var(--space-lg);
}

.tracker-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.tracker-dialog-actions .btn-primary {
  margin-top: 0;
}

.tracker-dialog--form {
  width: min(100% - 2rem, 480px);
}

.tracker-dialog-form {
  margin-top: var(--space-sm);
}

.tracker-dialog-form .form-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 480px) {
  .tracker-dialog-form .form-row {
    grid-template-columns: 1fr;
  }
}

.btn-danger {
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, 0.14);
  color: #ffb4b4;
  transition: background var(--transition), border-color var(--transition), transform 0.1s ease;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.65);
}

.btn-danger:active {
  transform: scale(0.985);
}

.btn-danger:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* ── Dashboard ── */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-greeting {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.15rem 0.15rem 0.35rem;
  animation: dashboard-card-enter 0.2s ease-out both;
}

.dashboard-greeting-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--white);
  overflow-wrap: anywhere;
  word-break: normal;
}

.dashboard-greeting-wave {
  font-weight: 400;
  white-space: nowrap;
}

.dashboard-greeting-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

.dashboard-greeting-streak-icon {
  display: none;
}

.dashboard-greeting-streak-icon svg {
  width: 100%;
  height: 100%;
}

.dashboard-achievement {
  position: relative;
  display: block;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 130, 32, 0.22);
  background:
    radial-gradient(ellipse 110% 90% at 0% 0%, rgba(245, 130, 32, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: var(--shadow-sm);
  animation: dashboard-card-enter 0.22s ease-out 0.06s both;
}

.dashboard-achievement[hidden] {
  display: none !important;
}

.dashboard-achievement--unlocking {
  animation: dashboard-achievement-unlock-pulse 0.7s ease-out;
  border-color: rgba(245, 130, 32, 0.48);
  box-shadow:
    var(--shadow-sm),
    0 0 28px rgba(245, 130, 32, 0.22),
    inset 0 0 0 1px rgba(245, 130, 32, 0.18);
}

@keyframes dashboard-achievement-unlock-pulse {
  0% {
    box-shadow: var(--shadow-sm), 0 0 0 rgba(245, 130, 32, 0);
  }
  40% {
    box-shadow:
      var(--shadow-sm),
      0 0 32px rgba(245, 130, 32, 0.28),
      inset 0 0 0 1px rgba(245, 130, 32, 0.28);
  }
  100% {
    box-shadow:
      var(--shadow-sm),
      0 0 28px rgba(245, 130, 32, 0.22),
      inset 0 0 0 1px rgba(245, 130, 32, 0.18);
  }
}

.dashboard-achievement-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dashboard-achievement-head .section-label {
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.dashboard-achievement-icon .dashboard-inline-icon {
  width: 0.9375rem;
  height: 0.9375rem;
  opacity: 0.9;
}

.dashboard-achievement-kicker {
  margin: 0.4rem 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.dashboard-achievement-title {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--orange);
}

.dashboard-achievement-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-achievement-meter {
  margin-top: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dashboard-achievement-bar-track {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dashboard-achievement-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.85), rgba(245, 160, 70, 0.95));
  transition: width 0.5s ease-out;
}

.dashboard-achievement-ratio {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.62);
}

.dashboard-achievement-unlock {
  text-align: center;
  padding: 0.35rem 0.25rem 0.15rem;
}

.dashboard-achievement-unlock-emoji {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  line-height: 1;
}

.dashboard-achievement-unlock-actions {
  position: relative;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dashboard-achievement-view {
  border: 1px solid rgba(245, 130, 32, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(245, 130, 32, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.dashboard-achievement-view:hover,
.dashboard-achievement-view:focus-visible {
  border-color: rgba(245, 130, 32, 0.55);
  background: rgba(245, 130, 32, 0.2);
  outline: none;
}

.dashboard-achievement-view:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.dashboard-achievement-browse {
  display: inline-flex;
  align-items: center;
  margin-top: 0.65rem;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-color: rgba(245, 130, 32, 0.35);
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.dashboard-achievement-browse:hover,
.dashboard-achievement-browse:focus-visible {
  color: rgba(255, 255, 255, 0.88);
  text-decoration-color: rgba(245, 130, 32, 0.7);
  outline: none;
}

.dashboard-achievement-browse:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}

.dashboard-achievement-dismiss {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.dashboard-achievement-dismiss:hover,
.dashboard-achievement-dismiss:focus-visible {
  color: var(--white);
  border-color: rgba(245, 130, 32, 0.35);
}

.dashboard-achievement-dismiss:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-achievement-bar {
    transition: none;
  }

  .dashboard-greeting,
  .dashboard-mission,
  .dashboard-achievement,
  .dashboard-weekly-goal,
  .dashboard-stats-wrap,
  .dashboard-tip,
  .dashboard-achievement--unlocking,
  .home-session-strip {
    animation: none !important;
  }
}

/* Compact Home active-session strip (under primary nav; replaces large dash-hero card) */
.home-session-strip[hidden] {
  display: none !important;
}

.home-session-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(92, 184, 92, 0.24);
  background:
    linear-gradient(180deg, rgba(92, 184, 92, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: home-session-strip-enter 0.28s ease-out both;
}

.home-session-strip.is-paused {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
}

@keyframes home-session-strip-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-session-strip-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}

.home-session-strip-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  line-height: 0;
}

.home-session-strip-dot {
  display: block;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #5cb85c;
  box-shadow: 0 0 6px rgba(92, 184, 92, 0.55);
}

.home-session-strip-pause-glyph.transport-btn-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
}

.home-session-strip-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(130, 200, 160, 0.95);
  line-height: 1;
  white-space: nowrap;
}

.home-session-strip.is-paused .home-session-strip-label {
  color: rgba(255, 255, 255, 0.62);
}

.home-session-strip-sep {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 600;
  line-height: 1;
}

.home-session-strip-time {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
}

.home-session-strip-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex: 0 0 auto;
}

.home-session-strip-controls[hidden] {
  display: none !important;
}

.home-session-strip-btn {
  min-height: 2.5rem;
  min-width: 4.25rem;
  padding: 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-session-strip-btn.btn-primary {
  box-shadow: var(--shadow-orange);
}

.home-session-strip.home-session-strip--reveal {
  animation: home-session-strip-reveal 1.1s ease-out;
}

@keyframes home-session-strip-reveal {
  0%,
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  45% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 0 0 2px rgba(92, 184, 92, 0.22),
      0 0 28px rgba(92, 184, 92, 0.18);
  }
}

@media (min-width: 720px) {
  .home-session-strip {
    padding: 0.625rem 0.95rem;
    gap: 0.75rem 1rem;
  }

  .home-session-strip-time {
    font-size: 1rem;
  }

  .home-session-strip-btn {
    min-height: 2.625rem;
    min-width: 4.75rem;
    padding: 0 1rem;
  }
}

.dashboard-hero[hidden] {
  display: none !important;
}

.dashboard-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.5rem var(--space-md) 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 130% 100% at 50% -30%, rgba(245, 130, 32, 0.16), transparent 62%),
    radial-gradient(ellipse 80% 60% at 10% 100%, rgba(245, 130, 32, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: dashboard-hero-enter 0.48s ease-out both;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(245, 130, 32, 0.1), transparent 44%);
  pointer-events: none;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.04), transparent 40%);
  pointer-events: none;
}

@keyframes dashboard-hero-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboard-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboard-tip-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-hero-state {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  z-index: 1;
}

.dashboard-hero-state[hidden] {
  display: none;
}

.dashboard-hero-greeting {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 0;
}

.dashboard-hero-greeting[hidden] {
  display: none;
}

.dashboard-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 210, 160, 0.92);
  line-height: 1.2;
}

.dashboard-hero-eyebrow[hidden] {
  display: none;
}

.dashboard-hero-eyebrow .dashboard-inline-icon {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--orange);
}

.dashboard-hero--celebration .dashboard-hero-lead {
  max-width: 28ch;
}

.dashboard-hero--celebration .dashboard-hero-subtitle {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero-lead {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.22;
  color: var(--white);
  max-width: 24ch;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.dashboard-hero-lead.is-fading-out {
  opacity: 0;
  transform: translateY(-4px);
}

.dashboard-hero-lead.is-fading-in {
  animation: dashboard-hero-lead-in 0.32s ease-out;
}

@keyframes dashboard-hero-lead-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-inline-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-inline-icon {
  display: block;
  width: 1rem;
  height: 1rem;
}

.dashboard-inline-icon--accent {
  color: var(--orange);
}

.dashboard-inline-icon--success {
  color: rgba(130, 200, 160, 0.98);
}

.dashboard-inline-icon--live {
  color: rgba(92, 184, 92, 0.95);
}

.dashboard-hero-week-icon .dashboard-inline-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.75;
}

.dashboard-hero-status-icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

.dashboard-hero-cta-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.dashboard-hero-live-dot .dashboard-inline-icon {
  width: 0.625rem;
  height: 0.625rem;
}

.dashboard-hero-timer--live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dashboard-weekly-goal-head,
.dashboard-tip-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dashboard-weekly-goal-head .section-label,
.dashboard-tip-head .dashboard-tip-label {
  margin-bottom: 0;
}

.dashboard-tip-head .dashboard-inline-icon {
  color: rgba(245, 130, 32, 0.48);
  width: 0.8125rem;
  height: 0.8125rem;
}

.dashboard-stat-icon .dashboard-inline-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.15rem;
}

.dashboard-mission-icon .dashboard-inline-icon {
  width: 0.9375rem;
  height: 0.9375rem;
  opacity: 0.9;
}

.dashboard-mission-btn-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.dashboard-mission-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  width: fit-content;
  min-height: 2rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.5625rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 130, 32, 0.28);
  background: rgba(245, 130, 32, 0.12);
  color: #ffb46e;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  box-shadow: 0 0 16px rgba(245, 130, 32, 0.12);
}

.dashboard-mission-type-icon {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--orange);
}

.dashboard-mission-type-kind {
  padding-left: 0.35rem;
  margin-left: 0.15rem;
  border-left: 1px solid rgba(245, 130, 32, 0.28);
  color: rgba(255, 181, 110, 0.88);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-mission-body.is-fading-out {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.dashboard-mission-content.is-entering {
  animation: dashboard-mission-enter 0.42s ease-out;
}

@keyframes dashboard-mission-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-mission--complete {
  animation: dashboard-mission-success-pulse 0.48s ease-out;
  border-color: rgba(92, 184, 92, 0.32);
}

@keyframes dashboard-mission-success-pulse {
  0%,
  100% {
    box-shadow:
      var(--shadow-sm),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  50% {
    box-shadow:
      var(--shadow-sm),
      0 0 24px rgba(92, 184, 92, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

.dashboard-mission--refreshing .dashboard-mission-body {
  opacity: 0;
  transition: opacity 0.32s ease;
}

.dashboard-mission-celebration {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.125rem 0 0.25rem;
  animation: dashboard-mission-enter 0.38s ease-out;
}

.dashboard-mission-celebration-icon {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.125rem;
}

.dashboard-mission-celebration-title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(130, 200, 160, 0.98);
}

.dashboard-mission-celebration-copy {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-mission-celebration-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.dashboard-mission-celebration-list {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dashboard-mission-celebration-list li {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.dashboard-mission-celebration-next {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.dashboard-tip-text.is-fading-out {
  opacity: 0;
  transform: translateY(-3px);
}

.dashboard-tip-text.is-fading-in {
  animation: dashboard-tip-text-in 0.32s ease-out;
}

@keyframes dashboard-tip-text-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-focus-practising-ack {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-hero-subtitle {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--light-grey);
  letter-spacing: 0.01em;
  max-width: 28ch;
}

.dashboard-hero-subtitle[hidden] {
  display: none;
}

.dashboard-hero-greeting[hidden] {
  display: none;
}

.dashboard-hero-meta[hidden] {
  display: none;
}

.dashboard-hero-streak-note[hidden] {
  display: none;
}

.dashboard-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.125rem;
}

.dashboard-hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.875rem;
  padding: 0.3125rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-hero-chip .dashboard-inline-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.dashboard-hero-chip--streak {
  color: rgba(255, 210, 160, 0.98);
  border-color: rgba(245, 130, 32, 0.22);
  background:
    linear-gradient(180deg, rgba(245, 130, 32, 0.14) 0%, rgba(245, 130, 32, 0.06) 100%);
}

.dashboard-hero-chip--streak .dashboard-inline-icon {
  color: var(--orange);
}

.dashboard-hero-chip--week {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-hero-chip--week .dashboard-inline-icon {
  color: rgba(255, 255, 255, 0.55);
}

.dashboard-hero-streak-note {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 0.015em;
}

.dashboard-hero-week-text {
  font-variant-numeric: tabular-nums;
}

.dashboard-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--light-grey);
}

.dashboard-hero-status--active {
  color: rgba(130, 200, 160, 0.95);
}

.dashboard-hero-song {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--white);
}

.dashboard-hero-timer {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-2xs);
}

.dashboard-hero-timer--live .dashboard-hero-time {
  color: var(--orange);
}

.dashboard-hero-live-dot {
  font-size: 0.625rem;
  line-height: 1;
}

.dashboard-hero-time {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--white);
}

.dashboard-hero-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-sm);
  width: 100%;
  min-height: 3.125rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.dashboard-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 130, 32, 0.22);
}

.dashboard-hero-cta:active {
  transform: translateY(0);
}

.dashboard-hero[data-hero-state="active"] .dashboard-hero-cta,
.dashboard-hero[data-hero-state="paused"] .dashboard-hero-cta {
  margin-top: 0;
}

.dashboard-hero[data-hero-state="active"],
.dashboard-hero[data-hero-state="paused"] {
  background:
    radial-gradient(ellipse 130% 100% at 50% -30%, rgba(92, 184, 92, 0.14), transparent 62%),
    radial-gradient(ellipse 80% 60% at 10% 100%, rgba(92, 184, 92, 0.05), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(92, 184, 92, 0.22);
}

.dashboard-hero[data-hero-state="active"]::before,
.dashboard-hero[data-hero-state="paused"]::before {
  background: radial-gradient(circle at 88% 12%, rgba(92, 184, 92, 0.1), transparent 44%);
}

.dashboard-hero-state--active:not([hidden]),
.dashboard-hero-state--paused:not([hidden]) {
  animation: dashboard-hero-session-enter 0.45s ease-out;
}

@keyframes dashboard-hero-session-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-hero-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
  width: 100%;
  margin-top: var(--space-sm);
}

.dashboard-hero-controls[hidden] {
  display: none;
}

.dashboard-hero-cta[hidden] {
  display: none;
}

.dashboard-hero-pause,
.dashboard-hero-stop {
  min-height: 3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dashboard-hero-stop {
  box-shadow: var(--shadow-orange);
}

.dashboard-hero.dashboard-hero--scroll-reveal {
  animation: dashboard-hero-scroll-reveal 1.1s ease-out;
}

@keyframes dashboard-hero-scroll-reveal {
  0%,
  100% {
    box-shadow:
      var(--shadow-sm),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  45% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 2px rgba(92, 184, 92, 0.18),
      0 0 32px rgba(92, 184, 92, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

.dashboard-hero[data-hero-state="active"].dashboard-hero--scroll-reveal,
.dashboard-hero[data-hero-state="paused"].dashboard-hero--scroll-reveal {
  animation: dashboard-hero-scroll-reveal-active 1.1s ease-out;
}

@keyframes dashboard-hero-scroll-reveal-active {
  0%,
  100% {
    box-shadow:
      var(--shadow-sm),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  45% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 2px rgba(92, 184, 92, 0.22),
      0 0 36px rgba(92, 184, 92, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

.pauls-practice-tip {
  /* Legacy alias — Home uses .dashboard-tip */
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-hero,
  .dashboard-mission,
  .dashboard-tip {
    animation: none;
  }

  .dashboard-hero-lead,
  .dashboard-mission-body,
  .dashboard-tip-text,
  .dashboard-mission-content,
  .dashboard-mission-celebration {
    transition: none;
    animation: none;
  }

  .dashboard-mission--complete {
    animation: none;
  }

  .dashboard-hero-cta {
    transition: none;
  }

  .dashboard-hero-cta:hover {
    transform: none;
    box-shadow: none;
  }

  .dashboard-hero-state--active:not([hidden]),
  .dashboard-hero-state--paused:not([hidden]) {
    animation: none;
  }

  .dashboard-hero.dashboard-hero--scroll-reveal,
  .dashboard-hero[data-hero-state="active"].dashboard-hero--scroll-reveal,
  .dashboard-hero[data-hero-state="paused"].dashboard-hero--scroll-reveal {
    animation: none;
  }
}

.dashboard-focus {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(245, 130, 32, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dashboard-hero-enter 0.55s ease-out 0.08s both;
}

.dashboard-focus::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 8%, rgba(245, 130, 32, 0.08), transparent 42%);
  pointer-events: none;
}

.dashboard-focus[data-stage="playthrough"] {
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(91, 155, 213, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
}

.dashboard-focus[data-stage="playthrough"]::before {
  background: radial-gradient(circle at 92% 8%, rgba(91, 155, 213, 0.1), transparent 42%);
}

.dashboard-focus[data-stage="perform"] {
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(92, 184, 92, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
}

.dashboard-focus[data-stage="perform"]::before {
  background: radial-gradient(circle at 92% 8%, rgba(92, 184, 92, 0.08), transparent 42%);
}

.dashboard-focus-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dashboard-focus-head .section-label {
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.dashboard-focus-icon {
  font-size: 0.9375rem;
  line-height: 1;
  opacity: 0.9;
}

.dashboard-focus-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dashboard-focus-coaching {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.dashboard-focus-song {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-focus-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.dashboard-focus-artist {
  margin: 0;
  font-size: 0.875rem;
  color: var(--light-grey);
  line-height: 1.35;
}

.dashboard-focus-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  width: 100%;
}

.dashboard-focus-cta-row .btn {
  flex: 1 1 9.5rem;
}

.dashboard-focus-coaching--focus-area .dashboard-focus-title,
.dashboard-focus-coaching--session .dashboard-focus-title {
  letter-spacing: -0.01em;
}

.dashboard-focus-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}

.dashboard-focus-stage-label,
.dashboard-focus-why-label,
.dashboard-focus-session-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
}

.dashboard-focus-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-height: 2rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.5625rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.dashboard-focus-stage-dot {
  width: 0.5625rem;
  height: 0.5625rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-focus-stage-pill[data-stage="practice"] {
  color: #ffb46e;
  background: rgba(245, 130, 32, 0.12);
  border-color: rgba(245, 130, 32, 0.28);
  box-shadow: 0 0 16px rgba(245, 130, 32, 0.12);
}

.dashboard-focus-stage-pill[data-stage="practice"] .dashboard-focus-stage-dot {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(245, 130, 32, 0.55);
}

.dashboard-focus-stage-pill[data-stage="playthrough"] {
  color: #8ec5f0;
  background: rgba(91, 155, 213, 0.12);
  border-color: rgba(91, 155, 213, 0.28);
  box-shadow: 0 0 16px rgba(91, 155, 213, 0.1);
}

.dashboard-focus-stage-pill[data-stage="playthrough"] .dashboard-focus-stage-dot {
  background: #5b9bd5;
  box-shadow: 0 0 8px rgba(91, 155, 213, 0.55);
}

.dashboard-focus-stage-pill[data-stage="perform"] {
  color: #9fdd9f;
  background: rgba(92, 184, 92, 0.12);
  border-color: rgba(92, 184, 92, 0.28);
  box-shadow: 0 0 16px rgba(92, 184, 92, 0.1);
}

.dashboard-focus-stage-pill[data-stage="perform"] .dashboard-focus-stage-dot {
  background: #5cb85c;
  box-shadow: 0 0 8px rgba(92, 184, 92, 0.55);
}

.dashboard-focus-why {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-focus-why-message {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.dashboard-focus-why-line {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.006em;
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-focus-session {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-focus-session-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}

.dashboard-focus-session-icon {
  font-size: 0.9375rem;
  line-height: 1;
  opacity: 0.88;
}

.dashboard-focus-actions {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-sm) * 0.9);
  padding-top: var(--space-2xs);
}

.dashboard-focus-actions .my-song-card-resources {
  margin: 0;
}

.dashboard-focus-cta {
  width: 100%;
}

.dashboard-focus-cta .btn-start-practice {
  width: 100%;
}

.dashboard-focus-empty {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Today's Mission ── */
.dashboard-mission {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + 0.125rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(245, 130, 32, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dashboard-card-enter 0.22s ease-out 0.04s both;
}

.dashboard-mission--hero {
  padding: 1.35rem 1.25rem 1.3rem;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 130% 100% at 50% -28%, rgba(245, 130, 32, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(245, 130, 32, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(245, 130, 32, 0.22);
  box-shadow:
    var(--shadow-sm),
    0 12px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dashboard-mission::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 8%, rgba(245, 130, 32, 0.08), transparent 42%);
  pointer-events: none;
}

.dashboard-mission[data-stage="playthrough"] {
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(91, 155, 213, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
}

.dashboard-mission[data-stage="playthrough"]::before {
  background: radial-gradient(circle at 92% 8%, rgba(91, 155, 213, 0.1), transparent 42%);
}

.dashboard-mission[data-stage="perform"] {
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(92, 184, 92, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
}

.dashboard-mission[data-stage="perform"]::before {
  background: radial-gradient(circle at 92% 8%, rgba(92, 184, 92, 0.08), transparent 42%);
}

.dashboard-mission-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dashboard-mission-head .section-label {
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.dashboard-mission-icon {
  font-size: 0.9375rem;
  line-height: 1;
  opacity: 0.9;
}

.dashboard-mission-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dashboard-mission-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dashboard-mission-title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.dashboard-mission--hero .dashboard-mission-title {
  font-size: 1.375rem;
  letter-spacing: -0.03em;
}

.dashboard-mission-duration {
  margin: -0.35rem 0 0;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(245, 130, 32, 0.92);
}

.dashboard-mission-meta {
  margin: -0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--light-grey);
  line-height: 1.35;
}

.dashboard-mission-message {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-mission-why {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-mission-why-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 130, 32, 0.88);
}

.dashboard-mission-why-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-mission-cta {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.dashboard-mission-cta .btn-start-practice,
.dashboard-mission-cta .btn-primary {
  width: 100%;
}

.dashboard-mission-cta .btn-start-practice:active,
.dashboard-mission-cta .btn-primary:active,
.dashboard-mission-open-class:active {
  transform: scale(0.98);
}

.dashboard-mission-open-class {
  width: 100%;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .dashboard-mission-open-class:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  }
}

.dashboard-mission-empty {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-mission--practising {
  border-color: rgba(92, 184, 92, 0.22);
  box-shadow:
    var(--shadow-sm),
    0 0 20px rgba(92, 184, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-mission--practising::before {
  background: radial-gradient(circle at 92% 8%, rgba(92, 184, 92, 0.08), transparent 42%);
}

.dashboard-mission--logged {
  animation: dashboard-focus-logged 2.4s ease-out;
}

.dashboard-tip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1.125rem 1.375rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(245, 130, 32, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(245, 130, 32, 0.05), transparent 50%),
    linear-gradient(165deg, rgba(36, 28, 22, 0.92) 0%, rgba(24, 24, 24, 0.98) 48%, rgba(20, 20, 20, 1) 100%);
  border: 1px solid rgba(245, 130, 32, 0.14);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dashboard-card-enter 0.22s ease-out 0.14s both;
}

.dashboard-tip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.875rem;
  bottom: 0.875rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(245, 130, 32, 0.15) 0%,
    rgba(245, 130, 32, 0.72) 35%,
    rgba(245, 130, 32, 0.72) 65%,
    rgba(245, 130, 32, 0.15) 100%
  );
  pointer-events: none;
}

.dashboard-tip[hidden] {
  display: none;
}

.dashboard-tip-label {
  margin: 0;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.dashboard-tip-quote {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0.15rem 0 0;
  border: 0;
}

.dashboard-tip-mark {
  display: block;
  margin: 0 0 -0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 0.75;
  color: rgba(245, 130, 32, 0.45);
}

.dashboard-tip-text {
  margin: 0;
  padding: 0 0.125rem;
  font-size: 1.375rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.7;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.94);
  white-space: pre-line;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.dashboard-tip-signature {
  margin: 0;
  padding: 0.55rem 0.125rem 0;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
  color: rgba(245, 130, 32, 0.78);
  border-top: 1px solid rgba(245, 130, 32, 0.16);
  width: fit-content;
  min-width: 4.5rem;
}

.dashboard-focus--practising {
  border-color: rgba(92, 184, 92, 0.22);
  box-shadow:
    var(--shadow-sm),
    0 0 20px rgba(92, 184, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-focus--practising::before {
  background: radial-gradient(circle at 92% 8%, rgba(92, 184, 92, 0.08), transparent 42%);
}

.dashboard-focus-practising-ack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.375rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(92, 184, 92, 0.1);
  border: 1px solid rgba(92, 184, 92, 0.24);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(190, 230, 190, 0.95);
  text-align: center;
}

.dashboard-focus-practising-dot {
  font-size: 0.6875rem;
  line-height: 1;
}

.dashboard-focus--logged {
  animation: dashboard-focus-logged 2.4s ease-out;
}

@keyframes dashboard-focus-logged {
  0%,
  100% {
    box-shadow:
      var(--shadow-sm),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  35% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 2px rgba(92, 184, 92, 0.2),
      0 0 28px rgba(92, 184, 92, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

.has-practice-start-confirmation {
  position: relative;
}

.practice-start-confirmation {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: var(--space-md);
  border-radius: inherit;
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  pointer-events: none;
}

.practice-start-confirmation.is-visible {
  opacity: 1;
  transform: scale(1);
}

.practice-start-confirmation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(92, 184, 92, 0.16);
  border: 1px solid rgba(92, 184, 92, 0.35);
  color: #9fdd9f;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.practice-start-confirmation-text {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.practice-start-press {
  transform: scale(0.97);
  filter: brightness(1.04);
}

.tracker-timer.has-practice-start-confirmation,
.my-song-card-cta.has-practice-start-confirmation {
  position: relative;
  min-height: 3.375rem;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-focus {
    animation: none;
  }

  .dashboard-focus--logged,
  .dashboard-hero-state--active:not([hidden]),
  .dashboard-hero-state--paused:not([hidden]),
  .practice-start-confirmation,
  .practice-start-press {
    animation: none;
    transition: none;
  }
}

.dashboard-stats-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  animation: dashboard-card-enter 0.22s ease-out 0.12s both;
}

.dashboard-stats-wrap .section-label {
  margin-bottom: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
}

.dashboard-stats--snapshot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.95rem;
}

.dashboard-stats--snapshot .dashboard-stat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  min-height: 6.25rem;
  height: 100%;
  padding: 0.95rem 0.85rem;
  gap: 0;
}

.dashboard-stats--snapshot .dashboard-stat-label {
  margin: 0 0 0.45rem;
  min-height: 0.875rem;
  font-size: 0.6875rem;
}

.dashboard-stats--snapshot .dashboard-stat-value {
  margin: 0;
  min-height: 1.35rem;
  align-self: center;
}

.dashboard-stats--snapshot .dashboard-stat-number {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dashboard-stats--snapshot .dashboard-stat-unit[hidden] {
  display: none;
}

.dashboard-stats--snapshot .dashboard-stat-note {
  margin: 0.45rem 0 0;
  min-height: 1.45rem;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  font-size: 0.625rem;
}

@media (max-width: 420px) {
  .dashboard-stats--snapshot {
    grid-template-columns: 1fr;
  }
}

.dashboard-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding: var(--space-sm) var(--space-md);
  min-height: 6.75rem;
}

.dashboard-stat-label {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.dashboard-stat-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.3125rem;
  margin: 0 0 0.625rem;
  padding: 0;
  line-height: 1;
}

.dashboard-stat-number {
  font-size: 1.4375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
  letter-spacing: -0.025em;
  line-height: 1;
}

.dashboard-stat-icon {
  font-size: 0.6875rem;
  line-height: 1;
  transform: translateY(-0.0625rem);
  opacity: 0.92;
}

.dashboard-stat-unit {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(245, 130, 32, 0.62);
  letter-spacing: 0.015em;
  line-height: 1;
}

.dashboard-stat-note {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  max-width: 9.5rem;
}

.dashboard-week {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 1.25rem 1.375rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.dashboard-week-head {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dashboard-week-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-week-calendar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-week-calendar-icon svg {
  width: 100%;
  height: 100%;
}

.dashboard-week-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.2;
}

.dashboard-week-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.week-activity {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.375rem;
  width: 100%;
}

.week-activity-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.week-activity-circle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.week-activity-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  transition:
    background-color 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease;
}

.week-activity-circle--active {
  background: linear-gradient(180deg, rgba(92, 184, 92, 0.96) 0%, rgba(72, 148, 72, 0.92) 100%);
  border-color: rgba(130, 210, 130, 0.72);
  box-shadow: 0 0 14px rgba(92, 184, 92, 0.22);
}

.week-activity-day--today .week-activity-circle:not(.week-activity-circle--active) {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.week-activity-day--today .week-activity-circle--active {
  border-color: rgba(150, 220, 150, 0.82);
  box-shadow:
    0 0 0 1px rgba(92, 184, 92, 0.16),
    0 0 16px rgba(92, 184, 92, 0.28);
}

.week-activity-day--just-completed .week-activity-circle {
  animation: weekCircleComplete 320ms ease-out both;
}

.week-activity-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.8125rem;
  height: 0.8125rem;
  color: #fff;
}

.week-activity-day--just-completed .week-activity-check {
  animation: weekCheckIn 320ms ease-out both;
}

.week-activity-check svg {
  width: 100%;
  height: 100%;
}

@keyframes weekCircleComplete {
  from {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
  }

  to {
    background: linear-gradient(180deg, rgba(92, 184, 92, 0.96) 0%, rgba(72, 148, 72, 0.92) 100%);
    border-color: rgba(130, 210, 130, 0.72);
    box-shadow: 0 0 14px rgba(92, 184, 92, 0.22);
  }
}

@keyframes weekCheckIn {
  from {
    opacity: 0;
    transform: scale(0.72);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.week-activity-label {
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.06em;
  line-height: 1;
  transition: color 300ms ease;
}

.week-activity-label--completed,
.week-activity-day--today .week-activity-label {
  color: rgba(255, 255, 255, 0.62);
}

.dashboard-week-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-week-summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.dashboard-week-trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  margin-bottom: -0.05em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-week-trophy svg {
  width: 0.8125rem;
  height: 0.8125rem;
}

.week-consistency-summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.week-summary-numbers {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
}

.week-summary-count {
  color: #5cb85c;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding-right: 0.625rem;
}

.week-summary-slash {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  padding-right: 0.5rem;
}

.week-summary-total {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.week-summary-label {
  margin-left: 1.125rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.dashboard-week-motivation {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
  max-width: 22rem;
  align-self: center;
  transition: opacity 300ms ease;
}

.dashboard-week-motivation.is-fading-out {
  opacity: 0;
}

.dashboard-week-motivation.is-fading-in {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .week-activity-day:hover .week-activity-circle:not(.week-activity-circle--active) {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
  }
}

@media (max-width: 768px) {
  .week-activity {
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .dashboard-week {
    padding: 1.125rem 1rem;
  }

  .week-activity-circle {
    width: 1.875rem;
    height: 1.875rem;
  }

  .week-activity-check {
    width: 0.6875rem;
    height: 0.6875rem;
  }

  .week-activity-label {
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .week-activity-circle,
  .week-activity-label,
  .dashboard-week-motivation {
    transition: none;
  }

  .week-activity-day--just-completed .week-activity-circle,
  .week-activity-day--just-completed .week-activity-check {
    animation: none;
  }
}

.dashboard-focus-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 1.25rem 1.375rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.dashboard-focus-breakdown-head {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dashboard-focus-breakdown-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-focus-breakdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-focus-breakdown-icon svg {
  width: 100%;
  height: 100%;
}

.dashboard-focus-breakdown-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.2;
}

.dashboard-focus-breakdown .focus-breakdown-empty {
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}

.dashboard-focus-bars {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.dashboard-focus-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-focus-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-focus-bar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color 300ms ease-in-out;
}

.dashboard-focus-bar-value {
  flex-shrink: 0;
  min-width: 2.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: right;
  line-height: 1.2;
  transition: color 300ms ease-in-out;
}

.dashboard-focus-bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.dashboard-focus-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 146, 46, 0.88) 0%,
    rgba(245, 130, 32, 0.72) 52%,
    rgba(201, 104, 24, 0.82) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: width 0.5s ease-out, opacity 300ms ease-in-out;
}

.dashboard-focus-bar-row--top .dashboard-focus-bar-label {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
}

.dashboard-focus-bar-row--top .dashboard-focus-bar-value {
  color: var(--orange-light);
}

.dashboard-focus-bar-row--top .dashboard-focus-bar-fill {
  background: linear-gradient(
    180deg,
    rgba(255, 146, 46, 0.96) 0%,
    rgba(245, 130, 32, 0.82) 52%,
    rgba(201, 104, 24, 0.9) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.dashboard-focus-bar-row--muted .dashboard-focus-bar-label {
  color: rgba(255, 255, 255, 0.46);
  font-weight: 600;
}

.dashboard-focus-bar-row--muted .dashboard-focus-bar-value {
  color: rgba(245, 130, 32, 0.62);
}

.dashboard-focus-bar-row--muted .dashboard-focus-bar-fill {
  opacity: 0.58;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dashboard-focus-breakdown-footer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-focus-breakdown-footer[hidden] {
  display: none;
}

.dashboard-focus-breakdown-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-focus-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.375rem 0 0.625rem;
  text-align: center;
}

.dashboard-focus-total-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dashboard-focus-total-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.2;
}

.dashboard-focus-coaching {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-focus-coaching-head {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
}

.dashboard-focus-coaching-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.9375rem;
  height: 0.9375rem;
  color: rgba(245, 130, 32, 0.82);
}

.dashboard-focus-coaching-icon svg {
  width: 100%;
  height: 100%;
}

.dashboard-focus-coaching-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.2;
}

.dashboard-focus-coaching-message {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: opacity 300ms ease-in-out;
}

.dashboard-focus-coaching-headline {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: rgba(255, 255, 255, 0.88);
}

.dashboard-focus-coaching-line {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.58);
}

.dashboard-focus-coaching-message.is-fading-out {
  opacity: 0;
}

.dashboard-focus-coaching-message.is-fading-in {
  opacity: 1;
}

@media (max-width: 768px) {
  .dashboard-focus-breakdown {
    padding: 1.125rem 1.25rem;
    gap: 1rem;
  }

  .dashboard-focus-bars {
    gap: 0.75rem;
  }

  .dashboard-focus-bar-label {
    font-size: 0.78125rem;
  }

  .dashboard-focus-bar-value {
    min-width: 2.25rem;
    font-size: 0.71875rem;
  }

  .dashboard-focus-total-value {
    font-size: 1.625rem;
  }

  .dashboard-focus-coaching {
    padding: 0.9375rem 1rem;
  }

  .dashboard-focus-coaching-headline {
    font-size: 0.875rem;
  }

  .dashboard-focus-coaching-line {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-focus-bar-fill,
  .dashboard-focus-bar-label,
  .dashboard-focus-bar-value,
  .dashboard-focus-coaching-message {
    transition: none;
  }
}

.dashboard-weekly-goal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: 1.25rem 1.375rem;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(92, 184, 92, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dashboard-card-enter 0.22s ease-out 0.1s both;
}

.dashboard-weekly-goal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 8%, rgba(92, 184, 92, 0.08), transparent 42%);
  pointer-events: none;
}

.dashboard-weekly-goal .section-label {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  letter-spacing: 0.08em;
}

.dashboard-weekly-goal-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.dashboard-weekly-goal-body--stack {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.dashboard-weekly-goal-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.dashboard-weekly-goal-subhead {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.dashboard-weekly-goal-subhead .dashboard-inline-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  color: rgba(245, 130, 32, 0.78);
}

.dashboard-weekly-goal--compact {
  padding: 1.1rem 1.15rem 1.15rem;
  gap: 0.75rem;
}

.dashboard-weekly-goal--compact .dashboard-weekly-goal-body--stack {
  gap: 1.125rem;
}

.dashboard-weekly-goal--compact .dashboard-weekly-goal-progress {
  font-size: 1.125rem;
}

.dashboard-weekly-goal-status,
.dashboard-weekly-goal-remaining {
  margin: 0.05rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.dashboard-weekly-goal-progress {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}

.dashboard-weekly-goal-bar {
  width: 100%;
  height: 0.55rem;
}

.dashboard-weekly-goal-bar-fill {
  width: 0;
  transition: width 0.5s ease-out;
}

.dashboard-weekly-goal-bar-fill.is-goal-pulse {
  animation: dashboard-weekly-goal-pulse 1.1s ease-out;
}

.dashboard-weekly-goal-column--complete .dashboard-weekly-goal-bar-fill {
  background: linear-gradient(
    180deg,
    rgba(120, 210, 120, 0.96) 0%,
    rgba(92, 184, 92, 0.82) 52%,
    rgba(72, 154, 72, 0.9) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 16px rgba(92, 184, 92, 0.28);
}

.dashboard-weekly-goal--celebrate {
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(92, 184, 92, 0.22),
    0 0 36px rgba(92, 184, 92, 0.18);
}

.dashboard-weekly-goal-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.dashboard-weekly-goal-sparkles.is-active {
  opacity: 1;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 22%, rgba(245, 130, 32, 0.7) 0 1.5px, transparent 3px),
    radial-gradient(circle at 84% 58%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 74%, rgba(92, 184, 92, 0.7) 0 1.5px, transparent 3px),
    radial-gradient(circle at 58% 42%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px);
  animation: dashboard-weekly-sparkle 1.35s ease-out both;
}

@keyframes dashboard-weekly-sparkle {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@keyframes dashboard-weekly-goal-pulse {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 0 0 rgba(92, 184, 92, 0);
  }

  40% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.34),
      0 0 0 5px rgba(92, 184, 92, 0.18),
      0 0 22px rgba(92, 184, 92, 0.35);
  }

  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 16px rgba(92, 184, 92, 0.28);
  }
}

.dashboard-weekly-goal-complete {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(92, 184, 92, 0.12) 0%, rgba(92, 184, 92, 0.04) 100%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(92, 184, 92, 0.22);
}

.dashboard-weekly-goal-complete[hidden] {
  display: none;
}

.dashboard-weekly-goal-success {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(170, 230, 175, 0.98);
  line-height: 1.25;
}

.dashboard-weekly-goal-success[hidden] {
  display: none;
}

.dashboard-weekly-goal-success .dashboard-inline-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.dashboard-weekly-goal--complete .dashboard-weekly-goal-message {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-weekly-goal-remaining {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.dashboard-weekly-goal-streak {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
}

.dashboard-weekly-goal-message {
  margin: 0;
  padding: 0.75rem 0.875rem;
  border-radius: 14px;
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 220ms ease;
}

.dashboard-weekly-goal-message.is-fading-out {
  opacity: 0;
}

.dashboard-weekly-goal-message.is-fading-in {
  opacity: 1;
}

.dashboard-weekly-goal-column--complete .dashboard-weekly-goal-remaining,
.dashboard-weekly-goal-column--complete .dashboard-weekly-goal-status {
  color: rgba(120, 210, 120, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-weekly-goal {
    animation: none;
  }

  .dashboard-weekly-goal-bar-fill,
  .dashboard-weekly-goal-bar-fill.is-goal-pulse,
  .dashboard-weekly-goal-message {
    transition: none;
    animation: none;
  }
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.dashboard-section-head .section-label {
  margin-bottom: 0;
}

.dashboard-link {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: var(--space-2xs) var(--space-xs);
}

.dashboard-recent {
  position: relative;
  padding: 1.25rem 1.375rem;
  overflow: hidden;
  border-radius: 24px;
  --dashboard-recent-badge-width: 5.875rem;
  --dashboard-recent-badge-height: 1.3125rem;
  background:
    radial-gradient(ellipse 120% 90% at 50% -20%, rgba(255, 255, 255, 0.04), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-recent .section-label {
  letter-spacing: 0.08em;
}

.dashboard-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.dashboard-recent-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dashboard-recent-group-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
  line-height: 1.2;
}

.dashboard-recent-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dashboard-recent-item {
  display: grid;
  grid-template-columns: var(--dashboard-recent-badge-width) minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.625rem;
  width: 100%;
  margin: 0;
  padding: 0.4375rem 0.5625rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.dashboard-recent-item:hover {
  background: rgba(255, 255, 255, 0.048);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.dashboard-recent-item:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-recent-item:focus-visible {
  outline: 2px solid rgba(245, 130, 32, 0.85);
  outline-offset: 2px;
}

.dashboard-recent-type {
  flex-shrink: 0;
  align-self: start;
  width: var(--dashboard-recent-badge-width);
  min-width: var(--dashboard-recent-badge-width);
  height: var(--dashboard-recent-badge-height);
  min-height: var(--dashboard-recent-badge-height);
  margin-top: 0.0625rem;
  padding: 0 0.5625rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-recent-type--song {
  color: rgba(255, 176, 96, 0.95);
  border-color: rgba(245, 130, 32, 0.22);
  background: rgba(245, 130, 32, 0.08);
}

.dashboard-recent-type--skill {
  color: rgba(140, 190, 255, 0.95);
  border-color: rgba(91, 155, 213, 0.22);
  background: rgba(91, 155, 213, 0.08);
}

.dashboard-recent-type--lesson {
  color: rgba(196, 168, 255, 0.95);
  border-color: rgba(156, 120, 220, 0.22);
  background: rgba(156, 120, 220, 0.08);
}

.dashboard-recent-type--performance {
  color: rgba(130, 220, 130, 0.95);
  border-color: rgba(92, 184, 92, 0.22);
  background: rgba(92, 184, 92, 0.08);
}

.dashboard-recent-type--practice {
  color: rgba(255, 255, 255, 0.62);
}

.dashboard-recent-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.dashboard-recent-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.0625rem;
  min-width: 0;
}

.dashboard-recent-title {
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-recent-time {
  width: 100%;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.36);
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-recent-subtitle {
  width: 100%;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-recent-notes {
  display: flex;
  align-items: flex-start;
  gap: 0.3125rem;
  margin: 0;
  min-width: 0;
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
}

.dashboard-recent-notes-icon {
  flex-shrink: 0;
  width: 0.6875rem;
  height: 0.6875rem;
  margin-top: 0.125rem;
  color: rgba(255, 255, 255, 0.34);
}

.dashboard-recent-notes-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dashboard-recent-notes-text {
  min-width: 0;
  color: rgba(255, 255, 255, 0.34);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-duration {
  flex-shrink: 0;
  align-self: start;
  margin-top: 0.0625rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.dashboard-recent-empty {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-recent-empty[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-recent-item {
    transition: none;
  }
}

/* ── Practice Tracker ── */
.tracker {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

#panel-tracker > .tracker {
  margin-top: -0.625rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: var(--space-sm) var(--space-xs);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 72px;
}

.metric-card--wide {
  grid-column: 1 / -1;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.goals-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.goal-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.goal-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--light-grey);
  margin-bottom: var(--space-2xs);
}

.progress-bar {
  height: 6px;
  background: var(--mid-grey);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange-dim), var(--orange));
  border-radius: var(--radius-pill);
  transition: width var(--transition);
}

.timer-display-wrap {
  text-align: center;
  padding: calc(var(--space-md) + 0.125rem) 0 calc(var(--space-md) + 0.25rem);
}

.timer-display {
  display: block;
  font-size: clamp(2.75rem, 14vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1.12;
  padding: 0.1875rem 0;
}

.timer-session-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4375rem;
  margin: 0 0 calc(var(--space-sm) + 0.0625rem);
  text-align: center;
}

.timer-session-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.375rem;
  padding: 0.1875rem 0.5625rem 0.1875rem 0.4375rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-session-status-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    background-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-session-status-label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  transition: color 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-session-status-description {
  position: relative;
  margin: 0;
  max-width: 16rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.38);
  /* Single text node only — no layered copies / pseudo helper copy. */
  white-space: normal;
}

.timer-session-status-description::before,
.timer-session-status-description::after {
  content: none !important;
}

.timer-session-status[data-state="ready"] .timer-session-status-chip {
  color: #ffb46e;
  background: rgba(245, 130, 32, 0.1);
  border-color: rgba(245, 130, 32, 0.22);
}

.timer-session-status[data-state="ready"] .timer-session-status-label {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.6875rem;
  font-weight: 600;
}

.timer-session-status[data-state="ready"] .timer-session-status-dot {
  background: var(--orange);
  box-shadow: 0 0 6px rgba(245, 130, 32, 0.5);
}

.tracker-timer.is-idle .timer-session-status {
  margin-bottom: 0.1875rem;
}

.tracker-timer.is-idle .timer-display-wrap {
  padding-top: calc(var(--space-sm) + 0.0625rem);
  padding-bottom: calc(var(--space-sm) + 0.1875rem);
}

.tracker-timer.is-idle .timer-session-status-description {
  color: rgba(255, 255, 255, 0.42);
}

.timer-session-status[data-state="practising"] .timer-session-status-chip {
  color: #9fdd9f;
  background: rgba(92, 184, 92, 0.1);
  border-color: rgba(92, 184, 92, 0.22);
}

.timer-session-status[data-state="practising"] .timer-session-status-dot {
  background: #5cb85c;
  box-shadow: 0 0 6px rgba(92, 184, 92, 0.5);
}

.timer-session-status[data-state="paused"] .timer-session-status-chip {
  color: #f0d080;
  background: rgba(240, 192, 64, 0.1);
  border-color: rgba(240, 192, 64, 0.22);
}

.timer-session-status[data-state="paused"] .timer-session-status-dot {
  background: #e6b84d;
  box-shadow: 0 0 6px rgba(240, 192, 64, 0.45);
}

.timer-session-status[data-state="completed"] .timer-session-status-chip {
  color: #8ec5f0;
  background: rgba(91, 155, 213, 0.1);
  border-color: rgba(91, 155, 213, 0.22);
}

.timer-session-status[data-state="completed"] .timer-session-status-dot {
  background: #5b9bd5;
  box-shadow: 0 0 6px rgba(91, 155, 213, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .timer-session-status-chip,
  .timer-session-status-dot,
  .timer-session-status-label,
  .timer-session-status-description {
    transition: none;
  }
}

.tracker-timer {
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-lg) + 0.25rem) var(--space-md) calc(var(--space-lg) + 0.125rem);
  border-color: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(ellipse 120% 90% at 50% -18%, rgba(245, 130, 32, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.016) 100%);
  box-shadow:
    var(--shadow-sm),
    0 12px 32px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tracker-timer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  width: min(100%, 18rem);
  height: 8.5rem;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 58% 52% at 50% 50%,
    rgba(245, 130, 32, 0.075) 0%,
    rgba(245, 130, 32, 0.035) 42%,
    transparent 72%
  );
  filter: blur(32px);
}

.tracker-timer > * {
  position: relative;
  z-index: 1;
}

.tracker-timer .section-label {
  margin-bottom: calc(var(--space-xs) + 0.125rem);
  letter-spacing: 0.09em;
}

.timer-controls {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-sm) + 0.125rem);
  margin-top: 0.125rem;
}

.tracker-timer .btn-play-hero {
  transition:
    background 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tracker-timer.is-idle .btn-play-hero {
  background: linear-gradient(180deg, #ff922e 0%, var(--orange) 54%, var(--orange-dim) 100%);
  box-shadow:
    var(--shadow-orange),
    0 0 28px rgba(245, 130, 32, 0.2);
}

@media (hover: hover) and (pointer: fine) {
  .tracker-timer.is-idle .btn-play-hero:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
      var(--shadow-orange),
      0 0 36px rgba(245, 130, 32, 0.28);
  }
}

.tracker-timer.is-idle .btn-play-hero:active {
  transform: scale(0.985) translateY(0);
  filter: brightness(0.98);
}

.tracker-timer .timer-actions .btn-secondary {
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    border-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tracker-timer .timer-actions .btn-secondary:disabled {
  opacity: 1;
  cursor: default;
  color: rgba(255, 255, 255, 0.44);
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.tracker-timer .timer-actions .btn-secondary:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

.timer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.card--nested {
  margin-top: var(--space-md);
  background: var(--surface-raised);
  border-color: var(--border-strong);
}

.timer-save-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.timer-save-summary-kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.timer-save-summary-duration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.timer-save-summary-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-grey);
}

.timer-save-summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#timer-save-panel {
  scroll-margin-top: 1.25rem;
}

.timer-save-panel--highlight {
  animation: timerSavePanelHighlight 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Guided session save: Practice Complete & Practice Saved ── */
.practice-flow-overlay {
  position: absolute;
  top: var(--bga-ps-practice-flow-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: practiceFlowOverlayIn 0.28s ease-out both;
  pointer-events: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.practice-flow-overlay[hidden] {
  display: none !important;
}

@keyframes practiceFlowOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.practice-flow-card {
  width: 100%;
  max-width: 22rem;
  max-height: calc(100% - var(--space-md));
  margin-block: auto;
  flex-shrink: 0;
  overflow-y: auto;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border-color: rgba(255, 122, 48, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 122, 48, 0.12);
  animation: practiceFlowCardIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes practiceFlowCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.practice-flow-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.practice-flow-icon--complete {
  color: var(--orange);
  background: rgba(255, 122, 48, 0.14);
  border: 1px solid rgba(255, 122, 48, 0.35);
}

.practice-flow-icon--saved {
  font-size: 1.5rem;
  background: rgba(255, 122, 48, 0.1);
  border: 1px solid rgba(255, 122, 48, 0.22);
}

.practice-flow-title {
  margin: 0 0 var(--space-2xs);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

.practice-flow-lead {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
}

.practice-flow-body {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--light-grey);
}

.practice-flow-highlight {
  display: inline-block;
  margin-top: var(--space-2xs);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.practice-flow-prompt {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--light-grey);
}

.practice-flow-primary {
  width: 100%;
  margin-bottom: 1.125rem;
}

.practice-flow-skip {
  display: block;
  width: 100%;
  min-height: var(--touch-min);
  margin: 0;
  padding: 0 var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.76);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.practice-flow-skip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
}

.practice-flow-skip:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.02);
}

.practice-flow-skip:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.practice-flow-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ── BGA skill class resources ── */
.bga-skill-resource-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bga-skill-resource-action--text {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(158, 196, 230, 0.88);
}

.bga-skill-resource-action--text:hover {
  color: rgba(196, 224, 248, 0.98);
}

.bga-skill-resource-action--chip {
  min-height: 1.5rem;
  padding: 0.125rem 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(72, 130, 190, 0.22);
  background: rgba(72, 130, 190, 0.08);
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(158, 196, 230, 0.92);
}

.bga-skill-resource-action--chip:hover {
  background: rgba(72, 130, 190, 0.14);
  border-color: rgba(72, 130, 190, 0.34);
  color: rgba(196, 224, 248, 0.98);
}

.bga-skill-resource-action--secondary {
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
}

.bga-skill-resource-action--secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
}

.bga-skill-resource-action:active {
  transform: scale(0.98);
}

.bga-skill-resource-action:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.bga-skill-resource-action-icon,
.bga-skill-resource-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  flex-shrink: 0;
}

.bga-skill-resource-picker {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.bga-skill-resource-picker[hidden] {
  display: none !important;
}

.bga-skill-resource-picker-panel {
  position: fixed;
  z-index: 121;
  width: min(17.5rem, calc(100vw - 1rem));
  max-height: min(18rem, calc(100vh - 1rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 22, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: bgaSkillResourcePickerIn 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bgaSkillResourcePickerIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bga-skill-resource-picker-title {
  margin: 0;
  padding: 0.35rem 0.5rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

.bga-skill-resource-picker-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bga-skill-resource-picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms cubic-bezier(0.16, 1, 0.3, 1),
    color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bga-skill-resource-picker-item:hover,
.bga-skill-resource-picker-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.bga-skill-resource-picker-item:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(245, 130, 32, 0.55);
}

.bga-skill-resource-picker-item-class {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 178, 112, 0.9);
}

.bga-skill-resource-picker-item-label {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.84);
}

@media (prefers-reduced-motion: reduce) {
  .bga-skill-resource-picker-panel,
  .journal-timeline-chip--linkable,
  .bga-skill-resource-action {
    animation: none;
    transition: none;
  }
}

.bga-ps-practice-flow-open .bga-ps-panel-inner {
  overflow: hidden;
}

.tracker-timer--highlight {
  animation: trackerTimerHighlight 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes trackerTimerHighlight {
  0% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 0 rgba(245, 130, 32, 0.35);
    border-color: rgba(245, 130, 32, 0.55);
  }

  35% {
    box-shadow:
      var(--shadow-md),
      0 0 0 4px rgba(245, 130, 32, 0.18),
      0 0 28px rgba(245, 130, 32, 0.18);
    border-color: rgba(245, 130, 32, 0.65);
  }

  100% {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
  }
}

@keyframes timerSavePanelHighlight {
  0% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 0 rgba(245, 130, 32, 0.45);
    border-color: rgba(245, 130, 32, 0.55);
  }

  18% {
    box-shadow:
      var(--shadow-md),
      0 0 0 4px rgba(245, 130, 32, 0.2),
      0 0 28px rgba(245, 130, 32, 0.18);
    border-color: rgba(245, 130, 32, 0.65);
  }

  100% {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-strong);
  }
}

.tracker-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/*
 * Date + Minutes row (manual log + cloned edit-session form).
 * Grid tracks use minmax(0, …) so columns can shrink. That alone is not
 * enough on iOS Safari: the native date control still paints ~26px wider
 * than its grid cell. The visible field chrome therefore lives on
 * .session-date-input-shell (overflow:hidden), and the native input is
 * laid out inside that shell. Edit form clones #manual-entry-form.
 */
.session-date-minutes-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-sm);
  align-items: start;
}

.session-date-minutes-row > * {
  min-width: 0;
}

.session-date-minutes-row .form-field input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/*
 * Visible Date field shell — carries the same chrome as .form-field input
 * so the native control can be borderless/transparent inside and clipped
 * to this box. overflow:hidden is required: iOS may still give the inner
 * input an intrinsic used width larger than the flex/grid allocation.
 */
.session-date-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-height: var(--touch-min);
  padding: var(--space-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color-scheme: dark;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.session-date-input-shell:focus-within {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.session-date-input-shell:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Horizontal inset keeps the used width inside the shell (iOS overflow fix).
   Vertical fill is top/bottom: 0 — the previous all-sides `inset: var(--space-sm)`
   shrank the control into the padded content box and, combined with WebKit
   flex centring, parked the value too close to the bottom border. Full-height
   fill + flex centring matches the Minutes field's visual centre. */
.session-date-input-shell input[type="date"] {
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: normal;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

.session-date-input-shell input[type="date"]:focus,
.session-date-input-shell input[type="date"]:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}

/* Centre WebKit's painted value inside the full-height control. A 2px upward
   optical nudge counters iOS's residual bottom bias without fighting the
   shell padding or reintroducing overflow. */
.session-date-input-shell input[type="date"]::-webkit-date-and-time-value {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: normal;
  text-align: left;
  transform: translateY(-2px);
}

.session-date-input-shell input[type="date"]::-webkit-datetime-edit {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  line-height: normal;
  transform: translateY(-2px);
}

.session-date-input-shell input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  margin: 0;
}

.session-date-input-shell input[type="date"]::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.form-field label,
.form-field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  padding-right: calc(var(--space-md) + 0.75rem);
}

.form-field textarea {
  min-height: 72px;
  line-height: 1.45;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

/* Design System custom select */
.bga-select {
  position: relative;
  width: 100%;
  z-index: 1;
}

.bga-select.is-open {
  z-index: 20;
}

.bga-select-trigger {
  width: 100%;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  text-align: left;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    transform 0.1s ease;
}

.bga-select-trigger:has(.bga-select-value-primary) {
  min-height: calc(var(--touch-min) + 0.375rem);
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.bga-select-trigger:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: #2a2a2a;
}

.bga-select-trigger:active:not(:disabled) {
  transform: scale(0.995);
}

.bga-select-trigger:focus-visible,
.bga-select.is-open .bga-select-trigger {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.bga-select--disabled .bga-select-trigger {
  opacity: 0.45;
  cursor: not-allowed;
}

.bga-select--empty .bga-select-value {
  color: var(--muted);
}

.bga-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bga-select-value:has(.bga-select-value-primary) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.0625rem;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.2;
}

.bga-select-value-primary {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.bga-select-value-secondary {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.48);
}

.bga-select-option--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1875rem;
  padding-top: 0.6875rem;
  padding-bottom: 0.6875rem;
}

.bga-select-option-primary {
  display: block;
  max-width: 100%;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bga-select-option-secondary {
  display: block;
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.48);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bga-select-option.is-selected .bga-select-option-secondary,
.bga-select-option.is-active .bga-select-option-secondary {
  color: rgba(255, 180, 110, 0.72);
}

.bga-select-chevron {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--muted);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23000' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition:
    transform 0.2s ease,
    background-color var(--transition);
}

.bga-select.is-open .bga-select-chevron {
  transform: rotate(180deg);
  background-color: var(--orange);
}

.bga-select-popover {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1;
  margin: 0;
  padding: var(--space-2xs);
  background: linear-gradient(180deg, #1f1f1f 0%, var(--surface) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md), 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.bga-select-popover--portaled {
  position: fixed;
  right: auto;
  z-index: 100;
}

.bga-select-popover--dialog {
  z-index: 100;
}

.bga-select-popover.is-above {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(6px);
}

.bga-select-popover.is-open,
.bga-select.is-open .bga-select-popover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bga-select-popover.is-open.is-above,
.bga-select.is-open .bga-select-popover.is-above {
  transform: translateY(0);
}

.bga-select-search-slot:not([hidden]) {
  padding: var(--space-2xs) var(--space-2xs) var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.bga-select-list {
  list-style: none;
  margin: 0;
  padding: var(--space-2xs);
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bga-select-option {
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.bga-select-option:hover,
.bga-select-option.is-active {
  background: var(--orange-soft);
}

.bga-select-option.is-selected {
  color: var(--orange);
  font-weight: 700;
}

.bga-select-option.is-selected.is-active {
  background: rgba(245, 130, 32, 0.16);
}

/* Non-shelled date inputs (none today) keep dark scheme; shelled Date uses
   .session-date-input-shell above for chrome + overflow clipping. */
.form-field input[type="date"] {
  color-scheme: dark;
}

.btn-primary {
  width: 100%;
  min-height: var(--touch-min);
  margin-top: var(--space-2xs);
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: var(--black);
  box-shadow: var(--shadow-orange);
  transition:
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245, 130, 32, 0.3);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-orange);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.btn-primary.is-saving,
.btn-primary[aria-busy="true"] {
  cursor: wait;
  pointer-events: none;
  opacity: 0.92;
  transform: none;
  box-shadow: var(--shadow-orange);
}

.btn-primary.is-saving:hover,
.btn-primary[aria-busy="true"]:hover {
  background: var(--orange);
  transform: none;
}

.btn-saving-spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: rgba(0, 0, 0, 0.75);
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: bga-btn-spin 0.7s linear infinite;
}

@keyframes bga-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-saving-spinner {
    animation: none;
    border-top-color: rgba(0, 0, 0, 0.55);
  }
}

.btn-secondary {
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--white);
  transition: background var(--transition), border-color var(--transition), transform 0.1s ease;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--mid-grey);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tracker-journal {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tracker-workspace {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tracker-workspace-nav {
  width: 100%;
  margin-top: 0;
}

.tracker-workspace-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#tracker-workspace-practice {
  gap: var(--space-sm);
}

.tracker-workspace-panel[hidden] {
  display: none !important;
}

.tracker-workspace-panel--enter {
  animation: none;
}

@keyframes trackerPracticeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .section-label,
#tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-session-status,
#tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-display-wrap {
  animation: trackerPracticeIn 280ms cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

#tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-controls {
  animation: trackerPracticeIn 280ms cubic-bezier(0.22, 1, 0.36, 1) 0.07s both;
}

#tracker-workspace-practice.tracker-workspace-panel--enter .tracker-manual {
  animation: trackerPracticeIn 280ms cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

/* ── Insights (Journal) ── */
.insights-layout {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.insights-card {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color var(--transition),
    box-shadow var(--transition);
}

.insights-panel.is-active .insights-card {
  opacity: 1;
  transform: translateY(0);
}

.insights-panel.is-active .insights-hero {
  transition-delay: 0s;
}

.insights-panel.is-active .insights-achievements {
  transition-delay: 0.04s;
}

.insights-panel.is-active .insights-focus {
  transition-delay: 0.08s;
}

.insights-panel.is-active .insights-personal {
  transition-delay: 0.11s;
}

.insights-panel.is-active .insights-goals {
  transition-delay: 0.16s;
}

.insights-panel.is-active .insights-pattern {
  transition-delay: 0.22s;
}

.insights-panel.is-active .insights-lifetime {
  transition-delay: 0.3s;
}

.insights-focus.card,
.insights-personal.card,
.insights-goals.card,
.insights-pattern.card,
.insights-lifetime.card {
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius-lg);
}

@media (hover: hover) {
  .insights-focus.card:hover,
  .insights-personal.card:hover,
  .insights-goals.card:hover,
  .insights-pattern.card:hover,
  .insights-lifetime.card:hover {
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow:
      var(--shadow-sm),
      0 6px 20px rgba(0, 0, 0, 0.12);
  }
}

.insights-hero {
  position: relative;
  overflow: hidden;
  padding: 1.125rem 1.25rem 1.2rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(245, 130, 32, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.insights-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(245, 130, 32, 0.1), transparent 42%);
  pointer-events: none;
}

.insights-hero-title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.insights-hero-primary {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.insights-hero-minutes-value {
  font-size: clamp(2.75rem, 11vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.insights-hero-minutes-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.62);
}

.insights-hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: 0.65rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.insights-hero-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.insights-hero-streak-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--orange);
}

.insights-hero-streak-svg {
  width: 100%;
  height: 100%;
}

.insights-hero-streak-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.insights-hero-goal-delta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.insights-hero-goal-delta[hidden] {
  display: none;
}

.insights-hero-message {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.insights-achievements {
  position: relative;
  overflow: hidden;
  padding: 1.125rem 1.25rem 1.2rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 110% 75% at 8% -18%, rgba(245, 130, 32, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(245, 130, 32, 0.06), transparent 48%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.016) 100%);
  border-color: rgba(245, 130, 32, 0.14);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.insights-achievements::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 94% 8%, rgba(245, 130, 32, 0.1), transparent 36%);
  pointer-events: none;
}

.insights-achievements-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.insights-achievements-title-icon {
  display: inline-flex;
  color: var(--orange);
}

.insights-achievements-title-icon .dashboard-inline-icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

.insights-achievements-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.insights-achievements-list,
.insights-achievements-tiers {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.insights-achievement-tier {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.insights-achievement-tier.is-locked {
  opacity: 0.55;
}

.insights-achievement-tier-locked-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Journal Achievements page ── */
.journal-achievements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.journal-achievements-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  margin-bottom: 0.1rem;
}

.journal-achievements-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.journal-achievements-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
}

.journal-achievements-previous {
  padding: 0.75rem 0.9rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.journal-achievements-previous-title {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--white);
}

.journal-achievements-previous-copy {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.journal-achievements-previous-update {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.journal-achievements-previous-update:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.tracker-previous-progress-hint {
  margin: 0 0 var(--space-md);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.tracker-previous-progress-fieldset {
  margin: 0 0 var(--space-lg);
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tracker-previous-progress-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.tracker-previous-progress-option:has(input:focus-visible) {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.tracker-previous-progress-option:has(input:checked) {
  border-color: rgba(245, 130, 32, 0.42);
  background: rgba(245, 130, 32, 0.1);
}

.tracker-previous-progress-option input {
  margin: 0;
  accent-color: var(--orange);
}

.journal-achievements-current-tier,
.journal-achievements-next,
.journal-achievements-checklist {
  padding: 0.85rem 0.95rem 0.95rem;
  min-width: 0;
}

.journal-achievements-current-tier--elevated {
  border-color: rgba(245, 130, 32, 0.28);
  background:
    radial-gradient(ellipse 120% 90% at 0% 0%, rgba(245, 130, 32, 0.14), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.08),
    0 0 28px rgba(245, 130, 32, 0.1);
}

.journal-achievements-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.journal-achievements-tier-identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.journal-achievements-tier-medal {
  flex-shrink: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.journal-achievements-tier-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--white);
  overflow-wrap: anywhere;
}

.journal-achievements-tier-percent {
  margin: 0;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 750;
  color: rgba(245, 130, 32, 0.95);
  font-variant-numeric: tabular-nums;
}

.journal-achievements-tier-kicker,
.journal-achievements-tier-next-kicker {
  margin: 0.4rem 0 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.journal-achievements-tier-progress,
.journal-achievements-tier-remaining {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.58);
  overflow-wrap: anywhere;
}

.journal-achievements-tier-next {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.journal-achievements-tier-next-name {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.86);
}

.journal-achievements-tier-bar-track,
.journal-achievements-next-bar-track,
.journal-achievement-row-bar-track {
  width: 100%;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.journal-achievements-tier-bar,
.journal-achievements-next-bar,
.journal-achievement-row-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.75), var(--orange));
  transition: width 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-achievements-next--active {
  border-color: rgba(245, 130, 32, 0.32);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.08),
    0 0 24px rgba(245, 130, 32, 0.1);
}

.journal-achievements-next-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.journal-achievements-next-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--white);
  overflow-wrap: anywhere;
}

.journal-achievements-next-description {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  overflow-wrap: anywhere;
}

.journal-achievements-next-meter {
  margin-top: 0.65rem;
}

.journal-achievements-next-progress-row,
.journal-achievement-row-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.journal-achievements-next-ratio,
.journal-achievements-next-percent,
.journal-achievement-row-ratio,
.journal-achievement-row-percent {
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.68);
}

.journal-achievements-next-percent,
.journal-achievement-row-percent {
  color: rgba(245, 130, 32, 0.95);
}

.journal-achievements-checklist {
  margin-top: 0.35rem;
}

.journal-achievements-checklist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.journal-achievements-checklist-heading {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.journal-achievements-checklist-count {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 130, 32, 0.92);
}

.journal-achievements-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.journal-achievement-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  transition:
    border-color 280ms ease,
    background-color 280ms ease,
    box-shadow 280ms ease,
    opacity 280ms ease;
}

.journal-achievement-row.is-completed {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.018);
}

.journal-achievement-row.is-current,
.journal-achievement-row.is-completing {
  border-color: rgba(245, 130, 32, 0.42);
  background:
    radial-gradient(ellipse 120% 90% at 0% 0%, rgba(245, 130, 32, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 1px rgba(245, 130, 32, 0.1),
    0 0 22px rgba(245, 130, 32, 0.12);
}

.journal-achievement-row-icon {
  flex-shrink: 0;
  width: 1.35rem;
  margin-top: 0.05rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: rgba(255, 255, 255, 0.42);
}

.journal-achievement-row.is-completed .journal-achievement-row-icon,
.journal-achievement-row.is-completing .journal-achievement-row-icon {
  font-size: 1.3rem;
  color: rgba(142, 214, 142, 0.95);
}

.journal-achievement-row.is-current .journal-achievement-row-icon {
  color: var(--orange);
}

.journal-achievement-row-body {
  min-width: 0;
  flex: 1 1 auto;
}

.journal-achievement-row-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.35rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 130, 32, 0.4);
  background: rgba(245, 130, 32, 0.16);
  color: rgba(255, 210, 160, 0.98);
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.journal-achievement-row-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.94);
  overflow-wrap: anywhere;
}

.journal-achievement-row.is-completed .journal-achievement-row-title {
  color: rgba(255, 255, 255, 0.9);
}

.journal-achievement-row.is-current .journal-achievement-row-title {
  font-size: 0.9375rem;
  color: var(--white);
}

.journal-achievement-row-description,
.journal-achievement-row-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  overflow-wrap: anywhere;
}

.journal-achievement-row.is-completed .journal-achievement-row-description {
  color: rgba(255, 255, 255, 0.42);
}

.journal-achievement-row.is-completed .journal-achievement-row-meta {
  color: rgba(255, 255, 255, 0.5);
}

.journal-achievement-row-meter {
  margin-top: 0.45rem;
}

.journal-achievements-upcoming {
  min-width: 0;
  margin-top: 0.15rem;
}

.journal-achievements-upcoming-heading {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.journal-achievements-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.journal-achievements-upcoming-card {
  padding: 0.75rem 0.85rem;
  opacity: 0.78;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow-sm);
}

.journal-achievements-upcoming-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.journal-achievements-upcoming-medal {
  font-size: 1.15rem;
  line-height: 1;
}

.journal-achievements-upcoming-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
}

.journal-achievements-upcoming-hint,
.journal-achievements-upcoming-lock {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

.journal-achievements-upcoming-lock {
  color: rgba(255, 255, 255, 0.42);
}

@media (prefers-reduced-motion: reduce) {
  .journal-achievements-tier-bar,
  .journal-achievements-next-bar,
  .journal-achievement-row-bar,
  .journal-achievement-row {
    transition: none;
  }
}

@media (max-width: 480px) {
  .journal-achievements-title {
    font-size: 1.2rem;
  }

  .journal-achievements-current-tier,
  .journal-achievements-next,
  .journal-achievements-checklist,
  .journal-achievements-previous {
    padding: 0.75rem 0.8rem 0.85rem;
  }

  .journal-achievement-row {
    padding: 0.65rem 0.7rem;
  }

  .journal-achievements-tier-medal {
    font-size: 1.4rem;
  }
}

.insights-achievement-tier-toggle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.insights-achievement-tier-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.insights-achievement-tier.is-locked .insights-achievement-tier-toggle {
  cursor: default;
}

.insights-achievement-tier-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
}

.insights-achievement-tier-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.insights-achievement-tier-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
}

.insights-achievement-tier-percent {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
}

.insights-achievement-tier-progress,
.insights-achievement-tier-remaining {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 550;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}

.insights-achievement-tier-remaining {
  color: rgba(245, 130, 32, 0.88);
  font-weight: 600;
}

.insights-achievement-tier-bar-track {
  width: 100%;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.insights-achievement-tier-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.8), rgba(245, 160, 70, 0.95));
}

.insights-achievement-tier-body {
  padding: 0 0.9rem 0.9rem;
}

.insights-achievement-tier-body[hidden] {
  display: none !important;
}

.insights-achievement-tier-label {
  margin: 0 0 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.insights-achievement-tier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.insights-achievement-tier-next {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: rgba(245, 160, 70, 0.92);
}

.insights-achievement {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.insights-achievement.is-unlocked {
  border-color: rgba(92, 184, 92, 0.22);
  background:
    linear-gradient(180deg, rgba(92, 184, 92, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.insights-achievement.is-locked {
  opacity: 0.62;
}

.insights-achievement-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(245, 130, 32, 0.12);
  color: var(--orange);
}

.insights-achievement.is-unlocked .insights-achievement-icon {
  background: rgba(92, 184, 92, 0.14);
  color: rgba(150, 220, 160, 0.98);
}

.insights-achievement.is-locked .insights-achievement-icon {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.38);
}

.insights-achievement-icon-svg {
  width: 1.05rem;
  height: 1.05rem;
}

.insights-achievement-icon-svg--muted {
  opacity: 0.85;
}

.insights-achievement-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.insights-achievement-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--white);
}

.insights-achievement.is-locked .insights-achievement-title {
  color: rgba(255, 255, 255, 0.72);
}

.insights-achievement-description {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.insights-achievement.is-locked .insights-achievement-description {
  color: rgba(255, 255, 255, 0.42);
}

.insights-achievement-status {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(150, 220, 160, 0.92);
}

.insights-achievement.is-locked .insights-achievement-status {
  color: rgba(255, 255, 255, 0.4);
}

.insights-card-title {
  margin: 0 0 var(--space-md);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}

.insights-focus .insights-card-title {
  margin-bottom: 0.15rem;
}

.insights-focus-subtitle {
  margin: 0 0 0.7rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.insights-personal {
  border-color: rgba(245, 130, 32, 0.12);
  background:
    radial-gradient(ellipse 90% 60% at 0% 0%, rgba(245, 130, 32, 0.1), transparent 55%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.014) 100%);
}

.insights-personal-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.insights-personal-head .insights-card-title {
  margin: 0;
}

.insights-personal-title-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--orange);
}

.insights-personal-title-svg {
  width: 100%;
  height: 100%;
}

.insights-personal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.insights-personal-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.insights-personal-bullet {
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.16);
}

.insights-personal-text {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.insights-personal-empty {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
}

.insights-personal-empty[hidden] {
  display: none;
}

.insights-card-title--secondary {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.insights-focus-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insights-focus-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  animation: insights-focus-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--insights-focus-delay, 0s);
}

.insights-focus-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.insights-focus-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-grey);
}

.insights-focus-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.insights-focus-open-class {
  flex-shrink: 0;
}

.insights-focus-minutes {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}

.insights-focus-bar-track {
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.insights-focus-bar-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.72), var(--orange));
  box-shadow: 0 0 12px rgba(245, 130, 32, 0.22);
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.insights-focus-empty {
  margin: 0;
  padding: var(--space-md) 0 var(--space-xs);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--light-grey);
  text-align: center;
}

.insights-focus-empty[hidden] {
  display: none;
}

.insights-goals-form {
  margin-bottom: var(--space-lg);
  align-items: start;
}

/*
 * Weekly Goals top row: "Target practice days" often wraps while
 * "Target minutes" stays on one line. Reserve two label lines so both
 * inputs share the same vertical start without shrinking label text.
 */
.insights-goals-form .form-field label {
  line-height: 1.25;
  min-height: 2.5em;
}

.insights-goals-progress {
  gap: var(--space-md);
}

.insights-goal-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.insights-goal-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.35rem var(--space-sm);
  margin-bottom: 0;
}

.insights-goal-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-grey);
}

.insights-goal-value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

.insights-goal-status {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.insights-goal-status[hidden] {
  display: none !important;
}

.insights-goal-status--complete {
  color: rgba(158, 221, 159, 0.95);
}

.insights-goal-status--remaining {
  color: var(--orange);
}

.insights-goal-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(92, 184, 92, 0.18);
  font-size: 0.625rem;
  line-height: 1;
}

.insights-goal-bar {
  height: 0.5rem;
}

.insights-goal-bar-fill {
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.insights-goal-item--complete .insights-goal-bar-fill {
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.85), var(--orange));
  box-shadow: 0 0 10px rgba(245, 130, 32, 0.2);
}

.insights-pattern {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.insights-pattern-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.insights-pattern-header .insights-pattern-title {
  margin: 0;
}

.insights-pattern-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.insights-pattern-streak[hidden] {
  display: none;
}

.insights-pattern-streak-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  color: var(--orange);
}

.insights-pattern-streak-svg {
  width: 100%;
  height: 100%;
}

.insights-pattern-streak-text {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.insights-pattern-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.insights-pattern-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.insights-pattern-empty[hidden],
.insights-pattern-body[hidden] {
  display: none;
}

.insights-pattern-empty-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.insights-pattern-empty-copy {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.insights-pattern-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.insights-pattern-chart {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.insights-pattern-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.42rem;
  padding: 0 0.1rem;
}

.insights-pattern-weekdays span {
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.insights-pattern-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
  width: 100%;
}

.insights-pattern-cell {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  aspect-ratio: 1;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border-radius: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.035);
  cursor: default;
  opacity: 0;
  transform: translateY(3px) scale(0.94);
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.insights-pattern-cell:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.insights-pattern-grid.is-animated .insights-pattern-cell {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: var(--insights-pattern-delay, 0ms);
}

.insights-pattern-cell--level-0 {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}

.insights-pattern-cell--level-1 {
  background: rgba(245, 130, 32, 0.14);
  border-color: rgba(245, 130, 32, 0.16);
}

.insights-pattern-cell--level-2 {
  background: rgba(245, 130, 32, 0.44);
  border-color: rgba(245, 130, 32, 0.38);
}

.insights-pattern-cell--level-3 {
  background: var(--orange);
  border-color: rgba(255, 180, 110, 0.55);
  box-shadow: 0 0 12px rgba(245, 130, 32, 0.28);
}

.insights-pattern-cell--today {
  position: relative;
  box-shadow:
    0 0 0 2px rgba(245, 130, 32, 0.78),
    0 0 10px rgba(245, 130, 32, 0.22);
}

.insights-pattern-cell--today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.18rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(245, 130, 32, 0.55);
  transform: translateX(-50%);
  pointer-events: none;
}

.insights-pattern-cell--today.insights-pattern-cell--level-0:not(.insights-pattern-cell--future) {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(245, 130, 32, 0.34);
}

.insights-pattern-cell--today.insights-pattern-cell--level-0:not(.insights-pattern-cell--future)::after {
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.insights-pattern-cell--today.insights-pattern-cell--level-3 {
  box-shadow:
    0 0 0 2px rgba(255, 210, 160, 0.85),
    0 0 12px rgba(245, 130, 32, 0.32);
}

.insights-pattern-cell--future {
  opacity: 0.28;
  background: rgba(255, 255, 255, 0.012);
  border-color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.insights-pattern-grid.is-animated .insights-pattern-cell--future {
  opacity: 0.28;
}

@media (hover: hover) and (pointer: fine) {
  .insights-pattern-cell:not(.insights-pattern-cell--future):hover {
    transform: translateY(-1px) scale(1.1);
    z-index: 1;
  }

  .insights-pattern-cell--active:not(.insights-pattern-cell--future):hover {
    box-shadow: 0 0 14px rgba(245, 130, 32, 0.32);
  }

  .insights-pattern-cell--today:not(.insights-pattern-cell--future):hover {
    box-shadow:
      0 0 0 2px rgba(245, 130, 32, 0.9),
      0 0 14px rgba(245, 130, 32, 0.34);
  }
}

.insights-pattern-tooltip {
  position: absolute;
  z-index: 40;
  min-width: 10.5rem;
  max-width: 14rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background-color: #181818;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.58),
    0 4px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 1;
  isolation: isolate;
}

.insights-pattern-tooltip[hidden] {
  display: none;
}

.insights-pattern-tooltip-date {
  margin: 0 0 0.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.insights-pattern-tooltip-minutes {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange);
  line-height: 1.35;
}

.insights-pattern-tooltip-section {
  margin-top: 0.45rem;
}

.insights-pattern-tooltip-section:first-of-type {
  margin-top: 0.35rem;
}

.insights-pattern-tooltip-label {
  margin: 0 0 0.2rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

.insights-pattern-tooltip-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.insights-pattern-tooltip-list li {
  position: relative;
  padding-left: 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.insights-pattern-tooltip-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.42);
}

.insights-pattern-footnote {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.34);
  text-align: center;
}

.insights-lifetime {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.insights-lifetime-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.insights-lifetime-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
}

.insights-lifetime-value {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
  font-variant-numeric: tabular-nums;
}

.insights-lifetime-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes insights-focus-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .insights-hero {
    padding: 1rem 1.05rem 1.1rem;
  }

  .insights-achievements {
    padding: 1rem 1.05rem 1.1rem;
  }

  .insights-achievement {
    padding: 0.7rem 0.75rem;
  }

  .insights-achievement-icon {
    width: 2.1rem;
    height: 2.1rem;
  }

  .insights-focus.card,
  .insights-personal.card,
  .insights-goals.card,
  .insights-pattern.card,
  .insights-lifetime.card {
    padding: 1rem 1.05rem;
  }

  .insights-hero-meta {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.35rem;
  }

  .insights-hero-goal-delta {
    width: 100%;
    text-align: center;
  }

  .insights-lifetime-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .insights-lifetime-stat {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .insights-lifetime-stat:last-child {
    border-bottom: none;
  }

  .insights-lifetime-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .insights-card,
  .insights-focus-bar-fill,
  .insights-goal-bar-fill,
  .insights-focus-item,
  .insights-pattern-cell {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .insights-panel.is-active .insights-card,
  .insights-pattern-grid.is-animated .insights-pattern-cell {
    opacity: 1;
    transform: none;
  }
}

.tracker-manual {
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.018);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.tracker-manual .section-label {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--space-xs);
}

.tracker-manual-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
}

.tracker-manual-panel {
  display: flex;
  flex-direction: column;
}

.tracker-manual-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.tracker-manual-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
}

.tracker-manual-form-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transition:
    grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tracker-manual-panel.is-expanded .tracker-manual-form-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

.tracker-manual-cta-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.46);
}

.tracker-manual-cta .btn {
  width: 100%;
  max-width: 16rem;
}

.tracker-manual-form-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden;
  min-height: 0;
  padding: 0 var(--space-md) var(--space-md);
  transform: translateY(-6px);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tracker-manual-panel.is-expanded .tracker-manual-form-wrap {
  transform: translateY(0);
}

.tracker-manual-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.tracker-manual-form-actions .btn-primary {
  flex: 1 1 12rem;
}

@media (prefers-reduced-motion: reduce) {
  .tracker-manual-form-collapse,
  .tracker-manual-form-wrap {
    transition: none;
  }

  .tracker-manual-form-wrap {
    transform: none;
  }
}

.focus-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
}

.warm-up-pills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field--warm-up {
  margin-bottom: var(--space-xs);
}

.form-field--session-song {
  margin-bottom: var(--space-xs);
  min-width: 0;
  max-width: 100%;
}

.form-field--session-milestone {
  margin-bottom: var(--space-xs);
}

.form-row--session-milestone .form-field,
.form-row--session-song .form-field {
  margin-bottom: 0;
}

.form-row--session-song {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 1.5fr);
}

.form-row--session-song > .form-field {
  min-width: 0;
  max-width: 100%;
}

.form-row--session-song .bga-select,
.form-row--session-song .bga-select-trigger {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.session-song-picker-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.session-song-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
  max-width: 100%;
}

.session-song-list:empty {
  display: none;
}

.session-song-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0.375rem 0 0.125rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(92, 184, 92, 0.28);
  background: rgba(92, 184, 92, 0.1);
  color: #b7e3b7;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.session-song-feedback[hidden] {
  display: none;
}

.session-song-feedback-text {
  min-width: 0;
}

.session-song-feedback-undo {
  flex-shrink: 0;
  min-height: auto;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9fdd9f;
}

.session-song-feedback-undo:hover {
  color: #c8efc8;
}

button[data-session-song-catalog-add][hidden] {
  display: none !important;
}

.form-field-hint {
  margin: 0 0 var(--space-xs);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--light-grey);
}

.timer-save-extra-skills {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.session-skill-fields {
  padding: calc(var(--space-md) + 5px);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  animation: sessionDisclosureIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.session-skill-fields-label {
  display: block;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
  text-transform: uppercase;
}

.session-skill-fields .form-field {
  margin-bottom: 0;
}

.session-skill-fields .form-field label {
  font-size: 0.8125rem;
  color: var(--light-grey);
}

.tracker-form--progressive {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.session-disclosure-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.session-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--light-grey);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.session-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--orange);
  border-radius: 3px;
}

.session-disclosure-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-2xs);
  animation: sessionDisclosureIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.session-disclosure-panel[hidden] {
  display: none !important;
}

.session-disclosure-label {
  display: block;
  margin: 0 0 var(--space-2xs);
  font-size: 0.8125rem;
  color: var(--light-grey);
}

.session-song-picker-panel,
.session-song-new-panel {
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-session-song-new {
  width: 100%;
}

.focus-pills--timer-save {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.focus-pills--timer-save .focus-pill {
  min-height: 36px;
  padding: var(--space-2xs) var(--space-sm);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

@keyframes sessionDisclosureIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .focus-pills--timer-save {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.btn-add-session-song {
  width: 100%;
  min-height: 40px;
  font-size: 0.875rem;
}

.session-song-selected {
  padding: var(--space-sm);
  margin-top: var(--space-2xs);
}

.session-song-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.session-song-check {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 122, 48, 0.14);
  border: 1px solid rgba(255, 122, 48, 0.35);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.session-song-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.session-song-stage-label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.session-song-stage-pills {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.session-song-picker-list {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.session-song-picker-item {
  width: 100%;
  margin-bottom: var(--space-xs);
}

.session-song-picker-btn {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.session-song-picker-btn:hover {
  border-color: rgba(255, 122, 48, 0.35);
  background: rgba(255, 122, 48, 0.08);
}

.session-song-picker-empty {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  color: var(--mid-grey);
}

.focus-pill--none {
  color: var(--mid-grey);
}

.focus-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: var(--space-2xs) var(--space-xs);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.15;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--light-grey);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.focus-pill-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.focus-pill:has(.focus-pill-input:checked) {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
  box-shadow: var(--shadow-orange);
}

.focus-pill:has(.focus-pill-input:focus-visible) {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.tracker-notes-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
}

.tracker-notes-details summary {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--light-grey);
  cursor: pointer;
  list-style: none;
}

.tracker-notes-details summary::-webkit-details-marker {
  display: none;
}

.tracker-notes-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.tracker-notes-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.tracker-reflection-details summary .field-optional {
  font-weight: 500;
}

.tracker-reflection-fields .form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-grey);
}

.tracker-reflection-fields .form-field textarea {
  min-height: 4.5rem;
}

.focus-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.focus-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border);
}

.focus-breakdown-item:last-child {
  border-bottom: none;
}

.focus-breakdown-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--light-grey);
}

.focus-breakdown-value {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.focus-breakdown-empty {
  font-size: 0.8125rem;
  color: var(--muted);
}

.focus-breakdown-empty[hidden] {
  display: none;
}

.focus-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.15rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  background: rgba(245, 130, 32, 0.14);
  color: var(--orange);
}

.journal-date-heading {
  padding: var(--space-xs) 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
}

.journal-day-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.journal-day-group + .journal-day-group {
  margin-top: var(--space-lg);
}

.journal-day-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0 0.15rem;
  margin-bottom: 0.625rem;
}

.journal-day-date {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.022em;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.96);
}

.journal-day-summary {
  padding: 0.95rem 1rem 1rem;
  background:
    linear-gradient(135deg, rgba(245, 130, 32, 0.135), rgba(245, 130, 32, 0.04)),
    var(--surface);
  border: 1px solid rgba(245, 130, 32, 0.24);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-sm),
    0 6px 22px rgba(245, 130, 32, 0.09),
    0 0 0 1px rgba(245, 130, 32, 0.05),
    inset 0 1px 0 rgba(255, 180, 110, 0.07);
}

.journal-day-metrics {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}

.journal-day-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.15rem 0.35rem;
  text-align: center;
}

.journal-day-metric-value {
  font-size: 1.1875rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.98);
}

.journal-day-metric-label {
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.journal-day-metric-divider {
  width: 1px;
  align-self: stretch;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.07);
}

.journal-day-reflection {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.journal-day-reflection-headline {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.journal-day-reflection-icon-wrap {
  display: inline-flex;
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.1rem;
  color: var(--orange);
}

.journal-day-reflection-icon-wrap .dashboard-inline-icon {
  width: 100%;
  height: 100%;
}

.journal-day-reflection-detail {
  margin: 0.3rem 0 0;
  padding-left: 1.3rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
}

.tracker-journal--history {
  padding-top: 0.15rem;
}

.tracker-journal--history .journal-list {
  gap: var(--space-sm);
}

.journal-history-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.journal-history-filter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.journal-history-filter-picker {
  position: relative;
}

.journal-history-filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.journal-history-filter-button-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.journal-history-filter-button::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: var(--space-sm);
  border-right: 2px solid var(--light-grey);
  border-bottom: 2px solid var(--light-grey);
  transform: rotate(45deg) translateY(-0.1rem);
  flex-shrink: 0;
}

.journal-history-filter-button[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-0.05rem);
}

.journal-history-filter-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.journal-history-filter-panel {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: min(22rem, 70vh);
  padding: var(--space-2xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.journal-history-filter-panel[hidden] {
  display: none;
}

.journal-history-filter-search {
  width: 100%;
  min-height: 2.5rem;
  margin: var(--space-2xs);
  margin-bottom: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-sm) - 2px);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
}

.journal-history-filter-search[hidden] {
  display: none;
}

.journal-history-filter-search:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.journal-history-filter-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-height: 16.5rem;
  padding: var(--space-2xs);
}

.journal-history-filter-group-label {
  margin: 0.45rem 0.5rem 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.journal-history-filter-option {
  display: block;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}

.journal-history-filter-option:hover,
.journal-history-filter-option.is-active {
  background: var(--orange-soft);
}

.journal-history-filter-option[aria-selected="true"] {
  color: var(--orange);
}

.journal-history-filter-option:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.journal-history-filter-summary-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--white);
  overflow-wrap: anywhere;
}

.journal-history-filter-summary-meta {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--light-grey);
}

.journal-history-filter-clear {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--orange);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.journal-history-filter-clear:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.journal-history-filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.journal-history-filter-empty[hidden] {
  display: none;
}

.journal-history-filter-empty-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  overflow-wrap: anywhere;
}

.journal-history-filter-empty-copy {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--light-grey);
}

.journal-history-more {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.journal-history-more-status {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--light-grey);
}

.journal-history-more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.journal-history-more-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.journal-card-context {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--light-grey);
  margin-bottom: var(--space-sm);
}

.dashboard-recent-context {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.1rem;
}

.tracker-focus {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.journal-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.journal-card--long {
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow:
    var(--shadow-sm),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.journal-card--long .journal-card-summary {
  padding-top: calc(var(--space-md) + 0.1rem);
  padding-bottom: 0.35rem;
}

.journal-card--long .journal-card-summary-title {
  font-size: 1.02rem;
}

.journal-card--compact {
  border-color: rgba(255, 255, 255, 0.06);
}

.journal-card--compact .journal-card-summary {
  padding-top: 0.7rem;
  padding-bottom: 0.35rem;
}

.journal-card--compact .journal-card-summary-title {
  font-size: 0.875rem;
}

.journal-card--compact > .journal-timeline-chips {
  margin-top: 0.05rem;
}

.journal-card.is-highlighted {
  animation: journal-card-highlight 1.35s ease-out;
}

.journal-card.is-removing {
  opacity: 0;
  transform: translateY(-4px) scale(0.99);
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    max-height 0.32s ease,
    margin 0.32s ease;
}

.journal-day-group.is-removing {
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    max-height 0.32s ease,
    margin 0.32s ease;
}

@keyframes journal-card-highlight {
  0% {
    box-shadow:
      0 0 0 0 rgba(245, 130, 32, 0.45),
      var(--shadow-sm);
    border-color: rgba(245, 130, 32, 0.45);
  }

  35% {
    box-shadow:
      0 0 0 3px rgba(245, 130, 32, 0.18),
      0 10px 28px rgba(0, 0, 0, 0.2);
    border-color: rgba(245, 130, 32, 0.35);
  }

  100% {
    box-shadow: var(--shadow-sm);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.journal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--muted);
  padding: var(--space-xl) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.journal-empty[hidden] {
  display: none;
}

.journal-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: rgba(245, 130, 32, 0.1);
  color: var(--orange);
}

.journal-empty-icon .dashboard-inline-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.journal-empty-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.journal-empty-copy {
  margin: 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--light-grey);
}

.journal-empty-cta {
  width: auto;
  min-width: 11rem;
  margin-top: var(--space-xs);
}

.journal-card {
  --journal-card-summary-padding-inline-start: calc(var(--space-md) + 4px);
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease;
}

.journal-card.is-expanded {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .journal-card:not(.is-expanded):not(.is-editing):hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.22),
      0 2px 8px rgba(0, 0, 0, 0.12);
  }
}

.journal-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 55%, var(--orange-dim) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  pointer-events: none;
  opacity: 0.45;
  transition: background 150ms ease, opacity 150ms ease;
}

.journal-card-accent--title {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  flex-shrink: 0;
  align-self: stretch;
  width: 3px;
  min-height: 1.05em;
  margin-top: 0.12em;
  margin-bottom: 0.1em;
  border-radius: 2px;
  opacity: 0.5;
}

.journal-card.is-expanded[data-stage="practice"] .journal-card-accent--title {
  background: linear-gradient(180deg, rgba(255, 180, 110, 0.85) 0%, var(--orange) 55%, var(--orange-dim) 100%);
  opacity: 0.62;
}

.journal-card.is-expanded[data-stage="playthrough"] .journal-card-accent--title {
  background: linear-gradient(180deg, rgba(142, 197, 240, 0.85) 0%, #5b9bd5 55%, #3d7eb0 100%);
  opacity: 0.62;
}

.journal-card.is-expanded[data-stage="perform"] .journal-card-accent--title {
  background: linear-gradient(180deg, rgba(159, 221, 159, 0.85) 0%, #5cb85c 55%, #3f9a3f 100%);
  opacity: 0.62;
}

.journal-card-title-block {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}

.journal-card-title-block .journal-card-summary-title,
.journal-card-title-block .journal-card-details-title {
  flex: 1;
  min-width: 0;
}

.journal-card-summary {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  padding: var(--space-sm) 2.25rem 0.35rem var(--journal-card-summary-padding-inline-start);
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.journal-card-summary:hover {
  background: rgba(255, 255, 255, 0.028);
}

.journal-card-summary:active {
  background: rgba(255, 255, 255, 0.04);
}

.journal-card-summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.journal-card.is-expanded .journal-card-summary {
  display: none;
}

.journal-card-summary-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.journal-card-summary-title {
  display: block;
  font-size: 0.96875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.018em;
  color: rgba(255, 255, 255, 0.96);
}

.journal-card-details-intro .journal-card-summary-title {
  font-size: 1.125rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.024em;
  color: rgba(255, 255, 255, 0.98);
}

.journal-card-summary-meta-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.52);
}

.journal-card-summary-meta {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.journal-card-summary-duration {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.journal-card-summary-meta-sep {
  font-weight: 500;
  color: var(--muted);
}

.journal-card-summary-time {
  font-weight: 500;
  color: var(--muted);
}

.journal-card > .journal-timeline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.1rem;
  padding: 0 2.25rem var(--space-sm) var(--journal-card-summary-padding-inline-start);
}

.journal-card.is-expanded > .journal-timeline-chips {
  display: none;
}

.journal-timeline-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.58rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--light-grey);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  user-select: none;
}

.journal-timeline-chip--song {
  color: rgba(255, 196, 150, 0.92);
  background: rgba(245, 130, 32, 0.11);
  border-color: rgba(245, 130, 32, 0.2);
}

.journal-timeline-chip--skill {
  color: rgba(158, 196, 230, 0.92);
  background: rgba(72, 130, 190, 0.11);
  border-color: rgba(72, 130, 190, 0.2);
}

.journal-timeline-chip--milestone {
  color: rgba(255, 196, 150, 0.92);
  background: rgba(255, 122, 48, 0.11);
  border-color: rgba(255, 122, 48, 0.22);
}

.journal-timeline-chip--warm-up {
  color: rgba(154, 210, 175, 0.92);
  background: rgba(72, 155, 108, 0.11);
  border-color: rgba(72, 155, 108, 0.2);
}

.journal-timeline-chip--lesson {
  color: rgba(194, 176, 228, 0.92);
  background: rgba(120, 92, 175, 0.11);
  border-color: rgba(120, 92, 175, 0.2);
}

.journal-timeline-chip--practice {
  color: #b0b0b0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.journal-timeline-chip--linkable {
  pointer-events: auto;
  cursor: pointer;
  gap: 0.3rem;
  padding-right: 0.45rem;
  font-family: inherit;
  transition:
    background 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.journal-timeline-chip--linkable:hover {
  background: rgba(72, 130, 190, 0.16);
  border-color: rgba(72, 130, 190, 0.32);
  color: rgba(196, 224, 248, 0.96);
}

.journal-timeline-chip--linkable:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.journal-timeline-chip--linkable:active {
  transform: scale(0.98);
}

.journal-timeline-chip-label {
  min-width: 0;
}

.journal-timeline-chip-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  opacity: 0.72;
}

.journal-card-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--light-grey);
}

.journal-card-chevron {
  position: absolute;
  top: 1.05rem;
  right: var(--space-md);
  z-index: 1;
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-card:hover .journal-card-chevron {
  border-color: var(--light-grey);
}

.journal-card.is-expanded .journal-card-chevron {
  top: 1.15rem;
  transform: rotate(225deg);
  border-color: var(--light-grey);
}

.journal-card-view,
.journal-card-edit {
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-card-edit {
  padding: 0 var(--space-md) var(--space-md) calc(var(--space-md) + var(--space-sm) + 2px);
}

.journal-card-edit-title {
  margin: 0 0 var(--space-sm);
}

.journal-card-edit .tracker-form--progressive {
  gap: var(--space-md);
}

.journal-card.is-editing .journal-card-summary,
.journal-card.is-editing .journal-card-chevron,
.journal-card.is-editing .journal-card-menu {
  display: none;
}

.journal-card.is-editing .journal-card-view {
  display: none;
}

.journal-card.is-editing .journal-card-edit {
  display: block;
}

.journal-card.is-editing .journal-card-details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.journal-card-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-card.is-expanded .journal-card-details {
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.journal-card-details-inner {
  overflow: hidden;
  min-height: 0;
}

.journal-card-details-sections {
  --journal-panel-radius: 20px;
  --journal-panel-pad-x: 1.05rem;
  --journal-panel-pad-y: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0 calc(var(--space-md) + 4px) var(--space-sm);
}

.journal-card.is-expanded .journal-card-details-sections {
  padding-left: calc(var(--space-md) + 4px);
  padding-right: var(--space-md);
}

.journal-card-details-sections .journal-card-section:first-child {
  margin-top: 0;
}

.journal-card-details-category {
  font-weight: 500;
  color: var(--muted);
}

.journal-card-details-title {
  margin: 0;
}

.journal-card-details-meta-line {
  margin: 0;
}

.journal-card-details-duration {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.journal-card-duration-value {
  margin: 0;
}

.journal-card-duration-note {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.journal-card-details-head {
  position: relative;
  padding: var(--space-sm) var(--space-md) 0 calc(var(--space-md) + 4px);
}

.journal-card.is-expanded .journal-card-details-head {
  padding-left: calc(var(--space-md) + 4px);
  padding-right: calc(var(--space-md) + 4.5rem);
}

.journal-card-menu {
  position: absolute;
  top: var(--space-sm);
  right: calc(var(--space-md) + 1.85rem);
  z-index: 2;
}

.journal-card-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.journal-card-menu-trigger:hover,
.journal-card-menu-trigger[aria-expanded="true"] {
  color: var(--light-grey);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.journal-card-menu-panel {
  position: absolute;
  top: calc(100% + var(--space-2xs));
  right: 0;
  min-width: 11.5rem;
  padding: var(--space-2xs);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

.journal-card-menu-panel[hidden] {
  display: none;
}

.journal-card-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--light-grey);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.journal-card-menu-item-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
}

.journal-card-menu-item-svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.journal-card-menu-item-label {
  line-height: 1.25;
}

.journal-card-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.journal-card-menu-item--danger {
  color: #e57373;
}

.journal-card-menu-item--danger .journal-card-menu-item-icon {
  color: rgba(229, 115, 115, 0.85);
}

.journal-card-menu-item--danger:hover {
  background: rgba(229, 115, 115, 0.1);
  color: #ff8a80;
}

.journal-card-collapse-hit {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.journal-card-collapse-hit:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.journal-card-details-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
  width: 100%;
}

.journal-card-details-divider {
  height: 1px;
  margin: 0.1rem var(--space-md) 0.15rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.065) 16%,
    rgba(255, 255, 255, 0.065) 84%,
    transparent 100%
  );
}

.journal-card.is-expanded .journal-card-details-divider {
  margin-left: calc(var(--space-md) + 4px);
  margin-right: var(--space-md);
}

.journal-card-details-kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--muted);
}

.journal-card-details-meta .journal-card-details-duration,
.journal-card-details-meta .journal-card-details-time {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  letter-spacing: inherit;
  color: rgba(255, 255, 255, 0.78);
}

.journal-card-details-meta .journal-card-details-time {
  font-weight: 500;
  color: var(--muted);
}

.journal-card-details-time {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.journal-card-meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.journal-card-meta-detail {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: #b8b8b8;
}

.journal-card-section {
  position: relative;
  padding: 0;
  margin: 0;
  border-top: none;
}

.journal-card-section + .journal-card-section::before {
  display: none;
}

.journal-card.is-expanded .journal-card-section {
  padding-left: 0;
}

.journal-card-section:empty {
  display: none;
}

.journal-card-panel {
  padding: var(--journal-panel-pad-y) var(--journal-panel-pad-x);
  border-radius: var(--journal-panel-radius);
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid rgba(255, 255, 255, 0.038);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.journal-card-section--songs .journal-card-panel {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.048);
}

.journal-card-section--skills .journal-card-panel {
  background: rgba(255, 255, 255, 0.034);
  border-color: rgba(255, 255, 255, 0.042);
}

.journal-card-section--milestones .journal-card-panel {
  background: rgba(245, 130, 32, 0.04);
  border-color: rgba(245, 130, 32, 0.1);
}

.journal-card-section--warm-up .journal-card-panel,
.journal-card-section--notes .journal-card-panel,
.journal-card-section--metronome .journal-card-panel,
.journal-card-section--time-breakdown .journal-card-panel {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.032);
  box-shadow: none;
}

.journal-card-panel--reflection {
  position: relative;
  overflow: hidden;
  padding: calc(var(--journal-panel-pad-y) + 0.1rem) var(--journal-panel-pad-x);
  background: linear-gradient(
    152deg,
    rgba(245, 130, 32, 0.1) 0%,
    rgba(255, 255, 255, 0.032) 52%,
    rgba(255, 255, 255, 0.022) 100%
  );
  border-color: rgba(245, 130, 32, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 140, 0.06),
    0 1px 12px rgba(245, 130, 32, 0.04);
}

.journal-card-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.journal-card-section-icon-wrap {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0.52;
  color: rgba(255, 255, 255, 0.7);
}

.journal-card-section-icon {
  width: 1.0625rem;
  height: 1.0625rem;
}

.journal-card-section-label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.92);
}

.journal-card-section--reflection .journal-card-section-label {
  font-size: 1rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.97);
}

.journal-card-section--reflection .journal-card-section-icon-wrap {
  opacity: 0.58;
  color: rgba(255, 196, 150, 0.88);
}

.journal-card-section--songs .journal-card-section-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.journal-card-section--songs .journal-card-section-icon-wrap,
.journal-card-section--skills .journal-card-section-icon-wrap,
.journal-card-section--warm-up .journal-card-section-icon-wrap,
.journal-card-section--notes .journal-card-section-icon-wrap,
.journal-card-section--metronome .journal-card-section-icon-wrap,
.journal-card-section--time-breakdown .journal-card-section-icon-wrap {
  opacity: 0.52;
  color: rgba(255, 255, 255, 0.7);
}

.journal-card-section--skills .journal-card-section-label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.journal-card-section--milestones .journal-card-section-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 196, 150, 0.94);
}

.journal-card-section--milestones .journal-card-section-icon-wrap {
  opacity: 0.58;
  color: rgba(255, 196, 150, 0.88);
}

.journal-card-section--warm-up .journal-card-section-label,
.journal-card-section--notes .journal-card-section-label,
.journal-card-section--metronome .journal-card-section-label,
.journal-card-section--time-breakdown .journal-card-section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.journal-card-section-body:empty {
  display: none;
}

.journal-card-inline-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.8);
}

.journal-card-text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 450;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.84);
}

.journal-card-text--notes {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.74;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.82);
}

.journal-card-section--songs .journal-card-song-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.journal-card-section--songs .journal-card-stage-pill {
  margin-top: 0.35rem;
}

.journal-card-content-block {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.journal-card-section-body > .journal-card-content-block + .journal-card-content-block {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.journal-card-reflection-journal {
  position: relative;
}

.journal-card-reflection-entries {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.journal-card-reflection-entry {
  margin: 0;
}

.journal-card-reflection-entry + .journal-card-reflection-entry {
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(245, 130, 32, 0.08);
}

.journal-card-reflection-question {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.46);
}

.journal-card-reflection-answer {
  margin: 0;
  font-size: 0.96875rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.76;
  color: rgba(255, 232, 205, 0.96);
}

.journal-card-reflection-quote {
  position: absolute;
  top: -0.15rem;
  right: 0;
  display: inline-flex;
  color: rgba(245, 130, 32, 0.22);
  pointer-events: none;
}

.journal-card-reflection-quote-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.journal-card-song-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
}

.journal-card-song-block > .journal-skill-entry-row {
  align-self: stretch;
  width: 100%;
}

.journal-card-song-name {
  margin: 0;
}

.journal-card-stage-pill {
  min-height: 1.625rem;
  padding: 0.1875rem 0.55rem 0.1875rem 0.4375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.journal-card-stage-pill .dashboard-focus-stage-dot {
  width: 0.4375rem;
  height: 0.4375rem;
}

.journal-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.journal-skill-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.journal-skill-entry {
  list-style: none;
  padding: 0 0 0 0.65rem;
  border: none;
  border-radius: 0;
  background: transparent;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.journal-skill-entry-level {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.journal-skill-entry-skill {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.8);
}

.journal-skill-entry-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.journal-skill-entry-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.journal-skill-entry-row .journal-skill-entry-skill {
  flex: 1 1 auto;
  min-width: 0;
}

.journal-skill-entry-row .bga-skill-resource-action {
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

.journal-skill-entry--plain {
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.8);
  padding-left: 0;
  border-left: none;
}

.journal-skill-list-item {
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.journal-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.journal-skill-chip-mark {
  color: var(--orange);
  font-size: 0.6875rem;
  line-height: 1;
}

@keyframes journal-section-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.journal-card.is-expanded .journal-card-section {
  animation: journal-section-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.journal-card.is-expanded .journal-card-section:nth-child(1) {
  animation-delay: 0.03s;
}

.journal-card.is-expanded .journal-card-section:nth-child(2) {
  animation-delay: 0.06s;
}

.journal-card.is-expanded .journal-card-section:nth-child(3) {
  animation-delay: 0.09s;
}

.journal-card.is-expanded .journal-card-section:nth-child(4) {
  animation-delay: 0.12s;
}

.journal-card.is-expanded .journal-card-section:nth-child(5) {
  animation-delay: 0.15s;
}

.journal-card.is-expanded .journal-card-section:nth-child(6) {
  animation-delay: 0.18s;
}

.journal-card-actions-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md) var(--space-md) calc(var(--space-md) + 4px);
  margin-top: var(--space-sm);
  border-top: none;
}

.journal-card-inline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.journal-card-inline-row .journal-card-inline-text {
  min-width: 0;
  flex: 1 1 auto;
}

.journal-time-breakdown-mins {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

.journal-skill-entry-row .journal-time-breakdown-mins {
  align-self: center;
}

.journal-time-breakdown-readonly,
.journal-time-breakdown-editor {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.journal-time-breakdown-group-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.journal-time-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.journal-time-breakdown-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.journal-time-breakdown-item-label {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
}

.journal-time-breakdown-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.journal-time-breakdown-summary-primary {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.journal-time-breakdown-summary-secondary,
.journal-time-breakdown-summary-error,
.journal-time-breakdown-over-warning {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.journal-time-breakdown-summary.is-exact {
  border-color: rgba(72, 187, 120, 0.28);
  background: rgba(72, 187, 120, 0.08);
}

.journal-time-breakdown-summary.is-exact .journal-time-breakdown-summary-secondary {
  color: rgba(134, 239, 172, 0.9);
}

.journal-time-breakdown-summary.is-over {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.journal-time-breakdown-summary.is-over .journal-time-breakdown-summary-secondary,
.journal-time-breakdown-summary-error,
.journal-time-breakdown-over-warning {
  color: rgba(252, 165, 165, 0.95);
}

.journal-time-breakdown-add-btn,
.journal-time-breakdown-edit-btn {
  align-self: flex-start;
  min-height: var(--touch-min);
}

.journal-time-breakdown-editor-rows {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.journal-time-breakdown-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.85rem;
  gap: 0.65rem 0.85rem;
  align-items: center;
  min-width: 0;
}

.journal-time-breakdown-editor-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.journal-time-breakdown-editor-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

.journal-time-breakdown-editor-context {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.journal-time-breakdown-editor-input-wrap {
  display: grid;
  grid-template-columns: 4.25rem 1.35rem;
  align-items: center;
  justify-items: stretch;
  column-gap: 0.4rem;
  width: 5.85rem;
  flex: 0 0 5.85rem;
}

.journal-time-breakdown-minutes-input {
  width: 4.25rem;
  min-width: 4.25rem;
  max-width: 4.25rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.journal-time-breakdown-minutes-input:focus-visible {
  outline: 2px solid rgba(245, 130, 32, 0.7);
  outline-offset: 2px;
}

.journal-time-breakdown-min-suffix {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  text-align: left;
  line-height: 1;
}

.journal-time-breakdown-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  align-items: stretch;
}

.journal-time-breakdown-editor-actions .btn {
  width: auto;
  flex: 1 1 10rem;
  margin-top: 0;
  appearance: none;
  -webkit-appearance: none;
}

.journal-time-breakdown-editor-actions .btn-primary:disabled,
.journal-time-breakdown-editor-actions .btn-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.journal-time-breakdown-form-field {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
  min-width: 0;
}

.journal-time-breakdown-form-label {
  margin-bottom: 0.25rem;
}

.journal-time-breakdown-form-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 640px) {
  .journal-time-breakdown-editor-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .journal-time-breakdown-editor-input-wrap {
    justify-content: start;
    justify-items: start;
    width: auto;
    flex: 0 0 auto;
  }

  .journal-card-inline-row,
  .journal-time-breakdown-item,
  .journal-skill-entry-row {
    flex-wrap: wrap;
  }

  .journal-time-breakdown-editor-actions {
    flex-direction: column;
  }

  .journal-time-breakdown-editor-actions .btn {
    width: 100%;
    flex: 1 1 auto;
  }
}

.journal-card-actions-row::before {
  display: none;
}

.journal-card.is-expanded .journal-card-actions-row {
  padding-left: calc(var(--space-md) + 4px);
}

.journal-card-action {
  width: 100%;
  margin-top: 0;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.journal-card-action--share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(
    145deg,
    rgba(245, 130, 32, 0.96) 0%,
    rgba(214, 102, 18, 0.96) 100%
  );
  border: 1px solid rgba(255, 188, 120, 0.22);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.journal-card-action--share:hover {
  color: #fff;
  background: linear-gradient(
    145deg,
    rgba(255, 145, 48, 0.98) 0%,
    rgba(230, 112, 24, 0.98) 100%
  );
  border-color: rgba(255, 200, 140, 0.38);
  box-shadow:
    0 2px 8px rgba(245, 130, 32, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.journal-card-action--share:active {
  transform: translateY(0) scale(0.985);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.journal-card-action--share:focus-visible {
  outline: 2px solid rgba(255, 180, 110, 0.85);
  outline-offset: 2px;
}

.journal-card-action-icon {
  width: 0.9375rem;
  height: 0.9375rem;
  flex-shrink: 0;
}

.journal-card-action-label {
  line-height: 1.2;
}

.journal-card-actions-row .btn-secondary {
  color: var(--white);
  background: var(--surface-raised);
  border-color: var(--border-strong);
  border-radius: var(--radius-pill);
}

.journal-card-actions-row .btn-secondary:hover {
  color: var(--orange);
  border-color: rgba(245, 130, 32, 0.45);
  background: rgba(245, 130, 32, 0.08);
  transform: translateY(-1px);
}

.journal-card-actions-row .btn-secondary:active {
  transform: translateY(0) scale(0.985);
}

.journal-card-actions-row .btn-secondary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .journal-card-view,
  .journal-card-edit {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journal-card-details,
  .journal-card-summary,
  .journal-card-chevron {
    transition: none;
  }

  .journal-card.is-expanded .journal-card-section {
    animation: none;
  }

  .journal-card.is-removing,
  .journal-day-group.is-removing {
    transition: none;
  }

  .journal-card.is-highlighted {
    animation: none;
    border-color: rgba(245, 130, 32, 0.35);
  }
}

/* ── Practice Journal ── */
.practice-journal {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.practice-journal-intro {
  padding: var(--space-md);
}

.practice-journal-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

.practice-journal-subtitle {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--light-grey);
}

.practice-journal-form {
  padding: var(--space-md);
}

.practice-journal-form--highlight {
  box-shadow: 0 0 0 1px rgba(245, 130, 32, 0.45), 0 0 24px rgba(245, 130, 32, 0.12);
}

.practice-journal-session-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.practice-journal-song-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.practice-journal-song-status {
  margin-top: var(--space-sm);
}

.practice-journal-segmented {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-top: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.practice-journal-segmented::-webkit-scrollbar {
  display: none;
}

.practice-journal-segment-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(245, 130, 32, 0.72), var(--orange));
  box-shadow: 0 0 12px rgba(245, 130, 32, 0.32);
  pointer-events: none;
  z-index: 1;
  transition:
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
    width 200ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, width;
}

.practice-journal-segment-indicator.is-instant {
  transition: none;
}

.practice-journal-segment {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.practice-journal-segment-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.practice-journal-segment-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.35rem 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.46);
  background: transparent;
  border-radius: 0;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 480px) {
  .practice-journal-segment-text {
    padding: 0.35rem 0.5rem 0.6rem;
    font-size: 0.8125rem;
  }
}

.practice-journal-segment:hover .practice-journal-segment-input:not(:checked) + .practice-journal-segment-text {
  color: rgba(255, 255, 255, 0.68);
}

.practice-journal-segment-input:checked + .practice-journal-segment-text {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 650;
}

.practice-journal-segment-input:focus-visible + .practice-journal-segment-text {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .practice-journal-segment-indicator,
  .practice-journal-segment-text,
  .tracker-workspace-panel--enter,
  #tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .section-label,
  #tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-session-status,
  #tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-display-wrap,
  #tracker-workspace-practice.tracker-workspace-panel--enter .tracker-timer .timer-controls,
  #tracker-workspace-practice.tracker-workspace-panel--enter .tracker-manual {
    transition: none;
    animation: none;
  }
}

.practice-journal-saved .section-label {
  margin-bottom: var(--space-sm);
}

.practice-journal-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.practice-journal-empty {
  margin: 0;
  padding: var(--space-md);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.practice-journal-empty[hidden] {
  display: none;
}

.practice-journal-entry {
  padding: var(--space-sm) var(--space-md);
}

.practice-journal-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.practice-journal-entry-headline {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
  letter-spacing: -0.01em;
}

.practice-journal-entry-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

.practice-journal-entry-actions .btn {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

.practice-journal-entry-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-md);
}

.practice-journal-entry-block {
  min-width: 0;
}

.practice-journal-entry-block--notes {
  grid-column: 1 / -1;
}

.practice-journal-entry-label {
  margin: 0 0 0.15rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.practice-journal-entry-value {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--light-grey);
}

.practice-journal-entry-notes {
  white-space: pre-wrap;
}

@media (max-width: 420px) {
  .practice-journal-entry-body {
    grid-template-columns: 1fr;
  }
}

.btn-text {
  min-height: var(--touch-min);
  padding: 0 var(--space-sm);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--orange);
  transition: background var(--transition), border-color var(--transition);
}

.btn-text:hover {
  background: var(--orange-soft);
  border-color: rgba(245, 130, 32, 0.28);
}

.btn-text:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.btn-delete {
  color: var(--light-grey);
}

.btn-delete:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.25);
}

.btn-icon-delete {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-icon-delete:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.btn-icon-delete:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── Setlist ── */
.setlist {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.setlist-philosophy {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(245, 130, 32, 0.08), transparent 70%),
    var(--surface);
}

.setlist-philosophy-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.philosophy-arrow {
  color: var(--muted);
  font-weight: 400;
}

.stage-name--practice { color: var(--orange); }
.stage-name--playthrough { color: #5b9bd5; }
.stage-name--perform { color: #5cb85c; }

.setlist-philosophy-sub {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--muted);
}

.setlist-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.setlist-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: var(--space-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 76px;
  justify-content: center;
}

.setlist-stat-icon {
  font-size: 1rem;
  line-height: 1;
}

.setlist-stat-value {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1.1;
}

.setlist-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.setlist-distribution {
  margin-bottom: var(--space-md);
}

.setlist-distribution-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--mid-grey);
  margin-bottom: var(--space-sm);
}

.distribution-segment {
  height: 100%;
  width: 0%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.distribution-segment--practice { background: var(--orange); }
.distribution-segment--playthrough { background: #5b9bd5; }
.distribution-segment--perform { background: #5cb85c; }

.setlist-distribution-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--light-grey);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.legend-dot--practice { background: var(--orange); }
.legend-dot--playthrough { background: #5b9bd5; }
.legend-dot--perform { background: #5cb85c; }

.btn-setlist-share {
  width: 100%;
}

.setlist-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setlist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  scrollbar-width: none;
}

.setlist-filters::-webkit-scrollbar {
  display: none;
}

.btn-filter {
  flex: 1 1 auto;
  min-width: fit-content;
  min-height: 40px;
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--light-grey);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn-filter:hover {
  color: var(--white);
}

.btn-filter.active {
  color: var(--black);
  background: var(--orange);
  box-shadow: var(--shadow-orange);
}

.btn-filter:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.setlist-sort select {
  width: 100%;
  min-height: var(--touch-min);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0 var(--space-xl) 0 var(--space-sm);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999999' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  cursor: pointer;
}

.setlist-sort select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.setlist-songs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.setlist-empty {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  padding: var(--space-xl) var(--space-md);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  line-height: 1.55;
}

.setlist-empty[hidden] {
  display: none;
}

/* ── My Songs ── */
.my-songs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.my-songs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
}

.my-songs-empty[hidden] {
  display: none;
}

.my-songs-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: rgba(245, 130, 32, 0.1);
  color: var(--orange);
  line-height: 1;
}

.my-songs-empty-icon .dashboard-inline-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.my-songs-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.my-songs-empty-lead {
  font-size: 0.9375rem;
  color: var(--white);
}

.my-songs-empty-copy {
  font-size: 0.875rem;
  color: var(--light-grey);
  line-height: 1.55;
  max-width: 22rem;
}

.btn-add-song {
  width: 100%;
  max-width: 16rem;
  margin-top: var(--space-xs);
}

.btn-add-song--compact {
  width: auto;
  max-width: none;
  margin-top: 0;
  min-height: 40px;
  padding-inline: var(--space-md);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.my-songs-library[hidden] {
  display: none;
}

.my-songs-library {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.my-songs-toolbar {
  position: sticky;
  top: var(--bga-sticky-header-offset, 0px);
  z-index: 40;
  margin-bottom: var(--space-lg);
  padding-bottom: 0.625rem;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  isolation: isolate;
  transition: box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.my-songs-toolbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.my-songs-toolbar.is-stuck {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.04);
}

.my-songs-toolbar.is-stuck::after {
  opacity: 1;
}

.my-songs-toolbar-sentinel {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.my-songs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 40px;
}

.my-songs-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.my-songs-filters {
  margin-top: var(--space-md);
  width: 100%;
  min-width: 0;
}

.my-songs-filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.my-songs-filter {
  min-width: 0;
  width: 100%;
}

.my-songs-filter .bga-select-value {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.my-songs-filter-clear {
  flex-shrink: 0;
  width: var(--touch-min);
  height: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.my-songs-filter-search {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: var(--touch-min);
  padding: var(--space-sm);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.my-songs-filter-search::placeholder {
  color: var(--muted);
}

.my-songs-filter-search:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.my-songs-filter .bga-select-trigger {
  min-height: var(--touch-min);
  font-size: 0.875rem;
  padding-block: 0.625rem;
}

.my-songs-filter-clear[hidden] {
  display: none;
}

.my-songs-filter-clear:hover {
  color: var(--white);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.my-songs-filter-clear:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.my-songs-filter-empty {
  margin-top: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.my-songs-filter-empty-title {
  margin: 0 0 var(--space-2xs);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.my-songs-filter-empty-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.my-songs-cards {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-xl) + 0.3125rem);
  margin-top: 0;
  min-width: 0;
}

.my-songs-featured {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.my-songs-featured-heading {
  margin: 0;
  padding: 0 0.125rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.my-song-card--featured {
  border-color: rgba(245, 130, 32, 0.28);
  border-left-width: 4px;
  border-left-color: rgba(245, 130, 32, 0.85);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.1),
    0 0 28px rgba(245, 130, 32, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.2);
}

.my-song-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-sm) + 0.125rem);
  padding: calc(var(--space-lg) * 0.9);
  overflow: visible;
  scroll-margin-top: var(--bga-songs-scroll-offset, var(--bga-sticky-header-offset, 8.5rem));
  border: 1px solid var(--border);
  border-left: 3px solid rgba(245, 130, 32, 0.65);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 32px rgba(0, 0, 0, 0.16);
  transition:
    border-color 260ms cubic-bezier(0.16, 1, 0.3, 1),
    border-left-color 260ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.my-song-card--new {
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(255, 255, 255, 0.015),
    0 12px 32px rgba(0, 0, 0, 0.16);
}

.my-song-card--recent:not([data-stage="perform"]) {
  border-color: rgba(245, 130, 32, 0.16);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.07),
    0 0 22px rgba(245, 130, 32, 0.07),
    0 12px 32px rgba(0, 0, 0, 0.16);
}

.my-song-card--recent:not([data-stage="perform"])[data-stage="practice"] {
  border-left-color: rgba(245, 130, 32, 0.82);
}

.my-song-card[data-stage="practice"] {
  border-left-color: rgba(245, 130, 32, 0.75);
}

.my-song-card[data-stage="playthrough"] {
  border-left-color: rgba(132, 148, 168, 0.62);
}

.my-song-card[data-stage="perform"] {
  border-left-color: rgba(92, 184, 92, 0.75);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(92, 184, 92, 0.08),
    0 0 26px rgba(92, 184, 92, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .my-song-card:not(.my-song-card--practising):hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    transition:
      border-color 260ms cubic-bezier(0.16, 1, 0.3, 1),
      border-left-color 260ms cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .my-song-card--recent:not([data-stage="perform"]):hover {
    border-color: rgba(245, 130, 32, 0.22);
    box-shadow:
      var(--shadow-md),
      0 0 24px rgba(245, 130, 32, 0.08);
  }

  .my-song-card[data-stage="practice"]:hover {
    border-left-color: rgba(245, 130, 32, 0.9);
  }

  .my-song-card[data-stage="playthrough"]:hover {
    border-left-color: rgba(156, 172, 192, 0.78);
  }

  .my-song-card[data-stage="perform"]:hover {
    border-left-color: rgba(92, 184, 92, 0.9);
    box-shadow:
      var(--shadow-md),
      0 0 0 1px rgba(92, 184, 92, 0.12),
      0 0 30px rgba(92, 184, 92, 0.14);
  }
}

.my-song-card-layout {
  display: grid;
  grid-template-columns: minmax(8.625rem, 10.375rem) minmax(0, 1fr);
  column-gap: calc(var(--space-md) * 0.85);
  row-gap: 0;
  align-items: start;
}

.my-song-card-top {
  width: 100%;
}

.my-song-card-art-col {
  width: 100%;
}

.my-song-card-art-wrap {
  width: 100%;
}

.my-song-card-art-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--surface-raised);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.2),
    0 2px 5px rgba(0, 0, 0, 0.12);
  transition:
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .my-song-card:hover .my-song-card-art-media {
    transform: scale(1.018);
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.26),
      0 3px 8px rgba(0, 0, 0, 0.14);
  }
}

.my-song-card-art-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 115% 90% at 50% 0%, rgba(0, 0, 0, 0.12), transparent 52%),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.1) 0%,
      transparent 30%,
      transparent 58%,
      rgba(0, 0, 0, 0.22) 100%
    );
}

.my-song-card-art-media .my-song-card-art {
  border: none;
  border-radius: 0;
}

.my-song-card-art {
  display: block;
  width: 100%;
  aspect-ratio: 20 / 17;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.my-song-card-art--placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
  aspect-ratio: 20 / 17;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 95% at 50% -15%, rgba(245, 130, 32, 0.24), transparent 58%),
    radial-gradient(ellipse 70% 55% at 85% 105%, rgba(245, 130, 32, 0.1), transparent 52%),
    linear-gradient(165deg, #1c1814 0%, #141210 45%, #090909 100%);
}

.my-song-card-art-waveform {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 32%;
  padding: 0 12% 10%;
  opacity: 0.42;
  pointer-events: none;
}

.my-song-card-art-waveform span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(245, 130, 32, 0.15), rgba(245, 130, 32, 0.75));
}

.my-song-card-art-waveform span:nth-child(1) { height: 35%; }
.my-song-card-art-waveform span:nth-child(2) { height: 58%; }
.my-song-card-art-waveform span:nth-child(3) { height: 42%; }
.my-song-card-art-waveform span:nth-child(4) { height: 72%; }
.my-song-card-art-waveform span:nth-child(5) { height: 48%; }
.my-song-card-art-waveform span:nth-child(6) { height: 64%; }
.my-song-card-art-waveform span:nth-child(7) { height: 38%; }

.my-song-card-art-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: rgba(245, 130, 32, 0.92);
  background: rgba(245, 130, 32, 0.14);
  border: 1px solid rgba(245, 130, 32, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.my-song-card-art-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.my-song-card-art-glyph {
  display: none;
}

.my-song-card-art-title {
  position: relative;
  z-index: 1;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.my-song-card-art-artist {
  position: relative;
  z-index: 1;
  font-size: 0.625rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-song-card-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding-right: var(--space-xl);
  padding-top: 0.0625rem;
}

.my-song-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.my-song-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  padding-right: var(--space-md);
}

.my-song-card-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0.3125rem 0 0;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.58);
}

.my-song-card-status-copy {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.my-song-card-status-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.my-song-card-status-secondary {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  overflow-wrap: anywhere;
}

.my-song-card-status-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.9375rem;
  height: 0.9375rem;
  margin-top: 0.1rem;
}

.my-song-card-status-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 2.25;
}

.my-song-card-status--perform {
  color: rgba(142, 214, 142, 0.92);
}

.my-song-card-status--playthrough {
  color: rgba(255, 178, 112, 0.92);
}

.my-song-card-status--recent {
  color: rgba(132, 182, 255, 0.9);
}

.my-song-card-status--new,
.my-song-card-status--neutral {
  color: rgba(255, 255, 255, 0.46);
}

.my-song-card-status--active {
  color: rgba(255, 178, 112, 0.88);
}

.my-song-card-artist {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  line-height: 1.35;
}

.my-song-card-level {
  display: inline-flex;
  align-items: center;
  margin-top: 0.3125rem;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
  background: #003c98;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.my-song-card-level--level-1 {
  background: #003c98;
}

.my-song-card-level--level-2 {
  background: #771095;
}

.my-song-card-level--level-3 {
  background: #da001c;
}

.my-song-card-level--level-4 {
  background: #8b4513;
}

.my-song-card-level--level-5 {
  background: #221a11;
  border-color: rgba(255, 255, 255, 0.18);
}

.my-song-card-level--link {
  cursor: pointer;
  transition:
    filter 280ms ease-in-out,
    transform 120ms ease,
    box-shadow 280ms ease-in-out;
}

@media (hover: hover) and (pointer: fine) {
  .my-song-card-level--link:hover {
    filter: brightness(1.1);
  }
}

.my-song-card-level--link:active {
  transform: scale(0.98);
}

.my-song-meta-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0;
  gap: 0;
}

.my-song-meta-item {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: start;
  flex: 0 0 auto;
  gap: 0.1875rem;
  min-height: 2.375rem;
  padding: 0 0.75rem;
  text-align: left;
}

.my-song-meta-item:first-child {
  padding-left: 0;
}

.my-song-meta-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.my-song-meta-label {
  display: block;
  width: 100%;
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.045em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.my-song-meta-value {
  display: block;
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.96);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.012em;
  line-height: 1.25;
  min-height: 1.0625rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-song-meta-value--unset {
  font-size: 0.75rem;
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 0;
}

.my-song-card-meta {
  display: none;
}

.my-song-card-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: calc(var(--space-xs) * 0.9);
}

.my-song-card-skills {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  padding-top: var(--space-2xs);
  border-top: 1px solid var(--border);
}

.my-song-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.my-song-skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--light-grey);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.my-song-card-progress {
  width: 100%;
  margin-top: 0.1875rem;
}

.my-song-progress {
  width: 100%;
}

.my-song-progress-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.3125rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  isolation: isolate;
}

.my-song-progress-pill {
  position: absolute;
  top: 0.3125rem;
  bottom: 0.3125rem;
  left: 0.3125rem;
  width: calc((100% - 0.625rem) / 3);
  border-radius: calc(var(--radius-lg) - 0.3125rem);
  border: 1px solid transparent;
  background: var(--orange);
  box-shadow: var(--shadow-orange);
  transition:
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 320ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 320ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 380ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}

.my-song-progress[data-stage="practice"] .my-song-progress-pill {
  transform: translateX(0);
  background: var(--orange);
  border-color: rgba(255, 180, 110, 0.35);
  box-shadow:
    var(--shadow-orange),
    0 0 24px rgba(245, 130, 32, 0.24);
}

.my-song-progress[data-stage="playthrough"] .my-song-progress-pill {
  transform: translateX(100%);
  background: #2a2a2e;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(120, 140, 165, 0.14);
}

.my-song-progress[data-stage="perform"] .my-song-progress-pill {
  transform: translateX(200%);
  background: linear-gradient(180deg, rgba(88, 168, 88, 0.96) 0%, rgba(72, 148, 72, 0.96) 100%);
  border-color: rgba(130, 210, 130, 0.28);
  box-shadow:
    0 4px 16px rgba(92, 184, 92, 0.24),
    0 0 22px rgba(92, 184, 92, 0.16);
}

.my-song-progress-btn {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 0 var(--space-xs);
  border: 1px solid transparent;
  border-radius: calc(var(--radius-lg) - 0.3125rem);
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.my-song-progress-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  color: rgba(255, 255, 255, 0.78);
}

.my-song-progress-btn:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .my-song-progress-btn:hover {
    transform: scale(1.015);
    color: rgba(255, 255, 255, 0.68);
    filter: brightness(1.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  }

  .my-song-progress-btn:active:hover {
    transform: scale(0.985);
  }
}

.my-song-progress[data-stage="practice"] .my-song-progress-btn--practice,
.my-song-progress[data-stage="playthrough"] .my-song-progress-btn--playthrough,
.my-song-progress[data-stage="perform"] .my-song-progress-btn--perform {
  color: var(--white);
  opacity: 1;
}

.my-song-card--perform-celebrate .my-song-progress-pill {
  animation: my-song-perform-pulse 700ms ease-in-out;
}

.my-song-card--perform-celebrate[data-stage="perform"] {
  animation: my-song-perform-accent 700ms ease-in-out;
}

@keyframes my-song-perform-pulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(92, 184, 92, 0.28);
  }

  45% {
    box-shadow:
      0 4px 22px rgba(92, 184, 92, 0.42),
      0 0 0 1px rgba(140, 220, 140, 0.25);
  }
}

@keyframes my-song-perform-accent {
  0%,
  100% {
    box-shadow:
      var(--shadow-sm),
      0 0 0 1px rgba(255, 255, 255, 0.02),
      0 12px 32px rgba(0, 0, 0, 0.16);
  }

  45% {
    box-shadow:
      var(--shadow-md),
      0 0 0 1px rgba(92, 184, 92, 0.12),
      0 12px 32px rgba(0, 0, 0, 0.16),
      0 0 24px rgba(92, 184, 92, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .my-songs-toolbar {
    transition: none !important;
  }

  .my-songs-toolbar::after {
    transition: none !important;
  }

  .my-song-card,
  .my-song-progress-pill,
  .my-song-progress-btn,
  .my-song-card-level--link,
  .my-song-card-art-media {
    transition: none !important;
  }

  .my-song-card:hover .my-song-card-art-media {
    transform: none !important;
  }

  .my-song-card--perform-celebrate,
  .my-song-card--perform-celebrate .my-song-progress-pill {
    animation: none !important;
  }
}

.my-song-card-stage,
.my-song-stage-toggle {
  display: none;
}

.my-song-card-resources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--space-sm) * 0.9);
  width: 100%;
  margin-top: 0.0625rem;
}

.my-song-resource-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 54px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .my-song-resource-link:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
}

.my-song-resource-link:active {
  transform: scale(0.98);
}

.my-song-resource-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--light-grey);
}

.my-song-resource-link-label {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.my-song-resource-chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--muted);
}

.my-song-action-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.my-song-resource-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.my-song-card-cta {
  width: 100%;
  padding-top: 0.1875rem;
  position: relative;
}

.btn-start-practice {
  width: 100%;
  min-height: 54px;
  margin-top: 0;
  padding: 0.75rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition:
    background-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-resume-practice {
  width: 100%;
  min-height: 54px;
  margin-top: 0;
  padding: 0.75rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition:
    background-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-resume-practice:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-orange), 0 6px 20px rgba(245, 130, 32, 0.22);
  }
}

.my-song-practice-panel.is-paused .my-song-practice-controls {
  grid-template-columns: 1fr auto;
}

.my-song-practice-panel.is-paused .btn-resume-practice {
  flex: 1;
}

@media (hover: hover) and (pointer: fine) {
  .btn-start-practice:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-orange), 0 6px 20px rgba(245, 130, 32, 0.22);
  }
}

.btn-start-practice:active {
  transform: scale(0.98);
}

.btn-start-practice.is-practising {
  justify-content: space-between;
  padding-inline: 1rem;
  background: var(--orange-dim);
  border-color: var(--orange-dim);
  box-shadow: var(--shadow-orange);
}

.btn-start-practice.is-practising:hover {
  transform: none;
  filter: none;
}

.btn-start-practice-label {
  flex: 1;
  text-align: left;
}

.btn-start-practice-elapsed {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.my-song-card--practising {
  border-color: rgba(245, 130, 32, 0.42);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(245, 130, 32, 0.14),
    0 0 22px rgba(245, 130, 32, 0.16),
    0 12px 32px rgba(0, 0, 0, 0.16);
}

.my-song-card--practising[data-stage="practice"] {
  border-left-color: rgba(245, 130, 32, 0.95);
}

.my-song-card--logged {
  border-color: rgba(92, 184, 92, 0.38);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(92, 184, 92, 0.12),
    0 0 20px rgba(92, 184, 92, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.16);
}

.my-song-card--deep-link {
  animation: mySongCardDeepLink 1.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

@keyframes mySongCardDeepLink {
  0% {
    transform: scale(1);
    border-color: rgba(245, 130, 32, 0.38);
    box-shadow:
      var(--shadow-sm),
      0 0 0 1px rgba(245, 130, 32, 0.14),
      0 0 18px rgba(245, 130, 32, 0.16),
      0 12px 32px rgba(0, 0, 0, 0.16);
  }

  22% {
    transform: scale(1.01);
    border-color: rgba(245, 130, 32, 0.62);
    box-shadow:
      var(--shadow-sm),
      0 0 0 1px rgba(245, 130, 32, 0.24),
      0 0 28px rgba(245, 130, 32, 0.24),
      0 12px 32px rgba(0, 0, 0, 0.16);
  }

  100% {
    transform: scale(1);
    border-color: var(--border);
    box-shadow:
      var(--shadow-sm),
      0 0 0 1px rgba(255, 255, 255, 0.02),
      0 12px 32px rgba(0, 0, 0, 0.16);
  }
}

.my-song-practice-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1.125rem 1.25rem 1.25rem;
  border-radius: 1.125rem;
  background:
    linear-gradient(165deg, rgba(245, 130, 32, 0.16) 0%, rgba(245, 130, 32, 0.06) 38%, rgba(255, 255, 255, 0.03) 100%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(245, 130, 32, 0.34);
  box-shadow:
    var(--shadow-orange),
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.my-song-practice-panel.is-entering {
  animation: mySongPracticeEnter 460ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.my-song-practice-panel.is-highlighted {
  animation: mySongPracticePanelHighlight 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mySongPracticePanelHighlight {
  0% {
    box-shadow:
      var(--shadow-orange),
      0 10px 28px rgba(0, 0, 0, 0.22),
      0 0 0 0 rgba(245, 130, 32, 0.35);
  }

  35% {
    box-shadow:
      var(--shadow-orange),
      0 10px 28px rgba(0, 0, 0, 0.22),
      0 0 0 4px rgba(245, 130, 32, 0.18),
      0 0 24px rgba(245, 130, 32, 0.2);
  }

  100% {
    box-shadow:
      var(--shadow-orange),
      0 10px 28px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

@keyframes mySongPracticeEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.my-song-practice-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(245, 130, 32, 0.15) 15%,
    rgba(245, 130, 32, 0.85) 50%,
    rgba(245, 130, 32, 0.15) 85%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: mySongPracticeAccent 3.2s ease-in-out infinite;
}

.my-song-practice-panel.is-paused .my-song-practice-accent {
  animation-play-state: paused;
  opacity: 0.45;
}

@keyframes mySongPracticeAccent {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.my-song-practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.my-song-practice-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  min-width: 0;
}

.my-song-practice-heading-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.my-song-practice-heading-text {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

.my-song-practice-live {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  background: rgba(92, 184, 92, 0.12);
  border: 1px solid rgba(92, 184, 92, 0.28);
}

.my-song-practice-panel.is-paused .my-song-practice-live {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.my-song-practice-live-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #5cb85c;
  box-shadow: 0 0 10px rgba(92, 184, 92, 0.65);
  animation: mySongPracticeLivePulse 1.8s ease-in-out infinite;
}

.my-song-practice-panel.is-paused .my-song-practice-live-dot {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  animation: none;
}

@keyframes mySongPracticeLivePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.88);
  }
}

.my-song-practice-live-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(170, 230, 170, 0.95);
}

.my-song-practice-panel.is-paused .my-song-practice-live-label {
  color: rgba(255, 255, 255, 0.55);
}

.my-song-practice-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0.12) 80%,
    transparent 100%
  );
}

.my-song-practice-timer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.25rem;
}

.my-song-practice-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem;
  font-size: clamp(2rem, 7vw, 2.625rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.my-song-practice-timer.is-minute-tick {
  transform: scale(1.03);
}

.my-song-practice-digit {
  display: inline-block;
  min-width: 0.62em;
  text-align: center;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

.my-song-practice-digit.is-changing {
  animation: mySongPracticeDigitChange 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mySongPracticeDigitChange {
  0% {
    opacity: 0.35;
    transform: translateY(4px) scale(0.92);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.my-song-practice-colon {
  display: inline-block;
  padding-inline: 0.04em;
  animation: mySongPracticeColonPulse 1.4s ease-in-out infinite;
}

.my-song-practice-panel.is-paused .my-song-practice-colon {
  animation-play-state: paused;
  opacity: 0.55;
}

@keyframes mySongPracticeColonPulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.my-song-practice-caption {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.58);
}

.my-song-practice-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.btn-song-practice-pause,
.btn-song-practice-stop {
  width: auto;
  min-height: 46px;
  margin-top: 0;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    filter 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-song-practice-pause:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
  }

  .btn-song-practice-stop:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-orange), 0 8px 22px rgba(245, 130, 32, 0.28);
    filter: brightness(1.04);
  }
}

.btn-song-practice-pause:active,
.btn-song-practice-stop:active {
  transform: scale(0.98);
}

.my-song-practice-btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.my-song-practice-btn-label {
  white-space: nowrap;
}

.my-song-practice-logged {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.125rem;
  background: rgba(24, 24, 24, 0.82);
  backdrop-filter: blur(6px);
  color: rgba(170, 230, 170, 0.98);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.my-song-practice-logged.is-visible {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .my-song-card--practising,
  .my-song-card--deep-link,
  .my-song-practice-panel,
  .my-song-practice-timer,
  .my-song-practice-digit,
  .practice-session-indicator,
  .timer-save-panel--highlight,
  .tracker-timer--highlight {
    transition: none !important;
    animation: none !important;
  }

  .my-song-practice-panel.is-entering,
  .my-song-practice-panel.is-highlighted {
    animation: none !important;
  }

  .my-song-practice-panel.is-entering {
    opacity: 1;
    transform: none;
  }

  .my-song-practice-digit.is-changing {
    animation: none;
  }

  .my-song-practice-logged {
    transition: none;
  }

  .my-song-card--deep-link {
    border-color: rgba(245, 130, 32, 0.55);
    box-shadow:
      var(--shadow-sm),
      0 0 0 2px rgba(245, 130, 32, 0.22);
  }
}

.my-song-card-footer,
.my-song-resource-btn {
  display: none;
}

.btn-start-practice-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .my-song-resource-link,
  .btn-start-practice,
  .btn-song-practice-pause,
  .btn-song-practice-stop {
    transition: none !important;
  }

  .my-song-resource-link:hover,
  .btn-start-practice:hover,
  .btn-song-practice-pause:hover,
  .btn-song-practice-stop:hover {
    transform: none !important;
  }
}

.my-song-card-menu {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
}

.my-song-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.my-song-menu-trigger:hover,
.my-song-menu-trigger[aria-expanded="true"] {
  color: var(--light-grey);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.my-song-menu-panel {
  position: absolute;
  top: calc(100% + var(--space-2xs));
  right: 0;
  min-width: 9.5rem;
  padding: var(--space-2xs);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

.my-song-menu-panel[hidden] {
  display: none;
}

.my-song-menu-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--light-grey);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.my-song-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.my-song-menu-item--danger {
  color: #e57373;
}

.my-song-menu-item--danger:hover {
  background: rgba(229, 115, 115, 0.1);
  color: #ff8a80;
}

.btn-song-remove {
  display: none;
}

@media (max-width: 420px) {
  .my-song-card-layout {
    grid-template-columns: minmax(6.75rem, 7.75rem) minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .my-song-card {
    padding: calc(var(--space-md) * 0.9);
    gap: calc(var(--space-sm) * 0.9);
  }

  .my-song-card-content {
    padding-right: var(--space-lg);
  }

  .my-song-card-title {
    font-size: 1rem;
  }

  .my-song-progress-btn {
    min-height: 46px;
  }

  .my-song-card-resources {
    grid-template-columns: 1fr;
  }
}

.my-songs-dialog {
  width: min(100% - 2rem, 420px);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.my-songs-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.my-songs-dialog-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2rem);
  min-height: 0;
  margin: 0;
  gap: 0;
}

.my-songs-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--space-md) var(--space-md);
}

.my-songs-dialog-body > .form-field,
.my-songs-dialog-body > .form-row {
  margin: 0;
}

.my-songs-dialog-body .form-field {
  gap: 0.5625rem;
}

.my-songs-dialog-body .form-row .form-field {
  gap: 0.5625rem;
}

.my-songs-dialog-body .form-field:has(.song-picker) {
  margin-bottom: 0.125rem;
}

.my-songs-dialog-body .form-field--song-stage {
  margin-bottom: 0.125rem;
}

.my-songs-dialog-resources {
  gap: 0;
  margin-bottom: 0.125rem;
}

.my-songs-resources-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.375rem 0;
  margin: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--light-grey);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

.my-songs-resources-toggle:hover {
  color: var(--white);
}

.my-songs-resources-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.my-songs-resources-toggle-chevron {
  flex-shrink: 0;
  width: 0.4375rem;
  height: 0.4375rem;
  margin-right: 0.125rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.my-songs-resources-toggle.is-expanded .my-songs-resources-toggle-chevron {
  transform: rotate(225deg);
  border-color: var(--light-grey);
}

.my-songs-resources-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.375rem 0 0.125rem;
  animation: sessionDisclosureIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.my-songs-resources-panel[hidden] {
  display: none !important;
}

.my-songs-resources-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

.my-songs-resources-panel .form-field {
  gap: 0.5rem;
}

.my-songs-resources-panel .form-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.my-songs-dialog-body .form-field--song-artwork {
  padding-bottom: var(--space-xs);
}

.my-songs-dialog-footer {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-md) var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface);
}

.my-songs-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: var(--space-md) var(--space-md) 0;
  margin-bottom: var(--space-sm);
}

.my-songs-dialog-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.my-songs-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: 0;
}

.my-songs-dialog-actions .btn-primary {
  margin-top: 0;
}

.my-songs-dialog-actions .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.my-songs-artwork {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding-bottom: var(--space-2xs);
}

.my-songs-artwork-preview {
  width: 9.375rem;
  height: 9.375rem;
  max-width: 9.375rem;
  margin-inline: auto;
  margin-bottom: 0.875rem;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.my-songs-artwork-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-songs-artwork-preview .my-song-card-art--placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
}

.my-songs-artwork-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: auto;
  margin-bottom: var(--space-sm);
}

.my-songs-artwork-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  margin: 0;
  width: auto;
  min-width: 8.75rem;
  min-height: 2.5rem;
  padding: 0.625rem 1.125rem;
  line-height: 1.2;
  font-size: 0.8125rem;
}

.my-songs-artwork-remove {
  margin: 0;
  padding: 0.2rem 0.35rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.my-songs-artwork-remove:hover {
  color: var(--white);
}

.my-songs-artwork-remove:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}

.my-songs-artwork-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  max-width: 18rem;
}

.my-songs-dialog-meta-row {
  gap: var(--space-md);
  margin-top: 0.375rem;
}

.my-songs-dialog-stage {
  width: 100%;
  margin-top: 0.0625rem;
}

.my-songs-dialog-stage .my-song-progress-btn {
  min-height: 36px;
}

.song-picker-control.is-locked {
  opacity: 0.72;
  pointer-events: none;
}

.song-picker {
  position: relative;
  width: 100%;
}

.song-picker-control {
  position: relative;
  width: 100%;
  min-height: var(--touch-min);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: text;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.song-picker-control.is-open,
.song-picker-control:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.song-picker-control.is-selected {
  cursor: pointer;
  border-color: var(--orange);
  background: rgba(245, 130, 32, 0.08);
}

.song-picker-control.is-selected.is-open {
  background: var(--surface-raised);
}

.song-picker-search {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: calc(var(--touch-min) - 2px);
  padding: var(--space-sm);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  touch-action: manipulation;
}

.song-picker-search[hidden] {
  display: none !important;
}

.song-picker-search::placeholder {
  color: var(--muted);
}

.song-picker-search:focus-visible {
  outline: none;
}

.song-picker-value {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-width: 0;
  min-height: calc(var(--touch-min) - 2px);
  padding: 0.375rem var(--space-sm);
  box-sizing: border-box;
}

.song-picker-value[hidden] {
  display: none !important;
}

.song-picker-value-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.song-picker-value-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--orange);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-picker-value-artist {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-picker-clear {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.song-picker-clear:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.song-picker-clear:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.song-picker-panel {
  position: fixed;
  z-index: 101;
  margin: 0;
  padding: var(--space-2xs);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1f1f1f 0%, var(--surface) 100%);
  box-shadow: var(--shadow-md), 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.song-picker-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.song-picker-panel.is-above {
  transform: translateY(4px);
}

.song-picker-panel.is-above.is-open {
  transform: translateY(0);
}

.song-picker-results {
  list-style: none;
  margin: 0;
  padding: var(--space-2xs);
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.song-picker-option {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  padding: 0.75rem 0.75rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), color var(--transition);
}

.song-picker-option:hover,
.song-picker-option.is-active {
  background: var(--orange-soft);
}

.song-picker-option.is-selected {
  color: var(--orange);
}

.song-picker-option.is-selected.is-active {
  background: rgba(245, 130, 32, 0.16);
}

.song-picker-option-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.song-picker-option-artist {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.48);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.song-picker-option.is-selected .song-picker-option-artist,
.song-picker-option.is-active .song-picker-option-artist {
  color: rgba(255, 180, 110, 0.72);
}

.song-picker-option-meta {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--muted);
}

.song-picker-empty {
  margin: 0;
  padding: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.song-card {
  position: relative;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.song-card--perform {
  border-color: rgba(92, 184, 92, 0.25);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(92, 184, 92, 0.08);
}

.song-card--perform-celebrate {
  animation: performGlow 0.8s ease;
}

@keyframes performGlow {
  0% { box-shadow: var(--shadow-sm), 0 0 0 rgba(92, 184, 92, 0); }
  50% { box-shadow: var(--shadow-sm), 0 0 32px rgba(92, 184, 92, 0.2); }
  100% { box-shadow: var(--shadow-sm), 0 0 24px rgba(92, 184, 92, 0.08); }
}

.perform-ready {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5cb85c;
  background: rgba(92, 184, 92, 0.08);
  border: 1px solid rgba(92, 184, 92, 0.2);
  border-radius: var(--radius-pill);
  width: fit-content;
}

.perform-ready-icon {
  font-size: 0.875rem;
}

.song-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.song-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.25;
}

.song-card-artist {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--light-grey);
  margin-bottom: var(--space-sm);
}

.song-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.song-meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--light-grey);
}

.song-meta-tag--bpm {
  color: var(--orange);
  border-color: rgba(245, 130, 32, 0.25);
}

.song-card-notes {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-strong);
}

.song-card-notes:empty {
  display: none;
}

.song-progression {
  margin-bottom: var(--space-md);
}

.progression-track {
  position: relative;
  padding: var(--space-sm) 0 var(--space-xs);
}

.progression-line {
  position: absolute;
  top: calc(var(--space-sm) + 7px);
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--mid-grey);
  border-radius: var(--radius-pill);
}

.progression-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), #5b9bd5, #5cb85c);
  border-radius: var(--radius-pill);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-progression[data-stage="playthrough"] .progression-line-fill { width: 50%; }
.song-progression[data-stage="perform"] .progression-line-fill { width: 100%; }

.progression-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  z-index: 1;
}

.progression-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  flex: 1;
}

.progression-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 2px solid var(--mid-grey);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progression-step.active .progression-dot {
  transform: scale(1.15);
}

.song-progression[data-stage="practice"] .progression-step[data-stage="practice"] .progression-dot,
.song-progression[data-stage="playthrough"] .progression-step[data-stage="playthrough"] .progression-dot,
.song-progression[data-stage="perform"] .progression-step[data-stage="perform"] .progression-dot {
  border-color: transparent;
}

.song-progression[data-stage="practice"] .progression-step[data-stage="practice"] .progression-dot {
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange-glow);
}

.song-progression[data-stage="playthrough"] .progression-step[data-stage="playthrough"] .progression-dot {
  background: #5b9bd5;
  box-shadow: 0 0 12px rgba(91, 155, 213, 0.45);
}

.song-progression[data-stage="perform"] .progression-step[data-stage="perform"] .progression-dot {
  background: #5cb85c;
  box-shadow: 0 0 12px rgba(92, 184, 92, 0.4);
}

.progression-label {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.35s ease;
  text-align: center;
}

.progression-step.active .progression-label {
  color: var(--white);
}

.stage-toggle {
  position: relative;
  display: flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: var(--space-md);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.stage-toggle-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  height: calc(100% - 6px);
  border-radius: var(--radius-pill);
  background: var(--orange);
  box-shadow: var(--shadow-orange);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.stage-toggle[data-stage="playthrough"] .stage-toggle-indicator {
  transform: translateX(100%);
  background: #5b9bd5;
  box-shadow: 0 4px 16px rgba(91, 155, 213, 0.3);
}

.stage-toggle[data-stage="perform"] .stage-toggle-indicator {
  transform: translateX(200%);
  background: #5cb85c;
  box-shadow: 0 4px 16px rgba(92, 184, 92, 0.28);
}

.stage-toggle-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 0 var(--space-2xs);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--light-grey);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.stage-toggle-btn.active {
  color: var(--black);
}

.stage-toggle-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 1px;
}

.song-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
}

.btn-song-edit,
.btn-song-delete {
  min-height: var(--touch-min);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-song-edit {
  color: var(--orange);
}

.btn-song-edit:hover {
  background: var(--orange-soft);
  border-color: rgba(245, 130, 32, 0.28);
}

.btn-song-delete {
  color: var(--light-grey);
}

.btn-song-delete:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.25);
}

.required-mark {
  color: var(--orange);
}

.field-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.setlist-dialog {
  width: min(100% - 2rem, 420px);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.setlist-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.setlist-dialog form {
  padding: var(--space-md);
}

.setlist-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.setlist-dialog-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.setlist-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.setlist-dialog-actions .btn-primary {
  margin-top: 0;
}

.help-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.help-dialog-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.feedback-dialog {
  width: min(100% - 2rem, 440px);
  max-height: min(92dvh, 560px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.feedback-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.feedback-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 560px);
}

.feedback-form {
  padding: 0 var(--space-md) var(--space-md);
  overflow-y: auto;
}

.feedback-note {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(245, 130, 32, 0.08);
  color: var(--light-grey);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.feedback-form .btn-primary {
  width: 100%;
  margin-top: var(--space-xs);
}

@media (min-width: 481px) {
  .setlist-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .setlist-toolbar {
    flex-direction: row;
    align-items: center;
  }

  .setlist-filters {
    flex: 1;
    flex-wrap: nowrap;
  }

  .setlist-sort {
    flex-shrink: 0;
    min-width: 180px;
  }
}

@media (max-width: 420px) {
  :root {
    --brand-logo-width: 140px;
  }

  .tab {
    font-size: 0.75rem;
    padding-inline: 0.375rem;
  }

  .metronome-stage {
    padding-inline: var(--space-sm);
  }

  .beat-indicator {
    width: 108px;
    height: 108px;
  }

  .beat-circle {
    width: 88px;
    height: 88px;
  }

  .beat-number {
    font-size: 1.875rem;
  }

  .preset-level-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .btn-preset {
    min-height: 38px;
    font-size: 0.5625rem;
  }

  .btn-preset span {
    font-size: 0.625rem;
  }
}

@media (max-width: 374px) {
  .settings-row {
    grid-template-columns: 1fr;
  }

  .setting-card {
    min-height: auto;
  }

  /* Stack other two-column form rows on very narrow phones, but keep the
     Date/Minutes session row side-by-side — its shrink-safe minmax tracks
     already fit at 320px with a visible gap. */
  .goals-form,
  .form-row:not(.session-date-minutes-row) {
    grid-template-columns: 1fr;
  }

  .session-date-minutes-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-sm);
  }
}

@media (min-width: 400px) {
  .sound-buttons {
    grid-template-columns: repeat(6, 1fr);
  }

  .btn-sound:nth-child(1) { grid-column: 1 / 3; }
  .btn-sound:nth-child(2) { grid-column: 3 / 5; }
  .btn-sound:nth-child(3) { grid-column: 5 / 7; }
  .btn-sound:nth-child(4) { grid-column: 1 / 4; }
  .btn-sound:nth-child(5) { grid-column: 4 / 7; }
}

@media (min-width: 481px) {
  :root {
    --max-width: 480px;
  }

  .header-inner,
  .app {
    padding-inline: var(--space-lg);
  }

  :root {
    --brand-logo-width: 160px;
  }

  .beat-indicator {
    width: 128px;
    height: 128px;
  }

  .beat-circle {
    width: 104px;
    height: 104px;
  }

  .beat-number {
    font-size: 2.25rem;
  }
}

@media (min-width: 769px) {
  :root {
    --max-width: 500px;
  }

  .metronome {
    gap: var(--space-2xl);
  }

  .bga-ps-panel .metronome {
    gap: var(--space-md);
  }

  .bga-ps-panel .metronome-stage {
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }

  .bga-ps-panel .metronome-core {
    gap: var(--space-xs);
  }

  .bga-ps-panel .metronome-hero .section-label {
    margin-bottom: 0;
  }

  .bga-ps-panel .bpm-value {
    font-size: clamp(2.75rem, 15vw, 3.5rem);
    text-shadow: 0 2px 20px rgba(245, 130, 32, 0.28);
  }

  .bga-ps-panel .bpm-display::before {
    inset: -0.25rem -0.5rem 0;
  }

  .bga-ps-panel .bpm-unit {
    padding-bottom: 0.35rem;
  }

  .bga-ps-panel .bpm-slider-row {
    padding-block: 0;
  }

  .bga-ps-panel .btn-play-hero {
    min-height: 48px;
    font-size: 1rem;
  }

  .bga-ps-panel .metronome-visual {
    gap: 0.125rem;
  }

  .bga-ps-panel .beat-indicator {
    width: 72px;
    height: 72px;
  }

  .bga-ps-panel .beat-circle {
    width: 58px;
    height: 58px;
  }

  .bga-ps-panel .beat-number {
    font-size: 1.25rem;
  }

  .bga-ps-panel .beat-circle.flash {
    transform: scale(1.03);
  }

  .bga-ps-panel .beat-circle.flash-accent {
    transform: scale(1.05);
  }

  .bga-ps-panel .time-sig-label {
    font-size: 0.6875rem;
  }

  .bga-ps-panel .beat-pattern-hint {
    font-size: 0.6875rem;
  }

  .bga-ps-panel .metronome-adjust {
    gap: var(--space-xs);
  }

  .bga-ps-panel .metronome-adjust .setting-card {
    padding: var(--space-sm) var(--space-md);
    min-height: 76px;
  }

  .bga-ps-panel .settings-row--metronome .setting-card select {
    min-height: 40px;
    font-size: 0.8125rem;
  }

  .bga-ps-panel .btn-nudge {
    min-height: 40px;
    font-size: 0.875rem;
  }

  .bga-ps-panel .metronome-controls {
    gap: var(--space-sm);
    padding-top: var(--space-sm);
  }

  .bga-ps-panel .metronome-controls .card {
    padding: var(--space-sm) var(--space-md);
  }
}

/* Developer-only recommendation engine debug (enabled via window.BGA_PS_RECOMMENDATION_DEBUG) */
.recommendation-debug {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(245, 130, 32, 0.45);
  background: rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.recommendation-debug-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.recommendation-debug-section h4 {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
}

.recommendation-debug-section p,
.recommendation-debug-section ul {
  margin: 0.2rem 0 0;
}

.recommendation-debug-label {
  margin-top: 0.45rem !important;
  color: rgba(255, 255, 255, 0.62);
}

.recommendation-debug-discarded {
  list-style: none;
  padding: 0;
}

.recommendation-debug-discarded li {
  margin: 0.15rem 0;
  color: rgba(255, 255, 255, 0.55);
}

.recommendation-debug-empty {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
