body[data-area="studio"] { --studio-inverse: #ffffff; overflow-x: hidden; background: var(--bg-main); }
body[data-area="studio"] main { min-width: 0; overflow-x: hidden; }

.panel {
    --studio-inverse: #ffffff;
    --studio-sidebar-width: 240px;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--studio-sidebar-width) minmax(0, 1fr);
    overflow-x: hidden;
    background: var(--bg-main);
}
.side { min-width: 0; padding: 18px; background: var(--bg-header); border-right: 1px solid var(--line); }
.studio-side { position: fixed; inset: 0 auto 0 0; z-index: 32; width: var(--studio-sidebar-width); height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; overflow: hidden; }
.studio-side-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side img { width: auto; height: 46px; max-height: 54px; max-width: 170px; object-fit: contain; margin-bottom: 18px; }
.studio-side .side-logo img { margin: 0; }
.studio-side-menu { min-width: 0; display: grid; align-content: start; gap: 6px; overflow-y: auto; padding-right: 2px; }
.side a { min-width: 0; display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 14px; line-height: 1.2; }
.side a:hover, .side a.is-active { color: var(--text); background: var(--panel); }
.side a.is-active { box-shadow: inset 3px 0 0 var(--brand); }
.side-logo { width: max-content; max-width: 100%; padding: 0 !important; margin: 0 !important; background: transparent !important; }
.side-logo img { margin-bottom: 0; }
.side-logo span { font-size: 14px; font-weight: 800; }
.studio-side-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 0;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.studio-side-toggle span { width: 18px; height: 2px; display: block; background: currentColor; border-radius: 999px; }
.side-utility-links {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.side-return-link {
    min-height: 42px !important;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    color: var(--studio-inverse) !important;
    background: var(--brand) !important;
    border: 1px solid var(--brand);
    box-shadow: 0 12px 26px rgba(30,1,143,.28);
}
.side-return-link strong { font-size: 13px; }
.panel-body { grid-column: 2; min-width: 0; overflow-x: hidden; padding: 28px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.stat-grid > div { min-height: 92px; display: grid; align-content: center; gap: 6px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.stat-grid strong { display: block; color: var(--text); font-size: 24px; }
.studio-form { display: grid; gap: 14px; max-width: 760px; }
.studio-form label { display: grid; gap: 7px; color: var(--muted); }
.studio-form input, .studio-form textarea, .studio-form select { width: 100%; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px; }
.studio-form textarea { min-height: 150px; resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.toolbar button, .panel-body button:not(.pill) { min-height: 38px; padding: 0 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.panel-body table { width: 100%; border-collapse: collapse; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-body th, .panel-body td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.panel-body th { color: var(--muted); font-size: 13px; }
.panel-body textarea { width: 100%; min-height: 180px; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.studio-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.studio-section-head h2, .studio-section-head p { margin: 0; }
.studio-section-head p { margin-top: 4px; color: var(--muted); }
.friend-search { display: flex; gap: 10px; margin: 0 0 14px; }
.friend-search input { flex: 1; min-width: 0; color: var(--text); background: var(--bg-main); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; }
.friend-search-results { display: grid; gap: 8px; margin-bottom: 16px; }
.friend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.friend-section { min-width: 0; padding: 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; }
.friend-section h3 { margin: 0 0 12px; font-size: 16px; }
.friend-list { display: grid; gap: 8px; }
.friend-row { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 8px; }
.friend-row strong, .friend-row span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-row span { color: var(--muted); font-size: 13px; }
.friend-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.friend-actions .pill { min-height: 34px; padding: 0 11px; font-size: 13px; }
.friend-state { min-height: 34px; display: inline-flex !important; align-items: center; padding: 0 10px; color: var(--muted); background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; }
.studio-subscriptions { display: grid; gap: 18px; }
.studio-grid-2 { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.studio-card { min-width: 0; padding: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; }
.studio-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.studio-card h2, .studio-card p { margin: 0; }
.studio-card p { color: var(--muted); line-height: 1.55; }
.studio-package-list { display: grid; gap: 12px; }
.studio-package-card { min-width: 0; display: grid; gap: 12px; padding: 14px; background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: 8px; }
.studio-package-card h3 { margin: 8px 0 4px; font-size: 18px; line-height: 1.18; overflow-wrap: anywhere; }
.studio-package-card p { color: var(--muted); line-height: 1.5; }
.studio-package-card .package-price-row span, .studio-package-card .package-meta-row span { background: var(--bg-card); }
.package-actions { justify-content: flex-end; }
.package-form .form-grid { gap: 12px; }
.package-form-actions { align-items: center; margin-top: 2px; }
.table-wrap { width: 100%; overflow-x: auto; }
.support-empty { border-left: 4px solid var(--brand); }
.dev-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 12px 14px; background: rgba(30, 1, 143, .16); border: 1px solid var(--border-color); border-left: 4px solid var(--brand); border-radius: 8px; color: var(--text); }
.dev-alert span { color: var(--muted); }

.creator-shell { background: var(--bg-main); }
.creator-upload-page { background: var(--bg-main); }
.creator-upload-form { width: min(1240px, 100%); min-width: 0; margin: 0 auto; }
.upload-layout { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 380px); gap: 18px; align-items: start; }
.upload-main { display: grid; gap: 14px; min-width: 0; }
.upload-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 2px; }
.upload-head h1, .upload-head p { margin: 0; }
.upload-head h1 { font-size: 34px; line-height: 1.05; }
.upload-head p { max-width: 720px; margin-top: 8px; color: var(--text-muted); line-height: 1.55; }
.dev-chip { min-height: 34px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--studio-inverse); background: var(--color-primary); border: 1px solid var(--color-primary); border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.upload-panel { width: 100%; min-width: 0; display: grid; gap: 14px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.upload-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.upload-panel-head h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.upload-panel-head span { color: var(--text-muted); font-size: 13px; text-align: right; }
.upload-panel label { display: grid; gap: 8px; color: var(--text-muted); }
.upload-panel input, .upload-panel textarea, .upload-panel select, .inline-input-row input, .link-scan-row input { width: 100%; min-width: 0; color: var(--text-main); background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; outline: 0; }
.upload-panel textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.upload-panel input:focus, .upload-panel textarea:focus, .inline-input-row input:focus, .link-scan-row input:focus { border-color: rgba(30,1,143,.72); box-shadow: 0 0 0 3px rgba(30,1,143,.22); }
.field-error { min-height: 18px; color: var(--danger); font-size: 13px; }
.upload-note { margin: 0; padding: 11px 12px; color: var(--text-muted); line-height: 1.5; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.link-scan-row, .inline-input-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.link-scan-row input { overflow-wrap: anywhere; }
.shield-status { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.shield-status strong, .shield-status span { min-width: 0; }
.shield-status span { color: var(--muted); }
.shield-status.is-safe { border-color: rgba(71,209,124,.35); }
.shield-status.is-review { border-color: rgba(245,184,75,.38); }
.shield-status.is-blocked { border-color: rgba(251,113,133,.4); }

.ai-tag-suggester { min-width: 0; display: grid; gap: 12px; padding: 14px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.ai-tag-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-tag-head p { max-width: 560px; margin: 0; color: var(--text-muted); line-height: 1.5; text-align: right; }
.ai-mark { min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--studio-inverse); background: var(--color-primary); border: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.ai-tag-actions { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tag-actions .pill { min-height: 36px; }
.ai-tag-actions .pill:disabled { opacity: .52; cursor: not-allowed; }
.ai-tag-chips { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.ai-tag-chip { min-height: 32px; padding: 0 10px; color: var(--text-main); background: var(--bg-card-soft); border: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent); border-radius: 999px; cursor: pointer; }
.ai-tag-chip:hover, .ai-tag-chip.is-added { color: var(--studio-inverse); border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.ai-content-suggestions { display: grid; gap: 8px; padding: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.ai-content-suggestions div { display: grid; gap: 3px; }
.ai-content-suggestions strong { color: var(--text); font-size: 13px; }
.ai-content-suggestions span, .ai-content-suggestions li { color: var(--text-muted); line-height: 1.45; }
.ai-content-suggestions ul { margin: 4px 0 0; padding-left: 18px; }
.ai-tag-error { margin: -4px 0 0; color: var(--danger); font-size: 13px; line-height: 1.45; }
.ai-tag-error[hidden] { display: none; }
.pill.is-loading { opacity: .78; cursor: wait; }

.upload-dropzone { display: grid; gap: 10px; }
.upload-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-dropzone-inner { min-height: 156px; display: grid !important; place-items: center; align-content: center; gap: 8px !important; padding: 18px; text-align: center; color: var(--text-main) !important; background: var(--bg-card-soft); border: 1px dashed color-mix(in srgb, var(--text-main) 18%, transparent); border-radius: 8px; cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.upload-dropzone-inner:hover, .upload-dropzone.is-dragging .upload-dropzone-inner { background: color-mix(in srgb, var(--bg-card-soft) 92%, var(--color-primary)); border-color: rgba(30,1,143,.85); box-shadow: inset 0 0 0 1px rgba(30,1,143,.35); }
.upload-dropzone-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--studio-inverse); background: var(--color-primary); border-radius: 50%; font-size: 26px; line-height: 1; }
.upload-dropzone small { color: var(--text-muted); }
.single-upload-preview { position: relative; overflow: hidden; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.single-upload-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.single-upload-preview button, .image-preview-item button, .video-preview-item button, .model-preview-item button { min-height: 30px; padding: 0 9px; color: var(--studio-inverse); background: rgba(251,113,133,.16); border: 1px solid rgba(251,113,133,.34); border-radius: 8px; cursor: pointer; }
.single-upload-preview button { position: absolute; right: 10px; bottom: 10px; }
.image-preview-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; overflow: hidden; }
.image-preview-item { position: relative; min-width: 0; overflow: hidden; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.image-preview-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.image-preview-item span { position: absolute; top: 8px; left: 8px; min-width: 24px; height: 24px; display: grid; place-items: center; color: var(--studio-inverse); background: rgba(0,0,0,.66); border-radius: 999px; font-size: 12px; }
.image-preview-item button { position: absolute; right: 8px; bottom: 8px; }
.image-preview-item.is-drag-over { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.video-link-builder { display: grid; gap: 12px; }
.video-preview-list { display: grid; gap: 8px; }
.video-preview-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.video-preview-item [data-video-thumb] { width: 48px; height: 34px; background: var(--color-primary) center / cover no-repeat; border-radius: 6px; }
.video-preview-item strong, .video-preview-item small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-preview-item small { grid-column: 2; color: var(--text-muted); overflow-wrap: anywhere; word-break: break-word; }
.model-preview-list { display: grid; gap: 8px; }
.model-preview-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.model-preview-item > span { width: 48px; height: 38px; display: grid; place-items: center; color: var(--studio-inverse); background: var(--color-primary); border-radius: 8px; font-size: 12px; font-weight: 900; }
.model-preview-item label { min-width: 0; gap: 5px !important; }
.model-preview-item input { padding: 9px 10px !important; }
.model-preview-item small { grid-column: 2; min-width: 0; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: anywhere; }

.category-selector { display: grid; gap: 12px; min-width: 0; }
.category-tabs { max-width: 100%; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.category-tabs button { flex: 0 0 auto; min-height: 38px; padding: 0 12px; color: var(--text-main); background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 999px; cursor: pointer; }
.category-tabs button.is-active { color: var(--studio-inverse); background: var(--color-primary); border-color: var(--color-primary); }
.category-panel { display: none; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.category-panel.is-active { display: grid; }
.category-card-option { min-height: 86px; display: grid; align-content: center; gap: 5px; padding: 12px; text-align: left; color: var(--text-main); background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; }
.category-card-option span { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.category-card-option.is-selected { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }

.privacy-selector { display: grid; gap: 12px; }
.privacy-grid, .package-select-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.privacy-card, .package-select-card { min-height: 92px; display: grid !important; align-content: center; gap: 6px !important; padding: 12px; color: var(--text-main) !important; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; }
.privacy-card input, .package-select-card input { position: absolute; opacity: 0; pointer-events: none; }
.privacy-card span, .package-select-card span { color: var(--text-muted); font-size: 13px; }
.privacy-card.is-selected, .package-select-card.is-selected { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.package-select-grid { display: none; }
.package-select-grid.is-open { display: grid; }

.upload-preview-panel { position: sticky; top: 18px; width: 100%; max-width: 380px; display: grid; gap: 14px; min-width: 0; align-self: start; }
.live-preview-card { overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.live-cover { position: relative; display: grid; place-items: center; background: var(--bg-card-soft); aspect-ratio: 16 / 10; color: var(--text-muted); }
.live-cover.is-square { aspect-ratio: 1 / 1; }
.live-cover img { width: 100%; height: 100%; object-fit: cover; }
.live-preview-body { display: grid; gap: 8px; padding: 14px; }
.live-preview-body h3, .live-preview-body p { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-preview-body p, .live-preview-body small { color: var(--text-muted); }
.live-preview-body small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-badge { width: max-content; min-height: 26px; display: inline-flex; align-items: center; padding: 0 9px; color: var(--studio-inverse); background: var(--color-primary); border-radius: 999px; font-size: 12px; font-weight: 800; }
.mini-play { width: 42px; height: 42px; display: grid; place-items: center; color: var(--studio-inverse); background: var(--color-primary); border: 0; border-radius: 50%; cursor: pointer; }
.upload-progress { display: grid; gap: 8px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.upload-progress div { height: 9px; overflow: hidden; background: var(--bg-card-soft); border-radius: 999px; }
.upload-progress i { display: block; width: 0%; height: 100%; background: var(--color-primary); border-radius: inherit; transition: width .16s ease; }
.submit-bar { display: grid; gap: 8px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.pill.danger { color: var(--studio-inverse); border-color: rgba(251,113,133,.42); background: rgba(251,113,133,.14); }
.audio-preview-card { display: grid; gap: 10px; padding: 12px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.audio-preview-meta { display: grid; gap: 3px; }
.audio-preview-meta span { color: var(--text-muted); overflow-wrap: anywhere; }
.audio-preview-card audio { width: 100%; }
.audio-preview-actions { display: flex; justify-content: flex-end; }
.studio-list-page { background: var(--bg-main); }
.studio-list-page .table-wrap { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }

.studio-profile-page { background: var(--bg-main); }
.studio-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 14px; align-items: start; }
.studio-profile-main { display: grid; gap: 14px; min-width: 0; }
.studio-profile-media-card, .studio-profile-form { gap: 12px; }
.studio-profile-cover-preview {
    height: clamp(150px, 16vw, 210px);
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--text-muted);
    background:
        linear-gradient(180deg, rgba(12,12,12,.12), rgba(12,12,12,.9)),
        linear-gradient(135deg, rgba(30,1,143,.68), rgba(22,22,22,.96) 62%, rgba(245,184,75,.18));
    border: 1px solid var(--border-color);
    border-radius: 14px;
}
.studio-profile-cover-preview img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.studio-profile-avatar-row { display: flex; align-items: center; gap: 10px; margin-top: -34px; padding-left: 14px; }
.studio-profile-avatar-row > div:last-child { min-width: 0; display: grid; gap: 3px; padding: 9px 12px; background: rgba(18,18,18,.94); border: 1px solid var(--border-color); border-radius: 8px; }
.studio-profile-avatar-row strong, .studio-profile-avatar-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-profile-avatar-row span { color: var(--text-muted); }
.studio-profile-avatar-preview {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    color: var(--studio-inverse);
    background: var(--color-primary);
    border: 4px solid var(--bg-card);
    border-radius: 18px;
    font-size: 28px;
    font-weight: 900;
}
.studio-profile-avatar-preview.small { width: 58px; height: 58px; border-width: 3px; border-radius: 14px; font-size: 22px; }
.studio-profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.studio-profile-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.studio-profile-upload-grid form { display: grid; gap: 8px; padding: 10px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.studio-profile-upload-grid label, .studio-profile-form label { display: grid; gap: 7px; color: var(--text-muted); }
.studio-profile-dropzone {
    min-height: 98px;
    place-items: center;
    align-content: center;
    text-align: center;
    padding: 12px;
    color: var(--text-main) !important;
    background: var(--bg-card);
    border: 1px dashed color-mix(in srgb, var(--text-main) 18%, transparent);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.studio-profile-dropzone:hover,
.studio-profile-dropzone.is-dragging {
    background: color-mix(in srgb, var(--bg-card-soft) 92%, var(--color-primary));
    border-color: rgba(30,1,143,.75);
    box-shadow: inset 0 0 0 1px rgba(30,1,143,.28);
}
.studio-profile-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.studio-profile-dropzone .upload-dropzone-icon { width: 34px; height: 34px; font-size: 18px; }
.studio-profile-dropzone small { color: var(--text-muted); }
.studio-profile-upload-grid input, .studio-profile-form input, .studio-profile-form textarea {
    width: 100%;
    min-width: 0;
    color: var(--text-main);
    background: var(--bg-card-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 12px;
}
.studio-profile-form textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.studio-profile-upload-grid input:focus,
.studio-profile-form input:focus,
.studio-profile-form textarea:focus,
.studio-account-form input:focus,
.artist-connect-form input:focus,
.artist-connect-form textarea:focus {
    border-color: rgba(30,1,143,.75);
    box-shadow: 0 0 0 3px rgba(30,1,143,.18);
    outline: 0;
}
.profile-upload-actions, .profile-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-upload-actions .pill { flex: 1 1 120px; min-height: 36px; padding: 0 12px; }
.studio-profile-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.studio-profile-options fieldset { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.studio-profile-options legend { grid-column: 1 / -1; padding: 0 4px; color: var(--text); font-weight: 800; }
.studio-profile-options label { min-height: 36px; display: flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--text-main); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; font-size: 13px; }
.studio-profile-options input[type="radio"] { width: 16px; height: 16px; accent-color: var(--color-primary); }
.studio-profile-preview { position: sticky; top: 18px; }
.profile-preview-card { overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.profile-preview-cover {
    min-height: 104px;
    background:
        linear-gradient(180deg, rgba(12,12,12,.04), rgba(12,12,12,.85)),
        linear-gradient(135deg, rgba(30,1,143,.72), rgba(22,22,22,.94));
    border-radius: 0 0 16px 16px;
}
.profile-preview-cover img { width: 100%; height: 104px; min-height: 0; object-fit: cover; display: block; }
.profile-preview-body { display: grid; gap: 7px; padding: 0 12px 14px; margin-top: -26px; }
.profile-preview-body strong, .profile-preview-body span, .profile-preview-body p { min-width: 0; margin: 0; }
.profile-preview-body span, .profile-preview-body p { color: var(--text-muted); line-height: 1.5; }
.profile-preview-body p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }

.studio-settings-page,
.artist-connect-page {
    min-width: 0;
    background: var(--bg-main);
}

.settings-grid,
.artist-connect-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.studio-account-form,
.artist-connect-form {
    display: grid;
    gap: 12px;
}

.studio-account-form label,
.artist-connect-form label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--text-muted);
}

.studio-account-form input,
.artist-connect-form input,
.artist-connect-form textarea {
    width: 100%;
    min-width: 0;
    color: var(--text-main);
    background: var(--bg-card-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 12px;
    outline: 0;
}

.artist-connect-form textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.55;
}

.settings-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.danger-zone {
    border-color: rgba(251,113,133,.30);
}

.status-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: var(--text);
    background: var(--bg-card-soft);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.status-approved { color: var(--success); border-color: rgba(71,209,124,.35); }
.status-pending { color: var(--warning); border-color: rgba(245,184,75,.38); }
.status-rejected { color: var(--danger); border-color: rgba(251,113,133,.4); }
.status-missing { color: var(--text-muted); }

.artist-status-card {
    min-height: 260px;
}

.artist-preview-mini {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.artist-preview-cover {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.artist-preview-avatar {
    width: 58px;
    height: 58px;
    margin-top: -28px;
    margin-left: 10px;
    object-fit: cover;
    border-radius: 999px;
    border: 3px solid var(--bg-card-soft);
    background: var(--bg-card-soft);
}

.artist-preview-mini strong,
.artist-preview-mini span,
.artist-preview-mini p {
    min-width: 0;
    margin: 0;
}

.artist-preview-mini strong,
.artist-preview-mini span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-preview-mini span,
.artist-preview-mini p {
    color: var(--text-muted);
    line-height: 1.5;
}

.artist-lock-card {
    width: min(820px, 100%);
    display: grid;
    gap: 14px;
    margin: 0 auto;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.artist-lock-card h1,
.artist-lock-card p {
    margin: 0;
}

.artist-lock-card p {
    color: var(--text-muted);
    line-height: 1.55;
}

.artist-lock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 860px) {
    .panel { grid-template-columns: 1fr; }
    .studio-side { position: sticky; inset: auto; top: 0; z-index: 32; width: auto; height: auto; max-height: 100vh; display: grid; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft); }
    .studio-side-head { width: 100%; }
    .studio-side .side-logo img { height: 36px; max-height: 40px; }
    .studio-side-toggle { display: inline-grid; }
    .studio-side-menu { display: none; max-height: calc(100vh - 78px); overflow-y: auto; padding: 4px 0 2px; }
    .studio-side.is-open .studio-side-menu { display: grid; }
    .side a { white-space: normal; }
    .panel-body { grid-column: auto; padding: 22px 16px; }
    .friend-grid { grid-template-columns: 1fr; }
    .studio-grid-2 { grid-template-columns: 1fr; }
    .studio-profile-layout { grid-template-columns: 1fr; }
    .studio-profile-preview { position: static; }
    .settings-grid, .artist-connect-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .side { padding: 12px; }
    .studio-side .side-logo img { height: 34px; }
    .stat-grid { grid-template-columns: 1fr; }
    .panel-body table { display: block; overflow-x: auto; white-space: nowrap; }
    .friend-search, .friend-row { grid-template-columns: 1fr; display: grid; }
    .friend-actions { justify-content: stretch; }
    .friend-actions .pill, .friend-state { width: 100%; justify-content: center; }
    .studio-card { padding: 14px; }
    .package-actions .pill, .package-form-actions .pill { flex: 1 1 100%; }
    .studio-profile-upload-grid, .studio-profile-options { grid-template-columns: 1fr; }
    .studio-profile-options fieldset { grid-template-columns: 1fr; }
    .studio-profile-cover-preview { height: 142px; border-radius: 14px; }
    .studio-profile-avatar-row { align-items: flex-start; display: grid; padding-left: 10px; }
}

@media (max-width: 1080px) {
    .upload-layout { grid-template-columns: 1fr; }
    .upload-preview-panel { position: static; max-width: none; }
}

@media (max-width: 640px) {
    .upload-head, .upload-panel-head { display: grid; }
    .upload-panel-head span { text-align: left; }
    .upload-head h1 { font-size: 28px; }
    .link-scan-row, .inline-input-row, .video-preview-item { grid-template-columns: 1fr; }
    .upload-panel { padding: 14px; }
    .privacy-grid, .package-select-grid, .category-panel { grid-template-columns: 1fr; }
    .ai-tag-head { display: grid; }
    .ai-tag-head p { text-align: left; }
    .ai-tag-actions .pill { flex: 1 1 100%; justify-content: center; }
}

.finance-page { color: var(--text-main); background: var(--bg-main); }
.finance-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.finance-head h1, .finance-head p { margin: 0; }
.finance-head h1 { font-size: 32px; line-height: 1.08; }
.finance-head p, .muted { color: var(--text-muted); line-height: 1.55; }
.finance-alert { margin: 0 0 14px; padding: 12px 14px; color: var(--text-main); background: rgba(30,1,143,.16); border: 1px solid var(--border-color); border-left: 4px solid var(--color-primary); border-radius: 8px; }
.finance-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; }
.finance-stat-grid article { min-width: 0; display: grid; gap: 7px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.finance-stat-grid span { color: var(--text-muted); }
.finance-stat-grid strong { font-size: 24px; line-height: 1.12; overflow-wrap: anywhere; }
.finance-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .48fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.finance-card { min-width: 0; display: grid; gap: 14px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.finance-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finance-card-head h2 { margin: 0; font-size: 18px; }
.finance-card-head span { color: var(--text-muted); }
.finance-table { width: 100%; min-width: 900px; border-collapse: collapse; background: var(--bg-card); }
.finance-table.compact { min-width: 720px; }
.finance-table th, .finance-table td { padding: 11px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.finance-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; }
.finance-table small { color: var(--text-muted); }
.finance-dl { display: grid; gap: 10px; margin: 0; }
.finance-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.finance-dl dt { color: var(--text-muted); }
.finance-dl dd { margin: 0; text-align: right; }
.finance-form { display: grid; gap: 12px; }
.finance-form.compact { gap: 10px; }
.finance-form label { display: grid; gap: 7px; color: var(--text-muted); }
.finance-form input, .finance-form select, .finance-form textarea { width: 100%; min-width: 0; color: var(--text-main); background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; padding: 11px 12px; outline: 0; }
.finance-form textarea { min-height: 92px; resize: vertical; }
.finance-form input:focus, .finance-form select:focus, .finance-form textarea:focus { border-color: rgba(30,1,143,.75); box-shadow: 0 0 0 3px rgba(30,1,143,.22); }
.check-row { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; }
.check-row input { width: 18px; height: 18px; accent-color: var(--color-primary); }
.bank-mini-list, .bank-account-list { display: grid; gap: 10px; }
.bank-mini-list article, .bank-account-list article { min-width: 0; display: grid; gap: 6px; padding: 12px; background: var(--bg-card-soft); border: 1px solid var(--border-color); border-radius: 8px; }
.bank-mini-list span, .bank-account-list p { color: var(--text-muted); overflow-wrap: anywhere; }
.bank-mini-list em { width: max-content; color: var(--studio-inverse); background: var(--color-primary); border-radius: 999px; padding: 4px 8px; font-size: 12px; font-style: normal; }
.bank-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finance-page .status-pending { color: #f5b84b; border-color: rgba(245,184,75,.35); }
.finance-page .status-approved, .finance-page .status-processing { color: #8ab4ff; border-color: rgba(138,180,255,.35); }
.finance-page .status-sent, .finance-page .status-safe, .finance-page .status-completed { color: #47d17c; border-color: rgba(71,209,124,.35); }
.finance-page .status-rejected, .finance-page .status-cancelled { color: #fb7185; border-color: rgba(251,113,133,.35); }

[data-theme="light"] .creator-shell,
[data-theme="light"] .studio-list-page,
[data-theme="light"] .studio-profile-page,
[data-theme="light"] .studio-settings-page,
[data-theme="light"] .artist-connect-page,
[data-theme="light"] .finance-page {
    color: var(--text);
    background: var(--bg-main);
}

[data-theme="light"] .upload-panel,
[data-theme="light"] .studio-card,
[data-theme="light"] .studio-profile-upload-grid form,
[data-theme="light"] .studio-profile-options fieldset,
[data-theme="light"] .artist-preview-mini,
[data-theme="light"] .artist-lock-card,
[data-theme="light"] .finance-card,
[data-theme="light"] .finance-stat-grid article,
[data-theme="light"] .studio-list-page .table-wrap {
    color: var(--text);
    background: var(--bg-card);
    border-color: var(--line);
}

[data-theme="light"] .artist-preview-avatar {
    border-color: var(--bg-card);
    background: #eef0f5;
}

[data-theme="light"] .studio-package-card,
[data-theme="light"] .finance-dl div,
[data-theme="light"] .category-option,
[data-theme="light"] .upload-preview-card,
[data-theme="light"] .ai-content-suggestions,
[data-theme="light"] .friend-row {
    background: var(--bg-card-soft);
    border-color: var(--line);
}

[data-theme="light"] .upload-panel input,
[data-theme="light"] .upload-panel textarea,
[data-theme="light"] .upload-panel select,
[data-theme="light"] .studio-form input,
[data-theme="light"] .studio-form textarea,
[data-theme="light"] .studio-form select,
[data-theme="light"] .friend-search input,
[data-theme="light"] .studio-profile-upload-grid input,
[data-theme="light"] .studio-profile-form input,
[data-theme="light"] .studio-profile-form textarea,
[data-theme="light"] .studio-account-form input,
[data-theme="light"] .artist-connect-form input,
[data-theme="light"] .artist-connect-form textarea,
[data-theme="light"] .finance-form input,
[data-theme="light"] .finance-form select,
[data-theme="light"] .finance-form textarea {
    color: var(--text);
    background: var(--bg-card-soft);
    border-color: var(--line);
}

[data-theme="light"] .upload-panel label,
[data-theme="light"] .studio-profile-upload-grid label,
[data-theme="light"] .studio-profile-form label,
[data-theme="light"] .studio-account-form label,
[data-theme="light"] .artist-connect-form label,
[data-theme="light"] .artist-preview-mini span,
[data-theme="light"] .artist-preview-mini p,
[data-theme="light"] .artist-lock-card p,
[data-theme="light"] .ai-content-suggestions span,
[data-theme="light"] .ai-content-suggestions li,
[data-theme="light"] .finance-form label,
[data-theme="light"] .finance-head p,
[data-theme="light"] .finance-stat-grid span,
[data-theme="light"] .finance-dl dt,
[data-theme="light"] .muted {
    color: var(--muted);
}

[data-theme="light"] .ai-content-suggestions strong {
    color: var(--text);
}

[data-theme="light"] .finance-table,
[data-theme="light"] .panel-body table {
    background: var(--bg-card);
    color: var(--text);
}

[data-theme="light"] .finance-table th,
[data-theme="light"] .finance-table td,
[data-theme="light"] .panel-body th,
[data-theme="light"] .panel-body td {
    border-color: var(--line);
}

[data-theme="light"] .side {
    background: var(--bg-header);
    border-color: var(--line);
}

[data-theme="light"] .side a:hover,
[data-theme="light"] .side a.is-active,
[data-theme="light"] .side-return-link {
    box-shadow: none;
}

[data-theme="light"] .upload-note,
[data-theme="light"] .shield-status,
[data-theme="light"] .ai-tag-suggester,
[data-theme="light"] .ai-tag-chips,
[data-theme="light"] .upload-dropzone-inner,
[data-theme="light"] .single-upload-preview,
[data-theme="light"] .image-preview-item,
[data-theme="light"] .video-preview-item,
[data-theme="light"] .model-preview-item,
[data-theme="light"] .category-tabs button,
[data-theme="light"] .category-card-option,
[data-theme="light"] .privacy-card,
[data-theme="light"] .package-select-card,
[data-theme="light"] .live-cover,
[data-theme="light"] .upload-progress div,
[data-theme="light"] .audio-preview-card,
[data-theme="light"] .studio-profile-dropzone,
[data-theme="light"] .studio-profile-options label,
[data-theme="light"] .artist-preview-mini,
[data-theme="light"] .bank-mini-list article,
[data-theme="light"] .bank-account-list article {
    background: var(--bg-card-soft);
    border-color: var(--line);
}

[data-theme="light"] .live-preview-card,
[data-theme="light"] .upload-progress,
[data-theme="light"] .submit-bar,
[data-theme="light"] .profile-preview-card {
    background: var(--bg-card);
    border-color: var(--line);
}

[data-theme="light"] .studio-profile-avatar-row > div:last-child {
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
    border-color: var(--line);
}

[data-theme="light"] .studio-profile-cover-preview,
[data-theme="light"] .profile-preview-cover {
    color: var(--muted);
    background:
        linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.78)),
        linear-gradient(135deg, rgba(30,1,143,.14), var(--bg-card-soft) 62%, rgba(245,184,75,.16));
    border-color: var(--line);
}

[data-theme="light"] .artist-preview-avatar {
    border-color: var(--bg-card-soft);
    background: var(--bg-card-soft);
}

[data-theme="light"] .profile-preview-body strong,
[data-theme="light"] .studio-profile-options legend,
[data-theme="light"] .artist-preview-mini strong {
    color: var(--text);
}

.studio-profile-page .community-composer,
.studio-profile-page .studio-community-list,
.studio-profile-page .story-strip {
    box-shadow: none;
}

.studio-profile-page .community-type-tabs button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
}

.studio-profile-page .community-type-tabs button.is-active {
    color: var(--studio-inverse);
    background: var(--brand);
}

.studio-profile-page .community-composer textarea,
.studio-profile-page .community-comment-form textarea,
.studio-profile-page .story-composer textarea {
    min-height: 88px;
    color: var(--text);
    background: var(--bg-card-soft);
}

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

.studio-profile-preview .story-strip {
    margin-top: 14px;
}

[data-theme="light"] .studio-profile-page .community-composer,
[data-theme="light"] .studio-profile-page .studio-community-list,
[data-theme="light"] .studio-profile-page .story-strip,
[data-theme="light"] .studio-profile-page .community-post-card {
    color: var(--text);
    background: var(--bg-card);
    border-color: var(--line);
}

[data-theme="light"] .studio-profile-page .community-poll,
[data-theme="light"] .studio-profile-page .community-comment,
[data-theme="light"] .studio-profile-page .story-composer,
[data-theme="light"] .studio-profile-page .story-empty {
    background: var(--bg-card-soft);
    border-color: var(--line);
}

@media (max-width: 980px) {
    .finance-grid { grid-template-columns: 1fr; }
    .finance-head { align-items: flex-start; display: grid; }
}

@media (max-width: 560px) {
    .finance-head h1 { font-size: 28px; }
    .finance-stat-grid { grid-template-columns: 1fr; }
    .finance-card { padding: 14px; }
    .finance-dl div, .bank-card-head { display: grid; }
}
