:root {
    --bg: #f4efe4;
    --bg-deep: #efe7da;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --panel-soft: #fbf7ef;
    --line: #e7ddd0;
    --line-strong: #ddd1c1;
    --text: #1f2937;
    --muted: #6b7280;
    --muted-soft: #94a3b8;
    --primary: #10b981;
    --primary-dark: #0f8f67;
    --primary-soft: rgba(16, 185, 129, 0.1);
    --accent: #8b5cf6;
    --warm: #f59e0b;
    --danger: #c13d3d;
    --success-bg: #edf9f2;
    --error-bg: #fff2f2;
    --info-bg: #eef6ff;
    --shadow-lg: 0 24px 80px rgba(119, 98, 72, 0.14);
    --shadow-md: 0 16px 40px rgba(119, 98, 72, 0.1);
    --shadow-sm: 0 10px 24px rgba(119, 98, 72, 0.06);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.1), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 24%),
        linear-gradient(180deg, #f8f4ec 0%, var(--bg) 48%, var(--bg-deep) 100%);
    min-height: 100vh;
    position: relative;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    border-radius: 16px;
    padding: 13px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button {
    cursor: pointer;
    border: 0;
}

.page-glow {
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.page-glow-left {
    top: 72px;
    left: -120px;
    background: rgba(16, 185, 129, 0.22);
}

.page-glow-right {
    top: 120px;
    right: -120px;
    background: rgba(245, 158, 11, 0.2);
}

.container {
    width: min(1280px, calc(100vw - 36px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 14px 0;
    background: linear-gradient(180deg, rgba(248, 244, 236, 0.88), rgba(248, 244, 236, 0.6));
    backdrop-filter: blur(16px);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 74px;
    padding: 12px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 40px rgba(120, 101, 79, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #22c55e 100%);
    box-shadow: 0 14px 24px rgba(16, 185, 129, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 14px;
    color: #475569;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-points {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.inline-form,
.inline-actions,
.hero-actions,
.link-row,
.action-wrap,
.section-title-row,
.tab-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.page-shell {
    padding: 22px 0 56px;
}

.card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    padding: 26px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
}

.card.compact {
    padding: 16px 18px;
}

.card.hero-panel-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(251,247,239,0.94));
}

.narrow {
    max-width: 560px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel {
    min-width: 0;
}

.hero-copy-panel {
    padding: 34px;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.92), rgba(250,246,238,0.96));
}

.hero-copy h1,
.page-header h1,
.card h1 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-copy p,
.page-header .muted {
    line-height: 1.8;
}

.muted {
    color: var(--muted);
}

.muted-soft {
    color: var(--muted-soft);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-highlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.hero-highlight-item {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.hero-highlight-item strong {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #34d399 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #10b981 100%);
}

.btn-light {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    color: #334155;
}

.btn-light:hover {
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, var(--danger) 100%);
    color: #fff;
}

.alert {
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow-sm);
}

.alert-success { background: var(--success-bg); }
.alert-error { background: var(--error-bg); }
.alert-info { background: var(--info-bg); }

.error-list {
    margin: 8px 0 0 18px;
    line-height: 1.8;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h1,
.card h2,
.card h3 {
    margin: 0 0 10px;
}

.page-header p,
.card p {
    margin: 0;
}

.section-intro {
    max-width: 680px;
}

.panel-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(16,185,129,0.08));
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.panel-icon.accent {
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(139,92,246,0.08));
    color: #6d28d9;
}

.saas-illustration {
    position: relative;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(249,243,233,0.92));
    border: 1px solid rgba(255,255,255,0.78);
    overflow: hidden;
}

.saas-illustration::before {
    content: "";
    position: absolute;
    inset: auto auto -35px -20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.14), transparent 68%);
}

.saas-visual-window {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.saas-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100,116,139,0.35);
}

.saas-visual-board {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 12px;
    align-items: stretch;
}

.saas-visual-board.compact-board {
    grid-template-columns: repeat(2, 1fr);
}

.saas-visual-stack {
    display: grid;
    gap: 12px;
}

.saas-visual-card {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,236,226,0.94));
    border: 1px solid rgba(231,221,208,0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.saas-visual-card.tall {
    min-height: 130px;
}

.saas-visual-card.short {
    min-height: 58px;
}

.saas-visual-card.accent {
    background: linear-gradient(180deg, rgba(16,185,129,0.18), rgba(255,255,255,0.9));
}

.stat-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.stat-grid.four-up {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12), transparent 68%);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    line-height: 1.2;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-callout {
    padding: 34px;
    background:
        radial-gradient(circle at top right, rgba(16,185,129,0.12), transparent 34%),
        linear-gradient(135deg, #fffdf8 0%, #f8f1e5 100%);
}

.dashboard-callout h2 {
    font-size: 34px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.dashboard-illustration {
    margin-top: 28px;
}

.dashboard-latest {
    display: grid;
    gap: 14px;
}

.dashboard-latest-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255,255,255,0.84);
    box-shadow: var(--shadow-sm);
}

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

.project-row {
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,253,248,0.98), rgba(250,245,236,0.94));
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.project-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(119, 98, 72, 0.16);
    border-color: rgba(16,185,129,0.22);
}

.project-row h3 {
    font-size: 22px;
    margin-bottom: 2px;
}

.project-card-glow {
    position: absolute;
    top: -40px;
    right: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.15), transparent 70%);
}

.project-card-head,
.asset-card-top,
.storyboard-card-top,
.sidebar-panel-head,
.preview-stage-top,
.editor-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-mini-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(231,221,208,0.88);
    color: var(--primary-dark);
    font-weight: 800;
}

.project-status-badge,
.asset-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.project-status-badge,
.asset-status-badge.success {
    background: rgba(16,185,129,0.12);
    color: var(--primary-dark);
}

.asset-status-badge.warning {
    background: rgba(245,158,11,0.14);
    color: #b45309;
}

.asset-status-badge.danger {
    background: rgba(220,38,38,0.12);
    color: #b91c1c;
}

.project-card-footer {
    display: flex;
    justify-content: flex-end;
}

.project-stage-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.stage-node {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(203,213,225,0.9);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.55);
}

.stage-node.active {
    background: var(--primary);
}

.meta-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    margin-top: 10px;
}

.meta-line span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(231, 221, 208, 0.85);
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.label-title,
label span {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.option-grid {
    display: grid;
    gap: 14px;
}

.option-grid.four-up {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.option-card,
.checkbox-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,0.78);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-card:hover,
.checkbox-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: var(--shadow-sm);
}

.option-card input,
.checkbox-card input {
    width: auto;
    margin-right: 8px;
}

.workflow-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
}

.editor-ribbon {
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(246,239,227,0.94));
    border: 1px solid rgba(231,221,208,0.85);
}

.workflow-main textarea.workflow-script {
    min-height: 540px;
    background: linear-gradient(180deg, rgba(255,253,248,0.98), rgba(250,245,236,0.95));
    border-radius: 26px;
    padding: 22px;
    line-height: 1.9;
}

.workflow-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.setting-panel {
    padding: 22px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ratio-chip {
    padding: 12px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--line);
    text-align: center;
    font-weight: 700;
    color: #475569;
}

.style-grid {
    display: grid;
    gap: 12px;
}

.style-chip {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,245,236,0.92));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.style-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(16,185,129,0.26);
}

.style-chip strong {
    display: block;
    margin-bottom: 6px;
}

.workflow-banner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.workflow-banner::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.12), transparent 70%);
}

.workflow-banner-copy h2 {
    font-size: 30px;
    margin: 0 0 12px;
}

.workflow-progress-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.workflow-progress-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(231,221,208,0.84);
    color: var(--muted);
    font-size: 13px;
}

.workflow-banner-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-illustration {
    position: relative;
    width: 100%;
    min-height: 170px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(248,241,232,0.96));
    border: 1px solid rgba(255,255,255,0.86);
    overflow: hidden;
}

.workflow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.orb-one {
    width: 110px;
    height: 110px;
    top: -28px;
    right: -18px;
    background: rgba(16,185,129,0.18);
}

.orb-two {
    width: 64px;
    height: 64px;
    left: 24px;
    bottom: 22px;
    background: rgba(245,158,11,0.18);
}

.orb-three {
    width: 42px;
    height: 42px;
    left: 110px;
    top: 30px;
    background: rgba(139,92,246,0.18);
}

.workflow-screen {
    position: absolute;
    inset: 26px 28px 26px 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,238,229,0.96));
    border: 1px solid rgba(231,221,208,0.8);
    padding: 16px;
}

.workflow-screen-bar {
    width: 36%;
    height: 12px;
    border-radius: 999px;
    background: rgba(16,185,129,0.18);
    margin-bottom: 14px;
}

.workflow-screen-lines {
    height: calc(100% - 26px);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(148,163,184,0.2) 0 14%, transparent 14% 24%, rgba(148,163,184,0.14) 24% 34%, transparent 34% 44%, rgba(148,163,184,0.18) 44% 58%, transparent 58% 70%, rgba(148,163,184,0.12) 70% 82%, transparent 82% 100%);
}

.workflow-progress-track {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: -6px;
}

.workflow-progress-segment {
    height: 8px;
    border-radius: 999px;
    background: rgba(203,213,225,0.65);
}

.workflow-progress-segment.active {
    background: linear-gradient(135deg, var(--primary), #34d399);
}

.step-bar {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 14px;
    border-radius: 26px;
    background: rgba(255,255,255,0.72);
}

.step-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 16px;
    background: rgba(251, 247, 239, 0.9);
    border: 1px solid var(--line);
    color: #64748b;
}

.step-item.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.08));
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--primary-dark);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.16);
}

.step-item.done {
    background: rgba(255,255,255,0.92);
    border-color: rgba(16,185,129,0.18);
    color: #475569;
}

.step-item.disabled {
    opacity: 0.45;
}

.step-index {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}

.editor-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 20px;
}

.editor-shell.three-col {
    grid-template-columns: 280px 1fr 360px;
}

.sticky-panel {
    position: sticky;
    top: 106px;
    align-self: start;
}

.sticky-right-panel {
    top: 106px;
}

.sidebar {
    min-width: 0;
}

.sidebar-list {
    display: grid;
    gap: 10px;
}

.sidebar-link,
.tab-link,
.storyboard-item {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sidebar-link small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.sidebar-link:hover,
.tab-link:hover,
.storyboard-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sidebar-link.active,
.tab-link.active,
.storyboard-item.active {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(255,255,255,0.86));
    color: var(--primary-dark);
}

.sidebar-actions,
.spaced-top {
    margin-top: 18px;
}

.editor-main {
    min-width: 0;
}

.editor-stage {
    min-height: 100%;
}

.editor-stage .storyboard-list {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.episodes-workbench {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 20px;
}

.episodes-directory {
    min-height: 100%;
}

.episodes-directory-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.episodes-directory-meta span,
.toolbar-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(231,221,208,0.84);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.toolbar-chip.accent {
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.18);
    color: #6d28d9;
}

.toolbar-chip.mini {
    padding: 6px 10px;
    font-size: 12px;
}

.episode-directory-item {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.episode-directory-item:hover {
    transform: translateX(2px) translateY(-1px);
}

.episode-directory-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.episodes-editor-shell {
    overflow: hidden;
}

.episodes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.episodes-toolbar-main {
    display: grid;
    gap: 12px;
    width: 100%;
}

.episodes-toolbar-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.episodes-topbar {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.84), rgba(245,239,228,0.96));
    border: 1px solid rgba(231,221,208,0.86);
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.episodes-topbar-left {
    display: flex;
    gap: 8px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.window-dot.red { background: #f87171; }
.window-dot.yellow { background: #fbbf24; }
.window-dot.green { background: #34d399; }

.episodes-topbar-center {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

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

.episodes-editor-form {
    gap: 14px;
}

.episodes-scriptarea {
    min-height: 640px;
    padding: 24px;
    line-height: 1.95;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255,253,248,0.98), rgba(250,245,236,0.96)),
        repeating-linear-gradient(180deg, transparent 0 30px, rgba(148,163,184,0.08) 30px 31px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.episodes-bottom-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.episodes-skeleton-strip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skeleton-pill {
    display: inline-block;
    width: 120px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(231,221,208,0.65), rgba(255,255,255,0.96), rgba(231,221,208,0.65));
    background-size: 240px 100%;
    animation: shimmer 1.8s linear infinite;
}

.skeleton-pill.short {
    width: 74px;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.asset-card {
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.asset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(119, 98, 72, 0.16);
    border-color: rgba(16,185,129,0.22);
}

.asset-card h3 {
    font-size: 18px;
    margin-top: 2px;
}

.asset-image,
.preview-video {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
    background: #f0ece5;
}

.asset-placeholder {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(180deg, #f7f2ea, #ece4d7);
    color: var(--muted);
    margin-bottom: 16px;
}

.asset-placeholder.tall {
    height: 400px;
    margin-bottom: 0;
}

.asset-type-badge {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(231,221,208,0.88);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.asset-card-hover {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(31,41,55,0.02), rgba(31,41,55,0.72));
    color: #fff;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.asset-card-hover span,
.asset-card-hover strong {
    display: block;
}

.asset-card:hover .asset-card-hover {
    opacity: 1;
    transform: translateY(0);
}

.asset-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    margin-bottom: 20px;
}

.asset-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.metric-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(255,255,255,0.82);
}

.metric-card strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

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

.storyboard-item strong,
.storyboard-item span,
.storyboard-item small {
    display: block;
}

.storyboard-item small {
    margin-top: 8px;
    color: var(--muted);
}

.storyboard-item {
    position: relative;
    overflow: hidden;
}

.storyboard-item::after {
    content: "";
    position: absolute;
    inset: auto -20px -30px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.storyboard-item:hover::after,
.storyboard-item.active::after {
    opacity: 1;
}

.checkbox-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow: auto;
    padding-right: 4px;
}

.preview-box {
    margin-top: 18px;
}

.preview-stage {
    padding: 16px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(247,242,234,0.94));
}

.preview-stage::after {
    content: "";
    display: block;
    height: 10px;
    margin-top: 18px;
    border-radius: 999px;
    background:
        linear-gradient(90deg,
            rgba(16,185,129,0.7) 0 18%,
            rgba(255,255,255,0.92) 18% 22%,
            rgba(16,185,129,0.28) 22% 44%,
            rgba(255,255,255,0.92) 44% 48%,
            rgba(139,92,246,0.24) 48% 72%,
            rgba(255,255,255,0.92) 72% 76%,
            rgba(245,158,11,0.24) 76% 100%);
}

.preview-stage-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.preview-stage-info span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(231,221,208,0.84);
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-top: 1px solid rgba(231, 221, 208, 0.8);
    white-space: nowrap;
    background: rgba(255,255,255,0.55);
}

thead th {
    border-top: 0;
    background: rgba(247, 243, 236, 0.9);
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.center {
    text-align: center;
}

.input-inline {
    min-width: 280px;
}

.wrap {
    align-items: flex-end;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.danger-card {
    border-color: rgba(220, 38, 38, 0.18);
}

.saas-form-panel {
    position: relative;
    overflow: hidden;
}

.saas-form-panel::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.1), transparent 72%);
    pointer-events: none;
}

.profile-danger-form {
    align-items: stretch;
}

.profile-danger-form input {
    min-width: 280px;
}

.empty-state {
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(248,252,250,0.9), rgba(239,248,244,0.9));
}

.empty-state.compact {
    padding: 24px;
}

.section-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0;
}

.compact-form {
    gap: 10px;
}

.auth-shell {
    display: grid;
    grid-template-columns: 0.95fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.auth-panel {
    min-height: 100%;
    padding: 34px;
}

.auth-aside {
    background:
        radial-gradient(circle at top left, rgba(16,185,129,0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(139,92,246,0.16), transparent 30%),
        linear-gradient(135deg, #fffefb, #f6efe3);
}

.auth-aside h2 {
    font-size: 34px;
    margin: 0 0 12px;
    line-height: 1.2;
}

.auth-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.auth-feature {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.8);
}

.auth-illustration {
    margin-top: 22px;
}

@keyframes shimmer {
    0% {
        background-position: -240px 0;
    }
    100% {
        background-position: 240px 0;
    }
}

@media (max-width: 1100px) {
    .dashboard-hero,
    .asset-toolbar,
    .workflow-banner,
    .workflow-shell,
    .episodes-workbench,
    .editor-shell,
    .editor-shell.three-col,
    .auth-shell,
    .grid-two {
        grid-template-columns: 1fr;
    }

    .stat-grid.four-up,
    .option-grid.four-up,
    .asset-grid,
    .project-archive {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100vw - 20px, 100%);
    }

    .page-shell {
        padding-top: 16px;
    }

    .hero,
    .hero-highlight,
    .asset-metrics,
    .ratio-grid,
    .workflow-progress-track,
    .stat-grid.four-up,
    .option-grid.four-up,
    .asset-grid,
    .project-archive {
        grid-template-columns: 1fr;
    }

    .episodes-topbar {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .sticky-panel {
        position: static;
    }

    .hero-copy h1,
    .page-header h1,
    .card h1,
    .dashboard-callout h2,
    .auth-aside h2 {
        font-size: 30px;
    }

    .page-header,
    .nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        justify-content: center;
    }

    .nav-links {
        justify-content: center;
    }
}
