:root {
    --ink: #f8fbff;
    --muted: #aebbd0;
    --navy: #061426;
    --navy-2: #0a1d36;
    --panel: #0e2542;
    --panel-soft: #102b4b;
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--navy);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
}

.shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 100;
    padding: 12px 16px;
    color: #071426;
    background: #fff;
    border-radius: 12px;
    font-weight: 700;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 20, 38, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.brand span.brand-name {
    display: inline-block;
    color: #eef3f8;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #ffffff 0%, #dbe4f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 18px rgba(255, 255, 255, 0.06);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: block;
    flex: 0 0 42px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, rgba(255, 255, 255, 0.18));
    border-radius: 13px;
    background: #071426;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 24%, transparent);
}

.brand small {
    display: block;
    margin-top: -1px;
    color: color-mix(in srgb, var(--muted) 88%, white 12%);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-nav a {
    text-decoration: none;
    font-weight: 600;
}

.theme-toggle {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.theme-toggle-icon {
    width: 18px;
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
}

.header-cta {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 64px 0 62px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--accent-2) 23%, transparent), transparent 31%),
        radial-gradient(circle at 9% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 25%),
        linear-gradient(145deg, #061426 0%, #0b2341 52%, #07172a 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.17;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
    align-items: center;
    gap: clamp(34px, 6vw, 78px);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.86rem;
}

.breadcrumbs a {
    text-decoration: none;
}

.app-heading {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-heading img {
    width: 104px;
    height: 104px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 25px;
    object-fit: cover;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.eyebrow,
.section-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 680px;
    margin-bottom: 0;
    font-size: clamp(2.25rem, 4vw, 3.65rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

h2 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.hero-lede {
    max-width: 690px;
    margin: 26px 0 0;
    color: #d7dfeb;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

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

.button-primary {
    color: #071426;
    background: linear-gradient(135deg, var(--accent), #ffe79c);
    box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 24%, transparent);
}

.button-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 23px 0 0;
    padding: 0;
    list-style: none;
}

.quick-facts li {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d3deec;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.82rem;
}

.hero-visual {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    aspect-ratio: 1024 / 500;
    object-fit: contain;
    border-radius: 19px;
}

.hero-visual figcaption {
    padding: 12px 8px 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.section {
    padding: 86px 0;
}

.section-soft {
    border-block: 1px solid var(--line);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        var(--navy-2);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(36px, 8vw, 110px);
    align-items: start;
}

.prose {
    color: var(--muted);
    font-size: 1.05rem;
}

.prose p {
    margin-bottom: 18px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.feature-card {
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.14);
}

.feature-card p {
    color: var(--muted);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: 15px;
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    font-size: 1.35rem;
}

.gallery-section {
    overflow: hidden;
}

.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: end;
    gap: 40px;
    margin-bottom: 32px;
}

.section-heading-row h2 {
    margin-bottom: 0;
}

.section-heading-row > p {
    color: var(--muted);
}

.screenshots {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 31%);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 24px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

.screenshot-card {
    margin: 0;
    padding: 8px;
    scroll-snap-align: start;
    border: 1px solid var(--line);
    border-radius: 27px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: var(--shadow);
}

.screenshot-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    border-radius: 20px;
    background: #061426;
}

.tablet-section {
    padding-top: 58px;
}

.tablet-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.64fr) minmax(0, 1.36fr);
    align-items: center;
    gap: clamp(34px, 7vw, 88px);
}

.tablet-copy,
.faq-intro {
    color: var(--muted);
    font-size: 1.04rem;
}

.text-link {
    display: inline-flex;
    gap: 8px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.tablet-frame {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.tablet-frame img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 18px;
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(250px, 0.64fr) minmax(0, 1.36fr);
    gap: clamp(34px, 7vw, 90px);
}

.faq-list details {
    border-top: 1px solid var(--line);
}

.faq-list details:last-child {
    border-bottom: 1px solid var(--line);
}

.faq-list summary {
    position: relative;
    cursor: pointer;
    padding: 20px 42px 20px 0;
    font-weight: 700;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 8px;
    color: var(--accent);
    font-size: 1.45rem;
    font-weight: 500;
}

.faq-list details[open] summary::after {
    content: "–";
}

.faq-list details p {
    padding: 0 42px 20px 0;
    color: var(--muted);
}

.download-section {
    padding: 72px 0;
}

.download-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 30px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 31%),
        var(--panel);
    box-shadow: var(--shadow);
}

.download-card img {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    object-fit: cover;
}

.download-card h2 {
    margin-bottom: 8px;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.download-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #050f1d;
}

.site-footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(150px, 0.55fr));
    gap: 60px;
    padding: 62px 0 52px;
}

.site-footer-brand {
    max-width: 420px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.footer-brand-mark {
    width: 42px;
    height: 42px;
    display: block;
    flex: 0 0 42px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, rgba(255, 255, 255, 0.18));
    border-radius: 13px;
    background: #071426;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 20%, transparent);
}

.footer-brand small {
    display: block;
    margin-top: -4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.site-footer-brand > p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 2px 0 17px;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.site-footer-links {
    display: grid;
    gap: 10px;
}

.site-footer-links a {
    width: max-content;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
}

.site-footer-links a:hover,
.site-footer-bottom a:hover {
    color: #fff;
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 20px 0 26px;
    border-top: 1px solid var(--line);
    color: #8290a4;
    font-size: 0.78rem;
}

.site-footer-bottom p {
    margin: 0;
}

.site-footer-bottom a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
}

html:not([data-theme="dark"]) {
    color-scheme: light;
    --ink: #172233;
    --muted: #5d6a7b;
    --navy: #ffffff;
    --navy-2: #f7f9fc;
    --panel: #ffffff;
    --panel-soft: #f2f5f9;
    --line: #dfe5ed;
    --shadow: 0 20px 55px rgba(20, 34, 53, 0.1);
}

html:not([data-theme=dark]) body {
    color: var(--ink);
    background: #ffffff;
}

html:not([data-theme=dark]) .brand span.brand-name {
    color: #111827;
    background: linear-gradient(180deg, #111827 0%, #374151 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
}

html:not([data-theme=dark]) .brand small {
    color: #64748b;
}

html:not([data-theme="dark"]) .brand-mark,
html:not([data-theme="dark"]) .footer-brand-mark {
    border-color: #d8dee8;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(27, 40, 60, 0.1);
}

html:not([data-theme="dark"]) .header-nav a:hover,
html:not([data-theme="dark"]) .breadcrumbs a:hover,
html:not([data-theme="dark"]) .site-footer-links a:hover,
html:not([data-theme="dark"]) .site-footer-bottom a:hover {
    color: #000000;
}

html:not([data-theme="dark"]) .theme-toggle,
html:not([data-theme="dark"]) .header-cta {
    border-color: #d7dee8;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(24, 37, 56, 0.05);
}

html:not([data-theme="dark"]) .theme-toggle:hover,
html:not([data-theme="dark"]) .header-cta:hover {
    background: #f2f5f8;
}

html:not([data-theme="dark"]) .hero {
    background:
        radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 30%),
        radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 24%),
        #ffffff;
}

html:not([data-theme="dark"]) .hero::before {
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(55, 78, 105, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 78, 105, 0.045) 1px, transparent 1px);
}

html:not([data-theme="dark"]) .app-heading img {
    border-color: #d8dee8;
    box-shadow: 0 18px 45px rgba(25, 38, 57, 0.13);
}

html:not([data-theme="dark"]) .hero-lede {
    color: #4f5e70;
}

html:not([data-theme="dark"]) .button-primary {
    color: #151a22;
}

html:not([data-theme="dark"]) .button-secondary {
    color: #243145;
    border-color: #ccd5e1;
    background: #ffffff;
}

html:not([data-theme="dark"]) .quick-facts li {
    color: #465568;
    background: rgba(255, 255, 255, 0.88);
}

html:not([data-theme="dark"]) .hero-visual,
html:not([data-theme="dark"]) .feature-card,
html:not([data-theme="dark"]) .screenshot-card,
html:not([data-theme="dark"]) .tablet-frame {
    background: #ffffff;
}

html:not([data-theme="dark"]) .hero-visual {
    box-shadow: 0 28px 70px rgba(25, 38, 57, 0.12);
}

html:not([data-theme="dark"]) .section-soft {
    background: #f7f9fc;
}

html:not([data-theme="dark"]) .feature-card {
    box-shadow: 0 14px 40px rgba(25, 38, 57, 0.06);
}

html:not([data-theme="dark"]) .screenshots {
    scrollbar-color: color-mix(in srgb, var(--accent) 72%, #805b18) #e8edf3;
}

html:not([data-theme="dark"]) .screenshot-card img {
    background: #eef2f6;
}

html:not([data-theme="dark"]) .download-card {
    background:
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 31%),
        #ffffff;
}

html:not([data-theme="dark"]) .site-footer {
    background: #f5f7fa;
}

html:not([data-theme="dark"]) .site-footer-bottom {
    color: #677487;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

@media (max-width: 920px) {
    .hero-grid,
    .intro-grid,
    .tablet-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        max-width: 680px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .screenshots {
        grid-auto-columns: minmax(245px, 44%);
    }

    .download-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .download-card .button {
        grid-column: 1 / -1;
    }

    .site-footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 68px;
    }

    .brand small,
    .header-nav > a:first-child {
        display: none;
    }

    .header-cta {
        padding: 9px 13px;
        font-size: 0.88rem;
    }

    .theme-toggle {
        width: 42px;
        padding: 9px;
    }

    .theme-toggle [data-theme-label] {
        display: none;
    }

    .hero {
        padding: 42px 0 46px;
    }

    .app-heading {
        align-items: flex-start;
        gap: 15px;
    }

    .app-heading img {
        width: 74px;
        height: 74px;
        border-radius: 19px;
    }

    h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
        line-height: 1.08;
        letter-spacing: -0.03em;
    }

    h2 {
        font-size: clamp(1.7rem, 8vw, 2.25rem);
        line-height: 1.15;
    }

    .section {
        padding: 60px 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 0;
    }

    .section-heading-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .screenshots {
        grid-auto-columns: minmax(236px, 82%);
    }

    .download-card {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .site-footer-main {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 48px 0 38px;
    }

    .site-footer-brand {
        grid-column: auto;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .site-footer-legal {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button {
        transition: none;
    }
}

/* Compact Genesis 1 preview shared by every app landing page. */
.has-floating-audio {
    padding-bottom: 104px;
}

.floating-audio {
    position: fixed;
    z-index: 1200;
    right: 18px;
    bottom: 16px;
    left: 18px;
    pointer-events: none;
}

.floating-audio-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(210px, 1.15fr) auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: min(920px, 100%);
    min-height: 78px;
    margin-inline: auto;
    padding: 12px 14px;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    background: rgba(7, 20, 38, 0.96);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35), 0 2px 12px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    pointer-events: auto;
    transition: width 180ms ease, transform 180ms ease, border-radius 180ms ease;
}

.floating-audio-track {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.floating-audio-track img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}

.floating-audio-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.floating-audio-copy > span {
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.floating-audio-copy strong,
.floating-audio-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-audio-copy strong {
    color: #ffffff;
    font-size: 0.94rem;
    line-height: 1.3;
}

.floating-audio-copy small {
    color: #aeb9c9;
    font-size: 0.72rem;
}

.floating-audio[data-audio-state="error"] .floating-audio-copy small {
    color: #ffb4a9;
}

.floating-audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.audio-control,
.floating-audio-collapse {
    display: inline-grid;
    place-items: center;
    color: #e7edf5;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.audio-control {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font: inherit;
}

.audio-control:hover,
.floating-audio-collapse:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.audio-control:active {
    transform: scale(0.94);
}

.audio-control-play {
    width: 46px;
    height: 46px;
    margin-inline: 2px;
    color: #101722;
    background: var(--accent);
    box-shadow: 0 7px 24px color-mix(in srgb, var(--accent) 34%, transparent);
}

.audio-control-play:hover {
    color: #101722;
    background: color-mix(in srgb, var(--accent) 88%, white);
}

.audio-control-play:disabled {
    cursor: wait;
    opacity: 0.68;
}

.audio-control-seek {
    width: auto;
    min-width: 56px;
    padding: 0 9px;
    grid-auto-flow: column;
    gap: 3px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.audio-control-seek:hover {
    background: rgba(255, 255, 255, 0.12);
}

.audio-control-seek small {
    margin-inline: 0;
    font-size: 0.82rem;
    font-weight: 800;
}

.audio-control-icon {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
    flex: 0 0 auto;
}

.audio-control-icon-rewind,
.audio-control-icon-forward {
    transform: translateY(-0.5px);
}

.floating-audio-timeline {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr) auto;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: #aeb9c9;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.floating-audio-timeline input {
    width: 100%;
    height: 4px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.floating-audio-collapse {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.05rem;
}

.floating-audio.is-collapsed .floating-audio-shell {
    grid-template-columns: minmax(180px, 1fr) auto auto;
    width: min(440px, 100%);
    min-height: 64px;
    padding-block: 8px;
    border-radius: 20px;
}

.floating-audio.is-collapsed .floating-audio-timeline,
.floating-audio.is-collapsed .audio-control-skip,
.floating-audio.is-collapsed .audio-control-seek {
    display: none;
}

.floating-audio.is-collapsed .floating-audio-controls {
    order: 2;
}

.floating-audio.is-collapsed .floating-audio-collapse {
    order: 3;
}

.audio-app-prompt[hidden] {
    display: none;
}

.audio-app-prompt {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.audio-app-prompt.is-open {
    opacity: 1;
}

.audio-app-prompt-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(3, 10, 20, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
}

.audio-app-prompt-card {
    position: relative;
    width: min(480px, 100%);
    padding: 30px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
    transform: translateY(12px) scale(0.98);
    transition: transform 180ms ease;
}

.audio-app-prompt.is-open .audio-app-prompt-card {
    transform: translateY(0) scale(1);
}

.audio-app-prompt-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.audio-app-prompt-card h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 5vw, 2.1rem);
}

.audio-app-prompt-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.audio-app-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.audio-app-prompt-actions .button {
    min-height: 46px;
}

.audio-prompt-open {
    overflow: hidden;
}

html:not([data-theme="dark"]) .floating-audio-shell {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(13, 25, 43, 0.97);
}

@media (max-width: 760px) {
    .has-floating-audio {
        padding-bottom: 186px;
    }

    .floating-audio {
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
    }

    .floating-audio-shell {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
        min-height: 0;
        padding: 10px;
        border-radius: 20px;
    }

    .floating-audio-track img {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 12px;
    }

    .floating-audio-copy strong {
        font-size: 0.86rem;
    }

    .floating-audio-copy small {
        font-size: 0.68rem;
    }

    .floating-audio-controls {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: center;
        gap: clamp(8px, 4vw, 18px);
    }

    .audio-control {
        width: 34px;
        height: 34px;
    }

    .audio-control-seek {
        min-width: 52px;
        padding: 0 8px;
        gap: 3px;
    }

    .audio-control-icon {
        width: 16px;
        height: 16px;
    }

    .audio-control-play {
        width: 42px;
        height: 42px;
    }

    .floating-audio-timeline {
        grid-column: 1 / -1;
        grid-row: 3;
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 7px;
        padding: 0 6px 2px;
    }

    .floating-audio-collapse {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        width: 30px;
        height: 34px;
    }

    .floating-audio.is-collapsed .floating-audio-shell {
        grid-template-columns: minmax(0, 1fr) auto auto;
        width: 100%;
    }

    .audio-app-prompt-card {
        padding: 24px;
        border-radius: 20px;
    }
}

@media (max-width: 430px) {
    .floating-audio-controls {
        gap: clamp(5px, 3vw, 11px);
    }

    .audio-control-seek {
        min-width: 48px;
        padding: 0 7px;
        gap: 2px;
    }

    .audio-control-icon {
        width: 15px;
        height: 15px;
    }

    .floating-audio-copy > span {
        display: none;
    }

    .floating-audio-track {
        gap: 8px;
    }

    .audio-app-prompt-actions {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-audio-shell,
    .audio-app-prompt,
    .audio-app-prompt-card,
    .audio-control {
        transition: none;
    }
}
