#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f0f5;
}

/* ── App shell ─────────────────────────────── */
.rl-app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Header ────────────────────────────────── */
.rl-header {
    background: #1a1a2e;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rl-title { font-size: 1.4rem; font-weight: 600; }
.rl-btn-help {
    background: #2979ff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
}

/* ── Preview Banner ────────────────────────── */
.rl-preview-banner {
    background: #2979ff;
    color: #fff;
    text-align: center;
    padding: 7px 16px;
    font-size: 0.82rem;
    line-height: 1.4;
}
.rl-preview-link {
    color: #fff;
    text-decoration: underline;
    white-space: nowrap;
}

/* ── Controls ──────────────────────────────── */
.rl-controls {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    flex-wrap: wrap;
}
.rl-select-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 180px;
}
.rl-select-group label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.rl-select-group select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.95rem;
    font-weight: 600;
    background: #fafafa;
}

/* ── Toggles & Tempo ───────────────────────── */
.rl-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
}
.rl-toggles label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.rl-tempo, .rl-vol {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
}
.rl-tempo input, .rl-vol input { width: 100px; }
.rl-tempo-val { display: inline-block; width: 62px; font-variant-numeric: tabular-nums; }

/* ── Status ────────────────────────────────── */
.rl-status {
    font-size: 0.85rem;
    color: #555;
    padding: 4px 16px;
}

/* ── Play bar ──────────────────────────────── */
.rl-playbar {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    justify-content: center;
}
.rl-btn-play, .rl-btn-pause, .rl-btn-stop {
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    min-width: 80px;
    white-space: nowrap;
}
.rl-btn-play  { background: #2979ff; }
.rl-btn-pause { background: #ff9800; }
.rl-btn-stop  { background: #f44336; }
.rl-btn-play:disabled, .rl-btn-pause:disabled, .rl-btn-stop:disabled {
    opacity: 0.4; cursor: default;
}

/* ── Two-column main layout ────────────────── */
.rl-main-columns {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 0 8px;
    min-width: 0;
}

/* ── Pattern Group Panel (left) ─────────────── */
.rl-pattern-wrapper {
    flex: 0 0 35%;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.rl-pattern-groups {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rl-pattern-group {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.rl-group-label {
    background: #3949ab;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rl-group-num {
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 0.78rem;
    font-weight: 900;
    flex-shrink: 0;
}
.rl-preview-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 22px; height: 22px;
    font-size: 0.65rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.rl-preview-btn:hover { background: rgba(255,255,255,0.4); }

.rl-group-sym {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    flex-shrink: 0;
}
.rl-pattern-canvas {
    display: block;
    width: 100%;
    height: 124px;
    background: #fff;
}
.rl-legend-canvas {
    display: block;
    width: 100%;
    height: 44px;
    background: #eef;
    border-radius: 0 0 4px 4px;
}

/* ── Notation ──────────────────────────────── */
.rl-notation-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    min-width: 0;
}
.rl-notation-header {
    background: #e8eaf6;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #3949ab;
    letter-spacing: 0.04em;
}
.rl-notation-scroll {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rl-staff-row {
    margin: 2px 0;
}
.rl-row-active {
    outline: 2px solid #f9a825;
    border-radius: 2px;
}
.rl-row-looping {
    outline: 2px solid #2979ff;
    border-radius: 2px;
}
.rl-staff-row-clickable {
    cursor: pointer;
}
.rl-staff-row-clickable:hover {
    background: #f0f4ff;
    border-radius: 2px;
}
.rl-staff-canvas {
    display: block;
    width: 100%;
    height: 64px;
}
.rl-canvas {
    width: 100%;
    height: 52px;
    display: block;
}

/* ── Footer ────────────────────────────────── */
.rl-footer {
    background: linear-gradient(135deg, #0d1b3e 0%, #1a1a2e 60%, #0d2a4a 100%);
    color: #cdd9f0;
    margin-top: 12px;
    border-top: 3px solid #2979ff;
}
.rl-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.rl-footer-badge {
    background: #2979ff;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    margin-top: 4px;
    flex-shrink: 0;
}
.rl-footer-content { flex: 1; min-width: 0; }
.rl-footer-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}
.rl-footer-sub {
    font-size: 0.85rem;
    font-weight: 400;
    color: #90caf9;
    margin-left: 8px;
}
.rl-footer-desc {
    margin: 0 0 12px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #b0c4de;
}
.rl-footer-desc strong { color: #fff; }
.rl-footer-benefits {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 0.82rem;
    color: #b0c4de;
}
.rl-footer-benefits li strong { color: #90caf9; }
.rl-footer-cta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #2979ff;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
    min-width: 130px;
    transition: background 0.15s;
    align-self: center;
}
.rl-footer-cta span { font-size: 0.72rem; font-weight: 400; opacity: 0.85; }
.rl-footer-cta:hover { background: #1565c0; }

/* ── Help page ─────────────────────────────────── */
.rl-btn-back {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}
.rl-btn-back:hover { background: rgba(255,255,255,0.28); }
.rl-help-page {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rl-help-section {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    border: 1px solid #e0e0e0;
}
.rl-help-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3949ab;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rl-help-steps { display: flex; flex-direction: column; gap: 10px; }
.rl-help-step { display: flex; gap: 12px; align-items: flex-start; }
.rl-help-step-num {
    background: #3949ab;
    color: #fff;
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.rl-help-step p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: #333; }
.rl-help-grid { display: flex; flex-direction: column; gap: 8px; }
.rl-help-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.87rem;
    line-height: 1.5;
    color: #444;
}
.rl-help-label {
    background: #e8eaf6;
    color: #3949ab;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.rl-help-note {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f5f5f5;
    border-left: 3px solid #3949ab;
    font-size: 0.83rem;
    color: #555;
    line-height: 1.5;
}
.rl-help-book {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.rl-help-book p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: #444; flex: 1; min-width: 200px; }
.rl-help-book-link {
    background: #2979ff;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}
.rl-help-book-link:hover { background: #1565c0; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 600px) {
    .rl-btn-play, .rl-btn-pause, .rl-btn-stop {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-width: 80px;
    }
    .rl-tempo input, .rl-vol input { width: 70px; }
}

/* ── Landing Page ──────────────────────────────── */
.ld-page { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.ld-hero { background: linear-gradient(135deg, #0d1b3e 0%, #1a1a2e 60%, #0d2a4a 100%); color: #fff; padding: 60px 24px 52px; text-align: center; }
.ld-hero-badge { display: inline-block; background: #2979ff; color: #fff; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; padding: 4px 14px; border-radius: 20px; margin-bottom: 20px; text-transform: uppercase; }
.ld-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.ld-accent { color: #2979ff; }
.ld-hero-sub { font-size: 1.05rem; color: #90caf9; margin-bottom: 10px; font-weight: 600; }
.ld-hero-desc { font-size: clamp(0.95rem, 2vw, 1.1rem); color: #b0c4de; max-width: 660px; margin: 0 auto 36px; line-height: 1.75; }
.ld-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ld-btn-primary { background: #2979ff; color: #fff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 1rem; font-weight: 700; border: none; cursor: pointer; transition: background 0.15s; display: inline-block; }
.ld-btn-primary:hover { background: #1565c0; color: #fff; }
.ld-btn-secondary { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 1rem; font-weight: 700; border: 2px solid rgba(255,255,255,0.3); transition: background 0.15s; display: inline-block; }
.ld-btn-secondary:hover { background: rgba(255,255,255,0.22); }
.ld-audience-bar { background: #2979ff; color: #fff; text-align: center; padding: 14px 24px; font-size: 0.88rem; font-weight: 600; }
.ld-sep { opacity: 0.6; margin: 0 10px; }
.ld-white { background: #fff; }
.ld-gray { background: #f0f0f5; }
.ld-dark { background: linear-gradient(135deg, #0d1b3e 0%, #1a1a2e 60%, #0d2a4a 100%); }
.ld-section { max-width: 900px; margin: 0 auto; padding: 56px 24px; }
.ld-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #2979ff; margin-bottom: 10px; }
.ld-label-light { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #90caf9; margin-bottom: 10px; display: inline-block; background: rgba(41,121,255,0.2); padding: 4px 14px; border-radius: 20px; margin-bottom: 20px; }
.ld-section h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 20px; color: #111; line-height: 1.3; }
.ld-section p { font-size: 1rem; line-height: 1.85; color: #444; margin-bottom: 16px; }
.ld-section p strong { color: #1a1a2e; }
.ld-quote { background: #e8eaf6; border-left: 4px solid #2979ff; border-radius: 0 8px 8px 0; padding: 20px 24px; margin: 24px 0; font-size: 1rem; line-height: 1.75; color: #333; font-style: italic; }
.ld-who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 32px; }
.ld-who-card { background: #fff; border-radius: 10px; padding: 20px; border: 1px solid #e0e0e0; text-align: center; }
.ld-who-icon { font-size: 2rem; margin-bottom: 10px; }
.ld-who-card h3 { font-size: 0.95rem; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.ld-who-card p { font-size: 0.83rem; color: #666; line-height: 1.5; margin: 0; }
.ld-steps { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 32px 0; }
.ld-step { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 20px 24px; text-align: left; max-width: 220px; }
.ld-step-num { width: 32px; height: 32px; background: #2979ff; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; margin-bottom: 12px; }
.ld-step h3 { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.ld-step p { font-size: 0.82rem; color: #90caf9; line-height: 1.5; margin: 0; }
.ld-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 36px; }
.ld-feature-card { background: #f8f9ff; border-radius: 10px; padding: 24px; border: 1px solid #e8eaf6; }
.ld-feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.ld-feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: #1a1a2e; }
.ld-feature-card p { font-size: 0.88rem; color: #555; line-height: 1.6; margin: 0; }
.ld-price-badge { display: inline-block; background: #1a1a2e; color: #fff; font-size: 1.4rem; font-weight: 800; padding: 8px 24px; border-radius: 8px; margin-bottom: 20px; }
.ld-includes { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; margin: 24px 0 32px; font-size: 0.88rem; color: #3949ab; }
.ld-includes span::before { content: "✓ "; color: #2979ff; font-weight: 700; }
.ld-author-grid { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.ld-author-bio { flex: 1; min-width: 280px; }
.ld-author-bio p { font-size: 1rem; line-height: 1.85; color: #444; margin-bottom: 16px; }
.ld-author-bio strong { color: #1a1a2e; }
.ld-author-sidebar { flex: 0 0 auto; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.ld-highlights-card { background: #fff; border-radius: 10px; padding: 18px 20px; border: 1px solid #e0e0e0; }
.ld-highlights-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #2979ff; margin-bottom: 10px; }
.ld-highlights-card ul { list-style: none; font-size: 0.88rem; color: #333; line-height: 2.1; }
.ld-bio-link { display: block; text-align: center; background: #1a1a2e; color: #fff; text-decoration: none; border-radius: 8px; padding: 12px 20px; font-size: 0.88rem; font-weight: 700; }
.ld-bio-link:hover { background: #2979ff; color: #fff; }
.ld-footer { background: #0d1b3e; color: #90caf9; text-align: center; padding: 24px; font-size: 0.82rem; }
.ld-footer a { color: #2979ff; text-decoration: none; }
.ld-footer-link { background: none; border: none; color: #2979ff; cursor: pointer; font-size: 0.82rem; padding: 0; text-decoration: underline; }
