/* =====================================================================
 *  Petiht /learning — design system
 *  Modern, audio-friendly, gradient-driven. No external CSS framework.
 * ===================================================================== */

:root {
    --l-bg:        #FFFFFF;
    --l-bg-alt:    #F7F7F7;
    --l-surface:   #FFFFFF;
    --l-surface-2: #F4F4F5;
    --l-line:      #E5E5E5;
    --l-text:      #111111;
    --l-muted:     #6B6B6B;
    --l-accent:    #F97316;
    --l-accent-2:  #F97316;
    --l-success:   #15803D;
    --l-warn:      #F97316;
    --l-error:     #DC2626;
    --l-radius:    16px;
    --l-radius-sm: 10px;
    --l-shadow:    0 8px 24px rgba(0, 0, 0, 0.06);
    --l-grad:      linear-gradient(135deg, #F97316 0%, #EA580C 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.l-body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--l-bg);
    color: var(--l-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--l-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.l-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

@media (max-width: 720px) {
    .l-container { padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

.l-skip {
    position: absolute; top: -40px; left: 0;
    background: var(--l-accent); color: #fff; padding: 8px 12px;
    transition: top .2s;
}
.l-skip:focus { top: 0; }

/* ========== Header ============================================== */
.l-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--l-line);
    position: sticky; top: 0; z-index: 200;
    padding-top: env(safe-area-inset-top);
}
.l-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 52px;
    padding: 6px 0;
    position: relative;
}
.l-brand {
    display: flex; align-items: center;
    text-decoration: none; flex-shrink: 0;
    min-height: 44px;
}
.l-brand:hover { text-decoration: none; opacity: 0.92; }
.l-brand__logo {
    display: block;
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.l-header__toggle {
    display: inline-flex;
    width: 44px; height: 44px;
    border: 1px solid var(--l-line);
    border-radius: 12px;
    background: var(--l-surface);
    cursor: pointer;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 5px;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
}
.l-header__toggle-bar {
    display: block; width: 18px; height: 2px;
    background: var(--l-text); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
body.l-nav-open .l-header__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.l-nav-open .l-header__toggle-bar:nth-child(2) { opacity: 0; }
body.l-nav-open .l-header__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.l-header__panel {
    position: fixed;
    left: 0; right: 0;
    top: calc(52px + env(safe-area-inset-top));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--l-line);
    box-shadow: var(--l-shadow);
    padding: 12px 16px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 199;
}
body.l-nav-open .l-header__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
body.l-nav-open { overflow: hidden; }

.l-nav {
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    display: flex;
}
.l-nav__link {
    color: var(--l-muted); padding: 12px 14px; border-radius: 12px;
    font-size: 15px; font-weight: 500; transition: all .15s;
    white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.l-nav__link:hover { color: var(--l-text); background: var(--l-surface); text-decoration: none; }
.l-nav__link.is-active { color: var(--l-text); background: var(--l-surface-2); box-shadow: inset 0 0 0 1px var(--l-line); }
.l-nav__link--accent {
    background: var(--l-grad); color: #fff !important;
}
.l-nav__link--accent:hover { opacity: 0.9; }

.l-header__cta {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--l-line);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    flex-shrink: 0;
}

.l-account {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--l-text); font-size: 13px;
}
.l-avatar {
    width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
    background: var(--l-surface-2); display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.l-avatar img { width: 100%; height: 100%; object-fit: cover; }
.l-avatar__initials, .l-avatar span { font-weight: 600; font-size: 12px; }
.l-account__name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.l-pill {
    display: inline-block; padding: 2px 8px; border-radius: 12px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    background: var(--l-surface-2); color: var(--l-muted);
}
.l-pill--pro { background: var(--l-grad); color: #fff; }
.l-pill--ok  { background: #ECFDF5; color: #166534; }

.l-logout-form { display: inline-block; margin: 0; }

@media (min-width: 1080px) {
    .l-header__toggle { display: none; }
    .l-header__panel {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        flex: 1;
        z-index: auto;
    }
    .l-nav {
        flex-direction: row;
        align-items: center;
        width: auto;
        gap: 2px;
    }
    .l-nav__link { min-height: 40px; padding: 8px 12px; }
    .l-header__cta {
        width: auto;
        margin: 0 0 0 auto;
        padding: 0;
        border: 0;
    }
}

/* ========== Buttons ============================================= */
.l-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .15s; text-decoration: none;
    background: var(--l-surface); color: var(--l-text);
}
.l-btn:hover { transform: translateY(-1px); text-decoration: none; }
.l-btn--primary { background: var(--l-grad); color: #fff; }
.l-btn--ghost { background: transparent; border-color: var(--l-line); color: var(--l-text); }
.l-btn--ghost:hover { background: var(--l-surface); }
.l-btn--sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.l-btn--lg { padding: 14px 28px; font-size: 16px; }
.l-btn--full { width: 100%; }

/* ========== Main + sections ===================================== */
.l-main { flex: 1; }
.l-section { padding: 48px 0; }
.l-section--top { padding-top: 24px; }
.l-section--alt { background: var(--l-bg-alt); }
.l-section--flush { padding: 24px 0; }

.l-section__head { margin-bottom: 32px; }
.l-section__head--row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.l-section__head--center { text-align: center; }
.l-section__head h1, .l-section__head h2 { font-family: 'Outfit', sans-serif; margin: 0 0 8px; }
.l-section__head h1 { font-size: 36px; font-weight: 800; }
.l-section__head h2 { font-size: 26px; font-weight: 700; }

@media (max-width: 720px) {
    .l-section { padding: 32px 0; }
    .l-section--top { padding-top: 16px; }
    .l-section__head { margin-bottom: 20px; }
    .l-section__head--row { flex-direction: column; align-items: stretch; }
    .l-section__head h1 { font-size: 28px; }
    .l-section__head h2 { font-size: 22px; }
    .l-filters { width: 100%; }
    .l-field--inline { flex: 1; min-width: 140px; }
    .l-hero { padding: 40px 0 32px; }
    .l-hero__copy h1 { font-size: 34px; }
    .l-lead { font-size: 16px; }
}
.l-section__head p { color: var(--l-muted); margin: 0; max-width: 600px; }

.l-eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--l-accent-2);
    margin-bottom: 8px;
}
.l-grad { color: var(--l-accent); }
.l-muted { color: var(--l-muted); font-size: 13px; }
.l-link { background: none; border: 0; color: var(--l-accent-2); cursor: pointer; padding: 0; font: inherit; }
.l-link:hover { text-decoration: underline; }
.l-back { color: var(--l-muted); display: inline-block; margin-bottom: 18px; font-size: 14px; }
.l-back:hover { color: var(--l-text); }

/* ========== Hero =============================================== */
.l-hero { padding: 80px 0 60px; }
.l-hero__inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.l-hero__copy h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 56px; font-weight: 800; line-height: 1.05;
    margin: 12px 0 16px;
}
.l-lead { font-size: 18px; color: var(--l-muted); margin: 0 0 24px; max-width: 520px; }
.l-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.l-hero__bullets { list-style: none; padding: 0; margin: 0; color: var(--l-muted); font-size: 15px; }
.l-hero__bullets li { padding: 4px 0; }

.l-hero__art {
    position: relative; height: 340px;
}
.l-hero__card {
    position: absolute; background: var(--l-surface); border: 1px solid var(--l-line);
    border-radius: var(--l-radius); padding: 16px 18px; box-shadow: var(--l-shadow);
    display: flex; flex-direction: column; gap: 4px; min-width: 260px;
}
.l-hero__card strong { font-size: 18px; font-weight: 600; color: #111111; }
.l-hero__card span { color: var(--l-accent); font-size: 15px; font-style: italic; }
.l-hero__card--1 { top: 20px; left: 0; transform: rotate(-4deg); }
.l-hero__card--2 { top: 130px; right: 0; transform: rotate(3deg); }
.l-hero__card--3 { bottom: 0; left: 60px; transform: rotate(-2deg); }

/* ========== Cards / grid ======================================= */
.l-grid { display: grid; gap: 18px; }
.l-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.l-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 880px) {
    .l-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
    .l-grid--2, .l-grid--3 { grid-template-columns: 1fr; }
    .l-hero__inner { grid-template-columns: 1fr; }
    .l-hero__art { display: none; }
    .l-hero__copy h1 { font-size: 40px; }
}

.l-card {
    background: var(--l-surface); border: 1px solid var(--l-line);
    border-radius: var(--l-radius); padding: 18px;
}
.l-card--center { text-align: center; padding: 40px; }
.l-card--center h1 { margin-top: 0; }
.l-card--cta { text-align: center; margin-top: 32px; }
.l-card__head h1 { margin: 0 0 6px; font-size: 24px; }
.l-card__head p { margin: 0 0 18px; color: var(--l-muted); font-size: 14px; }

.l-card--media, .l-card--story {
    display: block; padding: 0; overflow: hidden; text-decoration: none; color: var(--l-text);
    transition: all .15s;
}
.l-card--media:hover, .l-card--story:hover { transform: translateY(-2px); border-color: var(--l-accent); text-decoration: none; }
.l-card__cover {
    display: block; padding-top: 60%; background-size: cover; background-position: center;
    background-color: var(--l-surface-2);
}
.l-card--story .l-card__cover { padding-top: 45%; }
.l-card__body { display: block; padding: 14px 16px 16px; }
.l-card__title { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.l-card__meta  { display: block; color: var(--l-muted); font-size: 13px; }
.l-card__stats { display: block; color: var(--l-muted); font-size: 12px; margin-top: 6px; }

/* ========== Quickbar =========================================== */
.l-quickbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 720px) { .l-quickbar { grid-template-columns: 1fr; } }
.l-quick {
    display: flex; align-items: center; gap: 14px;
    background: var(--l-surface); border: 1px solid var(--l-line);
    border-radius: var(--l-radius); padding: 16px 18px; text-decoration: none;
    color: var(--l-text); transition: all .15s;
}
.l-quick:hover { transform: translateY(-2px); border-color: var(--l-accent); text-decoration: none; }
.l-quick__icon { font-size: 28px; }
.l-quick__title { display: block; font-weight: 600; }
.l-quick__meta  { display: block; color: var(--l-muted); font-size: 13px; }

/* ========== Filters / pagination =============================== */
.l-filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.l-pagi { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.l-pagi__pos { color: var(--l-muted); font-size: 13px; }

/* ========== Forms ============================================== */
.l-form { display: flex; flex-direction: column; gap: 14px; }
.l-field { display: flex; flex-direction: column; gap: 6px; }
.l-field--inline { flex-direction: column; }
.l-field__label { font-size: 13px; color: var(--l-muted); font-weight: 500; }
.l-field input, .l-field select, .l-field textarea {
    background: var(--l-surface-2); border: 1px solid var(--l-line);
    color: var(--l-text); padding: 10px 12px; border-radius: 10px;
    font: inherit; font-size: 14px;
    transition: border-color .15s;
}
.l-field input:focus, .l-field select:focus, .l-field textarea:focus {
    outline: none; border-color: var(--l-accent);
}
.l-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--l-muted); }

/* ========== Alerts ============================================= */
.l-alert { padding: 12px 16px; border-radius: 12px; margin: 16px 0; font-size: 14px; }
.l-alert--success { background: #ECFDF5; color: #166534; border: 1px solid #BBF7D0; }
.l-alert--error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ========== Auth ============================================== */
.l-auth { padding: 80px 0; }
.l-auth__wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .l-auth__wrap { grid-template-columns: 1fr; } .l-auth__art { display: none; } }
.l-auth__art { position: relative; }
.l-auth__art h2 { font-family: 'Outfit', sans-serif; font-size: 38px; margin-bottom: 12px; }
.l-auth__bullets { list-style: none; padding: 0; color: var(--l-muted); }
.l-auth__bullets li:before { content: "✓ "; color: var(--l-accent-2); }
.l-auth__card { padding: 32px; max-width: 440px; margin: 0 auto; width: 100%; box-shadow: var(--l-shadow); }
.l-auth__forgot { text-align: center; margin: 12px 0 0; font-size: 13px; }
.l-auth__hint { text-align: center; color: var(--l-muted); font-size: 13px; margin-top: 18px; }

/* ========== Pro perks ========================================= */
.l-perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 32px 0; }
@media (max-width: 720px) { .l-perks { grid-template-columns: 1fr; } }
.l-perk {
    background: var(--l-surface); border: 1px solid var(--l-line);
    padding: 22px; border-radius: var(--l-radius);
}
.l-perk__icon { display: block; font-size: 28px; margin-bottom: 8px; }
.l-perk h3 { font-family: 'Outfit', sans-serif; margin: 0 0 6px; font-size: 18px; }
.l-perk p { margin: 0; color: var(--l-muted); font-size: 14px; }

.l-cta { text-align: center; padding: 60px 0; }
.l-cta h2 { font-family: 'Outfit', sans-serif; font-size: 36px; }
.l-cta .l-hero__cta { justify-content: center; }

/* ========== Songs / lyrics ==================================== */
.l-song, .l-story { background: var(--l-surface); border: 1px solid var(--l-line); border-radius: var(--l-radius); overflow: hidden; }
.l-story__head, .l-song__head { align-items: start; }
.l-story__cover {
    width: 140px; height: 140px; border-radius: var(--l-radius);
    background-size: cover; background-position: center;
    background-color: var(--l-surface-2);
    display: block;
}
.l-song__head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px; }
.l-story__head { display: flex; align-items: flex-start; gap: 24px; padding: 24px; }
.l-story__meta { flex: 1; min-width: 0; }
.l-song__meta h1, .l-story__meta h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 32px; font-weight: 800; line-height: 1.15;
    margin: 4px 0 6px; color: #111111;
}
.l-song__cover {
    width: 220px; height: 220px; border-radius: var(--l-radius); background-size: cover; background-position: center;
    background-color: var(--l-surface-2);
}
.l-song__artist { color: var(--l-muted); margin: 0 0 14px; }
.l-song__audio { width: 100%; margin: 8px 0 0; }
.l-song__tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 720px) {
    .l-song__head, .l-story__head { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
    .l-song__cover { width: 100%; height: min(56vw, 240px); margin: 0 auto; }
    .l-story__cover { width: 100%; height: min(40vw, 180px); margin: 0 auto; }
    .l-song__meta h1, .l-story__meta h1 { font-size: 26px; }
    .l-song__tools { flex-direction: column; align-items: stretch; }
    .l-song__tools .l-segmented { width: 100%; justify-content: center; }
    .l-song__tools .l-btn { width: 100%; justify-content: center; }
    .l-lyric__src { font-size: 22px; }
    .l-lyric__tgt { font-size: 16px; }
    .l-lyric--para .l-lyric__src { font-size: 17px; }
}

/* ========== Audio A–B loop (song practice) ===================== */
.l-audio-loop {
    margin: 8px 0 4px;
    background: var(--l-surface-2);
    border: 1px solid var(--l-line);
    border-radius: var(--l-radius-sm);
    overflow: hidden;
}
.l-audio-loop__panel { padding: 14px 16px 16px; border-top: 1px solid var(--l-line); }
.l-audio-loop__head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 14px;
}
.l-audio-loop__title { display: block; font-family: 'Outfit', sans-serif; font-size: 15px; margin-bottom: 2px; }
.l-audio-loop__hint { margin: 0; color: var(--l-muted); font-size: 12px; line-height: 1.45; max-width: 420px; }
.l-audio-loop__toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--l-text);
    background: var(--l-surface); border: 1px solid var(--l-line);
    border-radius: 999px; padding: 8px 12px; cursor: pointer; white-space: nowrap;
}
.l-audio-loop__toggle input { accent-color: var(--l-accent); width: 16px; height: 16px; }
.l-audio-loop__track-wrap { position: relative; height: 36px; margin-bottom: 8px; }
.l-audio-loop__track {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    height: 8px; border-radius: 999px; background: rgba(17, 17, 17, 0.08);
    overflow: hidden;
}
.l-audio-loop__fill {
    position: absolute; top: 0; bottom: 0; left: 0; width: 0;
    background: var(--l-grad); border-radius: 999px;
    transition: left .08s linear, width .08s linear;
}
.l-audio-loop__range {
    position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 36px;
    margin: 0; background: transparent; pointer-events: none;
    -webkit-appearance: none; appearance: none;
}
.l-audio-loop__range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--l-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: auto; cursor: grab;
}
.l-audio-loop__range::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--l-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    pointer-events: auto; cursor: grab;
}
.l-audio-loop__range::-webkit-slider-runnable-track,
.l-audio-loop__range::-moz-range-track { background: transparent; border: 0; }
.l-audio-loop__range.js-loop-end { z-index: 2; }
.l-audio-loop__times {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
    align-items: center; font-size: 13px; color: var(--l-muted); margin-bottom: 12px;
}
.l-audio-loop__times em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 6px; color: var(--l-muted); }
.l-audio-loop__times strong { color: var(--l-text); font-variant-numeric: tabular-nums; }
.l-audio-loop__times span:first-child { justify-self: start; }
.l-audio-loop__times span:last-child { justify-self: end; }
.l-audio-loop__now { justify-self: center; text-align: center; color: var(--l-accent); }
.l-audio-loop__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.l-audio-loop__actions .l-btn--sm { padding: 7px 12px; font-size: 12px; }
.l-audio-loop__status { margin: 0; font-size: 12px; color: var(--l-muted); }
.l-audio-loop.is-active .l-audio-loop__status { color: var(--l-accent); }
.l-audio-loop.is-active .l-audio-loop__panel { box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.28); }

@media (max-width: 720px) {
    .l-audio-loop__head { flex-direction: column; align-items: stretch; }
    .l-audio-loop__toggle { align-self: flex-start; }
    .l-audio-loop__actions .l-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
}

.l-segmented {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px;
    background: var(--l-surface-2); border-radius: 999px; border: 1px solid var(--l-line);
}
.l-segmented__lead { color: var(--l-muted); font-size: 12px; padding: 0 8px; }
.l-segmented__btn {
    background: transparent; border: 0; color: var(--l-muted);
    padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px;
    cursor: pointer; font-weight: 500;
}
.l-segmented__btn.is-active { background: var(--l-accent); color: #fff; font-weight: 700; }

.l-lyrics, .l-reader {
    border-top: 1px solid var(--l-line);
    background: #fff;
    padding: 4px 0 20px;
}
.l-lyrics__toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 14px 20px 8px;
}
.l-lyrics__caption {
    margin: 0;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.02em; color: var(--l-muted);
    max-width: 420px;
}
.l-lyrics__empty { margin: 0 20px 8px; }
.l-lyrics__list { max-width: 740px; margin: 0 auto; padding: 8px 16px 28px; }
.l-lyric {
    padding: 14px 12px 16px;
    border-radius: 14px;
    transition: background .15s, box-shadow .15s;
}
.l-lyric--break { height: 28px; padding: 0; }
.l-lyric__row { display: flex; align-items: flex-start; gap: 8px; }
.l-lyric__src {
    flex: 1; margin: 0;
    font-size: 26px; font-weight: 500;
    line-height: 1.42; color: #111111;
    letter-spacing: 0.01em;
    word-wrap: break-word; overflow-wrap: anywhere;
}
.l-lyric--label .l-lyric__src { font-weight: 600; }
.l-lyric--para .l-lyric__src { font-size: 18px; line-height: 1.6; }
.l-lyric__icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    margin-top: 2px;
    border: 0; background: transparent;
    color: rgba(17, 17, 17, 0.32);
    cursor: pointer; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
.l-lyric__icon:hover,
.l-lyric.is-open .l-lyric__icon { color: var(--l-accent); background: rgba(249, 115, 22, 0.08); }
.l-lyric__tgt {
    margin: 6px 36px 0 0;
    font-size: 17.5px; font-style: italic; font-weight: 500;
    color: var(--l-accent); line-height: 1.45;
    word-wrap: break-word; overflow-wrap: anywhere;
}
.l-lyric.is-open {
    background: rgba(249, 115, 22, 0.07);
    box-shadow: inset 3px 0 0 var(--l-accent);
}
.l-lyric--para .l-lyric__tgt {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(249, 115, 22, 0.08);
    border-radius: 12px;
    box-shadow: inset 2.5px 0 0 rgba(249, 115, 22, 0.55);
}

@media (max-width: 720px) {
    .l-lyrics__toolbar { padding: 12px 12px 6px; }
    .l-lyrics__list { padding: 2px 4px 16px; }
    .l-lyric { padding: 8px 8px 10px; }
}

/* ========== Stories — word-by-word reader ====================== */
.l-word {
    cursor: pointer; padding: 1px 2px; border-radius: 4px;
    transition: background .1s;
}
.l-word:hover { background: rgba(249, 115, 22, 0.14); }
.l-word.is-loading { background: rgba(249, 115, 22, 0.22); }
.l-word.is-translated { background: rgba(249, 115, 22, 0.12); }

.l-tooltip {
    position: fixed; z-index: 1000; pointer-events: none;
    background: var(--l-surface); border: 1px solid var(--l-accent);
    color: var(--l-text); padding: 8px 14px; border-radius: 10px;
    font-size: 14px; box-shadow: var(--l-shadow);
    display: flex; align-items: center; gap: 8px;
    max-width: 320px;
}
.l-tooltip__src { color: var(--l-muted); }
.l-tooltip__arrow { color: var(--l-accent-2); }
.l-tooltip__tgt { font-weight: 600; }

/* ========== Chat =============================================== */
.l-chatwrap { display: flex; flex-direction: column; }
.l-chat {
    background: var(--l-surface); border: 1px solid var(--l-line);
    border-radius: var(--l-radius); display: flex; flex-direction: column;
    height: 70vh; min-height: 480px;
}
.l-chat__list {
    flex: 1; overflow-y: auto; list-style: none; padding: 18px;
    margin: 0; display: flex; flex-direction: column; gap: 14px;
    scrollbar-width: thin; scrollbar-color: var(--l-line) transparent;
}
.l-msg { display: flex; gap: 10px; align-items: flex-start; }
.l-msg--me { flex-direction: row-reverse; }
.l-msg__avatar {
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    background: var(--l-surface-2); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-weight: 600; color: var(--l-muted);
}
.l-msg__avatar img { width: 100%; height: 100%; object-fit: cover; }
.l-msg__body { max-width: 70%; }
.l-msg--me .l-msg__body { text-align: right; }
.l-msg__head {
    display: flex; gap: 6px; align-items: center; font-size: 12px;
    color: var(--l-muted); margin-bottom: 4px;
}
.l-msg--me .l-msg__head { justify-content: flex-end; }
.l-msg__time { margin-left: auto; }
.l-msg--me .l-msg__time { margin-left: 0; margin-right: auto; }
.l-msg__bubble {
    background: var(--l-surface-2); border: 1px solid var(--l-line);
    border-radius: 16px; padding: 10px 14px;
}
.l-msg--me .l-msg__bubble { background: var(--l-grad); border-color: transparent; color: #fff; }
.l-msg__text { margin: 0; font-size: 14px; word-wrap: break-word; white-space: pre-wrap; }
.l-msg__orig { margin-top: 6px; font-size: 12px; }
.l-msg__orig summary { cursor: pointer; color: var(--l-muted); user-select: none; }
.l-msg__orig p { margin: 4px 0 0; color: var(--l-muted); font-style: italic; }
.l-msg--me .l-msg__orig summary,
.l-msg--me .l-msg__orig p { color: rgba(255, 255, 255, 0.85); }

.l-chat__compose {
    display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--l-line);
    align-items: end;
}
.l-chat__input {
    flex: 1; padding: 12px 14px; border-radius: 10px;
    background: var(--l-surface-2); border: 1px solid var(--l-line);
    color: var(--l-text); font: inherit; font-size: 14px;
}
.l-chat__input:focus { outline: none; border-color: var(--l-accent); }

@media (max-width: 720px) {
    .l-chat { height: 80vh; }
    .l-msg__body { max-width: 85%; }
    .l-chat__compose { flex-direction: column; align-items: stretch; }
}

/* ========== Footer ============================================ */
.l-footer { background: var(--l-bg-alt); border-top: 1px solid var(--l-line); padding: 40px 0; margin-top: auto; }
.l-footer__inner { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 720px) { .l-footer__inner { grid-template-columns: 1fr; } }
.l-footer__brand strong { display: block; font-family: 'Outfit', sans-serif; margin-bottom: 4px; }
.l-footer__brand p { margin: 0; color: var(--l-muted); font-size: 14px; }
.l-footer__links { display: flex; flex-wrap: wrap; gap: 14px; }
.l-footer__links a { color: var(--l-muted); font-size: 14px; }
.l-footer__links a:hover { color: var(--l-text); }
.l-footer__copy { color: var(--l-muted); font-size: 13px; margin: 0; }

/* ========== Legal (Amalie AI privacy / terms) ================== */
.l-legal { max-width: 760px; padding: 48px 0 80px; }
.l-legal__kicker { display: inline-block; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--l-accent-2); }
.l-legal h1 { font-family: 'Outfit', sans-serif; font-size: 36px; line-height: 1.15; margin: 0 0 8px; }
.l-legal__updated { margin: 0 0 28px; color: var(--l-muted); font-size: 14px; }
.l-legal h2 { font-family: 'Outfit', sans-serif; font-size: 20px; margin: 28px 0 10px; }
.l-legal p, .l-legal li { color: var(--l-muted); font-size: 15.5px; line-height: 1.75; }
.l-legal ul { padding-left: 20px; margin: 0 0 12px; }
.l-legal a { color: var(--l-accent-2); }
.l-legal__note { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--l-line); border-radius: var(--l-radius-sm); background: var(--l-surface); color: var(--l-muted); font-size: 14px; }
