
:root {
  --ink: #0a1016;
  --panel: #111922;
  --panel-2: #151f2a;
  --line: rgba(229, 210, 173, 0.12);
  --muted: #81909f;
  --paper: #f3efe7;
  --gold: #d8b978;
  --gold-2: #f0d89f;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-geist-sans), "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, textarea, input { font: inherit; }
button { color: inherit; }

.app-shell { display: flex; min-height: 100vh; background: radial-gradient(circle at 78% 0%, rgba(61, 91, 112, .15), transparent 30%), #0b1117; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 248px; flex-direction: column; border-right: 1px solid var(--line); background: rgba(8, 13, 18, .96); }
.brand-mark { display: flex; align-items: center; gap: 13px; height: 78px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.brand-mark .seal { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(216, 185, 120, .75); border-radius: 8px 14px 8px 14px; color: var(--gold-2); font-family: serif; font-size: 26px; box-shadow: inset 0 0 0 3px #0b1117, inset 0 0 0 4px rgba(216, 185, 120, .22); }
.brand-mark strong { display: block; letter-spacing: .12em; font-family: "Songti SC", SimSun, serif; font-size: 21px; font-weight: 600; }
.brand-mark small { display: block; margin-top: 4px; color: #677380; font-size: 10px; letter-spacing: .16em; }
.side-nav { padding: 20px 14px; }
.side-nav p { margin: 18px 12px 9px; color: #586573; font-size: 14px; letter-spacing: .16em; }
.side-nav p:first-child { margin-top: 0; }
.side-nav button { position: relative; display: flex; width: 100%; align-items: center; gap: 12px; margin: 3px 0; padding: 11px 12px; border: 0; border-radius: 9px; color: #9aa5af; background: transparent; cursor: pointer; text-align: left; font-size: 16px; transition: .2s ease; }
.side-nav button > span { display: grid; width: 22px; color: #667480; place-items: center; font-family: serif; }
.side-nav button:hover { background: rgba(255,255,255,.035); color: #ddd7cb; }
.side-nav button.active { color: var(--gold-2); background: linear-gradient(90deg, rgba(216,185,120,.16), rgba(216,185,120,.04)); }
.side-nav button.active::before { position: absolute; left: -14px; width: 2px; height: 22px; border-radius: 2px; background: var(--gold); content: ""; box-shadow: 0 0 14px var(--gold); }
.side-nav button.active > span { color: var(--gold); }
.side-nav em { margin-left: auto; padding: 2px 5px; border: 1px solid rgba(216,185,120,.18); border-radius: 5px; color: #786b52; font-size: 10px; font-style: normal; }
.side-bottom { margin-top: auto; padding: 16px; }
.points-card { padding: 14px; border: 1px solid rgba(216,185,120,.15); border-radius: 11px; background: linear-gradient(145deg, rgba(216,185,120,.09), rgba(255,255,255,.015)); }
.points-card span, .points-card small { display: block; color: #798591; font-size: 13px; }
.points-card strong { display: block; margin: 4px 0; color: var(--gold-2); font-size: 30px; font-weight: 500; }
.points-card button { margin-top: 10px; padding: 0; border: 0; color: #a48d61; background: none; font-size: 13px; cursor: pointer; }
.help-link { margin-top: 12px; padding: 9px 12px; border: 0; color: #65727f; background: none; font-size: 14px; cursor: pointer; }

.workspace { width: calc(100% - 248px); margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 8; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); color: #6f7d89; background: rgba(10, 16, 22, .88); backdrop-filter: blur(18px); font-size: 13px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #75b89d; box-shadow: 0 0 8px #75b89d; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.account-button { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.top-actions > button { position: relative; margin-right: 10px; border: 0; color: #82909d; background: none; font-size: 25px; cursor: pointer; }
.notification-dot { position: absolute; top: 2px; right: 1px; width: 5px; height: 5px; border-radius: 50%; background: #cba966; }
.avatar { width: 36px; height: 36px; border: 1.5px solid rgba(216,185,120,.35); border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-name { color: #b7c0c7; font-size: 14px; }
.user-name small { display: block; margin-top: 2px; color: #6d7983; font-size: 10px; }
.chevron { flex-shrink: 0; margin-left: 2px; opacity: .55; transition: transform .2s; }
.account-button:hover .chevron { opacity: .85; }
.content-wrap { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 47px 0 80px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.eyebrow { color: #8c7954; font-size: 11px; letter-spacing: .26em; }
.page-heading h1 { margin: 8px 0 7px; font-family: "Songti SC", SimSun, serif; font-size: clamp(31px, 4vw, 46px); font-weight: 400; letter-spacing: .05em; }
.page-heading p { margin: 0; color: #778592; font-size: 16px; }
.workflow-badge { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border: 1px solid rgba(216,185,120,.12); border-radius: 10px; color: #a8b1b8; background: rgba(255,255,255,.015); font-size: 13px; }
.workflow-badge i { color: var(--gold); font-family: serif; font-size: 31px; font-style: normal; }
.workflow-badge small { display: block; margin-top: 2px; color: #596774; font-size: 10px; }

.mode-tabs { display: flex; width: 410px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.mode-tabs button { flex: 1; padding: 9px 12px; border: 0; border-radius: 8px; color: #73808b; background: transparent; cursor: pointer; font-size: 14px; transition: .2s; }
.mode-tabs button small { display: block; margin-top: 3px; color: #4f5b65; font-size: 10px; }
.mode-tabs button.active { color: #e8ddc7; background: #1b2630; box-shadow: 0 5px 16px rgba(0,0,0,.22); }
.mode-tabs button.active small { color: #9e8c66; }
.product-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.product-switch > button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.065); border-radius: 13px; color: #77848e; background: rgba(17,25,34,.75); cursor: pointer; text-align: left; transition: .2s ease; }
.product-switch > button:hover { border-color: rgba(216,185,120,.2); transform: translateY(-1px); }
.product-switch > button.active { border-color: rgba(216,185,120,.42); color: #d7d0c2; background: linear-gradient(135deg, rgba(216,185,120,.12), rgba(21,31,42,.95)); box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.product-number { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(216,185,120,.2); border-radius: 50%; color: #8d7952; font-family: serif; font-size: 11px; }
.product-switch strong { display: block; color: inherit; font-size: 15px; font-weight: 500; }
.product-switch small { display: block; margin-top: 4px; color: #5d6973; font-size: 10px; }
.product-switch i { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #9b8457; background: rgba(216,185,120,.07); font-family: serif; font-size: 18px; font-style: normal; }
.creator-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.form-card { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(21,31,42,.95), rgba(13,21,28,.95)); box-shadow: 0 18px 60px rgba(0,0,0,.12); }
.section-title { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.055); }
.section-title > span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(216,185,120,.28); border-radius: 50%; color: var(--gold); font-family: serif; font-size: 13px; }
.section-title h2 { margin: 0; color: #ddd8cf; font-size: 18px; font-weight: 500; }
.section-title p { margin: 4px 0 0; color: #63717e; font-size: 11px; }
.upload-grid { display: grid; gap: 13px; margin-top: 17px; }
.upload-card { position: relative; display: flex; min-height: 76px; align-items: center; gap: 13px; padding: 13px 15px; overflow: hidden; border: 1px dashed rgba(216,185,120,.22); border-radius: 11px; color: #b8c0c6; background: rgba(0,0,0,.12); cursor: pointer; text-align: left; transition: .2s; }
.upload-card::after { position: absolute; inset: 0; opacity: .04; background-image: linear-gradient(45deg, var(--gold) 1px, transparent 1px), linear-gradient(-45deg, var(--gold) 1px, transparent 1px); background-size: 20px 20px; content: ""; pointer-events: none; }
.upload-card:hover, .upload-card.is-dragging { border-color: rgba(216,185,120,.55); background: rgba(216,185,120,.06); }
.upload-card.has-file { border-style: solid; border-color: rgba(117,184,157,.32); }
.upload-icon { z-index: 1; display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(216,185,120,.2); border-radius: 9px; color: var(--gold); background: rgba(216,185,120,.07); font-size: 23px; }
.upload-copy { z-index: 1; min-width: 0; }
.upload-copy strong { display: block; overflow: hidden; color: #cfd4d6; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.upload-copy small { display: block; margin-top: 6px; color: #5d6a76; font-size: 11px; }
.remove-file { z-index: 2; display: grid; width: 25px; height: 25px; margin-left: auto; place-items: center; border-radius: 50%; color: #74808a; background: rgba(255,255,255,.04); }
.script-box { padding: 13px; border: 1px solid rgba(255,255,255,.065); border-radius: 11px; background: rgba(0,0,0,.13); }
.field-label { display: flex; align-items: center; justify-content: space-between; color: #9fa8af; font-size: 13px; }
.field-label > span { color: #586571; font-size: 10px; }
.field-label button { padding: 0; border: 0; color: #aa9262; background: none; cursor: pointer; font-size: 11px; }
.script-box textarea { width: 100%; height: 96px; margin-top: 10px; resize: none; border: 0; outline: none; color: #bbc3c8; background: transparent; font-size: 14px; line-height: 1.8; }
.script-footer { display: flex; align-items: center; justify-content: space-between; color: #5e6b76; font-size: 10px; }
.script-footer button { padding: 0; border: 0; color: #66737e; background: none; cursor: pointer; font-size: 10px; }
.voice-section { margin-top: 18px; }
.voice-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.voice-list button { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 9px; border: 1px solid rgba(255,255,255,.06); border-radius: 9px; color: #9da6ad; background: rgba(0,0,0,.12); cursor: pointer; text-align: left; }
.voice-list button.active { border-color: rgba(216,185,120,.38); background: rgba(216,185,120,.07); }
.voice-avatar { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: color-mix(in srgb, var(--voice) 65%, white); background: color-mix(in srgb, var(--voice) 16%, transparent); }
.voice-list strong { display: block; overflow: hidden; color: #c2c8cc; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.voice-list small { display: block; margin-top: 3px; color: #5e6b75; font-size: 11px; }
.voice-list i { margin-left: auto; color: #6d7a84; font-size: 11px; font-style: normal; }

/* 上传区小标题（我的形象 / 我的声音）+ 间距微调 */
.upload-section-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.upload-section-head.voice-head { margin-top: 16px; }
.upload-section-head label { color: #aab2b8; font-size: 13px; }
.upload-section-head button { padding: 5px 12px; border: 1px solid rgba(216,185,120,.25); border-radius: 8px; color: var(--gold-2); background: rgba(216,185,120,.06); cursor: pointer; font-size: 12px; }
/* 上传驱动音频与上方上传形象照片之间增加间距 */
.avatar-only .upload-card + .upload-card { margin-top: 14px; }
/* 克隆样本与上方选择声音之间增加间距 */
.voice-section .upload-section-head + .upload-card { margin-top: 12px; }

/* 形象照片上传后预览 */
.upload-card .upload-preview { z-index: 1; flex: 0 0 auto; width: 56px; height: 56px; object-fit: cover; border-radius: 9px; border: 1px solid rgba(216,185,120,.3); display: none; }
.upload-card.has-file .upload-preview { display: block; }
.upload-card.has-file .upload-icon { display: none; }
/* 音频样本上传后内联播放 */
.upload-card .upload-preview-audio { z-index: 1; width: 100%; margin-top: 4px; height: 34px; }
.upload-card.has-file .upload-preview-audio { display: block; }
.upload-card .upload-preview-audio[hidden] { display: none; }

.settings-card { padding-bottom: 18px; }
.setting-group { margin-top: 20px; }
.setting-group > label { color: #aab2b8; font-size: 13px; }
.ratio-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.ratio-list button { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.06); border-radius: 9px; color: #7a8791; background: rgba(0,0,0,.12); cursor: pointer; text-align: left; }
.ratio-list button.active { border-color: rgba(216,185,120,.4); color: var(--gold-2); background: rgba(216,185,120,.07); }
.ratio-list span { font-size: 11px; }
.ratio-list small { display: block; margin-top: 2px; color: #53606a; font-size: 11px; }
.ratio-icon { display: block; border: 1px solid currentColor; border-radius: 2px; opacity: .85; }
.r-9-16 { width: 9px; height: 16px; }
.r-16-9 { width: 17px; height: 10px; }
.r-1-1 { width: 13px; height: 13px; }
.motion-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; }
.motion-list button { padding: 9px 6px; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; color: #6f7c87; background: rgba(0,0,0,.12); cursor: pointer; font-size: 10px; }
.motion-list button.active { border-color: rgba(216,185,120,.32); color: var(--gold-2); background: rgba(216,185,120,.07); }
.setting-tip { margin: 8px 0 0; color: #53606b; font-size: 10px; line-height: 1.5; }
.range-input { width: 100%; margin-top: 15px; accent-color: var(--gold); }
.range-labels { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; color: #596671; font-size: 10px; }
.range-labels strong { color: #b9a57b; font-size: 11px; font-weight: 500; }
.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.055); }
.quality-row strong { display: block; color: #aeb6bb; font-size: 11px; font-weight: 500; }
.quality-row small { display: block; margin-top: 3px; color: #586571; font-size: 11px; }
.switch { position: relative; width: 31px; height: 17px; padding: 0; border: 0; border-radius: 20px; background: #29343e; cursor: pointer; }
.switch i { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #7a8791; transition: .2s; }
.switch.active { background: rgba(216,185,120,.28); }
.switch.active i { left: 17px; background: var(--gold-2); }

.select-input { width: 100%; margin-top: 9px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: #0e1620; color: #e8e2d6; font-size: 12px; }
/* 下拉展开选项在深色主题下白底看不清字，强制深色背景 + 浅色文字 */
.select-input option { background: #0e1620; color: #e8e2d6; }
.dual-input { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 9px; }
.emotion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.emotion-grid .mini-field { align-items: center; }
.emotion-grid .mini-field span { color: #cdd3d8; font-size: 12px; }
.emotion-grid .num-input { width: 100%; text-align: center; }
.mini-field { display: flex; flex-direction: column; gap: 6px; }
.mini-field span { color: #7a8791; font-size: 10px; }
.num-input { padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: rgba(0,0,0,.14); color: #cdd3d8; font-size: 13px; }
.workflow-note { margin-top: 18px; padding: 13px 14px; border: 1px dashed rgba(216,185,120,.3); border-radius: 10px; background: rgba(216,185,120,.05); }
.workflow-note-title { margin: 0 0 7px; color: #c4b48f; font-size: 12px; font-weight: 500; }
.workflow-note p { margin: 0 0 6px; color: #8b97a1; font-size: 11px; line-height: 1.6; }
.workflow-note p:last-child { margin-bottom: 0; }

.generate-bar { display: flex; align-items: center; gap: 24px; margin-top: 16px; padding: 17px 20px; border: 1px solid rgba(216,185,120,.13); border-radius: 13px; background: linear-gradient(90deg, rgba(216,185,120,.07), rgba(17,25,34,.92) 42%); }
.cost-summary { margin-right: auto; }
.cost-summary span { display: block; color: #65727e; font-size: 10px; }
.cost-summary strong { color: #c4b48f; font-size: 14px; font-weight: 500; }
.cost-summary small { display: block; margin-top: 4px; color: #53606b; font-size: 10px; }
.notice { margin: 0; color: #d39f89; font-size: 11px; }
.generate-button { min-width: 190px; padding: 13px 20px; border: 1px solid #c8a965; border-radius: 9px; color: #17140f; background: linear-gradient(135deg, #f1d89d, #c49c51); box-shadow: 0 8px 28px rgba(196,156,81,.18); cursor: pointer; font-size: 14px; font-weight: 600; transition: .2s; }
.generate-button:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(196,156,81,.25); }
.generate-button:disabled { cursor: wait; filter: saturate(.5); opacity: .75; transform: none; }
.generate-button span { margin-right: 7px; }
.task-progress { margin-top: 12px; padding: 15px 18px; border: 1px solid rgba(117,184,157,.18); border-radius: 12px; background: rgba(117,184,157,.045); }
.progress-head { display: flex; align-items: center; gap: 10px; }
.pulse-icon { color: #75b89d; animation: pulse 1.5s infinite; }
.progress-head strong { display: block; color: #b8c5c1; font-size: 13px; }
.progress-head small { display: block; margin-top: 3px; color: #5f716c; font-size: 10px; }
.progress-head b { margin-left: auto; color: #8ab4a4; font-size: 14px; }
.progress-track { height: 3px; margin-top: 11px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.06); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5c967f, #a4d1bf); transition: width .5s ease; }
.result-link { display: inline-block; margin-top: 11px; color: #9fc9b8; font-size: 11px; text-decoration: none; }
.result-link:hover { color: #c7e5d9; }
.result-media { margin-top: 12px; }
.result-player { width: 100%; border-radius: 10px; outline: none; }
.result-player::-webkit-media-controls-panel { background: rgba(155,200,189,.12); }
@keyframes pulse { 50% { opacity: .35; } }

.recent-section { margin-top: 36px; }
.recent-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 13px; }
.recent-title h2 { margin: 0; color: #d2d0ca; font-family: "Songti SC", SimSun, serif; font-size: 21px; font-weight: 400; }
.recent-title p { margin: 4px 0 0; color: #5d6974; font-size: 10px; }
.recent-title button { border: 0; color: #826f4d; background: none; cursor: pointer; font-size: 10px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.recent-card { display: grid; grid-template-columns: 69px 1fr; align-items: center; gap: 11px; padding: 9px; border: 1px solid rgba(255,255,255,.055); border-radius: 11px; background: rgba(18,27,36,.7); cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.recent-card:hover { border-color: rgba(216,185,120,.45); background: rgba(22,33,44,.85); transform: translateY(-1px); }
.recent-hint { grid-column: 1 / -1; margin: 6px 0; color: #5d6974; font-size: 11px; }

.work-preview { position: relative; display: flex; height: 53px; flex-direction: column; justify-content: center; overflow: hidden; border-radius: 7px; background: linear-gradient(135deg, #263642, #111a22); text-align: center; }
.work-preview::before { position: absolute; inset: -20px; opacity: .16; background: radial-gradient(circle, currentColor 1px, transparent 1.5px); background-size: 9px 9px; content: ""; transform: rotate(-8deg); }
.recent-card.gold .work-preview { color: #d8b978; }
.recent-card.green .work-preview { color: #7fb3a1; }
.recent-card.blue .work-preview { color: #809fc8; }
.work-preview span { z-index: 1; color: #bac0c3; font-family: serif; font-size: 10px; }
.work-preview i { z-index: 1; color: currentColor; font-size: 19px; font-style: normal; }
.work-preview small { position: absolute; right: 3px; bottom: 3px; padding: 2px 3px; border-radius: 3px; color: #b9c0c4; background: rgba(0,0,0,.45); font-size: 10px; }
.recent-card > div:nth-child(2) { min-width: 0; }
.recent-card > div:nth-child(2) strong { display: block; overflow: hidden; color: #aeb6bb; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.recent-card > div:nth-child(2) span { display: block; margin-top: 5px; color: #56636e; font-size: 11px; }
.recent-card > button { border: 0; color: #4e5a65; background: none; cursor: pointer; letter-spacing: .1em; }

/* 作品详情弹窗 */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4,8,12,.72); backdrop-filter: blur(2px); }
.modal-overlay.is-hidden { display: none; }
.modal { position: relative; max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 22px 24px; border: 1px solid rgba(216,185,120,.22); border-radius: 16px; background: #0e161d; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 50%; color: #9aa3aa; background: rgba(255,255,255,.06); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-close:hover { background: rgba(255,255,255,.12); color: #e6e9ec; }
.modal h3 { margin: 0 6px 14px 0; color: #d2d0ca; font-family: "Songti SC", SimSun, serif; font-size: 19px; font-weight: 400; }
.modal .m-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal .m-type { padding: 3px 9px; border: 1px solid rgba(216,185,120,.35); border-radius: 20px; color: #d8b978; font-size: 11px; }
.modal .m-status { padding: 3px 9px; border-radius: 20px; font-size: 11px; }
.modal .m-status.s-SUCCESS { color: #7fb3a1; background: rgba(127,179,161,.12); }
.modal .m-status.s-FAILED { color: #e09a9a; background: rgba(224,154,154,.12); }
.modal .m-status.s-QUEUED, .modal .m-status.s-RUNNING { color: #809fc8; background: rgba(128,159,200,.12); }
.modal .m-media { width: 100%; border-radius: 10px; background: #000; margin-bottom: 14px; max-height: 360px; }
.modal .m-row { margin: 9px 0; font-size: 13px; color: #aeb6bb; }
.modal .m-row b { color: #6f7c87; font-weight: 500; margin-right: 8px; }
.modal .m-desc { margin: 12px 0; padding: 12px 14px; border-left: 2px solid rgba(216,185,120,.4); border-radius: 0 8px 8px 0; background: rgba(255,255,255,.03); color: #c8ced3; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.modal .m-error { margin: 12px 0; padding: 12px 14px; border-radius: 8px; color: #e6b3b3; background: rgba(224,154,154,.08); font-size: 13px; line-height: 1.6; }
.modal .m-actions { margin-top: 16px; display: flex; gap: 10px; }
.modal .m-actions a, .modal .m-actions button { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 9px; font-size: 13px; text-decoration: none; cursor: pointer; }
.modal .m-download { border: 1px solid rgba(216,185,120,.4); color: #d8b978; background: rgba(216,185,120,.08); }
.modal .m-download:hover { background: rgba(216,185,120,.16); }

.coming-panel { display: grid; min-height: calc(100vh - 180px); place-content: center; text-align: center; }
.coming-panel > span { color: #776747; font-size: 10px; letter-spacing: .25em; }
.coming-panel h1 { margin: 14px 0; font-family: "Songti SC", SimSun, serif; font-size: 54px; font-weight: 400; }
.coming-panel p { max-width: 430px; color: #71808c; font-size: 15px; line-height: 1.8; }
.coming-panel button { width: fit-content; margin: 14px auto 0; padding: 10px 18px; border: 1px solid rgba(216,185,120,.25); border-radius: 8px; color: var(--gold-2); background: rgba(216,185,120,.06); cursor: pointer; font-size: 13px; }

.auth-overlay { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(360px, 480px) minmax(330px, 460px); place-content: center; gap: 0; padding: 28px; background: rgba(3,7,10,.82); backdrop-filter: blur(20px); }
.auth-card { position: relative; min-height: 570px; padding: 42px 46px 28px; border: 1px solid rgba(216,185,120,.18); border-right: 0; border-radius: 20px 0 0 20px; background: linear-gradient(145deg, #151f29, #0f171f); box-shadow: 0 35px 90px rgba(0,0,0,.38); }
.auth-close { position: absolute; top: 18px; right: 18px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; color: #6f7b85; background: rgba(255,255,255,.025); cursor: pointer; }
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand .seal { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(216,185,120,.6); border-radius: 8px 15px 8px 15px; color: var(--gold-2); font-family: serif; font-size: 28px; }
.auth-brand strong { display: block; color: #ded8cb; font-family: "Songti SC", SimSun, serif; font-size: 23px; font-weight: 400; letter-spacing: .05em; }
.auth-brand small { display: block; margin-top: 5px; color: #677480; font-size: 11px; letter-spacing: .08em; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 29px; padding: 4px; border: 1px solid rgba(255,255,255,.055); border-radius: 10px; background: rgba(0,0,0,.13); }
.auth-tabs button { padding: 9px 5px; border: 0; border-radius: 7px; color: #65727d; background: transparent; cursor: pointer; font-size: 11px; }
.auth-tabs button.active { color: #dcc99e; background: rgba(216,185,120,.1); }
.auth-form { margin-top: 22px; }
.auth-form label { display: block; margin-top: 14px; }
.auth-form label > span { display: block; margin-bottom: 7px; color: #8c979f; font-size: 11px; }
.auth-form input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid rgba(255,255,255,.075); border-radius: 9px; outline: none; color: #c6cdd1; background: rgba(3,8,12,.28); font-size: 13px; }
.auth-form input:focus { border-color: rgba(216,185,120,.35); box-shadow: 0 0 0 3px rgba(216,185,120,.04); }
.phone-input, .code-input { display: flex; align-items: center; gap: 8px; }
.phone-input { height: 42px; padding-left: 12px; border: 1px solid rgba(255,255,255,.075); border-radius: 9px; background: rgba(3,8,12,.28); }
.phone-input:focus-within { border-color: rgba(216,185,120,.35); }
.phone-input b { padding-right: 11px; border-right: 1px solid rgba(255,255,255,.07); color: #a7b0b6; font-size: 13px; font-weight: 400; }
.phone-input input { height: 38px; padding-left: 0; border: 0; background: transparent; }
.code-input button { flex: 0 0 103px; height: 42px; border: 1px solid rgba(216,185,120,.22); border-radius: 9px; color: #b9a06d; background: rgba(216,185,120,.055); cursor: pointer; font-size: 11px; }
.code-input button:disabled { opacity: .55; cursor: default; }
.auth-notice { margin: 12px 0 -3px; color: #d2a086; font-size: 11px; }
.auth-submit { width: 100%; margin-top: 19px; padding: 13px; border: 1px solid #c6a45e; border-radius: 9px; color: #17130d; background: linear-gradient(135deg, #eed597, #bd9349); cursor: pointer; font-size: 13px; font-weight: 600; }
.auth-agreement { margin: 11px 0 0; color: #4f5b65; text-align: center; font-size: 10px; }
/* 修复：hidden 属性被 .auth-form label 的 display:block 覆盖，需显式隐藏 */
.auth-form label[hidden] { display: none; }
.auth-notice[hidden] { display: none; }
.service-state { display: flex; gap: 8px; margin-top: 25px; }
.service-state span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.055); border-radius: 20px; color: #596671; font-size: 11px; }
.service-state span::before { display: inline-block; width: 4px; height: 4px; margin-right: 5px; border-radius: 50%; background: #876d50; content: ""; }
.service-state span.ready::before { background: #75b89d; box-shadow: 0 0 7px #75b89d; }
.auth-story { position: relative; min-height: 570px; overflow: hidden; padding: 72px 48px; border: 1px solid rgba(216,185,120,.14); border-left: 0; border-radius: 0 20px 20px 0; background: radial-gradient(circle at 70% 20%, rgba(216,185,120,.14), transparent 26%), linear-gradient(145deg, #121d26, #081017); }
.auth-story::after { position: absolute; inset: 0; opacity: .045; background-image: linear-gradient(45deg, var(--gold) 1px, transparent 1px), linear-gradient(-45deg, var(--gold) 1px, transparent 1px); background-size: 35px 35px; content: ""; pointer-events: none; }
.auth-story > span { position: relative; z-index: 1; color: #846f49; font-size: 10px; letter-spacing: .28em; }
.auth-story h2 { position: relative; z-index: 1; margin: 25px 0 18px; color: #ece5d7; font-family: "Songti SC", SimSun, serif; font-size: 46px; font-weight: 400; line-height: 1.45; }
.auth-story p { position: relative; z-index: 1; color: #74828d; font-size: 13px; line-height: 1.9; }
.auth-story div { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-top: 24px; color: #9ca7ae; font-size: 13px; }
.auth-story div i { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(216,185,120,.25); border-radius: 50%; color: #ae9561; font-family: serif; font-size: 10px; font-style: normal; }

@media (max-width: 1000px) {
  .sidebar { width: 205px; }
  .workspace { width: calc(100% - 205px); margin-left: 205px; }
  .creator-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .auth-overlay { grid-template-columns: minmax(340px, 520px); }
  .auth-card { border-right: 1px solid rgba(216,185,120,.18); border-radius: 20px; }
  .auth-story { display: none; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; border-right: 0; }
  .brand-mark { height: 65px; }
  .side-nav, .side-bottom { display: none; }
  .workspace { width: 100%; margin-left: 0; }
  .topbar { height: 51px; padding: 0 18px; }
  .content-wrap { width: calc(100% - 28px); padding-top: 28px; }
  .page-heading { align-items: flex-start; gap: 20px; }
  .page-heading h1 { font-size: 41px; }
  .workflow-badge { display: none; }
  .mode-tabs { width: 100%; }
  .product-switch { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .voice-list, .ratio-list { grid-template-columns: 1fr; }
  .voice-list button { padding: 10px; }
  .generate-bar { align-items: stretch; flex-direction: column; gap: 11px; }
  .generate-button { width: 100%; }
  .recent-grid { grid-template-columns: 1fr; }
  .auth-overlay { display: block; padding: 12px; overflow-y: auto; }
  .auth-card { min-height: auto; padding: 35px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 状态切换规则（与原 React 条件渲染对应） ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.app-shell[data-mode="voice"] .avatar-only { display: none !important; }
.app-shell[data-mode="avatar"] .voice-only { display: none !important; }
.app-shell[data-nav="创作台"] .coming-panel { display: none; }
.app-shell:not([data-nav="创作台"]) .studio { display: none; }
.app-shell:not([data-nav="创作台"]) .coming-panel { display: grid; }

/* 我的作品面板 */
.works-panel { display: none; padding: 8px 0 40px; }
.app-shell[data-nav="我的作品"] .coming-panel { display: none; }
.app-shell[data-nav="我的作品"] #works-panel { display: block; }
/* 我的形象面板 */
.app-shell[data-nav="我的形象"] .coming-panel { display: none; }
.app-shell[data-nav="我的形象"] #portraits-panel { display: block; }
/* 我的声音面板 */
.app-shell[data-nav="我的声音"] .coming-panel { display: none; }
.app-shell[data-nav="我的声音"] #voices-panel { display: block; }
.works-toolbar { display: flex; justify-content: flex-end; margin: 6px 0 16px; }
.works-toolbar button { padding: 8px 14px; border: 1px solid rgba(216,185,120,.25); border-radius: 8px; color: var(--gold-2); background: rgba(216,185,120,.06); cursor: pointer; font-size: 13px; }
.asset-toolbar { display: flex; justify-content: flex-end; margin: 6px 0 16px; }
.asset-toolbar button { padding: 8px 14px; border: 1px solid rgba(216,185,120,.25); border-radius: 8px; color: var(--gold-2); background: rgba(216,185,120,.06); cursor: pointer; font-size: 13px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.asset-card { border: 1px solid rgba(216,185,120,.16); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 8px; }
.asset-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: rgba(0,0,0,.25); }
.asset-card audio { width: 100%; height: 34px; }
.asset-card .asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.asset-card .asset-title { font-size: 12px; color: #c2c8cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card .asset-time { font-size: 10px; color: #6b7884; }
.asset-card .asset-actions { display: flex; gap: 8px; }
.asset-card .asset-actions button { flex: 1; padding: 7px 0; border-radius: 8px; cursor: pointer; font-size: 12px; color: var(--gold-2); background: rgba(216,185,120,.08); border: 1px solid rgba(216,185,120,.25); }
.asset-card .asset-actions button.use { color: var(--ink); background: var(--gold); border-color: transparent; }
.asset-card .asset-actions button.del { color: #e08a7a; background: rgba(224,138,122,.08); border-color: rgba(224,138,122,.3); }
.asset-loading, .asset-empty, .asset-error { color: #6b7884; font-size: 13px; padding: 10px 0; }
.asset-error { color: #e08a7a; }

.works-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.work-item { border: 1px solid rgba(216,185,120,.16); border-radius: 12px; padding: 16px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 10px; }
.work-item .work-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.work-item .work-type { font-size: 13px; color: #c9b98a; }
.work-item .work-time { font-size: 11px; color: #6b7884; }
.work-item .work-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.work-status.s-SUCCESS { color: #9bc8bd; background: rgba(155,200,189,.12); }
.work-status.s-RUNNING, .work-status.s-QUEUED { color: #d8b978; background: rgba(216,185,120,.12); }
.work-status.s-FAILED { color: #e08a7a; background: rgba(224,138,122,.12); }
.work-status.s-CANCELED, .work-status.s-CANCELLED { color: #8a98a4; background: rgba(138,152,164,.12); }
.work-item .work-params { font-size: 12px; color: #9aa7b2; line-height: 1.6; word-break: break-all; }
.work-item .work-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.work-item .work-actions a, .work-item .work-actions button { font-size: 13px; padding: 8px 12px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.work-item .work-actions a { color: var(--ink); background: var(--gold); }
.work-item .work-actions button { color: var(--gold-2); background: rgba(216,185,120,.08); border: 1px solid rgba(216,185,120,.25); }
.work-item .work-media { width: 100%; margin-top: 4px; border-radius: 8px; outline: none; }
.work-item .work-media::-webkit-media-controls-panel { background: rgba(216,185,120,.12); }
.work-item .work-download { background: transparent !important; color: var(--gold-2) !important; border: 1px solid rgba(216,185,120,.3); }
.work-item .work-actions .work-del { color: #e08a7a; background: rgba(224,138,122,.08); border: 1px solid rgba(224,138,122,.3); }
.work-item .work-actions .work-del:hover { background: rgba(224,138,122,.16); }
.work-item .work-actions button:disabled { opacity: .55; cursor: not-allowed; }
.works-empty, .works-loading, .works-error { text-align: center; padding: 60px 0; font-size: 15px; }
.works-empty { color: #71808c; }
.works-loading { color: #6b7884; }
.works-error { color: #e08a7a; }
.works-error.ok { color: #9bc8bd; }
.auth-overlay.is-hidden { display: none; }
.task-progress.is-hidden { display: none; }
.profile-overlay.is-hidden { display: none; }

/* ---------- 个人中心面板 ---------- */
.profile-overlay {
  position: fixed; inset: 0; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,10,16,.82); backdrop-filter: blur(6px);
}
.profile-panel {
  position: relative; width: 440px; max-width: 94vw; max-height: 88vh;
  overflow-y: auto; padding: 40px 36px 36px;
  border: 1px solid rgba(216,185,120,.22); border-radius: 18px;
  background: linear-gradient(155deg, #141f2a, #0b131b);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}
.profile-panel::-webkit-scrollbar { width: 4px; }
.profile-panel::-webkit-scrollbar-thumb { background: rgba(216,185,120,.2); border-radius: 2px; }

.profile-close {
  position: absolute; top: 14px; right: 18px;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  color: #6b7884; background: rgba(255,255,255,.04);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: color .2s, background .2s;
}
.profile-close:hover { color: #d8b978; background: rgba(216,185,120,.12); }

.profile-title {
  color: #ece5d7; font-family: "Songti SC", SimSun, serif;
  font-size: 28px; font-weight: 400; margin-bottom: 28px;
}
.profile-subtitle {
  color: #b8a67e; font-size: 16px; font-weight: 400; margin-bottom: 18px;
}

/* 头像上传 */
.profile-avatar-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.profile-avatar-wrap {
  position: relative; width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(216,185,120,.3);
  transition: border-color .2s;
}
.profile-avatar-wrap:hover { border-color: var(--gold); }
.profile-avatar-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-avatar-edit {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #d8b978; font-size: 11px;
  opacity: 0; transition: opacity .2s;
}
.profile-avatar-wrap:hover .profile-avatar-edit { opacity: 1; }
.profile-avatar-hint {
  color: #5c6976; font-size: 11px; margin: 0;
}

/* 表单 */
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-field { display: flex; flex-direction: column; gap: 5px; }
.profile-field label {
  color: #798896; font-size: 12px; letter-spacing: .04em;
}
.profile-field input {
  padding: 10px 13px; border: 1px solid rgba(216,185,120,.18);
  border-radius: 8px; background: rgba(255,255,255,.03);
  color: #d8d4cb; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.profile-field input:focus { border-color: rgba(216,185,120,.45); }
.profile-field input::placeholder { color: #48545f; }

.profile-readonly {
  padding: 10px 13px; border-radius: 8px;
  background: rgba(255,255,255,.02); color: #5c6976; font-size: 14px;
}

.profile-btn-save {
  padding: 11px 0; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #c9a84c, #b8942e);
  color: #0a1016; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.profile-btn-save:hover { opacity: .9; transform: translateY(-1px); }
.profile-btn-save:active { transform: translateY(0); }
.profile-btn-save:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.profile-divider {
  margin: 28px 0 24px; border: none;
  border-top: 1px solid rgba(216,185,120,.12);
}

.profile-msg {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; text-align: center;
}
.profile-msg.ok { color: #9bc8bd; background: rgba(155,200,189,.08); }
.profile-msg.err { color: #e08a7a; background: rgba(224,138,122,.08); }

.profile-logout-link { color: #e08a7a; font-size: 13px; cursor: pointer; transition: opacity .2s; }
.profile-logout-link:hover { opacity: .75; }

@media (max-width: 520px) {
  .profile-panel { padding: 28px 22px 24px; }
  .profile-avatar-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- 积分明细面板 ---------- */
.points-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,16,22,.78);
  display: flex; align-items: center; justify-content: center;
}
.points-overlay.is-hidden { display: none; }
.points-detail-panel {
  background: #121b26; border: 1px solid rgba(216,185,120,.15);
  border-radius: 16px; padding: 32px 28px 24px;
  width: 440px; max-width: 92vw; max-height: 80vh;
  overflow-y: auto; position: relative; color: #c1b89e;
}
.points-detail-panel::-webkit-scrollbar { width: 3px; }
.points-detail-panel::-webkit-scrollbar-thumb { background: rgba(216,185,120,.2); border-radius: 2px; }
.points-balance-row { font-size: 16px; margin-bottom: 18px; color: #96907d; text-align: center; }
.points-balance-row strong { color: #d8b978; font-size: 24px; margin-left: 6px; }
.points-list { max-height: 340px; overflow-y: auto; }
.points-list::-webkit-scrollbar { width: 3px; }
.points-list::-webkit-scrollbar-thumb { background: rgba(216,185,120,.12); border-radius: 2px; }
.points-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(216,185,120,.06);
  font-size: 13px;
}
.points-item .pi-desc { flex: 1; color: #beb395; }
.points-item .pi-delta.positive { color: #9bc8bd; font-weight: 600; }
.points-item .pi-delta.negative { color: #e08a7a; font-weight: 600; }
.points-item .pi-time { color: #5e656e; font-size: 12px; margin-left: 12px; white-space: nowrap; }
.points-empty { text-align: center; color: #5e656e; padding: 36px 0; font-size: 13px; }
.points-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.points-pagination button {
  background: rgba(216,185,120,.08); border: 1px solid rgba(216,185,120,.18);
  color: #beb395; padding: 5px 14px; border-radius: 6px; font-size: 12px;
  cursor: pointer; transition: background .2s;
}
.points-pagination button:hover { background: rgba(216,185,120,.18); }
.points-pagination button:disabled { opacity: .35; cursor: default; }
.points-pagination .pp-info { color: #5e656e; font-size: 12px; line-height: 28px; }
