/*
 * 方案 1：静谧单焦点玻璃
 *
 * 只覆盖流动版的前景视觉。流体背景、简约版、业务结构和交互保持不变。
 * 规则：每页只保留一个深色主焦点；其余表面使用高可读中性雾面玻璃；
 * 紫色只用于进度、状态点和焦点环，不再承担大面积按钮与选中态。
 */

:root {
  --quiet-control-surface: linear-gradient(145deg, rgba(76, 73, 91, .98), rgba(47, 45, 58, .98));
  --quiet-glass-surface: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(248, 247, 252, .62));
  --quiet-glass-surface-strong: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(250, 249, 252, .72));
  --quiet-dark-surface: linear-gradient(145deg, rgba(57, 55, 70, .97), rgba(36, 34, 47, .96));
  --quiet-nav-active: rgba(56, 53, 67, .11);
  --quiet-surface-shadow: 0 16px 40px rgba(48, 44, 62, .075), 0 3px 10px rgba(48, 44, 62, .025);
  --quiet-floating-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 34px rgba(35, 31, 48, .17);
  --quiet-control-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 7px 16px rgba(35, 31, 48, .14);
}

html[data-visual-mode="fluid"] body.theme-liquid {
  --ink: #211f2c;
  --muted: #686474;
  --faint: #938e9d;
  --soft: rgba(247, 246, 250, .68);
  --paper: rgba(255, 255, 255, .82);
  --glass-frost-surface: var(--quiet-glass-surface);
  --glass-dark-surface: var(--quiet-dark-surface);
  --glass-frost-shadow: inset 0 1px 0 rgba(255, 255, 255, .58), var(--quiet-surface-shadow);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .58);
  --glass-shadow-purple: var(--quiet-surface-shadow);
  --glass-shadow-soft-purple: 0 10px 28px rgba(48, 44, 62, .055);
  --accent-purple-control: var(--quiet-control-surface);
  --mode-control-purple-gradient: var(--quiet-control-surface);
}

/* 中性高可读玻璃：去掉噪点和多层渐变竞争。 */
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,
  .topics-page .topic-card,
  .project-banner
) {
  background: var(--quiet-glass-surface) !important;
  background-image: var(--quiet-glass-surface) !important;
  background-size: auto !important;
  background-blend-mode: normal !important;
  box-shadow: var(--glass-highlight), var(--quiet-surface-shadow) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.03) !important;
  backdrop-filter: blur(22px) saturate(1.03) !important;
}

/* 每页只保留一个深色焦点：主拍摄卡、详情英雄、账单、脚本入口或标题。 */
html[data-visual-mode="fluid"] .theme-liquid :is(
  .shoot-card:not(.project-card):not(.project-banner),
  .project-hero,
  .income-spotlight,
  .ledger-hero,
  .voice-orb,
  .new-script-hero,
  .script-title-card,
  .message.user .bubble
) {
  background: var(--quiet-dark-surface) !important;
  background-image: var(--quiet-dark-surface) !important;
  background-size: auto !important;
  background-blend-mode: normal !important;
  box-shadow: var(--quiet-floating-shadow) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.08) !important;
  backdrop-filter: blur(20px) saturate(1.08) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .spotlight-stack.stacked > .shoot-card:nth-child(n+2) {
  background: var(--quiet-dark-surface) !important;
  background-image: var(--quiet-dark-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 -1px 0 rgba(255,255,255,.12), 0 13px 26px rgba(35,31,48,.13) !important;
}

/* 选题列表是工作内容，不再把每张卡都做成英雄卡。 */
html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card {
  background: var(--quiet-glass-surface) !important;
  background-image: var(--quiet-glass-surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--glass-highlight), var(--quiet-surface-shadow) !important;
}

html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card > p,
html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card-foot span {
  color: var(--muted) !important;
}

html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card-foot b {
  color: var(--ink) !important;
}

html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card-top span {
  background: rgba(81, 72, 95, .08) !important;
  color: #51485f !important;
}

html[data-visual-mode="fluid"] body.theme-liquid #appView .topics-page .topic-card-foot em {
  color: var(--accent-purple-strong) !important;
}

/* 项目库入口回到浅玻璃，避免日程页同时出现两块深色重量。 */
html[data-visual-mode="fluid"] body.theme-liquid .schedule-day-view.stitch-schedule .project-banner {
  background: var(--quiet-glass-surface) !important;
  background-image: var(--quiet-glass-surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--glass-highlight), var(--quiet-surface-shadow) !important;
}

html[data-visual-mode="fluid"] body.theme-liquid .schedule-day-view.stitch-schedule .project-banner small {
  color: var(--muted) !important;
}

html[data-visual-mode="fluid"] body.theme-liquid .schedule-day-view.stitch-schedule .project-banner .project-icon {
  background: rgba(81, 72, 95, .07) !important;
  color: #575265 !important;
}

/* 主操作和选中态用中性深墨；紫色只保留语义强调。 */
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
) {
  background: var(--quiet-control-surface) !important;
  background-image: var(--quiet-control-surface) !important;
  color: #fff !important;
  box-shadow: var(--quiet-control-shadow) !important;
}

html[data-visual-mode="fluid"] .visual-mode-switch button[data-mode="fluid"] {
  background: var(--quiet-control-surface) !important;
  color: #fff !important;
  box-shadow: var(--quiet-control-shadow) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .tab-bar::before {
  width: calc(var(--indicator-width) - 12px);
  top: 8px;
  bottom: 8px;
  transform: translateX(calc(var(--indicator-x) + 6px));
  background: var(--quiet-nav-active) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 5px 12px rgba(48, 44, 62, .035) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .tab.active {
  color: #312f3b;
  text-shadow: none;
  font-weight: 800;
}

/* 周日历由外层承担玻璃感，单日卡尽量平，选中日才抬高。 */
html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .week-strip {
  padding: 11px 6px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 15px 36px rgba(48,44,62,.065) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .week-day {
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 16px rgba(48,44,62,.035);
  -webkit-backdrop-filter: blur(14px) saturate(1.02);
  backdrop-filter: blur(14px) saturate(1.02);
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .week-day.selected {
  background: var(--quiet-control-surface) !important;
  box-shadow: var(--quiet-control-shadow) !important;
}

/* 标签更安静，正文层级更清楚。 */
html[data-visual-mode="fluid"] .theme-liquid :is(
  .shoot-tags span,
  .topic-card-top span,
  .script-kind,
  .hero-kicker span,
  .inspiration-rank span,
  .card-meta .chip
) {
  font-size: 10px !important;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .shoot-card {
  padding: 20px !important;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .shoot-card > strong {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.42;
  letter-spacing: -.02em;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .shoot-card > small {
  color: rgba(255,255,255,.7);
  font-size: 11px;
  line-height: 1.55;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .shoot-progress {
  margin: 10px 0 9px;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .daily-list {
  padding: 9px 16px;
}

html[data-visual-mode="fluid"] .theme-liquid .stitch-schedule .daily-row + .daily-row {
  margin-top: 6px;
  padding-top: 14px;
}

/* 胶囊、输入与弹层只保留轻折射，不使用彩色阴影。 */
html[data-visual-mode="fluid"] .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,
  .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-actions button,
  .inspiration-actions a,
  .inspiration-result-head button
) {
  background: var(--quiet-glass-surface-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 8px 20px rgba(48,44,62,.045);
  -webkit-backdrop-filter: blur(16px) saturate(1.02);
  backdrop-filter: blur(16px) saturate(1.02);
}

html[data-visual-mode="fluid"] .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
) {
  background: rgba(255,255,255,.72) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 6px 18px rgba(48,44,62,.035) !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(button, a, input, textarea, select, [contenteditable="true"]):focus-visible {
  outline-color: rgba(114,87,232,.74);
}

/* 紫色只用于进度和状态。 */
html[data-visual-mode="fluid"] .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: #7257e8 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(.calendar-dot, .week-event-dot, .status-dot) {
  background: #7257e8 !important;
}

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

/* 减少无关阴影和层中层。 */
html[data-visual-mode="fluid"] .theme-liquid :is(.project-next, .timeline-row > div, .requirement) {
  background: rgba(255,255,255,.46);
  box-shadow: none !important;
}

html[data-visual-mode="fluid"] .theme-liquid .timeline-row.current > div {
  background: rgba(255,255,255,.7) !important;
  background-image: none !important;
  color: var(--ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.02) !important;
  backdrop-filter: blur(12px) saturate(1.02) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .timeline-row.current :is(p, small) {
  color: var(--muted) !important;
}

html[data-visual-mode="fluid"] .theme-liquid .timeline-row.current > i {
  background: #7257e8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 5px rgba(114,87,232,.12) !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(
  .project-hero .progress-copy strong,
  .ledger-overview .income-number,
  .ledger-hero .ledger-total-value
) {
  color: #f4f1ff !important;
}

html[data-visual-mode="fluid"] .theme-liquid :is(.project-list, .topic-grid, .script-library-list, .inspiration-list) {
  gap: 16px;
}

html[data-visual-mode="fluid"] .theme-liquid :is(.project-card, .topic-card, .script-library-card, .inspiration-card, .account-feature-card, .form-section) {
  padding: 19px !important;
}

@media (prefers-contrast: more) {
  html[data-visual-mode="fluid"] body.theme-liquid {
    --quiet-control-surface: #282631;
    --quiet-glass-surface: #fbfaff;
    --quiet-glass-surface-strong: #fff;
  }
}
