/* === Font === */
/* Design-system typography: Source Serif 4 (display/headings) + Plus Jakarta Sans (body/labels). */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500;1,8..60,600&display=swap');

/* === Root Theme Variables === */
:root {
    --primary: #1b4da3;
    --primary-light: #1982E6;
    --secondary: #092c4c;
    --accent: #02a3ff;
    --text-dark: #1e1e1e;
    --text-light: #ffffff;
    --text-muted: #999999;
    --text-subtle: #666666;
    --bg-light: #ffffff;
    --bg-dark: #101010;
    --shadow-weak: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.1);
    --font-base: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    /* Miri accent — aligned to the app's blue brand */
    --miri-blue: #1982E6;
    --miri-blue-strong: #1b4da3;
    --miri-accent: #02a3ff;
    /* legacy aliases (kept so existing rules keep working), now blue */
    --miri-teal: #1982E6;
    --miri-teal-strong: #1b4da3;
    --miri-nav-inactive: #9aa3ab;
    --miri-glow: rgba(2, 163, 255, 0.28);
    --miri-tint: rgba(25, 130, 230, 0.08);
    /* Primary blue→teal gradient (Miri CTA, active focus pill, avatar) */
    --miri-grad-start: #2f7cf0;
    --miri-grad-end: #29cdbf;
}

/* === Base === */
body {
    margin: 0 !important;
    font-family: var(--font-base) !important;
    background-color: var(--bg-light) !important;
    color: var(--text-dark) !important;
    line-height: 1.5 !important;
}

img {
    max-width: 100% !important;
    height: auto !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

/* Serif for display / headings / card titles / the daily mantra (design system). */
.section-heading h5,
.card-title,
.session-card-title,
.journey-card-title,
.quick-session-card-title,
.settings-page-title,
.miri-checkin-title,
.quote-section blockquote {
    font-family: var(--font-heading) !important;
}

.quote-section blockquote {
    font-style: italic !important;
}

/* Small uppercase "overline" labels stay in the body/sans face even when marked up as headings. */
.settings-section-title,
.miri-eyebrow,
.miri-recs-label,
.stat-box .sub-label {
    font-family: var(--font-base) !important;
}

p {
    margin: 0 !important;
    font-weight: 400 !important;
}

.container-main {
    padding: 0 !important;
    margin-top: 0 !important;
}

/* === Header === */
.app-header {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 10 !important;
    overflow: hidden !important;
    padding-bottom: 1.5rem !important;
}

.app-header .container-fluid {
    background: transparent !important;
    margin-top: 70px;
}

.app-header img {
    height: 40px !important;
}

.app-header .header-logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.app-header .header-logo-link.d-none.d-md-block {
    display: none !important;
}

.app-header .header-logo-link.d-md-none,
.resume-overlay.active,
.info-overlay.active {
    display: flex !important;
}

.app-header::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 120px !important;
    background: linear-gradient(to top, var(--bg-light), rgba(255, 255, 255, 0)) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* === Background Image === */
.background-image {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background-image:
        linear-gradient(180deg, rgba(25, 130, 230, 0.45) 0%, rgba(7, 39, 68, 0.45) 100%),
        url('/app/ui/assets/img/header.png');
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* === Welcome Banner === */
.welcome-banner {
    position: relative !important;
    padding-top: 4.6rem !important;
    color: var(--text-light) !important;
    overflow: hidden !important;
    text-align: center !important;
}

.welcome-text {
    position: relative !important;
    z-index: 3 !important;
    padding: 1rem 1.5rem 0 !important;
    margin: 0 auto !important;
}

.welcome-text p:first-child {
    font-size: 16px !important;
    font-weight: 300 !important;
    margin-bottom: 0.25rem !important;
    opacity: 0.9 !important;
}

.welcome-text h1 {
    /* The name sits directly under "Welcome back", so it reads as one greeting
       in one typeface — sans, not the serif the other display headings use. */
    font-family: var(--font-base) !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

.welcome-text p:nth-of-type(2) {
    font-size: 16px !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.welcome-text p:last-of-type {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 1.5rem 0 1rem !important;
}

/* === Day Bubbles === */
.day-bubbles {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 1.5rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 0 1rem !important;
    position: relative !important;
    z-index: 3 !important;
}

.day-circle {
    width: 42px !important;
    height: 58px !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.62) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 9px !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    margin: 0 4px !important;
    transition: all 0.25s ease !important;
}

.day-circle .day-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.day-circle.active {
    background: rgba(24, 130, 230, 0.12) !important;
    border-color: var(--primary-light) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px var(--primary-light) inset, 0 6px 18px rgba(24, 130, 230, 0.22) !important;
}

.day-circle.active .day-dot {
    width: 8px !important;
    height: 8px !important;
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

/* === Stats Summary === */
.stats-summary {
    position: relative !important;
    z-index: 4 !important;
    background: white !important;
    border-radius: 1.5rem !important;
    padding: 1rem 1.5rem !important;
    margin: 0 1rem !important;
    box-shadow: 0 4px 12px var(--shadow-strong) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
}

.stat-box {
    flex: 1 !important;
}

.stat-box i {
    color: var(--primary-light) !important;
    font-size: 24px !important;
    margin-bottom: 0.5rem !important;
}

.stat-box .label {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    color: var(--text-dark) !important;
    line-height: 1.2 !important;
}

.stat-box .sub-label {
    font-size: 12px !important;
    font-weight: 300 !important;
    color: var(--text-muted) !important;
    line-height: 1.2 !important;
}

/* === Section Heading === */
.section-heading {
    padding: 0 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

.section-heading:first-child {
    margin-top: 0 !important;
}

.section-heading h5 {
    font-weight: 600 !important;
    font-size: 20px !important;
    margin-bottom: 0 !important;
    color: var(--text-dark) !important;
    font-family: var(--font-heading) !important;
}

.section-heading .view-all {
    color: var(--primary-light) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    font-family: var(--font-base) !important;
}

/* === Program Cards === */
.program-card {
    position: relative !important;
    margin-bottom: 1.25rem !important;
    border-radius: 16px;
    overflow: hidden;
}

.program-card img {
    border-radius: 16px !important;
    width: 100% !important;
    height: auto !important;
    display: block;
}

.program-card .overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 1.25rem !important;
    background: linear-gradient(to top, rgba(7, 39, 68, 0.7) 0%, rgba(7, 39, 68, 0) 100%) !important;
    color: white !important;
    border-radius: 16px !important;
}

.card-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.3 !important;
}

.card-subtitle {
    font-size: 14px !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.3 !important;
}

/* === Recommended Cards Wrapper === */
.recommended-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem;
}

.recommended-cards-wrapper .recommended-card:nth-child(2) {
    display: none;
}

/* === Recommended Card === */
.recommended-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-bar-label {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    font-weight: 300;
    font-size: 11px;
    color: var(--text-muted);
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    text-align: left;
}

.progress-bar-container {
    background: #f5f5f5;
    height: 4px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    background: var(--primary-light) !important;
    height: 100%;
    transition: width 0.3s ease;
}

.card-image-wrapper {
    position: relative;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    overflow: hidden;
}

/* Glass chip for the Quit-Drinking program featured card */
.rc-program-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: rgba(18, 28, 54, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* ============================================================================
   Program "ritual" cards on the home (Quit-Drinking focus)
   Matches Figma: image w/ badges → title/subtitle → progress → full-width CTA
   ========================================================================== */
.mr-ritual-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    margin: 0 0 4px;
    /* Always span the full content column (overrides the 2-col grid the
       recommended wrapper uses on tablet/desktop). */
    grid-column: 1 / -1;
}

/* Desktop: horizontal banner so the full-width card stays balanced. */
@media (min-width: 768px) {
    .mr-ritual-card {
        display: flex;
        align-items: stretch;
    }

    .mr-ritual-media {
        width: 46%;
        max-width: 520px;
        height: auto;
        min-height: 260px;
        flex-shrink: 0;
    }

    .mr-ritual-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 28px 34px;
    }

    .mr-ritual-title {
        font-size: 26px !important;
    }

    .mr-ritual-sub {
        font-size: 15px;
        max-width: 46ch;
    }

    .mr-ritual-cta {
        align-self: flex-start;
        min-width: 220px;
        width: auto;
    }
}

.mr-ritual-media {
    position: relative;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #dfe6f2;
}

.mr-ritual-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
}

.mr-ritual-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(9, 20, 48, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    padding: 5px 11px;
    border-radius: 999px;
}

.mr-ritual-badge--day {
    background: rgba(9, 20, 48, 0.72);
    letter-spacing: 0.02em;
}

.mr-ritual-body {
    padding: 16px 18px 18px;
}

.mr-ritual-title {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 21px !important;
    line-height: 1.2 !important;
    color: var(--text-dark) !important;
    margin: 0 0 6px !important;
}

.mr-ritual-sub {
    font-size: 14px;
    color: var(--text-subtle);
    margin: 0 0 14px;
    line-height: 1.45;
}

.mr-ritual-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mr-ritual-progress {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(27, 77, 163, 0.12);
    overflow: hidden;
}

.mr-ritual-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
    transition: width 0.5s ease;
}

.mr-ritual-progress-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.mr-ritual-cta {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mr-ritual-cta:hover {
    color: #fff;
    text-decoration: none;
}

.mr-ritual-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 139, 255, 0.28);
}

.mr-ritual-cta--locked,
.mr-ritual-cta--soon {
    background: rgba(9, 20, 48, 0.10);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Locked is tappable — it explains why the session is locked. */
.mr-ritual-cta--locked {
    cursor: pointer;
}

.mr-ritual-cta--locked:hover,
.mr-ritual-cta--soon:hover {
    transform: none;
    box-shadow: none;
}

/* Dark theme */
html[data-theme="dark"] .mr-ritual-card {
    background: var(--surface, #12224A);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mr-ritual-title {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .mr-ritual-progress {
    background: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .mr-ritual-cta--locked,
html[data-theme="dark"] .mr-ritual-cta--soon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.card-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.45) 100%);
    z-index: 1;
    pointer-events: none;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

.card-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    color: white;
}

.program-card .btn,
.recommended-card .btn {
    font-size: 14px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    background-color: var(--primary-light) !important;
    color: white !important;
    border: none !important;
    white-space: nowrap;
    border-radius: 20px !important;
    transition: opacity 0.3s ease;
}

.program-card .btn:hover,
.recommended-card .btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.subscription-claim-button:hover {
    opacity: 0.9;
}

/* === Carousel Wrapper === */
.carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0 1rem;
}

/* === Scrollable Card Carousel === */
.scroll-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-carousel::-webkit-scrollbar {
    display: none;
}

/* === Carousel Navigation Arrows === */
.carousel-arrow {
    display: none !important;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #072744;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow-left {
    left: -60px;

}

.carousel-arrow-right {
    right: -60px;

}

.session-card {
    flex: 0 0 68%;
    max-width: 68%;
    scroll-snap-align: start;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.session-card:active {
    transform: scale(0.98);
}

.session-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.session-card .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.45) 100%);
    color: white;
    z-index: 2;
    border-radius: 1rem;
}

.session-card .card-title {
    max-width: 200px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    margin: 0;
    line-height: 1.4;
    color: white !important;
}

/* === Footer with Quote Section === */
.app-footer {
    position: relative;
    color: var(--text-light);
    text-align: center;
    padding: 5rem 1rem 1rem;
    font-family: var(--font-base);
    overflow: hidden;
}

.app-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    width: 100%;
    background: linear-gradient(to bottom, var(--bg-light), rgba(255, 255, 255, 0));
    z-index: 2;
    pointer-events: none;
}

.app-footer .background-image {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background-image:
        linear-gradient(180deg, rgba(25, 130, 230, 0.45) 0%, rgba(7, 39, 68, 0.45) 100%),
        url('/app/ui/assets/img/footer.png');
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
}

.footer-content {
    position: relative;
    z-index: 1;
    color: white;
}

.quote-section .quote-label {
    font-size: 16px !important;
    font-weight: 300 !important;
    margin-bottom: 1rem !important;
    opacity: 0.9 !important;
}

.quote-section blockquote {
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    max-width: 700px !important;
    margin: 0 auto 2rem !important;
    padding: 0 !important;
    quotes: "“" "”" !important;
}

.quote-section blockquote::before,
.quote-section blockquote::after {
    content: none;
}

.quote-section .quote-attribution {
    font-size: 18px !important;
    font-weight: 300 !important;
    text-align: center !important;
    margin-top: -1.5rem !important;
    margin-bottom: 2rem !important;
    opacity: 0.9 !important;
}

.quote-section blockquote.mantra-single-line {
    font-weight: 700 !important;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 12px !important;
    font-weight: 300 !important;
    color: var(--text-light) !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-light) !important;
}

.footer-separator {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 0.25rem;
}

.app-footer .support {
    font-size: 12px !important;
    font-weight: 200 !important;
    color: var(--text-light) !important;
    margin-top: 2rem;
}

.app-footer .support a {
    color: var(--primary-light) !important;
    text-decoration: none !important;
}

/* === Drawer === */
.drawer-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background: #072744;
    color: white;
    z-index: 1050;
    transition: right 0.3s ease;
    padding: 2rem 1rem;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
}

.drawer-menu.open {
    right: 0;
}

.drawer-content,
.journey-card-bottom-row,
.resume-modal .resume-buttons,
.all-plans-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    display: none;
}

.drawer-overlay.show,
.tab-content.active {
    display: block;
}

/* === Responsive - Tablet ONLY (768px - 1199px) - Portrait and Landscape === */

/* === Responsive - Desktop (1200px+) === */

/* === About Page === */
.about-page {
    padding: 2rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.page-header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.about-section p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-subtle);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 2rem;
    border-radius: 15px;
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: opacity 0.3s ease;
}

.btn-primary,
.resume-modal .btn-continue {
    background: var(--primary-light);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-dark);
}


/* === FAQ Page === */
.faq-detail-page,
.journeys-detail-page,
.session-detail-page,
.quick-sessions-detail-page {
    padding: 0;
}

.faq-header,
.journeys-header,
.session-header,
.quick-sessions-header {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.faq-image-wrapper,
.journeys-image-wrapper,
.quick-sessions-image-wrapper,
.subscription-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.faq-image,
.journeys-image,
.quick-sessions-image,
.subscription-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    min-width: 100%;
    min-height: 100%;
}

.faq-image-mobile {
    display: block !important;
}

.faq-image-desktop {
    display: none !important;
}

.faq-gradient-overlay,
.journeys-gradient-overlay,
.session-gradient-overlay,
.quick-sessions-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, #072744 100%);
    z-index: 1;
}

.faq-info,
.session-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 0;
    color: white;
    width: 100%;
    text-align: center;
}

.faq-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

.faq-section,
.about-section {
    padding: 1.5rem 1.5rem 2rem;
    background: #FFFFFF;
}

.faq-item {
    margin-bottom: 2rem;
}

.faq-item:last-child,
.journeys-about-section p:last-child,
.info-modal #infoContent p:last-child,
.app-footer .quote-section,
.quick-sessions-about-section p:last-child {
    margin-bottom: 0;
}

.faq-item-question-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.faq-item-number {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    color: #072744;
    margin: 0 0.5rem 0 0;
    text-align: left;
    flex-shrink: 0;
}

.faq-item-question {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    color: #072744;
    margin: 0;
    text-align: left;
    flex: 1;
}

.faq-item-answer {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(7, 39, 68, 0.9);
    margin: 0 0 0 0;
    text-align: left;
}

/* === Back Button (Shared by FAQ, Explore Journeys, Player, Continue Progress) === */

/* === Explore Journeys Page === */



.journeys-image-mobile {
    display: block !important;
}

.journeys-image-desktop {
    display: none !important;
}


.journeys-info {
    position: absolute;
    bottom: 3.5rem;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0 1.5rem;
    color: white;
    width: 100%;
    text-align: left;
}

.journeys-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 30px;
    text-align: left;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

.journeys-subtitle {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: #FFFFFF;
    margin: 0;
    margin-top: 0.5rem;
    width: 100%;
}

.journeys-nav-links {
    display: flex;
    justify-content: flex-start;
    gap: 68.5px;
    padding: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1rem;
    background: #072744;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.journeys-nav-link {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 18px;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: transparent;
    border: none;
}

.journeys-nav-link:hover,
.resume-modal button:hover,
.session-nav-link:hover,
.quick-sessions-nav-link:hover {
    opacity: 0.8;
}

.journeys-nav-link.active,
.session-nav-link.active,
.quick-sessions-nav-link.active {
    text-decoration-line: underline;
}

.journeys-cards-section,
.session-cards-section,
.quick-sessions-cards-section {
    padding: 0;
    background: #FFFFFF;
    position: relative;
    margin-top: 1.5rem;
}

.journeys-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1.5rem 2rem;
}

.journey-card,
.quick-session-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.journey-card:hover,
.quick-session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.journey-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.journey-card-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.journey-card-image-mobile {
    display: block !important;
}

.journey-card-image-desktop {
    display: none !important;
}

.journey-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.45) 100%);
    z-index: 1;
    pointer-events: none;
}

.journey-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-card-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    color: #FFFFFF;
}


.journey-card-subtitle {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.journey-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 20px;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.journey-card-button:hover {
    opacity: 0.9;
    color: white;
}

.journeys-about-section {
    display: block;
    padding: 1.5rem 1.5rem 2rem;
    background: #FFFFFF;
}

.journeys-about-section h3,
.quick-sessions-about-section h3 {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    color: #1A202C;
    margin: 0 0 1rem 0;
    text-align: left;
}

.journeys-about-section p {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.6;
    color: #4A5568;
    margin: 0 0 1rem 0;
    text-align: left;
}


.tab-content {
    display: none;
}

/* === Player Page === */

body.player-page-body {
    margin: 0 !important;
    font-family: var(--font-base) !important;
    background-color: #000 !important;
    color: white !important;
    overflow: hidden !important;
    line-height: 1.5 !important;
}

.player-container {
    position: relative;
    height: 100vh;
    height: 100svh; /* visible viewport on tablet/browser so buttons stay on screen */
    background-color: #1a1a1a;
    background-image: url('/app/ui/assets/img/card-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.5rem 3rem;
    box-sizing: border-box;
    content-visibility: auto;
}

/* Compact layout when visible viewport height is limited (tablet browser) */
.player-container.player-container--compact {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
}

.player-container.player-container--compact .player-content h4 {
    margin-bottom: 0.25rem;
}

.player-container.player-container--compact .player-content p {
    margin-bottom: 0.75rem;
}

.player-container.player-container--compact .play-button {
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.player-container.player-container--compact .player-actions {
    margin-top: 0.75rem;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #072744 50%, rgba(7, 39, 68, 0) 100%);
    z-index: 0;
}

.player-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.player-content h4 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.player-content p {
    font-size: 16px;
    font-weight: 300;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.play-button {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem auto 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    transform: scale(1.05);
}

.play-button.audio-ready {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
    animation: pulse-ready 2s ease-in-out infinite;
}

@keyframes pulse-ready {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

.play-button i {
    color: #072744;
    font-size: 2.5rem;
    margin-left: 4px;
}

.player-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.player-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-actions button:hover {
    opacity: 0.7;
}

/* The rule above sets `display`, which beats the browser's own [hidden], so
   hiding a transport control needs saying explicitly. */
.player-actions button[hidden] {
    display: none;
}

/* Without the Download button, the clock would sit after the first control
   and leave one on its left and three on its right. Reordered so it reads as
   two, the time, two. Stated for every child rather than just the clock,
   because `order` only sorts what it is told about. */
.player-actions--no-download #favoriteButton {
    order: 1;
}

.player-actions--no-download #repeatButton {
    order: 2;
}

.player-actions--no-download #currentTime {
    order: 3;
}

.player-actions--no-download #voiceButton {
    order: 4;
}

.player-actions--no-download #infoButton {
    order: 5;
}

.player-actions button.active {
    background: #50ADE5 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.action-icon img {
    height: 24px;
    width: auto;
}

.action-icon i {
    font-size: 24px;
    color: white;
}

.player-actions button.active i {
    color: white !important;
}

.time-display {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    min-width: 60px;
}

audio {
    display: none;
}

.basic_player {
    display: none;
}

.resume-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}


.resume-modal {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
}

.resume-modal h3,
.info-modal h3 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
}

.resume-modal p {
    font-size: 16px;
    font-weight: 300;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}


.resume-modal button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}


.resume-modal .btn-restart {
    background: #f0f0f0;
    color: #000;
}

.info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.info-overlay.active {
    display: flex;
}

.info-modal {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.info-modal p {
    font-size: 16px;
    font-weight: 300;
    color: #000;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-modal #infoContent p {
    font-size: 16px;
    font-weight: 300;
    color: #000;
    line-height: 1.6;
    margin-bottom: 1rem;
}


.info-modal .back-button {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    padding: 1rem;
    background: white;
    border: 1px solid #000;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 200;
    color: #000;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.info-modal .back-button:hover {
    background: #000;
    color: white;
}

.close-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-info:hover {
    background: #f0f0f0;
}

/* === Session Page === */

.session-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.session-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    object-position: center;
}

.session-image-mobile {
    display: block !important;
}

.session-image-desktop {
    display: none !important;
}


.session-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 0;
    color: white;
    width: 100%;
    text-align: center;
}

.session-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

.session-subtitle {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

.session-nav-links {
    display: flex;
    justify-content: flex-start;
    gap: 68.5px;
    padding: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1rem;
    background: #072744;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.session-nav-link {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 18px;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: transparent;
    border: none;
}



.session-meta {
    display: none;
}

.session-duration,
.session-type {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
}

.session-duration i {
    margin-right: 0.5rem;
}


.session-cards-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

.session-cards-scroll-carousel {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    gap: 9px !important;
    padding: 0 0 1rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.session-cards-scroll-carousel::-webkit-scrollbar {
    display: none !important;
}

.session-cards-scroll-carousel .session-card-wrapper {
    flex: 0 0 127px !important;
    min-width: 127px !important;
    max-width: 127px !important;
    width: 127px !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    display: flex !important;
}

.session-cards-section h3 {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 400 !important;
    font-size: 16px;
    line-height: 20px;
    color: #072744;
    margin: 0;
    padding: 0;
    padding-top: 1.5rem;
    padding-left: 1.5rem;
    padding-bottom: 0.75rem;
    text-align: left;
}

.session-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.session-card-item {
    position: relative;
    width: 127px;
    height: 129px;
    border-radius: 15px;
    overflow: hidden;
    background: #1982E6;
    flex-shrink: 0;
    cursor: pointer;
}

.session-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 15px;
}

.session-card-image-mobile {
    display: block !important;
}

.session-card-image-desktop {
    display: none !important;
}

.session-card-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.1) 75%, rgba(7, 39, 68, 0.5) 92%, #072744 100%);
    border-radius: 15px;
    z-index: 1;
}

.session-card-play {
    position: absolute;
    width: 26px;
    height: 26px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.session-card-play svg {
    width: 100%;
    height: 100%;
}

.session-card-duration {
    position: absolute;
    width: 39px;
    height: 15px;
    background: #1982E6;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 400;
    font-size: 8px;
    line-height: 10px;
    color: #FFFFFF;
    z-index: 2;
    bottom: 6px;
    right: 6px;
}

.session-card-progress {
    position: absolute;
    min-width: 20px;
    height: 15px;
    padding: 0 4px;
    background: #C7C7C7;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 400;
    font-size: 6px;
    line-height: 8px;
    color: #FFFFFF;
    z-index: 2;
    top: 5px;
    left: 5px;
    white-space: nowrap;
}

/* Favourites are the one place sessions from different programs sit side by
   side, and their titles repeat -- day one is "Arrival" in several programs.
   The program sits above the title as an overline, where it lines up across a
   row no matter how many lines each title takes. */
.favourite-card-program {
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 9px;
    line-height: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(7, 39, 68, 0.55);
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

/* The overline takes over the gap under the artwork, so the title tucks up
   under it rather than keeping the spacing it uses when it comes first. */
.favourite-card-program + .session-card-title {
    margin-top: 2px;
}

.session-card-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300;
    font-size: 12px;
    line-height: 15px;
    color: #072744;
    margin: 0;
    margin-top: 4px;
    text-align: center;
    width: 127px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.about-section {
    padding: 1.5rem 1.5rem 2rem;
    background: #FFFFFF;
}

.about-section h3 {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    color: #072744;
    margin: 0 0 1rem 0;
    text-align: left;
}

.about-section p {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(7, 39, 68, 0.9);
    margin: 0 0 3.5rem !important;
    text-align: left;
}

.about-section p:last-child {
    margin-bottom: 0 !important;
}

/* === Empty State (Favourites Page) === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.empty-state p {
    font-size: 16px;
    color: var(--text-muted);
}

/* === Continue Progress Page === */
.continue-body {
    margin: 0;
    font-family: var(--font-base);
    background-color: #000;
    color: white;
    overflow-x: hidden;
}

.continue-progress-page {
    position: relative;
    min-height: 100vh;
    padding: 0;
}

.continue-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #072744;
}

.continue-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(8px);
    transform: scale(1.1);
}

.continue-background-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 39, 68, 0.85);
    z-index: 1;
}

.continue-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 40%, white, transparent),
        radial-gradient(1px 1px at 33% 60%, white, transparent),
        radial-gradient(1px 1px at 66% 20%, white, transparent),
        radial-gradient(1px 1px at 10% 80%, white, transparent),
        radial-gradient(2px 2px at 40% 90%, white, transparent),
        radial-gradient(1px 1px at 70% 50%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    z-index: 1;
    opacity: 0.7;
}

.continue-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background:
        linear-gradient(to top, #072744 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,100 L10,80 L20,90 L30,70 L40,85 L50,75 L60,88 L70,65 L80,82 L90,72 L100,85 L100,100 Z' fill='%23072444'/%3E%3C/svg%3E") repeat-x bottom;
    z-index: 1;
    opacity: 0.8;
}

.back-button,
.back-arrow,
.continue-back-button {
    position: absolute;
    top: 1.5rem;
    left: 1rem;
    z-index: 10;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.back-button:hover,
.back-arrow:hover,
.continue-back-button:hover {
    background: rgba(0, 0, 0, 0.4);
}

.continue-content {
    position: relative;
    z-index: 2;
    padding: 4.5rem 1.5rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.continue-session-card {
    width: 100%;
    max-width: 340px;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    position: relative;
}

.continue-progress-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(199, 199, 199, 0.95);
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 400;
    color: #000;
    z-index: 3;
    font-family: var(--font-base);
}

.continue-session-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 20px;
}

.continue-session-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-session-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.4) 60%, rgba(7, 39, 68, 0.85) 100%);
    z-index: 1;
}

.continue-session-card-text {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    color: white;
}

.continue-session-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.continue-session-card-subtitle {
    font-size: 13px;
    font-weight: 300;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.continue-main-heading {
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.continue-description {
    font-size: 14px;
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
    max-width: 90%;
    margin: 0 auto 3rem;
    padding: 0;
}

.continue-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 340px;
    margin-top: 4rem;
    margin-bottom: 0;
}

.continue-btn {
    flex: 1;
    padding: 0.875rem 1.75rem;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    display: block;
    font-family: var(--font-base);
}

.continue-btn-secondary {
    background: transparent;
    color: white;
}

.continue-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.continue-btn-primary {
    background: #50ADE5;
    color: white;
    border-color: #50ADE5;
}

.continue-btn-primary:hover {
    background: #3d9dd4;
    border-color: #3d9dd4;
    color: white;
}

/* === Quick Sessions All Page === */



.quick-sessions-image-mobile {
    display: block !important;
}

.quick-sessions-image-desktop {
    display: none !important;
}

.quick-sessions-info {
    position: absolute;
    bottom: 3.5rem;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0 1.5rem;
    color: white;
    width: 100%;
    text-align: left;
}

.quick-sessions-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 30px;
    text-align: left;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

.quick-sessions-subtitle {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: #FFFFFF;
    margin: 0;
    margin-top: 0.5rem;
    width: 100%;
}

.quick-sessions-nav-links {
    display: flex;
    justify-content: flex-start;
    gap: 68.5px;
    padding: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1rem;
    background: #072744;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.quick-sessions-nav-link {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 18px;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: transparent;
    border: none;
}

.quick-sessions-cards-section {
    padding: 0;
    background: #FFFFFF;
    position: relative;
    margin-top: 1.5rem;
}

.quick-sessions-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1.5rem 2rem;
}

.quick-session-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.quick-session-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.quick-session-card-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.quick-session-card-image-mobile {
    display: block !important;
}

.quick-session-card-image-desktop {
    display: none !important;
}

.quick-session-duration-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    background: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.quick-session-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.5rem;
    color: white;
}

.quick-session-card-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
    color: #FFFFFF;
    white-space: pre-line;
}

.quick-sessions-about-section {
    display: block;
    padding: 1.5rem 1.5rem 2rem;
    background: #FFFFFF;
}

.quick-sessions-about-section h3 {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    color: #1A202C;
    margin: 0 0 1rem 0;
    text-align: left;
}

.quick-sessions-about-section p {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 300 !important;
    font-size: 16px;
    line-height: 1.6;
    color: #4A5568;
    margin: 0 0 1rem 0;
    text-align: left;
}

.quick-sessions-about-section p:last-child {
    margin-bottom: 0;
}

/* === Subscription Page === */
.subscription-detail-page {
    padding: 0;
    min-height: 100vh;
    position: relative;
}

.subscription-header {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.subscription-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    min-width: 100%;
    min-height: 100%;
}

.subscription-image-mobile {
    display: block !important;
}

.subscription-image-desktop {
    display: none !important;
}

.subscription-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.8) 100%);
    z-index: 1;
}

.subscription-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.subscription-title {
    font-family: var(--font-base);
    font-style: normal;
    font-weight: 600 !important;
    font-size: 24px;
    line-height: 1.3;
    text-align: center;
    color: #FFFFFF;
    margin: 0 0 2rem 0;
}

.subscription-title .title-main {
    display: block;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.subscription-title .title-brand {
    display: block;
    font-size: 32px;
    font-weight: 600;
}

.subscription-plans {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.plan-card-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plan-card-wrapper:last-child .plan-card {
    margin-top: calc(8px + 0.5rem + 1rem + 0.5rem + 1rem + 8px);
}

.plan-card-featured-wrapper {
    background: var(--primary-light);
    border-radius: 20px;
    padding: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(7, 39, 68, 0.3), 0 0 30px rgba(7, 39, 68, 0.15);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.plan-card-featured-wrapper:hover {
    transform: translateY(-2px);
}

.plan-card-highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 8px;
    flex-shrink: 0;
    height: calc(0.5rem + 1rem + 0.5rem + 1rem);
}

.plan-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
}

.plan-save-badge {
    color: white;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.plan-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plan-name {
    font-family: var(--font-base);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #072744;
}

.plan-price {
    font-family: var(--font-base);
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #072744;
    line-height: 1;
}

.plan-per-month {
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 0.25rem 0;
    color: rgba(7, 39, 68, 0.7);
}

.plan-billing {
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 300;
    margin: 0 0 0 0;
    color: rgba(7, 39, 68, 0.6);
}

.subscription-claim-button {
    width: 100%;
    max-width: 600px;
    padding: 1rem 2rem;
    background: var(--primary-light);
    color: white;
    border: none;
    border-radius: 20px;
    font-family: var(--font-base);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
    margin-bottom: 1rem;
}

.subscription-claim-button:hover {
    opacity: 0.9;
}

.restore-purchase {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 300;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 3rem;
    transition: color 0.3s ease;
}

.restore-purchase:hover {
    color: rgba(255, 255, 255, 0.9);
}

.all-plans-section {
    width: 100%;
    max-width: 600px;
    background: rgba(7, 39, 68, 0.8);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}

.all-plans-title {
    font-family: var(--font-base);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: white;
    margin: 0 0 2rem 0;
}

.plan-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.plan-feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-feature-icon img,
.plan-feature-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plan-feature-icon svg[viewBox="0 0 25 21"] {
    width: 25px;
    height: 21px;
}

.plan-feature-text {
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 300;
    color: white;
    line-height: 1.5;
    flex: 1;
}

/* === Desktop Navigation === */
.desktop-nav {
    display: none;
}

/* === Notifications View Page === */
body.notifications-page {
    background: #f5f5f5;
    padding: 2rem 0;
}

.notification-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-DAILY {
    background: #e3f2fd;
    color: #1976d2;
}

.category-TRIGGER {
    background: #fff3e0;
    color: #f57c00;
}

.category-MINDSET {
    background: #f3e5f5;
    color: #7b1fa2;
}

.category-FEATURE {
    background: #e8f5e9;
    color: #388e3c;
}

.category-PROTECTIVE {
    background: #ffebee;
    color: #c62828;
}

.time-info {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ======================================== */
/* === CONSOLIDATED MEDIA QUERIES === */
/* ======================================== */

/* === max-width: 767px === */
@media (max-width: 767px) {

    .all-programs-grid .col-12:nth-child(n+3) {
        display: none !important;
    }

    .recommended-card {
        max-height: 350px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .recommended-card .card-image-wrapper {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: 350px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .recommended-card .progress-bar-container {
        flex-shrink: 0 !important;
        height: 4px !important;
    }

    .recommended-card .progress-bar-label {
        flex-shrink: 0 !important;
    }

    .recommended-card .card-image-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }

    .carousel-arrow {
        display: none !important;
    }

    #carouselLeftBtn,
    #carouselRightBtn {
        display: none !important;
    }

    .section-heading {
        padding: 0 !important;
        margin-top: 2rem !important;
        margin-bottom: 1rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .section-heading-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .section-heading:first-of-type {
        margin-top: 0 !important;
    }

    .carousel-wrapper,
    .bite-sized-carousel-wrapper {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .carousel-wrapper .scroll-carousel,
    .bite-sized-carousel-wrapper .scroll-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 0.75rem !important;
        padding: 0 0 1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .carousel-wrapper .scroll-carousel.px-3,
    .bite-sized-carousel-wrapper .scroll-carousel.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 1rem !important;
    }

    .carousel-wrapper .scroll-carousel .session-card,
    .bite-sized-carousel-wrapper .scroll-carousel .session-card {
        flex: 0 0 68% !important;
        min-width: 68% !important;
        max-width: 68% !important;
        scroll-snap-align: start !important;
        position: relative !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        background: var(--bg-light) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .carousel-wrapper .scroll-carousel .session-card img,
    .bite-sized-carousel-wrapper .scroll-carousel .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        flex: 1 1 auto !important;
    }

    .carousel-wrapper .scroll-carousel .session-card,
    .bite-sized-carousel-wrapper .scroll-carousel .session-card {
        aspect-ratio: 1.35 / 1 !important;
    }

    @media (max-width: 767px) {
        .bite-sized-carousel-wrapper .scroll-carousel .session-card {
            aspect-ratio: 1.35 / 1 !important;
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;

        }

        .carousel-wrapper .scroll-carousel .session-card,
        .bite-sized-carousel-wrapper .scroll-carousel .session-card {
            aspect-ratio: 1.35 / 1 !important;
            height: auto !important;
        }
    }

    .recommended-card .card-overlay-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
        background: transparent !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
    }

    .recommended-card .card-overlay-content .d-flex {
        width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    .recommended-card .card-overlay-content .text-white {
        flex: 1 !important;
        text-align: left !important;
    }

    .recommended-card .card-overlay-content .btn {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    .recommended-card .card-title {
        font-size: 20px !important;
        color: white !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    .recommended-card .card-subtitle {
        font-size: 14px !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 0 !important;
        font-weight: 300 !important;
        text-align: left !important;
    }

    .row.all-programs-grid,
    .all-programs-grid.row,
    .all-programs-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .all-programs-grid .col-12,
    .row.all-programs-grid .col-12 {
        width: 100% !important;
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex: 0 0 auto !important;
        max-width: 100% !important;
    }

    .all-programs-grid .program-card {
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    .all-programs-grid .program-card .card-overlay-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
        background: transparent !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
    }

    .all-programs-grid .program-card .card-overlay-content .d-flex {
        width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    .all-programs-grid .program-card .card-overlay-content .text-white {
        flex: 1 !important;
        text-align: left !important;
    }

    .all-programs-grid .program-card .card-overlay-content .btn {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    .all-programs-grid .program-card .card-title {
        font-size: 20px !important;
        color: white !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    .all-programs-grid .program-card .card-subtitle {
        font-size: 14px !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 0 !important;
        font-weight: 300 !important;
        text-align: left !important;
    }

    .welcome-text {
        padding: 1rem 1rem 0 !important;
    }

    .day-bubbles {
        width: 343px !important;
        max-width: 343px !important;
        margin: 0 auto 1.5rem !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        overflow: visible !important;
        flex-wrap: nowrap !important;
    }

    .day-circle {
        width: 40px !important;
        height: 54px !important;
        font-size: 12px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container-main {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .app-footer .support {
        margin-top: 8rem !important;
    }

    .journey-card-bottom-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .journey-card-subtitle {
        flex: 1;
        min-width: 0;
        margin-bottom: 0 !important;
    }

    .journey-card-button {
        flex-shrink: 0;
    }

}

/* === min-width: 768px) and (max-width: 1199px === */
@media (min-width: 768px) and (max-width: 1199px) {

    .app-header .btn.d-md-none {
        display: block !important;
    }

    .app-header img.d-md-none {
        display: block !important;
    }

    .app-header img.d-none.d-md-block {
        display: none !important;
    }

    .welcome-banner {
        max-width: 440px !important;
        margin: 0 auto !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .welcome-text {
        max-width: 440px !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        position: relative !important;
    }

    .day-bubbles {
        width: 440px !important;
        max-width: 440px !important;
        margin: 0 auto 1.5rem !important;
        margin-left: calc(-1.5rem) !important;
        margin-right: auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        overflow: visible !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        position: relative !important;
    }

    .day-circle {
        width: 44px !important;
        height: 60px !important;
        font-size: 13px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .stats-summary {
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto 2rem !important;
        padding: 1.5rem !important;
        border-radius: 20px !important;
        box-sizing: border-box !important;
    }

    .section-heading {
        padding: 0 !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .section-heading-content {
        width: min(934px, calc(100vw - 2rem)) !important;
        max-width: min(934px, calc(100vw - 2rem)) !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .section-heading:first-of-type {
        margin-top: 0 !important;
    }

    .section-heading h5 {
        font-size: 20px !important;
        margin-bottom: 0 !important;
    }

    .recommended-cards-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
        justify-content: center !important;
        max-width: min(934px, calc(100vw - 2rem)) !important;
        width: min(934px, calc(100vw - 2rem)) !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .recommended-cards-wrapper .recommended-card:nth-child(2) {
        display: flex !important;
    }

    .recommended-card {
        width: 100% !important;
        height: 298px !important;
        margin: 0 !important;
        border-radius: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .recommended-card .card-image-wrapper img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .carousel-wrapper {
        position: relative !important;
        max-width: min(934px, calc(100vw - 2rem)) !important;
        margin: 0 auto !important;
        padding: 0 1rem !important;
        overflow: visible !important;
    }

    .carousel-wrapper .scroll-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1rem !important;
        padding: 0 0 1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
    }

    .carousel-wrapper .scroll-carousel .session-card {
        flex: 0 0 calc(33.333% - 0.67rem) !important;
        min-width: calc(33.333% - 0.67rem) !important;
        max-width: calc(33.333% - 0.67rem) !important;
        height: 146px !important;
        border-radius: 20px !important;
        scroll-snap-align: start !important;
        display: flex !important;
    }

    .carousel-wrapper .scroll-carousel .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .carousel-arrow {
        display: none !important;
    }

    #carouselLeftBtn,
    #carouselRightBtn {
        display: none !important;
    }

    .row.all-programs-grid,
    .all-programs-grid.row,
    .all-programs-grid {
        display: grid !important;
        flex-wrap: nowrap !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
        justify-content: center !important;
        margin-left: 0 !important;

        margin-right: 0 !important;

        max-width: min(934px, calc(100vw - 2rem)) !important;

        width: min(934px, calc(100vw - 2rem)) !important;
        margin: 0 auto !important;

        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .all-programs-grid .col-12 {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .all-programs-grid .col-12:nth-child(1),
    .all-programs-grid .col-12:nth-child(2),
    .all-programs-grid .col-12:nth-child(3),
    .all-programs-grid .col-12:nth-child(4) {
        display: block !important;
    }

    .all-programs-grid .col-12:nth-child(n+5) {
        display: none !important;
    }

    .all-programs-grid .program-card {
        position: relative !important;
        width: 100% !important;
        height: 231px !important;
        margin-bottom: 0 !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: block !important;
    }

    .all-programs-grid .program-card img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 20px !important;
        margin: 0 !important;
        display: block !important;
    }

    .all-programs-grid .program-card .card-gradient-overlay {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(to top, rgba(7, 39, 68, 0.7) 0%, rgba(7, 39, 68, 0) 100%) !important;
        z-index: 1 !important;
        pointer-events: none !important;
        border-radius: 20px !important;
    }

    .all-programs-grid .program-card .card-overlay-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
        background: transparent !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
    }

    .all-programs-grid .program-card .card-overlay-content .d-flex {
        width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    .all-programs-grid .program-card .card-overlay-content .text-white {
        flex: 1 !important;
        text-align: left !important;
    }

    .all-programs-grid .program-card .card-overlay-content .btn {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    .all-programs-grid .program-card .card-title {
        font-size: 20px !important;
        color: white !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    .all-programs-grid .program-card .card-subtitle {
        font-size: 14px !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 0 !important;
        font-weight: 300 !important;
        text-align: left !important;
    }

    .bite-sized-carousel-wrapper {
        position: relative !important;
        max-width: min(934px, calc(100vw - 2rem)) !important;
        margin: 0 auto !important;
        padding: 0 1rem !important;
        overflow: visible !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1rem !important;
        padding: 0 0 1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 1rem !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel .session-card {
        flex: 0 0 calc(33.333% - 0.67rem) !important;
        min-width: calc(33.333% - 0.67rem) !important;
        max-width: calc(33.333% - 0.67rem) !important;
        height: 197px !important;
        border-radius: 20px !important;
        scroll-snap-align: start !important;
        display: flex !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .scroll-carousel:not(.carousel-wrapper .scroll-carousel) .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .footer-links {
        display: none !important;
    }

    .app-footer .support,
    .app-footer .footer-content .support {
        margin-top: 8rem !important;
    }

    .faq-header {
        height: 400px;
    }

    .faq-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .faq-section {
        padding: 2rem 2rem 2rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .faq-item-number,
    .faq-item-question {
        font-size: 28px !important;
    }

    .journeys-header {
        height: 400px;
    }

    .journeys-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .journeys-subtitle {
        font-size: 18px;
        line-height: 1.2;
        text-align: center;
    }

    .journeys-cards-section {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        padding-top: 3rem;
    }

    .journey-card-title {
        margin-bottom: 0.5rem;
    }

    .journey-card-overlay {
        gap: 0.75rem;
    }

    .journey-card-bottom-row {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .journey-card-button {
        align-self: flex-end;
        margin-top: 0.25rem;
    }

    .journey-card-subtitle {
        margin-bottom: 1rem;
    }

    .journey-card-button {
        padding: 0.4rem 1rem;
        font-size: 12px;
        gap: 0.4rem;
        border-radius: 18px;
    }

    .journeys-about-section h3 {
        font-size: 28px !important;
    }

    .session-header {
        height: 400px;
    }

    .session-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .session-subtitle {
        font-size: 18px;
        line-height: 1.2;
    }

    .session-cards-scroll-carousel {
        gap: 1rem !important;
    }

    .session-cards-scroll-carousel .session-card-wrapper {
        flex: 0 0 calc((100% - 3rem) / 4) !important;
        min-width: calc((100% - 3rem) / 4) !important;
        max-width: calc((100% - 3rem) / 4) !important;
        width: calc((100% - 3rem) / 4) !important;
    }

    .session-cards-section {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .session-card-item {
        width: 100%;
        height: 200px;
    }

    .session-card-title {
        width: 100%;
        margin-top: 8px;
    }

    .about-section {
        padding: 2rem 2rem 2rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .continue-content {
        padding: 5rem 2rem 4rem;
        justify-content: center;
    }

    .continue-session-card {
        max-width: 440px;
        margin-bottom: 3.5rem;
    }

    .continue-progress-badge {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 11px;
    }

    .continue-session-card-image {
        height: 240px;
    }

    .continue-session-card-title {
        font-size: 24px;
        margin-bottom: 0.5rem;
    }

    .continue-session-card-subtitle {
        font-size: 14px;
    }

    .continue-main-heading {
        font-size: 34px;
        margin-bottom: 2rem;
    }

    .continue-description {
        font-size: 16px;
        max-width: 580px;
        margin-bottom: 3.5rem;
    }

    .continue-buttons-container {
        flex-direction: column;
        max-width: 440px;
        gap: 1.25rem;
        margin-top: 4rem;
        margin-bottom: 0;
    }

    .continue-btn {
        padding: 1rem 2rem;
        font-size: 16px;
    }

    .quick-sessions-header {
        height: 400px;
    }

    .quick-sessions-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .quick-sessions-subtitle {
        font-size: 18px;
        line-height: 1.2;
        text-align: center;
    }

    .quick-sessions-cards-section {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        padding-top: 3rem;
    }

    .quick-session-card-title {
        font-size: 18px;
    }

    .quick-sessions-about-section h3 {
        font-size: 28px !important;
    }

    .subscription-title .title-main {
        font-size: 28px;
    }

    .subscription-title .title-brand {
        font-size: 42px;
    }

}

/* === min-width: 768px === */
@media (min-width: 768px) {

    .about-page {
        padding: 3rem 2rem;
    }

    .cta-buttons {
        flex-wrap: nowrap;
    }

    .faq-image.faq-image-mobile {
        display: none !important;
    }

    .faq-image.faq-image-desktop {
        display: block !important;
    }

    .faq-item-answer {
        font-size: 18px !important;
    }

    .journeys-image.journeys-image-mobile {
        display: none !important;
    }

    .journeys-image.journeys-image-desktop {
        display: block !important;
    }

    .journeys-info {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        padding: 0;
        text-align: center;
    }

    .journeys-title {
        text-align: center;
    }

    .journeys-nav-links {
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .journeys-cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 2rem;
    }

    .journey-card-image-wrapper {
        height: 250px;
    }

    .journey-card-image-mobile {
        display: none !important;
    }

    .journey-card-image-desktop {
        display: block !important;
    }

    .journeys-about-section {
        padding: 2rem 2rem 3rem;
    }

    .journeys-about-section p {
        font-size: 18px !important;
    }

    .player-content h4 {
        font-size: 36px;
    }

    .play-button {
        width: 100px;
        height: 100px;
    }

    .play-button i {
        font-size: 3rem;
    }

    .session-image.session-image-mobile {
        display: none !important;
    }

    .session-image.session-image-desktop {
        display: block !important;
    }

    .session-nav-links {
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .session-cards-carousel-wrapper {
        padding: 0 2rem;
        margin-bottom: 1rem;
    }

    .session-cards-section h3 {
        padding-left: 2rem;
        padding-top: 2rem;
    }

    .session-card-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .session-card-image.session-card-image-mobile {
        display: none !important;
    }

    .session-card-image.session-card-image-desktop {
        display: block !important;
    }

    .app-footer .quote-section {
        margin-bottom: 8rem !important;
    }

    .app-footer .support {
        margin-top: 0 !important;
    }

    .about-section p {
        margin: 0 0 4rem !important;
    }

    .continue-background-overlay {
        background: rgba(7, 39, 68, 0.75);
    }

    .continue-background::before,
    .continue-background::after {
        display: none;
    }

    .back-button,
    .back-arrow,
    .continue-back-button {
        top: 2rem;
        left: 2rem;
    }

    .quick-sessions-image.quick-sessions-image-mobile {
        display: none !important;
    }

    .quick-sessions-image.quick-sessions-image-desktop {
        display: block !important;
    }

    .quick-sessions-info {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        padding: 0;
        text-align: center;
    }

    .quick-sessions-title {
        text-align: center;
    }

    .quick-sessions-nav-links {
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .quick-sessions-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 2rem;
    }

    .quick-session-card-image-wrapper {
        height: 250px;
    }

    .quick-session-card-image-mobile {
        display: none !important;
    }

    .quick-session-card-image-desktop {
        display: block !important;
    }

    .quick-sessions-about-section {
        padding: 2rem 2rem 3rem;
    }

    .quick-sessions-about-section p {
        font-size: 18px !important;
    }

    .subscription-image.subscription-image-mobile {
        display: none !important;
    }

    .subscription-image.subscription-image-desktop {
        display: block !important;
    }

    .subscription-content {
        padding: 3rem 2rem;
        padding-top: 5rem;
    }

    .subscription-plans {
        gap: 1.5rem;
        max-width: 700px;
    }

    .plan-price {
        font-size: 42px;
    }

    .subscription-claim-button {
        max-width: 700px;
    }

    .all-plans-section {
        max-width: 700px;
        padding: 2.5rem 2rem;
    }

    .all-plans-title {
        font-size: 28px;
    }

    .plan-feature-text {
        font-size: 18px;
    }

}

/* === min-width: 1200px === */
@media (min-width: 1200px) {

    .container-main {
        padding: 0 !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .app-header::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 75px !important;
        background: #072744 !important;
        z-index: 1 !important;
    }

    .app-header .container-fluid {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
        height: 75px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: transparent !important;
        position: relative !important;
        z-index: 10 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .app-header .container-fluid::before {
        display: none !important;
    }

    .app-header img {
        height: 28px !important;
    }

    .app-header .header-logo-link.d-md-none {
        display: none !important;
    }

    .app-header .header-logo-link.d-none.d-md-block {
        display: flex !important;
    }

    .app-header .header-logo-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        text-decoration: none !important;
    }

    .app-header .btn {
        font-size: 1.5rem !important;
        padding: 0.5rem !important;
        background: transparent !important;
        border: none !important;
        color: white !important;
        min-width: auto !important;
    }

    .app-header .btn i {
        font-size: 1.5rem !important;
    }

    .welcome-banner {
        padding-top: 1rem !important;
    }

    .welcome-text {
        padding: 0 2rem !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }

    .welcome-text p:first-child {
        font-size: 64px !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
    }

    .welcome-text h1 {
        font-size: 64px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .welcome-text p:nth-of-type(2) {
        font-size: 32px !important;
        font-weight: 400 !important;
        margin-bottom: 2rem !important;
    }

    .welcome-text p:last-of-type {
        font-size: 24px !important;
        font-weight: 300 !important;
        margin-bottom: 1.5rem !important;
    }

    .day-bubbles {
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto 2rem !important;
        padding: 0 2rem !important;
        box-sizing: border-box !important;
    }

    .day-circle {
        width: 56px !important;
        height: 76px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        gap: 12px !important;
        margin: 0 8px !important;
    }

    .day-circle .day-dot {
        width: 12px !important;
        height: 12px !important;
    }

    .day-circle.active .day-dot {
        width: 10px !important;
        height: 10px !important;
    }

    .stats-summary {
        max-width: 1200px !important;
        margin: 0 auto 2rem !important;
        padding: 1.5rem 2rem !important;
        border-radius: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .stat-box .label {
        font-size: 24px !important;
    }

    .stat-box .sub-label {
        font-size: 14px !important;
    }

    .section-heading {
        padding: 0 !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .section-heading h5 {
        font-size: 48px !important;
        font-weight: 600 !important;
    }

    .section-heading .view-all {
        font-size: 32px !important;
        font-weight: 300 !important;
        text-decoration: underline !important;
    }

    .section-heading {
        width: 1212px !important;
        max-width: 1212px !important;
        margin-left: -6px !important;
        margin-right: auto !important;
    }

    .section-heading-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .recommended-cards-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 594px) !important;
        gap: 1.5rem !important;
        padding: 0 2rem !important;
        max-width: 1200px !important;
        margin: 0 auto 2rem !important;
        justify-content: center !important;
    }

    .recommended-card {
        margin: 0 !important;
        border-radius: 24px !important;
        width: 594px !important;
        height: 390px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .recommended-card .progress-bar-label {
        background: #f5f5f5 !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 12px !important;
        font-weight: 300 !important;
        color: #666 !important;
        border-top-left-radius: 24px !important;
        border-top-right-radius: 24px !important;
    }

    .recommended-card .card-image-wrapper {
        border-bottom-left-radius: 24px !important;
        border-bottom-right-radius: 24px !important;
        flex: 1 !important;
        display: flex !important;
        align-items: stretch !important;
        overflow: hidden !important;
        min-height: 0 !important;
    }

    .recommended-cards-wrapper .recommended-card:nth-child(2) {
        display: flex !important;
    }

    .recommended-card .card-image-wrapper img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .recommended-card .card-gradient-overlay {
        border-bottom-left-radius: 24px !important;
        border-bottom-right-radius: 24px !important;
    }

    .recommended-card .card-overlay-content {
        padding: 1.5rem !important;
    }

    .recommended-card .card-overlay-content .d-flex {
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    .recommended-card .card-overlay-content .text-white {
        flex: 1 !important;
        text-align: left !important;
    }

    .recommended-card .card-overlay-content .btn {
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    .recommended-card .card-title {
        font-size: 24px !important;
        font-weight: 600 !important;
        color: white !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .recommended-card .card-subtitle {
        font-size: 16px !important;
        font-weight: 300 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        line-height: 1.4 !important;
    }

    .recommended-card .btn {
        font-size: 14px !important;
        padding: 0.5rem 1.25rem !important;
        font-weight: 600 !important;
    }

    .all-programs-section {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
    }

    .all-programs-grid {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
    }

    .all-programs-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 393px) !important;
        gap: 1.5rem !important;
        justify-content: center !important;
    }

    .all-programs-grid .col-12 {
        width: 393px !important;
        max-width: 393px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .all-programs-grid .col-12 {
        display: block !important;
    }

    .program-card {
        position: relative !important;
        width: 393px !important;
        height: 393px !important;
        margin-bottom: 0 !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: block !important;

    }

    .program-card img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 20px !important;
        margin: 0 !important;
        display: block !important;
    }

    .program-card .card-gradient-overlay {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(to top, rgba(7, 39, 68, 0.7) 0%, rgba(7, 39, 68, 0) 100%) !important;
        z-index: 1 !important;
        pointer-events: none !important;
        border-radius: 20px !important;
    }

    .program-card .card-overlay-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
        background: transparent !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
    }

    .program-card .card-overlay-content .text-white {
        color: white !important;
    }

    .program-card .card-overlay-content .d-flex {
        width: 100% !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .program-card .card-overlay-content .d-flex .btn {
        align-self: flex-end !important;
    }

    .program-card .card-title {
        font-size: 20px !important;
        color: white !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
    }

    .program-card .card-subtitle {
        font-size: 14px !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 0 !important;
        font-weight: 300 !important;
    }

    .carousel-wrapper {
        position: relative !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .carousel-wrapper .scroll-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        width: 1212px !important;
        max-width: 1212px !important;
        margin-left: -6px !important;
        margin-right: auto !important;
        padding: 0 0 1rem !important;
        gap: 1.25rem !important;
    }

    .carousel-wrapper .scroll-carousel .session-card:nth-child(n+5) {
        display: flex !important;
    }

    .bite-sized-carousel-wrapper {
        position: relative !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        width: 1212px !important;
        max-width: 1212px !important;
        margin-left: -6px !important;
        margin-right: auto !important;
        padding: 0 0 1rem !important;
        gap: 1.25rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 1rem !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel .session-card {
        flex: 0 0 390.67px !important;
        min-width: 390.67px !important;
        max-width: 390.67px !important;
        width: 390.67px !important;
        height: 258px !important;
        border-radius: 20px !important;
        scroll-snap-align: start !important;
        display: flex !important;
    }

    .bite-sized-carousel-wrapper .scroll-carousel .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .session-card {
        flex: 0 0 390.67px !important;
        width: 390.67px !important;
        height: 258px !important;
        max-width: 390.67px !important;
        border-radius: 20px !important;
        overflow: hidden !important;
    }

    .session-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .session-card .card-title {
        font-size: 16px !important;
        font-weight: 400 !important;
        color: white !important;
        max-width: none !important;
    }

    .carousel-arrow {
        display: flex !important;
    }

    #carouselLeftBtn,
    #carouselRightBtn {
        display: flex !important;
    }

    .carousel-arrow-left {
        left: -85px !important;

    }

    .carousel-arrow-right {
        right: -85px !important;

    }

    .app-footer {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 5rem 0 1rem !important;
    }

    .app-footer .footer-content {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
    }

    .footer-links {
        display: none !important;
    }

    .footer-links+.support {
        margin-top: 4rem !important;
    }

    .faq-detail-page {
        margin-top: 75px !important;
    }

    .faq-header {
        height: 500px;
    }

    .faq-title {
        font-size: 42px;
        line-height: 1.2;
    }

    .faq-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 2rem 2rem;
    }

    .faq-item-number,
    .faq-item-question {
        font-size: 32px !important;
    }

    .journeys-detail-page {
        margin-top: 75px !important;
    }

    .journeys-header {
        height: 500px;
    }

    .journeys-title {
        font-size: 42px;
        line-height: 1.2;
    }

    .journeys-subtitle {
        font-size: 20px;
        line-height: 1.2;
        text-align: center;
    }

    .journeys-nav-links {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .journeys-cards-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
        padding-top: 3rem;
    }

    .journeys-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 2rem;
    }

    .journey-card-image-wrapper {
        height: 280px;
    }

    .journey-card-overlay {
        gap: 0.75rem;
    }

    .journey-card-bottom-row {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .journey-card-title {
        margin-bottom: 0.5rem;
    }

    .journey-card-button {
        align-self: flex-end;
        margin-top: 0.25rem;
    }

    .journey-card-subtitle {
        margin-bottom: 1rem;
    }

    .journeys-about-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 2rem 3rem;
    }

    .journeys-about-section h3 {
        font-size: 32px !important;
    }

    .player-container {
        margin-top: 75px !important;
        padding-top: 2rem !important;
        height: calc(100vh - 75px) !important;
        height: calc(100svh - 75px) !important; /* visible viewport so buttons stay on screen */
    }

    .player-container.player-container--compact {
        padding-top: 0.75rem !important;
    }

    .play-button {
        margin-top: 4rem !important;
    }

    .player-container.player-container--compact .play-button {
        margin-top: 1.25rem !important;
    }

    .player-actions {
        max-width: 1200px !important;
        padding: 0 2rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .session-detail-page {
        margin-top: 75px !important;
    }

    .session-header {
        height: 500px;
    }

    .session-title {
        font-size: 42px;
        line-height: 1.2;
    }

    .session-subtitle {
        font-size: 20px;
        line-height: 1.2;
    }

    .session-nav-links {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .session-cards-carousel-wrapper {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .session-cards-scroll-carousel {
        gap: 1rem !important;
    }

    .session-cards-scroll-carousel .session-card-wrapper {
        flex: 0 0 calc((100% - 3rem) / 4) !important;
        min-width: calc((100% - 3rem) / 4) !important;
        max-width: calc((100% - 3rem) / 4) !important;
        width: calc((100% - 3rem) / 4) !important;
    }

    .session-cards-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
    }

    .session-card-item {
        width: 100%;
        max-width: 280px;
        height: 250px;
    }

    .session-card-duration {
        bottom: 12px;
        right: 12px;
    }

    .session-card-progress {
        top: 10px;
        left: 10px;
        min-width: 24px;
        height: 18px;
        font-size: 7px;
        padding: 0 5px;
    }

    .session-card-title {
        width: 100%;
        max-width: 280px;
        margin-top: 8px;
    }

    .about-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 2rem 2rem;
    }

    .continue-progress-page {
        margin-top: 75px !important;
    }

    .continue-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 6rem 2rem 5rem;
        justify-content: center;
    }

    .continue-session-card {
        max-width: 520px;
        margin-bottom: 4rem;
    }

    .continue-progress-badge {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 12px;
    }

    .continue-session-card-image {
        height: 300px;
    }

    .continue-session-card-title {
        font-size: 28px;
        margin-bottom: 0.5rem;
    }

    .continue-session-card-subtitle {
        font-size: 15px;
    }

    .continue-main-heading {
        font-size: 40px;
        margin-bottom: 2.25rem;
    }

    .continue-description {
        font-size: 18px;
        max-width: 640px;
        margin-bottom: 4rem;
    }

    .continue-buttons-container {
        flex-direction: column;
        max-width: 520px;
        gap: 1.25rem;
        margin-top: 4rem;
        margin-bottom: 0;
    }

    .continue-btn {
        padding: 1.125rem 2.25rem;
        font-size: 17px;
    }

    .quick-sessions-detail-page {
        margin-top: 75px !important;
    }

    .quick-sessions-header {
        height: 500px;
    }

    .quick-sessions-title {
        font-size: 42px;
        line-height: 1.2;
    }

    .quick-sessions-subtitle {
        font-size: 20px;
        line-height: 1.2;
        text-align: center;
    }

    .quick-sessions-nav-links {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-bottom: 1rem;
    }

    .quick-sessions-cards-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
        padding-top: 3rem;
    }

    .quick-sessions-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 2rem;
    }

    .quick-session-card-image-wrapper {
        height: 280px;
    }

    .quick-session-card-title {
        font-size: 20px;
    }

    .quick-sessions-about-section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 2rem 3rem;
    }

    .quick-sessions-about-section h3 {
        font-size: 32px !important;
    }

    .subscription-detail-page {
        margin-top: 75px !important;
    }

    .subscription-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }

    .subscription-title .title-main {
        font-size: 32px;
    }

    .subscription-title .title-brand {
        font-size: 48px;
    }

    .desktop-nav {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background: #072744 !important;
        height: 75px !important;
    }

    .desktop-nav .nav-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
        height: 75px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .desktop-nav .nav-logo {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .desktop-nav .nav-logo-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        text-decoration: none !important;
    }

    .desktop-nav .nav-logo img {
        height: 28px !important;
    }

    .desktop-nav .nav-menu-btn {
        background: transparent !important;
        border: none !important;
        color: white !important;
        font-size: 1.5rem !important;
        padding: 0.5rem !important;
        cursor: pointer !important;
    }

    .page-content-with-nav {
        margin-top: 75px !important;
    }

}

/* === min-width: 440px) and (max-width: 767px === */
@media (min-width: 440px) and (max-width: 767px) {

    .session-cards-carousel-wrapper {
        padding-left: max(1.5rem, calc((100% - 399px) / 2));
        padding-right: max(1.5rem, calc((100% - 399px) / 2));
    }

}

/* ============================================================= */
/* === Bottom Tab Bar (Miri navigation) ======================== */
/* ============================================================= */
.mr-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eef0f2;
    box-shadow: 0 -6px 24px rgba(16, 24, 40, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-family: var(--font-base);
}

/* Inner row keeps the touch targets a comfortable width while the white bar
   spans the full viewport (looks balanced on phone, tablet and desktop). */
.mr-bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 6px;
}

.mr-bottom-nav-spacer {
    height: calc(70px + env(safe-area-inset-bottom, 0px));
}

.mr-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    color: var(--miri-nav-inactive);
    transition: color 0.18s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    /* reset for <button> nav items (e.g. the Miri tab) */
    background: none;
    border: none;
    font-family: var(--font-base);
    cursor: pointer;
}

.mr-nav-item:focus,
.mr-nav-item:hover {
    color: #6b7480;
}

.mr-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mr-nav-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Miri is the flagship action → raised, filled center tab (FAB style). */
.mr-nav-item--center {
    justify-content: flex-start;
}

.mr-nav-item--center .mr-nav-icon {
    width: 54px;
    height: 54px;
    margin-top: -26px;
    margin-bottom: 3px;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--miri-accent) 0%, var(--miri-blue) 55%, var(--miri-blue-strong) 100%);
    box-shadow: 0 10px 22px rgba(2, 163, 255, 0.42), 0 0 0 5px #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mr-nav-item--center .mr-nav-icon svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.mr-nav-item--center:hover .mr-nav-icon,
.mr-nav-item--center:focus .mr-nav-icon {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(2, 163, 255, 0.5), 0 0 0 5px #fff;
}

.mr-nav-item--center .mr-nav-label {
    color: var(--miri-blue-strong);
    font-weight: 600;
}

.mr-nav-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1;
}

.mr-nav-item.active {
    color: var(--miri-teal);
}

/* The center tab keeps its filled look even when not the active route. */
.mr-nav-item--center.active {
    color: var(--miri-blue-strong);
}

.mr-nav-item.active .mr-nav-label {
    font-weight: 600;
}

/* ============================================================= */
/* === Miri intro page ========================================= */
/* ============================================================= */
.miri-screen {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: var(--font-base);
    background:
        radial-gradient(120% 80% at 50% 8%, rgba(18, 185, 166, 0.18), transparent 55%),
        linear-gradient(180deg, #0c241f 0%, #103129 38%, #0a1c1a 100%);
    overflow: hidden;
}

.miri-screen::before {
    /* soft blurred organic light, evokes the calm forest backdrop */
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(40% 30% at 25% 20%, rgba(120, 200, 170, 0.22), transparent 60%),
        radial-gradient(45% 35% at 80% 30%, rgba(40, 120, 110, 0.25), transparent 60%),
        radial-gradient(60% 40% at 50% 90%, rgba(10, 60, 55, 0.4), transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.miri-screen > * {
    position: relative;
    z-index: 1;
}

/* Centered content column so the immersive screen reads well on tablet/desktop
   while the gradient background still fills the whole viewport. */
.miri-screen__inner {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.miri-topbar {
    padding: max(14px, env(safe-area-inset-top, 0px)) 18px 0;
}

.miri-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    line-height: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background 0.15s ease;
}

.miri-back svg {
    width: 17px;
    height: 17px;
    display: block;
}

.miri-back:hover {
    background: rgba(255, 255, 255, 0.26);
}

.miri-back:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.miri-hero {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 8px;
}

.miri-orb {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 40px 8px rgba(2, 163, 255, 0.45),
        0 0 90px 26px rgba(25, 130, 230, 0.35);
    animation: miriPulse 4s ease-in-out infinite;
}

@keyframes miriPulse {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 34px 6px rgba(2,163,255,0.40), 0 0 80px 22px rgba(25,130,230,0.30); }
    50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 48px 12px rgba(2,163,255,0.55), 0 0 110px 34px rgba(25,130,230,0.42); }
}

.miri-orb svg {
    width: 64px;
    height: 64px;
    color: #fff;
}

.miri-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 26px 0;
}

.miri-eyebrow {
    margin: 0 0 6px !important;
    font-size: 0.78rem;
    font-weight: 600 !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.miri-title {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 26px;
    text-shadow: 0 1px 18px rgba(4, 22, 44, 0.35);
}

.miri-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.miri-guidance {
    list-style: none;
    padding: 8px 16px;
    margin: 0 0 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.miri-guidance li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    font-size: 1.02rem;
    font-weight: 400;
}

.miri-guidance li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.miri-guidance .mg-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    color: #eaf4ff;
}

.miri-guidance .mg-icon svg {
    width: 30px;
    height: 30px;
}

.miri-cta-wrap {
    padding: 6px 26px 18px;
}

.miri-cta {
    display: block;
    width: 100%;
    border: none;
    border-radius: 32px;
    padding: 18px;
    background: linear-gradient(135deg, var(--miri-accent) 0%, var(--miri-blue) 55%, var(--miri-blue-strong) 100%);
    color: #fff;
    font-family: var(--font-base);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(2, 163, 255, 0.42);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.miri-cta:active {
    transform: translateY(1px);
    filter: brightness(0.96);
}

.miri-disclaimer {
    padding: 0 26px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

/* ============================================================= */
/* === Miri chat modal ========================================= */
/* ============================================================= */
.miri-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(9, 26, 46, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.miri-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

body.miri-modal-open {
    overflow: hidden;
}

/* The popup card. Holds two stacked views (intro + chat). */
.miri-popup {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0f2f5c;
    border-radius: 0;
    overflow: hidden;
    /* Miri's panel looks the same in both themes, so the parts the browser
       draws for itself -- scrollbars, caret, selection -- have to be told
       that too. Without this the message list gets a heavy dark scrollbar in
       dark mode, against a panel that is still light. */
    color-scheme: light;
    transform: translateY(14px) scale(0.99);
    transition: transform 0.24s ease;
}

.miri-modal-backdrop.open .miri-popup {
    transform: translateY(0) scale(1);
}

/* Tablet / desktop: render as a centered floating card. */
@media (min-width: 576px) {
    .miri-modal-backdrop {
        padding: 24px;
    }

    .miri-popup {
        width: min(440px, 94vw);
        height: min(760px, 88vh);
        border-radius: 22px;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    }
}

/* Each view fills the card; only one is shown at a time. */
.miri-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.miri-view[hidden] {
    display: none;
}

.miri-chat {
    background: #f6f8f8;
    font-family: var(--font-base);
}

/* Intro view inside the popup — light & photographic, matching the app hero
   (same header.png image + blue scrim used on the homepage). */
.miri-intro-view {
    color: #fff;
    overflow-y: auto;
    font-family: var(--font-base);
    background:
        linear-gradient(180deg, rgba(25, 130, 230, 0.55) 0%, rgba(7, 39, 68, 0.82) 100%),
        url('/app/ui/assets/img/header.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.miri-intro-view::before {
    /* subtle top light bloom behind the orb */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 32% at 50% 16%, rgba(2, 163, 255, 0.35), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.miri-topbar--end {
    display: flex;
    justify-content: flex-end;
}

/* Compact the intro so it fits the popup card (incl. the CTA) without scrolling
   on common heights, while still breathing on full-screen mobile. */
.miri-intro-view .miri-topbar {
    padding-top: 12px;
}

.miri-intro-view .miri-hero {
    padding: 12px 0 2px;
}

.miri-intro-view .miri-orb {
    width: 108px;
    height: 108px;
}

.miri-intro-view .miri-orb svg {
    width: 46px;
    height: 46px;
}

.miri-intro-view .miri-title {
    font-size: 1.55rem;
    margin: 8px 0 16px;
}

.miri-intro-view .miri-subtitle {
    margin-bottom: 18px !important;
    font-weight: 600 !important;
}

.miri-intro-view .miri-guidance {
    margin-bottom: 14px;
}

.miri-intro-view .miri-guidance li {
    padding: 7px 0;
    font-size: 0.98rem;
}

.miri-intro-view .miri-cta {
    padding: 15px;
}

.miri-intro-view .miri-disclaimer {
    margin-bottom: 0;
}

/* Keep the bottom breathing room equal to the space above the close button
   (topbar padding-top) so the intro frame reads symmetrically. */
.miri-intro-view .miri-screen__inner {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

/* ---------------------------------------------------------------------------
   Locked screen — Figma 3268:3131, shown to anyone who hasn't bought Miri.

   A screen of its own rather than a state of the intro: the design is a 2615px
   scroll carrying its own pricing card, reviews and comparison table, and the
   intro has no business growing those.

   Payment is not taken here. Every customer's card sits with Primer, and
   web2wave's off-session charge API covers only Stripe and Solidgate, so each
   CTA hands off to the hosted paywall.
   --------------------------------------------------------------------------- */

/* Height comes from .miri-view's `position: absolute; inset: 0`, which must
   not be overridden: without it the view grows to its content and the popup,
   which clips, swallows everything below the fold. */
.miri-locked-view {
    min-height: 0;
    background: rgb(7, 10, 24);
}

.miri-locked-view[hidden] {
    display: none;
}

/* The sticky bar overlays the scroll, so the scroller owns the overflow and
   reserves room for the bar at the end of its padding. */
.miri-locked__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Photographic band behind the badge row and the avatar. Height is the sum of
   the rows it covers so it still lines up under a notch, where the safe-area
   inset pushes the badge row down. */
.miri-locked__hero {
    position: relative;
    padding: 0 20px;
}

.miri-locked__hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: calc(max(14px, env(safe-area-inset-top, 0px)) + 196px);
    background:
        linear-gradient(178.85deg,
            rgba(5, 7, 15, 0.28) 0%,
            rgba(5, 7, 15, 0.05) 30%,
            rgba(7, 10, 24, 0.55) 74%,
            rgb(7, 10, 24) 100%),
        url('/app/ui/assets/img/miri/locked-hero-bg.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.miri-locked__hero > * {
    position: relative;
}

.miri-locked__hero .miri-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: max(14px, env(safe-area-inset-top, 0px));
}

/* 14 (topbar) + 40 (badge row) + 24 + 112 (avatar) + 20 = the 210px band. */
.miri-locked__hero .miri-hero {
    display: flex;
    justify-content: center;
    padding: 24px 0 20px;
}

.miri-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: #ffb547;
    color: #2a1a00;
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        0 0 0 4px rgba(255, 181, 71, 0.22),
        0 6px 18px rgba(255, 181, 71, 0.35);
}

.miri-plan-badge img {
    display: block;
}

/* The avatar keeps the orb's shape but loses the pulsing glow: a locked
   product shouldn't look like it's waiting for input. */
.miri-locked__hero .miri-orb {
    position: relative;
    width: 112px;
    height: 112px;
    border-color: #fff;
    animation: none;
    background:
        radial-gradient(circle at 35% 30%,
            rgba(127, 182, 255, 0.55) 0%,
            rgba(87, 153, 255, 0.45) 30%,
            rgba(46, 123, 255, 0.35) 60%,
            rgba(46, 123, 255, 0.18) 100%);
    box-shadow: 0 16px 44px rgba(46, 123, 255, 0.45);
}

.miri-locked__hero .miri-orb svg {
    width: 40px;
    height: 40px;
}

.miri-orb-lock {
    position: absolute;
    right: 2px;
    bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ff4d5e;
}

.miri-orb-lock img {
    display: block;
}

/* ---- Scrolling body ---- */

/* 22px between every section, 20px above the first and 40px below the last,
   matching the design's y offsets. The sticky bar is ~88px, so the bottom
   padding also clears it. */
.miri-locked__body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 20px calc(128px + env(safe-area-inset-bottom, 0px));
    font-family: var(--font-base);
}

.miri-locked__body > * {
    margin: 0;
}

/* The app's global reset declares `p { margin: 0 !important }` and
   `h1, h2, h3 { margin-bottom: .5rem !important }`. This screen spaces itself
   with flex gap and padding, so the forced heading margin is cleared here;
   leaving it would add 8px under every heading that no margin could remove. */
.miri-locked-view :is(h1, h2, h3) {
    margin-bottom: 0 !important;
}

.ml-eyebrow {
    color: #bfe0ff;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.ml-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 400;
    line-height: 36px;
    color: #fff;
    text-align: center;
}

.ml-title strong {
    font-weight: 700;
}

.ml-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ml-stars {
    display: inline-flex;
    gap: 2px;
}

.ml-stars img {
    display: block;
}

.ml-rating__count {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}

/* The eyebrow, title and rating read as one block, so they sit tighter than
   the 22px that separates the sections. */
.ml-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.miri-plan-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid rgba(255, 181, 71, 0.55);
    border-radius: 24px;
    background: rgba(255, 181, 71, 0.12);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #ffe3b5;
}

.miri-plan-notice img {
    flex: 0 0 auto;
    display: block;
    margin-top: 1px;
}

.miri-plan-notice strong {
    font-weight: 700;
    color: #ffb547;
}

/* The heading belongs to the card below it, closer than the 22px between
   sections. */
.ml-guidance-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ml-section-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

.ml-guidance {
    list-style: none;
    /* The app's global reset gives lists a bottom margin. The gap on
       .ml-guidance-group sets this spacing, so clear it. */
    margin: 0;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ml-guidance li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.ml-guidance li:last-child {
    border-bottom: 0;
}

.ml-guidance__icon {
    position: relative;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
}

.ml-guidance__icon img {
    display: block;
}

/* Centred inside the 26px box, per the design's 5.29% inset. */
.ml-guidance__icon--inset img {
    margin: 1.4px;
}

/* The glyph ships as two groups the design places separately inside one box. */
.ml-guidance__icon--split img {
    position: absolute;
}

.ml-guidance__icon--split .ml-split-a {
    top: 8.44%;
    right: 37.84%;
    bottom: 23.54%;
    left: 0;
}

.ml-guidance__icon--split .ml-split-b {
    top: 8.44%;
    right: 0;
    bottom: 8.44%;
    left: 52.93%;
}

.ml-lede {
    color: rgba(255, 255, 255, 0.74);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
}

.ml-lede strong {
    color: #fff;
    font-weight: 700;
}

/* ---- Pricing card (3268:3212) ---- */

.ml-offer {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: linear-gradient(to bottom, #0a1330 0%, #12224a 100%);
    box-shadow: 0 18px 50px rgba(46, 123, 255, 0.25);
}

.ml-offer__flag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #ffb547;
    color: #2a1a00;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: 0.24px;
    text-transform: uppercase;
}

.ml-offer__flag img {
    display: block;
}

.ml-offer__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px;
}

.ml-offer__discount {
    padding: 5px 11px;
    border-radius: 8px;
    background: #ff4d5e;
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ml-offer__title {
    margin-top: 6px;
    padding-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.ml-offer__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.ml-offer__price s {
    color: #ff6b6b;
    font-size: 19px;
    font-weight: 700;
}

.ml-offer__price b {
    color: #fff;
    font-size: 40px;
    font-weight: 800;
}

.ml-offer__price span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
}

/* Hidden when web2wave's price carries no introductory discount. The attribute
   alone wouldn't do it: the `display` below beats the UA rule for [hidden]. */
.ml-offer__save[hidden] {
    display: none;
}

.ml-offer__save {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(37, 216, 196, 0.4);
    border-radius: 10px;
    background: rgba(37, 216, 196, 0.12);
    color: #5ee7d6;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
}

.ml-offer__save img {
    display: block;
}

.ml-offer__product {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.ml-offer__product-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(140deg, #4c8bff 0%, #25d8c4 100%);
}

.ml-offer__product-icon img {
    display: block;
}

.ml-offer__product-text {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

.ml-offer__product-text strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
}

.ml-offer__features {
    list-style: none;
    width: 100%;
    margin-top: 32px;
    padding: 0;
}

.ml-offer__features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.ml-offer__features li:first-child {
    padding-top: 0;
}

.ml-offer__features li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ml-offer__features img {
    flex: 0 0 auto;
    display: block;
}

.ml-terms {
    padding-top: 24px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-align: center;
}

/* ---- Shared CTAs ---- */

.ml-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(to right, #4c8bff 0%, #25d8c4 100%);
    box-shadow: 0 8px 11px rgba(37, 216, 196, 0.2);
    color: #fff;
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.ml-offer__features + .ml-cta {
    margin-top: 32px;
}

.ml-decline {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}

/* ---- Reviews (3268:3274) ---- */

.ml-reviews {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ml-review {
    display: flex;
    flex-direction: column;
    gap: 8.9px;
    width: 100%;
    margin: 0;
    padding: 22px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.ml-review__who {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ml-review__avatar {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 100px;
    object-fit: cover;
}

.ml-review__who span {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

.ml-review__who strong {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
}

.ml-review__headline {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    color: #fff;
}

.ml-review__body {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.ml-review__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ml-review__foot time {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

/* ---- Comparison table (3268:3302) ---- */

.ml-cmp-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    color: #fff;
    text-align: center;
    margin-bottom: -8px;
}

.ml-cmp {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
}

.ml-cmp__row {
    display: flex;
    align-items: center;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ml-cmp__row--head {
    border-top: 0;
    background: rgba(255, 255, 255, 0.05);
}

.ml-cmp__feature {
    flex: 1 1 0;
    min-width: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.ml-cmp__row--head .ml-cmp__feature,
.ml-cmp__row--head .ml-cmp__col {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    text-transform: uppercase;
}

.ml-cmp__col {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
}

.ml-cmp__row--head .ml-cmp__col--miri {
    color: #52a9ff;
}

.ml-cmp__col img {
    display: block;
}

.ml-cmp__tick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: linear-gradient(140deg, #2e7bff 0%, #52a9ff 100%);
}

/* ---- Closing CTA in the scroll flow (3268:3358) ---- */

.ml-closing {
    display: flex;
    flex-direction: column;
}

/* ---- Sticky bar (3232:1889) ---- */

.miri-locked__sticky {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 12px 12px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 30px 30px 0 0;
    background: #fff;
    box-shadow: 0 -8px 17px rgba(0, 0, 0, 0.28);
}

.miri-chat-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px 12px;
    background: #fff;
    border-bottom: 1px solid #eef0f2;
}

/* Every round control here has a fixed width and height, so none of them may
   shrink: a flex item that gives up width but keeps its height stops being a
   circle, which is how the avatar turned into an oval on a narrow phone. The
   title is the one part that should yield -- it can wrap. */
.miri-chat-header .mc-back,
.miri-chat-header .miri-chat-avatar,
.miri-chat-header .mc-close,
.miri-chat-header .mc-history,
.miri-chat-header .mc-new {
    flex-shrink: 0;
}

.miri-chat-header .mc-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #1e2a28;
    text-decoration: none;
    line-height: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.miri-chat-header .mc-back svg {
    width: 20px;
    height: 20px;
    display: block;
}

.miri-chat-header .mc-back:hover {
    background: #f1f4f4;
}

.miri-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--miri-accent) 0%, var(--miri-blue) 55%, var(--miri-blue-strong) 100%);
    box-shadow: 0 4px 12px rgba(2, 163, 255, 0.35);
}

.miri-chat-avatar svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.miri-chat-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    /* Without this the title's longest word sets a floor on its width, and the
       overflow is taken out of its siblings instead. */
    min-width: 0;
}

.miri-chat-title .mc-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #14201e;
}

.miri-chat-title .mc-status {
    font-size: 0.78rem;
    color: var(--miri-teal);
    font-weight: 500;
}

.miri-chat-header .mc-close {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f4f4;
    color: #4a5654;
    line-height: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.miri-chat-header .mc-close svg {
    width: 16px;
    height: 16px;
    display: block;
}

.miri-chat-header .mc-close:hover {
    background: #e6eaea;
}

.miri-chat-header .mc-history,
.miri-chat-header .mc-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f4f4;
    color: #4a5654;
    line-height: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.miri-chat-header .mc-history svg,
.miri-chat-header .mc-new svg {
    width: 18px;
    height: 18px;
}

.miri-chat-header .mc-history:hover,
.miri-chat-header .mc-new:hover,
.miri-chat-header .mc-history[aria-expanded="true"] {
    background: rgba(25, 130, 230, 0.12);
    color: var(--miri-blue);
}

/* The button cluster owns the right-alignment, so buttons can be added or
   removed without re-teaching a sibling selector where the edge is. */
.miri-chat-header .mc-tools {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- Past chats panel ---------------------------------------------------
   Drops under the chat header, over the messages, so picking an earlier
   conversation doesn't mean leaving the chat. It anchors to .miri-view, which
   is already absolute — don't add `position: relative` to .miri-chat here: it
   wins on order, cancels that inset:0, and the view collapses to the height of
   its content with the navy card showing underneath. */
.miri-history {
    position: absolute;
    /* Just below the header: its padding-top follows the safe-area inset, plus
       a 40px row and 12px of padding under it. */
    top: calc(max(12px, env(safe-area-inset-top, 0px)) + 60px);
    right: 12px;
    left: 12px;
    z-index: 20;
    max-width: 340px;
    margin-left: auto;
    max-height: min(60vh, 420px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7ebeb;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(16, 33, 30, 0.16);
}

.miri-history[hidden] {
    display: none;
}

.miri-history-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #f0f2f2;
}

.miri-history-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e2a28;
}

.miri-history-clear {
    padding: 0;
    border: none;
    background: none;
    font-size: 0.76rem;
    font-weight: 500;
    color: #8a9694;
    cursor: pointer;
    transition: color 0.15s ease;
}

.miri-history-clear:hover,
.miri-history-clear.is-armed {
    color: #d2544a;
}

.miri-history-clear.is-armed {
    font-weight: 600;
}

.miri-history-list {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
}

.miri-history-empty {
    padding: 14px 10px 18px;
    text-align: center;
    font-size: 0.78rem;
    color: #8a9694;
}

.miri-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.miri-history-item:hover {
    background: #f6f8f8;
}

.miri-history-item.is-active {
    background: rgba(25, 130, 230, 0.08);
}

.miri-history-open {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    padding: 9px 4px 9px 10px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.miri-history-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1e2a28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miri-history-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.7rem;
    color: #8a9694;
}

.miri-history-del {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: #a4afad;
    line-height: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.miri-history-del svg {
    width: 15px;
    height: 15px;
}

.miri-history-del:hover {
    background: rgba(210, 84, 74, 0.1);
    color: #d2544a;
}

/* ---- Hover tooltips -----------------------------------------------------
   Icon-only controls say what they do on hover. Pointer-fine only: on touch
   there is no hover, and a sticky bubble after a tap is just in the way. */
@media (hover: hover) and (pointer: fine) {
    [data-mr-tip] {
        position: relative;
    }

    [data-mr-tip]::after {
        content: attr(data-mr-tip);
        position: absolute;
        top: calc(100% + 7px);
        left: 50%;
        transform: translateX(-50%) translateY(-3px);
        z-index: 40;
        padding: 5px 9px;
        border-radius: 8px;
        background: #1e2a28;
        color: #fff;
        font-size: 0.72rem;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.14s ease, transform 0.14s ease;
    }

    [data-mr-tip][data-mr-tip-pos="top"]::after {
        top: auto;
        bottom: calc(100% + 7px);
        transform: translateX(-50%) translateY(3px);
    }

    /* Near the edges of the popup a centred bubble would be clipped. */
    [data-mr-tip][data-mr-tip-align="end"]::after {
        left: auto;
        right: 0;
        transform: translateY(-3px);
    }

    [data-mr-tip][data-mr-tip-align="start"]::after {
        left: 0;
        transform: translateY(-3px);
    }

    [data-mr-tip]:hover::after,
    [data-mr-tip]:focus-visible::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    [data-mr-tip][data-mr-tip-align="end"]:hover::after,
    [data-mr-tip][data-mr-tip-align="end"]:focus-visible::after,
    [data-mr-tip][data-mr-tip-align="start"]:hover::after,
    [data-mr-tip][data-mr-tip-align="start"]:focus-visible::after {
        transform: translateY(0);
    }

    [data-mr-tip][data-mr-tip-pos="top"]:hover::after,
    [data-mr-tip][data-mr-tip-pos="top"]:focus-visible::after {
        transform: translateX(-50%) translateY(0);
    }

    [data-mr-tip][data-mr-tip-pos="top"][data-mr-tip-align="end"]:hover::after,
    [data-mr-tip][data-mr-tip-pos="top"][data-mr-tip-align="end"]:focus-visible::after {
        transform: translateY(0);
    }
}

.miri-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message row = optional avatar + bubble column (with timestamp). */
.miri-row {
    display: flex;
    gap: 10px;
    max-width: 88%;
}

.miri-row.assistant {
    align-self: flex-start;
}

.miri-row.user {
    align-self: flex-end;
    justify-content: flex-end;
}

.miri-msg-avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--miri-accent) 0%, var(--miri-blue) 55%, var(--miri-blue-strong) 100%);
    box-shadow: 0 3px 8px rgba(2, 163, 255, 0.3);
}

.miri-msg-avatar svg {
    width: 17px;
    height: 17px;
    color: #fff;
}

.miri-bubble-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.miri-time {
    font-size: 0.68rem;
    color: #a2adab;
    margin-top: 4px;
    padding: 0 4px;
}

.miri-row.user .miri-time {
    align-self: flex-end;
}

.miri-msg {
    max-width: 100%;
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 0.98rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.miri-msg.assistant {
    background: #fff;
    color: #1e2a28;
    border: none;
    box-shadow: 0 2px 10px rgba(16, 42, 74, 0.07);
    border-bottom-left-radius: 6px;
}

.miri-msg.assistant strong { font-weight: 600; }
.miri-msg.assistant em { font-style: italic; color: var(--miri-blue-strong); }

.miri-msg.user {
    background: linear-gradient(135deg, var(--miri-blue) 0%, var(--miri-blue-strong) 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(25, 130, 230, 0.28);
    border-bottom-right-radius: 6px;
}

.miri-typing {
    display: inline-flex;
    gap: 5px;
    padding: 14px 16px;
    background: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(16, 42, 74, 0.07);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
}

.miri-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b7c0c2;
    animation: miriDot 1.2s infinite ease-in-out;
}

.miri-typing span:nth-child(2) { animation-delay: 0.2s; }
.miri-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes miriDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Recommended in-app sessions (shown beneath an assistant reply) */
.miri-recs {
    align-self: flex-start;
    max-width: 92%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -2px;
    animation: miriRecIn 0.32s ease both;
}

@keyframes miriRecIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.miri-recs-label {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a9694;
    padding-left: 2px;
}

.miri-rec-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 11px;
    background: #fff;
    border: 1px solid #eef2f5;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.miri-rec-card:hover {
    transform: translateY(-1px);
    border-color: rgba(25, 130, 230, 0.4);
    box-shadow: 0 8px 20px rgba(25, 130, 230, 0.18);
}

.miri-rec-card:active { transform: translateY(0); }

.miri-rec-thumb {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    background: #eef2f1;
}

.miri-rec-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.miri-rec-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1e2a28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.miri-rec-meta {
    font-size: 0.74rem;
    color: #8a9694;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miri-rec-play {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 50%;
    background: rgba(2, 163, 255, 0.12);
    fill: var(--miri-blue);
}

/* Assistant turn = bubble + optional session cards + action buttons */
.miri-turn {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Indent cards + actions to line up under the bubble (past the avatar). */
.miri-assistant-turn .miri-recs,
.miri-assistant-turn .miri-actions {
    margin-left: 40px;
}

.miri-msg.assistant.miri-msg-error {
    background: #fff6f5;
    border: 1px solid #f1d4d1;
    box-shadow: none;
    color: #9a4038;
}

.miri-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-self: flex-start;
    padding-left: 2px;
}

.miri-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    background: transparent;
    color: #8a9694;
    border-radius: 12px;
    padding: 5px 9px;
    font-size: 0.76rem;
    font-family: var(--font-base);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.miri-action:hover {
    color: var(--miri-blue);
    background: rgba(25, 130, 230, 0.08);
}

.miri-action.is-copied {
    color: var(--miri-blue);
    background: rgba(25, 130, 230, 0.1);
}

.miri-action-ico {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.miri-action-label {
    line-height: 1;
}

.miri-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 8px;
}

.miri-suggestion {
    border: 1px solid #d5e3f5;
    background: #fff;
    color: var(--miri-blue-strong);
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-family: var(--font-base);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.miri-suggestion:hover {
    background: rgba(25, 130, 230, 0.08);
    border-color: rgba(25, 130, 230, 0.5);
}

.miri-input-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #eef0f2;
}

.miri-input {
    flex: 1 1 auto;
    /* A textarea inherits the page's text colour. The chat panel keeps its
       light background in dark mode, so without an explicit colour here the
       input paints near-white text on a near-white box and whatever you type
       disappears. Same value the assistant bubbles use on this surface. */
    color: #1e2a28;
    caret-color: var(--miri-teal);
    resize: none;
    max-height: 120px;
    min-width: 0;
    /* The box grows with what you type, so it should never show a scrollbar.
       Past max-height it still scrolls, just without the bar. */
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: 1px solid #dde5e4;
    border-radius: 22px;
    padding: 11px 16px;
    font-family: var(--font-base);
    font-size: 0.98rem;
    line-height: 1.4;
    outline: none;
    background: #f6f8f8;
}

.miri-input::-webkit-scrollbar {
    display: none;
}

.miri-input::placeholder {
    color: #8b9a98;
    opacity: 1;
}

.miri-input:focus {
    border-color: var(--miri-teal);
    background: #fff;
}

.miri-send {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--miri-teal-strong);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.miri-send:disabled {
    background: #c2ccca;
    cursor: not-allowed;
}

.miri-send svg {
    width: 22px;
    height: 22px;
    display: block;
    /* optical centering: the paper-plane's visual mass sits up-right */
    transform: translate(-1px, 1px);
}

/* ==========================================================================
   VOICE PICKER
   ========================================================================== */
body.vp-open {
    overflow: hidden;
}

.voice-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(9, 26, 46, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.voice-picker-backdrop[hidden] {
    display: none;
}

.voice-picker-backdrop.is-open {
    opacity: 1;
}

.voice-picker-sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 26px 26px 0 0;
    padding: 26px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    /* Four voices plus the header can outgrow a short phone screen. */
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -12px 40px rgba(9, 26, 46, 0.22);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.voice-picker-backdrop.is-open .voice-picker-sheet {
    transform: translateY(0);
    opacity: 1;
}

.vp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 0;
    border: none;
    border-radius: 50%;
    background: #eef1f4;
    color: #4a5b6b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.vp-close:hover {
    background: #e2e7ec;
    color: #1b2b3a;
}

.vp-close svg {
    width: 16px;
    height: 16px;
}

.vp-head {
    text-align: center;
    margin-bottom: 20px;
}

.vp-badge {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    background: rgba(25, 130, 230, 0.1);
}

.vp-badge svg {
    width: 26px;
    height: 26px;
}

.vp-title {
    font-family: var(--font-base);
    font-size: 1.32rem;
    font-weight: 600 !important;
    line-height: 1.3;
    color: #14202c;
    margin: 0 0 6px !important;
}

.vp-subtitle {
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 400 !important;
    line-height: 1.45;
    color: #64707c;
    margin: 0 auto !important;
    max-width: 340px;
}

.vp-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}

.vp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e7ebef;
    border-radius: 16px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-base);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.vp-option:hover {
    border-color: #cfe0f5;
}

.vp-option.is-selected {
    border-color: var(--primary-light);
    background: rgba(25, 130, 230, 0.06);
    box-shadow: 0 6px 18px rgba(25, 130, 230, 0.12);
}

.vp-preview {
    flex: 0 0 auto;
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(25, 130, 230, 0.1);
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.vp-preview:hover {
    background: rgba(25, 130, 230, 0.18);
}

.vp-preview svg {
    width: 20px;
    height: 20px;
}

.vp-ic-pause {
    display: none;
}

.vp-option .vp-wave {
    display: none;
    align-items: flex-end;
    gap: 2.5px;
    height: 18px;
}

.vp-option .vp-wave i {
    width: 3px;
    background: currentColor;
    border-radius: 2px;
    animation: vpWave 0.9s ease-in-out infinite;
}

.vp-option .vp-wave i:nth-child(1) { height: 8px;  animation-delay: 0s; }
.vp-option .vp-wave i:nth-child(2) { height: 16px; animation-delay: 0.12s; }
.vp-option .vp-wave i:nth-child(3) { height: 11px; animation-delay: 0.24s; }
.vp-option .vp-wave i:nth-child(4) { height: 15px; animation-delay: 0.36s; }

@keyframes vpWave {
    0%, 100% { transform: scaleY(0.4); }
    50%      { transform: scaleY(1); }
}

.vp-option.is-previewing .vp-ic-play { display: none; }
.vp-option.is-previewing .vp-wave { display: inline-flex; }

.vp-option-label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.02rem;
    font-weight: 500;
    color: #1b2b3a;
}

.vp-option-name {
    font-weight: 600;
}

/* Four narrators make a taller list, so each one carries its character in a
   second line rather than a longer label. */
.vp-option-blurb {
    color: #7c8896;
    font-size: 0.88rem;
    font-weight: 400;
}

.vp-option-blurb::before {
    content: "·";
    margin-right: 8px;
}

.vp-gender {
    display: inline-flex;
    color: #8b98a5;
}

.vp-gender svg {
    width: 18px;
    height: 18px;
}

.vp-check {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.vp-check svg {
    width: 14px;
    height: 14px;
}

.vp-option.is-selected .vp-check {
    opacity: 1;
    transform: scale(1);
}

.vp-confirm {
    width: 100%;
    /* On a short screen the four voices scroll inside the sheet; the confirm
       button has to stay in reach. */
    position: sticky;
    bottom: 0;
    border: none;
    border-radius: 999px;
    padding: 15px 20px;
    font-family: var(--font-base);
    font-size: 1.02rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 10px 24px rgba(25, 130, 230, 0.32);
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.vp-confirm:hover {
    filter: brightness(1.04);
}

.vp-confirm:active {
    transform: translateY(1px);
}

@media (min-width: 576px) {
    .voice-picker-backdrop {
        align-items: center;
    }

    .voice-picker-sheet {
        border-radius: 26px;
        transform: translateY(0) scale(0.96);
    }

    .voice-picker-backdrop.is-open .voice-picker-sheet {
        transform: translateY(0) scale(1);
    }
}

/* Settings page */
.settings-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 18px 40px;
}

.settings-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.settings-back {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: #eef1f4;
    color: #1b2b3a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.settings-back:hover {
    background: #e2e7ec;
}

.settings-page-title {
    font-family: var(--font-base);
    font-size: 1.5rem;
    font-weight: 600;
    color: #14202c;
    margin: 0;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Settings: sections + rows (used on the settings page) */
.settings-section {
    margin: 8px 0 24px;
}

.settings-section-title {
    font-family: var(--font-base);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b98a5;
    margin: 0 0 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid #e7ebef;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: inherit;
    font-family: var(--font-base);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-row:hover {
    text-decoration: none;
    color: inherit;
}

.settings-row--danger .settings-row-icon {
    color: #d9534f;
    background: rgba(217, 83, 79, 0.1);
}

.settings-row--danger .settings-row-title {
    color: #d9534f;
}

.settings-row--static {
    cursor: default;
}

.settings-row--static:hover {
    border-color: #e7ebef;
    box-shadow: none;
}

.settings-row--stack {
    flex-wrap: wrap;
}

/* Toggle switch */
.mr-switch {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    width: 46px;
    height: 28px;
    cursor: pointer;
}

.mr-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mr-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d5dbe1;
    transition: background 0.18s ease;
}

.mr-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(9, 26, 46, 0.28);
    transition: transform 0.18s ease;
}

.mr-switch input:checked + .mr-switch-track {
    background: var(--primary-light);
}

.mr-switch input:checked + .mr-switch-track::after {
    transform: translateX(18px);
}

.mr-switch input:focus-visible + .mr-switch-track {
    box-shadow: 0 0 0 3px rgba(25, 130, 230, 0.3);
}

/* Time inputs */
.settings-time-input {
    flex: 0 0 auto;
    font-family: var(--font-base);
    font-size: 0.98rem;
    font-weight: 500;
    color: #1b2b3a;
    border: 1px solid #e7ebef;
    border-radius: 10px;
    padding: 7px 10px;
    background: #f6f8f8;
}

.settings-time-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
}

.settings-quiet {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

.settings-quiet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--font-base);
    font-size: 0.8rem;
    color: #8b98a5;
}

.settings-note {
    min-height: 20px;
    margin: 4px 2px 0 !important;
    font-family: var(--font-base);
    font-size: 0.85rem;
    color: var(--primary-light);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.settings-note.is-visible {
    opacity: 1;
}

/* Manage subscription screen */
.sub-manage-card {
    border: 1px solid #e7ebef;
    border-radius: 16px;
    background: #fff;
    padding: 4px 16px;
}

.sub-manage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef1f4;
}

.sub-manage-row:last-child {
    border-bottom: none;
}

.sub-manage-label {
    font-family: var(--font-base);
    font-size: 0.9rem;
    color: #64707c;
}

.sub-manage-value {
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 600;
    color: #14202c;
    text-align: right;
    word-break: break-word;
}

.sub-status-badge {
    font-family: var(--font-base);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #1f8a4c;
    background: rgba(31, 138, 76, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.sub-status-badge--ended {
    color: #d9534f;
    background: rgba(217, 83, 79, 0.12);
}

.sub-status-badge--canceling {
    color: #c77700;
    background: rgba(199, 119, 0, 0.12);
}

.sub-manage-help {
    margin: 16px 2px 0;
    font-family: var(--font-base);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #8b98a5;
}

.sub-cancel-wrap {
    display: flex;
    justify-content: center;
    margin: 22px 0 8px;
}

.sub-cancel-link {
    font-family: var(--font-base);
    font-size: 0.9rem;
    font-weight: 600;
    color: #d9534f;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.sub-cancel-link:hover {
    background: rgba(217, 83, 79, 0.08);
    color: #d9534f;
}

html[data-theme="dark"] .sub-manage-card {
    background: var(--surface-dark, #1b2733) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-manage-row {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .sub-manage-value {
    color: var(--text-light, #eef2f6) !important;
}

html[data-theme="dark"] .sub-manage-label,
html[data-theme="dark"] .sub-manage-help {
    color: var(--text-muted) !important;
}

.settings-row:hover {
    border-color: #cfe0f5;
    box-shadow: 0 6px 18px rgba(25, 130, 230, 0.1);
}

.settings-row-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    background: rgba(25, 130, 230, 0.1);
}

.settings-row-icon svg {
    width: 22px;
    height: 22px;
}

.settings-row-text {
    flex: 1 1 auto;
    min-width: 0;
}

.settings-row-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1b2b3a;
}

.settings-row-value {
    font-size: 0.88rem;
    color: #64707c;
    margin-top: 2px;
}

.settings-row-chevron {
    flex: 0 0 auto;
    color: #b4bfca;
}

.settings-row-chevron svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Rituals focus switcher (hero) + weekly streak badge
   ========================================================================== */
.rituals-focus {
    text-align: left;
    margin: 0.5rem auto 1.1rem;
    position: relative;
    z-index: 3;
}

.rituals-focus__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.55rem;
}

.rituals-focus__label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.rituals-focus__hint {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
}

.rituals-focus__track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rituals-focus__track::-webkit-scrollbar {
    display: none;
}

.rituals-pill {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 9px 18px;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.rituals-pill:hover {
    background: rgba(255, 255, 255, 0.16);
}

.rituals-pill:active {
    transform: scale(0.97);
}

.rituals-pill.active {
    /* Horizontal, not 135deg: the pill is wide and short, so a diagonal axis
       pushes both end stops off the element and leaves a green band curving
       across each cap. Left to right, both caps land on a flat brand colour. */
    background: linear-gradient(to right, var(--miri-grad-start) 0%, var(--miri-grad-end) 100%);
    border-color: transparent;
    /* Tight: at any real blur this halo reads as a tinted box around the pill
       on the photo hero rather than as depth. */
    box-shadow: 0 4px 1px var(--miri-glow);
    color: #fff;
}

/* Safari draws its own ring when the pill is tapped, and it doesn't follow the
   999px radius, so the pill ends up sitting in a square box. Keyboard users
   still get a ring, as a box-shadow, which every engine rounds correctly. */
.rituals-pill:focus {
    outline: none;
}

.rituals-pill:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.rituals-pill.active:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 4px 1px var(--miri-glow);
}

.welcome-text p.mr-weekly-line {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 1.1rem auto 0.9rem !important;
}

.mr-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.mr-streak-flame {
    font-size: 13px;
    line-height: 1;
}

/* ==========================================================================
   Homepage Miri check-in card
   ========================================================================== */
.miri-checkin {
    position: relative;
    z-index: 4;
    margin: 1.25rem 1rem 0.5rem;
}

.miri-checkin-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(120, 180, 255, 0.32);
    cursor: pointer;
    border-radius: 22px;
    padding: 20px 20px 22px;
    color: #fff;
    font-family: var(--font-base);
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #2f63d6 0%, #2f83c9 52%, #1fa1b2 100%);
    box-shadow: 0 18px 40px rgba(24, 80, 160, 0.30);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.miri-checkin-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.miri-checkin-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(41, 205, 191, 0.45) 0%, rgba(41, 205, 191, 0) 70%);
    pointer-events: none;
}

.miri-checkin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(24, 80, 160, 0.38);
}

.miri-checkin-card:active {
    transform: translateY(0);
}

.miri-checkin-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.miri-checkin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--miri-grad-end) 0%, var(--miri-grad-start) 100%);
    color: #fff;
    flex: 0 0 auto;
}

.miri-checkin-avatar svg {
    width: 18px;
    height: 18px;
}

.miri-checkin-name {
    font-weight: 700;
    font-size: 16px;
}

.miri-checkin-chip {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 3px 10px;
}

.miri-checkin-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 6px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.miri-checkin-sub {
    display: block;
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.miri-checkin-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--miri-grad-start) 0%, var(--miri-grad-end) 100%);
    border-radius: 999px;
    padding: 13px 22px;
    box-shadow: 0 10px 24px rgba(41, 150, 205, 0.45);
    position: relative;
    z-index: 1;
}

.miri-checkin-cta svg {
    width: 18px;
    height: 18px;
    transform: translateY(0.5px);
}

/* Tablet: scale up the focus switcher, streak badge and check-in card so they
   match the surrounding hero typography instead of looking cramped. */
@media (min-width: 768px) and (max-width: 1199px) {
    .rituals-focus {
        margin: 0.75rem auto 1.35rem;
    }
    .rituals-focus__label {
        font-size: 18px;
    }
    .rituals-focus__hint {
        font-size: 15px;
    }
    .rituals-pill {
        font-size: 16px;
        padding: 11px 24px;
    }
    .welcome-text p.mr-weekly-line {
        font-size: 20px !important;
        margin: 1.25rem auto 1rem !important;
    }
    .mr-streak-badge {
        font-size: 15px;
        padding: 6px 15px;
    }
    .mr-streak-flame {
        font-size: 15px;
    }
    .miri-checkin {
        max-width: 440px;
        margin: 1.5rem auto 0.5rem;
    }
    .miri-checkin-title {
        font-size: 23px;
    }
    .miri-checkin-sub {
        font-size: 16px;
    }
    .miri-checkin-cta {
        font-size: 16px;
        padding: 14px 24px;
    }
}

/* Desktop: full hero width + large type to sit alongside the 64px headings. */
@media (min-width: 1200px) {
    .rituals-focus {
        margin: 1rem auto 1.9rem;
    }
    .rituals-focus__head {
        margin-bottom: 0.85rem;
    }
    .rituals-focus__label {
        font-size: 26px;
    }
    .rituals-focus__hint {
        font-size: 18px;
    }
    .rituals-pill {
        font-size: 19px;
        padding: 14px 30px;
    }
    .welcome-text p.mr-weekly-line {
        margin: 1.5rem auto 1.1rem !important;
    }
    .mr-streak-badge {
        font-size: 18px;
        padding: 9px 20px;
        gap: 9px;
    }
    .mr-streak-flame {
        font-size: 18px;
    }
    .miri-checkin {
        max-width: 1200px;
        margin: 1.75rem auto 0.75rem;
    }
    .miri-checkin-card {
        padding: 28px 30px 30px;
        border-radius: 26px;
    }
    .miri-checkin-head {
        margin-bottom: 18px;
        gap: 12px;
    }
    .miri-checkin-avatar {
        width: 44px;
        height: 44px;
    }
    .miri-checkin-avatar svg {
        width: 22px;
        height: 22px;
    }
    .miri-checkin-name {
        font-size: 20px;
    }
    .miri-checkin-chip {
        font-size: 14px;
        padding: 4px 12px;
    }
    .miri-checkin-title {
        font-size: 30px;
        margin-bottom: 8px;
    }
    .miri-checkin-sub {
        font-size: 18px;
        margin-bottom: 20px;
        max-width: 640px;
    }
    .miri-checkin-cta {
        display: inline-flex;
        width: auto;
        min-width: 260px;
        font-size: 18px;
        padding: 16px 32px;
    }
}

/* Homepage hero: photo stays for the greeting up top, then the backdrop darkens
   into a near-solid panel so the focus switcher, stats and Miri check-in card
   read as one cohesive dark section — before fading to white for "Handpicked". */
body.page-home .app-header {
    padding-bottom: 2.5rem;
}

body.page-home .background-image {
    background-image:
        linear-gradient(180deg,
            rgba(9, 15, 28, 0.28) 0%,
            rgba(9, 15, 28, 0.62) 42%,
            rgba(9, 15, 28, 0.92) 72%,
            rgba(9, 15, 28, 0.97) 100%),
        url('/app/ui/assets/img/header.png') !important;
    background-color: #090f1c !important;
}

body.page-home .app-header::after {
    height: 56px !important;
    background: linear-gradient(to top, var(--bg-light), rgba(255, 255, 255, 0)) !important;
}

/* ============================================================= */
/* === Dark theme — design-system "Ink / Navy" ================= */
/* Applied via <html data-theme="dark">. Most colours flow through the      */
/* variable flip below; the rest override surfaces hard-coded to white.     */
/* ============================================================= */
html[data-theme="dark"] {
    color-scheme: dark;

    /* Brand / accents shift to the brighter on-dark blues + teal. */
    --primary: #4C8BFF;
    --primary-light: #52A9FF;
    --secondary: #12224A;
    --accent: #52A9FF;

    /* Text */
    --text-dark: #F1F3F6;   /* Gray 100 — primary text on dark */
    --text-light: #ffffff;
    --text-muted: #9AA3B2;  /* Gray 500 */
    --text-subtle: #b7c2d4;

    /* Base background = Ink / Navy */
    --bg-light: #0A1330;
    --bg-dark: #060b1c;

    /* Shadows read deeper on dark */
    --shadow-weak: rgba(0, 0, 0, 0.35);
    --shadow-medium: rgba(0, 0, 0, 0.45);
    --shadow-strong: rgba(0, 0, 0, 0.6);

    /* New surface tokens (used by the overrides below) */
    --surface: #12224A;          /* Navy Surface — cards, sheets, rows */
    --surface-2: #0d1836;        /* slightly deeper — nav, footer */
    --surface-border: rgba(255, 255, 255, 0.09);
    --surface-input: #0f1c40;
}

/* Card / sheet / row surfaces that are hard-coded white in light mode. */
html[data-theme="dark"] .stats-summary,
html[data-theme="dark"] .recommended-card,
html[data-theme="dark"] .journey-card,
html[data-theme="dark"] .quick-session-card,
html[data-theme="dark"] .bw-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .notification-card,
html[data-theme="dark"] .resume-modal,
html[data-theme="dark"] .info-modal,
html[data-theme="dark"] .voice-picker-sheet,
html[data-theme="dark"] .vp-option,
html[data-theme="dark"] .settings-row,
html[data-theme="dark"] .drawer-content {
    background: var(--surface) !important;
    color: var(--text-dark) !important;
    border-color: var(--surface-border) !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45) !important;
}

/* Bottom navigation: the design keeps it a light floating bar even in dark mode,
   so we intentionally leave it white (base styles) rather than darkening it. */

/* Settings page chrome. */
html[data-theme="dark"] .settings-page {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .settings-section-title {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .settings-row-value,
html[data-theme="dark"] .settings-row-icon {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .settings-row-icon {
    background: rgba(255, 255, 255, 0.06) !important;
}
/* The light-theme danger red only reaches 3.9:1 on the dark surface, so the
   destructive rows get a lifted red instead of inheriting the body text colour. */
html[data-theme="dark"] .settings-row--danger .settings-row-title,
html[data-theme="dark"] .settings-row--danger .settings-row-icon {
    color: #ff8a80 !important;
}
html[data-theme="dark"] .settings-row--danger .settings-row-icon {
    background: rgba(255, 138, 128, 0.14) !important;
}
html[data-theme="dark"] .settings-row:hover,
html[data-theme="dark"] .vp-option:hover {
    border-color: var(--primary-light) !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55) !important;
}

/* Notification/settings time inputs + toggle off-state. */
html[data-theme="dark"] .settings-time-input {
    background: var(--surface-input) !important;
    color: var(--text-dark) !important;
    border-color: var(--surface-border) !important;
}
html[data-theme="dark"] .mr-switch-track {
    background: rgba(255, 255, 255, 0.18) !important;
}

/* Section headings + generic card titles stay readable on dark. */
html[data-theme="dark"] .section-heading h5,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .settings-page-title,
html[data-theme="dark"] .settings-row:not(.settings-row--danger) .settings-row-title,
html[data-theme="dark"] .stat-box .stat-value,
html[data-theme="dark"] .stat-box {
    color: var(--text-dark) !important;
}

/* Panels that deliberately keep a hardcoded light background in dark mode:
   .about-section and .session-cards-section are #fff, .btn-secondary is #f0f0f0.
   Their siblings use literal ink colours, but these three took
   color: var(--text-dark), which flips to near-white on dark and vanishes. */
html[data-theme="dark"] .about-section h2,
html[data-theme="dark"] .empty-state h3,
html[data-theme="dark"] .btn-secondary {
    color: #1b2b3a !important;
}

/* Bootstrap utility surfaces occasionally used inline. */
html[data-theme="dark"] .bg-white {
    background-color: var(--surface) !important;
}
html[data-theme="dark"] .text-dark {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* Selected voice option keeps the accent tint but on a dark base. */
html[data-theme="dark"] .vp-option.is-selected,
html[data-theme="dark"] .vp-option[aria-checked="true"] {
    background: rgba(76, 139, 255, 0.16) !important;
    border-color: var(--primary-light) !important;
}

/* Footer: drop the photographic backdrop for a clean Ink/Navy in dark mode. */
html[data-theme="dark"] .app-footer {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .app-footer .background-image {
    background-image: linear-gradient(180deg, #0d1a3d 0%, #0A1330 100%) !important;
}
/* The footer is solid Ink/Navy in dark mode, so the top "fade into footer"
   overlay is not needed — and it was painting over the mantra card's label
   (it's a z-index:2 sibling above .footer-content's z-index:1 stacking context). */
html[data-theme="dark"] .app-footer::before {
    display: none !important;
}

/* Mantra of the moment → a distinct Navy Surface card (matches the design mock). */
html[data-theme="dark"] .quote-section {
    position: relative !important;
    /* Sit above the footer's top fade overlay (.app-footer::before is z-index 2)
       so the "MANTRA OF THE MOMENT" label isn't clipped by it. */
    z-index: 3 !important;
    background: linear-gradient(150deg, #14264f 0%, #0e1c40 100%) !important;
    border: 1px solid var(--surface-border) !important;
    border-radius: 22px !important;
    padding: 30px 26px !important;
    max-width: 620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .quote-section .quote-label {
    color: var(--primary-light) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.14em !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}
html[data-theme="dark"] .quote-section blockquote {
    font-size: 24px !important;
    line-height: 1.32 !important;
}
html[data-theme="dark"] .quote-section .quote-attribution {
    color: var(--text-muted) !important;
    font-size: 15px !important;
}

/* Primary CTAs use the design-system action gradient (blue → teal) on dark. */
html[data-theme="dark"] .recommended-card .btn,
html[data-theme="dark"] .journey-card-button,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .subscription-claim-button {
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
}

/* -------------------------------------------------------------------------- */
/* Text INSIDE surfaces we darkened above was authored for a white sheet      */
/* (hard-coded #000 / #072744 / #666 …). Re-light it so it stays readable.    */
/* -------------------------------------------------------------------------- */

/* Voice picker sheet */
html[data-theme="dark"] .vp-title {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .vp-subtitle,
html[data-theme="dark"] .vp-gender {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .vp-option-label {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .vp-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .vp-close:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: var(--text-dark) !important;
}

/* Resume / info modals */
html[data-theme="dark"] .resume-modal h3,
html[data-theme="dark"] .info-modal h3,
html[data-theme="dark"] .info-modal p,
html[data-theme="dark"] .info-modal #infoContent p {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .resume-modal p {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .resume-modal .btn-restart {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-dark) !important;
}

/* Subscription plan cards */
html[data-theme="dark"] .plan-name,
html[data-theme="dark"] .plan-price {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .plan-per-month,
html[data-theme="dark"] .plan-billing {
    color: var(--text-muted) !important;
}

/* Notifications list cards */
html[data-theme="dark"] .notification-card,
html[data-theme="dark"] .notification-card h1,
html[data-theme="dark"] .notification-card h2,
html[data-theme="dark"] .notification-card h3,
html[data-theme="dark"] .notification-card h4,
html[data-theme="dark"] .notification-card p {
    color: var(--text-dark) !important;
}
html[data-theme="dark"] .notification-card .time-info,
html[data-theme="dark"] .time-info {
    color: var(--text-muted) !important;
}

/* Drawer / slide-out menu */
html[data-theme="dark"] .drawer-content,
html[data-theme="dark"] .drawer-content a,
html[data-theme="dark"] .drawer-content .drawer-item,
html[data-theme="dark"] .drawer-content span,
html[data-theme="dark"] .drawer-content p {
    color: var(--text-dark) !important;
}

/* ========================================================================== */
/* Program page (Quit Drinking and the programs sharing its renderer)         */
/* ========================================================================== */

.qd-page {
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* ---- Hero ---------------------------------------------------------------- */
.qd-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 0;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
}

.qd-hero-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}

.qd-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(9, 20, 48, 0.10) 0%, rgba(9, 20, 48, 0.55) 55%, rgba(9, 20, 48, 0.92) 100%),
        linear-gradient(90deg, rgba(27, 77, 163, 0.35), rgba(2, 163, 255, 0.10));
}

.qd-back {
    position: absolute !important;
    top: 18px;
    left: 16px;
    z-index: 4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.qd-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 22px 28px;
}

.qd-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 6px;
    opacity: 0.9;
    color: #cfe0ff;
}

.qd-title {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: clamp(30px, 5vw, 48px) !important;
    line-height: 1.05 !important;
    margin: 0 0 8px !important;
    color: #fff !important;
}

.qd-lede {
    margin: 0 0 18px;
    font-size: 15px;
    max-width: 520px;
    opacity: 0.92;
}

.qd-hero-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.qd-progress {
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 420px;
}

.qd-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    margin-bottom: 7px;
}

.qd-progress-bar span {
    display: block;
    height: 100%;
    width: 4%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
    transition: width 0.5s ease;
}

.qd-progress-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.qd-streak {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 600;
}

.qd-streak-flame {
    font-size: 15px;
}

.qd-voice-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--secondary);
    border: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.qd-voice-chip strong {
    font-weight: 700;
}

.qd-voice-chip-caret {
    font-size: 12px;
    opacity: 0.6;
}

/* ---- Body / sections ----------------------------------------------------- */
.qd-body {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 18px 0;
}

.qd-loading {
    text-align: center;
    color: var(--text-subtle);
    padding: 60px 0;
}

.qd-spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(27, 77, 163, 0.18);
    border-top-color: var(--primary-light);
    margin: 0 auto 12px;
    animation: qd-spin 0.8s linear infinite;
}

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

.qd-error {
    text-align: center;
    color: var(--text-subtle);
    padding: 50px 0;
}

/* "View more programs" link out to the full catalogue. */
.qd-more {
    display: flex;
    justify-content: center;
    margin: 8px 0 40px;
}

.qd-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1.5px solid var(--primary, #4c8bff);
    color: var(--primary, #4c8bff);
    background: transparent;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.qd-more-btn:hover {
    background: var(--primary, #4c8bff);
    color: #fff;
}

.qd-section {
    margin-bottom: 30px;
}

/* Brief highlight when arriving via the Boosters tab (?view=boosters). */
.qd-section.qd-boosters {
    scroll-margin-top: 84px;
    border-radius: 22px;
    transition: box-shadow 0.5s ease, background-color 0.5s ease;
}
.qd-section.qd-boosters--focus {
    background-color: rgba(76, 139, 255, 0.06);
    box-shadow: 0 0 0 2px rgba(76, 139, 255, 0.35);
}

/* The track someone bought on: it waits for the core plan like any other, so
   it reads as theirs without looking available. */
.qd-section.qd-addon--mine .qd-section-note {
    color: var(--primary-light);
    font-weight: 600;
}

.qd-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.qd-section-title {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 22px !important;
    margin: 0 !important;
    color: var(--text-dark);
}

.qd-week-arc {
    font-size: 14px;
    color: var(--primary-light);
    font-weight: 600;
}

.qd-section-note {
    font-size: 13.5px;
    color: var(--text-subtle);
}

.qd-week-count {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-subtle);
    background: rgba(27, 77, 163, 0.08);
    padding: 4px 11px;
    border-radius: 999px;
}

.qd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.qd-grid--intro {
    grid-template-columns: repeat(2, 1fr);
}

/* ---- Cards --------------------------------------------------------------- */
.qd-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    border: none;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px var(--shadow-medium);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.qd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.qd-card-media {
    position: relative;
    height: 138px;
    background-size: cover;
    background-position: center;
    background-color: #dfe6f2;
}

.qd-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(9, 20, 48, 0.55);
    backdrop-filter: blur(4px);
    padding: 4px 9px;
    border-radius: 999px;
}

.qd-card-check,
.qd-card-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.qd-card-check {
    background: linear-gradient(135deg, #4C8BFF, #25D8C4);
}

.qd-card-lock {
    background: rgba(9, 20, 48, 0.6);
    backdrop-filter: blur(4px);
}

.qd-card-body {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.qd-card-title {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 17px;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.2;
}

.qd-card-meta {
    font-size: 13px;
    color: var(--text-subtle);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    flex: 1;
}

.qd-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qd-card-dur {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qd-card-cta {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
    padding: 7px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.qd-card-cta--muted {
    background: rgba(9, 20, 48, 0.06);
    color: var(--text-muted);
}

/* Current (next up) card gets a highlighted ring */
.qd-card.is-current {
    box-shadow: 0 0 0 2px var(--primary-light), 0 14px 30px rgba(25, 130, 230, 0.22);
}

/* Locked cards read as dimmed / non-urgent */
.qd-card.is-locked {
    box-shadow: 0 6px 16px var(--shadow-weak);
}

.qd-card.is-locked .qd-card-media {
    filter: grayscale(0.4) brightness(0.82);
}

.qd-card.is-locked .qd-card-title {
    color: var(--text-subtle);
}

.qd-card.is-locked:hover {
    transform: translateY(-1px);
}

/* ---- Locked popup -------------------------------------------------------- */
.qd-locked {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(9, 20, 48, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.qd-locked.is-open {
    opacity: 1;
}

.qd-locked-card {
    background: #fff;
    border-radius: 22px;
    padding: 30px 26px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(12px);
    transition: transform 0.2s ease;
}

.qd-locked.is-open .qd-locked-card {
    transform: translateY(0);
}

.qd-locked-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, #4C8BFF, #25D8C4);
}

.qd-locked-title {
    font-family: var(--font-heading) !important;
    font-size: 20px !important;
    margin: 0 0 8px !important;
    color: var(--text-dark);
}

.qd-locked-text {
    font-size: 14.5px;
    color: var(--text-subtle);
    /* The global `p { margin: 0 !important }` eats this otherwise. */
    margin: 0 0 22px !important;
    line-height: 1.45;
}

.qd-locked-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
}

/* ---- Voice picker sheet (4 voices) --------------------------------------- */
.qd-vp {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(9, 20, 48, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.qd-vp.is-open {
    opacity: 1;
}

.qd-vp-sheet {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 460px;
    border-radius: 24px 24px 0 0;
    padding: 26px 22px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.qd-vp.is-open .qd-vp-sheet {
    transform: translateY(0);
}

.qd-vp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(9, 20, 48, 0.06);
    color: var(--text-subtle);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qd-vp-title {
    font-family: var(--font-heading) !important;
    font-size: 22px !important;
    margin: 0 0 6px !important;
    color: var(--text-dark);
}

.qd-vp-sub {
    font-size: 13.5px;
    color: var(--text-subtle);
    margin: 0 0 18px;
    max-width: 90%;
}

.qd-vp-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.qd-vp-option {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1.5px solid rgba(9, 20, 48, 0.08);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.qd-vp-option.is-selected {
    border-color: var(--primary-light);
    background: rgba(25, 130, 230, 0.06);
}

.qd-vp-preview {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4C8BFF, #25D8C4);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.qd-vp-preview .bi-play-fill {
    margin-left: 2px;
}

.qd-vp-preview .bi-pause-fill {
    display: none;
}

.qd-vp-option.is-previewing .qd-vp-preview .bi-play-fill {
    display: none;
}

.qd-vp-option.is-previewing .qd-vp-preview .bi-pause-fill {
    display: inline-block;
    margin-left: 0;
}

.qd-vp-option.is-previewing .qd-vp-preview {
    animation: qd-pulse 1.1s ease-in-out infinite;
}

@keyframes qd-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 216, 196, 0.5);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(37, 216, 196, 0);
    }
}

.qd-vp-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.qd-vp-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}

.qd-vp-gender {
    font-size: 12.5px;
    color: var(--text-muted);
}

.qd-vp-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(9, 20, 48, 0.18);
    flex-shrink: 0;
    position: relative;
}

.qd-vp-option.is-selected .qd-vp-radio {
    border-color: var(--primary-light);
}

.qd-vp-option.is-selected .qd-vp-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--primary-light);
}

.qd-vp-confirm {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 14px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(90deg, #4C8BFF 0%, #25D8C4 100%);
}

body.qd-vp-open {
    overflow: hidden;
}

/* ---- Responsive ---------------------------------------------------------- */
/* Desktop / wide: use the extra width instead of leaving gaps. */
@media (min-width: 768px) {
    .qd-hero {
        min-height: 380px;
    }
    .qd-hero-content {
        padding: 30px 24px 34px;
    }
    /* Keep progress + streak grouped on the left instead of the streak chip
       floating to the far edge of the wide hero. */
    .qd-hero-stats {
        max-width: 640px;
    }
    .qd-progress {
        flex: 0 1 360px;
    }
    /* "Begin here" becomes a full-width banner (image left, copy right) so a
       single intro card no longer leaves an empty half-column on desktop. */
    .qd-grid--intro {
        grid-template-columns: 1fr;
    }
    .qd-grid--intro .qd-card {
        flex-direction: row;
        align-items: stretch;
    }
    .qd-grid--intro .qd-card-media {
        width: 340px;
        height: auto;
        min-height: 190px;
        flex-shrink: 0;
    }
    .qd-grid--intro .qd-card-body {
        justify-content: center;
        padding: 22px 28px;
    }
    .qd-grid--intro .qd-card-title {
        font-size: 21px;
    }
    .qd-grid--intro .qd-card-meta {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        font-size: 14px;
        max-width: 620px;
    }
}

@media (max-width: 860px) {
    .qd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .qd-hero {
        min-height: 300px;
    }
    .qd-hero-content {
        padding-top: 64px;
    }
    .qd-grid,
    .qd-grid--intro {
        grid-template-columns: 1fr;
    }
    .qd-week-count {
        margin-left: 0;
    }
    .qd-card {
        flex-direction: row;
    }
    .qd-card-media {
        width: 116px;
        height: auto;
        min-height: 118px;
        flex-shrink: 0;
    }
    .qd-card-badge {
        font-size: 10px;
        padding: 3px 7px;
    }
}

/* ---- Dark theme ---------------------------------------------------------- */
html[data-theme="dark"] .qd-page {
    background: var(--bg-light);
}

html[data-theme="dark"] .qd-section-title,
html[data-theme="dark"] .qd-card-title,
html[data-theme="dark"] .qd-locked-title,
html[data-theme="dark"] .qd-vp-title,
html[data-theme="dark"] .qd-vp-name {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .qd-card,
html[data-theme="dark"] .qd-locked-card,
html[data-theme="dark"] .qd-vp-sheet {
    background: var(--surface, #12224A) !important;
}

html[data-theme="dark"] .qd-card-cta--muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

html[data-theme="dark"] .qd-week-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

html[data-theme="dark"] .qd-vp-option {
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .qd-vp-option.is-selected {
    background: rgba(76, 139, 255, 0.16);
}

html[data-theme="dark"] .qd-vp-close {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

html[data-theme="dark"] .qd-voice-chip {
    background: rgba(255, 255, 255, 0.92);
    color: var(--secondary);
}

/* ============================================================================
   Shared toast + locked-session popup + coming-soon pill (mrToast/mrShowLocked)
   ============================================================================ */
#mrToastHost {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.mr-toast {
    max-width: min(88vw, 420px);
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    padding: 11px 18px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.mr-toast.is-in {
    opacity: 1;
    transform: translateY(0);
}

.mr-locked-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 14, 30, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mr-locked-backdrop.is-open {
    opacity: 1;
}

.mr-locked-card {
    width: min(100%, 360px);
    background: #fff;
    border-radius: 22px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(6, 12, 34, 0.32);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.mr-locked-backdrop.is-open .mr-locked-card {
    transform: translateY(0) scale(1);
}

.mr-locked-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-size: 24px;
    margin-bottom: 14px;
}

.mr-locked-title {
    font-family: var(--font-heading, var(--font-base));
    font-size: 20px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 8px;
}

.mr-locked-text {
    font-family: var(--font-base);
    font-size: 14.5px;
    line-height: 1.5;
    color: #475467;
    /* The global `p { margin: 0 !important }` eats this otherwise. */
    margin: 0 0 22px !important;
}

.mr-locked-ok {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px 18px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

html[data-theme="dark"] .mr-locked-card {
    background: var(--surface, #12224A);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .mr-locked-title {
    color: #fff;
}

html[data-theme="dark"] .mr-locked-text {
    color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

/* Focus pills / journey cards that aren't live yet */
.rituals-pill.is-soon {
    opacity: 0.55;
}

.rituals-pill.is-soon.active {
    opacity: 1;
}
/* Downloads screen: storage summary, stored-session rows, and the download
   control that appears on session rows elsewhere in the app. */
.mr-downloads-summary {
    padding: 16px;
    border: 1px solid #e7ebef;
    border-radius: 16px;
    background: #fff;
}

.mr-downloads-summary-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.mr-downloads-size {
    font-family: var(--font-base);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.mr-downloads-count {
    font-family: var(--font-base);
    font-size: 0.85rem;
    color: #6b7785;
}

.mr-downloads-bar {
    display: block;
    height: 6px;
    margin: 12px 0 10px;
    border-radius: 999px;
    background: #eef1f4;
    overflow: hidden;
}

.mr-downloads-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.mr-downloads-note {
    margin: 0;
    font-family: var(--font-base);
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6b7785;
}

.mr-downloads-empty {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed #d8dee5;
    border-radius: 16px;
    font-family: var(--font-base);
    font-size: 0.85rem;
    color: #6b7785;
}

/* Stack the title above the size on download rows.
   The hand-written settings rows read as "Title subtitle" on one line because
   the EJS leaves a whitespace text node between the two spans. These rows are
   built in JS with appendChild, so there is no such space and the two ran
   together ("Meeting the Urgequit-drinking"). Stacking is also simply better
   for a file list, where the name is what you scan down. */
.mr-download-row .settings-row-text {
    display: flex;
    flex-direction: column;
}

.mr-download-row .settings-row-value {
    font-variant-numeric: tabular-nums;
}

/* The row is a link to the player plus a separate remove button, so the tap
   target is the link rather than the whole row. */
.mr-download-open {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.mr-download-open:hover,
.mr-download-open:focus {
    color: inherit;
    text-decoration: none;
}

.mr-download-play {
    color: #1b4da3;
    background: rgba(27, 77, 163, 0.12);
}

.mr-download-remove {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(217, 83, 79, 0.1);
    color: #d9534f;
    cursor: pointer;
}

.mr-download-remove:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Download control on a session row. The ring is the progress indicator: the
   conic gradient is driven by --mr-dl-progress from the JS. */
.mr-dl-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(27, 77, 163, 0.1);
    color: var(--primary);
    cursor: pointer;
    font-size: 0.95rem;
}

.mr-dl-btn.is-downloading {
    background: conic-gradient(var(--primary) calc(var(--mr-dl-progress, 0) * 1%), rgba(27, 77, 163, 0.12) 0);
}

.mr-dl-btn.is-done {
    background: rgba(32, 150, 100, 0.12);
    color: #1f8a5f;
}

.mr-dl-btn:disabled {
    cursor: default;
}

/* The player's transport Download button, in the same three states as the
   card control above. It is an <img> at rest, so the states swap the button's
   contents rather than restyling a glyph -- which means colouring the icon
   itself, since `.action-icon i` paints every transport glyph white.
   One green for both themes: the player bar is dark either way. */

/* Progress is a bar under the icon rather than the card control's ring,
   because this button has no fixed size: it is only as big as its contents, so
   a 50% radius gives an egg and not a circle. For the same reason the icon
   itself must not change while downloading -- a differently shaped glyph
   resizes the button and shifts every other control in the row. */
#downloadButton.is-downloading {
    position: relative;
}

#downloadButton.is-downloading img {
    opacity: 0.4;
}

#downloadButton.is-downloading::before,
#downloadButton.is-downloading::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 1px;
    height: 3px;
    border-radius: 3px;
}

#downloadButton.is-downloading::before {
    background: rgba(255, 255, 255, 0.25);
}

#downloadButton.is-downloading::after {
    background: #4ade80;
    /* A fraction, so scaleX can take it directly. The card control's ring
       wants a percentage instead, which is why the two differ. */
    transform: scaleX(var(--mr-dl-progress, 0));
    transform-origin: left center;
    transition: transform 0.2s linear;
}

#downloadButton.is-done i {
    color: #4ade80;
}

/* The saved mark is an inline <svg>, which has no intrinsic size, so it is
   pinned to the box the arrow's <img> renders at. Matching it exactly matters:
   the button is only as wide as its contents, so a mark of a different size
   would nudge the whole transport row when the state changed. */
#downloadButton.is-done {
    color: #4ade80;
}

#downloadButton.is-done svg {
    width: 31px;
    height: 23px;
}

.mr-dl-btn.is-done svg {
    height: 15px;
    width: auto;
}

/* Offline banner, shown when the device has no connection. */
.mr-offline-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff4e5;
    color: #8a5a00;
    font-family: var(--font-base);
    font-size: 0.85rem;
    text-align: center;
    justify-content: center;
}

html[data-theme="dark"] .mr-downloads-summary,
html[data-theme="dark"] .mr-downloads-empty {
    background: var(--surface, rgba(255, 255, 255, 0.04)) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .mr-downloads-count,
html[data-theme="dark"] .mr-downloads-note,
html[data-theme="dark"] .mr-downloads-empty {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .mr-downloads-bar {
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .mr-download-play {
    color: #8ab4f8 !important;
    background: rgba(138, 180, 248, 0.16) !important;
}

html[data-theme="dark"] .mr-offline-banner {
    background: rgba(255, 184, 77, 0.14) !important;
    color: #ffcc80 !important;
}

/* The same bar as the offline notice, in the colour of something that needs
   doing rather than something to be aware of: it only ever appears because a
   tap failed, and it carries the way out of that.

   Fixed, and over the navigation rather than under it. In the flow it sat
   behind the player's own header -- which is fixed at z-index 1000 -- so it
   was perfectly rendered and completely invisible. Covering the brand bar for
   as long as this is up is the cost of that, which is what the dismiss is
   for. */
.mr-playback-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fdecec;
    color: #8a1f1f;
    font-family: var(--font-base);
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: left;
}

/* Current engines mark the rule behind [hidden] as important, so this is
   belt and braces -- for the older WebViews, where the display above would
   win and the bar would never go away. */
.mr-playback-alert[hidden] {
    display: none;
}

.mr-playback-action {
    flex: 0 0 auto;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.mr-playback-dismiss {
    flex: 0 0 auto;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
}

/* Solid rather than a tint: the player page's body is black, and sixteen per
   cent of anything on black is not a warning, it is a smudge. */
html[data-theme="dark"] .mr-playback-alert {
    background: #4a1b1b !important;
    color: #ffdada !important;
}

/* Program cards are <button> elements, so the download control is overlaid as
   a sibling rather than nested inside them.
   
   The wrapper has to sit flush with the card it holds: the cards live in a
   grid and some (the intro) are narrower than their track, so a block-level
   wrapper stretched to the full column and left the absolutely-positioned
   control floating in the gap beside the card. `width: fit-content` with the
   card still filling it keeps the two the same size in every row. */
.mr-card-wrap {
    position: relative;
    display: flex;
    width: 100%;
}

.mr-card-wrap > .qd-card {
    flex: 1 1 auto;
    min-width: 0;
}

/* Bottom-left, because the top-right corner already belongs to the completion
   check and the lock badge (both `top: 10px; right: 10px`), and bottom-right is
   where the Play CTA sits. */
.mr-card-wrap > .mr-dl-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .mr-card-wrap > .mr-dl-btn {
    background: rgba(16, 24, 48, 0.9) !important;
}

/* Offline: a session with no stored audio cannot play, so it reads as
   unavailable rather than looking normal and failing on tap. */
.qd-card.is-offline-unavailable {
    opacity: 0.45;
}

/* The count makes this the one drawer link with three things on its line, and
   an inline-flex badge sits on the text baseline rather than on the text's
   centre -- 1.8px below the icon next to it. Laying the link out as a flex row
   aligns all three exactly, and keeps them aligned if the badge's type size
   ever changes, which `vertical-align` would not. */
#drawerDownloadsLink {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Count of stored sessions, on the drawer's Downloads link. */
.mr-drawer-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* --------------------------------------------------------------- Breathwork
   Breathwork is a shelf, not a path: four goals, and sessions you take off it
   when you need them. A goal carries a photograph and two colours, set per
   element by the catalogue as --bw-image, --bw-from and --bw-to. The colours
   take the picture's place wherever --bw-image is unset -- which is what a
   session with no artwork of its own looks like.

   Sessions are drawn the way the sessions grid elsewhere in the app is: a
   white card, the photograph uncovered, and the name underneath it rather
   than over it. Only the headers and the goal tiles put words on a picture,
   and those carry a scrim to hold the contrast. */
.bw-page {
    background: var(--bg-light);
    padding-bottom: 2rem;
}

.bw-hero {
    position: relative;
    overflow: hidden;
    /* Deep enough to read as a photograph rather than a coloured strip, with
       the words gathered at the bottom as the other headers in the app do. */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 210px;
    padding: 3.4rem 1.25rem 1.4rem;
    /* The hub's own picture. A goal page overrides it inline with that
       goal's. */
    --bw-image: url('/app/ui/assets/img/breathwork/breathwork.webp');
    background-color: var(--bw-to, #1E4E8C);
    color: var(--text-light);
}

/* The picture, in a layer of its own so it can drift. Inset past the edges,
   because a photograph that grows has to come from somewhere. */
.bw-hero::before {
    content: '';
    position: absolute;
    inset: -3%;
    background-image: var(--bw-image, linear-gradient(135deg, var(--bw-from, #4F9BD9), var(--bw-to, #1E4E8C)));
    background-size: cover;
    background-position: center;
    animation: bwDrift 26s ease-in-out infinite alternate;
}

/* The scrim over it: dark at the bottom, where the words are, and light
   across the middle so the picture is still a picture. The top stays
   slightly shaded to carry the back button. */
.bw-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(7, 39, 68, 0.42) 0%, rgba(7, 39, 68, 0.14) 38%, rgba(7, 39, 68, 0.8) 100%);
}

/* Above both layers. */
.bw-hero > * {
    position: relative;
    z-index: 1;
}

@keyframes bwDrift {
    from { transform: scale(1); }
    to { transform: scale(1.09) translateY(-1.5%); }
}

.bw-hero .back-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.bw-hero-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.1;
    /* The scrim carries most of the contrast; this holds the line where a
       photograph is pale, as Calm's mist and Focus's water are. */
    text-shadow: 0 1px 14px rgba(4, 22, 44, 0.55);
}

.bw-hero-subtitle {
    margin-top: 0.4rem !important;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

/* What is on the shelf: how many sessions, how short to how long. Small and
   set apart, the way a record sleeve prints its running time. */
.bw-hero-meta {
    margin-top: 0.5rem !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.bw-hero-meta:empty {
    display: none;
}

/* Sessions and About, at the foot of the header, as the Bite-Sized Rewires
   header carries them: the same size and weight, underlined where you are. */
.bw-tabs {
    display: flex;
    gap: 1.75rem;
    margin-top: 1.1rem;
}

.bw-tab {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 300;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: color 0.2s ease;
}

.bw-tab:hover {
    color: #fff;
}

.bw-tab.is-active {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.bw-section {
    padding: 1.75rem 1.25rem 0;
}

.bw-section-title {
    margin: 0 0 0.9rem;
    font-family: var(--font-heading);
    /* 20px, as every other section heading in the app is, and the token
       rather than the navy literal so it is readable in dark mode too. */
    font-size: 1.25rem;
    color: var(--text-dark);
}

/* A shelf heading with the size of the shelf set against it, the way a
   contents page carries its page numbers. */
.bw-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.bw-section-count {
    margin-bottom: 0.9rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.bw-section-sub {
    margin-bottom: 0.75rem !important;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-subtle);
}

/* A panel of its own now rather than a footnote under the shelves, so the
   copy is set at reading size, and the first paragraph a little larger than
   the rest -- it is the one that says what this is. */
.bw-about p {
    margin-bottom: 1rem !important;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-subtle);
}

.bw-about p:first-child {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.bw-about p:last-child {
    margin-bottom: 0 !important;
}

/* The note on the Advanced shelf: how many power sessions are still to go.
   On its own line, because at a phone's width it does not share one with a
   heading without breaking mid-sentence. */
.bw-advanced-note {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--font-base);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bw-advanced-note:empty {
    display: none;
}

.bw-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* A goal tile: a picture with its name at the foot of it. Tall enough that
   the photograph has somewhere to be, and shaded only where the words sit. */
.bw-goal {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.1rem;
    min-height: 146px;
    padding: 0.85rem;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bw-to);
    background-image: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.22) 44%, rgba(7, 39, 68, 0.84) 100%),
        var(--bw-image, linear-gradient(135deg, var(--bw-from), var(--bw-to)));
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    text-decoration: none;
    /* A lip of light along the top edge, so the tile has a surface rather
       than just an outline, and a glow underneath in the goal's own darker
       colour -- warm under Energize, blue under Focus. Spread negative, so it
       is a wash under the tile and not a halo around it. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 20px -12px var(--bw-to, #1E4E8C);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
    animation: bwIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.bw-goal:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 28px -14px var(--bw-to, #1E4E8C);
}

.bw-goal:active {
    transform: scale(0.98);
}

.bw-goal-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-shadow: 0 1px 12px rgba(4, 22, 44, 0.6);
}

.bw-goal-tagline {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
}

/* In the corner, in the same glass as every other label on a photograph in
   this category: how many sessions a goal holds is the least of the three
   things on the tile, and up there it is out of the name's way. */
.bw-goal-count {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.18rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(18, 28, 54, 0.42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
}

/* Two to a row on a phone, as the sessions grid is. A session people are
   being pointed at -- the one a goal opens with, or the pick for the time
   they have -- takes the full width instead and gets its description. */
.bw-card-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.bw-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    /* A hairline to sit the card on the page, and a shadow soft enough to be
       a shadow rather than a border. */
    border: 1px solid rgba(7, 39, 68, 0.06);
    box-shadow: 0 6px 18px rgba(7, 39, 68, 0.08);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
    /* Rises as it is drawn, as the recommendation cards in Miri do. Fills
       backwards rather than forwards so the stagger below has something to
       hold during its delay, and so the finished card is free to lift on
       hover afterwards. */
    animation: bwIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.bw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(7, 39, 68, 0.14);
}

/* The card being pointed at, which spans the row and carries a wash of its
   goal's own colour underneath -- warm under Energize, blue under Focus. */
.bw-card--feature {
    grid-column: 1 / -1;
    box-shadow: 0 6px 18px rgba(7, 39, 68, 0.08), 0 18px 32px -22px var(--bw-to, #1E4E8C);
}

.bw-card-face {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.bw-card-face[role="button"] {
    cursor: pointer;
}

/* The photograph, with only the pills on top of it. Shaded along the bottom
   edge, where the duration and the play mark sit. */
.bw-card-art {
    position: relative;
    height: 124px;
    background-color: var(--bw-to);
    background-image: linear-gradient(180deg, rgba(7, 39, 68, 0) 52%, rgba(7, 39, 68, 0.5) 100%),
        var(--bw-image, linear-gradient(135deg, var(--bw-from), var(--bw-to)));
    background-size: cover;
    background-position: center;
    /* Leans in a little under the finger, and under the cursor on a desktop.
       The card clips it, so the picture grows inside its own frame. */
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bw-card:hover .bw-card-art,
.bw-card-face:active .bw-card-art {
    transform: scale(1.05);
}

.bw-card--feature .bw-card-art {
    height: 180px;
}

/* The glass chip the programme cards use, at the size a small card can
   carry. */
.bw-card-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.18rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(18, 28, 54, 0.42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: var(--text-light);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Takes the slack in a row of unequal cards, so the chips stay at the foot
   and every card in the row is the same height. */
.bw-card-body {
    flex: 1;
    padding: 0.7rem 0.8rem 0.85rem;
}

.bw-card-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    line-height: 1.25;
    color: var(--text-dark);
}

.bw-card--feature .bw-card-title {
    font-size: 1.15rem;
}

.bw-card-meta {
    margin-top: 0.2rem !important;
    font-size: 0.66rem;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.bw-card-info {
    margin-top: 0.45rem !important;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-subtle);
}

/* A button rather than an icon dropped on the picture: a white disc with the
   play triangle in it, set in far enough from the corner that neither the
   disc nor its shadow meets the rounded edge of the card. */
.bw-mark {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    /* The triangle does not sit in the middle of its own glyph box. */
    padding-left: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(4, 22, 44, 0.28);
    color: #072744;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.bw-card--feature .bw-mark {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
}

/* The card being pointed at breathes: a ring opens out of the button and
   fades, in and out on about the rhythm the sessions ask for. One per screen
   -- a shelf of pulsing cards would be a fairground. */
.bw-card--feature .bw-mark::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: bwBreathe 5s ease-in-out infinite;
}

@keyframes bwBreathe {

    0%,
    100% {
        transform: scale(0.94);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.24);
        opacity: 0;
    }
}

/* Gives under the finger. */
.bw-card-face:active .bw-mark {
    transform: scale(0.92);
}

.bw-mark--locked {
    padding-left: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(18, 28, 54, 0.42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

/* Locked cards drop the photograph: grey says "not yet" in a way a dimmed
   picture does not, and the name is still there to be read. */
.bw-card.is-locked .bw-card-art {
    background-image: linear-gradient(135deg, #8a94a6, #5b6678);
}

.bw-card.is-locked .bw-card-title,
.bw-card.is-locked .bw-card-meta {
    color: var(--text-muted);
}

/* Wraps rather than overflows: three lengths do not always fit one line of a
   card two to a row. */
.bw-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.8rem 0.8rem;
}

/* How long the one recording is, in the same glass as the badge above it. */
.bw-duration {
    position: absolute;
    bottom: 0.5rem;
    left: 0.55rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(18, 28, 54, 0.38);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Three lengths of the same practice, chosen in one tap. */
/* Filled rather than outlined, so three of them read as one control at the
   foot of the card instead of three hairline boxes, and tight enough to fit
   one line of a card two to a row. */
.bw-length {
    padding: 0.26rem 0.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(7, 39, 68, 0.06);
    color: var(--text-dark);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.bw-length:hover {
    background: rgba(7, 39, 68, 0.11);
}

html[data-theme="dark"] .bw-length {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .bw-length:hover {
    background: rgba(255, 255, 255, 0.14);
}

.bw-length:disabled {
    opacity: 0.45;
}

/* Power breathing: fast breathing with holds, which is the one thing here
   that can go wrong. Amber, as the caution in the player's info sheet is. */
.bw-flag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(194, 65, 12, 0.1);
    color: #8a3708;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Burnt orange on a navy card is nearly unreadable, so the caution takes the
   lighter end of the same amber in dark mode. */
html[data-theme="dark"] .bw-flag {
    background: rgba(240, 160, 75, 0.14);
    color: #F0A04B;
}

/* Cards and tiles arrive a beat after one another, left to right, for the
   first three rows of a shelf. Past that nobody is watching the arrival, and
   a long shelf should not take a second and a half to appear. */
@keyframes bwIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.bw-goal:nth-child(2),
.bw-card-row .bw-card:nth-child(2) { animation-delay: 0.05s; }

.bw-goal:nth-child(3),
.bw-card-row .bw-card:nth-child(3) { animation-delay: 0.1s; }

.bw-goal:nth-child(4),
.bw-card-row .bw-card:nth-child(4) { animation-delay: 0.15s; }

.bw-card-row .bw-card:nth-child(5) { animation-delay: 0.2s; }

.bw-card-row .bw-card:nth-child(6) { animation-delay: 0.25s; }

/* The Advanced shelf is drawn twice -- locked, then again when progress says
   whether it is open -- and a card that fades in each time reads as a
   flicker. */
#bwAdvanced .bw-card {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {

    .bw-hero::before,
    .bw-card,
    .bw-card--feature .bw-mark::after,
    .bw-goal {
        animation: none;
    }

    .bw-card,
    .bw-card-art,
    .bw-mark,
    .bw-goal {
        transition: none;
    }

    .bw-card:hover .bw-card-art,
    .bw-card-face:active .bw-card-art {
        transform: none;
    }
}

.bw-empty {
    padding: 3rem 1.25rem;
    text-align: center;
    color: var(--text-subtle);
}

.bw-empty i {
    font-size: 2rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .bw-hero {
        padding: 3.5rem 2rem 2rem;
    }

    .bw-hero-title {
        font-size: 2.6rem;
    }

    .bw-section {
        padding: 2rem 2rem 0;
        max-width: 1100px;
        margin: 0 auto;
    }

    .bw-goal-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .bw-card-row {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    /* Two columns' worth rather than the whole row: full width here is a
       metre of card for one session. */
    .bw-card--feature {
        grid-column: span 2;
    }

    .bw-card-art {
        height: 150px;
    }

    .bw-card--feature .bw-card-art {
        height: 196px;
    }
}

/* -------------------------------------------------------------- The pacer
   A pattern to breathe along with, drawn rather than recorded. The shape is
   the pattern -- a circle for a breath in and out, a triangle when it is held
   at the top, a square when it is held at both ends -- and the dot travels
   one edge per phase. The orb in the middle is the lungs.

   Nothing here animates in CSS: every frame is set by breath-pacer.js from
   the clock, so a pattern cannot drift. There is no reduced-motion rule
   either, deliberately -- the movement is not decoration, it is the thing
   being followed, and a pacer that holds still paces nobody. */
.bp-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* A grid of equal tiles rather than a row that scrolls. Six patterns do not
   fit across a phone, and the two ways of dealing with that are a scroll that
   hides half of them or rows that wrap ragged; a grid is neither, and every
   edge in the block lines up with the one above it. */
.bp-chips {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

/* The pattern list, dressed as one wide chip. Fourteen patterns will not fit
   on a phone as buttons, and a select is the one control that costs a single
   row however many things are in it -- and opens as the system's own picker,
   which is a better list than anything built here would be. */
.bp-pick {
    position: relative;
    margin-bottom: 0.8rem;
}

.bp-select {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 0.9rem;
    border: 1px solid rgba(7, 39, 68, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--text-dark);
    font-family: var(--font-base);
    font-size: 0.86rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.bp-pick > i {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.7rem;
    pointer-events: none;
}

html[data-theme="dark"] .bp-select {
    background: var(--surface);
    border-color: var(--surface-border);
    color: var(--text-dark);
}

.bp-chips--lengths {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bp-chip {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.3rem;
    border: 1px solid rgba(7, 39, 68, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--text-dark);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.bp-chip.is-on {
    box-shadow: 0 6px 16px -10px rgba(27, 77, 163, 0.9);
}

.bp-chip.is-on {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Two lines of room whether this pattern needs them or not: a blurb that grew
   a line would shove the length chips, and the Start button under them, down
   the screen every time somebody changed their mind. */
.bp-blurb {
    min-height: 2.2em;
    margin: -0.25rem 0 0.8rem !important;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-subtle);
}

/* Dimmed rather than hidden once it is running: the stage should have the
   screen, but changing your mind about the pattern is still one tap. */
.bp-settings {
    transition: opacity 0.3s ease;
}

.bp.is-running .bp-settings {
    opacity: 0.4;
}

/* Everything to do with the session itself, in one column the width of the
   shape: the readout, the line of time left and the button all inherit that
   width, so they are centred on the shape rather than on the page. */
.bp-session {
    width: 100%;
    /* Wider than the shape, so the button under it can be a button: the shape
       is sized by the height left over, and that is not a width the one thing
       you have to press should inherit. Everything in here is centred on the
       same line regardless. */
    max-width: 284px;
    margin: 0 auto;
}

.bp-stage {
    position: relative;
    width: 100%;
    /* As big as the page can spare: the whole of this -- the pattern, the four
       lengths, the shape and the button -- has to stand between a phone's
       header and its navigation without scrolling, because a breath you have
       to scroll to is a breath you stop taking. */
    max-width: 228px;
    margin: 0 auto;
    aspect-ratio: 1;
}

/* Inset, so the mist has somewhere to spread past the shape without running
   out of the square the stage reserves for it. */
.bp-shape {
    position: absolute;
    inset: 7%;
    display: block;
}

/* The pattern itself: a hairline over the faintest wash of a fill, softened
   by half a pixel so it reads as the track the dot runs on rather than as a
   drawing of its own. Dim either way, because the blue mist inside it is what
   the eye should be following. */
.bp-track > * {
    fill: rgba(16, 20, 30, 0.02);
    stroke: rgba(16, 20, 30, 0.2);
    stroke-width: 1.5;
    stroke-linejoin: round;
    filter: blur(0.5px);
}

.bp-dot {
    fill: rgba(16, 20, 30, 0.72);
    stroke: none;
}

html[data-theme="dark"] .bp-track > * {
    fill: rgba(255, 255, 255, 0.025);
    stroke: rgba(255, 255, 255, 0.22);
}

html[data-theme="dark"] .bp-dot {
    fill: #fff;
}

/* The lungs: blue mist with a brighter heart to it. Four stops rather than
   two, because a mist with no centre has no size either -- it was the missing
   centre that made the breath hard to see. Everything still fades to nothing
   by the rim, so there is no edge anywhere on it.

   The size belongs to the shape it sits in and is set per pattern; the scale
   and the opacity are the breath, and they are the only two things that
   change per frame. */
.bp-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--bp-orb, 42%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(96, 172, 255, 0.9) 0%,
            rgba(46, 130, 236, 0.55) 30%,
            rgba(28, 98, 196, 0.18) 58%,
            rgba(28, 98, 196, 0) 80%);
    filter: blur(9px);
    /* Ink into paper on the light theme: multiplied, so the mist tints the
       white page instead of lying on top of it as a flat blue disc. */
    mix-blend-mode: multiply;
    transform: translate(-50%, -50%) scale(0.52);
    will-change: transform, opacity;
}

/* And light added to the black on the dark theme, which is the other half of
   the same idea: a near-white heart, and screen rather than multiply, so it
   reads as a glow. */
html[data-theme="dark"] .bp-glow {
    background: radial-gradient(circle,
            rgba(224, 244, 255, 0.98) 0%,
            rgba(110, 192, 255, 0.72) 30%,
            rgba(45, 130, 235, 0.3) 58%,
            rgba(45, 130, 235, 0) 80%);
    mix-blend-mode: screen;
}

.bp-readout {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.5rem;
    pointer-events: none;
}

.bp-phase {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* The count, in the display face and in the blue of the mist it belongs to:
   it is the one number on the screen, and it changes every second. */
.bp-count {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--primary);
}

html[data-theme="dark"] .bp-count {
    color: var(--primary-light);
}

/* The line and the figure on one row, the row the width of the shape: time is
   one thing and it takes one line. */
.bp-timeline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 1.1em;
    margin-top: 0.7rem;
}

/* Time left as a line that empties from the right, which is the only thing
   here allowed not to be centred. Idle it is not drawn at all, and an endless
   session has nothing to draw. */
.bp-progress {
    display: none;
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: rgba(7, 39, 68, 0.07);
}

/* Not drawn at all rather than drawn empty, and gone from the row rather than
   merely invisible in it: an endless session has no line, and the figure
   needs the space back to sit in the middle of. The row keeps its height
   either way, so nothing moves when a session starts. */
.bp.is-running.is-timed .bp-progress {
    display: block;
}

.bp-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transform: scaleX(var(--bp-done, 0));
    transform-origin: left center;
}

html[data-theme="dark"] .bp-progress {
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .bp-progress > span {
    background: var(--primary-light);
}

/* Three columns with the outer two the same width, so the button is centred
   on the shape above it and the sound toggle hangs off the end without
   shifting it. An empty column is cheaper than a button nobody wants. */
.bp-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

/* Clear of the bottom navigation: this panel is as tall as the screen, and
   the one control that matters is the last thing on it. */
#bwBreatheTab {
    padding-bottom: 5rem;
}

/* Tighter at the top than a shelf of cards is, which is what buys the Start
   button its place above the navigation on a phone. */
#bwBreatheTab .bw-section {
    padding-top: 0.5rem;
}

.bp-start {
    grid-column: 2;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 999px;
    /* Lit from the top and sitting on its own shadow, which is the only thing
       on this screen allowed to look like a button. */
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    box-shadow: 0 12px 26px -14px rgba(27, 77, 163, 0.9);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.bp-start:active {
    transform: translateY(1px);
}

/* Once it is running the button has nothing to sell: it is the way out, so it
   gives up the colour and the shadow and waits. */
.bp.is-running .bp-start {
    background: rgba(7, 39, 68, 0.07);
    box-shadow: none;
    color: var(--text-subtle);
}

/* The sound toggle, in the last of the three columns: the one thing here that
   is a preference rather than a control, so it is the quietest thing in the
   row until it is on. */
.bp-sound {
    grid-column: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(7, 39, 68, 0.1);
    border-radius: 50%;
    background: #fff;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.bp-sound[aria-pressed="true"] {
    border-color: rgba(27, 77, 163, 0.35);
    color: var(--primary);
}

html[data-theme="dark"] .bp-sound {
    background: var(--surface);
    border-color: var(--surface-border);
    color: var(--text-subtle);
}

html[data-theme="dark"] .bp-sound[aria-pressed="true"] {
    border-color: rgba(82, 169, 255, 0.45);
    color: var(--primary-light);
}

/* At the end of the line it belongs to, and quiet: the count in the readout
   is the number to look at, and this one is only for deciding whether there is
   time for another session. */
.bp-left {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

/* With no line to sit at the end of -- an endless session, or a finished one
   reporting its breaths -- the figure takes the middle instead of hanging off
   the right of nothing. */
.bp:not(.is-timed) .bp-left,
.bp:not(.is-running) .bp-left {
    margin: 0 auto !important;
}

html[data-theme="dark"] .bp-chip {
    background: var(--surface);
    border-color: var(--surface-border);
    color: var(--text-dark);
}

html[data-theme="dark"] .bp-chip.is-on {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #06142e;
}

html[data-theme="dark"] .bp-start {
    background: var(--primary-light);
    color: #06142e;
}

html[data-theme="dark"] .bp.is-running .bp-start {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

/* Side by side once there is room: the settings read as a column of choices
   on the left and the shape has the right of the screen to itself, which also
   keeps the one button that matters above the fold. */
@media (min-width: 768px) {
    .bp {
        display: grid;
        /* Capped and brought together rather than spread across whatever
           width the window happens to be: six chips stretched over a
           thousand pixels are six mostly empty chips, and the choices belong
           next to the thing they change. */
        grid-template-columns: minmax(0, 400px) 320px;
        justify-content: center;
        column-gap: 3.5rem;
        /* Centred against each other rather than both pinned to the top: the
           two blocks are different heights, and the shape is what the eye
           goes to, so it is the shape that should be level with the middle of
           the choices and not with the first word of them. */
        align-items: center;
    }

    /* None of the squeezing a phone needs: there is height here, so the chips
       get their proper size back and the shape gets a third again. */
    .bp-chip {
        padding: 0.5rem 0.7rem;
        font-size: 0.82rem;
    }

    .bp-blurb {
        min-height: 1.5em;
    }

    .bp-session {
        max-width: 320px;
    }

    .bp-stage {
        max-width: 300px;
    }

    .bp-controls {
        margin-top: 1.1rem;
    }
}

/* The breathing circle on the player, around the play button. The same object
   as the pacer above -- hairline circle, dot, mist, phase and count -- but
   following the recording instead of a clock, and always on the player's dark
   surface, so it takes the dark theme's colours whatever the app is set to.

   Every rule below is nailed to .player-page-body, the class the player page
   and nothing else carries, and the running state is held on the player's own
   container rather than on the body. Nothing here can reach another screen,
   and in particular .play-button, which several screens have, is only touched
   inside a breathing player. */
.player-page-body .player-orb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Room for the circle, and the play button centred in it rather than spaced
   away from the text above: the breath is the middle of this screen. Until
   the circle has something to say, the wrapper is inert -- a flex box the
   play button keeps its own margins inside -- so an ordinary session is laid
   out exactly as it was. */
.player-page-body .player-container.is-breathing .player-orb {
    height: min(68vw, 272px);
    margin: 1.25rem auto 1rem;
}

/* Positioned so the button stays on top of the mist: an absolutely placed
   sibling paints over an in-flow one whatever the order in the markup, and a
   play button behind a cloud is not a button. */
.player-page-body .player-container.is-breathing .play-button {
    position: relative;
    z-index: 1;
    /* The desktop and compact layouts both set this margin with !important,
       and inside the circle the button is centred rather than spaced away
       from the text above it. */
    margin: 0 !important;
}

.player-page-body .bpl {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 272px;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.player-page-body .bpl-shape {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.player-page-body .bpl-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 1.5;
    filter: blur(0.5px);
}

/* The phase clock. It closes the ring as the phase runs out, clockwise from
   twelve on the way in and anticlockwise on the way out -- the mirror is what
   makes a breath in and a breath out two different things to watch rather than
   one swell in two directions. */
.player-page-body .bpl-arc {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transition: stroke 0.35s ease, stroke-width 0.35s ease, opacity 0.5s ease;
}

/* Unwinding: the breath out, and the hold that follows it, both run the other
   way round. Flipped first and then turned, so the arc still starts at twelve.
   The dot is sent the same way in breath-pulse.js, which is what keeps it on
   the end of the line. */
.player-page-body .player-container[data-breath="out"] .bpl-arc,
.player-page-body .player-container[data-breath="hold-empty"] .bpl-arc {
    transform: rotate(-90deg) scale(1, -1);
}

.player-page-body .player-container[data-breath="out"] .bpl-arc {
    stroke: rgba(224, 244, 255, 0.92);
}

/* A hold is the one state where the lungs are doing nothing, so the clock is
   all there is to see: thinner and quieter, and still moving. */
.player-page-body .player-container[data-breath^="hold"] .bpl-arc {
    stroke: rgba(150, 192, 240, 0.65);
    stroke-width: 2;
}

/* Nothing to pace between breaths. */
.player-page-body .player-container[data-breath="rest"] .bpl-arc,
.player-page-body .player-container[data-breath="rest"] .bpl-dot {
    opacity: 0;
}

.player-page-body .bpl-dot {
    fill: #fff;
    transition: opacity 0.5s ease;
}

.player-page-body .player-container[data-breath^="hold"] .bpl-dot {
    fill: rgba(205, 228, 255, 0.9);
}

/* The mist, on the player's dark ground: a near-white heart and screen
   blending, which is the dark half of the pacer's glow. */
.player-page-body .bpl-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(224, 244, 255, 0.98) 0%,
            rgba(110, 192, 255, 0.72) 30%,
            rgba(45, 130, 235, 0.3) 58%,
            rgba(45, 130, 235, 0) 80%);
    /* More than the pacer's nine, because this mist is wider: the blur has to
       grow with it or it gains a hard core. */
    filter: blur(13px);
    mix-blend-mode: screen;
    transform: translate(-50%, -50%) scale(0.62);
    will-change: transform, opacity;
}

.player-page-body .bpl-readout {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    min-height: 1.6rem;
    pointer-events: none;
}

.player-page-body .bpl-phase {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.player-page-body .bpl-count {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-light);
    transition: color 0.35s ease;
}

/* The count takes the colour of the state, so the number and the arc are
   plainly the same clock. */
.player-page-body .player-container[data-breath="out"] .bpl-count {
    color: rgba(224, 244, 255, 0.92);
}

.player-page-body .player-container[data-breath^="hold"] .bpl-count {
    color: rgba(150, 192, 240, 0.85);
}

/* Length switch under the play button: the same breathwork practice at two or
   three lengths. Only breathwork sessions have it, so it is hidden until
   player.js fills it in. */
.player-lengths {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
}

.player-length {
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 600;
}

.player-length span {
    opacity: 0.7;
}

.player-length.is-current {
    background: var(--text-light);
    border-color: var(--text-light);
    color: #072744;
}

.player-length.is-current span {
    opacity: 0.6;
}

/* Breathwork facts in the info sheet. */
.player-fact {
    margin-bottom: 0.25rem !important;
}

.player-fact strong {
    display: inline-block;
    min-width: 84px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* The one thing in breathwork that can go wrong, so it reads as a warning
   rather than as more description. */
.player-caution {
    margin-top: 0.75rem !important;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(194, 65, 12, 0.08);
    font-size: 0.8rem !important;
    line-height: 1.45;
    color: #8a3708;
}

/* The breathwork row on the home page: shorter tiles than the hub's, since
   the home page is a list of doors rather than a place to browse. */
/* A goal on the home page, which borrows the booster row's card. Only the
   things a link needs that a div did not, and a tagline under the name. */
.bw-home-card {
    display: block;
    color: var(--text-light);
    text-decoration: none;
}

.bw-home-card .overlay {
    /* Two lines of text instead of one, so the scrim has to reach further up
       the picture than a session card's does. */
    background: linear-gradient(180deg, rgba(7, 39, 68, 0) 0%, rgba(7, 39, 68, 0.3) 45%, rgba(7, 39, 68, 0.78) 100%);
}

.bw-home-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    text-shadow: 0 1px 12px rgba(4, 22, 44, 0.6);
}

.bw-home-tagline {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ---------------------------------------------------------------------------
   The home page when breathwork is what they came for
   ---------------------------------------------------------------------------
   The hypnotherapy home page shares this stylesheet and has to come out of it
   untouched, so there are two kinds of rule below and no third one. The .bw-*
   classes are new names on markup that only breathwork mode ever shows, and
   are written plainly. Anything that reaches an element the other home page
   also has -- a section heading, the journeys grid -- is prefixed with
   body.home-breathwork, which personalize.js sets for an arrival from a
   breathing funnel and nothing else.

   The page it makes: one session chosen for them, the question that routes
   everyone the choice did not suit, then shelves of tiles. Flatter and denser
   than the home page it replaces -- a picture with the name written across it
   is a poster, and a poster is for looking at rather than choosing from. */

/* The headings go sans-serif here. The serif is the app's voice for the names
   of things; these are labels on shelves, and at this density they are read
   rather than admired.
 *
 * Phones only, like every other rule below that touches an element the old
 * home page also has. From 1200px up this app draws section headings at 48px
 * and their "View all" at 32px, as one designed pair -- shrinking the heading
 * on its own left a 16px label beside a 32px underlined link. The design this
 * came from is a phone screen; the desktop layout is a separate piece of work
 * and keeps the look it has. */
@media (max-width: 767px) {
    body.home-breathwork main .section-heading h5 {
        font-family: var(--font-base) !important;
        font-size: 1.02rem !important;
        font-weight: 700 !important;
    }

    body.home-breathwork main .section-heading .view-all {
        font-size: 0.85rem !important;
    }
}

/* The stats panel is `display: flex !important`, which beats the hidden
   attribute personalize.js sets on it: the three numbers are at the foot of
   this page instead, and two sets of them is one too many. */
#statsSummary[hidden] {
    display: none !important;
}

/* --- the fortnight they are in ------------------------------------------- */
.bw-plan {
    margin: 1.25rem 1rem 0.85rem;
}

.bw-plan-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.bw-plan-name {
    font-weight: 600;
    color: var(--text-dark);
}

.bw-plan-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--surface-border, rgba(16, 24, 40, 0.1));
    overflow: hidden;
}

.bw-plan-fill {
    display: block;
    height: 100%;
    width: 7%;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.6s ease;
}

/* --- the session chosen for them ----------------------------------------- */
.bw-today {
    display: flex;
    flex-direction: column;
    margin: 0 1rem 1.75rem;
    padding: 1.25rem;
    border-radius: 20px;
    /* Dark in both themes. It is the one thing on the page that was picked
       rather than listed, and on a white page nothing else can be this. */
    background: linear-gradient(158deg, #0d1c38 0%, #16335f 100%);
    border: 1px solid var(--surface-border, transparent);
    color: #fff;
    text-decoration: none;
}

.bw-today[hidden] {
    display: none;
}

.bw-today-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

.bw-today-title {
    margin-top: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.2;
}

.bw-today-meta {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
}

.bw-today-why {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.bw-today-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    margin-top: 1.1rem;
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    background: #fff;
    color: #0d1c38;
    font-size: 0.88rem;
    font-weight: 700;
}

/* --- the four programmes, at the top ------------------------------------- */
.bw-programs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0.25rem 1rem 1.5rem;
}

.bw-programs[hidden] {
    display: none;
}

.bw-program {
    display: block;
    padding: 0.55rem 0.55rem 0.7rem;
    border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.1));
    border-radius: 16px;
    background: var(--surface, #fff);
    text-decoration: none;
}

/* The picture carries the badge, so a programme in progress says so over its
   own art rather than in a second line of text under it. */
.bw-program-art {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 11px;
    overflow: hidden;
    background: var(--surface-border, rgba(16, 24, 40, 0.08));
}

.bw-program-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bw-program-badge {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(13, 28, 56, 0.86);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bw-program-badge[hidden] {
    display: none;
}

.bw-program-name {
    display: block;
    margin-top: 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.bw-program-state {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* --- how they feel, and how long they have -------------------------------- */
.bw-resets {
    display: grid;
    gap: 10px;
    margin: 0 1rem 1.5rem;
}

.bw-reset {
    display: grid;
    /* The question on the left, the three lengths on the right: the row reads
       as one sentence, and the lengths line up down the page where a thumb is
       already travelling. */
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.1));
    border-radius: 14px;
    background: var(--surface, #fff);
}

.bw-reset-feel {
    grid-column: 1;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.bw-reset-goal {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.bw-reset-lengths {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    gap: 6px;
}

.bw-reset-len {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.12));
    border-radius: 999px;
    background: transparent;
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* --- a session in a shelf ------------------------------------------------- */
.bw-tile {
    flex: 0 0 150px;
    width: 150px;
    scroll-snap-align: start;
    text-decoration: none;
}

.bw-tile-art {
    display: block;
    height: 108px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface, rgba(16, 24, 40, 0.06));
}

.bw-tile-art img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.bw-tile-name {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-dark);
}

.bw-tile-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- the foot of the page ------------------------------------------------- */
.bw-miri {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.1));
    border-radius: 16px;
    background: var(--surface, #fff);
    text-align: left;
}

.bw-miri[hidden] {
    display: none;
}

.bw-miri-text {
    flex: 1;
}

.bw-miri-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.bw-miri-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bw-miri-cta {
    flex: 0 0 auto;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--text-dark);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.bw-numbers {
    display: flex;
    margin: 0 1rem 1.75rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.1));
    border-radius: 16px;
    background: var(--surface, #fff);
}

.bw-numbers[hidden] {
    display: none;
}

.bw-number {
    flex: 1;
    text-align: center;
}

.bw-number-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-dark);
}

.bw-number-label {
    display: block;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--text-muted);
}

/* --- the way out, as a list rather than a wall of posters ---------------- */
/* The journeys close the page and are the only door off it, so they stay --
   but at the size they were, four photographs each the width of the screen
   read as the main event.
 *
 * Everything in here is !important and phone-only, because the card it
 * reshapes is declared across three media queries -- its height, its
 * photograph and its white lettering all with !important, for a poster. A
 * plainer rule wins at one width and loses at the next, which is how this
 * first went out: a 56px photograph at the top of a 393px gradient with the
 * name written on it in white. */
@media (max-width: 767px) {
    body.home-breathwork #homePrograms .all-programs-grid {
        --bs-gutter-y: 0.5rem;
    }

    body.home-breathwork #homePrograms .program-card {
        display: flex !important;
        align-items: center !important;
        gap: 0.85rem !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0.55rem 0.9rem 0.55rem 0.55rem !important;
        border: 1px solid var(--surface-border, rgba(16, 24, 40, 0.1)) !important;
        border-radius: 16px !important;
        background: var(--surface, #fff) !important;
    }

    body.home-breathwork #homePrograms .program-card img {
        width: 56px !important;
        height: 56px !important;
        flex: 0 0 56px !important;
        border-radius: 12px !important;
        object-fit: cover !important;
    }

    body.home-breathwork #homePrograms .card-gradient-overlay {
        display: none !important;
    }

    body.home-breathwork #homePrograms .card-overlay-content {
        position: static !important;
        flex: 1 !important;
        padding: 0 !important;
    }

    /* The name and the line under it are declared white, for a photograph
       behind the words. On a light row they have to be read against the row. */
    body.home-breathwork #homePrograms .card-overlay-content .text-white {
        color: var(--text-dark) !important;
    }

    body.home-breathwork #homePrograms .program-card .card-title {
        font-size: 0.95rem !important;
        color: var(--text-dark) !important;
        margin-bottom: 0 !important;
    }

    body.home-breathwork #homePrograms .program-card .card-subtitle {
        font-size: 0.78rem !important;
        color: var(--text-muted) !important;
    }

    /* The whole row already opens the journey (program-card carries the
       click), so the button is a second target for the same thing; a chevron
       says where the row goes without pretending to be a choice. */
    body.home-breathwork #homePrograms .card-overlay-content .btn {
        display: none !important;
    }

    body.home-breathwork #homePrograms .program-card::after {
        content: '\F285';
        /* bootstrap-icons: chevron-right */
        font-family: 'bootstrap-icons';
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    /* Phones are shown two journeys out of seven, because each one was the
       width of the screen and tall with it. As rows, the four hypnotherapy
       programs fit in less space than one of those posters, and all four are
       in the design for this page. The three meditation shelves after them
       stay behind "View all", as they are on every phone today. */
    body.home-breathwork #homePrograms .all-programs-grid .col-12:nth-child(-n+4) {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .bw-plan,
    .bw-today,
    .bw-programs,
    .bw-resets,
    .bw-miri,
    .bw-numbers {
        margin-left: 0;
        margin-right: 0;
    }

    .bw-miri {
        width: 100%;
    }

    .bw-programs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Two resets to a row where there is width for them: four rows of one
       question each is a column of near-empty cards on a desktop. */
    .bw-resets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bw-tile {
        flex-basis: 190px;
        width: 190px;
    }

    .bw-tile-art {
        height: 130px;
    }
}

/* The breath pacer's card. A session card is a picture of somewhere else; this
   is the only thing on the page that does something here, so it is drawn
   rather than photographed -- the rings are the pacer's own shape, breathing
   at the rate the panel opens on. */
.bwt-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 1rem 1.5rem;
    padding: 20px;
    border: 1px solid rgba(79, 155, 217, 0.28);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79, 155, 217, 0.1) 0%, rgba(95, 189, 166, 0.12) 100%);
    color: inherit;
    text-decoration: none;
}

@media (min-width: 992px) {
    .bwt-card {
        gap: 28px;
        margin: 0 0 2rem;
        padding: 28px 32px;
    }
}

.bwt-rings {
    position: relative;
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
}

.bwt-ring,
.bwt-core {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.bwt-ring {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(79, 155, 217, 0.55);
    animation: bwt-breathe 11s ease-in-out infinite;
}

/* The second ring runs half a breath behind the first, which is what makes it
   read as breathing rather than as a loading spinner. */
.bwt-ring:nth-child(2) {
    animation-delay: -5.5s;
}

.bwt-core {
    width: 26px;
    height: 26px;
    background: radial-gradient(circle, rgba(95, 189, 166, 0.95) 0%, rgba(79, 155, 217, 0.65) 70%);
    animation: bwt-core 11s ease-in-out infinite;
}

@keyframes bwt-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(0.52); opacity: 0.25; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
}

@keyframes bwt-core {
    0%, 100% { transform: translate(-50%, -50%) scale(0.7); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* A card that will not hold still is worse than no card for anyone who asked
   the system not to animate. */
@media (prefers-reduced-motion: reduce) {
    .bwt-ring,
    .bwt-core {
        animation: none;
    }

    .bwt-ring {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
}

.bwt-copy {
    display: block;
    min-width: 0;
}

.bwt-eyebrow {
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

.bwt-title {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.2;
}

.bwt-sub {
    display: block;
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.75;
}

.bwt-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 16px;
    border-radius: 999px;
    background: #1E4E8C;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

@media (min-width: 992px) {
    .bwt-title {
        font-size: 1.6rem;
    }

    .bwt-sub {
        max-width: 56ch;
        font-size: 0.9rem;
    }
}

html[data-theme="dark"] .bwt-card {
    border-color: rgba(79, 155, 217, 0.35);
    background: linear-gradient(135deg, rgba(79, 155, 217, 0.16) 0%, rgba(95, 189, 166, 0.14) 100%);
}

html[data-theme="dark"] .bwt-cta {
    background: #4F9BD9;
    color: #06243f;
}
