/* ==========================================================================
   Yoga for Heart — "Gentle Healing" theme
   Soft rose & blush, accessibility-first: large readable type, high contrast,
   big tap targets, generous whitespace. Light + dark mode aware.
   ========================================================================== */

:root {
    /* Palette */
    --ivory:      #FDFBF9;
    --blush:      #F6E7E4;
    --blush-deep: #EFD6D2;
    --rose:       #D69A9A;
    --rose-deep:  #A94E5E;   /* buttons / links — AA contrast on ivory */
    --rose-dark:  #8C3D4C;   /* hover */
    --plum:       #4A343B;   /* headings */
    --heart-red:  #C0392B;   /* logo accent */
    --text:       #3A2F32;
    --muted:      #6B5A5E;
    --line:       #E7D6D2;
    --white:      #ffffff;
    --success-bg: #E4F1E6;
    --success-fg: #2E6B3A;
    --error-bg:   #FBE4E4;
    --error-fg:   #9E2A2A;
    --inactive-bg: #E4D6D3;   /* light tint of the site plum-brown */
    --inactive-fg: #4A343B;   /* site plum-brown (matches headings) */

    /* CTA band — explicit tokens so contrast is controlled per theme */
    --cta-bg-1:      #A94E5E;   /* gradient start */
    --cta-bg-2:      #8C3D4C;   /* gradient end */
    --cta-fg:        #ffffff;
    --cta-btn-bg:    #ffffff;
    --cta-btn-fg:    #8C3D4C;
    --cta-btn-hover: #F6E7E4;

    /* Primary button — soft pink fill with a brown label so the text reads
       clearly (white on pink was low contrast, especially in dark mode). */
    --btn-bg:        #D69A9A;   /* soft rose */
    --btn-fg:        #4A343B;   /* plum / brown label */
    --btn-hover-bg:  #C98A8A;   /* slightly deeper on hover */

    /* Surfaces */
    --bg:         var(--ivory);
    --surface:    var(--white);
    --header-bg:  rgba(253, 251, 249, 0.92);

    /* Type */
    --font-head: 'Quicksand', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
    --fs-base: 1.125rem;   /* 18px — larger default for readability */

    /* Shape */
    --radius:    18px;
    --radius-sm: 12px;
    --shadow:    0 10px 30px rgba(74, 52, 59, 0.10);
    --shadow-sm: 0 4px 14px rgba(74, 52, 59, 0.08);
    --container: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ivory:      #1a1416;
        --blush:      #241a1d;
        --blush-deep: #2c2024;
        --rose:       #d99ea0;
        --rose-deep:  #e79aa6;
        --rose-dark:  #f2b6c0;
        --plum:       #f4e6e8;
        --text:       #ece0e2;
        --muted:      #c3aeb2;
        --line:       #3a2c30;
        --white:      #241a1d;
        --surface:    #241a1d;
        --header-bg:  rgba(26, 20, 22, 0.92);
        --shadow:     0 10px 30px rgba(0, 0, 0, 0.4);
        --shadow-sm:  0 4px 14px rgba(0, 0, 0, 0.35);
        --success-bg: #1f3324;
        --success-fg: #9fd6a8;
        --error-bg:   #3a2023;
        --error-fg:   #f0a8a8;
        --inactive-bg: #33281f;   /* deep warm brown */
        --inactive-fg: #cbb49c;   /* soft tan */

        /* Keep the CTA band a deep, saturated rose in dark mode so white
           text stays readable (the base rose tokens flip to pale pinks). */
        --cta-bg-1:      #8C3D4C;
        --cta-bg-2:      #642835;
        --cta-fg:        #ffffff;
        --cta-btn-bg:    #ffffff;
        --cta-btn-fg:    #8C3D4C;
        --cta-btn-hover: #F6E7E4;

        /* Soft pink fill + dark brown label keeps the button readable when
           the base rose tokens flip to pale pinks in dark mode. */
        --btn-bg:        #e79aa6;
        --btn-fg:        #3a1f25;
        --btn-hover-bg:  #f2b6c0;
    }
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    /* Full-height flex column so the footer is pushed to the bottom of the
       viewport even when the page content is short (e.g. the login/paywall
       screens). main grows to fill any leftover space. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--plum);
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin: 0 0 1.1em; }

a { color: var(--rose-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--rose-dark); }

:focus-visible {
    outline: 3px solid var(--rose-deep);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--btn-bg);
    color: var(--btn-fg);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 1000;
}
.skip-link:focus { left: 0; color: var(--btn-fg); }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
    background: var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--btn-hover-bg); color: var(--btn-fg); transform: translateY(-2px); }
.btn-secondary {
    background: transparent;
    color: var(--rose-deep);
    border-color: var(--rose-deep);
}
.btn-secondary:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--plum);
}
.brand-logo { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.85rem; color: var(--plum); }
.brand-name em { color: var(--heart-red); font-style: normal; font-weight: 500; }
.brand-tag { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: center; }

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-nav a {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
}
.primary-nav a:hover { background: var(--blush); color: var(--plum); }
.primary-nav a[aria-current="page"] { color: var(--rose-deep); background: var(--blush); }
.nav-cta a {
    background: var(--btn-bg);
    color: var(--btn-fg);
    margin-left: 0.35rem;
}
.nav-cta a:hover { background: var(--btn-hover-bg); color: var(--btn-fg); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    background: transparent;
    border: 2px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin-inline: auto;
    background: var(--plum);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute;
        left: 0; right: 0; top: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
    }
    .primary-nav.open { max-height: 32rem; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem; }
    .primary-nav a { padding: 0.9rem 1rem; border-radius: var(--radius-sm); font-size: 1.1rem; }
    .nav-cta a { margin: 0.35rem 0 0; text-align: center; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--blush) 0%, var(--ivory) 70%);
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    color: var(--rose-deep);
    background: var(--surface);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: 0.4rem; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }
.hero-media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 1160 / 588;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hero-media { order: -1; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.section-tight-top { padding-top: clamp(1.25rem, 3vw, 2rem); }
.section-alt { background: var(--blush); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rose-deep);
    display: block;
    margin-bottom: 0.6rem;
}
.lead { font-size: 1.15rem; }

/* Feature cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.card .card-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--blush);
    color: var(--rose-deep);
    margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--muted); margin: 0; }

/* Split (image + text) */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.split.reverse .split-media { order: 2; }
/* Keep the photo pinned to the bottom of its column, no matter how tall the
   text beside it is. The copy column keeps the parent's centering. */
.split-media { align-self: end; }
.split-media img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
@media (max-width: 800px) {
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: 0; }
}

/* --------------------------------------------------------------------------
   Class schedule cards
   -------------------------------------------------------------------------- */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}
.class-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.9rem 1.6rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.class-card::before {
    /* soft accent bar along the top, matching testimonial cards */
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose), var(--rose-deep));
}
.class-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.class-card h3 { margin: 0 0 0.5rem; color: var(--rose-deep); }
.class-card p {
    color: var(--muted);
    line-height: 1.7;
    flex: 1 1 auto;
    margin: 0;
}
.class-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.class-meta-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--blush);
    color: var(--rose-deep);
}
.class-meta-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.class-day {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--plum);
}
.class-time {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.badge {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--plum);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    align-self: flex-start;
    margin-top: 1.25rem;
    line-height: 1;
}

.info-band {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Benefits articles + gallery
   -------------------------------------------------------------------------- */
/* Two columns on wider screens, collapsing to one on narrow screens. */
.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (max-width: 640px) {
    .article-list { grid-template-columns: 1fr; }
}
.article {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--rose);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
}
.article h3 { margin-bottom: 0.2rem; }
.article .byline { color: var(--rose-deep); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.6rem; }
.article p { color: var(--muted); margin-bottom: 0.8rem; }
.article .btn { margin-top: auto; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.gallery figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.04); }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}
.quote {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.5rem 1.9rem 1.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.quote::before {
    /* soft accent bar along the top */
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rose), var(--rose-deep));
}
.quote:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.quote-mark {
    font-family: Georgia, serif;
    font-size: 4.5rem;
    line-height: 0.8;
    color: var(--rose);
    opacity: 0.45;
    display: block;
    margin-bottom: 0.25rem;
}
.quote blockquote {
    margin: 0;
    flex: 1 1 auto;
}
.quote blockquote p {
    margin: 0;
    color: var(--plum);
    font-size: 1.02rem;
    line-height: 1.7;
}
.quote-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.quote-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--rose-deep);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}
.quote-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.quote-meta cite {
    font-style: normal;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--plum);
}
.quote-role {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 1.25rem; }
.field label {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--plum);
    margin-bottom: 0.4rem;
}
.field .req { color: var(--heart-red); }
.field input,
.field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    min-height: 48px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus { border-color: var(--rose-deep); outline: none; }
.field .hint { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
.field-error { color: var(--error-fg); font-size: 0.92rem; margin-top: 0.35rem; font-weight: 600; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field.two { grid-template-columns: 1fr; } }

/* Honeypot — visually and programmatically hidden from humans */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: var(--success-fg); border-color: currentColor; }
.alert.is-dismissing {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.alert-error   { background: var(--error-bg);   color: var(--error-fg);   border-color: currentColor; }

.captcha-q { font-weight: 700; color: var(--plum); }

/* 6-box PIN input (progressive enhancement of a single PIN field) */
.pin-boxes { display: flex; gap: 0.5rem; }
.pin-box {
    flex: 1 1 0;
    min-width: 0;
    max-width: 56px;
    height: 56px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    caret-color: var(--rose-deep);
}
.pin-box:focus { border-color: var(--rose-deep); outline: none; }
.pin-box.is-filled { border-color: var(--rose-deep); }
/* Real input is kept in the DOM (submission + password managers) but hidden. */
.pin-hidden-input {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    padding: 0; border: 0; overflow: hidden;
    opacity: 0;
}
@media (max-width: 400px) {
    .pin-boxes { gap: 0.35rem; }
    .pin-box { height: 52px; font-size: 1.3rem; }
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(160deg, var(--blush) 0%, var(--ivory) 100%);
    padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
    text-align: center;
}
.page-hero p { color: var(--muted); max-width: 60ch; margin-inline: auto; font-size: 1.15rem; }
.page-hero .hero-actions { margin-top: 1.5rem; display: flex; justify-content: center; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
    background: linear-gradient(135deg, var(--cta-bg-1), var(--cta-bg-2));
    color: var(--cta-fg);
    border-radius: var(--radius);
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-top: 2.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-band:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(74, 52, 59, 0.18); }
.cta-band h2 { color: var(--cta-fg); }
.cta-band p { color: color-mix(in srgb, var(--cta-fg) 90%, transparent); max-width: 52ch; margin-inline: auto 1.5rem; }
.cta-band .btn-primary {
    background: var(--cta-btn-bg);
    color: var(--cta-btn-fg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-band .btn-primary:hover {
    background: var(--cta-btn-hover);
    color: var(--cta-btn-fg);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}
.cta-band .btn-primary:focus-visible {
    outline: 3px solid var(--cta-btn-bg);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .cta-band, .cta-band:hover,
    .cta-band .btn-primary, .cta-band .btn-primary:hover {
        transform: none;
        transition: none;
    }
}

/* Members / sessions */
.session-list { display: grid; gap: 1.25rem; }
.session-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
.session-item .meta h3 { margin-bottom: 0.2rem; }
.session-item .meta .date { color: var(--muted); font-weight: 600; }

/* Admin lesson cards — compact 3-up grid, member name pinned to the foot. */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.lesson-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.35rem 0;
    overflow: hidden;
}
.lesson-card-body { flex: 1 1 auto; }
.lesson-card-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    min-width: 0;
}
/* Title row: lesson name on the left, clip-count pill across on the right. */
.lesson-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}
.lesson-count-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--rose-deep);
    color: var(--white);
    border: 1px solid var(--rose-dark);
    border-radius: 999px;
    padding: 0.24rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    margin-top: 0.1rem;
    box-shadow: 0 1px 3px rgba(74, 52, 59, 0.18);
}
.lesson-card-clips {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Clip names as soft filled pills — one per clip, wrapping as needed. */
.lesson-chips {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.lesson-chip {
    display: inline-flex;
    align-items: center;
    background: var(--white);
    color: var(--plum);
    border: 1px solid var(--rose);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(74, 52, 59, 0.08);
}
/* Foot row: member name on the left, three-dots menu across on the right. */
.lesson-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.1rem -1.35rem 0;
    padding: 0.55rem 1.35rem;
    border-top: 1px solid var(--line);
    background: var(--blush);
}
.lesson-card-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: var(--rose-deep);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
}
.lesson-card-member svg { flex: 0 0 auto; }
.lesson-card-member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}
.lesson-card-member-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lesson-card-date {
    color: var(--muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
}
/* Three-dots (kebab) actions menu. */
.lesson-menu { position: relative; flex: 0 0 auto; }
.lesson-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--rose-deep);
    cursor: pointer;
    transition: background 0.15s ease;
}
.lesson-menu-toggle:hover,
.lesson-menu-toggle[aria-expanded="true"] { background: var(--blush-deep); }
.lesson-menu-toggle:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 2px; }
.lesson-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.4rem);
    min-width: 150px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.35rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
/* Respect the `hidden` attribute: without this the `display: flex` above
   overrides the browser's built-in `[hidden] { display: none }`, so the
   panel would be stuck open and impossible to dismiss. */
.lesson-menu-panel[hidden] { display: none; }
.lesson-menu-panel form { margin: 0; }
.lesson-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.7rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    text-decoration: none;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lesson-menu-item:hover { background: var(--blush); }
.lesson-menu-item-danger { color: var(--error-fg); }
.lesson-menu-item-danger:hover { background: var(--error-bg); }

/* Clip cards reuse the lesson-card shell (kebab menu in the foot). */
.clip-card-desc {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 900px) {
    .lesson-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .lesson-grid { grid-template-columns: 1fr; }
}
.logout-row { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.logout-row form { margin: 0; }
.logout-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--rose);
    border-radius: 999px;
    color: var(--rose-deep);
    font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
    line-height: 1; cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.logout-btn:hover {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-fg);
    transform: translateY(-1px);
}
.logout-btn:focus-visible {
    outline: 2px solid var(--rose-deep);
    outline-offset: 2px;
}

.login-wrap { max-width: 460px; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Admin area
   -------------------------------------------------------------------------- */
.admin-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.admin-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.admin-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0.75rem 0;
}
.admin-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--plum);
    text-decoration: none;
}
.admin-nav a:hover { background: var(--blush); }
.admin-nav a[aria-current="page"] { background: var(--btn-bg); color: var(--btn-fg); }
.admin-nav-signout { margin: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.stat-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--rose-deep);
    line-height: 1;
}
.stat-label {
    display: block;
    margin-top: 0.4rem;
    color: var(--muted);
    font-weight: 600;
}

/* Dashboard uses a fixed 3-column grid so the six stat cards form a tidy
   3x2 block on desktop, collapsing to 2 then 1 column on smaller screens. */
.stat-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
    .stat-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
    .stat-grid--3 { grid-template-columns: 1fr; }
}

/* Revenue card: same footprint, gently tinted so the money figure stands out. */
.stat-card--revenue {
    background: linear-gradient(135deg, var(--blush), var(--surface));
    border-color: var(--rose);
}
.stat-note {
    display: block;
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.admin-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--rose);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.admin-card h3 { margin-bottom: 0.4rem; }
.admin-card p { color: var(--muted); margin-bottom: 0.8rem; }
.admin-card-cta { color: var(--rose-deep); font-weight: 700; font-family: var(--font-head); }

/* Data table (clients) */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.data-table th {
    font-family: var(--font-head);
    color: var(--plum);
    background: var(--blush);
}
.data-table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.row-actions form { margin: 0; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.badge-active   { background: var(--success-bg); color: var(--success-fg); }
.badge-invited  { background: var(--blush-deep); color: var(--plum); }
.badge-inactive { background: var(--inactive-bg); color: var(--inactive-fg); }
.badge-disabled { background: var(--error-bg); color: var(--error-fg); }

.btn-small {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--rose-deep);
    background: var(--surface);
    color: var(--rose-deep);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.btn-small:hover { background: var(--btn-bg); color: var(--btn-fg); }
.btn-danger { border-color: var(--error-fg); color: var(--error-fg); }
.btn-danger:hover { background: var(--error-fg); color: #fff; }

.select-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    min-height: 48px;
}
.select-input:focus { border-color: var(--rose-deep); outline: none; }

.client-group-title {
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--line);
}

/* Client-facing private video list */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.video-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.video-item h3 { margin-bottom: 0.3rem; }
.video-desc { color: var(--muted); margin-bottom: 1rem; }
.video-item video {
    width: 100%;
    border-radius: var(--radius-sm);
    background: #000;
    display: block;
}

@media (max-width: 640px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        overflow: hidden;
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid var(--line);
    }
    .data-table td::before {
        content: attr(data-label);
        font-family: var(--font-head);
        font-weight: 700;
        color: var(--plum);
    }
    .data-table td.row-actions { display: flex; justify-content: flex-start; }
    .data-table td.row-actions::before { content: ""; }
}

/* --------------------------------------------------------------------------
   Client cards (admin)
   -------------------------------------------------------------------------- */
.client-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    column-gap: 1.75rem;
    row-gap: 3.25rem;   /* extra room so the avatar can hang over the card top */
    padding-top: 42px;  /* room for the first row's overhanging avatar */
}

.client-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.client-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* Banner removed: the avatar now hangs halfway over the card's own top edge. */

.client-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

.client-card__avatar {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-top: -38px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    background: linear-gradient(135deg, var(--rose-deep), var(--rose-dark));
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
}
/* Circle interior tinted per account status so the color cue lives on the
   overhanging avatar (warm undertones to match the rose/plum palette). */
.client-card--active   .client-card__avatar { background: linear-gradient(135deg, #8F9A63, #566B34); } /* warm olive green */
.client-card--invited  .client-card__avatar { background: linear-gradient(135deg, #C9B7A6, #8B7460); } /* warm taupe */
.client-card--inactive .client-card__avatar { background: linear-gradient(135deg, #6B4A52, #3A2F32); } /* site plum-brown */
.client-card--disabled .client-card__avatar { background: linear-gradient(135deg, #C96A5C, #8E2F2A); } /* warm red */

.client-card__name {
    margin: 0.85rem 0 0.15rem;
    font-size: 1.3rem;
    line-height: 1.2;
    color: var(--plum);
}
.client-card__email {
    display: inline-block;
    max-width: 100%;
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
    word-break: break-word;
}
.client-card__email:hover { color: var(--rose-deep); text-decoration: underline; }

.client-card__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

/* Info list: icon + label on the left, value aligned right. Reads well for
   mixed value types (a count, a phone number, a date) unlike big stat numbers. */
.client-card__meta {
    list-style: none;
    width: 100%;
    margin: 1.1rem 0;
    padding: 0.4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.client-card__meta-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.1rem;
}
.client-card__meta-row + .client-card__meta-row {
    border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.client-card__meta-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--rose-deep);
}
.client-card__meta-label {
    font-size: 0.82rem;
    color: var(--muted);
}
.client-card__meta-value {
    margin-left: auto;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--plum);
    text-decoration: none;
    text-align: right;
}
a.client-card__meta-value:hover { color: var(--rose-deep); text-decoration: underline; }

.client-card__foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: auto;
}

/* Filled primary CTA */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 1;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.cc-btn--primary {
    background: linear-gradient(135deg, var(--btn-bg), var(--btn-hover-bg));
    color: var(--btn-fg);
}
.cc-btn--primary:hover { transform: translateY(-1px); filter: brightness(1.02); color: var(--btn-fg); }

/* --- Kebab menu --- */
.cc-menu { position: relative; flex: 0 0 auto; }
.cc-menu__toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cc-menu__toggle:hover,
.cc-menu.is-open .cc-menu__toggle {
    background: var(--blush);
    color: var(--rose-deep);
    border-color: var(--rose);
}

.cc-menu__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 40;
    min-width: 210px;
    padding: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.cc-menu.is-open .cc-menu__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
/* Little pointer at the bottom edge, aligned to the toggle. */
.cc-menu__panel::after {
    content: "";
    position: absolute;
    right: 15px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform: rotate(45deg);
}
.cc-menu__panel form { margin: 0; }

.cc-menu__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.cc-menu__item svg { flex: 0 0 auto; color: var(--muted); transition: color 0.12s ease; }
.cc-menu__item:hover,
.cc-menu__item:focus-visible {
    background: var(--blush);
    color: var(--rose-deep);
    outline: none;
}
.cc-menu__item:hover svg,
.cc-menu__item:focus-visible svg { color: var(--rose-deep); }

.cc-menu__item--warn:hover,
.cc-menu__item--warn:focus-visible { background: #fbeee0; color: #a05a12; }
.cc-menu__item--warn:hover svg,
.cc-menu__item--warn:focus-visible svg { color: #a05a12; }

.cc-menu__item--danger { color: var(--error-fg); }
.cc-menu__item--danger svg { color: var(--error-fg); }
.cc-menu__item--danger:hover,
.cc-menu__item--danger:focus-visible { background: var(--error-bg); color: var(--error-fg); }
.cc-menu__item--danger:hover svg,
.cc-menu__item--danger:focus-visible svg { color: var(--error-fg); }

.cc-menu__sep {
    height: 1px;
    margin: 0.35rem 0.4rem;
    background: var(--line);
}

@media (max-width: 420px) {
    .client-cards { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--plum);
    color: #f3e7e9;
    margin-top: 4rem;
}
@media (prefers-color-scheme: dark) {
    .site-footer { background: #14090c; }
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 2.5rem;
    padding: 3rem 0 2rem;
}
.footer-brand img { margin-bottom: 1rem; background: #fff; border-radius: 12px; padding: 6px; }
.footer-brand .footer-logo { width: 112px; height: auto; margin-top: 1rem; margin-bottom: 0; background: none; border-radius: 0; padding: 0; filter: brightness(0) invert(1); display: block; }
.footer-brand p { color: #d8c4c8; max-width: 34ch; }
.site-footer h2 { color: #fff; font-size: 1.15rem; margin-bottom: 0.9rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-nav a, .footer-connect a { color: #e8d6d9; text-decoration: none; }
.footer-nav a:hover, .footer-connect a:hover { color: #fff; text-decoration: underline; }
.footer-connect p { color: #d8c4c8; }
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-links a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.6rem 1rem; border-radius: 999px;
    font-family: var(--font-head); font-weight: 600;
}
.social-links a:hover { background: rgba(255,255,255,0.2); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.25rem 0;
}
.footer-bottom p { margin: 0; color: #c9b3b7; font-size: 0.9rem; text-align: center; }
@media (max-width: 800px) {
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* --------------------------------------------------------------------------
   Video feature
   -------------------------------------------------------------------------- */
.video-feature {
    max-width: 900px;
    margin-inline: auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #000;
    aspect-ratio: 16 / 9;
}
.video-feature video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Utility spacing */
.mt-2 { margin-top: 2rem; }
.stack > * + * { margin-top: 1rem; }
.prose { max-width: 68ch; }
.prose p { color: var(--text); }

/* ==========================================================================
   Admin — video upload form (client picker, AI buttons, dropzone)
   ========================================================================== */

.upload-card { position: relative; }

/* --- Searchable client picker ------------------------------------------- */
.client-picker { position: relative; }

.cp-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 60px;
    padding: 0.6rem 1rem;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-trigger:hover { border-color: var(--rose); }
.client-picker.is-open .cp-trigger,
.cp-trigger:focus-visible {
    border-color: var(--rose-deep);
    outline: none;
    box-shadow: 0 0 0 4px rgba(169, 78, 94, 0.14);
}
.cp-trigger-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}
.cp-placeholder { color: var(--muted); font-size: 1.05rem; }
.cp-trigger-meta { display: flex; flex-direction: column; min-width: 0; }
.cp-trigger-name {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--plum);
    line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-trigger-email {
    font-size: 0.88rem;
    color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-chevron {
    color: var(--muted);
    display: inline-flex;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.client-picker.is-open .cp-chevron { transform: rotate(180deg); color: var(--rose-deep); }

/* Avatar chips */
.cp-avatar {
    --cp-hue: 346;
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    background: hsl(var(--cp-hue) 52% 90%);
    color: hsl(var(--cp-hue) 42% 34%);
    box-shadow: inset 0 0 0 1px hsl(var(--cp-hue) 40% 80%);
}
.cp-avatar-sm { width: 38px; height: 38px; font-size: 0.92rem; }

/* Dropdown panel */
.cp-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.6rem;
    animation: cp-pop 0.14s ease;
}
@keyframes cp-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.cp-search { position: relative; margin-bottom: 0.5rem; }
.cp-search-icon {
    position: absolute;
    left: 0.75rem; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: inline-flex;
    pointer-events: none;
}
.cp-search-input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6rem 0.8rem 0.6rem 2.3rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    min-height: 44px;
}
.cp-search-input:focus { border-color: var(--rose-deep); outline: none; }

.cp-list {
    list-style: none;
    margin: 0; padding: 0;
    max-height: 288px;
    overflow-y: auto;
}
.cp-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.12s ease;
}
.cp-option:hover,
.cp-option.is-active { background: var(--blush); }
.cp-option.is-selected { background: var(--blush-deep); }
.cp-option-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cp-option-name {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--plum);
    line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-option-email {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rose-deep);
    background: rgba(169, 78, 94, 0.10);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}
.cp-empty {
    list-style: none;
    padding: 1rem 0.6rem;
    color: var(--muted);
    text-align: center;
    font-size: 0.95rem;
}

/* --- AI buttons --------------------------------------------------------- */
.input-with-ai {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
}
.input-with-ai input {
    flex: 1;
    min-width: 0;
}
.input-with-ai .ai-btn {
    flex-shrink: 0;
    align-self: stretch;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}
.label-row label { margin-bottom: 0; }

.ai-cta-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--btn-fg);
    background: linear-gradient(135deg, var(--btn-bg), #c9b8f0);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
}
.ai-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.ai-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(123, 111, 176, 0.30); }
.ai-btn:disabled { cursor: default; opacity: 0.75; transform: none; }

.ai-btn-ghost {
    color: var(--rose-deep);
    background: transparent;
    border-color: var(--rose);
    box-shadow: none;
}
.ai-btn-ghost:hover { background: rgba(169, 78, 94, 0.08); box-shadow: none; }

.ai-note {
    font-size: 0.88rem;
    margin: 0.5rem 0 0;
    font-weight: 600;
}
.ai-note-ok    { color: var(--success-fg); }
.ai-note-error { color: var(--error-fg); }
.ai-note-busy  { color: var(--muted); }

@keyframes ai-glow {
    0%   { box-shadow: 0 0 0 0 rgba(123, 111, 176, 0.0); }
    30%  { box-shadow: 0 0 0 4px rgba(123, 111, 176, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(123, 111, 176, 0.0); }
}
.ai-filled { animation: ai-glow 0.9s ease; border-color: #7b6fb0 !important; }

@media (max-width: 560px) {
    .input-with-ai { flex-direction: column; align-items: stretch; }
    .input-with-ai .ai-btn { align-self: flex-start; }
}

/* --- File dropzone ------------------------------------------------------ */
.dropzone {
    position: relative;
    border: 2px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone.is-enhanced { cursor: pointer; }
.dropzone.is-enhanced:hover { border-color: var(--rose); }
.dropzone.is-dragging {
    border-color: var(--rose-deep);
    background: var(--blush);
}
.dropzone.has-file { border-style: solid; cursor: default; }

.dropzone-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.2rem 1.25rem;
    pointer-events: none;
}
.dz-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--rose-deep);
    margin-bottom: 0.85rem;
    transition: transform 0.15s ease;
}
.dropzone.is-dragging .dz-icon { transform: scale(1.08); }
.dz-title {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--plum);
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
}
.dz-sub { color: var(--muted); margin: 0 0 0.5rem; }
.dz-link { color: var(--rose-deep); font-weight: 700; text-decoration: underline; }
.dropzone-face .hint { margin-top: 0.25rem; }

.dropzone-file {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
}
.dz-file-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--blush);
    color: var(--rose-deep);
}
.dz-file-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dz-file-name {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--plum);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dz-file-size { font-size: 0.85rem; color: var(--muted); }
.dz-remove {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.dz-remove:hover { background: var(--error-bg); color: var(--error-fg); }
.dz-remove:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(169, 78, 94, 0.25); }

/* --------------------------------------------------------------------------
   Membership paywall (dashboard "Become a member today" gate)
   -------------------------------------------------------------------------- */
.btn-lg {
    min-height: 56px;
    padding: 0.95rem 2.4rem;
    font-size: 1.15rem;
}

.paywall {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
}
.paywall .eyebrow { justify-content: center; }
.paywall-title { margin: 0.5rem 0 0.75rem; }
.paywall-lead {
    color: var(--muted);
    max-width: 46ch;
    margin: 0 auto 1.5rem;
}
.paywall-price {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 2rem;
    color: var(--plum);
    margin-bottom: 1.5rem;
}
.paywall-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.75rem;
    max-width: 34ch;
    text-align: left;
    display: grid;
    gap: 0.65rem;
}
.paywall-list li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--text);
}
.paywall-list li::before {
    content: "\2713"; /* check mark */
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: #fff;
    background: var(--rose-deep);
    border-radius: 50%;
}
.paywall-cta { margin: 0; }
.paywall-cta .btn { width: 100%; justify-content: center; }
.paywall-note {
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ==========================================================================
   My Lessons — practice menu list
   ========================================================================== */
.practice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 480px;
}

.practice-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    text-decoration: none;
    color: var(--text);
    border-radius: 10px;
    transition: background 0.15s ease;
}
.practice-row:hover,
.practice-row:focus-visible { background: var(--blush); }

/* Numbered badge marking each lesson in creation order (oldest = 1).
   Sits where the slim accent tick used to be; fills in on hover/focus. */
.practice-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blush);
    border: 1.5px solid var(--rose);
    color: var(--rose-deep);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.practice-row:hover .practice-num,
.practice-row:focus-visible .practice-num {
    background: var(--rose-deep);
    border-color: var(--rose-deep);
    color: #fff;
    transform: scale(1.05);
}

.practice-main {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 0;
}
.practice-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    color: var(--plum);
}
.practice-desc {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.practice-count {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rose-deep);
}
.practice-arrow {
    flex: 0 0 auto;
    display: inline-flex;
    color: var(--muted);
    transition: transform 0.15s ease, color 0.15s ease;
}
.practice-row:hover .practice-arrow,
.practice-row:focus-visible .practice-arrow {
    transform: translateX(3px);
    color: var(--rose-deep);
}

@media (prefers-reduced-motion: reduce) {
    .practice-row,
    .practice-num,
    .practice-arrow { transition: none; }
}

/* ==========================================================================
   Lesson player — filmstrip stage + transport controls
   ========================================================================== */
.lesson-hero {
    background: var(--blush);
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--line);
}
.lesson-back {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--rose-deep);
    font-weight: 700;
    text-decoration: none;
}
.lesson-back:hover { text-decoration: underline; }
.lesson-hero h1 { margin: 0.2rem 0; }
.lesson-hero p { color: var(--muted); margin: 0; max-width: 60ch; }

/* Break the player out of the 1120px container so the video can span almost the
   full viewport width. We subtract 3rem (1.5rem each side) rather than using a
   raw 100vw so the gutter always clears the scrollbar and never triggers a
   horizontal scroll. The thumbnail rail keeps its fixed width, so all the extra
   space goes to the video's main column. */
.lesson-player {
    --lp-strip-w: 220px;
    position: relative;
    width: calc(100vw - 3rem);
    margin-left: calc(50% - 50vw + 1.5rem);
    margin-right: calc(50% - 50vw + 1.5rem);
}

.lp-progress {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin-bottom: 1rem;
}
.lp-progress-label {
    font-weight: 700;
    color: var(--rose-deep);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}
.lp-progress-title { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--plum); }

/* Two-column layout: video + controls on the left, thumbnail rail on the right. */
.lp-layout {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
}
.lp-main-col {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Centre stage: one large video. Fills the main column, so it grows with the
   viewport instead of being capped. */
.lp-stage {
    position: relative;
    width: 100%;
    /* Cap the width so the 16:9 height never outgrows the viewport. When height
       is the limiting factor the stage centres itself in the main column. */
    max-width: calc((100vh - 13rem) * 16 / 9);
    margin-inline: auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}
.lp-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
    cursor: pointer;
}
/* Big tap-to-play overlay (visible only while paused). */
.lp-stage-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.lp-stage-play svg { margin-left: 4px; } /* optically centre the triangle */
.lp-stage-play:hover { background: rgba(0, 0, 0, 0.6); }
.lp-stage-play:active { transform: scale(0.94); }
.lp-stage-play[hidden] { display: none; }

/* Thumbnail rail: a vertical, scrollable column beside the video. It stretches
   to the height of the main column (video + controls) and scrolls internally. */
.lp-filmstrip {
    flex: 0 0 var(--lp-strip-w);
    width: var(--lp-strip-w);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.lp-filmstrip::-webkit-scrollbar { width: 6px; }
.lp-filmstrip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.lp-thumb {
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    opacity: 0.5; /* dim every clip that isn't active */
    transition: opacity 0.25s ease, transform 0.15s ease;
}
.lp-thumb:hover { opacity: 0.85; }
.lp-thumb.is-active { opacity: 1; }

.lp-thumb-media {
    position: relative;
    display: block;
    border-radius: var(--radius-sm, 10px);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lp-thumb.is-active .lp-thumb-media {
    border-color: var(--rose-deep);
    box-shadow: var(--shadow-sm);
}
.lp-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.lp-thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Green check, centred, shown only once a clip is completed. */
.lp-thumb-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.lp-thumb.is-done .lp-thumb-check { opacity: 1; }

.lp-thumb-name {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--plum);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Transport controls, sitting directly under the video in the main column. */
.lp-controls {
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: calc((100vh - 13rem) * 16 / 9);
    margin-left: auto;
    margin-right: auto;
}
.lp-seek {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.lp-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; min-width: 3.2ch; text-align: center; }
.lp-seek-bar { flex: 1 1 auto; accent-color: var(--rose-deep); height: 6px; cursor: pointer; }

.lp-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.lp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--plum);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.lp-btn:hover { background: var(--blush); border-color: var(--rose); }
.lp-btn:active { transform: scale(0.94); }
.lp-btn-play {
    width: 64px;
    height: 64px;
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-fg);
}
.lp-btn-play:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-bg); }

/* Play/pause: exactly one icon is ever visible. */
.lp-btn-play .lp-icon-pause { display: none; }
.lp-btn-play.is-playing .lp-icon-play { display: none; }
.lp-btn-play.is-playing .lp-icon-pause { display: inline; }

/* Tablet / phone: stack the rail below and lay it out horizontally again. */
@media (max-width: 820px) {
    .lp-layout { flex-direction: column; }
    .lp-filmstrip {
        flex: 0 0 auto;
        width: 100%;
        flex-direction: row;
        gap: 0.75rem;
        margin-top: 1.25rem;
        padding: 0.25rem 0.25rem 0.75rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
    }
    .lp-filmstrip::-webkit-scrollbar { height: 6px; width: auto; }
    .lp-thumb { width: 140px; scroll-snap-align: center; }
}

@media (max-width: 640px) {
    .lp-btn { width: 44px; height: 44px; }
    .lp-btn-play { width: 56px; height: 56px; }
    .lp-stage-play { width: 68px; height: 68px; }
    .lp-thumb { width: 120px; }
}

/* Respect reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .lp-thumb, .lp-thumb-check, .lp-thumb-media { transition: none; }
}

/* ==========================================================================
   Admin — lesson builder / composer
   ========================================================================== */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--rose-deep); }

.lesson-builder-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}
/* Cancel sits directly next to Save lesson inside the drawer footer.
   Both use .btn so they share the same height. */

/* --- Lessons toolbar: client filter (left) + New lesson (right) ---------- */
.lesson-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.lesson-filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 640px;
    max-width: 100%;
}
.lesson-filter-icon {
    position: absolute;
    left: 0.85rem;
    display: inline-flex;
    color: var(--rose-deep);
    pointer-events: none;
}
.lesson-filter .select-input {
    padding-left: 2.5rem;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
/* Keep the native clear (x) on the search field from crowding the text. */
.lesson-filter input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-left: 0.5rem;
    cursor: pointer;
    background: var(--rose-deep);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" stroke="black" stroke-width="2.5" stroke-linecap="round"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" stroke="black" stroke-width="2.5" stroke-linecap="round"/></svg>') center / contain no-repeat;
}
.lesson-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.lesson-new-btn svg { flex: 0 0 auto; }
@media (max-width: 560px) {
    .lesson-filter { min-width: 0; flex: 1 1 auto; }
    .lesson-new-btn { flex: 0 0 auto; }
}

/* --- Slide-in drawer that houses the lesson builder ---------------------- */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;   /* above the sticky header (z-index: 100) */
}
.drawer[hidden] { display: none; }
.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(74, 52, 59, 0.45);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: clamp(320px, 70vw, 820px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: -12px 0 40px rgba(74, 52, 59, 0.22);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
    /* Reset the .lesson-builder / .form-card padding; the drawer owns spacing. */
    padding: 0;
    border-radius: 0;
}
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}
.drawer-head h2 { margin: 0; font-size: 1.5rem; }
.drawer-close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--blush);
    color: var(--plum);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.drawer-close:hover,
.drawer-close:focus-visible { background: var(--blush-deep); color: var(--rose-dark); }
.drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(1.25rem, 3vw, 2rem);
}
/* Lock background scroll while the drawer is open. */
body.drawer-open { overflow: hidden; }
@media (max-width: 640px) {
    .drawer-panel { width: 100%; border-left: none; }
}
@media (prefers-reduced-motion: reduce) {
    .drawer-backdrop,
    .drawer-panel { transition: none; }
}

.lesson-composer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 720px) {
    .lesson-composer { grid-template-columns: 1fr; }
}
.composer-title { margin: 0 0 0.6rem; font-family: var(--font-head); color: var(--plum); }
.composer-count { color: var(--muted); font-weight: 600; }

.composer-library,
.composer-sequence {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    min-height: 120px;
    max-height: 360px;
    overflow-y: auto;
}
.composer-clip,
.composer-seq-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 0.4rem;
}
.composer-clip:last-child,
.composer-seq-item:last-child { margin-bottom: 0; }
.composer-clip-name,
.seq-name { flex: 1 1 auto; font-weight: 600; color: var(--text); }

.composer-empty {
    color: var(--muted);
    padding: 1rem 0.6rem;
    text-align: center;
    font-size: 0.95rem;
}

.composer-seq-item { cursor: grab; }
.composer-seq-item.is-dragging { opacity: 0.5; }
.seq-handle { color: var(--rose); cursor: grab; user-select: none; }
.seq-num {
    flex: 0 0 auto;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--rose-deep);
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.seq-controls { display: inline-flex; gap: 0.25rem; }
.seq-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--plum);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.seq-btn:hover:not(:disabled) { background: var(--blush); border-color: var(--rose); }
.seq-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.seq-remove { color: var(--error-fg); }

/* ==========================================================================
   Admin — upload progress bar
   ========================================================================== */
.upload-progress {
    margin-top: 1rem;
}
.upload-progress-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--blush);
    overflow: hidden;
    border: 1px solid var(--line);
}
.upload-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose), var(--rose-deep));
    transition: width 0.25s ease;
}
.upload-progress-text {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rose-deep);
}

/* While the server saves the uploaded file, animate the bar so it reads as busy
   rather than stalled at 100%. */
.upload-progress.is-processing .upload-progress-fill {
    background: linear-gradient(
        90deg,
        var(--rose) 25%,
        var(--rose-deep) 50%,
        var(--rose) 75%
    );
    background-size: 200% 100%;
    animation: upload-stripes 1.1s linear infinite;
}
@keyframes upload-stripes {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.upload-progress.is-done .upload-progress-fill {
    background: var(--success-fg, #2e7d32);
    animation: none;
}
.upload-progress.is-done .upload-progress-text { color: var(--success-fg, #2e7d32); }

.upload-progress.has-error .upload-progress-fill {
    background: var(--error-fg, #c62828);
    animation: none;
}
.upload-progress.has-error .upload-progress-text { color: var(--error-fg, #c62828); }

/* Dim the submit button while an upload is in flight. */
.upload-form.is-uploading button[type="submit"] {
    opacity: 0.6;
    cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
    .upload-progress .upload-progress-fill { transition: none; }
    .upload-progress.is-processing .upload-progress-fill { animation: none; }
}
