/*!
 * LH Orator Pro — frontend (v1.2.0)
 * Premium dark design system.
 */

/* =====================================================
   Design tokens & root
   ===================================================== */
.lhtp-app {
    /* Radii */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;
    --r-pill: 9999px;

    /* Spacing scale (4px base) */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
    --sp-9: 56px; --sp-10: 72px; --sp-11: 96px;

    /* Surfaces */
    --surface-0: #08090E;          /* base */
    --surface-1: rgba(255,255,255,0.025);
    --surface-2: rgba(255,255,255,0.045);
    --surface-3: rgba(255,255,255,0.075);
    --surface-4: rgba(255,255,255,0.11);
    --surface-5: rgba(255,255,255,0.15);

    /* Borders */
    --line-1: rgba(255,255,255,0.06);
    --line-2: rgba(255,255,255,0.10);
    --line-3: rgba(255,255,255,0.16);
    --line-4: rgba(255,255,255,0.24);

    /* Text */
    --text-1: rgba(255,255,255,0.96);
    --text-2: rgba(255,255,255,0.68);
    --text-3: rgba(255,255,255,0.46);
    --text-4: rgba(255,255,255,0.28);

    /* Brand */
    --brand-rose:    #FF5589;
    --brand-violet:  #A874FF;
    --brand-peach:   #FFB682;
    --grad-brand:        linear-gradient(135deg, #FF5589 0%, #A874FF 100%);
    --grad-brand-soft:   linear-gradient(135deg, rgba(255,85,137,0.18) 0%, rgba(168,116,255,0.18) 100%);
    --grad-warm:         linear-gradient(135deg, #FFB682 0%, #FF5589 100%);
    --glow-brand:        0 8px 28px rgba(168,116,255,0.36), 0 2px 12px rgba(255,85,137,0.28);

    /* Semantic */
    --mint:  #4CD9A1;
    --amber: #F8C156;
    --rose:  #FF6B6B;
    --sky:   #5DC3F0;
    --mint-soft:  rgba(76,217,161,0.14);
    --amber-soft: rgba(248,193,86,0.14);
    --rose-soft:  rgba(255,107,107,0.14);
    --sky-soft:   rgba(93,195,240,0.14);

    /* Elevation shadows */
    --sh-sm: 0 1px 2px rgba(0,0,0,0.25);
    --sh-md: 0 4px 14px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.18);
    --sh-lg: 0 14px 36px rgba(0,0,0,0.40), 0 4px 12px rgba(0,0,0,0.22);
    --sh-xl: 0 28px 72px rgba(0,0,0,0.50), 0 10px 28px rgba(0,0,0,0.25);
    --sh-inset-top: inset 0 1px 0 rgba(255,255,255,0.06);

    /* Typography */
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-feature-settings: "cv11", "ss03", "ss04", "cv05", "kern";
    font-optical-sizing: auto;
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Layout */
    position: relative;
    min-height: 100vh;
    background: var(--surface-0);
    overflow-x: hidden;
    isolation: isolate;
}
.lhtp-app, .lhtp-app *, .lhtp-app *::before, .lhtp-app *::after {
    box-sizing: border-box;
}

/* Subtle layered ambient background */
.lhtp-app::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 15% -10%, rgba(168,116,255,0.20) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% -5%, rgba(255,182,130,0.10) 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 50% 110%, rgba(255,85,137,0.10) 0%, transparent 60%),
        linear-gradient(180deg, #08090E 0%, #0B0C16 50%, #0F0E1B 100%);
    pointer-events: none;
}
.lhtp-app::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.lhtp-app ::selection {
    background: rgba(168,116,255,0.4);
    color: #fff;
}
.lhtp-app *:focus { outline: none; }
.lhtp-app *:focus-visible {
    outline: 2px solid var(--brand-violet);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

/* Tabular numbers util */
.lhtp-app .lhtp-tnum { font-variant-numeric: tabular-nums; }

/* Hide scrollbar on prompter overlay only; keep elsewhere */
.lhtp-app .lhtp-scroll-container::-webkit-scrollbar { display: none; }
.lhtp-app .lhtp-scroll-container { scrollbar-width: none; }

/* Reusable icon sizing */
.lhtp-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.15em;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lhtp-icon-lg { font-size: 24px; }
.lhtp-icon-md { font-size: 18px; }
.lhtp-icon-sm { font-size: 14px; }

/* =====================================================
   Brand header
   ===================================================== */
.lhtp-app-header {
    padding: var(--sp-7) var(--sp-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
}

/* Floating close button — always visible (when URL is configured) */
.lhtp-close-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 9998;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.12s, border-color 0.15s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    padding: 0;
}
.lhtp-close-btn:hover {
    background: rgba(255, 95, 95, 0.18);
    border-color: rgba(255, 95, 95, 0.5);
    color: #fff;
    transform: scale(1.06);
}
.lhtp-close-btn:active { transform: scale(0.95); }
.lhtp-close-btn .lhtp-icon { font-size: 16px; stroke-width: 2.2; }
.lhtp-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    text-decoration: none;
}
.lhtp-logo {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 14px rgba(255, 180, 80, 0.20));
}
.lhtp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.lhtp-logo svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.lhtp-brand-text { line-height: 1.1; display: inline-flex; flex-direction: column; }
.lhtp-brand-name {
    background: linear-gradient(135deg, #FFC56B 0%, #FF85A8 45%, #C19BFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.lhtp-brand-sub {
    color: var(--text-3);
    font-size: 10px;
    letter-spacing: 0.22em;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}
.lhtp-app.is-studio .lhtp-app-header { display: none; }

/* =====================================================
   Step container
   ===================================================== */
.lhtp-step[hidden] { display: none !important; }

/* Any element with the `hidden` attribute inside our app must actually hide,
 * even if a class-based rule sets display:flex/block on it. */
.lhtp-app [hidden],
.lhtp-app[hidden],
body.lhtp-fullpage [hidden] { display: none !important; }
.lhtp-step {
    animation: lhtp-step-in 0.35s cubic-bezier(0.2,0.7,0.3,1);
}
@keyframes lhtp-step-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.lhtp-container-pad {
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--sp-3) var(--sp-8) var(--sp-11);
}

.lhtp-step-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 6px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    color: var(--text-3);
    font-size: 11px;
    letter-spacing: 0.20em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: var(--sp-6);
    box-shadow: var(--sh-inset-top);
}
.lhtp-step-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-violet);
    box-shadow: 0 0 0 3px rgba(168,116,255,0.18);
}

.lhtp-step-title {
    font-size: clamp(40px, 6.4vw, 84px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.02;
    margin: 0 0 var(--sp-5) 0;
    max-width: 920px;
    color: var(--text-1);
}
.lhtp-step-title .lhtp-accent {
    background: linear-gradient(135deg, #FFAFCB 0%, #C19BFF 60%, #FFB682 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lhtp-step-desc {
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.6;
    max-width: 580px;
    margin: 0 0 var(--sp-8) 0;
    font-weight: 400;
}

/* =====================================================
   Buttons
   ===================================================== */
.lhtp-btn {
    --btn-bg: var(--surface-3);
    --btn-bg-hover: var(--surface-4);
    --btn-border: var(--line-2);
    --btn-color: var(--text-1);
    --btn-shadow: var(--sh-sm);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    background: var(--btn-bg);
    color: var(--btn-color);
    border: 1px solid var(--btn-border);
    border-radius: var(--r-pill);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--sh-inset-top), var(--btn-shadow);
    white-space: nowrap;
}
.lhtp-btn:hover {
    background: var(--btn-bg-hover);
    border-color: var(--line-3);
}
.lhtp-btn:active { transform: scale(0.97); }
.lhtp-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.lhtp-btn-primary {
    --btn-bg: #fff;
    --btn-bg-hover: rgba(255,255,255,0.92);
    --btn-color: #0F0E1B;
    --btn-border: transparent;
    font-weight: 600;
    padding: 12px 22px;
}
.lhtp-btn-accent {
    --btn-bg: var(--grad-brand);
    --btn-bg-hover: var(--grad-brand);
    --btn-color: #fff;
    --btn-border: transparent;
    --btn-shadow: var(--glow-brand);
    font-weight: 600;
    padding: 13px 22px;
}
.lhtp-btn-accent:hover { transform: translateY(-1px); }
.lhtp-btn-ghost {
    --btn-bg: transparent;
    --btn-bg-hover: var(--surface-2);
    --btn-border: var(--line-2);
}
.lhtp-btn-lg {
    padding: 14px 24px;
    font-size: 15px;
}

/* Step nav (back button + breadcrumb) */
.lhtp-step-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-7);
    flex-wrap: wrap;
}
.lhtp-breadcrumb {
    color: var(--text-1);
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}
.lhtp-breadcrumb::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-4);
}

/* =====================================================
   Generic card + gradient border on hover
   ===================================================== */
.lhtp-card {
    position: relative;
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-xl);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    box-shadow: var(--sh-inset-top), var(--sh-md);
    transition: transform 0.25s cubic-bezier(0.2,0.7,0.3,1),
                background 0.2s, border-color 0.2s, box-shadow 0.25s;
    overflow: hidden;
}
.lhtp-card:hover {
    background: var(--surface-2);
    border-color: var(--line-3);
    transform: translateY(-3px);
    box-shadow: var(--sh-inset-top), var(--sh-lg);
}
/* Gradient border accent on hover via mask */
.lhtp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,85,137,0.6) 0%, rgba(168,116,255,0.4) 50%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.lhtp-card:hover::before { opacity: 1; }

/* =====================================================
   Category cards (Step 01)
   ===================================================== */
.lhtp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-5);
}
.lhtp-card-cat {
    display: flex;
    flex-direction: column;
    padding: var(--sp-7) var(--sp-6) var(--sp-5);
    min-height: 280px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.lhtp-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--surface-3);
    border: 1px solid var(--line-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-5);
    box-shadow: var(--sh-inset-top);
    color: var(--brand-violet);
    transition: transform 0.25s, box-shadow 0.25s;
}
.lhtp-card-cat:hover .lhtp-card-icon {
    transform: scale(1.06);
    color: #fff;
    background: var(--grad-brand-soft);
    border-color: rgba(255,85,137,0.3);
    box-shadow: var(--sh-inset-top), 0 8px 24px rgba(168,116,255,0.25);
}
.lhtp-card-icon .lhtp-icon { font-size: 26px; }
.lhtp-card-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 var(--sp-2) 0;
    color: var(--text-1);
}
.lhtp-card-desc {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 var(--sp-5) 0;
    flex: 1;
}
.lhtp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-3);
    font-size: 13px;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--line-1);
}
.lhtp-card-footer .lhtp-browse {
    color: var(--text-1);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    transition: gap 0.2s, color 0.2s;
}
.lhtp-card-cat:hover .lhtp-browse {
    gap: 10px;
    color: var(--brand-rose);
}

/* =====================================================
   Search bar
   ===================================================== */
.lhtp-search-bar {
    position: relative;
    margin-bottom: var(--sp-6);
}
.lhtp-search-bar .lhtp-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 18px;
    pointer-events: none;
}
.lhtp-search-bar input {
    width: 100%;
    background: var(--surface-1);
    border: 1px solid var(--line-2);
    color: var(--text-1);
    padding: 16px 22px 16px 50px;
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 15px;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--sh-inset-top);
}
.lhtp-search-bar input::placeholder { color: var(--text-3); }
.lhtp-search-bar input:focus {
    border-color: rgba(168,116,255,0.4);
    background: var(--surface-2);
    box-shadow: var(--sh-inset-top), 0 0 0 4px rgba(168,116,255,0.12);
    outline: none;
}

/* =====================================================
   Script cards (Step 02)
   ===================================================== */
.lhtp-scripts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--sp-5);
}
.lhtp-card-script {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    min-height: 240px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.lhtp-script-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.lhtp-script-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--grad-brand-soft);
    color: #FFAFCB;
    border: 1px solid rgba(255,85,137,0.25);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.lhtp-script-tag .lhtp-icon { font-size: 12px; }
.lhtp-script-stats {
    color: var(--text-3);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.lhtp-script-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin: 0 0 var(--sp-3) 0;
    color: var(--text-1);
}
.lhtp-script-excerpt {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 var(--sp-4) 0;
    flex: 1;
}
.lhtp-script-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--text-1);
    font-weight: 500;
    font-size: 14px;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--line-1);
    transition: gap 0.2s, color 0.2s;
}
.lhtp-card-script:hover .lhtp-script-cta {
    gap: 10px;
    color: var(--brand-rose);
}

.lhtp-empty {
    background: var(--surface-1);
    border: 1px dashed var(--line-2);
    border-radius: var(--r-xl);
    padding: var(--sp-9) var(--sp-7);
    text-align: center;
    color: var(--text-2);
}
.lhtp-empty .lhtp-icon { font-size: 36px; color: var(--text-3); margin-bottom: var(--sp-3); }

/* =====================================================
   Studio (Step 03)
   ===================================================== */
.lhtp-studio-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    flex-wrap: wrap;
    max-width: 1600px;
    margin: 0 auto;
}
.lhtp-now-playing {
    color: var(--text-2);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}
.lhtp-now-playing strong { color: var(--text-1); font-weight: 600; }
.lhtp-now-playing-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-2);
    letter-spacing: 0.05em;
}

.lhtp-studio {
    position: relative;
    width: calc(100% - 48px);
    max-width: 1600px;
    margin: 0 auto var(--sp-8);
    aspect-ratio: 16/9;
    max-height: 82vh;
    min-height: 480px;
    background: #000;
    overflow: hidden;
    border-radius: var(--r-2xl);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.04),
        0 32px 80px rgba(0,0,0,0.55),
        0 8px 32px rgba(0,0,0,0.35);
    -webkit-user-select: none;
    user-select: none;
}
#lhtp-camera {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transform: scaleX(-1);
}
.lhtp-studio.lhtp-rear-cam #lhtp-camera { transform: none; }

/* Permission banner */
.lhtp-banner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(168,116,255,0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255,85,137,0.12) 0%, transparent 60%),
        linear-gradient(180deg, #0F0E1B 0%, #08090E 100%);
    text-align: center;
    padding: var(--sp-7);
    z-index: 50;
}
.lhtp-banner-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--r-lg);
    background: var(--surface-3);
    border: 1px solid var(--line-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-violet);
    box-shadow: var(--sh-inset-top);
    margin-bottom: var(--sp-3);
}
.lhtp-banner-icon .lhtp-icon { font-size: 28px; }
.lhtp-banner h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.015em;
    color: var(--text-1);
}
.lhtp-banner p {
    max-width: 460px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}
.lhtp-start-btn {
    background: var(--grad-brand);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: var(--glow-brand), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
}
.lhtp-start-btn:hover { transform: translateY(-1px); }
.lhtp-start-btn .lhtp-icon { font-size: 18px; }

.lhtp-banner-error {
    color: #FFD0D0;
    background: rgba(255,107,107,0.12);
    border: 1px solid rgba(255,107,107,0.30);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 460px;
    margin: var(--sp-4) 0 0 0;
}

/* Recording status badge */
.lhtp-rec-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 7px 14px 7px 12px;
    border-radius: var(--r-pill);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    z-index: 25;
    border: 1px solid rgba(255,255,255,0.1);
}
.lhtp-rec-badge[hidden] { display: none; }
.lhtp-rec-badge .lhtp-rec-dot {
    width: 10px;
    height: 10px;
    background: var(--rose);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255,107,107,0.7);
    animation: lhtp-pulse 1.4s ease-out infinite;
}
@keyframes lhtp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,107,107,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(255,107,107,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
}

/* Script overlay */
.lhtp-overlay {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
    width: 86%;
    max-width: 820px;
    height: 38vh;
    min-height: 160px;
    min-width: 240px;
    background: rgba(8,9,14,0.62);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 12px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    z-index: 20;
}
.lhtp-overlay[hidden] { display: none; }
.lhtp-overlay-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px 12px;
    background: rgba(0,0,0,0.30);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: move;
    touch-action: none;
}
.lhtp-drag-handle {
    color: rgba(255,255,255,0.5);
    display: inline-flex;
    align-items: center;
}
.lhtp-drag-handle .lhtp-icon { font-size: 16px; }
.lhtp-overlay-title {
    flex: 1;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lhtp-icon-btn {
    background: rgba(255,255,255,0.10);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    width: 28px;
    height: 28px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lhtp-icon-btn:hover { background: rgba(255,255,255,0.22); }
.lhtp-icon-btn .lhtp-icon { font-size: 14px; }

/* Reading-position indicator line */
.lhtp-overlay-cue {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,85,137,0.5) 20%, rgba(168,116,255,0.5) 80%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}
.lhtp-overlay-cue::before,
.lhtp-overlay-cue::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0; height: 0;
    transform: translateY(-50%);
    border-style: solid;
}
.lhtp-overlay-cue::before {
    left: 4px;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent rgba(255,85,137,0.7);
}
.lhtp-overlay-cue::after {
    right: 4px;
    border-width: 5px 7px 5px 0;
    border-color: transparent rgba(168,116,255,0.7) transparent transparent;
}

.lhtp-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--sp-6);
    position: relative;
}
.lhtp-scroll-spacer-top    { height: 50%; }
.lhtp-scroll-spacer-bottom { height: 70%; }
.lhtp-scroll-content {
    font-size: 36px;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    transition: transform 0.2s ease;
    letter-spacing: -0.005em;
}
.lhtp-scroll-content.lhtp-mirrored { transform: scaleX(-1); }
.lhtp-scroll-content p { margin: 0 0 0.7em 0; }
.lhtp-scroll-content p:last-child { margin-bottom: 0; }

.lhtp-resize-handle {
    position: absolute;
    bottom: 4px; right: 4px;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: nwse-resize;
    color: rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    touch-action: none;
}
.lhtp-resize-handle .lhtp-icon { font-size: 12px; }

.lhtp-reopen {
    position: absolute;
    top: 18px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: var(--r-pill);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    z-index: 25;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Bottom dock controls */
.lhtp-dock {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    background: rgba(8,9,14,0.7);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    padding: 10px 14px 10px 18px;
    border-radius: var(--r-pill);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 16px 40px rgba(0,0,0,0.5),
        0 4px 12px rgba(0,0,0,0.3);
    max-width: calc(100% - 40px);
    z-index: 30;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.lhtp-dock::-webkit-scrollbar { display: none; }
.lhtp-dock[hidden] { display: none; }
.lhtp-dock-group {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}
.lhtp-dock-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.10);
    flex-shrink: 0;
}

/* Big record button */
.lhtp-btn-record-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid rgba(255,255,255,0.18);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 rgba(230,57,70,0);
    flex-shrink: 0;
}
.lhtp-btn-record-main:hover {
    transform: scale(1.06);
    border-color: rgba(255,255,255,0.30);
}
.lhtp-btn-record-main .lhtp-rec-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5589 0%, #E63946 100%);
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.lhtp-btn-record-main.lhtp-recording {
    box-shadow: 0 0 0 6px rgba(230,57,70,0.2);
}
.lhtp-btn-record-main.lhtp-recording .lhtp-rec-circle {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

/* Play / Pause — sits next to record, controls scroll + recording together */
.lhtp-btn-playpause {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168,116,255,0.18) 0%, rgba(255,85,137,0.18) 100%);
    border: 1px solid rgba(168,116,255,0.40);
    color: #EDE6FF;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.lhtp-btn-playpause .lhtp-icon { font-size: 18px; }
.lhtp-btn-playpause:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(168,116,255,0.28) 0%, rgba(255,85,137,0.28) 100%);
    border-color: rgba(168,116,255,0.65);
    box-shadow: 0 4px 14px rgba(168,116,255,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.lhtp-btn-playpause.is-playing {
    background: linear-gradient(135deg, #A874FF 0%, #FF5589 100%);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
    box-shadow: 0 4px 16px rgba(168,116,255,0.45), inset 0 1px 0 rgba(255,255,255,0.20);
}
.lhtp-btn-playpause.is-playing:hover {
    transform: translateY(-1px);
}

/* Dock controls */
.lhtp-dock-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.12s;
    flex-shrink: 0;
}
.lhtp-dock-btn:hover { background: rgba(255,255,255,0.18); }
.lhtp-dock-btn:active { transform: scale(0.93); }
.lhtp-dock-btn.lhtp-active {
    background: var(--grad-brand-soft);
    border-color: rgba(255,85,137,0.35);
    color: #FFAFCB;
}
.lhtp-dock-btn .lhtp-icon { font-size: 18px; }

.lhtp-slider-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: var(--text-1);
    flex-shrink: 0;
}
.lhtp-slider-group .lhtp-icon { font-size: 16px; color: var(--text-3); }
.lhtp-slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.lhtp-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    border: none;
}
.lhtp-slider-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    border: none;
}
.lhtp-slider-value {
    color: var(--text-2);
    font-size: 12px;
    min-width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Live audio level meter (next to record btn during recording) */
.lhtp-meter {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 36px;
    padding: 0 6px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.lhtp-meter.is-active { opacity: 1; }
.lhtp-meter-bar {
    width: 3px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    transition: height 0.08s linear, background 0.15s;
}
.lhtp-meter-bar.lhtp-hot { background: var(--brand-rose); }
.lhtp-meter-bar.lhtp-warm { background: var(--brand-violet); }

/* =====================================================
   Review (Step 04)
   ===================================================== */
.lhtp-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: var(--sp-7);
    align-items: start;
}
.lhtp-video-wrap {
    background: #000;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-xl);
    border: 1px solid var(--line-1);
}
#lhtp-playback {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: block;
}
.lhtp-video-meta {
    padding: 14px 20px;
    color: var(--text-3);
    font-size: 13px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--line-1);
    display: flex;
    gap: var(--sp-5);
    flex-wrap: wrap;
    font-variant-numeric: tabular-nums;
}
.lhtp-video-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lhtp-video-meta-item .lhtp-icon { font-size: 14px; color: var(--text-4); }

.lhtp-review-side {
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-xl);
    padding: var(--sp-6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--sh-inset-top), var(--sh-md);
}
.lhtp-review-side h3 {
    margin: 0 0 var(--sp-2) 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.lhtp-review-side p {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 var(--sp-5) 0;
}
.lhtp-review-actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}
.lhtp-review-actions .lhtp-btn { width: 100%; justify-content: center; padding: 12px 18px; }

/* =====================================================
   Performance report (Step 05)
   ===================================================== */
.lhtp-hero-score {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sp-7);
    align-items: center;
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-2xl);
    padding: var(--sp-7) var(--sp-8);
    margin-bottom: var(--sp-7);
    box-shadow: var(--sh-inset-top), var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.lhtp-hero-score::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168,116,255,0.20) 0%, transparent 60%);
    top: -160px;
    right: -100px;
    pointer-events: none;
}
.lhtp-hero-ring-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    z-index: 1;
}
.lhtp-hero-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.lhtp-hero-ring .lhtp-ring-track {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 10;
}
.lhtp-hero-ring .lhtp-ring-progress {
    fill: none;
    stroke: url(#lhtp-grad-ring);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.2,0.7,0.3,1);
}
.lhtp-hero-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}
.lhtp-hero-ring-num {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text-1);
}
.lhtp-hero-ring-num small { font-size: 22px; font-weight: 600; color: var(--text-2); }
.lhtp-hero-ring-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    margin-top: 4px;
}
.lhtp-hero-text {
    z-index: 1;
}
.lhtp-hero-grade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    color: var(--text-2);
    padding: 5px 12px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--sp-3);
}
.lhtp-hero-verdict {
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 var(--sp-3) 0;
    color: var(--text-1);
}
.lhtp-hero-summary {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    max-width: 540px;
}

/* Sub-scores grid */
.lhtp-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-7);
}
.lhtp-score-card {
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    padding: var(--sp-5) var(--sp-5) var(--sp-5);
    box-shadow: var(--sh-inset-top);
    position: relative;
    overflow: hidden;
}
.lhtp-score-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-3);
}
.lhtp-score-card-label {
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.lhtp-score-card-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--r-pill);
    font-weight: 500;
}
.lhtp-pill-good { background: var(--mint-soft); color: var(--mint); }
.lhtp-pill-warn { background: var(--amber-soft); color: var(--amber); }
.lhtp-pill-bad  { background: var(--rose-soft);  color: var(--rose); }
.lhtp-pill-info { background: var(--sky-soft);   color: var(--sky); }

.lhtp-score-card-num {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
}
.lhtp-score-card-num small {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-3);
    margin-left: 2px;
}
.lhtp-score-card-bar {
    margin-top: var(--sp-4);
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.lhtp-score-card-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--grad-brand);
    transition: width 1s cubic-bezier(0.2,0.7,0.3,1);
}
.lhtp-score-good .lhtp-score-card-bar-fill { background: linear-gradient(90deg, #4CD9A1, #5DC3F0); }
.lhtp-score-warn .lhtp-score-card-bar-fill { background: linear-gradient(90deg, #F8C156, #FFB682); }
.lhtp-score-bad  .lhtp-score-card-bar-fill { background: linear-gradient(90deg, #FF6B6B, #FF5589); }

/* Report sections */
.lhtp-report-section {
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-xl);
    padding: var(--sp-7);
    margin-bottom: var(--sp-5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--sh-inset-top);
}
.lhtp-section-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}
.lhtp-section-head-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-3);
    border: 1px solid var(--line-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-violet);
}
.lhtp-section-head-icon .lhtp-icon { font-size: 16px; }
.lhtp-report-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.015em;
}
.lhtp-section-help {
    color: var(--text-2);
    font-size: 14px;
    margin: 0 0 var(--sp-5) 0;
    line-height: 1.55;
}

/* Feedback items */
.lhtp-feedback-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-3);
}
.lhtp-feedback-item {
    display: flex;
    gap: var(--sp-3);
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-md);
    padding: var(--sp-4) var(--sp-5);
    transition: border-color 0.2s, background 0.2s;
}
.lhtp-feedback-item:hover { border-color: var(--line-3); }
.lhtp-feedback-item .lhtp-fb-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    color: var(--text-2);
}
.lhtp-fb-positive .lhtp-fb-icon, .lhtp-fb-good .lhtp-fb-icon {
    background: var(--mint-soft); color: var(--mint);
}
.lhtp-fb-warning .lhtp-fb-icon { background: var(--amber-soft); color: var(--amber); }
.lhtp-fb-critical .lhtp-fb-icon { background: var(--rose-soft); color: var(--rose); }
.lhtp-fb-neutral .lhtp-fb-icon { background: var(--sky-soft); color: var(--sky); }
.lhtp-feedback-item .lhtp-fb-icon .lhtp-icon { font-size: 17px; }
.lhtp-feedback-item h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--text-1);
}
.lhtp-feedback-item p {
    margin: 0;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.5;
}

/* Script highlight */
.lhtp-script-highlight {
    font-size: 17px;
    line-height: 1.95;
    color: var(--text-3);
    word-spacing: 2px;
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-6);
    margin-top: var(--sp-3);
    max-height: 480px;
    overflow-y: auto;
}
.lhtp-script-highlight::-webkit-scrollbar { width: 6px; }
.lhtp-script-highlight::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }
.lhtp-word { padding: 1px 3px; border-radius: 3px; }
.lhtp-word-ok { color: var(--text-1); }
.lhtp-word-miss {
    background: rgba(255,107,107,0.16);
    color: #FFBFBF;
    text-decoration: line-through;
    text-decoration-color: rgba(255,107,107,0.55);
    text-decoration-thickness: 1.5px;
}
.lhtp-legend {
    display: flex;
    gap: var(--sp-5);
    flex-wrap: wrap;
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: var(--sp-3);
}
.lhtp-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: -1px;
}
.lhtp-legend-ok .lhtp-legend-dot   { background: rgba(255,255,255,0.5); }
.lhtp-legend-miss .lhtp-legend-dot { background: var(--rose); }

/* Volume chart */
.lhtp-volume-chart-wrap {
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
    margin-top: var(--sp-3);
}
.lhtp-volume-chart {
    width: 100%;
    height: 140px;
    display: block;
}
.lhtp-volume-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--text-4);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.lhtp-volume-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--sp-3);
    margin-top: var(--sp-4);
}
.lhtp-volume-stat {
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-sm);
    padding: 12px 14px;
}
.lhtp-volume-stat-label {
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.lhtp-volume-stat-value {
    color: var(--text-1);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Silence list */
.lhtp-silence-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.lhtp-silence-list li {
    background: var(--amber-soft);
    border: 1px solid rgba(248,193,86,0.25);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    color: var(--text-1);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-variant-numeric: tabular-nums;
}
.lhtp-silence-list .lhtp-silence-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--amber-soft);
    color: var(--amber);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lhtp-silence-list .lhtp-icon { font-size: 14px; }

.lhtp-no-issues {
    background: var(--mint-soft);
    border: 1px solid rgba(76,217,161,0.25);
    border-radius: var(--r-sm);
    padding: 14px 18px;
    color: var(--mint);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.lhtp-transcript {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.7;
    background: var(--surface-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-6);
    margin-top: var(--sp-3);
}

/* =====================================================
   Studio fills viewport (any screen) when entered
   ===================================================== */
.lhtp-app.is-studio {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    min-height: 0 !important;
}
.lhtp-app.is-studio .lhtp-step-studio {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: none;
}
.lhtp-app.is-studio .lhtp-studio {
    flex: 1 1 auto;
    aspect-ratio: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    width: 100%;
    box-shadow: none;
}
.lhtp-app.is-studio .lhtp-studio-topbar {
    flex-shrink: 0;
}

/* =====================================================
   PDF download modal
   ===================================================== */
.lhtp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lhtp-fade-in 0.18s ease-out;
}
.lhtp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 9, 14, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.lhtp-modal-card {
    position: relative;
    background: linear-gradient(180deg, #1a1530 0%, #14102a 100%);
    border: 1px solid rgba(168, 116, 255, 0.30);
    border-radius: 18px;
    padding: 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #fff;
    animation: lhtp-card-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lhtp-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lhtp-card-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}
.lhtp-modal-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}
.lhtp-modal-card > p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}
.lhtp-modal-card input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 18px;
    transition: border-color 0.15s, background 0.15s;
}
.lhtp-modal-card input[type="text"]::placeholder { color: rgba(255, 255, 255, 0.35); }
.lhtp-modal-card input[type="text"]:focus {
    outline: none;
    border-color: rgba(168, 116, 255, 0.65);
    background: rgba(255, 255, 255, 0.09);
}
.lhtp-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.lhtp-modal-status {
    margin: 16px 0 0;
    font-size: 13px;
    text-align: center;
    padding: 9px 12px;
    border-radius: 8px;
}
.lhtp-modal-status.is-loading {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(168, 116, 255, 0.10);
    border: 1px solid rgba(168, 116, 255, 0.20);
}
.lhtp-modal-status.is-error {
    color: #FFD0D0;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.30);
}

/* =====================================================
   Mobile
   ===================================================== */
@media (max-width: 860px) {
    .lhtp-app-header { padding: var(--sp-5) var(--sp-5); }
    .lhtp-container-pad { padding: var(--sp-3) var(--sp-5) var(--sp-9); }
    .lhtp-step-title { font-size: 38px; letter-spacing: -0.03em; }
    .lhtp-step-desc { font-size: 16px; }
    .lhtp-cards-grid, .lhtp-scripts-list { grid-template-columns: 1fr; gap: var(--sp-4); }
    .lhtp-review-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
    .lhtp-hero-score {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--sp-6);
    }
    .lhtp-hero-ring-wrap { margin: 0 auto; width: 160px; height: 160px; }
    .lhtp-hero-summary { margin: 0 auto; }

    .lhtp-app.is-studio {
        position: fixed;
        inset: 0;
        z-index: 9999;
    }
    .lhtp-overlay { width: 92%; left: 4%; transform: none; height: 36vh; min-height: 140px; }
    .lhtp-scroll-content { font-size: 26px; }
    .lhtp-studio-topbar { padding: 12px 16px; }
    .lhtp-studio-topbar .lhtp-now-playing { display: none; }

    /* Mobile dock — wrap into 2 rows so every control is on-screen */
    .lhtp-dock {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px 6px;
        padding: 10px 14px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100% - 16px);
        max-width: none;
        border-radius: 22px;
        overflow: visible;
    }
    .lhtp-dock-divider { display: none; }
    .lhtp-meter { display: none; }

    /* Row 1: sliders span the full width */
    .lhtp-dock > .lhtp-dock-group:first-child {
        order: 1;
        flex: 1 1 100%;
        display: flex;
        justify-content: space-between;
        gap: 6px;
    }
    .lhtp-dock > .lhtp-dock-group:first-child .lhtp-slider-group {
        flex: 1 1 0;
        min-width: 0;
        padding: 0;
        gap: 4px;
    }
    .lhtp-dock > .lhtp-dock-group:first-child .lhtp-slider-group input[type="range"] {
        width: 100%;
        min-width: 40px;
    }
    .lhtp-dock > .lhtp-dock-group:first-child .lhtp-slider-value {
        min-width: 24px;
        font-size: 11px;
    }

    /* Row 2: play/pause + record + secondary buttons together, centered */
    .lhtp-btn-playpause {
        order: 2;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
    .lhtp-btn-record-main {
        order: 3;
        width: 56px;
        height: 56px;
        border-width: 3px;
        flex-shrink: 0;
    }
    .lhtp-btn-record-main .lhtp-rec-circle { width: 32px; height: 32px; }
    .lhtp-btn-record-main.lhtp-recording .lhtp-rec-circle { width: 18px; height: 18px; }
    .lhtp-dock > .lhtp-dock-group:last-child {
        order: 4;
        display: inline-flex;
        gap: 6px;
        flex-shrink: 0;
    }
    .lhtp-dock-btn { width: 36px; height: 36px; }
    .lhtp-dock-btn .lhtp-icon { font-size: 16px; }

    .lhtp-feedback-list { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    /* Very narrow phones — slightly tighter sizing */
    .lhtp-btn-record-main { width: 52px; height: 52px; }
    .lhtp-btn-playpause { width: 40px; height: 40px; }
    .lhtp-dock-btn { width: 34px; height: 34px; }
    .lhtp-dock > .lhtp-dock-group:first-child .lhtp-slider-value { display: none; }
    .lhtp-dock { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .lhtp-app *, .lhtp-app *::before, .lhtp-app *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
   Full-page body (dedicated /teleprompter URL)
   ===================================================== */
body.lhtp-fullpage {
    margin: 0;
    background: var(--surface-0, #08090E);
}
body.lhtp-fullpage .lhtp-app {
    min-height: 100vh;
    min-height: 100dvh;
}

/* =====================================================
   Print (Save as PDF) — Performance report
   Goal: clean white-paper rendering with the user's name
   prominently in a printable header, every section legible.
   ===================================================== */
.lhtp-print-only { display: none; }

@media print {
    /* Reset page background */
    html, body, body.lhtp-fullpage {
        background: #fff !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide everything by default, then reveal the report */
    body > *:not(.lhtp-app) { display: none !important; }
    .lhtp-app-header,
    .lhtp-close-btn,
    .lhtp-step:not(.lhtp-step-report),
    .lhtp-modal,
    .lhtp-step-tag,
    .lhtp-step-report > .lhtp-container-pad > .lhtp-step-title,
    .lhtp-step-report > .lhtp-container-pad > #lhtp-report-subtitle,
    .lhtp-review-actions,
    .lhtp-section-help,
    button { display: none !important; }

    /* Force-show the report step even when [hidden] in the JS state */
    .lhtp-step-report,
    .lhtp-step-report[hidden] {
        display: block !important;
        animation: none !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .lhtp-step-report .lhtp-container-pad {
        padding: 0 !important;
        max-width: none !important;
    }

    /* Print-only header */
    .lhtp-print-only { display: block !important; }
    #lhtp-print-header {
        padding: 0 0 14pt 0;
        margin-bottom: 18pt;
        border-bottom: 2pt solid #1a1242;
    }
    .lhtp-print-brand {
        color: #1a1242;
        font-size: 9pt;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        margin-bottom: 4pt;
    }
    .lhtp-print-title {
        font-size: 26pt;
        font-weight: 700;
        margin: 0 0 14pt 0;
        color: #000;
        letter-spacing: -0.01em;
    }
    .lhtp-print-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4pt 24pt;
        font-size: 11pt;
        color: #222;
    }
    .lhtp-print-meta > div {
        display: flex;
        gap: 6pt;
        align-items: baseline;
    }
    .lhtp-print-label {
        color: #888;
        font-size: 9pt;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        min-width: 50pt;
    }

    /* Neutralise the dark theme */
    .lhtp-step-report *,
    .lhtp-step-report *::before,
    .lhtp-step-report *::after {
        color: #1a1a26 !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }
    .lhtp-step-report .lhtp-hero-score,
    .lhtp-step-report .lhtp-score-card,
    .lhtp-step-report .lhtp-report-section,
    .lhtp-step-report .lhtp-feedback-item,
    .lhtp-step-report .lhtp-script-highlight,
    .lhtp-step-report .lhtp-volume-chart-wrap,
    .lhtp-step-report .lhtp-volume-stat,
    .lhtp-step-report .lhtp-no-issues,
    .lhtp-step-report .lhtp-transcript {
        background: #fff !important;
        border: 1pt solid #d8d8e0 !important;
        border-radius: 6pt !important;
        padding: 10pt 14pt !important;
        margin-bottom: 10pt !important;
    }
    .lhtp-step-report .lhtp-report-section { border: 0 !important; padding: 0 !important; margin: 0 0 14pt !important; }
    .lhtp-step-report .lhtp-section-head { margin-bottom: 6pt !important; }
    .lhtp-step-report .lhtp-section-head h2 {
        font-size: 13pt !important;
        font-weight: 700 !important;
        color: #1a1242 !important;
        border-bottom: 1pt solid #d8d8e0;
        padding-bottom: 4pt;
        margin: 0 !important;
    }
    .lhtp-step-report .lhtp-section-head-icon { display: none !important; }

    /* Hero score */
    .lhtp-step-report .lhtp-hero-ring-wrap { width: 70pt !important; height: 70pt !important; }
    .lhtp-step-report .lhtp-hero-ring { width: 70pt !important; height: 70pt !important; }
    .lhtp-step-report .lhtp-hero-ring-num { color: #1a1242 !important; font-size: 22pt !important; }
    .lhtp-step-report .lhtp-hero-ring-label { color: #555 !important; font-size: 9pt !important; }
    .lhtp-step-report .lhtp-ring-track { stroke: #e2e2ea !important; }
    .lhtp-step-report .lhtp-ring-progress { stroke: #6b3fb8 !important; }
    .lhtp-step-report .lhtp-hero-grade { color: #6b3fb8 !important; font-weight: 700 !important; }
    .lhtp-step-report .lhtp-hero-verdict { color: #000 !important; font-size: 15pt !important; }
    .lhtp-step-report .lhtp-hero-summary { color: #333 !important; font-size: 11pt !important; }

    /* Sub-score cards */
    .lhtp-step-report .lhtp-scores-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 8pt !important;
        margin-bottom: 14pt !important;
    }
    .lhtp-step-report .lhtp-score-card {
        padding: 10pt !important;
        page-break-inside: avoid;
    }
    .lhtp-step-report .lhtp-score-card-label { color: #555 !important; font-size: 9pt !important; }
    .lhtp-step-report .lhtp-score-card-num { color: #000 !important; font-size: 20pt !important; font-weight: 700 !important; }
    .lhtp-step-report .lhtp-score-card-bar { background: #eee !important; height: 4pt !important; }
    .lhtp-step-report .lhtp-score-card-bar-fill { background: #6b3fb8 !important; }

    /* Pills — print with light tints + visible color */
    .lhtp-step-report .lhtp-pill-good,
    .lhtp-step-report .lhtp-score-card-pill.lhtp-pill-good {
        background: #e8f5e9 !important;
        color: #1b5e20 !important;
        border: 1pt solid #4caf50 !important;
    }
    .lhtp-step-report .lhtp-pill-warn,
    .lhtp-step-report .lhtp-score-card-pill.lhtp-pill-warn {
        background: #fff3e0 !important;
        color: #bf360c !important;
        border: 1pt solid #ff9800 !important;
    }
    .lhtp-step-report .lhtp-pill-bad,
    .lhtp-step-report .lhtp-score-card-pill.lhtp-pill-bad {
        background: #ffebee !important;
        color: #b71c1c !important;
        border: 1pt solid #e53935 !important;
    }

    /* Coach notes */
    .lhtp-step-report .lhtp-feedback-list {
        display: block !important;
    }
    .lhtp-step-report .lhtp-feedback-item {
        display: flex !important;
        gap: 8pt !important;
        page-break-inside: avoid;
    }
    .lhtp-step-report .lhtp-feedback-item h4 {
        color: #000 !important;
        font-size: 11pt !important;
        font-weight: 700 !important;
        margin: 0 0 2pt !important;
    }
    .lhtp-step-report .lhtp-feedback-item p {
        color: #333 !important;
        font-size: 10pt !important;
        margin: 0 !important;
    }
    .lhtp-step-report .lhtp-fb-icon { display: none !important; }
    .lhtp-step-report .lhtp-fb-positive::before,
    .lhtp-step-report .lhtp-fb-good::before     { content: "✓"; color: #2e7d32; font-weight: 700; font-size: 12pt; line-height: 1; flex-shrink: 0; }
    .lhtp-step-report .lhtp-fb-warning::before  { content: "!"; color: #ef6c00; font-weight: 700; font-size: 12pt; line-height: 1; flex-shrink: 0; }
    .lhtp-step-report .lhtp-fb-critical::before { content: "!"; color: #c62828; font-weight: 700; font-size: 12pt; line-height: 1; flex-shrink: 0; }
    .lhtp-step-report .lhtp-fb-neutral::before  { content: "•"; color: #666;    font-weight: 700; font-size: 12pt; line-height: 1; flex-shrink: 0; }

    /* Word-by-word script match */
    .lhtp-step-report .lhtp-script-highlight {
        font-size: 10pt !important;
        line-height: 1.6 !important;
        page-break-inside: auto;
    }
    .lhtp-step-report .lhtp-word-ok   { color: #1a1a26 !important; background: transparent !important; }
    .lhtp-step-report .lhtp-word-miss { color: #b71c1c !important; background: #ffebee !important; padding: 0 2pt; border-radius: 2pt; }
    .lhtp-step-report .lhtp-legend-ok   .lhtp-legend-dot { background: #2e7d32 !important; }
    .lhtp-step-report .lhtp-legend-miss .lhtp-legend-dot { background: #c62828 !important; }

    /* Volume chart */
    .lhtp-step-report .lhtp-volume-chart-wrap { padding: 6pt !important; }
    .lhtp-step-report .lhtp-volume-chart { width: 100% !important; height: 70pt !important; }
    .lhtp-step-report .lhtp-volume-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 6pt !important;
        margin-top: 8pt !important;
    }
    .lhtp-step-report .lhtp-volume-stat-label { color: #666 !important; font-size: 9pt !important; }
    .lhtp-step-report .lhtp-volume-stat-value { color: #000 !important; font-size: 14pt !important; font-weight: 700 !important; }
    .lhtp-step-report .lhtp-volume-axis { color: #888 !important; font-size: 8pt !important; }

    /* Long pauses + transcript */
    .lhtp-step-report .lhtp-silence-list { padding: 0 0 0 14pt !important; }
    .lhtp-step-report .lhtp-silence-list li { color: #333 !important; font-size: 10pt !important; margin: 0 0 3pt !important; }
    .lhtp-step-report .lhtp-silence-icon { display: none !important; }
    .lhtp-step-report .lhtp-no-issues { color: #1b5e20 !important; }
    .lhtp-step-report .lhtp-transcript {
        color: #1a1a26 !important;
        font-size: 10pt !important;
        line-height: 1.55 !important;
        font-style: normal !important;
    }

    /* Page breaks */
    .lhtp-step-report .lhtp-report-section { page-break-inside: avoid; }
    .lhtp-step-report .lhtp-hero-score     { page-break-after: avoid; }
    .lhtp-step-report .lhtp-script-highlight { page-break-before: auto; }

    /* No animations during print */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

@page {
    margin: 16mm 14mm;
    size: A4;
}
