:root {
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 15px;
    --text-lg: 18px;
    --text-xl: 25px;
    --text-display: 34px;
    color-scheme: light;
    --ink: #111323;
    --muted: #626b83;
    --line: #dfe4ed;
    --paper: #fff;
    --card: #fff;
    --surface-raised: #f0f3f8;
    --green: #00d4e4;
    --green-dark: #00838e;
    --pale: #e6fbfc;
    --yellow: #86621e;
    --red: #ae263a;
    --error-surface: #fff0f1;
    --shadow: 0 14px 34px rgba(23, 44, 67, .12)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: var(--text-md)/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

.app-shell {
    min-height: 100vh;
    display: flex
}

.sidebar {
    width: 226px;
    background: var(--paper);
    border-right: 1px solid var(--line);
    padding: 28px 16px 20px;
    display: flex;
    flex-direction: column
}

.brand,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 22px;
    font-weight: 780;
    letter-spacing: 0
}

.brand-mark {
    background: var(--green);
    color: var(--ink);
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700
}

.brand-period {
    color: var(--green-dark)
}

.sidebar-caption {
    color: var(--muted);
    font-size: var(--text-xs);
    margin: 8px 0 36px;
    padding-left: 38px
}

.navigation {
    display: grid;
    gap: 5px
}

.nav-item {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 11px 13px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600
}

.nav-item:hover {
    color: var(--ink);
    background: var(--surface-raised)
}

.nav-item:focus,
.nav-item:focus-visible {
    outline: 0;
    box-shadow: none;
}

.nav-item.active {
    background: var(--card);
    color: var(--green-dark);
    box-shadow: 0 2px 8px rgba(44, 60, 50, .05)
}

.sidebar-bottom {
    margin-top: auto;
    color: var(--muted);
    font-size: var(--text-xs);
    padding: 15px 8px 0;
    border-top: 1px solid var(--line)
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    margin-right: 4px
}

.sidebar-version {
    float: right;
    color: var(--muted)
}

.main-column {
    min-width: 0;
    flex: 1
}

.topbar {
    height: 78px;
    padding: 0 5.2vw;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    gap: 25px
}

.mobile-brand {
    display: none
}

.workspace-picker {
    display: flex;
    align-items: baseline;
    gap: 9px
}

.workspace-picker label {
    color: var(--muted);
    font-size: var(--text-xs)
}

.workspace-picker select {
    border: 0;
    background: transparent;
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--ink);
    padding: 3px 22px 3px 0
}

.workspace-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 190px;
    width: 100%;
    border: 0;
    padding: 2px 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.workspace-trigger:disabled {
    color: var(--muted);
    cursor: not-allowed;
}

.workspace-chevron {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
}

.workspace-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    box-shadow: 0 14px 32px rgba(33, 56, 44, .14);
}

.workspace-menu[hidden] {
    display: none;
}

.workspace-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 10px 11px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.workspace-option:hover,
.workspace-option[aria-selected="true"] {
    background: var(--pale);
    color: var(--green-dark);
}

.workspace-empty {
    padding: 11px;
    color: var(--muted);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.workspace-picker {
    position: relative;
}

.top-actions {
    margin-left: auto;
    display: flex;
    gap: 9px
}

.button {
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 10px 15px;
    font-weight: 700;
    transition: .18s ease
}

.button.primary {
    color: var(--ink);
    background: var(--green)
}

.button.primary:hover {
    background: var(--green-dark);
    transform: translateY(-1px)
}

.button.subtle {
    background: var(--card);
    border-color: var(--line);
    color: var(--muted)
}

.button.subtle:hover {
    border-color: var(--line);
    color: var(--green-dark)
}

.content {
    max-width: 1120px;
    margin: auto;
    padding: 48px 5.2vw 80px
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 34px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 800;
    margin: 0 0 9px
}

.hero h1 {
    font-size: var(--text-display);
    letter-spacing: 0;
    line-height: 1.12;
    margin: 0 0 9px
}

.hero p {
    margin: 0;
    color: var(--muted)
}

.hero-action {
    white-space: nowrap
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 30px
}

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

.stat-card {
    padding: 18px 20px
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--muted);
    margin-bottom: 13px
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: 750;
    letter-spacing: 0
}

.stat-note {
    color: var(--muted);
    font-size: var(--text-xs);
    margin-left: 7px
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 35px 0 14px
}

.section-heading h2 {
    font-size: var(--text-lg);
    letter-spacing: 0;
    margin: 0
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--green-dark);
    font-weight: 700;
    padding: 4px
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 39px;
    text-align: center;
    color: var(--muted);
    background: var(--card)
}

.empty strong {
    display: block;
    color: var(--ink);
    font-size: var(--text-md);
    margin-bottom: 5px
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px
}

.asset-card {
    overflow: hidden
}

.asset-preview {
    aspect-ratio: 1.33;
    background: var(--surface-raised);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 28px
}

.asset-preview img,
.asset-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.asset-meta {
    padding: 12px 14px
}

.asset-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700
}

.asset-sub {
    font-size: var(--text-sm);
    color: var(--muted);
    margin-top: 3px
}

.video-list {
    display: grid;
    gap: 13px
}

.video-card {
    padding: 15px;
    display: grid;
    grid-template-columns: 240px 1fr auto;
    align-items: center;
    gap: 18px
}

.video-thumb {
    background: transparent;
    border-radius: 6px;
    overflow: hidden
}

.video-thumb video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.video-thumb video:focus,
.video-thumb video:focus-visible,
.viral-feed-item video:focus,
.viral-feed-item video:focus-visible,
.compare-videos video:focus,
.compare-videos video:focus-visible {
    outline: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.video-card:focus-within,
.viral-feed-item:focus-within {
    outline: 0;
}

video:fullscreen,
video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain !important;
    background: #000;
}

.video-info h3 {
    font-size: var(--text-md);
    margin: 0 0 4px
}

.video-info p {
    color: var(--muted);
    font-size: var(--text-sm);
    margin: 0
}

.tag {
    display: inline-block;
    font-size: var(--text-xs);
    border-radius: 20px;
    padding: 3px 8px;
    background: var(--pale);
    color: var(--green-dark);
    font-weight: 700;
    margin-top: 10px
}

.tag.fail {
    background: var(--error-surface);
    color: var(--red)
}

.video-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    align-self: end;
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end
}

.icon-button {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--card);
    color: var(--muted);
    font-weight: 650;
    white-space: nowrap
}

.retry-button {
    margin-top: 14px;
}

.publish-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px
}

.publish-card {
    padding: 22px
}

.publish-card h3 {
    margin: 0 0 5px;
    font-size: var(--text-lg)
}

.publish-card>p {
    color: var(--muted);
    margin: 0 0 22px
}

.platforms {
    display: grid;
    gap: 10px
}

.platform-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    padding: 13px;
    border-radius: 8px
}

.platform-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--ink);
    font-weight: 800
}

.douyin {
    background: #242929
}

.xiaohongshu {
    background: var(--red)
}

.kuaishou {
    background: #ef9f2e
}

.shipinhao {
    background: #5ea36d
}

.platform-copy {
    flex: 1
}

.platform-copy b {
    display: block
}

.platform-copy span {
    font-size: var(--text-sm);
    color: var(--muted)
}

.platform-status {
    font-size: var(--text-xs);
    color: var(--muted)
}

.platform-status.pending {
    color: var(--green-dark)
}

.publish-note {
    background: var(--card);
    border-radius: 8px;
    padding: 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.publish-video-select {
    border: 1px dashed var(--line);
    padding: 19px;
    border-radius: 8px;
    color: var(--muted);
    margin: 16px 0
}

.modal {
    border: 0;
    padding: 0;
    border-radius: 13px;
    width: min(510px, calc(100% - 32px));
    box-shadow: 0 24px 80px #23352b2b
}

.modal::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(3px)
}

.modal-body {
    padding: 27px
}

.generate-modal { width: min(790px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: visible; }
.generate-modal .modal-body { padding: 0; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.generate-modal .modal-heading { padding: 27px 30px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.generate-modal .modal-heading h2 { font-size: 22px; }
.generate-intro { margin: 3px 0 0; color: var(--muted); font-size: var(--text-sm); }
.generate-scroll { min-height: 0; overflow-y: auto; padding: 22px 30px 0; }
.generate-section + .generate-section { margin-top: 23px; }
.skill-example { margin-top: 12px; font-size: var(--text-sm); }
.skill-example summary { cursor: pointer; color: var(--green-dark); padding: 4px 0; }
.skill-example video { display: block; margin-top: 10px; width: 100%; max-height: 260px; background: #111; border-radius: 6px; }
.skill-runtime { margin-top: 12px; font-size: var(--text-sm); line-height: 1.6; }
.skill-runtime p { margin: 0 0 8px; color: var(--muted); }
.adaptation-choice { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.adaptation-choice input { width: 17px; height: 17px; flex: none; accent-color: var(--green); }
.match-section { padding-bottom: 16px; }
.generate-prompt-section { display: none; }
.generate-chat { margin-top: 12px; display: flex; flex-direction: column; height: 300px; background: var(--card); }
.generate-chat-messages { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding: 16px 15px 13px; }
.chat-empty { align-self: flex-start; margin: 0; color: var(--muted); font-size: var(--text-sm); }
.chat-message { max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 12px; font-size: var(--text-sm); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-message.user { align-self: flex-end; background: var(--pale); color: var(--green-dark); border-bottom-right-radius: 4px; }
.chat-thinking { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.chat-thinking i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: chat-thinking-dot 1.15s ease-in-out infinite; }
.chat-thinking i:nth-of-type(2) { animation-delay: .16s; }
.chat-thinking i:nth-of-type(3) { animation-delay: .32s; }
@keyframes chat-thinking-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.generate-chat-compose { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; margin: 0 12px 12px; padding: 10px 11px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); transition: border-color .18s ease; }
.generate-chat-compose:focus-within { border-color: var(--green); }
.generate-skill-chip { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: fit-content; max-width: 100%; min-height: 29px; padding: 2px 3px 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--pale); color: var(--green-dark); font-size: var(--text-xs); font-weight: 650; }
.generate-skill-chip[hidden] { display: none; }
.generate-skill-chip span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.generate-skill-chip button { flex: none; display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 18px; line-height: 1; }
.generate-skill-chip button:hover, .generate-skill-chip button:focus-visible { background: var(--pale); }
.chat-suggestions { flex: none; display: flex; gap: 7px; min-height: 28px; margin: 0 12px 8px; overflow-x: auto; }
.chat-suggestions[hidden] { display: none; }
.chat-suggestion { flex: none; min-height: 28px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--green-dark); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.chat-suggestion:hover { border-color: var(--green); background: var(--pale); }
.generate-chat-compose textarea { width: 100%; min-height: 28px; max-height: 96px; resize: none; border: 0; padding: 2px 3px; background: transparent; font: inherit; outline: 0; line-height: 1.45; }
.generate-chat-compose > .generate-skill-chip { grid-column: 1; align-self: start; }
.generate-chat-compose > textarea { grid-column: 2; }
.generate-chat-compose textarea::placeholder { color: var(--muted); }
.generate-chat-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.chat-upload { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 4px 7px; border-radius: 7px; color: var(--green-dark); font-size: var(--text-xs); cursor: pointer; }
.chat-upload:hover { background: var(--pale); }
.generate-chat-tools #generate-chat-send { min-height: 30px; margin-left: auto; padding: 5px 14px; border-radius: 8px; font-size: var(--text-xs); }
.chat-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-upload:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.section-hint { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-xs); font-weight: 400; }
.match-result { font-size: var(--text-sm); line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.match-result { display: none !important; }
.match-result[hidden] { display: none; }
.match-summary { margin: 0 0 12px; }
.match-list { list-style: none; padding: 0; margin: 0; }
.match-item { padding: 12px 0; border-top: 1px solid var(--line); }
.match-item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.match-item-heading strong { font-weight: 600; }
.match-item-heading span { flex: none; color: var(--green-dark); font-size: var(--text-xs); }
.match-item p { margin: 4px 0 0; color: var(--muted); }
.match-missing .match-item-heading span, .match-missing .match-question { color: var(--red); }
.match-conclusion { margin: 12px 0 0; font-weight: 600; }
.generate-modal .button:disabled, .viral-modal .button:disabled { background: var(--surface-raised); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.generate-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.generate-section-heading h3 { margin: 0; font-size: var(--text-md); font-weight: 700; }
.generate-section-heading .text-button { font-size: var(--text-sm); }
.generate-optional { color: var(--muted); font-size: var(--text-xs); }
.generate-section > textarea { width: 100%; min-height: 78px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); font: inherit; outline: 0; }
.generate-section > textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--line); }
.generate-toolbar { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: var(--text-sm); }
.generate-toolbar .text-button { padding: 0; }
.skill-picker { position: relative; flex: none; }
.generate-skill-trigger { min-height: 30px; padding: 4px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--green-dark); font-size: var(--text-xs); white-space: nowrap; }
.generate-skill-trigger:hover, .generate-skill-trigger[aria-expanded="true"] { background: var(--pale); }
.generate-skill-trigger:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.generate-skill-menu { position: absolute; z-index: 20; bottom: calc(100% + 9px); left: 0; width: min(350px, calc(100vw - 70px)); padding: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 14px 34px rgba(27, 49, 37, .16); }
.generate-skill-menu[hidden] { display: none; }
.generate-skill-menu input { width: 100%; height: 39px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); color: var(--ink); font-size: var(--text-sm); }
.generate-skill-menu input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.generate-skill-options { max-height: min(180px, 25dvh); overflow-y: auto; margin-top: 7px; }
.generate-skill-option { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 0; border-radius: 5px; background: transparent; text-align: left; color: var(--ink); }
.generate-skill-option:hover, .generate-skill-option:focus-visible { background: var(--pale); outline: 0; }
.generate-skill-option[aria-selected="true"] { background: var(--pale); color: var(--green-dark); font-weight: 700; }
.generate-skill-option span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.generate-skill-option small { flex: none; color: var(--muted); font-size: var(--text-xs); }
.generate-skill-empty { padding: 20px 10px; color: var(--muted); text-align: center; font-size: var(--text-sm); }
.generate-assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-height: min(355px, 39dvh); overflow-y: auto; padding: 1px 2px 4px; }
.generate-asset { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--card); cursor: pointer; overflow: hidden; }
.generate-asset:hover { border-color: var(--green); }
.generate-asset:has(input:checked) { border-color: var(--green); background: var(--pale); box-shadow: inset 0 0 0 1px var(--green); }
.generate-asset:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.generate-asset input { position: absolute; top: 12px; right: 12px; width: 19px; height: 19px; accent-color: var(--green); z-index: 1; }
.generate-asset-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; flex: none; overflow: hidden; background: var(--surface-raised); }
.generate-asset-number { position: absolute; top: 9px; left: 9px; padding: 2px 7px; border-radius: 4px; background: rgba(22, 34, 27, .78); color: var(--ink); font-size: var(--text-xs); font-weight: 700; }
.generate-asset img, .generate-asset video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.generate-asset-copy { display: grid; gap: 2px; min-width: 0; padding: 10px 11px 12px; }
.generate-asset strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.generate-asset small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--text-xs); }
.generate-modal .upload-status { min-height: 0; margin: 0 30px; }
.generate-modal .upload-status:empty { display: none; }
.generate-modal .modal-actions { margin: 18px 0 0; padding: 16px 30px 20px; border-top: 1px solid var(--line); }
.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; }
.viral-modal { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 36px); }
.mobile-navigation { display: none; }
@media(max-width:580px) { .mobile-navigation { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); } .mobile-navigation button { min-height: 54px; border: 0; background: transparent; color: var(--muted); font-size: var(--text-xs); } .mobile-navigation button.active { color: var(--green-dark); font-weight: 700; background: var(--pale); } }
.viral-modal .modal-body { max-height: calc(100dvh - 36px); display: flex; flex-direction: column; }
.viral-scroll { overflow-y: auto; min-height: 0; }
.field .viral-file-picker { position: relative; padding: 18px 14px; border: 1px dashed var(--green); border-radius: 7px; background: var(--card); font-size: var(--text-sm); font-weight: 500; text-align: center; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.viral-file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.viral-file-picker:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.viral-modal #viral-original { display: block; width: min(100%, 280px); height: auto; object-fit: contain; margin: 16px 0; background: transparent; border-radius: 6px; }
.viral-modal #viral-original[hidden] { display: none; }
.viral-modal .generate-assets { max-height: 260px; }
.viral-subheading { font-weight: 700; margin: 22px 0 10px; }
.viral-prompt-label { display: block; margin-top: 17px; font-weight: 700; }
.viral-modal textarea { width: 100%; min-height: 75px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.viral-feed { display: grid; gap: 15px; margin-top: 20px; }
.viral-feed-item { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto; gap: 20px; padding: 15px; align-items: center; }
.viral-feed-info { min-width: 0; }
.viral-feed-item .video-actions { grid-column: 3; }
.viral-feed-item video { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: transparent; border-radius: 5px; }
.viral-upload-placeholder { display: grid; place-items: center; min-height: 140px; background: var(--card); color: var(--muted); font-size: var(--text-sm); }
.viral-feed-item h3 { margin: 0 0 8px; font-size: var(--text-lg); }
.viral-feed-item p { margin: 0 0 14px; color: var(--muted); }
.viral-feed-item .button { white-space: nowrap; }
.skeleton-viral-item { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 20px; padding: 15px; align-items: center; }
.skeleton-viral-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 5px; background: var(--surface-raised); }
.skeleton-viral-copy { display: grid; gap: 10px; min-width: 0; }
.skeleton-viral-copy .skeleton-button { width: 112px; height: 38px; }
.compare-modal { width: min(900px, calc(100% - 24px)); }
.compare-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-videos h3 { margin: 0 0 8px; font-size: var(--text-md); }
.compare-videos video { width: 100%; max-height: 60dvh; background: #18231f; }
@media(max-width:580px) { .viral-feed-item, .skeleton-viral-item, .compare-videos { grid-template-columns: 1fr; } .viral-feed-item video { width: min(100%, 240px); height: auto; } .viral-feed-item .video-actions { grid-column: 1; } }
@media(max-width:580px) { .generate-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); } .generate-modal .modal-body { max-height: calc(100dvh - 20px); } .generate-modal .modal-heading { padding: 19px 18px 16px; } .generate-scroll { padding: 18px 18px 0; } .generate-assets { grid-template-columns: 1fr; max-height: min(340px, 38dvh); } .generate-asset { flex-direction: row; min-height: 94px; } .generate-asset-media { width: 105px; aspect-ratio: 1; flex: none; } .generate-asset-copy { padding: 14px 35px 10px 12px; justify-content: center; } .generate-modal .upload-status { margin: 0 18px; } .generate-modal .modal-actions { padding: 14px 18px 18px; } }

.modal-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px
}

.modal h2 {
    font-size: 22px;
    letter-spacing: 0;
    margin: 0
}

.close-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    padding: 0 2px
}

.field {
    margin: 15px 0
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px
}

.field label span {
    color: var(--muted);
    font-weight: 400;
    font-size: var(--text-xs);
    margin-left: 4px
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px;
    background: var(--card);
    outline: 0
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--line)
}

.field textarea { min-height: 98px; resize: vertical; font: inherit; }
.dialog-feedback { margin: 14px 0 0; padding: 9px 11px; border-radius: 6px; background: var(--pale); color: var(--green-dark); font-size: var(--text-sm); }
.dialog-feedback[hidden] { display: none; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 25px
}

.upload-zone {
    border: 1px dashed var(--line);
    background: var(--card);
    border-radius: 9px;
    padding: 26px;
    text-align: center;
    position: relative
}

.upload-zone:focus-within,
.upload-zone:focus {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.upload-status {
    min-height: 18px;
    color: var(--green-dark);
    font-size: var(--text-sm);
}
#upload-status:not(:empty) { padding-top: 12px; }
.upload-progress, .uploaded-preview-row progress { width: 100%; height: 8px; accent-color: var(--green); }
.upload-progress[hidden] { display: none; }
.uploaded-preview-row progress { max-width: 96px; flex: 0 0 96px; }

.pasted-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.pasted-preview[hidden] { display: none; }
.uploaded-preview-row { display: grid; justify-items: center; gap: 8px; min-width: 0; text-align: center; }
.uploaded-preview-row > img, .uploaded-preview-row > video { width: min(100%, 180px); aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: var(--surface-raised); }
.uploaded-preview-details { display: grid; gap: 4px; min-width: 0; }
.uploaded-preview-details strong { color: var(--green-dark); font-size: var(--text-sm); }
.uploaded-preview-row.is-uploading span { color: var(--muted); font-size: var(--text-sm); }
.pasted-preview img { width: 100%; height: auto; border-radius: 8px; object-fit: cover; }
.pasted-preview a { min-width: 0; overflow: hidden; color: var(--green-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.upload-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer
}

.upload-zone p {
    font-weight: 700;
    margin: 0 0 4px
}

.upload-zone small {
    color: var(--muted)
}

.dialog-copy {
    color: var(--muted);
    margin: 0 0 17px
}

.requirements {
    display: grid;
    gap: 9px
}

.requirements div {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    background: var(--card);
    border-radius: 7px;
    font-size: var(--text-sm)
}

.requirements b {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--green-dark);
    font-size: var(--text-xs)
}

.toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    background: #27352e;
    color: var(--ink);
    padding: 11px 15px;
    border-radius: 7px;
    opacity: 0;
    transform: translateY(8px);
    transition: .2s;
    pointer-events: none;
    z-index: 1000
}

.toast.show {
    opacity: 1;
    transform: translateY(0)
}

@media(max-width:800px) {
    .sidebar {
        width: 76px;
        padding: 22px 10px
    }

    .brand {
        justify-content: center;
        font-size: 0
    }

    .sidebar-caption,
    .sidebar-bottom,
    .nav-item {
        font-size: 0
    }

    .nav-item {
        height: 42px;
        position: relative
    }

    .nav-item:before {
        content: "•";
        font-size: 22px;
        position: absolute;
        left: 30px;
        top: 6px
    }

    .nav-item.active:before {
        content: "";
        width: 5px;
        height: 20px;
        border-radius: 4px;
        background: var(--green);
        left: 28px;
        top: 11px
    }

    .topbar {
        padding: 0 22px
    }

    .content {
        padding: 34px 22px 60px
    }

    .mobile-brand {
        display: flex
    }

    .workspace-picker {
        margin-left: auto
    }

    .topbar .workspace-picker label {
        display: none
    }

    .top-actions .subtle {
        display: none
    }

    .publish-layout {
        grid-template-columns: 1fr
    }
}

@media(max-width:580px) {
    .sidebar {
        display: none
    }

    .topbar {
        height: 66px;
        padding: 0 17px
    }

    .top-actions .primary {
        display: none;
    }

    .workspace-picker {
        margin-left: 10px
    }

    .workspace-picker select {
        max-width: 115px
    }

    .hero {
        display: block
    }

    .hero-action {
        margin-top: 18px
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .stat-card {
        min-width: 0;
        padding: 13px 10px
    }

    .stat-value {
        font-size: 21px
    }

    .stat-note {
        display: none
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px
    }

    .video-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 11px;
        gap: 11px
    }

    .video-actions {
        grid-column: 1
    }

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

    .field-grid {
        grid-template-columns: 1fr
    }

    .content {
        padding-left: 16px;
        padding-right: 16px
    }

    .hero h1 {
        font-size: 30px;
        letter-spacing: 0;
    }
}

/* Workspace polish */


.sidebar {
    background: var(--paper);
    border-right-color: var(--line);
}

.topbar {
    min-height: 82px;
    background: var(--paper);
    border-bottom-color: var(--line);
}

.workspace-picker {
    min-width: min(330px, 42vw);
    padding: 7px 28px 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    gap: 11px;
    align-items: center;
}

.workspace-picker label {
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 600;
}

.asset-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-details { flex: 1; min-width: 0; }
.asset-details .asset-sub { overflow-wrap: anywhere; }
.asset-tools { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.asset-edit { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: var(--card); color: var(--green-dark); cursor: pointer; }
.asset-edit img { width: 15px; height: 15px; opacity: .8; }
.asset-edit:hover, .asset-edit:focus-visible { border-color: var(--green); background: var(--pale); }

.asset-delete {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--card);
    color: var(--muted);
    font-size: 0;
    line-height: 1;
    cursor: pointer;
}

.asset-delete::before,
.asset-delete::after {
    content: "";
    position: absolute;
    top: 13px;
    left: 8px;
    width: 12px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.asset-delete::after { transform: rotate(-45deg); }

.asset-delete:hover {
    border-color: var(--error-surface);
    background: var(--card);
    color: var(--red);
}

.asset-delete.is-deleting { opacity: .55; cursor: wait; }
.asset-delete.is-deleting::before { width: 11px; height: 11px; left: 8px; top: 8px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; background: transparent; transform: none; animation: spin .7s linear infinite; }
.asset-delete.is-deleting::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.asset-unavailable {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
    font-size: var(--text-sm);
}

.workspace-picker select {
    appearance: none;
    min-width: 190px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 28px 2px 0;
    background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 12px) 50% / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 8px) 50% / 5px 5px no-repeat;
}

.workspace-picker:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px #e0eee3;
}

.retry-action {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.workspace-picker select:disabled {
    color: var(--muted);
    cursor: not-allowed;
    font-size: var(--text-sm);
    font-weight: 400;
    opacity: 1;
}

.workspace-picker:has(select:disabled) {
    background: var(--paper);
    border-style: dashed;
}

.button {
    min-height: 40px;
    border-radius: 8px;
    padding: 9px 16px;
    letter-spacing: 0;
}

.button.primary {
    box-shadow: 0 4px 10px rgba(24, 38, 29, .12);
}

.button.primary:hover {
    box-shadow: 0 6px 15px rgba(24, 38, 29, .17);
}

.button.subtle {
    background: var(--card);
    border-color: var(--line);
}

.content {
    padding-top: 54px;
}

.first-run {
    max-width: 620px;
    padding: 34px 0;
}

.first-run h1 {
    margin: 0 0 15px;
    font-size: var(--text-display);
    line-height: 1.3;
    letter-spacing: 0;
}

.first-run p:not(.eyebrow) {
    max-width: 38ch;
    margin: 0 0 27px;
    color: var(--muted);
}

.hero h1 {
    font-size: var(--text-display);
    letter-spacing: 0;
}

.stat-card,
.card {
    border-color: var(--line);
    box-shadow: var(--shadow);
}

.stat-card {
    border-radius: 11px;
    padding: 20px 21px;
}

.asset-card,
.video-card,
.publish-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.asset-card:hover,
.video-card:hover,
.publish-card:hover {
    border-color: var(--line);
    box-shadow: 0 12px 28px rgba(33, 56, 44, .09);
    transform: translateY(-2px);
}

.asset-preview {
    background: var(--pale);
}

.tag {
    background: var(--pale);
    color: var(--green-dark);
}

@media(max-width:800px) {
    .workspace-picker {
        min-width: 0;
        flex: 1;
    }

    .workspace-picker select {
        min-width: 0;
    }

    .workspace-trigger {
        min-width: 0;
    }

}

.skeleton-content {
    pointer-events: none;
}

.skeleton {
    display: block;
    border-radius: 5px;
    background: linear-gradient(100deg, var(--surface-raised) 28%, var(--paper) 48%, var(--surface-raised) 68%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 13px;
    margin-bottom: 13px;
}

.skeleton-short {
    width: 30%;
}

.skeleton-medium {
    width: 58%;
}

.skeleton-long {
    width: min(370px, 90%);
}

.skeleton-title {
    width: min(430px, 90%);
    height: 36px;
}

.skeleton-tiny {
    width: 19%;
}

.skeleton-number {
    width: 45px;
    height: 30px;
    margin-top: 14px;
}

.skeleton-button {
    width: 130px;
    height: 41px;
    border-radius: 8px;
}

.skeleton-hero>div {
    flex: 1;
}

.skeleton-hero .skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-stat .skeleton-line {
    margin-bottom: 0;
}

.skeleton-video {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px;
    align-items: center;
    padding: 15px;
}

.skeleton-video-thumb {
    aspect-ratio: 9 / 16;
    border-radius: 6px;
}

.skeleton-video-copy {
    width: min(310px, 95%);
}

.skeleton-video-copy .skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-asset {
    overflow: hidden;
}

.skeleton-asset-thumb {
    aspect-ratio: 1.33;
    border-radius: 0;
}

.skeleton-asset-copy {
    padding: 15px;
}

.skeleton-asset-copy .skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-panel {
    min-height: 305px;
    padding: 22px;
}

.skeleton-panel .skeleton-line {
    margin-bottom: 18px;
}

.skeleton-field {
    height: 46px;
    margin: 12px 0;
    border-radius: 7px;
}

@keyframes skeleton-shimmer {
    to {
        background-position-x: -200%;
    }
}

@media(max-width:580px) {
    .skeleton-video {
        grid-template-columns: 104px 1fr;
        gap: 11px;
        padding: 11px;
    }

    .skeleton-button {
        width: 112px;
    }

    .skeleton-title {
        height: 30px;
    }
}

@media(prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: var(--surface-raised);
    }
}

.publishing-account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.publish-card .field-select { width: 100%; margin: 10px 0; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.publish-history { margin-top: 30px; }
.publishing-task-list { display: grid; gap: 12px; }
.publishing-task { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.publishing-task > div { min-width: 0; overflow-wrap: anywhere; }
.publishing-task p { margin: 8px 0; }
.publishing-task small { color: var(--muted); }
.publishing-task .tag { flex: none; }
.publish-modal-video { display: block; width: 100%; max-height: 220px; margin: 16px 0; background: #202720; border-radius: 8px; }
.douyin-qr-area { min-height: 260px; display: grid; place-items: center; padding: 10px 0; }
.douyin-qr-area img { max-width: 100%; object-fit: contain; }
.douyin-qr-area img[hidden] { display: none; }
#douyin-login-status, #publish-form-status { padding-top: 12px; }
@media (max-width: 580px) { .publishing-task { flex-direction: column; gap: 8px; } }

.publish-studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.publish-library .section-heading { margin-bottom: 8px; }
.publish-help { color: var(--muted); margin: 0 0 22px; }
.publish-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.publish-tile { min-width: 0; padding: 0; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 12px; }
.publish-tile-cover { position: relative; display: block; aspect-ratio: 9 / 14; background: var(--surface-raised); border-radius: 12px; overflow: hidden; outline: 3px solid transparent; outline-offset: 3px; }
.publish-tile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.publish-tile-cover:has(img[hidden]), .publish-cover-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); }
.publish-tile[aria-pressed="true"] .publish-tile-cover { outline-color: var(--green); }
.publish-tile:hover .publish-tile-cover { outline-color: var(--muted); }
.publish-tile[aria-pressed="true"]:hover .publish-tile-cover { outline-color: var(--green); }
.publish-tile:focus-visible { outline: 2px solid var(--green); outline-offset: 7px; }
.publish-tile-check { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: white; display: none; }
.publish-tile[aria-pressed="true"] .publish-tile-check { display: grid; place-items: center; }
.publish-tile-check svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.publish-tile-hint { position: absolute; bottom: 10px; left: 10px; padding: 3px 8px; border-radius: 4px; background: #202624e6; color: white; font-size: 12px; }
.publish-tile-name { display: block; margin-top: 12px; font-weight: 600; overflow-wrap: anywhere; }
.publish-tile-date { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.publish-composer { min-width: 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.publish-preview-stage { background: #202624; border-radius: 10px; overflow: hidden; }
.publish-preview-stage video { display: block; width: 100%; height: 330px; object-fit: contain; }
.publish-preview-heading { margin: 18px 0 24px; }
.publish-preview-heading h2 { margin: 0 0 3px; font-size: 18px; }
.publish-preview-heading .muted { font-size: 13px; }
.publish-destination-label { font-size: 13px; color: var(--muted); }
.publish-account-line { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 6px; }
.publish-account-line strong { min-width: 0; overflow-wrap: anywhere; }
.publish-account-line .platform-status { flex: none; }
.publish-destination p { color: var(--muted); font-size: 13px; margin: 10px 0 18px; }
.publish-next { width: 100%; justify-content: center; }
.publish-composer .publishing-account-actions { justify-content: space-between; margin-top: 14px; }
@media (max-width: 1100px) { .publish-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .publish-studio { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; } }
@media (max-width: 760px) { .publish-studio { grid-template-columns: 1fr; gap: 28px; } .publish-preview-stage video { height: 320px; } .publish-help { font-size: 13px; } }

.publish-platform-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.publish-platform-picker button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.publish-platform-picker button[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.publish-platform-picker button:hover { border-color: var(--green); }
.publish-platform-picker button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.publish-task-platform { display: inline-block; margin-left: 12px; }
#instagram-login-status { padding-top: 12px; }

/* Creation studio: the shared visual system for every workspace surface. */
::selection { background: var(--green); color: #102025; }
html { scrollbar-color: #48484f var(--paper); }
body { caret-color: var(--green); }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
.nav-item:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.sidebar { width: 208px; padding: 30px 18px 24px; background: #19191b; position: sticky; top: 0; height: 100dvh; flex-shrink: 0; }
.brand { font-size: 25px; gap: 10px; }
.brand-mark { background: var(--green); color: #102025; border-radius: 9px; }
.sidebar-caption { padding-left: 0; margin: 14px 0 36px; color: var(--muted); }
.navigation { gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; color: var(--muted); font-weight: 500; }
.nav-item svg, .studio-search svg, .studio-skill-cover svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item.active { color: var(--ink); background: var(--surface-raised); box-shadow: none; }
.nav-item.active svg { color: var(--green-dark); }
.sidebar-bottom { padding: 20px 0 0; line-height: 1.8; }
.topbar { height: 76px; padding: 0 36px; background: var(--paper); }
.workspace-picker label { color: var(--muted); }
.workspace-trigger { background: transparent; border-color: var(--line); color: var(--ink); }
.top-actions { gap: 12px; }
.button { border-radius: 9px; min-height: 40px; font-weight: 600; }
.button.primary { background: var(--green); color: #102025; border-color: transparent; box-shadow: none; }
.button.primary:hover { background: #64def2; }
.button.subtle, .icon-button { background: var(--surface-raised); color: var(--ink); border-color: transparent; }
.button.subtle:hover, .icon-button:hover { background: #3b3b42; border-color: transparent; }
.button:disabled, .generate-modal .button:disabled, .viral-modal .button:disabled { background: var(--surface-raised); color: var(--muted); cursor: not-allowed; opacity: .65; }
.content { max-width: 1480px; padding: 42px 36px 60px; margin: 0 auto; }
.hero { align-items: center; margin-bottom: 30px; }
.hero h1 { font-size: 30px; font-weight: 650; line-height: 1.3; }
.hero p { margin-top: 10px; }
.eyebrow { display: none; }
.card { background: var(--card); border-color: transparent; border-radius: 14px; box-shadow: none; }
.grid { gap: 20px; column-gap: 32px; }
.asset-preview { background: #1b1b1e; }
.asset-tools img { filter: brightness(0) invert(.8); }
.asset-edit, .asset-delete { width: 32px; height: 32px; }
.section-heading { align-items: center; margin: 0 0 22px; }
.section-heading h2 { font-size: 20px; font-weight: 600; }
.section-heading p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.studio-intro { max-width: 920px; margin: 14px auto 52px; text-align: center; }
.studio-intro h1 { font-size: clamp(26px, 2.8vw, 38px); font-weight: 620; letter-spacing: -.025em; margin: 0 0 12px; line-height: 1.3; text-wrap: balance; }
.studio-intro > p { color: var(--muted); margin: 0; }
.studio-composer { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-top: 28px; padding: 20px; transition: border-color .2s; }
.studio-composer:focus-within { border-color: var(--green); }
.studio-composer textarea { background: transparent; border: 0; color: var(--ink); resize: vertical; width: 100%; min-height: 90px; max-height: 300px; padding: 0; font: inherit; line-height: 1.8; }
.studio-composer textarea:focus-visible { outline: none; }
.studio-composer-tools { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 12px; }
.studio-input-tools { display: flex; align-items: center; min-width: 0; gap: 12px; }
.studio-input-tools > button { flex-shrink: 0; font-size: 13px; }
.studio-selection { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
#studio-selected { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.studio-selection button { border: 0; background: transparent; color: var(--ink); font-size: 18px; }
.studio-context { font-size: 12px; margin-top: 14px !important; }
.studio-library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.studio-filters { display: flex; gap: 6px; }
.studio-filters button { border: 0; background: transparent; color: var(--muted); padding: 9px 15px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.studio-filters button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); }
.studio-filters button:hover { color: var(--ink); }
.studio-search { display: flex; align-items: center; gap: 8px; width: 230px; padding: 9px 12px; background: var(--card); border-radius: 8px; color: var(--muted); }
.studio-search input { min-width: 0; width: 100%; background: transparent; border: 0; color: var(--ink); font-size: 13px; }
#studio-result-count { color: var(--muted); font-size: 12px; }
.studio-skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.studio-skill-card { display: flex; gap: 14px; min-width: 0; min-height: 142px; padding: 14px; background: var(--card); border: 1px solid transparent; border-radius: 12px; color: var(--ink); text-align: left; transition: background .18s; }
.studio-skill-card:hover { background: #2c2c31; }
.skill-admin-card { display:flex; flex-direction:column; min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.skills-library .skill-admin-card .studio-skill-card { width:100%; flex:1; border:0; border-radius:0; }
.skill-admin-card:focus-within { border-color:var(--green-dark); }
.studio-skill-cover { position: relative; width: 90px; height: 114px; flex-shrink: 0; display: grid; place-items: center; background: #303036; border-radius: 8px; overflow: hidden; color: var(--muted); }
.studio-skill-cover svg { width: 28px; height: 28px; }
.studio-skill-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-skill-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.studio-skill-copy strong { font-size: 14px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.studio-skill-copy > span { color: var(--muted); font-size: 12px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.studio-skill-copy small { font-size: 11px; color: var(--muted); margin-top: auto; }
.studio-more { text-align: center; margin-top: 24px; }
.studio-no-results { padding: 60px 16px; text-align: center; color: var(--muted); }
.skill-import-card { min-width:0; border-color:#cfdeeb; }
.skill-import-content { cursor:default; min-height:142px; align-items:center; background:#f8fbfd; }
.skill-import-content:hover { background:var(--card); }
.skill-import-content .studio-skill-cover { width:156px; height:114px; }
.skill-import-content .studio-skill-cover video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.skill-import-content .studio-skill-copy { gap:6px; }
.skill-import-content .studio-skill-copy > span { -webkit-line-clamp:unset; line-clamp:unset; }
.skill-import-content .studio-skill-copy > span:first-of-type { color:var(--ink); font-size:13px; font-weight:550; }
.skill-import-content .studio-skill-copy small { overflow-wrap:anywhere; }
.skill-import-progress { position:relative; display:grid; grid-template-columns:minmax(0,1fr); gap:3px; margin:12px 14px 0; padding:0 0 12px; list-style:none; }
.skill-import-progress::before { position:absolute; top:16px; bottom:28px; left:13px; width:1px; background:var(--line); content:""; }
.skill-import-step { position:relative; display:flex; align-items:center; gap:9px; min-width:0; min-height:32px; padding:5px 9px; border-radius:6px; color:var(--muted); font-size:12px; line-height:1.35; }
.skill-import-step::before { z-index:1; content:""; width:8px; height:8px; flex:0 0 8px; border:1px solid currentColor; border-radius:50%; background:var(--card); }
.skill-import-step.is-complete { color:var(--green-dark); background:rgba(0,131,142,.06); }
.skill-import-step.is-complete::before { background:currentColor; }
.skill-import-step.is-current { color:#385c78; background:#edf4fa; font-weight:600; }
.skill-import-step.is-current::before { border-width:2px; background:var(--card); }
.skill-import-step.is-failed { color:var(--red); background:#fff0f1; font-weight:600; }
.skill-import-step.is-failed::before { background:currentColor; }
.skill-import-markdown { min-width:0; }
.skill-import-markdown h4 { margin:0 14px 6px; font-size:12px; font-weight:600; }
.skill-import-markdown pre { max-height:320px; overflow:auto; margin:0 14px 12px; padding:12px; border:1px solid var(--line); border-radius:6px; background:var(--surface-inset); color:var(--text); font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.skill-import-error { display:block; margin:2px 0 5px 17px; padding:8px 10px; border:1px solid #f0ccd2; border-radius:6px; background:#fff7f8; overflow-wrap:anywhere; white-space:pre-wrap; color:var(--red); font-size:12px; line-height:1.5; }
.skill-import-state { color:var(--skill-status-ink); font-size:12px; font-weight:600; }
.skill-admin-status.is-extracting { --skill-status-ink:#385c78; --skill-status-fill:#edf4fa; --skill-status-border:#cfdeeb; background:#f4f8fb; }
.skill-admin-status.is-extraction_failed { --skill-status-ink:#ae263a; --skill-status-fill:#fff0f1; --skill-status-border:#f0ccd2; background:#fff7f8; border-top-color:#f0ccd2; }
.skill-import-card .skill-admin-status { flex-wrap:wrap; }
.skill-import-card .skill-admin-status [data-retry-skill-import] { margin-left:auto; }
@media(max-width:600px) { .skill-import-content .studio-skill-cover { width:100px; height:114px; } }
.studio-recent { margin-top: 48px; }
.video-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; column-gap: 32px; }
.video-page-sentinel { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 13px; }
.video-page-spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: video-page-spin .7s linear infinite; }
@keyframes video-page-spin { to { transform: rotate(360deg); } }
.video-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.video-thumb { border-radius: 0; min-height: 180px; aspect-ratio: 16 / 10; background: #1b1b1e; }
.video-thumb video { width: 100%; height: 100%; object-fit: contain; }
.video-info { padding: 16px; }
.video-info h3 { overflow-wrap: anywhere; }
.video-info p { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-info .tag { margin-top: 12px; }
.video-reference-chip { margin-inline-end: 6px; }
.video-failure-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.video-failure-details summary { color: var(--red); cursor: pointer; font-size: 13px; font-weight: 650; }
.video-failure-details p { display: block; margin: 9px 0; overflow-wrap: anywhere; }
.video-failure-details pre { max-height: 180px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 6px; background: var(--surface-raised); color: var(--muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.video-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; margin-top: auto; }
.video-actions .icon-button { padding: 7px 10px; font-size: 12px; }
.viral-feed-item .video-actions { padding: 0; }
.modal { background: var(--card); color: var(--ink); border: 0; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.modal::backdrop { background: rgba(0,0,0,.72); }
.modal input, .modal textarea, .modal select { color: var(--ink); background: #1b1b1e; border-color: var(--line); }
.generate-chat { background: #1b1b1e; }
.chat-message.assistant { background: var(--surface-raised); }
.chat-message.user { color: #c5e6ee; }
.tag.fail, .match-missing .match-question, .match-missing .match-item-heading span { color: var(--red); }
.upload-zone, .empty-state { background: transparent; }
.publish-preview-stage { background: #101012; }
.publish-tile-check { color: #102025; }
.douyin-qr-area img { background: white; padding: 10px; border-radius: 10px; }
.workspace-menu, .generate-skill-menu { box-shadow: none; }
.skeleton-block, .skeleton-line { background: var(--surface-raised); }
@media (min-width: 801px) { .studio-composer { animation: studio-arrive .4s cubic-bezier(.16,1,.3,1); } }
@keyframes studio-arrive { from { clip-path: inset(0 0 8px 0 round 16px); } to { clip-path: inset(0 round 16px); } }
@media (max-width: 1200px) {
    .studio-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .video-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { padding: 0 24px; }
    .content { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 800px) {
    .sidebar { width: 178px; padding: 24px 12px; }
    .studio-skill-grid, .video-list { grid-template-columns: 1fr; }
    .studio-composer-tools { align-items: flex-end; }
    .studio-input-tools { flex-wrap: wrap; }
    .studio-library-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .studio-search { width: 100%; }
    .topbar { gap: 12px; }
    .top-actions { gap: 6px; }
}
@media (max-width: 580px) {
    .sidebar { display: none; }
    .topbar { height: auto; min-height: 74px; padding: 14px 18px; flex-wrap: wrap; }
    .mobile-brand { display: flex; font-size: 20px; }
    .workspace-picker { margin-left: auto; }
    .workspace-picker label { display: none; }
    .workspace-trigger { max-width: 180px; }
    .top-actions { display: none; }
    .content { padding: 30px 18px 96px; }
    .hero { gap: 16px; align-items: flex-start; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 13px; }
    .hero-action { flex-shrink: 0; }
    .studio-intro { margin: 8px 0 38px; }
    .studio-intro > p { font-size: 13px; }
    .studio-composer { padding: 16px; margin-top: 22px; }
    .studio-composer textarea { font-size: 14px; min-height: 110px; }
    .studio-composer-tools { gap: 8px; }
    .studio-input-tools { gap: 8px; }
    #studio-selected { max-width: 155px; }
    #studio-create { white-space: nowrap; font-size: 13px; flex-shrink: 0; }
    .studio-selection { width: 100%; }
    .studio-filters { gap: 2px; justify-content: space-between; }
    .studio-filters button { padding: 9px 10px; }
    .studio-library .section-heading { align-items: flex-start; }
    #studio-result-count { display: none; }
    .studio-skill-grid { gap: 12px; }
    .studio-skill-card { min-height: 138px; }
    .studio-recent { margin-top: 38px; }
    .section-heading h2 { font-size: 19px; }
    .video-list { grid-template-columns: 1fr; }
    .mobile-navigation { background: #19191b; }
    .mobile-navigation button.active { background: var(--pale); }
    .publish-gallery { gap: 20px 14px; }
}
@media (prefers-reduced-motion: reduce) { .studio-composer { animation: none; } *, *::before, *::after { scroll-behavior: auto !important; } }

.asset-preview { aspect-ratio: 4 / 3; height: auto; overflow: hidden; }
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.asset-sub { overflow-wrap: anywhere; }
.pending-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 13px; }
.pending-preview svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.video-thumb.video-waiting-preview { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 246px; padding: 48px 24px 20px; color: var(--green-dark); background: #f1fafb; }
.video-waiting-status { position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 7px; color: #155761; font-size: 12px; font-weight: 600; }
.video-waiting-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.video-waiting-center { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.video-waiting-frame { width: 48px; height: 60px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.video-waiting-frame > circle { fill: #e0f3f5; stroke: none; }
.video-waiting-center strong { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.45; text-wrap: balance; }
.video-waiting-track { width: 108px; height: 3px; overflow: hidden; border-radius: 2px; background: #c8e5e8; }
.video-waiting-track i { display: block; width: 36px; height: 100%; border-radius: inherit; background: var(--green-dark); animation: video-waiting-scan 2s ease-in-out infinite; }
.video-waiting-steps { display: flex; justify-content: center; gap: 16px; margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; line-height: 18px; }
.video-waiting-steps li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.video-waiting-steps li > span { display: grid; place-items: center; width: 12px; height: 12px; border: 1px solid #8793a6; border-radius: 50%; }
.video-waiting-steps svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.video-waiting-steps [aria-current], .video-waiting-steps .is-done { color: #155761; }
.video-waiting-steps [aria-current] { font-weight: 650; }
.video-waiting-steps [aria-current] > span { border: 3px solid var(--green-dark); }
.video-waiting-steps .is-done > span { border-color: var(--green-dark); background: #d2eff1; }
.video-waiting-preview[data-state="queued"] .video-waiting-track i { animation: none; width: 0; }
.video-waiting-preview[data-state="paused"], .video-waiting-preview[data-state="unknown"] { color: var(--muted); background: var(--surface-raised); }
.video-waiting-preview[data-state="paused"] .video-waiting-status, .video-waiting-preview[data-state="unknown"] .video-waiting-status { color: var(--muted); }
.video-waiting-preview[data-state="failed"] { color: var(--red); background: var(--error-surface); }
.video-waiting-preview[data-state="failed"] .video-waiting-status { color: var(--red); }
.video-waiting-preview[data-state="failed"] .video-waiting-frame > circle { fill: #f9e1e5; }
.video-card-pending .video-info > time { display: block; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.video-card-pending .video-info > p { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
@keyframes video-waiting-scan { 0%, 100% { transform: translateX(-36px); } 50% { transform: translateX(108px); } }
@media (prefers-reduced-motion: reduce) { .video-waiting-track i { animation: none; transform: translateX(36px); } }
@media (max-width: 580px) { .asset-meta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; } .asset-tools { align-self: flex-end; } .asset-details { width: 100%; } }

/* Finish review: ideas remain editable and selected controls remain legible. */
.generate-prompt-section { display: block; }
.generate-chat-compose { grid-template-columns: minmax(0, 1fr); }
.generate-chat-compose > .generate-skill-chip, .generate-chat-compose > textarea { grid-column: 1; }
.generate-skill-chip { max-width: 100%; }
.generate-skill-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-platform-picker button[aria-pressed="true"] { color: #102025; }
@font-face { font-family: 'Studio Noto'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/studio-noto-sc.ttf') format('truetype'); }
h1, h2, .brand { font-family: 'Studio Noto', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 600; }

@media (min-width: 581px) and (max-width: 800px) {
    .brand { font-size: 25px; justify-content: flex-start; }
    .sidebar-caption, .sidebar-bottom { font-size: var(--text-xs); }
    .nav-item { font-size: var(--text-sm); }
    .nav-item::before { content: none; display: none; }
    .topbar .mobile-brand { display: none; }
}

/* The chosen creative method is a removable chip in the idea composer. */
.studio-selection { width: fit-content; max-width: 100%; min-height: 34px; padding: 5px 9px; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--muted); }
.studio-selection.is-selected { border-color: #38616b; background: var(--pale); color: #c5e6ee; }
.studio-selection svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
#studio-selected { flex: 1; min-width: 0; }
.studio-selection button { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; padding: 0; border-radius: 5px; color: inherit; }
.studio-selection button:hover { background: #2e4d56; }
.studio-selection button[hidden] { display: none; }
.studio-selection .studio-clear-icon { display: block; width: 12px; height: 12px; }

/* The persistent composer owns the complete creation flow. */
#generate-form { margin-top: 28px; animation: none; }
#generate-form > textarea { min-height: 100px; }
.studio-inline-section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; text-align: left; }
.studio-inline-section > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; color: var(--ink); font-size: 13px; list-style: none; }
.studio-inline-section > summary::-webkit-details-marker { display: none; }
.studio-inline-section > summary > span:last-child { color: var(--muted); font-size: 12px; }
.studio-inline-section > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.studio-inline-section[open] > summary::after { transform: rotate(225deg); }
.studio-inline-section > summary > span:first-child { margin-right: auto; }
.studio-material-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 16px 0; }
.studio-material-actions p, .studio-material-empty { color: var(--muted); font-size: 12px; margin: 0; }
.studio-material-actions > div { display: flex; gap: 16px; flex-shrink: 0; }
#generate-form .generate-assets { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 300px; overflow-y: auto; margin-top: 16px; }
#generate-form .generate-asset-media { height: 100px; }
#generate-form .generate-asset-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#generate-form .generate-chat { margin-top: 16px; border: 0; background: transparent; padding: 0; height: auto; }
#generate-form .generate-asset { flex-direction: column; }
#generate-form .generate-asset-media { width: 100%; }
#generate-form .generate-asset-copy { padding: 10px; }
#generate-submit { white-space: nowrap; flex-shrink: 0; }
.studio-attachments { display: flex; gap: 12px; padding: 0 4px 12px 0; margin-bottom: 12px; overflow-x: auto; }
.studio-attachment { position: relative; width: 80px; flex: 0 0 80px; }
.studio-attachment-media { display: block; width: 80px; height: 80px; background: #1b1b1e; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.studio-attachment-media img, .studio-attachment-media video { width: 100%; height: 100%; object-fit: cover; }
.studio-attachment-name { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.studio-attachment button { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: #19191b; color: var(--ink); }
.studio-attachment button:hover { background: #3a3a40; }
.studio-attachment button svg, .studio-material-close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.studio-material-picker { position: fixed; inset: auto; margin: 0; width: min(600px, calc(100vw - 24px)); max-height: min(480px, calc(100dvh - 100px)); padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 12px 36px rgba(0,0,0,.4); text-align: left; overflow-y: auto; }
.studio-material-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.studio-material-heading > div { display: flex; align-items: baseline; gap: 12px; }
.studio-material-heading h2 { margin: 0; font-size: 16px; }
.studio-material-heading #generate-count { font-size: 12px; color: var(--muted); }
.studio-material-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-raised); color: var(--ink); }
.studio-skill-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
.studio-skill-dialog .modal-heading { align-items: flex-start; }
.studio-skill-dialog h2 { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.studio-skill-description { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 20px 0; }
.studio-skill-example { background: #141414; border-radius: 12px; overflow: hidden; }
.studio-skill-example video { display: block; width: 100%; height: min(300px, 35dvh); object-fit: contain; }
.studio-skill-example[hidden] { display: none; }
.studio-skill-dialog .modal-actions { margin-top: 24px; }
.studio-skill-dialog .modal-actions .button { width: 100%; }
#generate-form .studio-material-picker .generate-assets { max-height: 300px; }
#generate-form .generate-chat-messages { min-height: 0; max-height: 220px; }
#generate-form .generate-chat-compose > textarea { min-height: 48px; background: #1b1b1e; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
#generate-form .skill-example { margin-top: 14px; }
#generate-form .skill-example video { max-height: 260px; }
#generate-form .upload-status:empty { display: none; }
#generate-form .upload-status { text-align: left; }
#generate-form [hidden] { display: none; }
.studio-assistant-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 9px; padding: 12px 18px; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.studio-assistant-launcher svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.studio-assistant-launcher:hover { background: var(--surface-raised); }
.studio-assistant-panel { position: fixed; right: 24px; bottom: 24px; z-index: 45; width: min(400px, calc(100vw - 48px)); max-height: min(680px, calc(100dvh - 110px)); overflow-y: auto; padding: 18px; border-radius: 16px; background: var(--card); box-shadow: 0 12px 40px rgba(0,0,0,.45); text-align: left; }
.studio-assistant-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-assistant-heading h2 { margin: 0; font-size: 18px; }
.studio-assistant-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
#studio-assistant-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-raised); color: var(--ink); }
#studio-assistant-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
#generate-form .studio-assistant-panel .generate-chat { min-height: 320px; }
#generate-form .studio-assistant-panel .generate-chat-compose { margin: 12px 0 0; padding: 10px; }
#generate-form .studio-assistant-panel .generate-chat-messages { padding: 16px 0; max-height: 280px; }
#generate-form .studio-assistant-panel .skill-picker { position: static; }
#generate-form .studio-assistant-panel .generate-skill-menu { position: static; width: 100%; max-width: none; margin-top: 12px; }
#generate-form .studio-assistant-panel .generate-chat-tools { flex-wrap: wrap; }
#generate-form .studio-assistant-panel .skill-picker:has(.generate-skill-menu:not([hidden])) { width: 100%; order: 2; }
@media (max-width: 580px) {
  .studio-assistant-launcher { right: 16px; bottom: 78px; }
  .studio-assistant-panel { right: 12px; bottom: 78px; width: calc(100vw - 24px); max-height: calc(100dvh - 100px); }
  #generate-form .generate-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-material-actions { align-items: flex-start; flex-direction: column; }
  #generate-form .studio-composer-tools { align-items: stretch; flex-direction: column; }
  #generate-submit { width: 100%; }
  #generate-form .studio-input-tools { flex-wrap: wrap; }
  #generate-form .studio-inline-section > summary { gap: 8px; }
}

/* Loading states mirror the studio surfaces they replace. */
.skeleton { background: linear-gradient(100deg, #2c2c31 28%, #3a3a40 48%, #2c2c31 68%); background-size: 200% 100%; }
.skeleton-line { background: linear-gradient(100deg, #2c2c31 28%, #3a3a40 48%, #2c2c31 68%); background-size: 200% 100%; }
.skeleton-studio-intro > .skeleton-line { margin-left: auto; margin-right: auto; }
.skeleton-studio-intro > .skeleton-title { width: min(440px, 90%); height: 48px; margin-bottom: 12px; }
.skeleton-studio-intro > .skeleton-long { width: min(380px, 85%); }
.skeleton-composer { min-height: 194px; text-align: left; }
.skeleton-composer .studio-composer-tools { margin-top: 63px; }
.skeleton-studio-intro > .skeleton-short { margin-top: 14px; width: 160px; }
.skeleton-filter { width: 72px; height: 38px; }
.skeleton-search { width: 230px; height: 38px; }
.skeleton-skill-card { cursor: default; pointer-events: none; }
.skeleton-skill-card .studio-skill-copy { padding-top: 7px; }
.skeleton-skill-card .skeleton-line { margin: 0; height: 13px; }
.skeleton-skill-card .skeleton-short { margin-top: auto; }
.skeleton-video { display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; }
.skeleton-video-thumb { aspect-ratio: 16 / 10; width: 100%; border-radius: 0; }
.skeleton-video-copy { padding: 16px; }
.skeleton-asset-thumb { aspect-ratio: 4 / 3; }
.skeleton-publish-preview { width: 100%; aspect-ratio: 9 / 14; margin-bottom: 16px; }
@media (max-width: 800px) { .skeleton-search { width: 100%; } }
@media (max-width: 580px) { .skeleton-composer { min-height: 244px; } .skeleton-composer .studio-composer-tools { margin-top: 103px; } .skeleton-filter-row { width: 100%; } .skeleton-filter { width: 22%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.skeleton-publish-preview { height: 330px; aspect-ratio: auto; }
@media (max-width: 760px) { .skeleton-publish-preview { height: 320px; } }

.skeleton-viral-item { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto; }
.skeleton-viral-thumb { aspect-ratio: 9 / 16; }
.skeleton-viral-item > .skeleton-button { width: 96px; align-self: end; justify-self: end; }
@media (max-width: 580px) { .skeleton-viral-item { grid-template-columns: 1fr; } .skeleton-viral-thumb { width: min(100%, 240px); } }

/* Shared composer controls and thumbnail Skill picker. */
.studio-input-tools > .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 12px; font-size: 13px; line-height: 1; }
.studio-input-tools > .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.studio-selection[hidden] { display: none; }
.studio-input-tools { flex-wrap: wrap; }
.studio-skill-picker { width: min(600px, calc(100vw - 24px)); max-height: min(480px, calc(100dvh - 100px)); }
.studio-picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; margin-top: 20px; }
.studio-picker-item { padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; min-width: 0; }
.studio-picker-item .studio-skill-cover { display: grid; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; }
.studio-picker-item strong { display: block; margin-top: 9px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.studio-picker-item:hover .studio-skill-cover, .studio-picker-item[aria-pressed="true"] .studio-skill-cover { outline: 2px solid var(--green); outline-offset: 2px; }
.studio-picker-message, .studio-picker-grid > .skeleton-skill-grid { grid-column: 1 / -1; }
@media (max-width: 600px) { .studio-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.studio-skill-picker #generate-skill-search { margin-top: 16px; width: 100%; height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.studio-picker-item { display: flex; flex-direction: column; align-self: start; }
/* Reference-led business wizard: white canvas, deep ink, cyan action. */
.overview-light { --ink: #111323; --muted: #626b83; --paper: #fff; --card: #fff; --surface-raised: #f0f3f8; --line: #dfe4ed; --pale: #e6fbfc; --green: #00d4e4; --green-dark: #00838e; --red: #ae263a; --error-surface: #fff0f1; color-scheme: light; background: #fff; color: var(--ink); }
.overview-light .app-shell { display: block; }
.overview-light .sidebar { display: none; }
.overview-light .main-column { margin: 0; }
.overview-light .topbar { height: 94px; padding: 0 42px; gap: 20px; border: 0; background: #fff; }
.overview-light .mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 25px; white-space: nowrap; }
.overview-light .brand-mark { font-size: 25px; color: #111323; border-radius: 9px; width: 36px; height: 36px; }
.header-tagline, .overview-header-nav { display: none; }
.overview-light .header-tagline { display: block; color: #657088; font-size: 14px; white-space: nowrap; }
.overview-light .overview-header-nav { display: flex; gap: 24px; margin-left: auto; }
.overview-header-nav button { border: 0; padding: 8px 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.overview-header-nav button:hover, .overview-header-nav button.active { color: var(--ink); }
.overview-light .workspace-picker { width: auto; margin: 0; }
.overview-light .workspace-picker > label, .overview-light .top-actions { display: none; }
.overview-light .workspace-trigger { min-width: 130px; max-width: 180px; font-size: 13px; background: #fff; }
.overview-light .workspace-menu { background: #fff; }
.overview-light .mobile-navigation { background: #fff; border-color: var(--line); }
.overview-light .mobile-navigation button { color: var(--muted); }
.overview-light .mobile-navigation button.active { color: #007984; }
.wizard-home { position: relative; max-width: none; padding: 80px 28px 60px; min-height: calc(100dvh - 94px); isolation: isolate; overflow: clip; }
.wizard-intro { position: relative; max-width: 1060px; margin: 40px auto 38px; text-align: center; }
.wizard-intro h1 { font-family: 'Studio Noto', 'Arial', sans-serif; color: #10111b; font-size: clamp(32px, 3.6vw, 52px); font-weight: 750; letter-spacing: -.035em; line-height: 1.16; text-wrap: balance; margin: 0; }
.wizard-intro h1 span { color: #00838e; }
.wizard-intro > p { font-size: clamp(17px, 1.7vw, 23px); line-height: 1.5; color: #626b83; margin: 15px 0 0; }
.business-panel { position: relative; background: #fff; width: min(790px, 100%); margin: 0 auto; padding: 28px; border: 1px solid #e1e6ee; border-radius: 16px; }
.business-panel h2 { font-size: 22px; letter-spacing: -.025em; margin: 0 0 20px; }
.business-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.business-grid > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 104px; padding: 14px 12px; border: 1px solid #dde2ec; border-radius: 10px; gap: 10px; color: #20243e; background: #fff; font: inherit; font-size: 14px; line-height: 1.35; text-align: center; cursor: pointer; }
.business-grid > button > span { overflow-wrap: anywhere; }
.business-grid > button:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
.business-grid > button:hover { background: #f6fcfd; }
.business-grid > button[aria-pressed="true"] { background: #e5fbfc; border-color: #00bccc; }
.business-grid svg, .business-badge svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.business-grid .business-check { position: absolute; right: 9px; top: 9px; display: none; width: 20px; height: 20px; padding: 3px; background: #00bccc; color: #fff; border-radius: 50%; stroke-width: 2; }
.business-grid [aria-pressed="true"] .business-check { display: block; }
.overview-light .button.primary { background: #00d4e4; color: #073139; border-radius: 10px; min-height: 48px; padding: 12px 26px; font-size: 15px; }
.overview-light .button.primary:hover { background: #00bfce; }
.overview-light .button:disabled { background: #e2e7f0; color: #667189; opacity: 1; }
.wizard-primary { display: flex; align-items: center; justify-content: center; gap: 20px; min-width: 300px; margin: 26px auto 0; }
.wizard-home .button svg, .wizard-example-grid svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wizard-photo-left, .wizard-photo-right { position: absolute; z-index: -1; width: 220px; top: 30px; pointer-events: none; }
.wizard-photo-left { left: -60px; transform: rotate(10deg); }
.wizard-photo-right { right: -70px; transform: rotate(-10deg); }
.wizard-photo-left img, .wizard-photo-right img { width: 100%; height: 290px; object-fit: cover; border-radius: 30px; opacity: .6; }
.wizard-photo-right img + img { margin-top: 28px; }
.wizard-examples { max-width: 1100px; margin: 74px auto 0; }
.wizard-examples h2 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 18px; }
.wizard-example-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.wizard-example-grid button { padding: 0; text-align: left; border: 0; background: transparent; cursor: pointer; color: var(--ink); font: inherit; }
.wizard-example-grid img { display: block; width: 100%; height: 200px; border-radius: 12px; object-fit: cover; }
.wizard-example-grid span { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 16px; font-weight: 600; }
.wizard-steps { display: flex; align-items: center; justify-content: center; max-width: 530px; margin: 0 auto 54px; gap: 80px; }
.wizard-steps button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 1; border: 0; padding: 0; background: transparent; color: #69728b; font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
.wizard-step-dot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #eef1f6; color: #52617b; font-weight: 600; font-size: 17px; }
.wizard-steps button:not(:last-child)::after { content: ''; position: absolute; height: 2px; width: 100px; background: #dfe4ed; top: 21px; left: calc(50% + 33px); }
.wizard-steps button:has(~ [aria-current])::after { background: #00c7d7; }
.wizard-steps button:has(~ [aria-current]) .wizard-step-dot, .wizard-steps button[aria-current] .wizard-step-dot { background: #00d4e4; color: #08363b; }
.wizard-steps button[aria-current] { color: #111323; font-weight: 600; }
.wizard-step-dot svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wizard-step-2, .wizard-step-3 { padding-top: 4px; }
.wizard-step-2 .wizard-intro, .wizard-step-3 .wizard-intro { margin: 0 auto 28px; }
.business-badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; background: #eef3f7; border-radius: 24px; margin-top: 24px; font-size: 14px; }
.business-badge svg { width: 23px; height: 23px; }
.wizard-upload-panel { max-width: 1000px; margin: 0 auto; padding: 30px 36px; border: 1px solid #e5e9ef; border-radius: 18px; background: #fff; }
.wizard-dropzone { display: flex; flex-direction: column; justify-content: center; align-items: center; border: 2px dashed #d5dce8; border-radius: 16px; min-height: 260px; gap: 12px; cursor: pointer; text-align: center; padding: 22px; }
.wizard-dropzone:hover, .wizard-dropzone.is-dragging { border-color: #00a8b8; background: #f4fdfe; }
.wizard-dropzone input { display: none; }
.wizard-cloud { width: 65px; height: 65px; margin-bottom: 10px; fill: none; stroke: #515c76; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.wizard-dropzone strong { font-size: 21px; color: #49536b; letter-spacing: -.02em; }
.wizard-dropzone > span { color: #69728b; font-size: 17px; }
.wizard-dropzone em { color: #00838e; font-style: normal; font-weight: 600; }
.wizard-dropzone small { font-size: 13px; color: #6b748c; }
.wizard-upload-hint { color: #68728a; line-height: 1.65; font-size: 14px; margin: 16px 0; }
.wizard-upload-panel > .text-button { color: #007b86; margin-top: 10px; }
.wizard-actions { max-width: 1000px; margin: 25px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wizard-actions > div { display: flex; align-items: center; gap: 24px; }
.wizard-actions .button { display: inline-flex; align-items: center; gap: 20px; }
.wizard-back { border: 0; background: transparent; color: #626e87; font: inherit; font-size: 15px; cursor: pointer; }
.wizard-actions .text-button { font-size: 13px; color: #626e87; }
.wizard-media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(100px,1fr)); gap: 12px; margin-top: 20px; }
.wizard-media-item { position: relative; }
.wizard-media-item img, .wizard-media-item video { display: block; width: 100%; height: 110px; border-radius: 9px; object-fit: cover; background: #edf1f5; }
.wizard-media-item button { position: absolute; z-index: 3; right: 4px; top: 4px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.wizard-media-item button::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); box-shadow: 0 1px 4px rgb(15 23 42 / 16%); transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.wizard-media-item button:hover:not(:disabled)::before { border-color: var(--error-border, #efb7bd); background: var(--error-surface, #fff0f1); transform: scale(1.06); }
.wizard-media-item button:hover:not(:disabled) { color: var(--red); }
.wizard-media-item button:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.wizard-media-item button:disabled { cursor: wait; opacity: .6; }
.wizard-media-item.is-removing > img, .wizard-media-item.is-removing > video { opacity: .5; }
.wizard-media-item button svg { position: relative; z-index: 1; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.wizard-upload-row { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; padding: 8px 0; color: #626b83; }
.wizard-upload-row > span:first-child { overflow-wrap: anywhere; }
.wizard-upload-row > [data-upload-label] { flex-shrink: 0; }
.wizard-error { max-width: 1000px; margin: 18px auto 0; color: var(--red); font-size: 14px; text-align: center; }
.wizard-error:empty { display: none; }
.overview-light #studio-composer-slot { max-width: 850px; margin: 0 auto; }
.overview-light #studio-composer-slot[hidden] { display: none; }
.overview-light #generate-form { background: #fff; border-color: #dfe5ee; padding: 28px; margin-top: 0; }
.wizard-details-heading h2 { font-size: 20px; margin: 0 0 6px; }
.wizard-details-heading p { font-size: 14px; color: #626b83; margin: 0 0 22px; }
.overview-light #generate-prompt { background: #f9fbfd; border: 1px solid #dfe5ee; border-radius: 10px; min-height: 130px; padding: 14px; }
.overview-light .studio-assistant-launcher, .overview-light .studio-assistant-panel { background: #fff; border: 1px solid #dfe5ee; }
.overview-light .studio-assistant-panel { color: var(--ink); }
.overview-light .generate-chat-messages, .overview-light #generate-form .generate-chat-compose > textarea { background: #f6f8fb; color: var(--ink); }
.overview-light .studio-material-picker { background: #fff; }
.overview-light .studio-skill-cover { background: #eef3f7; color: #66718a; }
.overview-light .modal { background: #fff; color: var(--ink); }
.overview-light .modal input, .overview-light .modal textarea, .overview-light .modal select { color: var(--ink); background: #fff; }
.overview-light .studio-selection.is-selected { background: #e4f8fa; border-color: #a1dce1; color: #155761; }
.overview-light .studio-skill-description { color: #626b83; }
@media (max-width: 1200px) { .wizard-photo-left, .wizard-photo-right { width: 150px; opacity: .6; }.overview-light .header-tagline { display: none; } }
@media (max-width: 1000px) { .wizard-photo-left, .wizard-photo-right { display: none; }.overview-light .topbar { padding: 0 24px; }.wizard-intro { margin-top: 0; }.wizard-home { padding-top: 50px; }.wizard-step-2, .wizard-step-3 { padding-top: 8px; } }
@media (max-width: 760px) {
 .overview-light .topbar { height: 76px; padding: 0 18px; gap: 10px; }
 .overview-light .overview-header-nav { display: none; }.overview-light .workspace-picker { margin-left: auto; }
 .overview-light .workspace-trigger { min-width: 105px; max-width: 155px; }
 .overview-light .mobile-brand { font-size: 21px; }.wizard-home { padding: 30px 18px 100px; }
 .wizard-intro { margin: 0 auto 26px; }.wizard-intro h1 { font-size: 34px; }.wizard-intro > p { font-size: 17px; }
 .business-panel { padding: 20px; }.business-panel h2 { font-size: 20px; }.business-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .business-grid > button { min-height: 104px; font-size: 14px; }.wizard-primary { min-width: 0; width: 100%; }
 .wizard-examples { margin-top: 44px; }.wizard-examples h2 { font-size: 22px; }.wizard-example-grid { gap: 12px; grid-template-columns: 1fr; }.wizard-example-grid img { height: 180px; }
 .wizard-steps { gap: 20px; margin-bottom: 34px; }.wizard-step-dot { width: 34px; height: 34px; }.wizard-steps button { font-size: 11px; }.wizard-steps button:not(:last-child)::after { width: 38px; top: 17px; left: calc(50% + 23px); }
 .wizard-step-2 .wizard-intro h1, .wizard-step-3 .wizard-intro h1 { font-size: 30px; }
 .wizard-upload-panel { padding: 18px; }.wizard-dropzone { min-height: 230px; padding: 16px; }.wizard-dropzone strong { font-size: 18px; }
 .wizard-actions > div { gap: 12px; }.wizard-actions .button.primary { padding: 12px 16px; }.wizard-actions .text-button { max-width: 100px; text-align: right; }
 .overview-light #generate-form { padding: 20px; }.wizard-upload-row { font-size: 11px; }.wizard-upload-row > [data-upload-label] { flex-shrink: 1; text-align: right; }
}

.studio-material-picker .generate-assets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; max-height: 300px; overflow-y: auto; margin-top: 16px; }
.studio-material-picker .generate-asset-media { height: 110px; }
.studio-material-picker .generate-asset { background: var(--surface-raised); }
.studio-material-picker .generate-asset-copy { padding: 10px; }
@media(max-width:600px) { .studio-material-picker .generate-assets { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.overview-light .workspace-picker { flex: 0 0 auto; }
.overview-light .studio-attachment button { background: #fff; color: #20243e; }
.overview-light .studio-attachment button:hover { background: #e8f2f5; }
.overview-light .studio-clear-icon { stroke: currentColor; }
.overview-light .studio-assistant-launcher { box-shadow: 0 8px 24px rgba(23,44,67,.12); }
@media(max-width:760px) { .overview-light .studio-assistant-launcher { position: static; margin: 16px 0 0 auto; padding: 10px 14px; min-height: 40px; box-shadow: none; } }
/* Align overview with the three supplied screens. */
.overview-light .overview-header-nav { display: none; }
.overview-light .workspace-picker { margin-left: auto; }
.overview-light .workspace-trigger { min-width: 0; width: 46px; height: 40px; border: 0; padding: 10px; }
.overview-light #project-current { display: none; }
.overview-light .workspace-trigger::before { content: ''; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: #e4eff2; }
.overview-light .workspace-menu { min-width: 210px; }
.overview-light .topbar { height: 76px; }
.wizard-home { padding-top: 112px; }
.wizard-intro h1 { font-family: Arial, sans-serif; font-weight: 800; font-size: clamp(32px, 3.1vw, 48px); }
.wizard-intro h1 span { color: #00cddd; }
.business-panel { width: min(850px,100%); padding: 28px 30px; }
.business-panel h2 { font-family: Arial,sans-serif; font-weight: 750; }
.wizard-primary { width: 350px; }
.wizard-photo-left, .wizard-photo-right { width: 260px; top: 26px; }
.wizard-photo-left { left: -35px; }.wizard-photo-right { right: -38px; }
.wizard-photo-left img, .wizard-photo-right img { height: 330px; opacity: .55; }
.wizard-photo-left img + img { margin-top: 25px; }
.wizard-examples { max-width: 1250px; margin-top: 100px; }
.wizard-example-grid video { width: 100%; height: 240px; object-fit: cover; border-radius: 12px; background: #eef3f7; }
.wizard-step-2, .wizard-step-3 { padding-top: 0; background: #fcfefe; }
.wizard-steps { margin-bottom: 62px; }
.wizard-step-caption { display: block; color: #6c768c; font-size: 16px; margin: 0 0 16px; }
.wizard-upload-panel, .overview-light #studio-composer-slot { max-width: 1160px; }
.wizard-upload-panel { padding: 42px 46px 32px; }
.wizard-dropzone { min-height: 290px; }
.wizard-actions { max-width: 1160px; margin-top: 32px; }
.overview-light #generate-form { padding: 34px 42px 22px; }
.overview-light #generate-form .studio-composer-tools, .overview-light #studio-attached-assets, .overview-light #studio-assistant-trigger, .overview-light #studio-assistant { display: none; }
.overview-light #generate-form > #generate-submit { display: none; }
.wizard-field-label { display: block; font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.wizard-field-label span { color: #6c768c; font-weight: 400; }
#video-goal { width: 100%; height: 56px; padding: 12px 20px; background: #fff; border: 1px solid #d8deea; border-radius: 10px; color: #20243e; font: inherit; font-size: 17px; margin-bottom: 26px; }
.overview-light #generate-prompt { min-height: 120px; background: #fff; padding: 14px 20px; }
.wizard-detail-example { color: #6c768c; font-size: 14px; margin: 10px 0 30px; }
.wizard-vertical { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #626b83; border-top: 1px solid #edf0f5; padding-top: 18px; }
.wizard-vertical input { width: 19px; height: 22px; accent-color: #00bccc; }
#studio-composer-slot[hidden] + .wizard-actions { display: none; }
.overview-light .header-tagline { display: block; }
@media(max-width:1200px) { .wizard-photo-left, .wizard-photo-right { width: 190px; }.wizard-intro { max-width: 850px; } }
@media(max-width:1000px) { .wizard-photo-left, .wizard-photo-right { display: none; }.wizard-home { padding-top: 70px; }.wizard-step-2, .wizard-step-3 { padding-top: 0; }.overview-light .header-tagline { display: none; } }
@media(max-width:760px) {
 .wizard-home { padding-top: 30px; }.wizard-intro h1 { font-size: 32px; }.business-panel { padding: 20px; }.wizard-primary { width: 100%; }
 .wizard-examples { margin-top: 44px; }.wizard-steps { margin-bottom: 38px; }.wizard-step-2, .wizard-step-3 { padding-top: 6px; }
 .wizard-upload-panel { padding: 20px; }.wizard-dropzone { min-height: 230px; }.overview-light #generate-form { padding: 24px 20px; }
 .wizard-field-label { font-size: 15px; }#video-goal { font-size: 15px; }.wizard-vertical { font-size: 14px; }.wizard-detail-example { line-height: 1.6; }
 .overview-light .header-tagline { display: none; }.wizard-actions { margin-top: 24px; }.wizard-actions #generate-submit { padding: 12px 20px; }
}

/* All routes share the reference's white, navy and cyan workspace. */
html { scrollbar-color: #b5bfcd var(--paper); }
.app-shell { display: block; }
.sidebar { display: none; }
.topbar, .overview-light .topbar { height: 76px; padding: 0 42px; border: 0; background: #fff; gap: 20px; }
.mobile-brand, .overview-light .mobile-brand { display: flex; align-items: center; font-size: 25px; white-space: nowrap; }
.brand-mark, .overview-light .brand-mark { width: 36px; height: 36px; font-size: 25px; background: var(--green); color: var(--ink); }
.header-tagline { display: block; color: var(--muted); font-size: 14px; }
.overview-header-nav, .top-actions, .workspace-picker > label, #project-current, .workspace-chevron { display: none !important; }
.workspace-picker, .overview-light .workspace-picker { position: relative; flex: 0 0 44px; width: 44px; min-width: 0; max-width: 44px; height: 44px; margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; }
.workspace-trigger, .overview-light .workspace-trigger { display: grid; place-items: center; width: 44px; min-width: 44px; max-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #eaf2f5; color: #65788e; }
.overview-light .workspace-trigger::before { display: none; }
.workspace-trigger:hover { background: #dfeef1; }
.user-avatar { width: 38px; height: 38px; }
.user-avatar-photo { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.user-avatar-photo[hidden], #user-avatar-icon[hidden] { display: none !important; }
.workspace-menu, .overview-light .workspace-menu { left: auto; right: 0; top: 54px; width: 240px; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.workspace-option { border-radius: 8px; }
.workspace-option:hover, .workspace-option[aria-selected="true"] { background: var(--pale); color: var(--ink); }
.mobile-navigation, .overview-light .mobile-navigation { display: none; }
body:not(.overview-light) .content { max-width: 1244px; padding: 48px 42px 60px; }
.card, .publish-composer { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.hero h1 { color: var(--ink); font-weight: 750; }
.button.primary { background: var(--green); color: #073139; border-radius: 10px; }
.button.primary:hover { background: #00bfce; }
.button.subtle:hover, .icon-button:hover, .studio-skill-card:hover { background: #e8eef4; }
.asset-preview, .video-thumb, .studio-skill-cover, .studio-attachment-media, .publish-preview-stage, .compare-videos video, .publish-modal-video, .studio-skill-example, .skill-example video { background: #f0f3f8; }
.asset-tools img { filter: none; }
.generate-asset-number { color: #fff; }
.modal, .studio-material-picker, .studio-assistant-panel { background: #fff; color: var(--ink); box-shadow: 0 18px 60px rgba(23,44,67,.16); }
.modal::backdrop { background: rgba(17,19,35,.35); }
.modal input, .modal textarea, .modal select, .generate-chat, #generate-form .generate-chat-compose > textarea { background: #f9fbfd; color: var(--ink); }
.chat-message.user, .studio-selection.is-selected { color: #155761; }
.studio-selection.is-selected { background: var(--pale); border-color: #a1dce1; }
.studio-selection button:hover { background: #cdeef2; }
.studio-attachment button { background: #fff; color: var(--ink); }
.studio-attachment button:hover { background: #e8eef4; }
.skeleton { background: linear-gradient(100deg, #edf1f5 28%, #f8fafc 48%, #edf1f5 68%); background-size: 200% 100%; }
.wizard-steps { margin-bottom: 30px; }
.wizard-step-2 .wizard-intro > p, .wizard-step-3 .wizard-intro > p { font-size: 26px; }
.wizard-dropzone strong { font-size: 26px; }
.wizard-dropzone > span { font-size: 20px; }
.wizard-dropzone small, .wizard-upload-hint { font-size: 17px; }
.wizard-field-label { font-size: 20px; }
.wizard-detail-example { font-size: 18px; margin-bottom: 26px; }
.wizard-actions #generate-submit { min-width: 304px; justify-content: center; }
@media(max-width:1000px) { .header-tagline { display: none; } }
@media(max-width:760px) {
 .topbar, .overview-light .topbar { padding: 0 18px; gap: 10px; }
 .mobile-brand, .overview-light .mobile-brand { font-size: 21px; }
 body:not(.overview-light) .content { padding: 28px 18px 40px; }
 .wizard-steps { margin-bottom: 28px; }
 .wizard-step-2 .wizard-intro > p, .wizard-step-3 .wizard-intro > p { font-size: 17px; }
 .wizard-dropzone strong { font-size: 20px; }.wizard-dropzone > span { font-size: 17px; }
 .wizard-dropzone small, .wizard-upload-hint, .wizard-detail-example { font-size: 14px; }
 .wizard-field-label { font-size: 15px; }
 .wizard-actions #generate-submit { min-width: 0; }
}

.brand-mark, .overview-light .brand-mark { display: grid; place-items: center; padding: 0; line-height: 1; }
.brand-mark svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; transform: translateX(-1px); }

.brand-period { color: var(--green); }

/* Center the avatar independently of the old business-picker layout. */
.workspace-trigger, .overview-light .workspace-trigger { display: flex; align-items: center; justify-content: center; gap: 0; }
.user-avatar { display: block; flex: 0 0 38px; transform: translateY(-2px); }
/* Select a video first, then preview and publish below the library. */
.publish-studio { display: flex; flex-direction: column; align-items: stretch; gap: 32px; }
.publish-composer { position: static; top: auto; width: 100%; }

/* Equal line insets between the centers of adjacent progress dots. */
.wizard-steps { --step-gap: 80px; --step-dot-size: 42px; --step-line-inset: 12px; gap: var(--step-gap); }
.wizard-steps button { flex: 1 1 0; min-width: 0; }
.wizard-steps button:not(:last-child)::after { left: calc(50% + var(--step-dot-size) / 2 + var(--step-line-inset)); top: calc(var(--step-dot-size) / 2 - 1px); width: calc(100% + var(--step-gap) - var(--step-dot-size) - 2 * var(--step-line-inset)); }
@media(max-width:760px) { .wizard-steps { --step-gap: 20px; --step-dot-size: 34px; --step-line-inset: 6px; } }

.header-tagline, .overview-light .header-tagline { font-size: 16px; font-weight: 700; }

.business-switcher { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--muted); font-size: 13px; min-width: 0; }
.business-switcher select { width: 170px; min-width: 0; height: 38px; padding: 0 10px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; text-overflow: ellipsis; }
.business-switcher select:disabled { color: var(--muted); }
.business-switcher + .workspace-picker, .overview-light .business-switcher + .workspace-picker { margin-left: 0; }
@media(max-width:760px) { .business-switcher { gap: 0; }.business-switcher > span { display: none; }.business-switcher select { width: 118px; font-size: 12px; } }

.toast { background: var(--ink); color: #fff; }

/* Shared dropdowns: custom trigger and top-layer option menu on every route. */
.custom-select { position: relative; width: 100%; min-width: 0; }
.custom-select-native { display: none !important; }
.custom-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 46px; padding: 11px 16px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; text-align: left; font: inherit; }
.custom-select-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.custom-select-trigger:hover { border-color: #a8b8c8; }
.custom-select-trigger[aria-expanded="true"] { border-color: #00bccc; background: #f7fdfd; }
.custom-select-trigger:disabled { background: var(--surface-raised); color: var(--muted); cursor: not-allowed; }
.custom-select-menu { position: fixed; inset: auto; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(23,44,67,.12); }
.custom-select-menu:popover-open { display: grid; gap: 3px; }
.custom-select-menu > button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; min-height: 40px; padding: 10px 12px; border: 0; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; text-align: left; }
.custom-select-menu > button > span { overflow-wrap: anywhere; }
.custom-select-menu > button > svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: #007c89; stroke-width: 1.8; visibility: hidden; }
.custom-select-menu > button[aria-selected="true"] { background: var(--pale); color: #155761; }
.custom-select-menu > button[aria-selected="true"] > svg { visibility: visible; }
.custom-select-menu > button:hover, .custom-select-menu > button:focus-visible { background: #eef5f8; outline: 0; }
.custom-select-menu > button:disabled { color: var(--muted); cursor: not-allowed; }
.business-switcher .custom-select { width: 170px; }
.business-switcher .custom-select-trigger { min-height: 38px; padding: 7px 10px; font-size: 13px; }
.custom-select:has(#video-goal) { margin-bottom: 26px; }
.custom-select:has(#video-goal) .custom-select-trigger { min-height: 56px; padding: 12px 20px; font-size: 17px; }
@media(max-width:760px) { .business-switcher .custom-select { width: 118px; }.business-switcher .custom-select-trigger { font-size: 12px; gap: 6px; }.custom-select:has(#video-goal) .custom-select-trigger { font-size: 15px; } }

.upload-timing { margin-top: 16px; color: var(--muted); font-size: 13px; }
.upload-timing summary { cursor: pointer; width: fit-content; color: var(--green-dark); }
.upload-timing pre { margin: 10px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--ink); font: 12px/1.7 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.wizard-upload-row { flex-wrap: wrap; }
.wizard-upload-row > progress { flex-basis: 100%; width: 100%; height: 6px; accent-color: var(--green-dark); }

.wizard-media-item.is-uploading { min-height: 110px; border-radius: 9px; background: #edf1f5; display: grid; place-items: center; }
.wizard-media-item.is-uploading img:not(.wizard-local-preview), .wizard-media-item.is-uploading video:not(.wizard-local-preview) { visibility: hidden; }
.wizard-media-item:has(.wizard-local-preview) [data-wizard-preview] { display: none; }
.wizard-media-item.is-uploading button { z-index: 3; }
.wizard-upload-indicator { z-index: 2; position: absolute; inset: 0; border-radius: 9px; pointer-events: none; }
.wizard-upload-indicator::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at center, transparent 21.5px, rgb(0 0 0 / 48%) 22.5px); }
.wizard-upload-indicator::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; box-sizing: border-box; border: 1px solid rgb(0 0 0 / 65%); border-radius: 50%; background: conic-gradient(from 0deg at center, transparent max(0%, calc(var(--upload-progress) - 0.15%)), rgb(0 0 0 / 48%) min(100%, calc(var(--upload-progress) + 0.15%))); }

.wizard-upload-error { z-index: 2; background: rgb(15 23 42 / 55%); border-radius: 9px; position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; font-size: 12px; text-align: center; color: #fff; }

.skills-library-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, 210px) minmax(150px, 190px); align-items: center; gap: 12px; max-width: 1040px; margin-bottom: 28px; }
.skills-library-controls.has-extraction-filter { grid-template-columns:minmax(220px,1fr) repeat(3,minmax(145px,180px)); }
.skills-library-search { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; color: var(--muted); transition: border-color .15s, background .15s; cursor: text; }
.skills-library-select { display: block; min-width: 0; }
.skills-library-select .custom-select-trigger { min-height: 50px; }
.skills-library-search svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; }
.skills-library-search input { display: block; flex: 1; min-width: 0; width: 100%; min-height: 48px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.skills-library-search input::placeholder { color: var(--muted); opacity: 1; }
.skills-library-search:hover { border-color: #aebdd0; }
.skills-library-search:focus-within { background: #fff; border-color: var(--green-dark); outline: 2px solid var(--green-dark); outline-offset: 2px; }
.skills-library .studio-skill-card { border-color: var(--line); }

.skills-library .studio-skill-cover { background: #edf1f5; }
@media(max-width:760px) { .skills-library-controls,.skills-library-controls.has-extraction-filter { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.skills-library-search { grid-column: 1 / -1; }.skills-library-select .custom-select-trigger { min-height: 46px; padding: 10px 12px; } }
.wizard-skill-field { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.wizard-skill-trigger { flex: 1; min-width: 0; min-height: 56px; padding: 12px 20px; font-size: 17px; }
.wizard-skill-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-skill-trigger svg, #wizard-clear-skill svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
@media(max-width:760px) { .wizard-skill-trigger { font-size: 15px; } }

.studio-picker-item:not(:has(.studio-picker-media)) { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.studio-picker-item:not(:has(.studio-picker-media)) strong { margin-top: 0; }
.studio-picker-item:not(:has(.studio-picker-media)):hover, .studio-picker-item:not(:has(.studio-picker-media))[aria-pressed="true"] { background: var(--pale); border-color: var(--green); }

.wizard-media-library-action { display: flex; justify-content: center; margin-top: 18px; }
.wizard-media-library-action button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; line-height: 1.4; }
.wizard-media-library-action svg { display: block; flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.studio-skill-markdown { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }

.studio-skill-example { display: flex; justify-content: flex-start; padding: 0; border: 0; border-radius: 0; background: transparent; }
.studio-skill-example video, .studio-skill-example img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(360px, 40dvh); object-fit: contain; }
.studio-skill-example [hidden] { display: none; }

.skill-scenario-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.skill-scenario-tags:empty { display: none; }
.skill-scenario-tags .tag { font-size: 11px; }

.studio-picker-item .studio-picker-media { align-self: flex-start; display: block; width: auto; height: auto; max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; }
.video-inputs { padding: 0 16px 16px; }
.asset-card { padding: 0; align-self: start; }
.video-card { align-self: start; }
.asset-preview, .video-thumb:not(.pending-preview):not(.video-waiting-preview) { padding: 0; aspect-ratio: auto; min-height: 0; background: transparent; }
.asset-preview img, .asset-preview video, .video-thumb:not(.pending-preview):not(.video-waiting-preview) video { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
.video-inputs h4 span { margin-left: 6px; color: var(--green-dark); font-weight: 600; }
.video-skill-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px; margin: 4px 0 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--pale); color: var(--green-dark); font: inherit; font-size: var(--text-xs); font-weight: 650; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.video-skill-chip span { flex: 0 0 auto; white-space: nowrap; opacity: .72; }
.video-skill-chip strong { min-width: 0; overflow-wrap: anywhere; }
.video-skill-chip:hover, .video-skill-chip:focus-visible { border-color: var(--green-dark); outline: none; }
.video-inputs h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.video-input-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.video-input-strip a { position: relative; flex: 0 0 auto; display: grid; place-items: center; min-width: 44px; height: 64px; }
.video-input-number { position: absolute; bottom: 2px; left: 2px; min-width: 18px; padding: 0 3px; border-radius: 3px; background: var(--ink); color: var(--paper); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.video-input-strip a.video-input-selected { position: relative; width: 58px; min-width: 58px; height: 64px; overflow: hidden; border: 2px solid var(--green-dark); border-radius: 5px; background: var(--pale); }
.video-input-strip a.video-input-selected img, .video-input-strip a.video-input-selected video { display: block; width: auto; height: auto; max-width: 54px; max-height: 60px; object-fit: contain; }
.video-input-check { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--green-dark); color: #fff; }
.video-input-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.video-input-strip img, .video-input-strip video { display: block; width: auto; height: auto; max-height: 64px; max-width: 112px; object-fit: contain; border-radius: 6px; }

.wizard-reference-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 24px; min-height: 44px; font-size: 14px; cursor: pointer; }
.wizard-reference-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.wizard-reference-toggle span { flex-basis: 100%; font-size: 12px; color: var(--muted); }

/* Sign-in extends the studio's white, navy and cyan visual system. */
/* One account placeholder from initial HTML until the session is confirmed. */
.auth-header-loading { display: block; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; margin-left: auto; }
.auth-header-loading[hidden], .auth-header-retry[hidden] { display: none !important; }
.auth-header-retry { margin-left: auto; }
.auth-header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.auth-header-actions[hidden], .workspace-picker[hidden], .auth-dialog [hidden] { display:none !important; }
.auth-anonymous .business-switcher { display:none; }
.auth-header-actions button { min-height:44px; padding:9px 16px; border:0; background:transparent; color:#172c43; font:600 14px inherit; cursor:pointer; }
.auth-header-actions .auth-signup { border:1px solid #bbc6d4; border-radius:10px; }
.auth-dialog { box-sizing:border-box; width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:36px; border:0; border-radius:20px; background:#fff; color:#172c43; text-align:center; box-shadow:0 18px 60px rgba(23,44,67,.2); overflow:auto; }
.auth-dialog::backdrop { background:rgba(17,28,43,.38); }
.auth-close { position:absolute; right:16px; top:14px; min-width:44px; min-height:44px; }
.auth-close svg { display:block; width:22px; height:22px; margin:auto; }
.auth-mark { width:48px; height:48px; margin:0 auto 22px; display:grid; place-items:center; border-radius:11px; background:#00d5e7; color:#102738; }
.auth-mark svg { width:32px; height:32px; }
.auth-dialog h2 { margin:0 0 8px; font-family:"Studio Noto",sans-serif; font-size:27px; font-weight:600; line-height:1.3; letter-spacing:-.025em; text-wrap:balance; }
#auth-subtitle { margin:0 0 20px; color:#596980; font-size:15px; line-height:1.6; }
.auth-business { display:inline-block; padding:8px 16px; margin-bottom:22px; border-radius:10px; background:#eef2f7; font-size:14px; }
.auth-google { width:100%; min-height:52px; display:flex; align-items:center; justify-content:center; gap:12px; border:1px solid #bdc7d4; border-radius:9px; background:#fff; color:#172c43; font:600 15px sans-serif; cursor:pointer; }
.auth-google svg { width:24px; height:24px; }
.auth-google:hover:not(:disabled), .auth-header-actions button:hover { background:#f2f8fa; }
.auth-divider { display:flex; align-items:center; gap:16px; margin:20px 0; color:#596980; font-size:13px; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:#dce3ec; }
.auth-dialog form { text-align:left; }
.auth-dialog label { display:block; margin-bottom:8px; font-size:14px; font-weight:600; }
.auth-dialog input { box-sizing:border-box; width:100%; height:52px; padding:12px 14px; border:1px solid #aebbc9; border-radius:9px; background:#fff; color:#172c43; font:16px sans-serif; caret-color:#087786; }
.auth-dialog input::placeholder { color:#66768a; opacity:1; }
.auth-dialog form .button { margin-top:16px; width:100%; min-height:52px; background:#00d5e7; color:#102738; font-size:15px; }
.auth-hint,.auth-legal { color:#596980; font-size:12px; line-height:1.7; }
.auth-hint { margin:14px 0 0; }
.auth-legal { margin:22px 0 0; }
.auth-legal a { color:#405873; text-underline-offset:3px; }
.auth-feedback { margin:16px 0 0; color:#9b242e; font-size:14px; line-height:1.5; }
.auth-feedback:empty { display:none; }
.auth-code-copy { margin:8px 0 24px; line-height:1.6; color:#596980; overflow-wrap:anywhere; }
#auth-code { text-align:center; font-size:26px; letter-spacing:.25em; font-variant-numeric:tabular-nums; }
.auth-code-actions { display:flex; justify-content:space-between; gap:8px; margin-top:16px; }
.auth-code-actions button { min-height:44px; border:0; padding:4px 0; background:transparent; color:#087786; font-size:13px; cursor:pointer; }
.auth-dialog button:disabled { cursor:default; opacity:.55; }
.auth-dialog :focus-visible,.auth-header-actions :focus-visible { outline:2px solid #087786; outline-offset:3px; }
.workspace-email { display:block; padding:12px; color:#596980; font-size:12px; overflow-wrap:anywhere; border-bottom:1px solid #dce3ec; }
.legal-page { max-width:70ch; margin:0 auto; padding:48px 24px; color:#172c43; line-height:1.75; }.legal-page h1 { margin-top:32px; }.legal-page h2 { margin:32px 0 8px; font-size:20px; }.legal-page a { color:#087786; text-underline-offset:3px; }
@media(max-width:600px) { .auth-dialog { padding:32px 22px 24px; }.auth-dialog h2 { font-size:23px; }.auth-header-actions { gap:2px; }.auth-header-actions button { padding:8px 10px; font-size:13px; } }

.credits-trigger { flex:none; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); font-family:inherit; font-size:13px; font-weight:600; line-height:1.4; cursor:pointer; font-variant-numeric:tabular-nums; }
.credits-trigger:hover { background:var(--pale); }
.credits-trigger[hidden], .credits-dialog [hidden] { display:none !important; }
.credits-dialog { box-sizing:border-box; width:min(540px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:32px; border:0; border-radius:16px; color:var(--ink); background:var(--paper); box-shadow:var(--shadow); overflow:auto; }
.credits-dialog::backdrop { background:rgba(17,28,43,.38); }
.credits-dialog h2 { margin:0 0 20px; font-size:25px; line-height:1.3; letter-spacing:-.02em; }
.credits-dialog h3 { margin:28px 0 12px; font-size:16px; }
.credits-dialog p { margin:16px 0; }
.credits-note { color:var(--muted); font-size:13px; line-height:1.6; }
.credits-totals { display:grid; grid-template-columns:1fr auto; gap:10px 16px; margin:0; }
.credits-totals dt { color:var(--muted); }
.credits-totals dd { margin:0; font-weight:600; text-align:right; font-variant-numeric:tabular-nums; }
.credits-history { list-style:none; padding:0; margin:0; }
.credits-history li { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:13px 0; border-top:1px solid var(--line); font-size:13px; font-variant-numeric:tabular-nums; }
.credits-history strong,.credits-history small { display:block; }
.credits-history small { color:var(--muted); margin-top:3px; }
.credits-history li>span:last-child { flex:none; }
.credits-feedback { color:var(--red); font-size:14px; }
.credits-dialog label { display:block; margin-bottom:8px; font-weight:600; }
.credits-dialog select { width:100%; min-height:44px; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; }
.credits-dialog :focus-visible,.credits-trigger:focus-visible { outline:2px solid var(--green-dark); outline-offset:3px; }
.credits-dialog button:disabled { cursor:default; opacity:.6; }
.credits-dialog .button { min-height:44px; }
.video-info p.generation-verification-note { display:block; -webkit-line-clamp:unset; line-clamp:unset; overflow:visible; }
.video-cost { margin-top: 14px; border-top: 1px solid var(--divider, #dfe4ed); font-size: 12px; color: var(--ink); }
.video-cost > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 44px; cursor: pointer; }
.video-cost > summary::after { content: '+'; color: var(--muted); }
.video-cost[open] > summary::after { content: '−'; }
.video-cost > summary strong { margin-left: auto; font-variant-numeric: tabular-nums; text-align: right; }
.video-cost > summary:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
.video-cost-body { display: grid; gap: 12px; padding-bottom: 10px; overflow-wrap: anywhere; }
.video-info .video-cost-body p { display: block; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; }
.video-cost-task { display: grid; gap: 5px; }
.video-cost-task > span { color: var(--muted); }
.video-cost-task dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; margin: 4px 0; }
.video-cost-task dt { color: var(--muted); }
.video-cost-task dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.video-stage-timings { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 12px; }
.video-stage-timings > h4 { margin: 0 0 8px; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.4; }
.video-stage-total { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.video-stage-total > div { display: flex; align-items: baseline; gap: 10px; }
.video-stage-total > div span { color: var(--muted); font-weight: 600; }
.video-stage-total > div strong { color: var(--ink); font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.video-stage-total > small { color: var(--muted); line-height: 1.4; }
.video-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-top: 12px; }
.video-stage-item { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.video-stage-item span { color: var(--muted); overflow-wrap: anywhere; }
.video-stage-item strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.video-stage-details { margin-top: 10px; border-top: 1px solid var(--line); }
.video-stage-details > summary { min-height: 36px; display: flex; align-items: center; color: var(--muted); font-weight: 600; cursor: pointer; }
.video-stage-details > summary:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
.video-stage-details dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; margin: 0 0 10px; line-height: 1.45; }
.video-stage-details dt { color: var(--muted); overflow-wrap: anywhere; }
.video-stage-details dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
@media(max-width:600px) { .video-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.video-user-input { margin: 0 16px 16px; padding-top: 12px; border-top: 1px solid var(--line, #dfe4ed); overflow-wrap: anywhere; }
.video-info > .video-user-input { margin: 16px 0 0; }
.video-user-input > summary { cursor: pointer; color: var(--muted); font-size: 12px; line-height: 1.6; }
.video-user-input > summary strong { font-weight: 600; }
.video-user-input-preview { display: block; margin-top: 6px; color: var(--ink); white-space: pre-wrap; font-size: 13px; }
.video-user-input-expand { display: inline-block; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.video-user-input[open] .video-user-input-preview, .video-user-input[open] .video-user-input-expand { display: none; }
.video-user-input > summary:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; }
.video-info .video-user-input p, .video-user-input > p { display: block; margin: 8px 0 0; color: var(--ink); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; }
.credits-dialog .modal-actions { flex-wrap:wrap; margin-top:24px; }
.payment-offer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); }
.payment-offer strong { font-size:15px; }
.payment-offer .credits-note { margin:6px 0 0; }
.payment-offer .button { flex:none; }
.payments-dialog .credits-history li>span:last-child { max-width:45%; text-align:right; overflow-wrap:anywhere; }
@media(max-width:600px) { .payment-offer { align-items:flex-start; flex-direction:column; gap:12px; }.payment-offer .button { width:100%; } }
@media(max-width:600px) { .credits-dialog { padding:24px 20px; }.credits-trigger { padding:8px; font-size:12px; }.credits-dialog .modal-actions .primary { width:100%; }.credits-history li { gap:12px; } }
@media(max-width:760px) {
  .topbar:has(.credits-trigger:not([hidden])), .overview-light .topbar:has(.credits-trigger:not([hidden])) { height:auto; min-height:82px; padding:14px 18px; flex-wrap:wrap; }
  .topbar:has(.credits-trigger:not([hidden])) .business-switcher { order:4; flex:1 0 100%; margin:0; }
  .topbar:has(.credits-trigger:not([hidden])) .business-switcher .custom-select { width:100%; }
  .topbar:has(.credits-trigger:not([hidden])) .workspace-picker { margin-left:auto; }
}

.video-page-sentinel {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 76px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.video-page-status { color: var(--muted); }
.video-page-spinner {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--green-dark);
    border-radius: 50%;
    animation: video-page-spin .7s linear infinite;
}
@keyframes video-page-spin { to { transform: rotate(360deg); } }

.business-switcher { position: relative; margin-right: 0; }
.business-switcher.is-loading > span,
.business-switcher.is-loading select,
.business-switcher.is-loading .custom-select {
    visibility: hidden;
}
.business-switcher.is-loading::after {
    position: absolute;
    right: 0;
    width: 170px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: linear-gradient(100deg, #edf1f5 28%, #f8fafc 48%, #edf1f5 68%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.35s ease-in-out infinite;
    content: "";
    pointer-events: none;
}
.business-switcher.is-loading { min-width: 170px; }
@media (max-width: 760px) {
    .business-switcher { margin-right: 0; }
    .business-switcher.is-loading { min-width: 118px; }
    .business-switcher.is-loading::after { width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
    .video-page-spinner,
    .business-switcher.is-loading::after { animation: none; }
}

.video-skill-id { margin: 6px 0 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.video-skill-id code { font-size: inherit; }

.workspace-load-error { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.workspace-load-error .empty { padding-bottom: 0; }
.wizard-example { margin: 0; min-width: 0; }
.wizard-example figcaption { margin-top: 10px; color: var(--ink); font-size: 14px; font-weight: 600; }
.skill-import-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.skill-import-dialog fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.skill-import-dialog .field { margin-top: 20px; }
.skill-import-dialog input, .skill-import-dialog select { width: 100%; min-width: 0; }
.skill-import-dialog .close-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.skills-library .hero { gap: 16px; flex-wrap: wrap; }

.business-panel > .field { margin-bottom: 18px; }
.business-panel .business-grid[hidden] { display: none; }
.wizard-shop-category { color: var(--muted); margin: 16px 0; }


.shop-management-modal { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 40px); }
.shop-management-modal .modal-body { padding: 32px; }
.shop-management-modal .modal-heading { margin-bottom: 8px; }
.shop-management-modal h2 { font-size: 25px; letter-spacing: -.025em; }
.shop-management-description { margin: 0; color: var(--muted); }
.shop-management-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 8px; }
.shop-management-toolbar > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.shop-management-toolbar svg, .shop-management-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shop-management-toolbar .button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.shop-management-list { display: grid; }
.shop-management-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.shop-management-cover { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-raised); overflow: hidden; display: grid; place-items: center; }
.shop-management-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-management-cover > svg { width: 26px; height: 26px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.shop-management-info { min-width: 0; display: grid; gap: 6px; }
.shop-management-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.shop-management-info strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.shop-management-info > span { color: var(--muted); font-size: 13px; }
.shop-current-label { font-size: 11px; font-weight: 600; color: var(--green-dark); background: var(--pale); padding: 2px 7px; border-radius: 5px; }
.shop-meta-separator { padding: 0 7px; }
.shop-management-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.shop-management-actions .button { white-space: nowrap; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; }
.shop-management-actions .shop-rename { background: transparent; padding: 10px; }
.shop-management-actions .shop-remove { background: transparent; width: 44px; padding: 10px; }
.shop-management-actions .button:hover { background: var(--surface-raised); }
.shop-management-actions .danger-text { color: var(--red); }
.shop-management-actions .danger-text:hover { background: var(--error-surface); }
.shop-management-footnote { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.shop-management-empty { padding: 36px 0; text-align: center; }
.shop-management-empty h3 { margin: 0 0 8px; }
.shop-management-empty p { color: var(--muted); margin: 0; }
.shop-delete-confirm { margin-top: 20px; padding: 16px; background: var(--error-surface); border-radius: 12px; }
.shop-delete-confirm[hidden] { display: none; }
.shop-delete-confirm .button.danger { background: var(--red); color: #fff; }
.business-grid button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 580px) {
 .shop-management-modal .modal-body { padding: 24px 20px; }
 .shop-management-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 18px 0; }
 .shop-management-cover { width: 48px; height: 56px; border-radius: 8px; }
 .shop-management-actions { gap: 0; }
 .shop-management-actions .shop-rename { width: 44px; padding: 10px; }
 .shop-management-actions .shop-rename span { display: none; }
 .shop-management-info > span { font-size: 12px; }
 .shop-meta-separator { padding: 0 4px; }
}
.business-panel #wizard-start { max-width: 100%; min-width: 0; }

.skill-admin-status { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-top:1px solid var(--line); background:var(--surface-inset, #f9fbfd); }
.skill-admin-status .button { min-height:44px; padding:8px 14px; font-size:12px; border:1px solid var(--line); background:var(--card); }
.skill-admin-status .button:hover { background:var(--surface-raised); border-color:var(--muted); }
.skill-admin-status .tag { margin:0; }

.skill-admin-status.is-deprecated { background:var(--error-surface, #fff0f1); border-top-color:#f0ccd2; }

body.hide-shop-switcher .business-switcher { display:none; }
body.hide-shop-switcher .business-switcher + .workspace-picker { margin-left:auto; }
.video-shop-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; overflow-wrap:anywhere; color:var(--ink); background:var(--surface-raised); margin-inline-end:6px; }
.video-shop-chip svg { width:14px; height:14px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }

/* Keep the known shop visually stable while its content changes. */
.business-switcher.is-switching .custom-select-trigger:disabled {
    background: #fff;
    color: var(--ink);
    opacity: 1;
    cursor: default;
}

/* Admin-only Skill curation, shared by catalog footers and video metadata. */
.skill-admin-status { justify-content:flex-start; gap:10px; }
.skill-admin-status.is-enabled { --skill-status-ink:#256147; --skill-status-fill:#edf8f2; --skill-status-border:#cce5d6; background:#f4faf6; }
.skill-admin-status.is-needs_improvement { --skill-status-ink:#86621e; --skill-status-fill:#fff7e6; --skill-status-border:#ead9b6; background:#fffbf2; }
.skill-admin-status.is-deprecated { --skill-status-ink:#ae263a; --skill-status-fill:#fff0f1; --skill-status-border:#f0ccd2; background:var(--error-surface, #fff0f1); }
.skill-status-caption { color:var(--muted); font-size:12px; font-weight:600; white-space:nowrap; }
.skill-status-picker { display:inline-block; min-width:0; max-width:100%; }
.skill-status-picker .custom-select { width:auto; }
.skill-status-picker .custom-select-trigger { gap:8px; min-height:44px; padding:0 12px; width:auto; max-width:100%; border:1px solid var(--skill-status-border); border-radius:22px; background:var(--skill-status-fill); color:var(--skill-status-ink); font-size:12px; font-weight:600; }
.skill-status-picker .custom-select-trigger::before { content:""; width:6px; height:6px; flex:0 0 6px; border-radius:50%; background:currentColor; }
.skill-status-picker .custom-select-trigger svg { width:14px; height:14px; flex-basis:14px; stroke:currentColor; }
.skill-status-picker .custom-select-trigger:hover { border-color:var(--skill-status-ink); }
.skill-status-picker .custom-select-trigger:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.skill-status-picker .custom-select-trigger:disabled { opacity:.65; cursor:wait; background:var(--skill-status-fill); color:var(--skill-status-ink); }
.video-info > .skill-admin-status { margin:10px 0; padding:0; border:0; background:transparent; flex-wrap:wrap; }

.input-media-preview { position:fixed; inset:auto; margin:0; padding:8px; max-width:calc(100vw - 24px); border:1px solid var(--line); border-radius:10px; background:var(--card); box-shadow:0 8px 28px #11132326; pointer-events:none; }
.input-media-preview img, .input-media-preview video { display:block; width:auto; height:auto; max-width:min(420px, calc(100vw - 42px)); max-height:60vh; object-fit:contain; border-radius:5px; }
.input-media-preview video { background:#111323; }

.custom-select-menu > button[data-skill-state="enabled"] { background:#edf8f2; color:#256147; }
.custom-select-menu > button[data-skill-state="needs_improvement"] { background:#fff7e6; color:#86621e; }
.custom-select-menu > button[data-skill-state="deprecated"] { background:#fff0f1; color:#ae263a; }
.custom-select-menu > button[data-skill-state]:is(:hover, :focus-visible) { filter:brightness(.96); outline:1px solid currentColor; outline-offset:-1px; }
.custom-select-menu > button[data-skill-state][aria-selected="true"] { box-shadow:inset 0 0 0 1px currentColor; }
.custom-select-menu > button[data-skill-state] > svg { stroke:currentColor; }

/* Dates follow the account library's creation order, in the viewer's timezone. */
.video-date-groups { display:grid; gap:32px; }
.video-date-group { min-width:0; }
.video-date-heading { position:sticky; top:0; z-index:5; margin:0 0 20px; padding:16px 0; background:var(--paper, #fff); border-bottom:1px solid var(--line); color:var(--ink); font-size:16px; font-weight:600; line-height:1.4; }

.skill-download-progress { display:grid; gap:8px; margin:0 16px 16px; color:var(--text-muted,#626b83); font-size:13px; }
.skill-download-progress progress { width:100%; height:8px; accent-color:#00838e; }
.skill-download-progress small { font-variant-numeric:tabular-nums; }
.skill-import-step.is-failed { flex-wrap:wrap; column-gap:9px; row-gap:4px; }
.skill-import-step .skill-import-error { flex:0 0 calc(100% - 17px); margin:0 0 3px 17px; font-weight:400; min-width:0; box-sizing:border-box; }

.skill-import-dialog .field > .skill-import-dropzone {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    box-sizing:border-box;
    min-height:200px;
    gap:8px;
    margin:0;
    padding:24px 18px;
    text-align:center;
    font-weight:400;
}
.skill-import-dropzone .wizard-cloud { width:48px; height:48px; margin-bottom:4px; }
.skill-import-dialog .skill-import-dropzone strong,
.skill-import-dialog .skill-import-dropzone > span,
.skill-import-dialog .skill-import-dropzone small {
    max-width:100%;
    margin-left:0;
    overflow-wrap:anywhere;
    font-size:16px;
    line-height:1.4;
}
.skill-import-dialog .skill-import-dropzone strong { font-weight:600; }
.skill-import-dialog .skill-import-dropzone > span,
.skill-import-dialog .skill-import-dropzone small { color:var(--muted); }
.skill-import-dropzone:focus-visible { outline:2px solid var(--green-dark); outline-offset:4px; }
.skill-import-dialog fieldset:disabled .skill-import-dropzone { opacity:.6; cursor:wait; pointer-events:none; }
.video-library-toolbar { display:flex; align-items:center; margin:0 0 24px; }
.video-business-filter { display:flex; flex-direction:column; gap:8px; width:min(100%, 280px); color:var(--ink); font-size:14px; font-weight:600; }
.video-business-filter .custom-select { width:100%; }
.video-filter-feedback { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; min-height:240px; color:var(--muted); text-align:center; }
.video-filter-feedback p { margin:0; }

/* One account library; retained project controls are compatibility-only. */
.business-switcher, #new-project { display: none; }
.media-library-picker { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.media-library-picker h3 { margin: 0; font-size: 14px; font-weight: 600; }
.media-library-picker #media-library-status:empty { display: none; }
.studio-material-picker { max-height: calc(100dvh - 24px); overflow-y: auto; }
#studio-materials { overscroll-behavior-y: contain; scrollbar-gutter: stable; }
#studio-materials .generate-assets { max-height: none; overflow: visible; }
.studio-material-picker .generate-asset { flex-direction: column; }
.studio-material-picker .generate-asset-media { width: 100%; }
.media-library-picker button:disabled { opacity: .5; cursor: default; }

/* Role-specific controls stay hidden until the authenticated capability is known. */
body:not(.is-admin) [data-admin-only],
body:not(.is-admin) #wizard-skill-label,
body:not(.is-admin) #wizard-skill-field,
body:not(.is-admin) #studio-pick-skill,
body:not(.is-admin) #generate-skill-trigger { display: none !important; }
body.is-admin .business-switcher { display: flex; }
body.is-admin .business-switcher[hidden] { display: flex; }
.admin-shop-fields { display: grid; gap: 16px; margin-top: 24px; }
.asset-keyframes { padding: 0 16px 16px; }
.asset-keyframes > span, .asset-analysis-note { font-size: 12px; color: var(--muted, #626b73); }
.asset-keyframes > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.asset-keyframes a { position: relative; width: 72px; height: 64px; overflow: hidden; border-radius: 8px; }
.asset-keyframes img { width: 100%; height: 100%; object-fit: cover; }
.asset-keyframes small { position: absolute; bottom: 0; right: 0; padding: 1px 4px; background: #fff; color: #263238; font-size: 10px; }
.asset-analysis-note { padding: 0 16px 16px; margin: 0; }


@media(max-width:760px) { .asset-keyframes a { width:56px; height:56px; } }

/* The supplied ShopVideo AI wordmark keeps its aspect ratio at every breakpoint. */
.brand-logo { display: block; width: 178px; height: 50px; object-fit: contain; flex-shrink: 0; }
@media (max-width: 600px) { .mobile-brand .brand-logo { width: 153px; height: 43px; } }

.auth-mark img { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 11px; }
.content.wizard-step-2, .content.wizard-step-3 { padding-bottom: 112px; }
.wizard-step-2 .wizard-actions, .wizard-step-3 .wizard-actions {
  position: fixed; z-index: 10; inset: auto 0 0; max-width: none; margin: 0;
  padding: 14px max(18px, calc((100vw - 1000px) / 2)) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
}

@media (max-width: 360px) { .mobile-brand .brand-logo { width: 134px; height: 38px; } }

#studio-materials #generate-assets[hidden] { display: none; }
#studio-materials .media-library-picker { margin-top: 16px; padding-top: 0; border-top: 0; }
#studio-materials .media-library-picker .generate-assets { margin-top: 0; }
#studio-materials #media-library-status:not(:empty) { margin-bottom: 12px; }
.asset-preview.is-unavailable { display: grid; min-height: 180px; place-items: center; background: var(--surface-inset, #f0f3f8); }
.asset-preview img[hidden] { display: none; }
