/* 家书书桌的照片工具：预览优先、工具分组、照片像素不作主题处理。 */
@media screen {
  body.theme-c #editor-modal { height: 100dvh; background: #080e0c; backdrop-filter: none; overflow: hidden; }
  body.theme-c #editor-modal .photo-editor-header {
    display: flex; flex-wrap: nowrap; gap: 24px; min-height: 88px;
    padding: 16px 32px; background: var(--vg-bg) !important; border-color: var(--desk-line) !important;
  }
  body.theme-c #editor-modal .photo-editor-header h2 { margin: 0; font: 500 24px/1.5 var(--vg-serif); white-space: nowrap; }
  body.theme-c #editor-modal .photo-editor-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
  body.theme-c #editor-modal .photo-editor-actions button { min-height: 48px; padding: 12px 16px; white-space: nowrap; border: 0; border-radius: 9999px; font-size: var(--pub-size-control) !important; }
  body.theme-c #editor-modal #editor-save-btn { background: transparent !important; color: var(--vg-ink2); }
  body.theme-c #editor-modal #editor-upload-btn { --desk-control: 9999px; background: var(--vg-seal) !important; color: var(--vg-on-seal); }
  body.theme-c #editor-modal :is(#editor-save-btn,#editor-upload-btn):disabled { background: var(--vg-soft) !important; color: var(--vg-ink3) !important; opacity: .6; cursor: not-allowed; }
  body.theme-c #editor-modal #editor-close-btn { width: auto; min-width: 48px; height: 48px; padding-inline: 12px; background: transparent !important; color: var(--vg-ink2); }
  body.theme-c #editor-modal .photo-editor-actions button:hover:not(:disabled) { filter: brightness(1.08); }
  body.theme-c #editor-modal .photo-editor-workspace { display: grid; grid-template-columns: minmax(0,1fr) 336px; min-height: 0; overflow: hidden; }
  body.theme-c #editor-modal #editor-canvas-wrap { min-width: 0; min-height: 0; padding: 24px; background: #080e0c !important; }
  body.theme-c #editor-modal #editor-canvas { border-radius: 4px; box-shadow: 0 12px 40px #0003; }
  body.theme-c #editor-modal .photo-editor-tools {
    width: auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    padding: 32px; background: var(--desk-panel) !important; border: 0; scrollbar-gutter: stable;
  }
  body.theme-c #editor-modal .photo-editor-tools > div { margin: 0; padding-block: 24px; border-bottom: 1px solid var(--desk-line); }
  body.theme-c #editor-modal .photo-editor-tools > div:first-child { padding-top: 0; }
  body.theme-c #editor-modal .photo-editor-tools h4 { margin: 0 0 16px; color: var(--vg-ink) !important; font: 500 var(--pub-size-heading)/1.6 var(--vg-serif) !important; letter-spacing: 0; }
  body.theme-c #editor-modal .editor-tool-btn {
    --desk-control: 12px; min-width: 0; min-height: 48px; padding: 12px 8px;
    border: 0; border-radius: 12px; background: var(--vg-seal-soft); color: var(--vg-ink2); font-size: var(--pub-size-control) !important; line-height: 1.7;
  }
  body.theme-c #editor-modal .editor-tool-btn:hover:not(:disabled) { background: var(--desk-hover); color: var(--vg-ink); }
  body.theme-c #editor-modal .editor-tool-btn i { font-size: 20px; flex: none; }
  body.theme-c #editor-modal #editor-reset-btn { margin-top: 24px; background: transparent; color: var(--vg-ink3) !important; border-radius: 9999px; }
  body.theme-c #editor-modal #editor-pin-cover-wrap { padding: 16px 0 0; border: 0; border-radius: 0; background: transparent !important; gap: 12px; }
  body.theme-c #editor-modal #editor-pin-cover-wrap > span > span:first-child { font-size: var(--pub-size-control) !important; color: var(--vg-ink) !important; }
  body.theme-c #editor-modal #editor-pin-cover-wrap > span > span:last-child { font-size: var(--pub-size-caption) !important; }
  body.theme-c #editor-modal .photo-editor-tools label[for^="adj-"] { font-size: var(--pub-size-control); color: var(--vg-ink2); }
  body.theme-c #editor-modal .photo-editor-tools output { font-size: var(--pub-size-caption); color: var(--vg-ink3); font-variant-numeric: tabular-nums; }
  body.theme-c #editor-modal .editor-slider { min-height: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; accent-color: var(--vg-seal); cursor: pointer; }
  body.theme-c #editor-modal .editor-slider::-webkit-slider-runnable-track { height: 4px; border: 0; border-radius: 9999px; background: var(--vg-line-strong); }
  body.theme-c #editor-modal .editor-slider::-webkit-slider-thumb { margin-top: -8px; width: 20px; height: 20px; border: 2px solid var(--vg-bg); background: var(--vg-seal); box-shadow: 0 0 0 2px var(--vg-seal); }
  body.theme-c #editor-modal .editor-slider::-moz-range-track { height: 4px; border: 0; border-radius: 9999px; background: var(--vg-line-strong); }
  body.theme-c #editor-modal .editor-slider::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid var(--vg-bg); background: var(--vg-seal); box-shadow: 0 0 0 2px var(--vg-seal); }
  body.theme-c #editor-modal #editor-crop-overlay { touch-action: none; }
  /* 详情以一张工作纸承载版本和修复；选择状态保留文字、图标与底色。 */
  body.theme-c #detail-overlay { grid-template-columns: minmax(0,1fr) 436px; }
  body.theme-c #detail-overlay #detail-sidebar { margin: 16px 16px 16px 0; border-radius: 24px; background: var(--desk-panel); }
  body.theme-c #detail-overlay .photo-detail-tabs { gap: 8px; padding: 16px 16px 0; border: 0; }
  body.theme-c #detail-overlay .photo-detail-tabs > button { min-height: 48px; padding: 8px 16px; border: 0; border-radius: 9999px; font-size: var(--pub-size-control); }
  body.theme-c #detail-overlay .photo-detail-tabs > button[aria-selected="true"] { background: var(--vg-seal-soft); color: var(--vg-seal); }
  body.theme-c #detail-overlay .photo-detail-panel { padding: 24px; }
  body.theme-c #detail-overlay #detail-info-panel .detail-actions { gap: 8px; border-color: var(--desk-line); }
  body.theme-c #detail-overlay #detail-info-panel .detail-action { border: 0; border-radius: 12px; background: transparent; }
  body.theme-c #detail-overlay #detail-info-panel .detail-action:hover { background: var(--desk-hover); }
  body.theme-c #detail-overlay #detail-info-panel #detail-edit-btn { color: var(--vg-seal); background: var(--vg-seal-soft); }
  body.theme-c #detail-overlay #detail-version-list { gap: 16px; }
  body.theme-c #detail-overlay #detail-version-list > .version-card { margin-inline: 0; padding: 16px; border: 0; border-radius: 16px; background: transparent; box-shadow: none; }
  body.theme-c #detail-overlay #detail-version-list > .version-card[data-active="1"] { background: var(--vg-seal-soft); box-shadow: none; }
  body.theme-c #detail-overlay .version-preview-frame { border: 0; border-radius: 12px; background: var(--vg-bg); }
  body.theme-c #detail-overlay :is(.set-cover-btn,.version-card-actions > button) { border: 0; border-radius: 9999px; background: transparent; color: var(--vg-ink2); }
  body.theme-c #detail-overlay :is(.set-cover-btn,.version-card-actions > button):hover { background: var(--desk-hover); }
  body.theme-c #detail-overlay :is(.version-cover-status,#detail-upload-derivative-btn) { border: 0; border-radius: 12px; }
  body.theme-c #detail-overlay #detail-delete-btn { border: 0; background: transparent; }
  body.theme-c #detail-overlay .photo-repair-heading h2 { font: 500 24px/1.6 var(--vg-serif); }
  body.theme-c #detail-overlay #ai-preset-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  body.theme-c #detail-overlay #ai-preset-row .ai-preset-btn { justify-content: flex-start; padding: 12px; min-height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--vg-ink2); }
  body.theme-c #detail-overlay #ai-preset-row .ai-preset-btn[aria-pressed="true"] { background: var(--vg-seal-soft); color: var(--vg-seal); box-shadow: inset 3px 0 var(--vg-seal); }
  body.theme-c #detail-overlay #ai-prompt-input { border-color: var(--desk-line) !important; border-radius: 16px; background: var(--vg-bg); font-size: var(--pub-size-body); }
  body.theme-c #detail-overlay #ai-generate-btn { border: 0; border-radius: 9999px; }
  body.theme-c #detail-overlay #ai-generate-btn:disabled { border: 0; background: var(--vg-seal-soft) !important; }
  body.theme-c #detail-overlay #ai-spec-row { border-color: var(--desk-line); }
  body.theme-c #detail-overlay #detail-comment-drawer { inset: 12px; width: auto; max-height: none; height: auto; border: 1px solid var(--desk-line); border-radius: 24px; padding: 24px; background: var(--desk-panel); box-shadow: 0 16px 40px #0005; flex-wrap: nowrap; }
  body.theme-c #detail-overlay #detail-comments { min-height: 0; background: transparent; }
  body.theme-c #detail-overlay #detail-comment-drawer > .flex:last-child { flex-wrap: nowrap; }
  body.theme-c #detail-overlay #comment-input { min-width: 0; width: 100%; border-radius: 12px; }
  body.theme-c #detail-overlay #comment-submit-btn { --desk-control: 9999px; min-height: 48px; height: 48px; border: 0; border-radius: 9999px; background: var(--vg-seal); color: var(--vg-on-seal); white-space: nowrap; }
  body.theme-c #detail-overlay #comment-context.hidden { display: none !important; }
  body.theme-c #detail-overlay #compare-slider:not(.hidden) { display:grid; grid-template-rows:minmax(0,1fr) auto; gap:8px; padding:12px; background:var(--vg-night); }
  body.theme-c #detail-overlay #compare-slider .compare-container { min-height:0; width:100%; border-radius:12px; container-type:size; }
  body.theme-c #detail-overlay #compare-slider :is(.compare-container,#compare-clip,#compare-feedback) { background:var(--vg-night); }
  body.theme-c #detail-overlay #compare-slider :is(#compare-img-before,#compare-img-after) { position:absolute; left:50%; top:50%; translate:-50% -50%; width:100%; height:100%; max-width:none; max-height:none; object-fit:contain; }
  body.theme-c #detail-overlay #compare-slider img[data-quarter-turn] { width:100cqh; height:100cqw; }
  body.theme-c #detail-overlay #compare-slider .compare-tools { position:static; align-items:center; }
  body.theme-c #detail-overlay #compare-slider .vg-compare-note { margin:0 auto 0 0; }
  body.theme-c #detail-overlay #compare-handle { touch-action: none; }
  body.theme-c #detail-overlay #compare-handle:focus-visible { outline-offset: 8px; }
  body.theme-c #detail-overlay #compare-close { top: 16px; right: 16px; border: 0; border-radius: 9999px; }
  /* 补齐此前未收口的任务、相册、人物和全屏标记界面。 */
  body.theme-c #main-app #ai-tasks-list > div { border: 0; border-bottom: 1px solid var(--desk-line); border-radius: 0; background: transparent !important; padding: 24px 0; margin: 0; }
  body.theme-c #main-app #ai-tasks-list .photo-task-prompt { margin-block: 12px; }
  body.theme-c #main-app #ai-tasks-list .photo-task-prompt summary { min-height: 44px; padding-block: 8px; font: 400 var(--pub-size-control)/1.7 var(--vg-sans); color: var(--vg-ink2); cursor: pointer; }
  body.theme-c #main-app #ai-tasks-list .photo-task-prompt p { margin: 8px 0 24px; font-size: var(--pub-size-body); line-height: var(--pub-leading-body); color: var(--vg-ink2); overflow-wrap: anywhere; }
  body.theme-c #main-app #view-persons > div > div:first-child > h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  body.theme-c #main-app #view-persons > div > div:first-child button { border-color: transparent !important; border-radius: 9999px; }
  body.theme-c #main-app #space-detail-actions button,body.theme-c #main-app #circle-cards-grid .circle-card button { border: 0; border-radius: 9999px; background: transparent !important; }
  body.theme-c #main-app #space-detail-actions button:hover,body.theme-c #main-app #circle-cards-grid .circle-card button:hover { background: var(--vg-seal-soft) !important; }
  body.theme-c #main-app #view-space-detail .circle-card { border: 0; border-radius: 24px; background: var(--desk-panel); box-shadow: none; }
  body.theme-c #main-app #persons-grid > div { border-color: transparent !important; border-radius: 24px; }
  body.theme-c #main-app #persons-grid > div > .aspect-square { border-radius: 24px; }
  body.theme-c #main-app #persons-grid > div > .aspect-square:not(.border-brand-primary) { border-color: transparent !important; }
  body.theme-c #main-app #persons-grid > div > .aspect-square.border-brand-primary { border-color: var(--vg-seal) !important; }
  body.theme-c #main-app #persons-grid > div:hover { background: var(--vg-seal-soft) !important; }
  body.theme-c #main-app :is(#ai-connections-nodes > article,#ai-connections-policy,#metrics-overview > div,#metrics-billing > div) { border-color: var(--desk-line) !important; border-radius: 24px; }
  body.theme-c #main-app #search-filter-panel { border-radius: 24px; border-color: var(--desk-line); }
  body.theme-c #main-app :is(#notif-panel,#user-dropdown) { border-radius: 24px; border-color: var(--desk-line); }
  body.theme-c #fullscreen-tagger { background: var(--vg-night); }
  body.theme-c #fullscreen-tagger > div:last-child { border: 0; background: var(--desk-panel) !important; }
  body.theme-c #fullscreen-tagger :is(input,button) { border-radius: 12px; font-size: var(--pub-size-control) !important; }
  body.theme-c #fullscreen-tagger #fst-confirm-btn { --desk-control: 9999px; border-radius: 9999px; }
  body.theme-c #fullscreen-tagger #fst-search { border-color: var(--desk-line) !important; }
  @media(max-width:1023px) {
    body.theme-c #detail-overlay { grid-template-columns: minmax(0,1fr); grid-template-rows: 56px minmax(120px,30dvh) minmax(0,1fr); }
    body.theme-c #detail-overlay #detail-sidebar { margin: 0; border-radius: 24px 24px 0 0; }
    body.theme-c #detail-overlay .photo-detail-tabs { padding: 12px 16px 0; min-height: 60px; }
    body.theme-c #detail-overlay .photo-detail-panel { padding: 24px 24px max(24px,env(safe-area-inset-bottom,0px)); }
  }
  @media(max-width:767px) {
    body.theme-c #editor-modal .photo-editor-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px 12px; min-height: 0; padding: max(12px,env(safe-area-inset-top,0px)) 16px 16px; }
    body.theme-c #editor-modal .photo-editor-header h2 { grid-column: 1; grid-row: 1; font-size: var(--pub-size-heading); }
    body.theme-c #editor-modal .photo-editor-actions { display: contents; }
    body.theme-c #editor-modal #editor-save-btn { grid-row: 2; grid-column: 1; background: var(--vg-seal-soft) !important; }
    body.theme-c #editor-modal #editor-upload-btn { grid-row: 2; grid-column: 2; padding-inline: 8px; }
    body.theme-c #editor-modal :is(#editor-save-btn,#editor-upload-btn):disabled { background: var(--vg-soft) !important; color: var(--vg-ink3) !important; opacity: .6; cursor: not-allowed; }
  body.theme-c #editor-modal #editor-close-btn { grid-row: 1; grid-column: 2; justify-self: end; padding: 8px 12px; }
    body.theme-c #editor-modal .photo-editor-workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(140px,32dvh) minmax(0,1fr); overflow: hidden; }
    body.theme-c #editor-modal #editor-canvas-wrap { padding: 16px; }
    body.theme-c #editor-modal .photo-editor-tools { width: 100%; max-height: none; padding: 24px 24px max(24px,env(safe-area-inset-bottom,0px)); border: 0; border-radius: 24px 24px 0 0; }
    body.theme-c #editor-modal .photo-editor-tools > div:first-child > .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body.theme-c #editor-modal .photo-editor-tools h4 { font-size: var(--pub-size-heading) !important; }
    body.theme-c #editor-modal #editor-pin-cover-wrap { align-items: flex-start; }
  }
  @media(max-height:500px) and (min-width:600px) {
    body.theme-c #editor-modal .photo-editor-header { min-height: 64px; padding-block: 8px; }
    body.theme-c #editor-modal .photo-editor-workspace { grid-template-columns: minmax(0,1fr) 300px; grid-template-rows: minmax(0,1fr); }
    body.theme-c #editor-modal .photo-editor-tools { border-radius: 0; padding: 24px; }
  }
  @media(prefers-reduced-motion:reduce) { body.theme-c :is(#editor-modal,#detail-overlay) * { transition: none; } }
}
