:root {
  --mode-control-purple: #7257e8;
  --mode-control-purple-rgb: 114, 87, 232;
  --mode-control-purple-gradient: linear-gradient(145deg, rgba(133, 106, 244, .96), rgba(91, 65, 207, .98));
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-module: 24px;
  --surface-shadow: 0 20px 50px rgba(50, 43, 62, .1), 0 4px 12px rgba(50, 43, 62, .035);
  --surface-floating-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 18px 40px rgba(39,28,75,.22);
  --surface-noise-light: radial-gradient(circle at 1px 1px, rgba(255,255,255,.11) 0 .45px, transparent .55px);
  --surface-noise-dark: radial-gradient(circle at 2px 3px, rgba(81,72,95,.035) 0 .35px, transparent .45px);
  --minimal-ink: #111315;
  --minimal-dark: #2d3031;
  --minimal-canvas: #f7f8fa;
  --minimal-paper: #ffffff;
  --minimal-soft: #f0f1f3;
  --minimal-line: rgba(17, 19, 21, .075);
  --minimal-accent: #ffb64b;
  --minimal-accent-rgb: 255, 182, 75;
}

html,
body.theme-liquid,
.theme-liquid .fluid-background,
.theme-liquid .app-shell,
.theme-liquid .tab-bar,
.theme-liquid .week-strip,
.theme-liquid .project-card {
  transition: background-color 320ms var(--motion-curve), color 240ms var(--motion-curve), border-color 240ms var(--motion-curve), box-shadow 320ms var(--motion-curve), opacity 320ms var(--motion-curve);
}

/* 七张周卡由一张完整内容卡承托，仍保持选中日在中央。 */
.theme-liquid .stitch-schedule .week-strip {
  gap: 5.5px;
  margin: 0 0 16px;
  padding: 11px 6px 20px;
  border: 0;
  border-radius: var(--radius-module);
  background: var(--glass-frost-surface);
  box-shadow: var(--glass-frost-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.06);
  backdrop-filter: blur(24px) saturate(1.06);
}

/* 日期大字使用规则半调点阵，数字轮廓与参考图保持一致。 */
.theme-liquid .schedule-day-view .date-hero > div > strong {
  background-color: transparent;
  background-image: radial-gradient(circle, var(--ink) 0 2.15px, transparent 2.35px);
  background-position: 1px 1px;
  background-size: 8px 8px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 项目库使用与日程安排一致的高可读内容卡，不再沿用深色拍摄主卡。 */
.theme-liquid .project-list .project-card {
  border: 0;
  background: var(--glass-frost-surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--glass-frost-shadow) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.06) !important;
  backdrop-filter: blur(24px) saturate(1.06) !important;
}

.theme-liquid .project-list .project-card > strong { color: var(--ink); }
.theme-liquid .project-list .project-card > small { color: var(--muted); }
.theme-liquid .project-list .project-card .shoot-tags span {
  border: 0;
  background: rgba(var(--accent-purple-rgb), .1);
  color: var(--accent-purple-ink);
}
.theme-liquid .project-list .project-card .shoot-tags .shoot-tag-order {
  background: var(--accent-purple-luminous) !important;
  color: #342e3b !important;
}
.theme-liquid .project-list .project-card .shoot-progress > span { background: rgba(var(--accent-purple-rgb), .13); }
.theme-liquid .project-list .project-card .shoot-progress > b,
.theme-liquid .project-list .project-card .card-countdown { color: var(--accent-purple-ink) !important; }
.theme-liquid .project-list .project-card .card-countdown::before { color: var(--faint); }

/* 流动版所有主按钮和选中态统一为深紫；浅紫只保留作标签和弱表面。 */
html[data-visual-mode="fluid"] .theme-liquid :is(
  .button.primary,
  .header-add-button,
  .inspiration-search button,
  .send-message-button,
  .assistant-compose button,
  .voice-input-button,
  .floating-project-add,
  .project-add-inline,
  .milestone-add,
  .segment button.active,
  .chip-button.active,
  .project-filters button.active,
  .script-category-row button.active,
  .type-option input:checked + span,
  .topic-search-toggle.active,
  .calendar-day.selected,
  .week-day.selected,
  .form-section-index
) {
  border: 0 !important;
  background: var(--mode-control-purple-gradient) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 8px 20px rgba(91,65,207,.22) !important;
}

/* 新建空白脚本卡只保留标题、说明和加号。 */
.theme-liquid .new-script-hero::before {
  display: none !important;
  content: none !important;
}

.visual-mode-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 12px;
  padding: 16px 17px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--glass-frost-surface);
  box-shadow: var(--glass-frost-shadow);
  text-align: left;
  -webkit-backdrop-filter: blur(24px) saturate(1.06);
  backdrop-filter: blur(24px) saturate(1.06);
}

.visual-mode-copy { min-width: 0; }
.visual-mode-copy small { display: block; color: var(--faint); font-size: 10px; font-weight: 750; }
.visual-mode-copy strong { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; }

.visual-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 52px);
  gap: 3px;
  padding: 3px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.34);
}

.visual-mode-switch button {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

html[data-visual-mode="fluid"] .visual-mode-switch button[data-mode="fluid"] {
  background: var(--mode-control-purple-gradient);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 16px rgba(91,65,207,.24);
}

/* 简约版：复用参考版灰白画布、白卡、深墨主控和橙黄状态。 */
html[data-visual-mode="minimal"] { background: var(--minimal-canvas); }

html[data-visual-mode="minimal"] body.theme-liquid {
  --ink: var(--minimal-ink);
  --muted: #626670;
  --faint: #969aa4;
  --line: var(--minimal-line);
  --soft: var(--minimal-soft);
  --paper: var(--minimal-paper);
  --canvas: var(--minimal-canvas);
  --accent-purple: var(--minimal-accent);
  --accent-purple-rgb: var(--minimal-accent-rgb);
  --accent-purple-soft: #fff0dc;
  --accent-purple-ink: #915000;
  --accent-purple-luminous: #ffcc7a;
  --accent-yellow: var(--minimal-accent);
  --accent-yellow-rgb: var(--minimal-accent-rgb);
  --accent-yellow-soft: #fff0dc;
  --amber: var(--minimal-accent);
  --accent-orange: var(--minimal-accent);
  --accent-orange-cream: #ffcc7a;
  --accent-orange-soft: #fff0dc;
  --accent-orange-deep: #8a4b00;
  --glass-card: #fff;
  --glass-card-strong: #fff;
  --glass-card-soft: #f7f8fa;
  --glass-frost-surface: #fff;
  --glass-dark-surface: #2d3031;
  --glass-frost-shadow: 0 12px 34px rgba(17,19,21,.075);
  --glass-border-purple: rgba(17,19,21,.075);
  --glass-line-purple: rgba(17,19,21,.075);
  --glass-highlight: none;
  --glass-shadow-purple: 0 12px 34px rgba(17,19,21,.075);
  --glass-shadow-soft-purple: 0 7px 18px rgba(17,19,21,.06);
  background: var(--minimal-canvas);
  color: var(--minimal-ink);
}

html[data-visual-mode="minimal"] .theme-liquid .fluid-background {
  visibility: hidden;
  opacity: 0;
}

html[data-visual-mode="minimal"] body.theme-liquid .app-shell {
  background: var(--minimal-canvas);
}

html[data-visual-mode="minimal"] .theme-liquid :is(
  .card,
  .calendar,
  .daily-list,
  .more-row,
  .pipeline-summary,
  .milestone-card,
  .requirements-card,
  .receivable,
  .topic-idea-chat,
  .inspiration-card,
  .service-state,
  .script-library-card,
  .script-body-card,
  .brief-card,
  .account-feature-card,
  .assistant-intro,
  .form-section,
  .workspace-sheet,
  .schedule-add-menu,
  .empty-state,
  .analysis-box,
  .payment-row,
  .menu-card,
  .income-summary,
  .account-hero,
  .topic-search-panel,
  .topic-chat-message.assistant,
  .visual-mode-card,
  .stitch-schedule .week-strip,
  .project-list .project-card
) {
  border-color: var(--minimal-line) !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(17,19,21,.075) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-visual-mode="minimal"] .theme-liquid .stitch-schedule .week-day {
  border-color: var(--minimal-line);
  background: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-visual-mode="minimal"] .theme-liquid .tab-bar {
  border-color: var(--minimal-line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 38px rgba(17,19,21,.11);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-visual-mode="minimal"] .theme-liquid .tab-bar::before {
  background: var(--minimal-dark) !important;
  box-shadow: 0 5px 13px rgba(17,19,21,.18);
}

html[data-visual-mode="minimal"] .theme-liquid :is(
  .button.primary,
  .header-add-button,
  .inspiration-search button,
  .send-message-button,
  .assistant-compose button,
  .voice-input-button,
  .floating-project-add,
  .milestone-add,
  .segment button.active,
  .chip-button.active,
  .project-filters button.active,
  .script-category-row button.active,
  .type-option input:checked + span,
  .topic-search-toggle.active,
  .calendar-day.selected,
  .week-day.selected,
  .task-check.done,
  .timeline-row.done > i,
  .timeline-row.current > i,
  .form-section-index
) {
  border-color: var(--minimal-dark) !important;
  background: var(--minimal-dark) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(17,19,21,.16) !important;
}

html[data-visual-mode="minimal"] .theme-liquid :is(
  .button.secondary,
  .icon-button,
  .chip,
  .chip-button,
  .segment,
  .segment button,
  .stack-toggle,
  .project-filters button,
  .script-category-row button,
  .prompt-chips button,
  .title-ai-tools button,
  .conversation-delete,
  .project-add-inline,
  .script-editor-nav > .script-back-button,
  .detail-sticky-actions,
  .detail-sticky-actions button,
  .type-options,
  .type-option span,
  .topic-search-toggle,
  .topic-search-panel button,
  .round-add,
  .ledger-period button,
  .ledger-actions button,
  .brief-actions button,
  .inspiration-search button,
  .inspiration-actions button,
  .inspiration-actions a,
  .inspiration-result-head button
) {
  border-color: var(--minimal-line);
  background: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-visual-mode="minimal"] .theme-liquid :is(.segment, .type-options) { background: #eceef0; }

html[data-visual-mode="minimal"] .theme-liquid :is(
  .search-input,
  .project-search,
  .topic-quick-add,
  .topic-search-panel input,
  .inspiration-search input,
  .field input,
  .field textarea,
  .field select,
  .money-input,
  .brief-text,
  .chat-compose,
  .assistant-compose,
  .script-block
) {
  border-color: var(--minimal-line) !important;
  background: var(--minimal-soft) !important;
  color: var(--minimal-ink) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-visual-mode="minimal"] .theme-liquid .topics-page .topic-card {
  border-color: var(--minimal-line);
  background: #fff;
  color: var(--minimal-ink);
  box-shadow: 0 12px 34px rgba(17,19,21,.075);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-visual-mode="minimal"] .theme-liquid .topics-page .topic-card > p,
html[data-visual-mode="minimal"] .theme-liquid .topics-page .topic-card-foot span { color: #6d717b; }
html[data-visual-mode="minimal"] .theme-liquid .topics-page .topic-card-foot b { color: #282b31; }
html[data-visual-mode="minimal"] .theme-liquid .topics-page .topic-card-top span {
  background: #eceef0 !important;
  color: #202329 !important;
}

html[data-visual-mode="minimal"] .theme-liquid :is(
  .shoot-progress > span i,
  .progress-track i,
  .month-bar i,
  .creator-progress > i,
  .project-list .project-card .shoot-progress > span i
) { background: var(--minimal-accent) !important; }

html[data-visual-mode="minimal"] .theme-liquid .project-list .project-card :is(.shoot-progress > b, .card-countdown),
html[data-visual-mode="minimal"] .theme-liquid :is(.ledger-row .ledger-amount, .month-row .month-value, .inspiration-rank b) {
  color: #915000 !important;
}

html[data-visual-mode="minimal"] .theme-liquid .income-number,
html[data-visual-mode="minimal"] .theme-liquid .ledger-overview .income-number,
html[data-visual-mode="minimal"] .theme-liquid .ledger-hero .ledger-total-value { color: #fff; }

html[data-visual-mode="minimal"] .visual-mode-switch {
  border-color: var(--minimal-line);
  background: #eceef0;
}

html[data-visual-mode="minimal"] .visual-mode-switch button[data-mode="minimal"] {
  background: var(--minimal-dark);
  color: #fff;
  box-shadow: 0 5px 13px rgba(17,19,21,.18);
}

/* 统一表面系统：12 / 18 / 24 圆角、柔和景深、无硬描边。 */
.theme-liquid button {
  border: 0;
}

.theme-liquid :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea,
  select,
  [contenteditable="true"]
) {
  border: 0 !important;
  border-radius: var(--radius-control) !important;
}

.theme-liquid :is(
  .button,
  .chip-button,
  .segment,
  .segment button,
  .stack-toggle,
  .project-filters button,
  .script-category-row button,
  .prompt-chips button,
  .title-ai-tools button,
  .conversation-delete,
  .project-add-inline,
  .detail-sticky-actions button,
  .type-options,
  .type-option span,
  .ledger-period button,
  .ledger-actions button,
  .brief-actions button,
  .inspiration-search button,
  .inspiration-actions button,
  .inspiration-actions a,
  .inspiration-result-head button,
  .workspace-sheet > button,
  .workspace-sheet form button
) {
  border: 0 !important;
  border-radius: var(--radius-control) !important;
}

.theme-liquid :is(
  .card,
  .daily-list,
  .more-row,
  .milestone-card,
  .requirements-card,
  .receivable,
  .topic-idea-chat,
  .inspiration-card,
  .service-state,
  .script-library-card,
  .script-body-card,
  .brief-card,
  .account-feature-card,
  .assistant-intro,
  .form-section,
  .empty-state,
  .analysis-box,
  .payment-row,
  .menu-card,
  .topic-search-panel,
  .topic-chat-message.assistant,
  .topics-page .topic-card,
  .project-list .project-card,
  .visual-mode-card
) {
  border: 0 !important;
  border-radius: var(--radius-card) !important;
}

.theme-liquid :is(
  .calendar,
  .pipeline-summary,
  .workspace-sheet,
  .schedule-add-menu,
  .income-summary,
  .account-hero,
  .shoot-card:not(.project-card),
  .project-banner,
  .project-hero,
  .income-spotlight,
  .ledger-hero,
  .voice-orb,
  .new-script-hero,
  .script-title-card,
  .stitch-schedule .week-strip
) {
  border: 0 !important;
  border-radius: var(--radius-module) !important;
}

.theme-liquid :is(.week-day, .calendar-day, .project-next, .timeline-row > div, .requirement) {
  border: 0 !important;
  border-radius: var(--radius-control) !important;
}

.theme-liquid :is(.icon-button, .round-add, .topic-search-toggle, .detail-nav button, .task-check) {
  border-radius: 50% !important;
}

.theme-liquid .tab-bar { border: 0 !important; border-radius: var(--radius-module) !important; }
.theme-liquid .tab { border-radius: var(--radius-card) !important; }

html[data-visual-mode="fluid"] .theme-liquid :is(
  .tab-bar,
  .card,
  .calendar,
  .daily-list,
  .more-row,
  .pipeline-summary,
  .milestone-card,
  .requirements-card,
  .receivable,
  .topic-idea-chat,
  .inspiration-card,
  .service-state,
  .script-library-card,
  .script-body-card,
  .brief-card,
  .account-feature-card,
  .assistant-intro,
  .form-section,
  .workspace-sheet,
  .schedule-add-menu,
  .empty-state,
  .analysis-box,
  .payment-row,
  .menu-card,
  .income-summary,
  .account-hero,
  .topic-search-panel,
  .topic-chat-message.assistant,
  .visual-mode-card,
  .stitch-schedule .week-strip,
  .project-list .project-card
) {
  background-image: var(--surface-noise-light), var(--surface-noise-dark), var(--glass-frost-surface) !important;
  background-size: 4px 4px, 7px 7px, auto !important;
  background-blend-mode: soft-light, soft-light, normal;
  box-shadow: var(--glass-highlight), var(--surface-shadow) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.06) !important;
  backdrop-filter: blur(24px) saturate(1.06) !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(
  .shoot-card:not(.project-card),
  .project-banner,
  .topics-page .topic-card,
  .project-hero,
  .income-spotlight,
  .ledger-hero,
  .voice-orb,
  .new-script-hero,
  .script-title-card,
  .message.user .bubble,
  .timeline-row.current > div
) {
  background-image: var(--glass-dark-surface) !important;
  background-size: auto !important;
  background-blend-mode: normal;
  box-shadow: var(--surface-floating-shadow) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.3) !important;
  backdrop-filter: blur(22px) saturate(1.3) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .spotlight-stack.stacked > .shoot-card:nth-child(n+2) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 -1px 0 rgba(255,255,255,.18), 0 15px 28px rgba(39,28,75,.16) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .tab-bar::before {
  background-image: linear-gradient(145deg, rgba(131,104,242,.88), rgba(99,72,215,.94)) !important;
  background-size: auto !important;
  background-blend-mode: normal;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 24px rgba(91,65,207,.22) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .week-day {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 14px 30px rgba(50,43,62,.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.06);
  backdrop-filter: blur(22px) saturate(1.06);
}

html[data-visual-mode="minimal"] .theme-liquid :is(
  .card,
  .calendar,
  .daily-list,
  .pipeline-summary,
  .milestone-card,
  .requirements-card,
  .receivable,
  .topic-idea-chat,
  .inspiration-card,
  .script-library-card,
  .script-body-card,
  .brief-card,
  .account-feature-card,
  .form-section,
  .visual-mode-card,
  .stitch-schedule .week-strip,
  .project-list .project-card
) {
  box-shadow: 0 20px 48px rgba(17,19,21,.065), 0 4px 12px rgba(17,19,21,.025) !important;
}

/* 标签更轻，卡片间距更松；正文层级保持不变。 */
.theme-liquid :is(
  .shoot-tags span,
  .topic-card-top span,
  .script-kind,
  .hero-kicker span,
  .inspiration-rank span,
  .card-meta .chip
) {
  padding: 3px 8px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  letter-spacing: .01em;
}

.theme-liquid :is(.project-list, .topic-grid, .script-library-list, .inspiration-list) { gap: 14px; }
.theme-liquid :is(.project-card, .topic-card, .script-library-card, .inspiration-card, .account-feature-card, .form-section) { padding: 18px !important; }
.theme-liquid .stitch-schedule .shoot-card { padding: 19px !important; margin-bottom: 14px; }
.theme-liquid .stitch-schedule .daily-list { padding: 7px 16px; }
.theme-liquid .stitch-schedule .daily-row { border-bottom: 0 !important; }
.theme-liquid .stitch-schedule .daily-row + .daily-row { margin-top: 4px; padding-top: 12px; }
.theme-liquid .stitch-schedule .stitch-section-title { margin-bottom: 12px; }
.theme-liquid .stitch-schedule .stitch-section-title.daily-title { margin-top: 24px; }
.theme-liquid .pipeline-summary,
.theme-liquid .visual-mode-card { padding: 20px; }

/* 恢复上一版分层进度：不同场景保留各自的轨道高度与底色。 */
.theme-liquid .shoot-progress > span {
  height: 4px !important;
  border: 0 !important;
  background: rgba(255,255,255,.26) !important;
  box-shadow: none !important;
}

.theme-liquid .project-list .project-card .shoot-progress > span {
  background: rgba(var(--accent-purple-strong-rgb), .13) !important;
}

.theme-liquid .progress-track {
  height: 8px !important;
  border: 0 !important;
  background: rgba(255,255,255,.22) !important;
  box-shadow: none !important;
}

.theme-liquid .month-bar {
  height: 6px !important;
  border: 0 !important;
  background: rgba(var(--accent-purple-strong-rgb), .12) !important;
  box-shadow: inset 0 1px 2px rgba(35,40,50,.06) !important;
}

.theme-liquid .creator-progress {
  height: 4px !important;
  border: 0 !important;
  background: rgba(var(--accent-purple-strong-rgb), .14) !important;
  box-shadow: none !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(.shoot-progress > span i, .progress-track i, .month-bar i, .creator-progress > i) {
  background: var(--accent-purple-strong) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-visual-mode="minimal"] .theme-liquid :is(.project-list .project-card .shoot-progress > span, .month-bar, .creator-progress) {
  background: rgba(var(--minimal-accent-rgb), .14) !important;
}

@media (prefers-reduced-motion: reduce) {
  html,
  body.theme-liquid,
  .theme-liquid .fluid-background,
  .theme-liquid .app-shell,
  .theme-liquid .tab-bar,
  .theme-liquid .week-strip,
  .theme-liquid .project-card {
    transition-duration: 1ms !important;
  }
}
