#blazor-error-ui {
    background: #FEF3C7;
    border-top: 2px solid #F59E0B;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--mt-font, 'Inter', 'Helvetica Neue', sans-serif);
    font-size: 0.875rem;
    color: #92400E;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

html, body {
    font-family: var(--font-body, 'Inter', 'Helvetica Neue', sans-serif);
    font-size: 1rem;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ════════════════════════════════════════════════════════════
   DESIGN SYSTEM v3 — Indigo Blue + Glass Morphism
   Palette: #4338CA (indigo) · #34D399 (emerald accent) · #1E1B4B (deep)
   Fonts: Parisienne (script), DM Serif Display (quotes), Bricolage Grotesque (display), Inter (body)
   Effects: glass morphism, B/W photo overlays, scroll reveal, text shadows
════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties — Light (default) ── */
:root, [data-theme="light"] {
    --mt-primary: #4338CA;
    --mt-primary-dark: #3730A3;
    --mt-primary-light: #6366F1;
    --mt-secondary: #818CF8;
    --mt-accent: #34D399;
    --mt-accent-dark: #10B981;
    /* Ink — deep near-black indigo for chrome (nav bars). Theme-independent on purpose. */
    --mt-ink: #0B0620;
    --mt-ink-2: #181134;
    --mt-ink-line: rgba(255, 255, 255, 0.07);
    --mt-surface: #F8FAFC;
    --mt-surface-2: #F1F5F9;
    --mt-text: #1E293B;
    --mt-text-muted: #64748B;
    --mt-text-light: #94A3B8;
    --mt-border: #E2E8F0;

    --mt-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --mt-shadow: 0 2px 8px rgba(67,56,202,0.08);
    --mt-shadow-lg: 0 8px 24px rgba(67,56,202,0.12);
    --mt-shadow-float: 0 16px 48px rgba(67,56,202,0.15);
    --mt-glass-bg: rgba(255, 255, 255, 0.72);
    --mt-glass-border: rgba(255, 255, 255, 0.5);
    --mt-glass-blur: blur(16px);

    --mt-radius-sm: 8px;
    --mt-radius: 12px;
    --mt-radius-lg: 16px;
    --mt-radius-xl: 24px;

    --font-display: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
    --font-script: 'Parisienne', cursive;
    --font-serif: 'DM Serif Display', serif;
    --mt-font: var(--font-body);

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.5rem;
    --text-2xl:  2rem;
}

/* ── Dark theme ── */
[data-theme="dark"] {
    --mt-primary: #818CF8;
    --mt-primary-dark: #6366F1;
    --mt-primary-light: #A5B4FC;
    --mt-secondary: #C7D2FE;
    --mt-accent: #6EE7B7;
    --mt-accent-dark: #34D399;
    --mt-surface: #0B0F1A;
    --mt-surface-2: #151B2B;
    --mt-text: #F1F5F9;
    --mt-text-muted: #94A3B8;
    --mt-text-light: #64748B;
    --mt-border: #1E293B;
    --mt-glass-bg: rgba(11, 15, 26, 0.8);
    --mt-glass-border: rgba(255, 255, 255, 0.08);

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

[data-theme="dark"] body {
    background: var(--mt-surface);
    color: var(--mt-text);
}

/* dark: cards */
[data-theme="dark"] .lp-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .err-card,
[data-theme="dark"] .ms-viewer-panel,
[data-theme="dark"] .ms-sheet-card,
[data-theme="dark"] .fm-form-card,
[data-theme="dark"] .ex-card,
[data-theme="dark"] .fm-post,
[data-theme="dark"] .fm-reply-form,
[data-theme="dark"] .lp-glasscard,
[data-theme="dark"] .lp-testimonial,
[data-theme="dark"] .ex-theory-section {
    background: var(--mt-surface-2);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

/* dark: nav bar */
[data-theme="dark"] .mt-navbar { background: #1E1B4B !important; }

/* dark: dropdown menus — floating card on desktop/tablet (≥641px). The mobile
   drawer (≤640px) is always the dark navbar gradient, so it's left untouched. */
@media (min-width: 641px) {
    [data-theme="dark"] .mt-nav-dropdown__menu {
        background: var(--mt-surface-2);
        border-color: var(--mt-border);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.6);
    }

    [data-theme="dark"] .mt-nav-dropdown__item,
    [data-theme="dark"] .mt-nav-dropdown__action {
        color: rgba(255, 255, 255, 0.78);
    }

    [data-theme="dark"] .mt-nav-dropdown__item .mt-navbar__icon {
        color: rgba(255, 255, 255, 0.5);
    }

    [data-theme="dark"] .mt-nav-dropdown__item:hover,
    [data-theme="dark"] .mt-nav-dropdown__action:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .mt-nav-dropdown__item:hover .mt-navbar__icon {
        color: #fff;
    }

    [data-theme="dark"] .mt-nav-dropdown__item.active,
    [data-theme="dark"] .mt-nav-dropdown__action.active {
        color: var(--mt-primary-light);
    }

    [data-theme="dark"] .mt-nav-dropdown__item.active .mt-navbar__icon {
        color: var(--mt-primary-light);
    }

    [data-theme="dark"] .mt-nav-dropdown__sep {
        border-top-color: var(--mt-border);
    }
}

/* dark: inputs */
[data-theme="dark"] .fm-input,
[data-theme="dark"] .fm-textarea,
[data-theme="dark"] .fm-search__input,
[data-theme="dark"] .ex-select,
[data-theme="dark"] .auth-card input,
[data-theme="dark"] .fm-field input,
[data-theme="dark"] .form-control {
    background: var(--mt-surface);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

[data-theme="dark"] .auth-card input::placeholder,
[data-theme="dark"] .fm-field input::placeholder,
[data-theme="dark"] .form-control::placeholder {
    color: var(--mt-text-light);
}

/* dark: tags — light text on a tinted chip */
[data-theme="dark"] .fm-tag {
    background: rgba(129, 140, 248, 0.16);
    color: var(--mt-primary-light);
    border-color: rgba(129, 140, 248, 0.32);
}

/* dark: score — white engraving on a dark panel. Verovio fills inherit
   currentColor, so set it white (no filter needed). */
[data-theme="dark"] .music-sheet-viewer {
    background: var(--mt-surface-2) !important;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    padding: 0.75rem;
    color: #fff;
}
[data-theme="dark"] .verovio-score,
[data-theme="dark"] .verovio-score svg {
    color: #fff;
    filter: none;
}
[data-theme="dark"] .verovio-score svg * {
    fill: currentColor;
    stroke: currentColor;
}

/* dark: footer */
[data-theme="dark"] .mt-footer {
    background: var(--mt-surface-2);
    border-color: var(--mt-border);
}

/* ── Container ── */
.lp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .lp-container { padding: 0 2.5rem; }
}

/* ════════════════════════════════════════════════════════════
   SHELL — overflow containment for parallax
════════════════════════════════════════════════════════════ */
.lp-shell { overflow-x: hidden; }

/* ════════════════════════════════════════════════════════════
   GLASS NAVBAR — transparent at top → frosted on scroll
════════════════════════════════════════════════════════════ */
.lp-glassnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 300ms ease, backdrop-filter 300ms ease, box-shadow 300ms ease;
    background: transparent;
}

.lp-glassnav--scrolled {
    background: rgba(11, 6, 32, 0.72);
    backdrop-filter: var(--mt-glass-blur);
    -webkit-backdrop-filter: var(--mt-glass-blur);
    box-shadow: 0 1px 0 var(--mt-ink-line), 0 8px 28px rgba(11, 6, 32, 0.35);
}

.lp-glassnav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lp-glassnav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: color 300ms ease;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.lp-glassnav--scrolled .lp-glassnav__brand {
    color: #fff;
    text-shadow: none;
}

.lp-glassnav__logo-text { font-weight: 700; }
.lp-glassnav__logo-art { color: var(--mt-accent); }

.lp-glassnav__links {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

@media (min-width: 768px) {
    .lp-glassnav__links { display: flex; }
}

.lp-glassnav__link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--mt-radius-sm);
    transition: color 300ms ease, background 200ms ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.lp-glassnav__link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.lp-glassnav--scrolled .lp-glassnav__link {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: none;
}

.lp-glassnav--scrolled .lp-glassnav__link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.lp-glassnav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */
.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--mt-radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
    white-space: nowrap;
    line-height: 1;
}

.lp-btn:active { transform: translateY(1px); }
.lp-btn:focus-visible { outline: 3px solid var(--mt-accent); outline-offset: 2px; }

.lp-btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

/* Icon-only: square button sized to its glyph. */
.lp-btn--icon { padding: 0.7rem; gap: 0; }
.lp-btn--icon svg { width: 18px; height: 18px; display: block; }

.lp-btn--primary {
    background: var(--mt-accent);
    color: #fff;
    border-color: var(--mt-accent-dark);
    box-shadow: 0 3px 0 var(--mt-accent-dark);
}
.lp-btn--primary:hover {
    background: var(--mt-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--mt-accent-dark);
    text-decoration: none;
}

.lp-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.3);
}

/* Slug-less part: inert, visibly non-interactive (no navigation target). */
.song-part--disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.lp-btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

.lp-btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.lp-btn--outline:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.lp-btn--white {
    background: #fff;
    color: var(--mt-primary);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}
.lp-btn--white:hover {
    background: #F1F5F9;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 rgba(0,0,0,0.1);
    text-decoration: none;
}

.lp-btn--lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* ════════════════════════════════════════════════════════════
   HERO — full viewport, B/W photo background, persona toggle
════════════════════════════════════════════════════════════ */
.lp-hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.lp-hero__bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.4);
    transition: transform 0.8s ease, opacity 1s ease;
    will-change: transform;
}

.lp-hero__bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,27,75,0.6) 0%, rgba(67,56,202,0.35) 60%, rgba(30,27,75,0.7) 100%);
}

.lp-hero__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    color: #fff;
}

/* ── Beta badge above the persona toggle ── */
.lp-hero__badge {
    /* flex + fit-content, not inline-flex: the badge owns its own line above the toggle. */
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 1.25rem;
    padding: 0.35rem 0.95rem;
    border-radius: 100px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.lp-hero__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mt-accent);
    box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
    animation: lp-badge-pulse 2.4s ease-out infinite;
}

@keyframes lp-badge-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-hero__badge-dot { animation: none; }
}

/* ── Persona Toggle — glass pill ── */
.lp-persona {
    display: inline-flex;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 0.25rem;
    gap: 0;
    margin: 0 auto 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lp-persona__btn {
    background: transparent;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: background 250ms ease, color 250ms ease;
    white-space: nowrap;
}

.lp-persona__btn--active {
    background: rgba(255,255,255,0.92);
    color: var(--mt-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lp-persona__btn:not(.lp-persona__btn--active):hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* ── Persona content switching ── */
.lp-hero__persona { display: block; }
.lp-hero__persona--hidden { display: none; }

/* ── Script font pretitle ── */
.lp-hero__pretitle {
    font-family: var(--font-script);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--mt-accent);
    text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 0 40px rgba(52,211,153,0.2);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

/* ── Hero title ── */
.lp-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 1.5rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.lp-hero__title-accent {
    color: var(--mt-accent);
    text-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 40px rgba(52,211,153,0.15);
}

.lp-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.65;
    color: rgba(255,255,255,0.85);
    max-width: 60ch;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.lp-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lp-hero__disclaimer {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ── Scroll indicator ── */
.lp-hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: lp-bounce 2s infinite;
    color: rgba(255,255,255,0.5);
}

@keyframes lp-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ════════════════════════════════════════════════════════════
   STATS BAR
════════════════════════════════════════════════════════════ */
.lp-stats {
    background: var(--mt-surface);
    border-top: 1px solid var(--mt-border);
    border-bottom: 1px solid var(--mt-border);
    padding: 2.5rem 0;
}

.lp-stats__grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .lp-stats__grid { grid-template-columns: repeat(4, 1fr); }
}

.lp-stats__number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--mt-primary);
    line-height: 1.2;
}

.lp-stats__label {
    font-size: 0.9rem;
    color: var(--mt-text-muted);
    margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════════════════
   FEATURES — glass cards
════════════════════════════════════════════════════════════ */
.lp-features {
    background: var(--mt-surface);
    padding: 5rem 0;
    position: relative;
}

.lp-features__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.lp-features__pretitle,
.lp-split__pretitle {
    font-family: var(--font-script);
    font-size: 1.6rem;
    color: var(--mt-accent);
    text-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 0.5rem;
}

.lp-features__title,
.lp-testimonials__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--mt-text);
    margin: 0 0 1rem;
    line-height: 1.15;
}

.lp-features__subtitle {
    font-size: 1.05rem;
    color: var(--mt-text-muted);
    line-height: 1.6;
}

.lp-features__grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .lp-features__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Glass Card ── */
.lp-glasscard {
    position: relative;
    background: var(--mt-glass-bg);
    border: 1px solid var(--mt-glass-border);
    border-radius: var(--mt-radius);
    padding: 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--mt-shadow);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.lp-glasscard:hover {
    transform: translateY(-4px);
    box-shadow: var(--mt-shadow-lg);
}

.lp-glasscard__number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--mt-primary);
    opacity: 0.08;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.lp-glasscard__icon {
    width: 48px; height: 48px;
    border-radius: var(--mt-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.lp-glasscard__icon--indigo { background: rgba(67,56,202,0.1); color: var(--mt-primary); }
.lp-glasscard__icon--green { background: rgba(16,185,129,0.1); color: var(--mt-accent-dark); }
.lp-glasscard__icon--purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.lp-glasscard__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mt-text);
    margin: 0 0 0.75rem;
}

.lp-glasscard__desc {
    font-size: 0.95rem;
    color: var(--mt-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   SPLIT SECTION — text + B/W image
════════════════════════════════════════════════════════════ */
.lp-split {
    padding: 5rem 0;
    overflow: hidden;
}

.lp-split__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .lp-split__inner { grid-template-columns: 1fr 1fr; }
}

.lp-split--reverse .lp-split__inner {
    direction: rtl;
}
.lp-split--reverse .lp-split__text,
.lp-split--reverse .lp-split__image {
    direction: ltr;
}

.lp-split__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--mt-text);
    margin: 0 0 1rem;
    line-height: 1.15;
}

.lp-split__body {
    font-size: 1.05rem;
    color: var(--mt-text-muted);
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

.lp-split__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.lp-split__list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--mt-text);
}

.lp-split__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 8px; height: 8px;
    background: var(--mt-accent);
    border-radius: 50%;
}

.lp-split__image {
    border-radius: var(--mt-radius-lg);
    overflow: hidden;
    box-shadow: var(--mt-shadow-float);
}

.lp-split__image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.05) brightness(0.92);
    transition: filter 400ms ease;
}

.lp-split__image:hover img {
    filter: grayscale(60%) contrast(1.05) brightness(0.95);
}

/* ════════════════════════════════════════════════════════════
   ROADMAP — what is shipping next
════════════════════════════════════════════════════════════ */
.lp-roadmap {
    background: var(--mt-surface-2);
    padding: 5rem 0;
}

/* Status pill on a roadmap card — sits where the big number does on features. */
.lp-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.lp-badge--testing {
    background: rgba(16,185,129,0.12);
    border-color: rgba(16,185,129,0.35);
    color: var(--mt-accent-dark);
}

.lp-badge--progress {
    background: rgba(67,56,202,0.12);
    border-color: rgba(67,56,202,0.35);
    color: var(--mt-primary);
}

.lp-badge--planned {
    background: rgba(148,163,184,0.15);
    border-color: rgba(148,163,184,0.35);
    color: var(--mt-text-muted);
}

.lp-roadmap .lp-pullquote {
    margin: 3.5rem auto 0;
}

/* ════════════════════════════════════════════════════════════
   TESTIMONIALS
════════════════════════════════════════════════════════════ */
.lp-testimonials {
    background: var(--mt-surface-2);
    padding: 5rem 0;
}

.lp-testimonials__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

/* ── Pull quote ── */
.lp-pullquote {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.5;
    color: var(--mt-text);
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
    text-align: center;
    font-style: italic;
}

.lp-pullquote__author {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: normal;
    color: var(--mt-text-muted);
    margin-top: 1rem;
    display: block;
}

.lp-testimonials__grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .lp-testimonials__grid { grid-template-columns: repeat(3, 1fr); }
}

.lp-testimonial {
    background: var(--mt-glass-bg);
    border: 1px solid var(--mt-glass-border);
    border-radius: var(--mt-radius);
    padding: 2rem;
    box-shadow: var(--mt-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lp-testimonial__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 1rem;
}

.lp-testimonial__quote {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--mt-text);
    margin: 0 0 1.5rem;
    font-style: italic;
}

.lp-testimonial__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lp-testimonial__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--mt-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.lp-testimonial__avatar--blue { background: #6366F1; }
.lp-testimonial__avatar--green { background: var(--mt-accent-dark); }

.lp-testimonial__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mt-text);
}

.lp-testimonial__role {
    font-size: 0.8rem;
    color: var(--mt-text-muted);
}

/* ════════════════════════════════════════════════════════════
   FINALE — big-type CTA over B/W photo
════════════════════════════════════════════════════════════ */
.lp-finale {
    position: relative;
    padding: 6rem 0;
    text-align: center;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.lp-finale__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.lp-finale__bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.35);
}

.lp-finale__bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,27,75,0.7) 0%, rgba(67,56,202,0.5) 100%);
}

.lp-finale__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    color: #fff;
}

.lp-finale__script {
    font-family: var(--font-script);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--mt-accent);
    text-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 50px rgba(52,211,153,0.2);
    margin: 0 0 1rem;
    line-height: 1.3;
}

.lp-finale__headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 1.5rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.lp-finale__sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    margin: 0 0 2.5rem;
    line-height: 1.6;
}

.lp-finale__ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.lp-footer {
    background: var(--mt-surface-2);
    border-top: 1px solid var(--mt-border);
    padding: 3rem 0 1.5rem;
}

.lp-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .lp-footer__inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.lp-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lp-footer__tagline {
    font-size: 0.9rem;
    color: var(--mt-text-muted);
    margin: 0;
}

.lp-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.lp-footer__link {
    color: var(--mt-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--mt-radius-sm);
    transition: color 200ms ease;
}

.lp-footer__link:hover { color: var(--mt-primary); }

.lp-footer__bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid var(--mt-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--mt-text-light);
    gap: 0.5rem;
}

.lp-footer__bottom a {
    color: var(--mt-text-muted);
    text-decoration: none;
    transition: color 200ms ease;
}

.lp-footer__bottom a:hover { color: var(--mt-primary); }

.lp-footer__getapp {
    max-width: 1200px;
    margin: 1.75rem auto 0;
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.lp-footer__getapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--mt-border);
    border-radius: 9999px;
    color: var(--mt-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: default;
    transition: border-color 200ms, color 200ms;
}

.lp-footer__getapp-btn:hover {
    border-color: var(--mt-primary);
    color: var(--mt-primary);
}

/* ════════════════════════════════════════════════════════════
   STICKY GET-APP BAR — pinned to the bottom of the viewport
════════════════════════════════════════════════════════════ */
.lp-appbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(15, 10, 40, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--mt-border);
    padding: 0.7rem 1rem;
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
}

.lp-appbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lp-appbar__text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.lp-appbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    background: var(--mt-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: default;
    transition: filter 200ms;
}

.lp-appbar__btn:hover {
    filter: brightness(1.1);
}

/* Keep the footer clear of the fixed bar. */
.lp-shell {
    padding-bottom: 64px;
}

@media (max-width: 540px) {
    .lp-appbar__text {
        font-size: 0.8rem;
    }
    .lp-appbar__btn {
        padding: 0.55rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* ── "Coming soon" tooltip ── */
.lp-soon {
    position: relative;
    display: inline-flex;
}

.lp-soon::after {
    content: attr(data-soon);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 10, 40, 0.92);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.28rem 0.7rem;
    border-radius: 9999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
}

.lp-soon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
════════════════════════════════════════════════════════════ */
.lp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.lp-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.lp-reveal--delay-1 { transition-delay: 0.1s; }
.lp-reveal--delay-2 { transition-delay: 0.2s; }
.lp-reveal--delay-3 { transition-delay: 0.3s; }

/* ── Ken Burns parallax on hero ── */
@keyframes lp-ken-burns {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

.lp-hero__bg-image {
    animation: lp-ken-burns 20s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    .lp-hero__bg-image { animation: none; }
    .lp-reveal { opacity: 1; transform: none; transition: none; }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50110;
}

.validation-message {
    color: #e50110;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ════════════════════════════════════════════════════════════
   FORUM PAGES — Design System (same tokens as landing page)
   fm- prefix for all forum-specific classes
════════════════════════════════════════════════════════════ */

/* ── Page header ── */
.fm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.fm-page-header__text { display: flex; flex-direction: column; gap: 0.25rem; }

.fm-page-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.fm-page-sub {
    font-family: var(--mt-font);
    font-size: 0.9rem;
    color: var(--mt-text-muted);
    margin: 0;
}

/* ── Breadcrumb ── */
.fm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-family: var(--mt-font);
    font-size: 0.85rem;
}

.fm-breadcrumb__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--mt-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 150ms ease;
}

.fm-breadcrumb__link:hover { color: var(--mt-primary); text-decoration: none; }

.fm-breadcrumb__sep { color: var(--mt-text-light); flex-shrink: 0; }

.fm-breadcrumb__current {
    color: var(--mt-text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

/* ── Filters ── */
.fm-filters {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.fm-search {
    position: relative;
    flex: 1;
    min-width: 160px;
}

.fm-search__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mt-text-light);
    pointer-events: none;
    flex-shrink: 0;
}

.fm-search__input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.25rem;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text);
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-sm);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fm-search__input::placeholder { color: var(--mt-text-light); }

.fm-search__input:focus {
    border-color: var(--mt-secondary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.fm-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* ── Thread list ── */
.fm-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.fm-thread-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    text-decoration: none;
    color: inherit;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
    cursor: pointer;
}

.fm-thread-card:hover {
    border-color: var(--mt-secondary);
    box-shadow: var(--mt-shadow);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.fm-thread-card:focus-visible {
    outline: 3px solid var(--mt-accent);
    outline-offset: 2px;
}

.fm-thread-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--mt-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mt-font);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.fm-thread-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fm-thread-card__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fm-thread-card__title {
    font-family: var(--mt-font);
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-thread-card__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: var(--mt-text-muted);
}

.fm-thread-card__author { font-weight: 600; color: var(--mt-text); }
.fm-thread-card__sep { color: var(--mt-text-light); }
.fm-thread-card__date { color: var(--mt-text-light); }
.fm-thread-card__tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.fm-thread-card__tail {
    color: var(--mt-text-light);
    flex-shrink: 0;
    transition: color 200ms ease;
}

.fm-thread-card:hover .fm-thread-card__tail { color: var(--mt-secondary); }

/* ── Tags ── */
.fm-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    background: #EFF6FF;
    color: var(--mt-secondary);
    border: 1px solid #BFDBFE;
    border-radius: 100px;
    font-family: var(--mt-font);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Badges (pinned/locked) ── */
.fm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-family: var(--mt-font);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.fm-badge--pinned {
    background: #FEF9C3;
    color: #854D0E;
    border: 1px solid #FDE047;
}

.fm-badge--locked {
    background: #F1F5F9;
    color: var(--mt-text-muted);
    border: 1px solid var(--mt-border);
}

/* Account flags: revocation/deletion read as danger, email changes as informational. */
.fm-badge--danger {
    background: rgba(220, 38, 38, 0.1);
    color: #B91C1C;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.fm-badge--muted {
    background: var(--mt-surface-2);
    color: var(--mt-text-muted);
    border: 1px solid var(--mt-border);
}

[data-theme="dark"] .fm-badge--danger {
    background: rgba(248, 113, 113, 0.14);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.35);
}

/* Inline checkbox + label pair, used above admin tables. */
.fm-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    font-size: 0.9rem;
    color: var(--mt-text-muted);
    cursor: pointer;
}

.fm-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--mt-primary);
    cursor: pointer;
}

/* ── Loading / Empty / Alerts ── */
.fm-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem;
    justify-content: center;
    font-family: var(--mt-font);
    font-size: 0.9rem;
    color: var(--mt-text-muted);
}

.fm-spinner {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--mt-border);
    border-top-color: var(--mt-secondary);
    border-radius: 50%;
    animation: fm-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.fm-spinner--sm {
    width: 15px;
    height: 15px;
    border-width: 2px;
}

@keyframes fm-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .fm-spinner { animation: none; border-top-color: var(--mt-secondary); }
}

.fm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
}

.fm-empty__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--mt-surface-2);
    border: 1.5px solid var(--mt-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mt-text-light);
    margin-bottom: 0.5rem;
}

.fm-empty__title {
    font-family: var(--mt-font);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
}
.fm-empty__action { margin-top: 1rem; }

/* ── Filter bar: advanced disclosure ── */
.ex-filters__toggle {
    display:inline-flex; align-items:center; gap:0.35rem;
    padding:0.55rem 0.75rem; font-family:var(--mt-font); font-size:0.875rem; font-weight:600;
    color:var(--mt-text-muted); background:none; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius-sm); cursor:pointer; white-space:nowrap;
    transition:color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.ex-filters__toggle:hover { color:var(--mt-text); border-color:var(--mt-text-light); }
.ex-filters__toggle--on { color:var(--mt-text); border-color:var(--mt-secondary); }
.ex-filters__toggle svg { transition:transform 150ms ease; }
.ex-filters__toggle--on svg { transform:rotate(180deg); }
.ex-filters__advanced { display:flex; gap:0.6rem; width:100%; margin-top:0.6rem; flex-wrap:wrap; }
.ex-filters__advanced .fm-search, .ex-filters__advanced .msf { flex:1; min-width:200px; }

.fm-empty__sub {
    font-family: var(--mt-font);
    font-size: var(--text-base);
    color: var(--mt-text-muted);
    max-width: 42ch;
    margin: 0 0 0.5rem;
}

.fm-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: var(--mt-radius-sm);
    font-family: var(--mt-font);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1.5px solid transparent;
}

/* ── Infinite Scroll Container ── */
.fm-scroll-container {
    width: 100%;
}

.fm-scroll-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text-muted);
}

.fm-scroll-end {
    text-align: center;
    padding: 1.5rem;
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: var(--mt-text-light);
    border-top: 1px solid var(--mt-border);
    margin-top: 1rem;
}

.fm-alert--warning {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FDE68A;
}

.fm-alert--danger {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.fm-alert--info {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #BFDBFE;
}

/* ── Thread header (view mode) ── */
.fm-thread-header {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.fm-thread-header__badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.fm-thread-title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.fm-thread-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mt-font);
    font-size: 0.85rem;
    color: var(--mt-text-muted);
    flex-wrap: wrap;
}

.fm-thread-meta__author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--mt-text);
}

.fm-thread-meta__sep { color: var(--mt-text-light); }
.fm-thread-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ── Posts ── */
.fm-post {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    margin-bottom: 0.75rem;
}

.fm-post--op {
    border-color: #BFDBFE;
    background: linear-gradient(135deg, #EFF6FF 0%, #fff 50%);
    margin-bottom: 1.5rem;
}

.fm-post__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--mt-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mt-font);
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.fm-post__avatar--op {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    border-radius: 14px;
}

.fm-post__avatar--sm {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
    border-radius: 8px;
}

.fm-post__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.fm-post__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fm-post__author-name {
    font-family: var(--mt-font);
    font-size: 0.9rem;
    color: var(--mt-primary);
}

.fm-post__op-badge {
    font-family: var(--mt-font);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--mt-secondary);
    color: #fff;
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
}

.fm-post__reply-num {
    font-family: var(--mt-font);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mt-text-light);
}

.fm-post__time {
    font-family: var(--mt-font);
    font-size: 0.78rem;
    color: var(--mt-text-light);
    margin-left: auto;
}

.fm-post__content {
    font-family: var(--mt-font);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--mt-text);
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 72ch;
}

/* ── Replies section header ── */
.fm-replies-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mt-font);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mt-primary);
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.fm-replies-list { display: flex; flex-direction: column; }

/* ── Reply form ── */
.fm-reply-form {
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    padding: 1.25rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.fm-reply-form__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text-muted);
}

.fm-reply-form__label { font-weight: 500; }

/* ── Sign-in prompt ── */
.fm-sign-in-prompt {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    border-radius: var(--mt-radius);
    color: var(--mt-secondary);
    margin-top: 1rem;
}

.fm-sign-in-prompt__text {
    font-family: var(--mt-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mt-primary);
    margin: 0 0 0.75rem;
}

.fm-sign-in-prompt__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Compose form ── */
.fm-compose {
    max-width: 760px;
}

.fm-compose__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.fm-compose__sub {
    font-family: var(--mt-font);
    font-size: 0.9rem;
    color: var(--mt-text-muted);
    margin: 0 0 1.25rem;
}

.fm-form-card {
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-lg);
    box-shadow: var(--mt-shadow);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Form fields ── */
.fm-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.fm-label {
    font-family: var(--mt-font);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mt-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fm-label__hint {
    font-weight: 400;
    color: var(--mt-text-light);
    font-size: 0.8rem;
}

.fm-input,
.fm-textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--mt-font);
    font-size: 0.9rem;
    color: var(--mt-text);
    background: var(--mt-surface);
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-sm);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
    resize: vertical;
}

.fm-input::placeholder,
.fm-textarea::placeholder { color: var(--mt-text-light); }

.fm-input:focus,
.fm-textarea:focus {
    border-color: var(--mt-secondary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    background: #fff;
}

.fm-textarea { line-height: 1.6; min-height: 100px; }

.fm-form-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   EXERCISE & PLAN PAGES
════════════════════════════════════════════════════════════ */

/* ── Filters ── */
.ex-filters { display:flex; gap:0.6rem; margin-bottom:1.5rem; flex-wrap:wrap; align-items:center; }
.ex-filters__grow { flex:1; min-width:140px; }
.ex-select {
    padding:0.55rem 0.75rem; font-family:var(--mt-font); font-size:0.875rem;
    color:var(--mt-text); background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius-sm); outline:none; cursor:pointer;
    transition:border-color 150ms ease, box-shadow 150ms ease;
}
.ex-select:focus { border-color:var(--mt-secondary); box-shadow:0 0 0 3px rgba(59,130,246,.12); }

.ex-result-count {
    font-family:var(--mt-font); font-size:0.8rem; font-weight:600; letter-spacing:0.02em;
    text-transform:uppercase; color:var(--mt-text-light); margin:0 0 0.85rem;
}

/* ── Exercise grid ── */
.ex-grid {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(280px,1fr)); gap:1rem;
}
.ex-card {
    display:flex; flex-direction:column; text-decoration:none; color:inherit;
    background:#fff; border:1.5px solid var(--mt-border); border-radius:var(--mt-radius);
    overflow:hidden; box-shadow:var(--mt-shadow); cursor:pointer;
    transition:transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.ex-card:hover { transform:translateY(-3px); box-shadow:var(--mt-shadow-lg); border-color:#BFDBFE; text-decoration:none; color:inherit; }
.ex-card:focus-visible { outline:3px solid var(--mt-accent); outline-offset:2px; }

/* Difficulty ribbon */
.ex-card__ribbon { height:5px; width:100%; }
.ex-ribbon--beginner     { background:#22C55E; }
.ex-ribbon--intermediate { background:#4338CA; }
.ex-ribbon--advanced     { background:#f97316; }
.ex-ribbon--expert       { background:#ef4444; }
.ex-ribbon--plan         { background:linear-gradient(90deg,#4338CA,#7C3AED); }

.ex-card__body { padding:1rem 1.1rem 0.75rem; flex:1; display:flex; flex-direction:column; gap:0.5rem; }
.ex-card__meta { display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap; }
.ex-category-pill {
    display:inline-flex; align-items:center; padding:0.15rem 0.55rem;
    background:#F1F5F9; color:var(--mt-text-muted); border:1px solid var(--mt-border);
    border-radius:100px; font-family:var(--mt-font); font-size:0.72rem; font-weight:600; white-space:nowrap;
}
.ex-duration {
    display:inline-flex; align-items:center; gap:0.25rem;
    font-family:var(--mt-font); font-size:0.75rem; color:var(--mt-text-light);
}
.ex-difficulty-badge {
    display:inline-flex; align-items:center; padding:0.15rem 0.55rem;
    border-radius:100px; font-family:var(--mt-font); font-size:0.72rem; font-weight:700; color:#fff; white-space:nowrap;
}
.ex-difficulty--beginner     { background:#22C55E; }
.ex-difficulty--intermediate { background:#4338CA; }
.ex-difficulty--advanced     { background:#f97316; }
.ex-difficulty--expert       { background:#ef4444; }

.ex-card__heading { display:flex; flex-direction:column; gap:0.15rem; }
.ex-card__eyebrow {
    font-family:var(--mt-font); font-size:0.68rem; font-weight:700;
    letter-spacing:0.07em; text-transform:uppercase; color:var(--mt-text-light);
    margin:0;
}
.ex-card__title {
    font-family:var(--mt-font); font-size:1.1rem; font-weight:700;
    color:var(--mt-primary); margin:0; line-height:1.25; letter-spacing:-0.01em;
}
.ex-card__desc {
    font-family:var(--mt-font); font-size:var(--text-base); line-height:1.6;
    color:var(--mt-text-muted); margin:0; flex:1;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.ex-card__footer {
    display:flex; align-items:center; justify-content:space-between;
    padding:0.6rem 1.1rem; border-top:1.5px solid var(--mt-border);
    background:var(--mt-surface); gap:0.5rem;
}
.ex-card__tags { display:flex; gap:0.3rem; flex-wrap:wrap; }
.ex-card__date { font-family:var(--mt-font); font-size:0.7rem; color:var(--mt-text-light); opacity:0.7; white-space:nowrap; flex-shrink:0; }

/* ── Lesson (plan) cards — instrument-tinted editorial cards ──
   Each instrument family owns a hue; the card surface carries a whisper of it and the
   eyebrow speaks it plainly. Scanning a long lesson index by instrument becomes
   pre-attentive — no ribbons, no pills, no tag noise. */
.ex-card--plan {
    --plan-accent: oklch(0.48 0.19 275);                     /* fallback: brand indigo */
    background: color-mix(in oklab, var(--plan-accent) 4%, #fff);
    border: 1px solid color-mix(in oklab, var(--plan-accent) 14%, var(--mt-border));
    box-shadow: none;
}
.ex-card--plan:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--plan-accent) 55%, var(--mt-border));
    box-shadow: 0 10px 28px -14px color-mix(in oklab, var(--plan-accent) 45%, transparent);
}
.ex-plan--piano       { --plan-accent: oklch(0.47 0.19 275); }  /* brand indigo */
.ex-plan--guitar      { --plan-accent: oklch(0.58 0.12 70);  }  /* worn brass */
.ex-plan--ukulele     { --plan-accent: oklch(0.62 0.14 30);  }  /* coral wood */
.ex-plan--bass        { --plan-accent: oklch(0.50 0.09 250); }  /* steel blue */
.ex-plan--flute       { --plan-accent: oklch(0.58 0.10 200); }  /* cool silver-teal */
.ex-plan--irish-flute { --plan-accent: oklch(0.55 0.13 155); }  /* bog green */
.ex-plan--treble      { --plan-accent: oklch(0.55 0.15 315); }  /* violet */

.ex-card--plan .ex-card__body { padding: 1.1rem 1.2rem 1rem; gap: 0.55rem; }

.ex-plan__eyebrow {
    font-family: var(--mt-font); font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    /* accent hue pulled toward text colour so the small caps stay ≥4.5:1 on the tinted surface */
    color: color-mix(in oklab, var(--plan-accent) 55%, var(--mt-text));
}
.ex-plan__title {
    font-family: var(--font-display); font-size: 1.22rem; font-weight: 700;
    color: var(--mt-primary); margin: 0; line-height: 1.2; letter-spacing: -0.01em;
    text-wrap: balance;
}
.ex-plan__desc { -webkit-line-clamp: 2; font-size: 0.88rem; }
.ex-plan__meta {
    display: flex; align-items: baseline; gap: 0.45rem; margin: auto 0 0;
    font-family: var(--mt-font); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase; color: var(--mt-text-light);
}
.ex-plan__meta-sep { color: color-mix(in oklab, var(--plan-accent) 60%, var(--mt-text-light)); }

[data-theme="dark"] .ex-card--plan {
    background: color-mix(in oklab, var(--plan-accent) 11%, var(--mt-surface-2));
    border-color: color-mix(in oklab, var(--plan-accent) 24%, var(--mt-border));
}
[data-theme="dark"] .ex-card--plan:hover {
    border-color: color-mix(in oklab, var(--plan-accent) 60%, var(--mt-border));
}
[data-theme="dark"] .ex-plan__eyebrow {
    color: color-mix(in oklab, var(--plan-accent) 45%, #fff);
}
[data-theme="dark"] .ex-plan__title { color: var(--mt-text); }

/* ── Detail header ── */
.ex-detail-header {
    display:flex; align-items:flex-start; justify-content:space-between;
    gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap;
}
.ex-detail-header__left { display:flex; flex-direction:column; gap:0.5rem; flex:1; min-width:0; }
.ex-detail-badges { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
.ex-detail-title {
    font-family:var(--font-display); font-size:clamp(1.4rem,3vw,2rem); font-weight:700;
    color:var(--mt-primary); margin:0; letter-spacing:-0.02em; line-height:1.15;
}
.ex-detail-dateline {
    display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap;
    font-family:var(--mt-font); font-size:0.82rem; color:var(--mt-text-light);
}
.ex-compose { max-width:760px; }

/* ── Theory / how-to panel ── */
.ex-theory-section {
    background:#fff; border:1.5px solid var(--mt-border); border-radius:var(--mt-radius);
    padding:1.25rem 1.5rem; margin-top:1rem;
}
.ex-theory-section__title {
    display:flex; align-items:center; gap:0.5rem; margin:0 0 0.75rem;
    font-family:var(--font-display); font-size:1.05rem; font-weight:700; color:var(--mt-primary);
}
.ex-theory-section__subtitle {
    margin:1.25rem 0 0.5rem; font-family:var(--font-display);
    font-size:0.95rem; font-weight:600; color:var(--mt-primary);
}

/* ── Form helpers ── */
.ex-form-row { display:flex; gap:1rem; flex-wrap:wrap; }
.ex-required { color:#ef4444; }
.ex-validation-msg { font-family:var(--mt-font); font-size:0.8rem; color:#ef4444; margin-top:0.2rem; display:block; }
.ex-tag-input-row { display:flex; gap:0.5rem; align-items:center; }
.ex-tags-display { display:flex; gap:0.4rem; flex-wrap:wrap; margin-top:0.5rem; }
.ex-tag-removable { display:inline-flex; align-items:center; gap:0.3rem; padding-right:0.35rem; }
.ex-tag-remove {
    background:none; border:none; padding:0; cursor:pointer; color:var(--mt-secondary);
    display:inline-flex; align-items:center; opacity:0.7; transition:opacity 150ms;
}
.ex-tag-remove:hover { opacity:1; }

/* ── Plan detail ── */
.pl-section-header {
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:0.85rem; flex-wrap:wrap; gap:0.5rem;
}
.pl-add-panel {
    background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:var(--mt-radius);
    padding:1.25rem; margin-bottom:1rem; display:flex; flex-direction:column; gap:0.75rem;
}
.pl-add-panel__title { font-family:var(--mt-font); font-size:0.95rem; font-weight:700; color:var(--mt-primary); margin:0; }
.pl-add-panel__empty { font-family:var(--mt-font); font-size:0.85rem; color:var(--mt-text-light); font-style:italic; margin:0; }
.pl-picker { display:flex; flex-direction:column; gap:0.3rem; max-height:200px; overflow-y:auto; border-radius:var(--mt-radius-sm); }
.pl-picker-item {
    display:flex; align-items:center; justify-content:space-between; gap:0.5rem;
    padding:0.6rem 0.85rem; background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius-sm); cursor:pointer; text-align:left;
    font-family:var(--mt-font); transition:border-color 150ms, background 150ms;
}
.pl-picker-item:hover { border-color:var(--mt-secondary); background:#EFF6FF; }
.pl-picker-item--selected { border-color:var(--mt-secondary); background:#EFF6FF; }
.pl-picker-item__title { font-size:0.875rem; font-weight:600; color:var(--mt-primary); }
.pl-picker-item__meta { display:flex; gap:0.3rem; flex-shrink:0; }
.pl-add-fields { display:flex; gap:0.75rem; flex-wrap:wrap; align-items:flex-end; }
.pl-items-list { display:flex; flex-direction:column; gap:0.5rem; }
.pl-item {
    display:flex; align-items:center; gap:1rem; padding:0.85rem 1rem;
    background:#fff; border:1.5px solid var(--mt-border); border-radius:var(--mt-radius-sm);
    transition:border-color 200ms;
}
.pl-item:hover { border-color:#BFDBFE; }
.pl-item__order {
    width:32px; height:32px; border-radius:50%; background:var(--mt-secondary); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-family:var(--mt-font); font-size:0.8rem; font-weight:700; flex-shrink:0;
}
.pl-item__info { flex:1; min-width:0; display:flex; flex-direction:column; gap:0.2rem; }
.pl-item__name { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
.pl-item__link {
    font-family:var(--mt-font); font-size:0.9rem; font-weight:600; color:var(--mt-secondary);
    text-decoration:none; transition:color 150ms;
}
.pl-item__link:hover { color:var(--mt-primary); text-decoration:none; }
.pl-item__notes { font-family:var(--mt-font); font-size:0.8rem; color:var(--mt-text-light); margin:0; }
.pl-item__remove {
    background:none; border:1.5px solid var(--mt-border); border-radius:8px; padding:0.35rem;
    cursor:pointer; color:var(--mt-text-light); display:flex; align-items:center;
    transition:border-color 150ms, color 150ms, background 150ms; flex-shrink:0;
}
.pl-item__remove:hover { border-color:#FECACA; color:#ef4444; background:#FEF2F2; }
.pl-item__remove:disabled { opacity:0.4; cursor:not-allowed; }

/* ════════════════════════════════════════════════════════════
   MUSIC SHEETS PAGE
   ms- prefix
════════════════════════════════════════════════════════════ */

.ms-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 9.2rem);
    height: calc(100dvh - 9.2rem);
    overflow: hidden;
}

.ms-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: 1fr;
    gap: 1.25rem;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

@media (max-width: 768px) {
    .ms-page { height: auto; overflow: visible; }
    .ms-layout { grid-template-columns: 1fr; grid-template-rows: auto; flex: none; align-items: start; }
    .ms-list-panel { overflow-y: visible; min-height: auto; }
}

.ms-list-panel { display: flex; flex-direction: column; gap: 0.5rem; overflow-y: auto; min-height: 0; }

.ms-sheet-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: var(--mt-font);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.ms-sheet-card:hover {
    border-color: var(--mt-secondary);
    box-shadow: var(--mt-shadow);
    transform: translateY(-1px);
}

.ms-sheet-card--active {
    border-color: var(--mt-secondary);
    background: linear-gradient(135deg, #EFF6FF 0%, #fff 60%);
    box-shadow: var(--mt-shadow);
}

.ms-sheet-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--mt-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 200ms ease;
}

.ms-sheet-card--active .ms-sheet-card__icon {
    background: var(--mt-accent-dark);
}

.ms-sheet-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ms-sheet-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--mt-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.ms-sheet-card__meta {
    font-size: 0.78rem;
    color: var(--mt-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-sheet-card__tags { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.15rem; }

.ms-sheet-card__date {
    font-size: 0.72rem;
    color: var(--mt-text-light);
    flex-shrink: 0;
    align-self: flex-start;
}

/* Viewer panel */
.ms-viewer-panel {
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-lg);
    box-shadow: var(--mt-shadow);
    overflow: hidden;
    overflow-y: auto;
    min-height: 440px;
}

.ms-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1.5px solid var(--mt-border);
    background: var(--mt-surface);
    flex-wrap: wrap;
}

.ms-viewer-header__info { display: flex; flex-direction: column; gap: 0.15rem; }

.ms-viewer-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.ms-viewer-composer {
    font-family: var(--mt-font);
    font-size: 0.85rem;
    color: var(--mt-text-muted);
    margin: 0;
}

.ms-viewer-body { padding: 1.25rem; }

.ms-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 5rem 2rem;
    text-align: center;
}

.ms-viewer-placeholder__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--mt-surface-2);
    border: 1.5px solid var(--mt-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mt-text-light);
}

.ms-viewer-placeholder__text {
    font-family: var(--mt-font);
    font-size: 0.95rem;
    color: var(--mt-text-muted);
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   AUTH PAGES (login / register)
   auth- prefix
════════════════════════════════════════════════════════════ */

.auth-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: #fff;
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-lg);
    box-shadow: var(--mt-shadow);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 1.75rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--mt-surface) 0%, #fff 100%);
    border-bottom: 1.5px solid var(--mt-border);
}

.auth-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--mt-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
}

.auth-card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.auth-card__subtitle {
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text-muted);
    margin: 0;
}

.auth-card__body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-footer {
    padding: 1.1rem 1.75rem;
    border-top: 1.5px solid var(--mt-border);
    background: var(--mt-surface);
    text-align: center;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text-muted);
}

.auth-footer a {
    color: var(--mt-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color 150ms ease;
}
.auth-footer a:hover { color: var(--mt-primary); }

.auth-validation {
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.2rem;
    display: block;
}

.auth-check-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    color: var(--mt-text-muted);
    cursor: pointer;
}

.auth-check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--mt-secondary);
    cursor: pointer;
}

/* ════════════════════════════════════════════════════════════
   ERROR PAGE
   err- prefix
════════════════════════════════════════════════════════════ */

.err-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.err-card {
    background: #fff;
    border: 2px solid #FECACA;
    border-radius: var(--mt-radius-lg);
    box-shadow: var(--mt-shadow);
    width: 100%;
    max-width: 540px;
    overflow: hidden;
}

.err-card__header {
    padding: 2.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, #FEF2F2 0%, #fff 60%);
    border-bottom: 2px solid #FECACA;
    text-align: center;
}

.err-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #FEF2F2;
    border: 2px solid #FECACA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
}

.err-card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--mt-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.err-card__sub {
    font-family: var(--mt-font);
    font-size: var(--text-base);
    color: var(--mt-text-muted);
    margin: 0;
    max-width: 42ch;
}

.err-card__body {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.err-request-id {
    background: var(--mt-surface-2);
    border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-sm);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-family: var(--mt-font);
    font-size: 0.85rem;
    color: var(--mt-text-muted);
    flex-wrap: wrap;
}

.err-request-id__label { font-weight: 600; color: var(--mt-text); white-space: nowrap; }

.err-request-id__code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    color: var(--mt-secondary);
    word-break: break-all;
}

.err-hint {
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    border-radius: var(--mt-radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--mt-font);
    font-size: 0.85rem;
    color: #1D4ED8;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.6;
}

.err-card__footer {
    padding: 1.25rem 2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   GLOBAL MOTION UTILITIES
════════════════════════════════════════════════════════════ */

@keyframes page-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Apply to any page container for a subtle entry */
.page-enter {
    animation: page-fade-up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .page-enter { animation: none; }
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.mt-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--mt-text-light);
    border-top: 1px solid var(--mt-border);
    margin-top: 2rem;
    font-family: var(--mt-font);
}
.mt-footer a {
    color: inherit;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 150ms ease;
}
.mt-footer a:hover { color: var(--mt-text); }

/* ============================================================
   Top navbar + dropdowns
   Global (not scoped) so styles reach <NavLink>-rendered <a>
   elements, which don't receive Blazor scope attributes.
   All selectors are uniquely mt-* prefixed — no collisions.
   ============================================================ */

/* ── Navbar shell ── */
.mt-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--mt-ink-2) 0%, var(--mt-ink) 100%);
    border-bottom: 1px solid var(--mt-ink-line);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 28px rgba(11,6,32,0.35);
    width: 100%;
}

/* Translucent glass once content scrolls underneath — the bar earns its blur. */
@supports (backdrop-filter: blur(1px)) {
    .mt-navbar {
        background: linear-gradient(180deg,
            color-mix(in oklab, var(--mt-ink-2) 88%, transparent) 0%,
            color-mix(in oklab, var(--mt-ink) 88%, transparent) 100%);
        backdrop-filter: saturate(150%) blur(14px);
        -webkit-backdrop-filter: saturate(150%) blur(14px);
    }
}

.mt-navbar__inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 1rem;
    height: 3.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Brand ── */
.mt-navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.mt-navbar__brand:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.mt-navbar__brand svg {
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mt-navbar__brand:hover svg {
    transform: rotate(-8deg) scale(1.08);
}

/* ── Mobile hamburger ── */
.mt-navbar__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 400;
}

/* ── Backdrop ── */
.mt-navbar__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 98;
    animation: mt-backdrop-in 200ms ease-out;
}

@keyframes mt-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Nav container ── */
.mt-navbar__nav {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
}

/* ── Direct link (Home) ── */
.mt-navbar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--mt-radius-sm);
    transition: color 150ms ease, background 150ms ease,
                transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
}

.mt-navbar__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.mt-navbar__link:active {
    transform: translateY(0) scale(0.97);
}

.mt-navbar__link.active {
    color: #fff;
    background: rgba(52, 211, 153, 0.14);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35);
    font-weight: 600;
}

.mt-navbar__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}

/* ── Dropdown component ── */
.mt-nav-dropdown {
    position: relative;
    flex-shrink: 0;
}

.mt-nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--mt-font);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--mt-radius-sm);
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 150ms ease, background 150ms ease,
                transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mt-nav-dropdown__toggle:hover,
.mt-nav-dropdown--open .mt-nav-dropdown__toggle {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mt-nav-dropdown__toggle:hover {
    transform: translateY(-1px);
}

.mt-nav-dropdown__toggle:active {
    transform: translateY(0) scale(0.97);
}

.mt-nav-dropdown__toggle.active {
    color: #fff;
    background: rgba(52, 211, 153, 0.14);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35);
    font-weight: 600;
}

.mt-nav-dropdown__toggle.active .mt-navbar__icon {
    color: var(--mt-accent);
}

.mt-nav-dropdown__caret {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.mt-nav-dropdown--open .mt-nav-dropdown__caret {
    transform: rotate(180deg);
}

.mt-nav-dropdown__toggle--compact {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
}

.mt-nav-dropdown__toggle--user {
    gap: 0.4rem;
}

.mt-nav-dropdown__username {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Dropdown menu panel ── */
.mt-nav-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    /* Fixed light card: the navbar is always dark, so a white panel reads
       cleanly in both themes (like OneManager). Theme vars would make it
       dark-on-dark and invisible in dark mode. */
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--mt-radius);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 16px 40px rgba(15, 23, 42, 0.18);
    min-width: 200px;
    z-index: 200;
    padding: 0.375rem 0;
}

.mt-nav-dropdown__menu {
    transform-origin: top center;
}

.mt-nav-dropdown--open .mt-nav-dropdown__menu {
    display: block;
    animation: mt-dropdown-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mt-nav-dropdown__menu--right {
    left: auto;
    right: 0;
    transform-origin: top right;
}

@keyframes mt-dropdown-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger each item in as the panel opens */
.mt-nav-dropdown--open .mt-nav-dropdown__menu > * {
    animation: mt-dropdown-item-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(1) { animation-delay: 0.04s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(2) { animation-delay: 0.08s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(3) { animation-delay: 0.12s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(4) { animation-delay: 0.16s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(5) { animation-delay: 0.20s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(6) { animation-delay: 0.24s; }
.mt-nav-dropdown--open .mt-nav-dropdown__menu > *:nth-child(n+7) { animation-delay: 0.28s; }

@keyframes mt-dropdown-item-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Dropdown items ── */
.mt-nav-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    margin: 0 0.375rem;
    border-radius: var(--mt-radius-sm);
    color: #475569;
    font-family: var(--mt-font);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 120ms ease, background 120ms ease,
                transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    width: calc(100% - 0.75rem);
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.mt-nav-dropdown__item .mt-navbar__icon {
    color: #94a3b8;
    transition: color 120ms ease;
}

.mt-nav-dropdown__item:hover {
    color: #0f172a;
    background: #f1f5f9;
    text-decoration: none;
    transform: translateX(2px);
}

.mt-nav-dropdown__item:hover .mt-navbar__icon {
    color: #475569;
}

.mt-nav-dropdown__item.active {
    color: var(--mt-accent-dark);
    font-weight: 600;
}

.mt-nav-dropdown__item.active .mt-navbar__icon {
    color: var(--mt-accent-dark);
}

.mt-nav-dropdown__item--danger {
    color: #ef4444;
}

.mt-nav-dropdown__item--danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.mt-nav-dropdown__sep {
    border: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin: 0.375rem 0;
}

.mt-nav-dropdown__action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.875rem;
    margin: 0 0.375rem;
    border-radius: var(--mt-radius-sm);
    color: #475569;
    font-family: var(--mt-font);
    font-size: 0.8rem;
    font-weight: 500;
    width: calc(100% - 0.75rem);
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: color 120ms ease, background 120ms ease;
    white-space: nowrap;
}

.mt-nav-dropdown__action:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.mt-nav-dropdown__action.active {
    color: var(--mt-accent-dark);
    font-weight: 600;
}

/* ── Right-side actions ── */
.mt-navbar__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Theme cycle (guest desktop) ── */
.mt-navbar__theme-cycle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--mt-radius-sm);
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    transition: color 150ms ease, background 150ms ease;
}

.mt-navbar__theme-cycle:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* ── Auth icon buttons (guest desktop) ── */
.mt-navbar__auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--mt-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: none;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.mt-navbar__auth-icon svg {
    width: 18px;
    height: 18px;
}

.mt-navbar__auth-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.mt-navbar__auth-icon--primary {
    color: var(--mt-ink);
    background: var(--mt-accent);
    border-color: transparent;
}

.mt-navbar__auth-icon--primary:hover {
    color: var(--mt-ink);
    background: var(--mt-accent-dark);
    transform: translateY(-1px);
}

/* ── Auth buttons ── */
.mt-navbar__signin {
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: var(--mt-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    transition: color 150ms ease, background 150ms ease;
    white-space: nowrap;
}

.mt-navbar__signin:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.mt-navbar__register {
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: var(--mt-ink);
    background: var(--mt-accent);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: var(--mt-radius-sm);
    font-weight: 700;
    transition: background 150ms ease, transform 150ms ease;
    white-space: nowrap;
}

.mt-navbar__register:hover {
    background: var(--mt-accent-dark);
    transform: translateY(-1px);
    text-decoration: none;
}

.mt-navbar__signout {
    font-family: var(--mt-font);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: var(--mt-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: color 150ms ease, background 150ms ease;
    white-space: nowrap;
}

.mt-navbar__signout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* ── Mobile auth (only shown inside drawer) ── */
.mt-navbar__mobile-auth {
    display: none;
}

/* ── Tablet: 641–1024px ── */
@media (max-width: 1024px) {
    .mt-navbar__inner { padding: 0 0.75rem; }

    .mt-nav-dropdown__toggle {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
        gap: 0.25rem;
    }

    .mt-navbar__link {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    .mt-nav-dropdown__username { max-width: 80px; }

    .mt-navbar__icon { width: 15px; height: 15px; }
}

/* ── Mobile: ≤640px ── */
@media (max-width: 640px) {
    .mt-navbar__inner { padding: 0 0.75rem; }
    .mt-navbar__brand span { display: none; }

    .mt-navbar__toggle { display: flex; }

    /* Actions collapse on mobile */
    .mt-navbar__actions { display: none; }

    /* Nav becomes full-screen drawer */
    .mt-navbar__nav {
        position: fixed;
        top: 3.5rem;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, var(--mt-ink-2) 0%, var(--mt-ink) 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0;
        margin-left: 0;
        overflow-y: auto;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        z-index: 99;
        transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
                    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .mt-navbar__nav--open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Home link */
    .mt-navbar__link {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        width: 100%;
        min-height: 44px;
        border-radius: var(--mt-radius-sm);
        gap: 0.5rem;
    }

    /* Dropdowns stack inline in drawer */
    .mt-nav-dropdown {
        width: 100%;
    }

    .mt-nav-dropdown__toggle {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
        border-radius: var(--mt-radius-sm);
        justify-content: flex-start;
    }

    .mt-nav-dropdown__caret { margin-left: auto; }

    .mt-nav-dropdown__menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid rgba(255,255,255,0.12);
        border-radius: 0;
        margin-left: 1rem;
        padding: 0.25rem 0;
        background: transparent;
        animation: none !important;
    }

    .mt-nav-dropdown--open .mt-nav-dropdown__menu {
        display: block;
    }

    .mt-nav-dropdown--open .mt-nav-dropdown__menu > * {
        animation: none !important;
    }

    .mt-nav-dropdown__item {
        padding: 0.75rem 1rem;
        margin: 0;
        width: 100%;
        border-radius: var(--mt-radius-sm);
        font-size: 0.9rem;
        min-height: 44px;
        color: rgba(255, 255, 255, 0.7);
    }

    .mt-nav-dropdown__item .mt-navbar__icon {
        color: rgba(255, 255, 255, 0.5);
    }

    .mt-nav-dropdown__item:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }

    .mt-nav-dropdown__item.active {
        color: var(--mt-accent);
    }

    /* Mobile auth section visible */
    .mt-navbar__mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .mt-navbar__mobile-user-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .mt-navbar__mobile-user {
        font-family: var(--mt-font);
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        font-weight: 500;
    }

    .mt-navbar__mobile-prefs {
        padding: 0.5rem 0;
    }

    .mt-navbar__mobile-prefs-label {
        font-family: var(--mt-font);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
        display: block;
        margin-bottom: 0.5rem;
    }

    .mt-navbar__mobile-theme {
        display: flex;
        gap: 0.25rem;
    }

    .mt-navbar__mobile-theme button {
        flex: 1;
        padding: 0.5rem 0.25rem;
        background: rgba(255,255,255,0.07);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: var(--mt-radius-sm);
        color: rgba(255,255,255,0.6);
        font-family: var(--mt-font);
        font-size: 0.78rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 150ms ease, color 150ms ease;
        min-height: 40px;
    }

    .mt-navbar__mobile-theme button.active {
        background: rgba(52, 211, 153, 0.15);
        border-color: rgba(52, 211, 153, 0.4);
        color: #fff;
    }

    .mt-navbar__signout,
    .mt-navbar__signin,
    .mt-navbar__register {
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Staggered slide-in */
    .mt-navbar__nav--open > * {
        animation: mt-nav-item-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .mt-navbar__nav--open > *:nth-child(1) { animation-delay: 0.04s; }
    .mt-navbar__nav--open > *:nth-child(2) { animation-delay: 0.10s; }
    .mt-navbar__nav--open > *:nth-child(3) { animation-delay: 0.16s; }
    .mt-navbar__nav--open > *:nth-child(4) { animation-delay: 0.22s; }
    .mt-navbar__nav--open > *:nth-child(5) { animation-delay: 0.28s; }
}

@keyframes mt-nav-item-in {
    from { opacity: 0; transform: translateX(-1.5rem); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Badge pops in when its count arrives */
.mt-navbar__badge {
    animation: mt-badge-pop 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mt-badge-pop {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mt-navbar__nav--open > *,
    .mt-navbar__backdrop,
    .mt-navbar__badge,
    .mt-nav-dropdown--open .mt-nav-dropdown__menu,
    .mt-nav-dropdown--open .mt-nav-dropdown__menu > * { animation: none !important; }

    .mt-navbar__nav,
    .mt-navbar__link,
    .mt-navbar__brand svg,
    .mt-nav-dropdown__toggle,
    .mt-nav-dropdown__item { transition: none !important; transform: none !important; }
}

/* ============================================================
   Analytics / Progress
   ============================================================ */
.an-stats {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
    gap:1rem; margin-bottom:1.5rem;
}
.an-stat {
    display:flex; flex-direction:column; gap:0.35rem;
    padding:1.1rem 1.25rem; background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow);
}
[data-theme="dark"] .an-stat { background:var(--mt-surface-2); border-color:var(--mt-border); }
.an-stat--accent { border-color:rgba(34,197,94,0.5); box-shadow:0 0 0 1px rgba(34,197,94,0.25), var(--mt-shadow); }
.an-stat__value { font-family:var(--mt-font); font-size:1.75rem; font-weight:800; color:var(--mt-primary); line-height:1; letter-spacing:-0.02em; }
.an-stat--accent .an-stat__value { color:var(--mt-accent-dark); }
.an-stat__suffix { font-size:0.9rem; font-weight:600; color:var(--mt-text-light); margin-left:0.15rem; }
.an-stat__label { font-family:var(--mt-font); font-size:0.72rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--mt-text-light); }

.an-panel {
    padding:1.25rem 1.4rem; margin-bottom:1.5rem;
    background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow);
}
[data-theme="dark"] .an-panel { background:var(--mt-surface-2); border-color:var(--mt-border); }
.an-panel__title { font-family:var(--mt-font); font-size:1rem; font-weight:700; color:var(--mt-text); margin:0 0 1rem; }
.an-muted { color:var(--mt-text-light); font-size:0.875rem; margin:0; }
/* Sub-heading inside a panel — groups several bar lists under one title. */
.an-panel__subtitle { font-family:var(--mt-font); font-size:0.8rem; font-weight:700; letter-spacing:0.04em;
                      text-transform:uppercase; color:var(--mt-text-muted); margin:1.5rem 0 0.75rem; }
.an-panel__subtitle:first-of-type { margin-top:1rem; }
.an-grid2 { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:1.5rem; }
.an-grid2 .an-panel { margin-bottom:0; }
/* Secondary stat rows sit tighter than the page's headline numbers. */
.an-stats--compact { grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:0.75rem; margin-bottom:1rem; }
.an-stats--compact .an-stat { padding:0.8rem 0.9rem; }
.an-stats--compact .an-stat__value { font-size:1.35rem; }

/* Tiles / rows that navigate somewhere. */
.an-stat--link { text-decoration:none; transition:border-color 150ms ease, transform 150ms ease; }
.an-stat--link:hover { border-color:var(--mt-primary-light); transform:translateY(-2px); text-decoration:none; }
.an-row--link { text-decoration:none; }
.an-row--link:hover .an-row__label { color:var(--mt-primary); }

/* Back to the page this detail view was opened from. */
.an-back {
    display:inline-block; margin-bottom:0.4rem; font-size:0.82rem; font-weight:700;
    color:var(--mt-text-light); text-decoration:none;
}
.an-back:hover { color:var(--mt-primary); }

/* Panel header with a control on the right (e.g. the 7d/30d range toggle). */
.an-panel__head { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.an-panel__head .an-panel__title { margin:0; }
.an-toggle {
    display:inline-flex; gap:0.2rem; padding:0.2rem;
    background:var(--mt-surface-2); border:1.5px solid var(--mt-border); border-radius:100px;
}
.an-toggle__btn {
    font-family:var(--mt-font); font-size:0.75rem; font-weight:700; letter-spacing:0.02em;
    padding:0.3rem 0.85rem; border:0; border-radius:100px; cursor:pointer;
    background:transparent; color:var(--mt-text-light);
    transition:background 150ms ease, color 150ms ease;
}
.an-toggle__btn:hover { color:var(--mt-primary); }
.an-toggle__btn--on { background:var(--mt-primary); color:#fff; }
.an-toggle__btn--on:hover { color:#fff; }

/* ============================================================
   Dashboard (/dashboard)
   ============================================================ */
/* ── Identity header: name → profile ── */
.dash-head { margin-bottom:1.5rem; }
.dash-id {
    display:inline-flex; align-items:center; gap:0.85rem; text-decoration:none;
    padding:0.5rem 0.9rem 0.5rem 0.5rem; border-radius:100px;
    border:1.5px solid transparent; transition:border-color 150ms ease, background 150ms ease;
}
.dash-id:hover { border-color:var(--mt-border); background:#fff; text-decoration:none; }
[data-theme="dark"] .dash-id:hover { background:var(--mt-surface-2); }
.dash-id__avatar {
    display:grid; place-items:center; width:44px; height:44px; flex-shrink:0;
    border-radius:50%; background:linear-gradient(135deg, var(--mt-primary), var(--mt-primary-light));
    color:#fff; font-family:var(--font-display); font-weight:800; font-size:1.15rem;
    box-shadow:var(--mt-shadow);
}
.dash-id__text { display:flex; flex-direction:column; gap:0.1rem; line-height:1.15; }
.dash-id__name { font-family:var(--font-display); font-size:1.25rem; font-weight:700; color:var(--mt-text); letter-spacing:-0.02em; }
.dash-id__link { font-family:var(--mt-font); font-size:0.78rem; font-weight:600; color:var(--mt-primary); }

/* ── Hero numbers ── */
.dash-hero {
    display:grid; grid-template-columns:minmax(220px, 1fr) 2fr; gap:1rem; margin-bottom:2rem;
}
.dash-hero__feature {
    display:flex; flex-direction:column; gap:0.35rem; justify-content:center;
    padding:1.5rem 1.6rem; border-radius:var(--mt-radius-lg);
    background:linear-gradient(150deg, var(--mt-primary), var(--mt-primary-dark));
    color:#fff; box-shadow:var(--mt-shadow-lg);
}
.dash-hero__feature-link {
    display:flex; flex-direction:column; gap:0.35rem; text-decoration:none; color:inherit;
    border-radius:var(--mt-radius); transition:opacity 150ms ease;
}
.dash-hero__feature-link:hover { opacity:0.85; text-decoration:none; }
.dash-hero__feature-num { font-family:var(--font-display); font-size:3.25rem; font-weight:800; line-height:0.9; letter-spacing:-0.03em; }
.dash-hero__feature-unit { font-size:1.5rem; font-weight:700; opacity:0.7; margin-left:0.15rem; }
.dash-hero__feature-label { font-size:0.75rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:rgba(255,255,255,0.8); }
.dash-hero__cta {
    margin-top:0.85rem; align-self:flex-start; text-decoration:none;
    padding:0.55rem 1.1rem; border-radius:var(--mt-radius-sm);
    background:var(--mt-accent); color:#04231a; font-weight:700; font-size:0.9rem;
    box-shadow:0 3px 0 var(--mt-accent-dark); transition:transform 150ms ease, box-shadow 150ms ease;
}
.dash-hero__cta:hover { transform:translateY(-1px); box-shadow:0 5px 0 var(--mt-accent-dark); text-decoration:none; }
.dash-hero__grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:1rem; }
@media (min-width:900px) { .dash-hero__grid { grid-template-columns:repeat(4, 1fr); } }
.dash-tile {
    display:flex; flex-direction:column; gap:0.4rem; justify-content:center;
    padding:1.1rem 1.25rem; background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow); text-decoration:none;
}
[data-theme="dark"] .dash-tile { background:var(--mt-surface-2); }
.dash-tile--link { transition:transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.dash-tile--link:hover { transform:translateY(-2px); border-color:var(--mt-primary-light); box-shadow:var(--mt-shadow-lg); text-decoration:none; }
.dash-tile--alert { border-color:rgba(34,197,94,0.5); box-shadow:0 0 0 1px rgba(34,197,94,0.25), var(--mt-shadow); }
.dash-tile__num { font-family:var(--font-display); font-size:1.85rem; font-weight:800; color:var(--mt-primary); line-height:1; letter-spacing:-0.02em; }
.dash-tile--alert .dash-tile__num { color:var(--mt-accent-dark); }
.dash-tile__num-sub { font-size:1rem; font-weight:600; color:var(--mt-text-light); }
.dash-tile__label { font-family:var(--mt-font); font-size:0.72rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--mt-text-light); }

/* ── Jump back in — recent columns ── */
.dash-section-title { font-family:var(--font-display); font-size:1.15rem; font-weight:700; color:var(--mt-text); letter-spacing:-0.02em; margin:0 0 1rem; }
.dash-recent { margin-bottom:2rem; }
.dash-recent__grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:1rem; }
.dash-col {
    display:flex; flex-direction:column; gap:0.4rem;
    padding:1rem 1.1rem; background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow);
}
[data-theme="dark"] .dash-col { background:var(--mt-surface-2); }
.dash-col__head { display:flex; align-items:baseline; justify-content:space-between; gap:0.5rem; margin-bottom:0.4rem; }
.dash-col__title { font-family:var(--mt-font); font-size:0.72rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--mt-text-light); }
.dash-col__all { font-size:0.75rem; font-weight:600; color:var(--mt-primary); text-decoration:none; }
.dash-col__all:hover { text-decoration:underline; }
.dash-item {
    display:flex; flex-direction:column; gap:0.1rem; text-decoration:none;
    padding:0.5rem 0.65rem; margin:0 -0.35rem; border-radius:var(--mt-radius-sm);
    font-size:0.9rem; font-weight:600; color:var(--mt-text); transition:background 120ms ease;
}
.dash-item:hover { background:var(--mt-surface-2); text-decoration:none; }
[data-theme="dark"] .dash-item:hover { background:rgba(255,255,255,0.05); }
.dash-item__meta { font-size:0.78rem; font-weight:500; color:var(--mt-text-light); }
/* Merged session card — left accent stripe + type chip (indigo = exercise, green = sheet). */
.dash-card {
    display:flex; flex-direction:column; gap:0.15rem;
    padding:0.85rem 1rem; background:#fff;
    border:1.5px solid var(--mt-border); border-left-width:4px;
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow);
}
[data-theme="dark"] .dash-card { background:var(--mt-surface-2); }
.dash-card--exercise { border-left-color:#4338CA; }
.dash-card--sheet { border-left-color:#22C55E; }
.dash-card .dash-item { margin:0; padding:0; }
.dash-card .dash-item:hover { background:transparent; }
.dash-item__row { display:flex; align-items:flex-start; justify-content:space-between; gap:0.5rem; }
.dash-item__title { min-width:0; overflow-wrap:anywhere; }
.dash-type {
    flex-shrink:0; align-self:flex-start; margin-top:0.1rem;
    padding:0.12rem 0.4rem; border-radius:0.35rem;
    font-size:0.6rem; font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
    color:#fff; line-height:1.35;
}
.dash-type--exercise { background:#4338CA; }
.dash-type--sheet { background:#22C55E; }
/* "Next: …" continue affordance under a completed session. */
.dash-next {
    display:block; text-decoration:none; margin:-0.15rem 0 0.3rem 0.65rem;
    padding:0.3rem 0.55rem; border-left:2px solid var(--mt-accent);
    font-size:0.82rem; font-weight:600; color:var(--mt-accent-dark);
}
.dash-next:hover { background:var(--mt-surface-2); text-decoration:none; }
[data-theme="dark"] .dash-next:hover { background:rgba(255,255,255,0.05); }
.dash-next__label { font-size:0.66rem; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--mt-text-light); margin-right:0.35rem; }

/* ── Role-block buttons (light-panel safe; lp-btn ghost/outline are white-on-white here) ── */
.dash-block .dash-actions { display:flex; flex-wrap:wrap; gap:0.6rem; margin-top:1rem; }
.dash-btn {
    display:inline-flex; align-items:center; gap:0.4rem; text-decoration:none;
    padding:0.55rem 1.1rem; border-radius:var(--mt-radius-sm);
    font-family:var(--mt-font); font-weight:600; font-size:0.9rem;
    background:var(--mt-surface-2); color:var(--mt-text); border:1.5px solid var(--mt-border);
    transition:transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
[data-theme="dark"] .dash-btn { background:rgba(255,255,255,0.06); }
.dash-btn:hover { transform:translateY(-1px); border-color:var(--mt-primary-light); text-decoration:none; }
.dash-btn--primary {
    background:var(--mt-accent); color:#04231a; border-color:var(--mt-accent-dark);
    box-shadow:0 3px 0 var(--mt-accent-dark);
}
/* The [data-theme="dark"] .dash-btn rule (0,2,0) outweighs .dash-btn--primary (0,1,0),
   stripping the accent fill and leaving dark text on a dark panel. Re-assert it. */
[data-theme="dark"] .dash-btn--primary { background:var(--mt-accent); color:#04231a; }
.dash-btn--primary:hover { background:var(--mt-accent-dark); color:#fff; box-shadow:0 5px 0 var(--mt-accent-dark); }
[data-theme="dark"] .dash-btn--primary:hover { background:var(--mt-accent-dark); color:#04231a; }

/* ── Lists inside role blocks ── */
.dash-list { list-style:none; margin:0.75rem 0 0; padding:0; display:flex; flex-direction:column; }
.dash-list li { display:flex; align-items:baseline; gap:0.6rem; padding:0.5rem 0; border-top:1px solid var(--mt-border); }
.dash-list li:first-child { border-top:0; }
.dash-list__link { font-weight:600; font-size:0.92rem; color:var(--mt-text); text-decoration:none; }
.dash-list__link:hover { color:var(--mt-primary); text-decoration:underline; }
.dash-list__meta { font-size:0.78rem; color:var(--mt-text-light); }

/* ── Favourites (collapsed) ── */
.dash-fav {
    margin-bottom:1.5rem; background:#fff; border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius); box-shadow:var(--mt-shadow); overflow:hidden;
}
[data-theme="dark"] .dash-fav { background:var(--mt-surface-2); }
.dash-fav__summary {
    display:flex; align-items:center; justify-content:space-between; gap:0.5rem; cursor:pointer;
    padding:1rem 1.4rem; font-family:var(--mt-font); font-size:1rem; font-weight:700; color:var(--mt-text);
    list-style:none; user-select:none;
}
.dash-fav__summary::-webkit-details-marker { display:none; }
.dash-fav__caret { width:16px; height:16px; color:var(--mt-text-light); transition:transform 200ms ease; flex-shrink:0; }
.dash-fav[open] .dash-fav__caret { transform:rotate(180deg); }
.dash-fav__body { padding:0 1.4rem 1.25rem; }
.dash-fav__body .dash-list { margin-top:0; }
.dash-chips { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:0.75rem; }
.dash-chip {
    display:inline-flex; padding:0.35rem 0.85rem; border-radius:100px;
    background:var(--mt-surface-2); border:1.5px solid var(--mt-border);
    font-size:0.82rem; font-weight:600; color:var(--mt-text); text-decoration:none;
    transition:border-color 150ms ease, color 150ms ease;
}
[data-theme="dark"] .dash-chip { background:rgba(255,255,255,0.06); }
.dash-chip:hover { border-color:var(--mt-primary-light); color:var(--mt-primary); text-decoration:none; }

@media (max-width:640px) {
    .dash-hero { grid-template-columns:1fr; }
}

/* Horizontal bar rows */
.an-row { display:flex; align-items:center; gap:0.75rem; padding:0.35rem 0; }
.an-row__label { flex:0 0 7rem; font-size:0.82rem; font-weight:600; color:var(--mt-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.an-row__label--wide { flex-basis:14rem; }
.an-row__track { flex:1; height:0.6rem; background:var(--mt-surface-2); border-radius:100px; overflow:hidden; }
[data-theme="dark"] .an-row__track { background:rgba(255,255,255,0.08); }
.an-row__fill { height:100%; background:var(--mt-accent); border-radius:100px; min-width:2px; transition:width 300ms ease; }
.an-row__fill--beginner { background:#22C55E; }
.an-row__fill--intermediate { background:#4338CA; }
.an-row__fill--advanced { background:#f97316; }
.an-row__fill--expert { background:#ef4444; }
.an-row__value { flex:0 0 auto; font-size:0.8rem; font-weight:700; color:var(--mt-text); min-width:3rem; text-align:right; }

/* Daily vertical bars */
.an-daily { display:flex; align-items:flex-end; gap:3px; height:120px; }
.an-daily__col { flex:1; height:100%; display:flex; align-items:flex-end; }
.an-daily__bar { width:100%; background:var(--mt-accent); border-radius:3px 3px 0 0; min-height:4px; transition:height 300ms ease; }
.an-daily__col:hover .an-daily__bar { background:var(--mt-accent-dark); }

/* Practice session logging (exercise detail) */
.ex-log-panel {
    margin-top:1.25rem; padding:1.1rem 1.25rem;
    background:var(--mt-surface-2); border:1.5px solid var(--mt-border);
    border-radius:var(--mt-radius);
}
.ex-log-panel__title { font-family:var(--mt-font); font-size:0.95rem; font-weight:700; color:var(--mt-text); margin:0 0 0.85rem; }
.ex-log-form { display:flex; align-items:flex-end; gap:0.85rem; flex-wrap:wrap; }
.ex-log-field { display:flex; flex-direction:column; gap:0.3rem; }
.ex-log-field > span { font-size:0.72rem; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--mt-text-light); }
.ex-log-field input, .ex-log-field select { max-width:13rem; }
.ex-log-check { display:inline-flex; align-items:center; gap:0.4rem; font-size:0.875rem; color:var(--mt-text-muted); padding-bottom:0.55rem; }

/* ── Songs page: compact, space-efficient song grid ── */
.song-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:0.55rem; align-items:start; }
.song-card { display:flex; flex-direction:column; gap:0.45rem; padding:0.65rem 0.75rem; min-width:0; }
/* Composers / artists browse list */
.composer-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:0.55rem; align-items:start; }
.composer-card { display:flex; align-items:center; gap:0.5rem; padding:0.6rem 0.75rem; min-width:0; }
.composer-card__name { flex:1 1 auto; min-width:0; font-size:0.92rem; font-weight:600; text-decoration:none; color:inherit; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.composer-card__name:hover { text-decoration:underline; }
.composer-star { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0; border:none; border-radius:9px; background:transparent; color:var(--mt-text, currentColor); opacity:0.55; cursor:pointer; transition:opacity 150ms ease, background 150ms ease, color 150ms ease; }
.composer-star:hover { opacity:1; background:color-mix(in srgb, currentColor 10%, transparent); }
.composer-star svg { width:18px; height:18px; }
.composer-star--on { opacity:1; color:#F5B301; }

/* Transient toast feedback */
.app-toast-host { position:fixed; left:50%; top:76px; transform:translateX(-50%); z-index:10000; display:flex; flex-direction:column; gap:0.5rem; align-items:center; pointer-events:none; }
.app-toast { min-width:200px; max-width:90vw; padding:0.7rem 1.1rem; border-radius:12px; background:#1E1B4B; color:#F9FAFB; font-size:0.9rem; font-weight:500; box-shadow:0 12px 32px rgba(0,0,0,0.4); border:1px solid color-mix(in srgb, #fff 12%, transparent); opacity:0; transform:translateY(-12px); transition:opacity 200ms ease, transform 200ms ease; }
.app-toast--show { opacity:1; transform:translateY(0); }
.app-toast--success { background:#15803D; border-color:color-mix(in srgb, #22C55E 40%, transparent); }
.app-toast--danger { background:#B91C1C; border-color:color-mix(in srgb, #F87171 40%, transparent); }

.song-fav-toggle { display:inline-flex; align-items:center; gap:0.4rem; padding:0.45rem 0.85rem; border-radius:999px; border:1.5px solid color-mix(in srgb, currentColor 22%, transparent); background:transparent; color:inherit; font-size:0.85rem; font-weight:600; cursor:pointer; transition:background 150ms ease, border-color 150ms ease, color 150ms ease; }
.song-fav-toggle:hover { border-color:color-mix(in srgb, currentColor 40%, transparent); }
.song-fav-toggle svg { width:15px; height:15px; }
.song-fav-toggle--on { background:var(--mt-accent, #22C55E); border-color:var(--mt-accent, #22C55E); color:#0B0B14; }
.song-fav-toggle--compact { padding:0.45rem; width:38px; height:38px; justify-content:center; }
.song-fav-toggle--compact svg { width:17px; height:17px; }

.song-card__top { display:flex; align-items:flex-start; gap:0.4rem; }
.song-card__head { display:flex; flex-direction:column; gap:0.05rem; min-width:0; flex:1 1 auto; }

/* Per-song kebab "..." menu */
.song-menu { position:relative; flex:0 0 auto; }
.song-menu__trigger { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:0; border:none; border-radius:8px; background:transparent; color:var(--mt-text, currentColor); opacity:0.6; cursor:pointer; transition:background 150ms ease, opacity 150ms ease; }
.song-menu__trigger:hover { opacity:1; background:color-mix(in srgb, currentColor 10%, transparent); }
.song-menu__trigger svg { width:18px; height:18px; }
.song-menu__backdrop { position:fixed; inset:0; z-index:40; }
.song-menu__dropdown { position:absolute; top:calc(100% + 4px); right:0; z-index:50; min-width:200px; padding:0.3rem; border-radius:12px; background:var(--mt-surface, #1E1B4B); border:1px solid color-mix(in srgb, currentColor 14%, transparent); box-shadow:0 12px 32px rgba(0,0,0,0.35); display:flex; flex-direction:column; gap:0.1rem; }
.song-menu__item { display:flex; align-items:center; gap:0.6rem; width:100%; padding:0.5rem 0.6rem; border:none; border-radius:8px; background:transparent; color:inherit; font-size:0.85rem; text-align:left; cursor:pointer; transition:background 120ms ease; }
.song-menu__item:hover { background:color-mix(in srgb, currentColor 12%, transparent); }
.song-menu__item svg { width:16px; height:16px; flex:0 0 auto; }
.song-menu__item--danger { color:#F87171; }
.song-menu__item--danger:hover { background:color-mix(in srgb, #F87171 18%, transparent); }
.song-card__title { margin:0; font-size:0.92rem; font-weight:600; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.song-card__composer { font-size:0.76rem; opacity:0.62; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.song-card__parts { display:flex; flex-wrap:wrap; gap:0.3rem; min-width:0; }
.song-part { display:inline-flex; align-items:center; gap:0.25rem; padding:0.15rem 0.55rem; min-height:0; height:auto; max-width:100%; font-size:0.74rem; line-height:1.4; border-radius:999px; white-space:normal; overflow-wrap:break-word; text-align:left; }
.song-part svg { width:11px; height:11px; opacity:0.7; }

/* ── Song streaming links (Apple Music / Spotify / Tidal) ── */
.song-card__streaming { display:flex; flex-wrap:wrap; gap:0.3rem; }
.song-stream { display:inline-flex; align-items:center; gap:0.28rem; padding:0.15rem 0.55rem; font-size:0.72rem; line-height:1.4; border-radius:999px; text-decoration:none; border:1px solid rgba(255,255,255,0.18); color:rgba(255,255,255,0.72); transition:background .15s, border-color .15s, color .15s; }
.song-stream:hover { background:rgba(255,255,255,0.08); color:#fff; }
.song-stream svg { width:12px; height:12px; opacity:0.8; }
.song-stream--applemusic:hover { border-color:#fa243c; color:#ff6b7d; }
.song-stream--spotify:hover { border-color:#1db954; color:#1ed760; }
.song-stream--tidal:hover { border-color:#00d9d9; color:#3ff; }

/* ── Song metadata (year / genre / info / description) ── */
.song-card__meta { display:flex; flex-wrap:wrap; gap:0.3rem; margin-top:0.15rem; }
.song-meta-badge { display:inline-flex; align-items:center; padding:0.05rem 0.45rem; font-size:0.68rem; font-weight:600; letter-spacing:0.01em; border-radius:999px; background:rgba(99,102,241,0.16); color:#c7d2fe; }
.song-meta-badge--genre { background:rgba(34,197,94,0.14); color:#86efac; }

/* ── Sheet origin (provenance) badge: official edition / hobby arrangement / generated ── */
.song-origin-badge { display:inline-flex; align-items:center; gap:0.25rem; padding:0.05rem 0.45rem; font-size:0.68rem; font-weight:600; letter-spacing:0.01em; border-radius:999px; background:rgba(255,255,255,0.08); color:rgba(255,255,255,0.6); }
.song-origin-badge--official { background:rgba(34,197,94,0.16); color:#86efac; }
.song-origin-badge--arrangement { background:rgba(245,158,11,0.14); color:#fcd34d; }
.song-origin-badge--generated { background:rgba(99,102,241,0.16); color:#c7d2fe; }
.song-card__infoline { margin:0.15rem 0 0; font-size:0.74rem; color:rgba(255,255,255,0.6); }
.song-card__desc { margin:0.15rem 0 0; font-size:0.74rem; line-height:1.45; color:rgba(255,255,255,0.5); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ── Song info edit form (inside the shared modal) ── */
.song-info-form { display:flex; flex-direction:column; gap:0.7rem; }
.song-info-form__row { display:flex; gap:0.7rem; }
.song-info-form__field { display:flex; flex-direction:column; gap:0.25rem; font-size:0.78rem; color:rgba(255,255,255,0.75); }
.song-info-form__row .song-info-form__field { flex:1; }
.song-info-form__field input, .song-info-form__field textarea { width:100%; padding:0.45rem 0.6rem; border-radius:0.5rem; border:1px solid rgba(255,255,255,0.18); background:rgba(255,255,255,0.04); color:#fff; font:inherit; font-size:0.82rem; }
.song-info-form__field textarea { resize:vertical; min-height:4.5rem; }
.song-info-form__actions { display:flex; justify-content:flex-end; }

/* ── Song videos modal ── */
.song-videos__overlay { position:fixed; inset:0; z-index:60; display:flex; align-items:flex-start; justify-content:center; padding:5vh 1rem; overflow-y:auto; background:rgba(11,11,20,0.55); backdrop-filter:blur(2px); }
.song-videos { width:100%; max-width:760px; padding:1.25rem 1.4rem 1.5rem; border-radius:16px; background:var(--mt-surface, #1E1B4B); border:1px solid color-mix(in srgb, currentColor 14%, transparent); box-shadow:0 24px 64px rgba(0,0,0,0.45); }
.song-videos__header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.song-videos__title { margin:0; font-size:1.15rem; font-weight:700; line-height:1.2; }
.song-videos__sub { margin:0.15rem 0 0; font-size:0.82rem; opacity:0.62; }
.song-videos__close { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0; border:none; border-radius:8px; background:transparent; color:inherit; opacity:0.6; cursor:pointer; transition:background 150ms ease, opacity 150ms ease; }
.song-videos__close:hover { opacity:1; background:color-mix(in srgb, currentColor 12%, transparent); }
.song-videos__close svg { width:18px; height:18px; }
.song-videos__empty { font-size:0.88rem; opacity:0.65; margin:0.5rem 0 1rem; }
.song-videos__section { margin-bottom:1.1rem; }
.song-videos__section-title { margin:0 0 0.5rem; font-size:0.74rem; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--mt-text-light, #A5B4FC); }
.song-videos__grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:0.75rem; }
.song-video { display:flex; flex-direction:column; gap:0.35rem; }
.song-video__frame { position:relative; width:100%; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:#000; }
.song-video__frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.song-video__foot { display:flex; align-items:center; gap:0.5rem; }
.song-video__caption { flex:1 1 auto; min-width:0; font-size:0.8rem; opacity:0.8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.song-video__remove { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:0; border:none; border-radius:8px; background:transparent; color:#F87171; opacity:0.75; cursor:pointer; transition:background 120ms ease, opacity 120ms ease; }
.song-video__remove:hover { opacity:1; background:color-mix(in srgb, #F87171 18%, transparent); }
.song-video__remove svg { width:15px; height:15px; }
.song-videos__add { margin-top:0.5rem; padding-top:1rem; border-top:1px solid color-mix(in srgb, currentColor 12%, transparent); display:flex; flex-direction:column; gap:0.55rem; }
.song-videos__add-row { display:flex; gap:0.55rem; }
.song-videos__add-row select { flex:0 0 auto; }
.song-videos__add-row input { flex:1 1 auto; min-width:0; }
