:root {
    --panel: rgba(8, 12, 17, 0.9);
    --panel-strong: rgba(11, 17, 24, 0.96);
    --line: rgba(165, 223, 255, 0.18);
    --text: #f4fbff;
    --muted: #a3b7c9;
    --accent: #53f1c4;
    --accent-soft: rgba(83, 241, 196, 0.16);
    --accent-strong: #19d6b0;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 4%, rgba(83, 241, 196, 0.18), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(74, 161, 255, 0.2), transparent 24%),
        linear-gradient(180deg, #05090f 0%, #050b12 46%, #0a1320 100%);
}

body.site-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 80%);
}

.page-shell {
    position: relative;
    padding: 32px 18px 56px;
}

.shell-nav {
    width: min(1240px, 100%);
    margin: 0 auto 24px;
    display: grid;
    gap: 16px;
}

.shell-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.shell-brand {
    color: var(--text);
    text-decoration: none;
    font-family: "Instrument Serif", serif;
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.shell-brand-logo {
    width: min(280px, 48vw);
    height: auto;
    display: block;
}

.shell-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shell-nav-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.shell-links a {
    text-decoration: none;
    color: var(--muted);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    padding: 10px 14px;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.shell-links a:hover,
.shell-links a:focus-visible,
.shell-links a.is-active {
    color: var(--text);
    border-color: rgba(83, 241, 196, 0.4);
    background: rgba(83, 241, 196, 0.1);
}

.shell-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(165, 223, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    cursor: pointer;
}

.shell-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.shell-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.shell-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.shell-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

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

.app,
.detail-page {
    width: min(1240px, 100%);
    margin: 0 auto;
}

.hero,
.studio-header {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 22px;
    margin-bottom: 26px;
}

.hero h1,
.studio-header h1,
.detail-card h1 {
    margin: 10px 0 8px;
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 0.94;
}

.hero h1 {
    font-size: clamp(4rem, 12vw, 8rem);
}

.studio-header h1 {
    font-size: clamp(2.8rem, 8vw, 5.7rem);
}

.detail-card h1 {
    font-size: clamp(2.8rem, 8vw, 4.8rem);
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy,
.section-copy,
.help-copy,
.mini-note,
.muted-copy,
.track-prompt,
.track-waiting,
.track-error,
.seed-card-copy {
    color: var(--muted);
}

.hero-copy {
    max-width: 60ch;
    font-size: 1.04rem;
    line-height: 1.7;
}

.hero-card,
.composer-card,
.preview-card,
.track-card,
.detail-card,
.message,
.empty-state {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-card,
.composer-card,
.preview-card,
.detail-card {
    border-radius: var(--radius-xl);
}

.hero-card,
.preview-card,
.detail-card {
    padding: 24px;
}

.hero-card-label {
    margin: 0 0 14px;
    font-size: 0.84rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 12px;
    line-height: 1.55;
}

.creation-playbook {
    position: relative;
    overflow: hidden;
}

.creation-playbook::after {
    content: "";
    position: absolute;
    inset: auto -30% -45% -10%;
    height: 170px;
    background: radial-gradient(circle at center, rgba(83, 241, 196, 0.35), transparent 60%);
    pointer-events: none;
}

.messages {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.workflow-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.flow-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(88, 207, 255, 0.08), rgba(255, 255, 255, 0.02));
    padding: 16px;
}

.flow-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: #8ce8ff;
}

.flow-card h3 {
    margin: 0 0 8px;
    font-size: 1.03rem;
}

.flow-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.message {
    padding: 16px 18px;
    border-radius: var(--radius-md);
}

.message.success {
    border-color: rgba(117, 215, 164, 0.32);
    background: rgba(22, 48, 37, 0.82);
}

.message.error {
    border-color: rgba(255, 123, 123, 0.34);
    background: rgba(65, 24, 24, 0.82);
}

.composer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 22px;
    align-items: start;
}

.composer-card {
    padding: 26px;
}

.mode-row {
    display: inline-flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.mode-pill {
    border: 0;
    border-radius: 999px;
    padding: 10px 15px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.mode-pill.is-active {
    background: rgba(83, 241, 196, 0.14);
    color: #dbfff5;
}

.preview-card {
    position: sticky;
    top: 18px;
    background:
        linear-gradient(180deg, rgba(83, 241, 196, 0.11), transparent 24%),
        var(--panel-strong);
}

.section-header {
    margin-bottom: 18px;
}

.section-header-split {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

.section-header h2 {
    margin: 8px 0 0;
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    line-height: 1.1;
}

.section-copy {
    margin: 10px 0 0;
    max-width: 52ch;
    line-height: 1.6;
}

.field-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.field-stack label,
.prompt-seed-header label {
    font-size: 0.95rem;
    font-weight: 500;
}

.composer-card input[type="text"],
.composer-card input[type="number"],
.composer-card input[type="email"],
.composer-card input[type="password"],
.composer-card select,
.composer-card textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.composer-card select {
    color-scheme: dark;
}

.composer-card select option,
.composer-card select optgroup {
    background: #0b141e;
    color: var(--text);
}

.composer-card textarea {
    resize: vertical;
    min-height: 136px;
}

.composer-card input:focus,
.composer-card select:focus,
.composer-card textarea:focus {
    border-color: rgba(83, 241, 196, 0.7);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.field-error {
    color: #ffb1b1;
    font-size: 0.92rem;
}

.prompt-seed-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.seed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.seed-card {
    appearance: none;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    display: grid;
    gap: 8px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.seed-card:hover,
.seed-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(83, 241, 196, 0.6);
    background: linear-gradient(180deg, rgba(83, 241, 196, 0.16), rgba(255, 255, 255, 0.04));
}

.seed-card-title {
    font-weight: 700;
}

.builder-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.builder-actions {
    display: inline-flex;
    gap: 8px;
}

.builder-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 8px 12px;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.builder-chip-ghost {
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    border-color: rgba(165, 223, 255, 0.28);
}

.builder-chip-ghost:hover,
.builder-chip-ghost:focus-visible {
    background: rgba(88, 207, 255, 0.12);
    color: var(--text);
    border-color: rgba(88, 207, 255, 0.7);
}

.builder-chip:hover,
.builder-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(83, 241, 196, 0.62);
    background: rgba(83, 241, 196, 0.12);
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.chip:hover {
    transform: translateY(-1px);
}

.chip input {
    accent-color: var(--accent-strong);
}

.chip:has(input:checked) {
    border-color: rgba(83, 241, 196, 0.68);
    background: var(--accent-soft);
}

.toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.switch input {
    accent-color: var(--accent-strong);
    width: 18px;
    height: 18px;
}

.is-hidden {
    display: none;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.primary-button,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.primary-button {
    width: 100%;
    margin-top: 8px;
    border: 0;
    background: linear-gradient(120deg, #63f7cf 0%, #58cfff 100%);
    color: #041117;
    font: inherit;
    cursor: pointer;
}

.wave-shell {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 6px;
    height: 52px;
    margin: 10px 0 16px;
    align-items: end;
}

.wave-shell span {
    display: block;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(88, 207, 255, 0.88), rgba(83, 241, 196, 0.35));
    height: 22%;
    animation: pulse 1.4s ease-in-out infinite;
}

.wave-shell span:nth-child(2n) {
    animation-delay: 0.16s;
}

.wave-shell span:nth-child(3n) {
    animation-delay: 0.28s;
}

.wave-shell span:nth-child(4n) {
    animation-delay: 0.42s;
}

@keyframes pulse {
    0%,
    100% {
        height: 26%;
        opacity: 0.75;
    }

    50% {
        height: 100%;
        opacity: 1;
    }
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.preview-title {
    margin: 6px 0 12px;
    font-size: 2rem;
    font-family: "Instrument Serif", serif;
    line-height: 1;
}

.preview-summary {
    margin: 0 0 16px;
    font-size: 1.02rem;
    line-height: 1.65;
}

.preview-meta,
.track-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-meta span,
.track-meta span {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.preview-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(83, 241, 196, 0.3);
    background: rgba(83, 241, 196, 0.12);
    color: #b9fff0;
    font-size: 0.84rem;
}

.mini-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    line-height: 1.55;
}

.library {
    margin-top: 28px;
}

.library-page .library {
    margin-top: 14px;
}

.library-header {
    margin-bottom: 18px;
}

.library-sentinel-wrap {
    padding: 14px 0 4px;
}

.library-sentinel {
    width: 100%;
    height: 1px;
}

.library-loading-copy {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

.docs-dock {
    margin-top: 26px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.doc-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.doc-card:hover,
.doc-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(88, 207, 255, 0.7);
    background: linear-gradient(180deg, rgba(88, 207, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.doc-card h3 {
    margin: 0 0 8px;
    font-size: 1.02rem;
}

.doc-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.track-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.track-card {
    border-radius: var(--radius-lg);
    padding: 14px;
}

.track-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
}

.track-row.is-playing {
    border-color: rgba(83, 241, 196, 0.65);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(83, 241, 196, 0.16);
}

.cover-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    width: 84px;
    height: 84px;
    border: 1px solid var(--line);
}

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

.cover-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 0.7rem;
    background: rgba(4, 9, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.track-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
}

.track-name {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
}

.track-prompt {
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 10px;
}

.icon-play,
.icon-bubble {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.87rem;
}

.icon-play {
    width: 38px;
    height: 38px;
    background: linear-gradient(140deg, rgba(88, 207, 255, 0.25), rgba(83, 241, 196, 0.2));
    border-color: rgba(88, 207, 255, 0.7);
}

.icon-play:disabled,
.icon-bubble:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.icon-play:not(:disabled):hover,
.icon-bubble:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(83, 241, 196, 0.68);
}

.mini-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.03);
}

.mini-link:hover,
.mini-link:focus-visible {
    border-color: rgba(88, 207, 255, 0.72);
}

.status-pill {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    white-space: nowrap;
    border: 1px solid var(--line);
}

.status-queued,
.status-generating {
    background: rgba(88, 207, 255, 0.14);
    color: #c4eeff;
    border-color: rgba(88, 207, 255, 0.28);
}

.status-ready {
    background: rgba(83, 241, 196, 0.14);
    color: #c8ffee;
    border-color: rgba(83, 241, 196, 0.32);
}

.status-failed {
    background: rgba(255, 123, 123, 0.12);
    color: #ffb6b6;
    border-color: rgba(255, 123, 123, 0.26);
}

.track-player,
.detail-player {
    margin-top: 8px;
}

.track-player audio,
.detail-player audio {
    width: 100%;
}

.detail-player video {
    width: 100%;
    max-width: 880px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: #050a11;
}

.row-audio {
    display: none;
}

.track-ready-note {
    margin: 0;
    color: #afffed;
    font-size: 0.88rem;
}

.track-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.track-loading-wave {
    display: inline-grid;
    grid-template-columns: repeat(5, 4px);
    gap: 3px;
    align-items: end;
    height: 14px;
}

.track-loading-wave span {
    width: 4px;
    border-radius: 999px;
    background: rgba(83, 241, 196, 0.9);
    height: 40%;
    animation: tiny-pulse 0.95s ease-in-out infinite;
}

.track-loading-wave span:nth-child(2n) {
    animation-delay: 0.14s;
}

.track-loading-wave span:nth-child(3n) {
    animation-delay: 0.25s;
}

@keyframes tiny-pulse {
    0%,
    100% {
        height: 35%;
        opacity: 0.7;
    }

    50% {
        height: 100%;
        opacity: 1;
    }
}

.queue-dock {
    position: sticky;
    bottom: 8px;
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 12, 19, 0.95);
    backdrop-filter: blur(12px);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, 32%);
    gap: 12px;
    align-items: center;
    z-index: 4;
}

.queue-now {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.queue-now img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.queue-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.queue-title {
    margin: 2px 0 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
}

.queue-btn-play {
    width: 42px;
    height: 42px;
    background: linear-gradient(140deg, rgba(88, 207, 255, 0.32), rgba(83, 241, 196, 0.24));
}

.queue-progress-wrap {
    display: grid;
    gap: 6px;
}

.queue-progress {
    width: 100%;
}

.queue-time {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.78rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.action-row form {
    margin: 0;
}

.compact-link {
    width: auto;
    flex: 1 1 180px;
    margin-top: 0;
}

.small-primary {
    width: auto;
    min-height: 44px;
    padding: 0 18px;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.playlist-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
}

.playlist-title {
    margin: 0 0 8px;
    font-size: 1.06rem;
    font-weight: 700;
}

.playlist-meta {
    margin: 0;
    color: var(--muted);
}

.playlist-actions {
    align-items: center;
}

.playlist-actions form {
    display: inline-flex;
}

.playlist-actions .secondary-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.track-error {
    color: #ffb1b1;
}

.secondary-link {
    margin-top: 16px;
    width: 100%;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.empty-state {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.detail-page {
    padding-top: 12px;
}

.detail-card {
    margin-top: 16px;
}

.detail-overview {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 18px;
}

.detail-cover-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    width: 100%;
}

.detail-cover-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-stack,
.detail-form,
.command-list {
    display: grid;
    gap: 16px;
}

.detail-panel,
.detail-section,
.command-card {
    border: 1px solid rgba(165, 223, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
}

.detail-panel,
.detail-section {
    padding: 20px;
}

.detail-panel h2,
.detail-section h2 {
    margin: 8px 0 0;
}

.detail-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.detail-pill-row span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(165, 223, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.88rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.detail-grid h2 {
    margin-top: 0;
}

.detail-grid-bottom {
    align-items: start;
}

.detail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-field {
    display: grid;
    gap: 10px;
}

.detail-field-wide {
    grid-column: 1 / -1;
}

.detail-field label,
.detail-mini-field label {
    font-size: 0.94rem;
    font-weight: 500;
}

.detail-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.detail-check input {
    accent-color: var(--accent-strong);
    width: 18px;
    height: 18px;
}

.detail-form input[type="text"],
.detail-form input[type="number"],
.detail-form input[type="file"],
.detail-form select,
.detail-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.detail-form select {
    color-scheme: dark;
}

.detail-form select option,
.detail-form select optgroup {
    background: #0b141e;
    color: var(--text);
}

.detail-form input[type="file"] {
    padding: 12px 14px;
}

.detail-form input:focus,
.detail-form select:focus,
.detail-form textarea:focus {
    border-color: rgba(83, 241, 196, 0.7);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.detail-inline-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-mini-field {
    display: grid;
    gap: 8px;
}

.micro-input {
    width: 112px;
    min-width: 112px;
}

.micro-input-fps {
    width: 92px;
    min-width: 92px;
}

.command-card {
    padding: 16px;
}

.command-card code,
.detail-card code {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    color: #dffdf5;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
}

.command-card-inline {
    margin-top: 16px;
}

.command-label {
    margin: 0 0 10px;
    color: #8ce8ff;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.video-lab-page {
    display: grid;
    gap: 22px;
}

.video-stat-grid,
.video-workflow-grid,
.video-card-grid,
.video-lab-split {
    display: grid;
    gap: 16px;
}

.video-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.video-card-grid,
.video-lab-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-stat-card,
.video-card,
.video-side-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.video-stat-card {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.video-stat-card h2 {
    margin: 10px 0 8px;
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 0.92;
}

.video-flow-card {
    display: grid;
    gap: 10px;
}

.video-flow-meta {
    margin: 0;
    color: #8ce8ff;
    font-size: 0.84rem;
}

.video-section {
    display: grid;
    gap: 16px;
}

.video-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.video-card video {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.35);
    display: block;
}

.video-inline-preview {
    width: 100%;
    margin-top: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.16);
}

.shorts-card video {
    aspect-ratio: 9 / 16;
    max-height: 760px;
    object-fit: contain;
}

.video-card-body {
    padding: 18px;
}

.video-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.video-card-head h3,
.video-side-card h3 {
    margin: 8px 0 0;
    font-size: 1.2rem;
}

.video-side-card {
    border-radius: var(--radius-xl);
    padding: 22px;
}

.clip-list {
    display: grid;
    gap: 12px;
}

.clip-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.clip-title {
    margin: 0 0 6px;
    font-weight: 700;
}

.lyrics-block {
    margin: 0;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.7;
}

.radio-page {
    display: grid;
    gap: 22px;
}

.radio-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 18px;
    align-items: stretch;
}

.radio-hero-main,
.radio-live-panel,
.radio-stat-card,
.radio-panel,
.radio-command-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.radio-hero-main,
.radio-live-panel {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.radio-hero-main {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(83, 241, 196, 0.14), transparent 34%),
        linear-gradient(45deg, rgba(255, 184, 107, 0.12), transparent 42%),
        var(--panel-strong);
}

.radio-hero-main::after {
    content: "";
    position: absolute;
    inset: auto 26px 24px auto;
    width: min(360px, 45%);
    height: 86px;
    opacity: 0.4;
    background:
        linear-gradient(90deg, transparent 0 7%, rgba(83, 241, 196, 0.8) 7% 9%, transparent 9% 16%),
        linear-gradient(90deg, transparent 0 18%, rgba(255, 184, 107, 0.9) 18% 20%, transparent 20% 29%),
        linear-gradient(90deg, transparent 0 34%, rgba(88, 207, 255, 0.8) 34% 36%, transparent 36% 47%),
        linear-gradient(90deg, transparent 0 52%, rgba(255, 126, 155, 0.82) 52% 54%, transparent 54% 63%),
        linear-gradient(90deg, transparent 0 71%, rgba(83, 241, 196, 0.8) 71% 73%, transparent 73% 100%);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.radio-hero h1 {
    margin: 10px 0 12px;
    font-family: "Instrument Serif", serif;
    font-size: clamp(3.6rem, 9vw, 7rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 0.92;
}

.radio-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.radio-live-panel {
    display: grid;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(88, 207, 255, 0.12), transparent 30%),
        var(--panel);
}

.radio-live-top,
.radio-clock-row,
.radio-panel-head,
.radio-command-card {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
}

.radio-live-top h2,
.radio-panel h3 {
    margin: 8px 0 0;
}

.radio-live-top h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.3rem);
    line-height: 1.02;
}

.radio-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 76px;
    border-radius: 50%;
    border: 1px solid rgba(83, 241, 196, 0.46);
    color: #d7fff5;
    background:
        radial-gradient(circle at 50% 50%, rgba(83, 241, 196, 0.22), transparent 68%),
        rgba(255, 255, 255, 0.04);
    font-size: 1.26rem;
    font-weight: 700;
}

.radio-score-small {
    min-width: 54px;
    min-height: 54px;
    font-size: 0.95rem;
}

.radio-clock-row {
    color: var(--muted);
    font-size: 0.92rem;
}

.radio-clock-row span:nth-child(2) {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 700;
}

.radio-progress {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(165, 223, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.radio-progress-fill {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, #53f1c4, #ffb86b, #58cfff);
    transition: width 0.4s ease;
}

.radio-runtime-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(83, 241, 196, 0.25);
    color: #c8ffee;
    background: rgba(83, 241, 196, 0.08);
}

.radio-runtime-note.is-warning {
    border-color: rgba(255, 184, 107, 0.38);
    color: #ffe2bd;
    background: rgba(255, 184, 107, 0.1);
}

.radio-stat-grid,
.radio-block-grid,
.radio-pipeline-grid,
.radio-asset-grid,
.radio-action-grid,
.radio-command-grid {
    display: grid;
    gap: 14px;
}

.radio-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.radio-stat-card {
    border-radius: var(--radius-lg);
    padding: 18px;
}

.radio-stat-card h2 {
    margin: 10px 0 6px;
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 400;
    line-height: 0.9;
}

.radio-section {
    display: grid;
    gap: 14px;
}

.radio-timeline {
    display: flex;
    min-height: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.radio-timeline span {
    min-width: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(88, 207, 255, 0.12);
}

.radio-timeline span:nth-child(2n) {
    background: rgba(83, 241, 196, 0.12);
}

.radio-timeline span.is-active {
    background: linear-gradient(90deg, rgba(83, 241, 196, 0.92), rgba(255, 184, 107, 0.9));
    box-shadow: 0 0 26px rgba(83, 241, 196, 0.38);
}

.radio-block-grid,
.radio-asset-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.radio-pipeline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.radio-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.radio-panel,
.radio-action-card,
.radio-command-card {
    border-radius: var(--radius-lg);
    padding: 20px;
}

.radio-action-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
}

.radio-action-card h3 {
    margin: 0;
}

.radio-action-card code {
    display: block;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
    color: #dffdf5;
    white-space: normal;
    word-break: break-word;
}

.radio-action-card.critical {
    border-color: rgba(255, 126, 155, 0.45);
    background: linear-gradient(180deg, rgba(255, 126, 155, 0.13), rgba(255, 255, 255, 0.025));
}

.radio-action-card.warning {
    border-color: rgba(255, 184, 107, 0.42);
    background: linear-gradient(180deg, rgba(255, 184, 107, 0.12), rgba(255, 255, 255, 0.025));
}

.radio-action-card.ok {
    border-color: rgba(83, 241, 196, 0.35);
    background: linear-gradient(180deg, rgba(83, 241, 196, 0.11), rgba(255, 255, 255, 0.025));
}

.radio-track-list,
.radio-check-list,
.radio-asset-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.radio-track-row,
.radio-check-row,
.radio-asset-row {
    display: grid;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.radio-track-row {
    grid-template-columns: 42px minmax(0, 1fr);
}

.radio-track-row > span {
    color: var(--accent);
    font-weight: 700;
}

.radio-track-row p,
.radio-check-row p,
.radio-asset-row p {
    margin: 0 0 4px;
    font-weight: 700;
}

.radio-track-row small,
.radio-check-row small,
.radio-asset-row small,
.radio-asset-row span {
    color: var(--muted);
    line-height: 1.45;
}

.radio-check-row {
    grid-template-columns: 14px minmax(0, 1fr);
}

.radio-check-row > span {
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 50%;
    background: #53f1c4;
    box-shadow: 0 0 18px rgba(83, 241, 196, 0.55);
}

.radio-check-row.warn > span,
.radio-asset-row.warn {
    background: rgba(255, 184, 107, 0.08);
}

.radio-check-row.warn > span {
    background: #ffb86b;
    box-shadow: 0 0 18px rgba(255, 184, 107, 0.5);
}

.radio-pill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.status-segment_ready,
.status-rendering,
.status-rendered,
.status-upload_pending,
.status-uploading,
.status-uploaded,
.status-publish_scheduled,
.status-published,
.status-retry {
    background: rgba(88, 207, 255, 0.12);
    color: #c4eeff;
    border-color: rgba(88, 207, 255, 0.28);
}

.status-uploaded,
.status-published {
    background: rgba(83, 241, 196, 0.14);
    color: #c8ffee;
    border-color: rgba(83, 241, 196, 0.32);
}

.status-canceled {
    background: rgba(180, 192, 206, 0.1);
    color: #d2dbe5;
}

.radio-asset-row {
    grid-template-columns: minmax(0, 0.65fr) minmax(120px, 0.35fr);
}

.radio-command-card {
    align-items: stretch;
}

.radio-command-card code {
    display: block;
    margin: 10px 0;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
    color: #dffdf5;
    white-space: normal;
    word-break: break-word;
}

.radio-log-panel {
    overflow: hidden;
}

.radio-log-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    max-height: 340px;
    overflow: auto;
}

.radio-log-list code {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: #dffdf5;
    white-space: pre-wrap;
    word-break: break-word;
}

.radio-copy-btn {
    align-self: start;
    cursor: pointer;
}

.orchestrator-api-links {
    display: grid;
    gap: 8px;
}

.orchestrator-run-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.orchestrator-run-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    padding: 18px;
    display: grid;
    gap: 12px;
}

.orchestrator-run-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.orchestrator-run-head h3 {
    margin: 8px 0;
}

.orchestrator-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.orchestrator-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #19d6b0, #53f1c4);
}

.orchestrator-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--muted);
}

.orchestrator-step-list {
    display: grid;
    gap: 8px;
}

.orchestrator-step-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.orchestrator-step-seq {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(165, 223, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.orchestrator-event-list {
    display: grid;
    gap: 8px;
}

.orchestrator-event-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.orchestrator-event-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.orchestrator-json-preview {
    margin: 0;
    min-height: 180px;
    max-height: 360px;
    overflow: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    color: #dffdf5;
    padding: 12px;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── SLA table ─────────────────────────────────────────────────────── */
.orchestrator-sla-section {
    margin-bottom: 32px;
}

.orchestrator-sla-table {
    display: grid;
    gap: 4px;
}

.orchestrator-sla-header,
.orchestrator-sla-row {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr) 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-md);
}

.orchestrator-sla-header {
    background: rgba(83, 241, 196, 0.07);
    border: 1px solid rgba(83, 241, 196, 0.2);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.orchestrator-sla-row {
    border: 1px solid rgba(165, 223, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
}

.orchestrator-sla-row:hover {
    background: rgba(83, 241, 196, 0.04);
}

.orchestrator-sla-key {
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--accent);
}

.sla-done { color: #53f1c4; }
.sla-failed { color: #ff6b6b; }

.orchestrator-sla-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    border-radius: 99px;
    background: rgba(165, 223, 255, 0.14);
    vertical-align: middle;
    margin-right: 6px;
    overflow: hidden;
}

.orchestrator-sla-fill {
    display: block;
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}

.orchestrator-sla-fill.sla-ok { background: #53f1c4; }
.orchestrator-sla-fill.sla-warn { background: #f1c453; }
.orchestrator-sla-fill.sla-crit { background: #ff6b6b; }

/* ── Callback observability ───────────────────────────────────────── */
.orchestrator-callback-section {
    margin-bottom: 28px;
    display: grid;
    gap: 10px;
}

.orchestrator-force-resume-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.orchestrator-force-resume-form input[type="text"] {
    min-width: 260px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.orchestrator-callback-list {
    display: grid;
    gap: 8px;
}

.orchestrator-callback-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

/* ── Step retry hint ───────────────────────────────────────────────── */
.step-error-hint {
    color: #f1c453;
    cursor: help;
    margin-left: 4px;
}

/* ── Button danger variant ─────────────────────────────────────────── */
.button-danger {
    background: rgba(255, 80, 80, 0.14);
    border-color: rgba(255, 100, 100, 0.4);
    color: #ffaaaa;
}

.button-danger:hover,
.button-danger:focus-visible {
    background: rgba(255, 80, 80, 0.26);
    border-color: rgba(255, 120, 120, 0.65);
    color: #ffcccc;
}

@media (max-width: 1040px) {
    .hero,
    .studio-header,
    .composer-grid,
    .detail-overview,
    .detail-grid,
    .detail-form-grid,
    .video-stat-grid,
    .video-workflow-grid,
    .video-card-grid,
    .video-lab-split,
    .radio-hero,
    .radio-stat-grid,
    .radio-block-grid,
    .radio-pipeline-grid,
    .radio-asset-grid,
    .radio-action-grid,
    .radio-command-grid {
        grid-template-columns: 1fr;
    }

    .workflow-strip,
    .docs-grid {
        grid-template-columns: 1fr;
    }

    .preview-card {
        position: static;
    }

    .orchestrator-run-grid {
        grid-template-columns: 1fr;
    }

    .orchestrator-force-resume-form {
        flex-direction: column;
        align-items: stretch;
    }

    .orchestrator-force-resume-form input[type="text"] {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .page-shell {
        padding-inline: 14px;
    }

    .shell-nav {
        gap: 12px;
    }

    .shell-nav-top {
        position: relative;
        z-index: 6;
    }

    .shell-brand-logo {
        width: min(240px, 58vw);
    }

    .shell-menu-toggle {
        display: inline-flex;
    }

    .shell-nav-panel {
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid rgba(165, 223, 255, 0.16);
        background: rgba(8, 12, 17, 0.96);
        border-radius: 22px;
        padding: 14px;
        box-shadow: var(--shadow);
    }

    .shell-nav-panel.is-open {
        display: flex;
    }

    .shell-links,
    .shell-auth {
        width: 100%;
    }

    .shell-links {
        flex-direction: column;
        align-items: stretch;
    }

    .shell-auth-button {
        width: 100%;
    }

    .composer-card,
    .preview-card,
    .hero-card,
    .detail-card {
        padding: 20px;
    }

    .seed-grid,
    .toggle-row,
    .control-grid {
        grid-template-columns: 1fr;
    }

    .prompt-seed-header,
    .track-top {
        flex-direction: column;
        align-items: start;
    }

    .section-header-split {
        align-items: start;
        flex-direction: column;
    }

    .video-card-head {
        flex-direction: column;
    }

    .radio-hero-main,
    .radio-live-panel,
    .radio-panel,
    .radio-action-card,
    .radio-command-card {
        padding: 18px;
    }

    .radio-hero-main {
        min-height: 260px;
    }

    .radio-live-top,
    .radio-panel-head,
    .radio-command-card,
    .radio-asset-row {
        flex-direction: column;
        display: flex;
    }

    .track-row {
        grid-template-columns: 1fr;
    }

    .cover-wrap {
        width: 100%;
        height: 180px;
    }

    .detail-inline-controls {
        flex-direction: column;
    }

    .micro-input,
    .micro-input-fps {
        width: 100%;
        min-width: 0;
    }

    .queue-dock {
        grid-template-columns: 1fr;
    }

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

.shell-auth {
    margin: 0;
}

.shell-auth-button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #f8f5ef;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    cursor: pointer;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-card {
    width: min(560px, 100%);
}

.login-form {
    margin-top: 18px;
}

.auth-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
    gap: 24px;
    align-items: center;
}

.auth-story,
.auth-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(7, 11, 17, 0.92), rgba(11, 18, 27, 0.96));
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.auth-story {
    padding: 34px;
}

.auth-card {
    padding: 28px;
    align-self: center;
}

.auth-feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.auth-feature-card {
    border: 1px solid rgba(165, 223, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 16px;
}

.auth-feature-card h3,
.auth-card h2 {
    margin: 0 0 8px;
}

.auth-feature-card p,
.auth-switch {
    margin: 0;
    color: var(--muted);
}

.auth-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--accent);
    margin: 0 0 10px;
}

.auth-form-card {
    margin-top: 18px;
    padding: 24px;
}

.auth-switch {
    margin-top: 18px;
}

.auth-switch a {
    color: var(--text);
}

@media (max-width: 760px) {
    .auth-shell,
    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .auth-story,
    .auth-card {
        padding: 20px;
    }
}
