/* Created by 朱圳：以素材为主的轻量工作台，手机保留双列和清晰的采集操作。 */
.capture-page{--capture-bg:#f7f8fa;--capture-ink:#202c40;--capture-muted:#69758a;--capture-line:#e5e9ef;--capture-blue:#315bf3;background:var(--capture-bg);color:var(--capture-ink);min-height:100dvh;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.capture-page svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.capture-navigation{height:72px;display:flex;align-items:center;gap:16px;padding:0 max(24px,calc((100vw - 1184px)/2));background:#fff;border-bottom:1px solid var(--capture-line)}
.capture-brand{color:var(--capture-ink);font-size:18px;font-weight:650;white-space:nowrap;display:flex;align-items:center;gap:24px}.capture-brand span{border-left:1px solid var(--capture-line);padding-left:24px;font-size:13px;font-weight:400;color:var(--capture-muted)}
.capture-account{margin-left:auto;font-size:13px;color:var(--capture-muted);max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.capture-nav-button{border:1px solid var(--capture-line);background:#fff;color:var(--capture-muted);width:44px;height:44px;border-radius:12px;display:grid;place-items:center;padding:0;flex-shrink:0}.capture-navigation>.capture-nav-button{border:0;width:24px;height:44px}
.capture-main{width:100%;max-width:1232px;margin:auto;padding:40px 24px 112px}.capture-heading{padding:0;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.capture-heading h1{display:flex;align-items:center;gap:12px;font-size:30px;line-height:1.4;letter-spacing:-.8px;font-weight:650}.capture-heading-dot{width:8px;height:8px;border-radius:50%;background:var(--capture-blue)}.capture-heading p{font-size:13px;color:var(--capture-muted);margin-top:8px}
.capture-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid var(--capture-line);padding-bottom:24px;margin-bottom:28px}.capture-search-row{display:flex;gap:8px;align-items:center;width:420px;max-width:100%}.capture-search{height:46px;background:#fff;border:1px solid var(--capture-line);border-radius:12px;display:flex;align-items:center;gap:12px;padding:0 14px;margin:0;flex:1;min-width:0}.capture-search svg{width:18px;height:18px;color:var(--capture-muted)}.capture-page .capture-search input{font-size:16px;line-height:1.4;margin:0;border:0;background:transparent;padding:0;min-height:0;height:100%;border-radius:0}.capture-search input::placeholder{color:#8892a3}.capture-search-row>.capture-nav-button{height:46px;width:46px}
.capture-summary{font-size:13px;color:var(--capture-muted);min-width:0}.capture-summary p{overflow-wrap:anywhere;display:flex;align-items:center;gap:8px}.capture-summary p::before{content:"";width:6px;height:6px;border-radius:50%;background:#a8b0bd;flex-shrink:0}.capture-summary p[data-running=true]::before{background:#36826b}
.capture-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px}.capture-card{padding:0;border:0;background:transparent;border-radius:14px;text-align:left;color:var(--capture-ink);min-width:0;display:block;width:100%;align-self:start}.capture-cover{aspect-ratio:4/5;background:#edf0f5;border:1px solid var(--capture-line);border-radius:14px;display:grid;place-items:center;overflow:hidden;color:#9aa7bc}.capture-cover img{width:100%;height:100%;object-fit:cover;transition:transform .22s ease}.capture-cover svg{width:40px;height:40px;stroke-width:1.2}.capture-card-copy{padding:14px 2px 0}.capture-card h2{font-size:15px;font-weight:550;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:48px;overflow-wrap:anywhere;letter-spacing:0}.capture-card p{font-size:12px;line-height:1.5;color:var(--capture-muted);margin-top:8px}
.capture-empty{min-height:52dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 20px}.capture-empty>svg{width:76px;height:76px;stroke-width:1.1;color:var(--capture-blue);background:#eaf0ff;border-radius:24px;padding:16px;margin-bottom:24px}.capture-empty h2{font-size:20px;font-weight:550;letter-spacing:0}.capture-empty p{font-size:13px;color:var(--capture-muted);margin-top:10px;max-width:300px}.capture-empty a{font-size:13px;background:var(--capture-blue);color:white;padding:11px 20px;border-radius:10px;margin-top:24px}
.capture-dialog{border:1px solid var(--capture-line);width:460px;max-width:calc(100% - 32px);max-height:85dvh;overflow:auto;overscroll-behavior:contain;border-radius:20px;padding:28px;background:#fff;color:var(--capture-ink);box-shadow:0 24px 80px #14254026}.capture-dialog::backdrop{background:#17243b66}.capture-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px}.capture-dialog-heading h2{font-size:20px;letter-spacing:0;line-height:1.5;overflow-wrap:anywhere}.capture-dialog-heading>button{border:0;background:var(--capture-bg);border-radius:10px;font-size:24px;line-height:36px;height:36px;min-width:36px;color:var(--capture-muted);padding:0}.capture-section-label{font-size:12px;color:var(--capture-muted);margin:24px 0 10px}.capture-settings-group{border-radius:12px;background:var(--capture-bg);overflow:hidden}.capture-settings-group a,.capture-settings-group button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;padding:14px 16px;font-size:14px;color:var(--capture-ink);background:transparent;border:0;text-align:left;gap:12px}.capture-settings-group>*+*{border-top:1px solid var(--capture-line)}.capture-settings-group a>span:last-child{color:var(--capture-muted)}.capture-page .destructive,.capture-delete{color:#b73f4b}.capture-explanation{font-size:12px;color:var(--capture-muted);line-height:1.9;margin:18px 0;overflow-wrap:anywhere}.capture-dialog summary{font-size:13px;color:var(--capture-muted);padding:12px 0}.capture-events{padding-left:18px;font-size:12px;color:var(--capture-muted);overflow-wrap:anywhere}.capture-guide{padding-left:22px;font-size:14px;line-height:1.9}.capture-guide li+li{margin-top:16px}.capture-detail{width:680px}.capture-detail-media{display:grid;gap:20px}.capture-media-item{background:var(--capture-bg);border-radius:12px;overflow:hidden}.capture-media-item img,.capture-media-item video{display:block;width:100%;max-height:60dvh;object-fit:contain;background:#edf0f5}.capture-media-item a{font-size:13px;display:block;padding:14px 16px;color:var(--capture-blue)}.capture-delete{border:0;background:#fcf0f1;padding:14px;width:100%;border-radius:10px;margin-top:24px;font-size:14px}.capture-confirm-actions{display:flex;gap:12px;margin-top:24px}.capture-confirm-actions button{flex:1;min-height:46px;border:0;border-radius:10px;background:var(--capture-bg);font-size:14px}.capture-dialog button:disabled{opacity:.4}
@media(hover:hover){.capture-nav-button:hover{background:#edf0f5;color:var(--capture-ink)}.capture-card:hover .capture-cover img{transform:scale(1.035)}.capture-card:hover h2{color:var(--capture-blue)}.capture-account:hover{color:var(--capture-blue)}}
@media(max-width:1024px){.capture-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 16px}}
@media(max-width:680px){.capture-navigation{height:60px;padding:0 20px;gap:12px}.capture-brand{font-size:16px}.capture-brand span{display:none}.capture-account{font-size:12px;max-width:130px}.capture-main{padding:28px 20px 108px}.capture-heading{margin-bottom:24px}.capture-heading h1{font-size:26px}.capture-heading p{font-size:12px}.capture-toolbar{align-items:stretch;flex-direction:column;gap:14px;padding-bottom:18px;margin-bottom:22px}.capture-search-row{width:100%}.capture-summary{font-size:12px}.capture-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}.capture-cover{border-radius:12px}.capture-card-copy{padding-top:10px}.capture-card h2{font-size:14px;min-height:44px}.capture-card p{font-size:11px;margin-top:6px}.capture-empty{min-height:43dvh;padding:32px 12px}.capture-empty h2{font-size:18px}.capture-dialog{padding:22px;border-radius:18px}.capture-dialog-heading h2{font-size:18px}}
@media(prefers-reduced-motion:reduce){.capture-cover img{transition:none}}

/* 自动采集放入设置，开关状态与账户保存值一致。 */
.capture-settings-group .capture-auto-toggle{gap:16px}.capture-switch{width:42px;height:26px;border-radius:13px;background:#b4becd;position:relative;flex-shrink:0}.capture-switch::after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:white}.capture-auto-toggle[aria-checked=true] .capture-switch{background:var(--capture-blue)}.capture-auto-toggle[aria-checked=true] .capture-switch::after{left:19px}

/* 仅预览区域允许横向分页，页面主体保持纵向滚动。 */
html:has(#noteDetail[open]){overflow:hidden;overscroll-behavior:none}
body.capture-page:has(#noteDetail[open]){touch-action:manipulation}
.capture-detail[open]{position:fixed;inset:0;display:flex;flex-direction:column;width:min(960px,calc(100% - 48px));max-width:none;height:calc(100dvh - 48px);max-height:none;margin:auto;padding:0;border:0;border-radius:18px;overflow:hidden;background:#101114;color:#f4f4f6}
.capture-detail::backdrop{background:#08090be6}
.capture-detail .capture-dialog-heading{position:absolute;inset:0 0 auto;z-index:3;display:flex;align-items:center;gap:12px;margin:0;padding:16px 18px 36px;background:linear-gradient(#101114d9,transparent);pointer-events:none}
.capture-detail .capture-dialog-heading h2{flex:1;font-size:15px;font-weight:550;line-height:24px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f4f4f6}
.capture-detail #noteAuthor{position:absolute;top:58px;left:18px;right:18px;z-index:3;margin:0;font-size:11px;line-height:18px;color:#c2c4cb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.capture-preview-actions{display:flex;gap:8px;flex-shrink:0;pointer-events:auto}
.capture-preview-actions button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #ffffff1a;border-radius:50%;background:#22242a99;color:#f4f4f6;font-size:25px;line-height:1;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.capture-preview-actions svg{width:18px;height:18px}
.capture-preview-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#101114}
.capture-detail-media{display:flex;gap:0;height:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x pinch-zoom}
.capture-detail-media::-webkit-scrollbar{display:none}
.capture-detail-media>.capture-media-item{position:relative;flex:0 0 100%;min-width:0;height:100%;scroll-snap-align:start;scroll-snap-stop:always;border-radius:0;display:grid;place-items:center;background:#101114}
.capture-detail-media img,.capture-detail-media video{width:100%;height:100%;max-height:100%;min-height:0;object-fit:contain;background:#101114}
.capture-detail-media video{padding:0}
.capture-detail-media video[controls]{position:absolute;top:88px;left:0;width:100%;height:calc(100% - 164px);padding:0}
.capture-detail-media:has(video[controls]){touch-action:manipulation}
.capture-detail-media .capture-media-item>svg{margin:auto;color:#747782}
.capture-media-links{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:18px;z-index:2;display:flex;gap:6px;max-width:calc(100% - 174px);flex-wrap:wrap}
.capture-detail-media .capture-download-button{padding:10px 12px;border:1px solid #ffffff26;border-radius:22px;line-height:22px;font-size:12px;font-weight:500;background:#25272dbf;color:#f5f5f7;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.capture-preview-stage::after{content:"";position:absolute;left:0;right:0;bottom:0;height:100px;background:linear-gradient(transparent,#101114b3);pointer-events:none}
.capture-preview-controls{position:absolute;right:18px;bottom:max(20px,env(safe-area-inset-bottom));z-index:2;display:flex;align-items:center;gap:2px;height:44px;border:1px solid #ffffff26;border-radius:24px;background:#25272dbf;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);font-size:12px;color:#f5f5f7;font-variant-numeric:tabular-nums}
.capture-preview-controls span{min-width:50px;text-align:center}
.capture-preview-controls button{width:40px;height:42px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:24px;line-height:1}
@media(max-width:680px){.capture-detail[open]{width:100%;height:100dvh;border-radius:0}.capture-detail .capture-dialog-heading{padding-top:max(12px,env(safe-area-inset-top))}.capture-detail #noteAuthor{top:calc(max(12px,env(safe-area-inset-top)) + 44px)}}

/* 单击切换纯预览，不改变媒体尺寸和当前页。 */
.capture-detail.capture-chrome-hidden .capture-dialog-heading,.capture-detail.capture-chrome-hidden #noteAuthor,.capture-detail.capture-chrome-hidden .capture-preview-controls,.capture-detail.capture-chrome-hidden .capture-media-links{opacity:0;visibility:hidden;pointer-events:none}
.capture-detail.capture-chrome-hidden .capture-preview-stage::after{opacity:0}

.capture-live-badge{position:absolute;top:88px;left:18px;padding:4px 9px;border:1px solid #ffffff26;border-radius:8px;background:#25272d99;color:#f5f5f7;font-size:11px;pointer-events:none}
.capture-play-prompt{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;padding:12px 18px;border:1px solid #ffffff40;border-radius:24px;background:#25272de6;color:white;font-size:14px}
.capture-detail.capture-chrome-hidden .capture-live-badge{visibility:hidden}

.capture-download-button{font:inherit;cursor:pointer}
.capture-download-options{display:flex;gap:10px;flex-wrap:wrap}
.capture-download-options button,.capture-download-options a{display:inline-flex;align-items:center;justify-content:center;flex:1;min-height:46px;border:1px solid var(--capture-line);border-radius:12px;padding:10px 14px;background:var(--capture-bg);color:var(--capture-ink);font-size:14px;text-align:center}
.capture-download-options #saveToPhotos{background:var(--capture-blue);border-color:var(--capture-blue);color:white}

/* 单项与整篇下载并列，下载进度留在同一面板内。 */
.capture-media-links{flex-wrap:nowrap}
.capture-detail-media .capture-download-button{white-space:nowrap;padding:10px 11px}
.capture-download-summary{font-size:13px;color:var(--capture-muted);margin:-10px 0 18px}
#downloadProgress{display:block;width:100%;height:5px;border:0;border-radius:4px;overflow:hidden;accent-color:var(--capture-blue);margin-bottom:18px}
#downloadProgress::-webkit-progress-bar{background:#edf0f5;border-radius:4px}
#downloadProgress::-webkit-progress-value{background:var(--capture-blue);border-radius:4px}

/* 多选使用独立缩略图网格，底部始终保留所选数量和下载操作。 */
.capture-selection-dialog[open]{display:flex;flex-direction:column;width:760px;max-width:calc(100% - 32px);height:min(800px,calc(100dvh - 32px));max-height:none;padding:0;overflow:hidden;background:var(--capture-bg)}
.capture-selection-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:16px 20px;border-bottom:1px solid var(--capture-line);background:white}
.capture-selection-header h2{font-size:16px;font-weight:600;letter-spacing:0}
.capture-selection-header button{padding:8px 0;min-width:44px;border:0;background:transparent;font-size:14px;color:var(--capture-blue)}
.capture-selection-header button:first-child{color:var(--capture-muted)}
.capture-selection-grid{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:14px;padding:20px}
.capture-selection-card{position:relative;min-width:0}
.capture-selection-thumb{position:relative;display:grid;place-items:center;aspect-ratio:3/4;overflow:hidden;border-radius:12px;background:#e6ebf2;margin:0;cursor:pointer;box-shadow:inset 0 0 0 1px #00000008}
.capture-selection-thumb img{width:100%;height:100%;object-fit:cover}
.capture-selection-thumb>svg{width:32px;height:32px;color:#9aa7bc}
.capture-selection-thumb input{appearance:none;-webkit-appearance:none;position:absolute;right:8px;top:8px;width:26px;height:26px;min-height:0;margin:0;padding:0;border:2px solid #ffffffeb;border-radius:50%;background:#17243b33;box-shadow:0 1px 5px #0003;cursor:pointer}
.capture-selection-thumb input:checked{background:var(--capture-blue);border-color:white}
.capture-selection-thumb input:checked::after{content:"";position:absolute;left:7px;top:3px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}
.capture-selection-thumb:has(input:checked){outline:3px solid var(--capture-blue);outline-offset:-3px}
.capture-selection-caption{position:absolute;bottom:0;left:0;right:0;padding:26px 9px 9px;background:linear-gradient(transparent,#101114b3);color:white;font-size:11px;pointer-events:none}
.capture-selection-footer{flex-shrink:0;display:grid;grid-template-columns:1fr auto;gap:8px 16px;align-items:center;padding:16px 20px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--capture-line);background:white}
.capture-selection-footer p{font-size:13px;color:var(--capture-ink);font-variant-numeric:tabular-nums}
.capture-selection-footer>button{border:0;border-radius:12px;background:var(--capture-blue);color:white;padding:12px 20px;font-size:14px;min-height:46px}
.capture-selection-footer>span{grid-column:1/-1;font-size:11px;color:var(--capture-muted)}
@media(max-width:680px){.capture-selection-dialog[open]{width:100%;max-width:100%;height:100dvh;border-radius:0;margin:0}.capture-selection-header{padding-top:max(12px,env(safe-area-inset-top))}.capture-selection-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:16px;gap:10px}}

/* 所有素材弹窗共用背景滚动锁，内层内容仍可正常滚动。 */
html.capture-modal-open{overflow:hidden;overscroll-behavior:none}

/* 空状态突出下一步操作，不增加加载动画。 */
.capture-empty>svg{background:transparent;border-radius:0;padding:8px;width:64px;height:64px;color:var(--capture-muted);margin-bottom:22px}.capture-empty p{line-height:1.8;max-width:290px}.capture-empty button{margin-top:24px;border:0;border-radius:24px;padding:12px 24px;background:var(--capture-blue);color:#fff;font:inherit;font-size:14px;cursor:pointer;min-height:44px}.capture-empty[hidden]{display:none}

.capture-selection-footer>.app-download-note{grid-column:1/-1}.capture-dialog>.app-download-note{margin-top:18px}.capture-detail-media a.capture-live-badge[data-open-app]{pointer-events:auto;display:inline-flex;align-items:center;min-height:36px;padding:6px 10px;font-size:11px;color:#f5f5f7;text-decoration:none}.capture-navigation>.app-entry{flex-shrink:0}.capture-navigation .capture-account{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
