
:root {
  --sidebar-w: 280px; --bg: #fff; --bg-sidebar: #f6f8fa; --text: #24292f;
  --text-muted: #656d76; --border: #d1d9e0; --link: #0969da; --hover: #f0f3f6;
  --active: #ddf4ff; --code-bg: #f6f8fa;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
html[data-theme="dark"] {
  --bg: #0d1117; --bg-sidebar: #161b22; --text: #e6edf3;
  --text-muted: #8b949e; --border: #30363d; --link: #58a6ff; --hover: #21262d;
  --active: #1f3a5f; --code-bg: #161b22; color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); display: flex; min-height: 100vh; }
/* 外出模式的肩窥防护只是第二道防线；文件内容和敏感接口已由服务端拒绝。 */
html[data-session-mode="away"] .content { filter: blur(2px); opacity: .92; }
html[data-session-mode="away"] .sidebar { filter: blur(1px); opacity: .94; }
html[data-session-mode="away"] .content a,
html[data-session-mode="away"] .content button,
html[data-session-mode="away"] .content input,
html[data-session-mode="away"] .content select { filter: blur(.5px); }
html[data-session-mode="away"] .screen-access-overlay,
html[data-session-mode="away"] .screen-access-settings,
html[data-session-mode="away"] .comfyui-panel,
html[data-session-mode="away"] .recent-access-popover,
html[data-session-mode="away"] .workspace-memo-popover { filter: none; }
html[data-session-mode="away"] .away-peek-control { position: fixed; right: 18px; bottom: 18px; z-index: 1800; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text-muted); box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; font-size: 19px; opacity: .82; touch-action: none; }
html[data-session-mode="away"] .away-peek-control:hover,
html[data-session-mode="away"] .away-peek-control:focus-visible { opacity: 1; border-color: var(--link); color: var(--link); outline: none; }
html[data-session-mode="away"] .away-peek-control:active,
html[data-session-mode="away"].away-peek .away-peek-control { background: var(--bg); }
html[data-session-mode="away"].away-peek .content,
html[data-session-mode="away"].away-peek .sidebar { filter: none; opacity: 1; }
html[data-session-mode="away"].away-peek .content a,
html[data-session-mode="away"].away-peek .content button,
html[data-session-mode="away"].away-peek .content input,
html[data-session-mode="away"].away-peek .content select { filter: none; }
/* 轻微文字扰动：只作用于常见文字容器，不处理图片、视频和图标。 */
html[data-session-mode="away"] .content h1,
html[data-session-mode="away"] .content h2,
html[data-session-mode="away"] .content h3,
html[data-session-mode="away"] .content h4,
html[data-session-mode="away"] .content p,
html[data-session-mode="away"] .content li,
html[data-session-mode="away"] .content td,
html[data-session-mode="away"] .content th,
html[data-session-mode="away"] .content dt,
html[data-session-mode="away"] .content dd,
html[data-session-mode="away"] .content label,
html[data-session-mode="away"] .content a,
html[data-session-mode="away"] .content button,
html[data-session-mode="away"] .content .item-name,
html[data-session-mode="away"] .content .item-mobile-modified,
html[data-session-mode="away"] .content .browser-breadcrumb,
html[data-session-mode="away"] .content .browser-status,
html[data-session-mode="away"] .sidebar-title a,
html[data-session-mode="away"] .workspace-nav-name,
html[data-session-mode="away"] .workspace-nav-folder-name,
html[data-session-mode="away"] .app-item-name,
html[data-session-mode="away"] .sidebar-footer {
  letter-spacing: .012em;
  text-shadow: .28px 0 currentColor, -.22px .12px rgba(127,127,127,.42);
}
html[data-session-mode="away"].away-peek .content h1,
html[data-session-mode="away"].away-peek .content h2,
html[data-session-mode="away"].away-peek .content h3,
html[data-session-mode="away"].away-peek .content h4,
html[data-session-mode="away"].away-peek .content p,
html[data-session-mode="away"].away-peek .content li,
html[data-session-mode="away"].away-peek .content td,
html[data-session-mode="away"].away-peek .content th,
html[data-session-mode="away"].away-peek .content dt,
html[data-session-mode="away"].away-peek .content dd,
html[data-session-mode="away"].away-peek .content label,
html[data-session-mode="away"].away-peek .content a,
html[data-session-mode="away"].away-peek .content button,
html[data-session-mode="away"].away-peek .content .item-name,
html[data-session-mode="away"].away-peek .content .item-mobile-modified,
html[data-session-mode="away"].away-peek .content .browser-breadcrumb,
html[data-session-mode="away"].away-peek .content .browser-status,
html[data-session-mode="away"].away-peek .sidebar-title a,
html[data-session-mode="away"].away-peek .workspace-nav-name,
html[data-session-mode="away"].away-peek .workspace-nav-folder-name,
html[data-session-mode="away"].away-peek .app-item-name,
html[data-session-mode="away"].away-peek .sidebar-footer {
  letter-spacing: normal;
  text-shadow: none;
}
/* 聚焦查看时先恢复页面，再用一层带径向透明孔的滤镜跟随鼠标，
   让指针附近清晰、周围仍保留较轻的肩窥防护。 */
html[data-session-mode="away"].away-peek body::after { content: ""; position: fixed; inset: 0; z-index: 1700;
  pointer-events: none; background: rgba(20, 24, 30, .08); backdrop-filter: blur(4px) saturate(.88);
  -webkit-backdrop-filter: blur(4px) saturate(.88);
  -webkit-mask-image: radial-gradient(circle 190px at var(--away-peek-x, 50vw) var(--away-peek-y, 50vh),
    transparent 0, transparent 105px, rgba(0,0,0,.45) 155px, #000 220px);
  mask-image: radial-gradient(circle 190px at var(--away-peek-x, 50vw) var(--away-peek-y, 50vh),
    transparent 0, transparent 105px, rgba(0,0,0,.45) 155px, #000 220px); }
.sidebar { width: var(--sidebar-w); min-width: var(--sidebar-w); background: var(--bg-sidebar);
  border-right: 1px solid var(--border); padding: 12px 0 0; overflow-y: auto; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 10; display: flex; flex-direction: column; }
.sidebar-title { font-size: 15px; font-weight: 600; padding: 0 12px 10px 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sidebar-title a { color: var(--text); text-decoration: none; }
.sidebar-title > a:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-title .sidebar-browse { flex: 0 0 auto; padding: 2px 5px; border-radius: 5px; color: var(--text-muted); font-size: 16px; }
.sidebar-title .sidebar-browse:hover { background: var(--hover); color: var(--text); }
.app-nav { margin: 0 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: hidden; }
.app-nav-title, .quick-access-title { display: flex; align-items: center; justify-content: space-between; min-height: 36px;
  padding: 6px 8px 6px 11px; border-bottom: 1px solid var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 700; letter-spacing: .35px; }
.app-nav-title a { padding: 3px 6px; border-radius: 5px; color: var(--link); font-size: 12px; font-weight: 500; text-decoration: none; }
.app-nav-title a:hover { background: var(--hover); text-decoration: none; }
.app-switcher { max-height: 30vh; overflow-y: auto; padding: 4px; }
.app-switcher .app-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px; }
.app-switcher .app-item:hover { background: var(--hover); }
.app-switcher .app-item.active { background: var(--active); font-weight: 600; }
.app-item-icon { flex: 0 0 20px; width: 20px; height: 20px; display: inline-flex; align-items: center;
  justify-content: center; color: #57606a; }
.app-item-icon svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor;
  stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.app-item.active .app-item-icon { color: #0969da; }
.app-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-access { margin: 0 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: hidden; }
.quick-access[hidden] { display: none; }
.quick-access-list { list-style: none; padding: 4px; margin: 0; max-height: 26vh; overflow-y: auto; }
.quick-access-item { display: flex; align-items: center; min-width: 0; }
.quick-access-item:hover { background: var(--hover); border-radius: 6px; }
.quick-access-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px 4px 5px 9px;
  color: var(--text); text-decoration: none; font-size: 13px; }
.quick-access-link:hover { text-decoration: none; }
.quick-access-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-access-badge { flex: 0 0 auto; padding: 1px 4px; border-radius: 4px; background: #fff8c5; color: #7d4e00;
  border: 1px solid #d4a72c66; font-size: 9px; line-height: 1.3; }
.quick-access-remove { flex: 0 0 28px; align-self: stretch; border: 0; background: transparent; color: var(--text-muted);
  cursor: pointer; opacity: 0; font-size: 15px; }
.quick-access-item:hover .quick-access-remove, .quick-access-remove:focus { opacity: 1; }
.quick-access-remove:hover { color: #d1242f; }
.quick-access-empty { margin: 0; padding: 10px 11px 11px; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.sidebar-article-import { display: block; margin: 0 10px 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--link); text-decoration: none; font-size: 13px; }
.sidebar-article-import:hover { background: var(--hover); text-decoration: none; }
.sidebar-creation { display: block; margin: 0 10px 8px; padding: 8px 10px; border: 1px solid var(--link); border-radius: 7px; background: color-mix(in srgb, var(--link) 8%, transparent); color: var(--link); text-decoration: none; font-size: 13px; }
.sidebar-creation:hover { background: color-mix(in srgb, var(--link) 16%, transparent); text-decoration: none; }
.quick-access-empty[hidden], .quick-access-list[hidden] { display: none; }
.content { margin-left: var(--sidebar-w); flex: 1; padding: 32px 48px;
  max-width: calc(100vw - var(--sidebar-w)); line-height: 1.7; }
.content h1 { font-size: 2em; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin: 24px 0 16px; }
.content h2 { font-size: 1.5em; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin: 24px 0 12px; }
.content h3 { font-size: 1.25em; margin: 20px 0 8px; }
.content h4 { font-size: 1em; margin: 16px 0 8px; }
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 2em; }
.content li { margin: 4px 0; }
.content a { color: var(--link); text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content blockquote { border-left: 4px solid var(--border); padding: 0 16px; color: var(--text-muted); margin: 0 0 16px; }
.content code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.content pre { background: var(--code-bg); padding: 16px; border-radius: 8px; overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); }
.markdown-code-wrap { position: relative; margin: 0 0 16px; }
.markdown-code-wrap pre { margin-bottom: 0; padding-top: 42px; }
.markdown-code-copy { position: absolute; top: 8px; right: 8px; z-index: 1; height: 28px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12px; }
.markdown-code-copy:hover { color: var(--link); background: var(--hover); border-color: #8c959f; }
.markdown-code-copy.copied { color: #1a7f37; border-color: #1a7f37; }
.content pre code { background: none; padding: 0; font-size: 0.85em; line-height: 1.5; }
.content table { border-collapse: collapse; width: 100%; margin: 0 0 16px; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.content th { background: var(--bg-sidebar); font-weight: 600; }
.content img { max-width: 100%; border-radius: 8px; }
.content .mermaid { text-align: center; margin: 0 0 16px; }
.content .math-block { overflow-x: auto; margin: 0 0 16px; }
.dir-listing { list-style: none; padding: 0; }
.dir-listing li { margin: 4px 0; }
.dir-listing a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 15px; }
.dir-listing a:hover { background: var(--hover); }
.browser-page { width: 100%; max-width: none; margin: 0; }
body.folder-mode .content { padding: 24px 20px; }
.markdown-page { width: 100%; max-width: none; margin: 0; }
.browser-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; box-sizing: border-box; margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.browser-header h1 { margin: 0; flex: 1; min-width: 0; font-size: 1.5em; word-break: break-word; border-bottom: 0; padding-bottom: 0; }
.browser-header-actions { flex: 0 1 auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 0; }
.header-tool-group { display: inline-flex; align-items: center; gap: 3px; min-height: 40px; box-sizing: border-box; padding: 2px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-sidebar); }
.header-tool-group > button, .header-tool-group > a, .header-tool-group > span, .header-tool-group > div { margin: 0; }
.header-tool-group-tools { border-color: #8250df33; background: #faf8ff; }
.header-tool-group-context { border-color: #0969da33; background: #f7faff; }
.header-tool-group-page { border-color: #bf870033; background: #fffdf5; }
.header-tool-group-path { gap: 7px; padding: 3px; border-color: #8c959f55; background: var(--bg-sidebar); }
.workspace-memo-anchor { position: relative; flex: 0 0 auto; }
.workspace-memo-toggle { height: 36px; padding: 0 10px; border: 1px solid #8250df66; border-radius: 7px;
  background: #faf8ff; color: #6639ba; cursor: pointer; font: inherit; white-space: nowrap; }
.workspace-memo-toggle:hover, .workspace-memo-toggle[aria-expanded="true"] { background: #f0e8ff; border-color: #8250df; }
.workspace-memo-popover { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); z-index: 1100; box-sizing: border-box; width: 80vw; height: 80vh;
  min-width: 360px; min-height: 260px; max-width: 1400px; max-height: 86vh; overflow: hidden; resize: both; display: flex; flex-direction: column; padding: 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); box-shadow: 0 12px 34px rgba(27,31,36,.22); }
.workspace-memo-popover[hidden] { display: none !important; }
.workspace-memo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; cursor: move; user-select: none; touch-action: none; }
.workspace-memo-head button { cursor: pointer; }
.workspace-memo-head strong { font-size: 13px; }
.workspace-memo-head-actions { display: inline-flex; align-items: center; gap: 6px; }
.workspace-memo-pin { height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12px; }
.workspace-memo-pin[aria-pressed="true"] { color: var(--link); border-color: var(--link); background: var(--hover); }
.workspace-memo-delete { height: 28px; padding: 0 9px; border: 1px solid #cf222e66; border-radius: 6px; background: var(--bg-sidebar); color: #cf222e; cursor: pointer; font: inherit; font-size: 12px; }
.workspace-memo-delete:hover { background: #fff1f0; border-color: #cf222e; }
.workspace-memo-tabs { display: flex; align-items: center; flex: 0 0 42px; height: 42px; min-height: 42px; gap: 5px; overflow-x: auto; overflow-y: hidden; padding: 0 0 8px; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.workspace-memo-tab { appearance: none; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 84px; max-width: 220px; min-height: 32px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 13px; line-height: 1.2; }
.workspace-memo-tab:hover, .workspace-memo-tab.active { color: var(--link); border-color: var(--link); background: var(--hover); }
.workspace-memo-tab[draggable="true"] { cursor: grab; touch-action: pan-x; user-select: none; }
.workspace-memo-tab.memo-tab-dragging { opacity: .55; cursor: grabbing; border-style: dashed; }
.workspace-memo-delete-menu { position: absolute; top: 54px; right: 14px; z-index: 3; width: min(360px, calc(100% - 28px)); max-height: 50vh; overflow: auto; box-sizing: border-box; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: 0 8px 24px rgba(27,31,36,.18); }
.workspace-memo-delete-menu[hidden] { display: none !important; }
.workspace-memo-delete-menu-title { padding: 2px 4px 7px; color: var(--text-muted); font-size: 12px; }
.workspace-memo-delete-list { display: grid; gap: 4px; }
.workspace-memo-delete-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 34px; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; background: var(--bg-sidebar); color: var(--text); text-align: left; font: inherit; font-size: 12px; }
.workspace-memo-delete-item:hover { border-color: #cf222e66; background: #fff1f0; }
.workspace-memo-delete-item-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-memo-delete-item-action { flex: 0 0 auto; color: #cf222e; }
.workspace-memo-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 2px 2px; font-size: 13px; line-height: 1.55; }
.workspace-memo-content .markdown-source { min-height: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-memo-content .json-viewer { max-height: none; font-size: 12px; }
.workspace-memo-content .memo-empty { color: var(--text-muted); }
.workspace-memo-mount { height: 36px; padding: 0 10px; border: 1px solid #1a7f3766; border-radius: 7px;
  background: #f0fff4; color: #116329; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.workspace-memo-mount:hover { background: #dafbe1; border-color: #1a7f37; }
.workspace-memo-mount:disabled { opacity: .65; cursor: default; }
.workspace-memo-media { display: block; max-width: 100%; max-height: 58vh; margin: 0 auto; object-fit: contain; }
.recent-access-anchor { position: relative; display: flex; justify-content: flex-end; margin: 0 0 8px; }
.browser-header-actions .recent-access-anchor, .workspace-page-actions .recent-access-anchor { display: inline-flex; margin: 0; }
.recent-access-toggle { height: 36px; padding: 0 10px; border: 1px solid #0969da66; border-radius: 7px; background: #f6f8ff; color: #0550ae; cursor: pointer; font: inherit; white-space: nowrap; }
.recent-access-toggle:hover, .recent-access-toggle[aria-expanded="true"] { background: #ddf4ff; border-color: #0969da; }
.recent-access-popover { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); z-index: 1100; box-sizing: border-box; width: 50vw; height: 60vh; min-width: 340px; min-height: 240px; max-width: 92vw; max-height: 88vh; overflow: hidden; resize: both; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); box-shadow: 0 12px 34px rgba(27,31,36,.22); }
.recent-access-popover[hidden] { display: none !important; }
.recent-access-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto; padding: 2px 2px 8px; cursor: move; user-select: none; touch-action: none; }
.recent-access-head strong { font-size: 14px; }
.recent-access-pin { height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12px; }
.recent-access-pin[aria-pressed="true"] { color: var(--link); border-color: var(--link); background: var(--hover); }
.recent-access-status { flex: 0 0 auto; min-height: 18px; color: var(--text-muted); font-size: 11px; }
.recent-access-status:empty { min-height: 0; }
.recent-access-list { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 4px; }
.recent-access-item { display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: var(--bg-sidebar); color: var(--text); text-decoration: none; }
.recent-access-item:hover { border-color: var(--border); background: var(--hover); text-decoration: none; }
.recent-access-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.45; font-weight: 650; }
.recent-access-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.comfyui-sidebar-entry { padding: 8px 10px; border-top: 1px solid var(--border); margin-top: auto; }
.comfyui-sidebar-entry + .sidebar-footer { margin-top: 0; }
.comfyui-sidebar-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #8250df55; border-radius: 7px; background: #f7f2ff; color: #6639ba; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; text-align: left; }
.comfyui-sidebar-toggle:hover, .comfyui-sidebar-toggle[aria-expanded="true"] { border-color: #8250df; background: #f0e8ff; }
.comfyui-entry-icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; }
.comfyui-entry-icon svg { width: 100%; height: 100%; fill: var(--bg); stroke: currentColor; stroke-width: 1.7; }
.comfyui-top-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid #8250df66; border-radius: 7px; background: #f7f2ff; color: #6639ba; cursor: pointer; font: inherit; white-space: nowrap; }
.comfyui-top-toggle:hover, .comfyui-top-toggle[aria-expanded="true"] { border-color: #8250df; background: #f0e8ff; }
.comfyui-page-tool { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.comfyui-status-panel { position: fixed; left: 50%; top: 50%; z-index: 1100; transform: translate(-50%, -50%); box-sizing: border-box; width: 82vw; height: 82vh; min-width: 620px; min-height: 420px; max-width: 96vw; max-height: 94vh; overflow: hidden; resize: both; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); box-shadow: 0 16px 48px rgba(27,31,36,.25); color: var(--text); }
.comfyui-status-panel[hidden] { display: none !important; }
.comfyui-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; min-height: 36px; padding: 0 2px 9px; cursor: move; user-select: none; touch-action: none; border-bottom: 1px solid var(--border); }
.comfyui-panel-head > div:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comfyui-panel-head strong { font-size: 15px; }
.comfyui-panel-subtitle { padding: 1px 6px; border-radius: 99px; background: #dafbe1; color: #116329; font-size: 11px; font-weight: 600; }
.comfyui-panel-actions { display: flex; align-items: center; gap: 6px; cursor: default; }
.comfyui-panel-actions button { height: 30px; padding: 0 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; }
.comfyui-panel-actions button:hover { border-color: var(--link); color: var(--link); }
.comfyui-auto-refresh, .comfyui-refresh-interval { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.comfyui-refresh-interval input { width: 48px; height: 28px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); font: inherit; text-align: center; }
.comfyui-instance-tabs { display: flex; gap: 5px; flex: 0 0 auto; overflow-x: auto; padding: 9px 0 7px; scrollbar-width: thin; }
.comfyui-instance-tab { flex: 0 0 auto; min-height: 31px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-sidebar); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12px; }
.comfyui-instance-tab.active { border-color: #8250df; background: #f0e8ff; color: #6639ba; font-weight: 650; }
.comfyui-panel-status { flex: 0 0 auto; min-height: 18px; color: var(--text-muted); font-size: 11px; }
.comfyui-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px 2px 8px; }
.comfyui-overview { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 7px; margin-bottom: 10px; }
.comfyui-stat { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-sidebar); }
.comfyui-stat-label { display: block; color: var(--text-muted); font-size: 11px; }
.comfyui-stat-value { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.comfyui-online { color: #1a7f37; }.comfyui-offline { color: #cf222e; }.comfyui-live-warn { color: #9a6700; }
.comfyui-section { margin: 10px 0 0; }
.comfyui-section > h3 { margin: 0 0 6px; padding: 0; border: 0; font-size: 14px; }
.comfyui-empty { margin: 0; padding: 12px; border: 1px dashed var(--border); border-radius: 7px; color: var(--text-muted); font-size: 12px; }
.comfyui-task-list { display: grid; gap: 6px; }
.comfyui-task { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); overflow: hidden; }
.comfyui-task > summary { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 9px; background: var(--bg-sidebar); cursor: pointer; list-style: none; }
.comfyui-task > summary::-webkit-details-marker { display: none; }
.comfyui-task > summary::before { content: "›"; flex: 0 0 auto; color: var(--text-muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.comfyui-task[open] > summary::before { transform: rotate(90deg); }
.comfyui-task-id { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.comfyui-state-badge { flex: 0 0 auto; padding: 2px 7px; border-radius: 99px; background: #ddf4ff; color: #0550ae; font-size: 11px; font-weight: 650; }
.comfyui-state-badge[data-state="success"] { background: #dafbe1; color: #116329; }
.comfyui-state-badge[data-state="error"], .comfyui-state-badge[data-state="failed"] { background: #ffebe9; color: #cf222e; }
.comfyui-state-badge[data-state="pending"] { background: #fff8c5; color: #7d4e00; }
.comfyui-task-node { flex: 0 1 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 11px; }
.comfyui-task-body { padding: 9px; }
.comfyui-progress { height: 6px; margin: 0 0 9px; overflow: hidden; border-radius: 99px; background: #d8dee4; }
.comfyui-progress > span { display: block; height: 100%; border-radius: inherit; background: #8250df; }
.comfyui-task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; margin-bottom: 8px; font-size: 11px; }
.comfyui-task-grid div { min-width: 0; overflow-wrap: anywhere; }
.comfyui-task-grid b { color: var(--text-muted); font-weight: 500; }
.comfyui-data-block { margin-top: 6px; border-top: 1px solid var(--border); }
.comfyui-data-block summary { padding: 6px 2px; color: var(--link); cursor: pointer; font-size: 12px; }
.comfyui-json { max-height: 360px; overflow: auto; margin: 0; padding: 9px; border-radius: 6px; background: var(--code-bg); white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.comfyui-output-files { margin: 8px 0; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-sidebar); }
.comfyui-output-files > strong { display: block; margin-bottom: 6px; font-size: 12px; }
.comfyui-output-file { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--border); }
.comfyui-output-file:first-of-type { border-top: 0; }
.comfyui-output-file-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--link); font-size: 12px; text-decoration: none; }
.comfyui-output-folder-link { flex: 0 0 auto; color: var(--text-muted); font-size: 11px; text-decoration: none; white-space: nowrap; }
.comfyui-output-file-link:hover, .comfyui-output-folder-link:hover { text-decoration: underline; }
.comfyui-error-list { margin: 0 0 8px; padding: 8px 10px; border: 1px solid #ff818266; border-radius: 7px; background: #ffebe9; color: #cf222e; font-size: 12px; }
.comfyui-device-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.comfyui-device { padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-sidebar); font-size: 11px; }
.md-canvas-tool-anchor { display: inline-flex; flex: 0 0 auto; }
.browser-header-actions .md-canvas-tool-anchor, .workspace-page-actions .md-canvas-tool-anchor { display: inline-flex; }
.md-canvas-tool-launch { height: 36px; padding: 0 10px; border: 1px solid #bf870066; border-radius: 7px;
  background: #fff8c5; color: #7d4e00; cursor: pointer; font: inherit; white-space: nowrap; }
.md-canvas-tool-launch:hover, .md-canvas-tool-launch[aria-expanded="true"] { background: #fae17d; border-color: #bf8700; }
.browser-back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 35; width: 44px; height: 44px; padding: 0; border: 1px solid #0969da66; border-radius: 50%; background: var(--bg); color: var(--link); box-shadow: 0 5px 18px rgba(27,31,36,.2); cursor: pointer; font: inherit; font-size: 20px; }
.browser-back-to-top:hover { background: var(--hover); border-color: var(--link); }
.browser-back-to-top[hidden] { display: none !important; }
.folder-path-toggle, .folder-path-copy, .folder-path-open { flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text-muted); cursor: pointer; font-size: 17px; }
.folder-path-toggle:hover, .folder-path-toggle[aria-pressed="true"], .folder-path-copy:hover, .folder-path-open:hover {
  background: var(--hover); color: var(--link); border-color: #8c959f; }
.folder-path-copy:disabled, .folder-path-open:disabled { opacity: .55; cursor: wait; }
.folder-shortcut-toggle { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text-muted); cursor: pointer; font: inherit; white-space: nowrap; }
.folder-shortcut-toggle:hover, .folder-shortcut-toggle[aria-pressed="true"] { background: #fff8c5; color: #7d4e00; border-color: #d4a72c; }
.markdown-view-toggle { height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text-muted) !important; display: inline-flex; align-items: center; gap: 5px;
  font: inherit; line-height: 1; white-space: nowrap; text-decoration: none !important; }
.markdown-view-toggle:hover { background: var(--hover); color: var(--link) !important; border-color: #8c959f; }
.browser-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--text-muted);
  font-size: 13px; line-height: 1.55; margin: -8px 0 18px; min-width: 0; }
.breadcrumb-items { display: flex; align-items: center; flex: 1 1 420px; flex-wrap: wrap; gap: 5px; min-width: 0; }
.browser-breadcrumb .breadcrumb-segment { display: inline-flex; align-items: center; min-width: 0; max-width: 100%;
  padding: 2px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar);
  color: var(--link); overflow-wrap: anywhere; text-decoration: none; }
.browser-breadcrumb a.breadcrumb-segment:hover { border-color: #8c959f; background: var(--hover); text-decoration: none; }
.browser-breadcrumb .breadcrumb-current { color: var(--text); background: var(--bg); font-weight: 500; }
.breadcrumb-separator { flex: 0 0 auto; color: #8c959f; font-size: 15px; line-height: 1; }
.browser-breadcrumb .absolute-path-prefix { display: none; max-width: 100%; color: var(--text-muted); overflow-wrap: anywhere; }
.browser-breadcrumb.show-absolute-path .absolute-path-prefix,
.browser-breadcrumb.show-absolute-path .absolute-path-separator { display: inline; }
.browser-breadcrumb .absolute-path-separator { display: none; color: #8c959f; }
.browser-quick-access { margin: 0 0 14px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-sidebar); }
.browser-quick-access[hidden] { display: none; }
.browser-quick-access-title { margin: 0 0 8px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.browser-quick-access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; list-style: none; margin: 0; padding: 0; }
.browser-quick-access-link { display: flex; align-items: center; min-width: 0; gap: 7px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text); text-decoration: none; }
.browser-quick-access-link:hover { border-color: #d4a72c; background: #fff8c5; text-decoration: none; }
.browser-quick-access-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-pinned-access { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; min-height: 0; margin: 0 0 16px; padding: 7px 10px; border: 1px solid #d4a72c66; border-radius: 7px; background: color-mix(in srgb, #fff8c5 28%, var(--bg-sidebar)); line-height: 1.2; overflow-x: auto; }
.browser-pinned-access[hidden] { display: none; }
.browser-pinned-access-head { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.browser-pinned-access-head strong { color: #7d4e00; }
.browser-pinned-access-list { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.browser-pinned-access-item { display: inline-flex; align-items: center; min-width: 0; max-width: min(420px, 38vw); border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.browser-pinned-access-link { display: inline-flex; align-items: center; min-width: 0; gap: 7px; padding: 9px 13px; color: var(--text); text-decoration: none; font-size: 16px; }
.browser-pinned-access-link:hover { color: var(--link); text-decoration: none; }
.browser-pinned-access-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-pinned-access-remove { width: 32px; height: 32px; margin-right: 3px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 19px; line-height: 1; }
.browser-pinned-access-remove:hover { background: var(--hover); color: var(--danger, #cf222e); }
html[data-theme="dark"] .browser-pinned-access { border-color: #d2992266; background: color-mix(in srgb, #3b2e12 42%, var(--bg-sidebar)); }
html[data-theme="dark"] .browser-pinned-access-head strong { color: #e3b341; }
.browser-pinned-preview { position: fixed; inset: 0; z-index: 1450; display: grid; place-items: center; padding: 5vh 5vw; background: rgba(27,31,36,.42); }
.browser-pinned-preview[hidden] { display: none; }
.browser-pinned-preview-panel { display: flex; flex-direction: column; width: min(90vw, 1100px); height: min(84vh, 820px); overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); box-shadow: 0 18px 60px rgba(27,31,36,.3); }
.browser-pinned-preview-head { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-sidebar); }
.browser-pinned-preview-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.browser-pinned-preview-close { width: 30px; height: 30px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 20px; line-height: 1; }
.browser-pinned-preview-close:hover { background: var(--hover); color: var(--text); }
.browser-pinned-preview-frame { flex: 1; width: 100%; overflow: auto; padding: 18px 22px; box-sizing: border-box; background: var(--bg); color: var(--text); }
html.pinned-preview-open, body.pinned-preview-open { overflow: hidden; }
@media (max-width: 700px) {
  .browser-pinned-preview { padding: 2vh 2vw; }
  .browser-pinned-preview-panel { width: 96vw; height: 92vh; border-radius: 8px; }
}
/* Standalone media preview owns the entire viewport; it must not inherit the
   document browser's sidebar offset or content padding. */
body.page-shell-media-preview { overflow: hidden; }
body.page-shell-media-preview .content { width: 100vw; max-width: none; margin-left: 0 !important; padding: 0 !important; }
.browser-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-sidebar); margin-bottom: 14px; }
.browser-toolbar button, .browser-toolbar select { height: 34px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); padding: 0 10px; font: inherit; cursor: pointer; }
.browser-toolbar button:hover, .browser-toolbar button.active { border-color: #8c959f; background: var(--hover); }

.browser-toolbar button.active { color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.browser-toolbar .view-buttons { display: flex; gap: 4px; }
.browser-toolbar .view-buttons button { width: 36px; padding: 0; font-size: 16px; }
.browser-toolbar .browser-mode-buttons { display: flex; gap: 4px; padding-right: 8px; border-right: 1px solid var(--border); }
.browser-toolbar .browser-mode-buttons button { white-space: nowrap; }
.browser-toolbar .icon-columns-control { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.browser-toolbar .icon-columns-control[hidden] { display: none !important; }
.browser-toolbar #browser-icon-columns { width: 62px; height: 34px; padding: 0 6px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; text-align: center; }
.browser-toolbar .video-hover-preview-control { display: inline-flex; align-items: center; gap: 6px; height: 34px;
  color: var(--text); font-size: 13px; white-space: nowrap; cursor: pointer; user-select: none; }
.browser-toolbar .video-hover-preview-control[hidden] { display: none !important; }
.video-hover-preview-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.video-hover-preview-switch { position: relative; width: 34px; height: 18px; flex: 0 0 34px; border-radius: 999px;
  background: #afb8c1; box-shadow: inset 0 0 0 1px rgba(27,31,36,.14); transition: background .15s ease; }
.video-hover-preview-switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(27,31,36,.28); transition: transform .15s ease; }
.video-hover-preview-control input:checked + .video-hover-preview-switch { background: var(--link); }
.video-hover-preview-control input:checked + .video-hover-preview-switch::after { transform: translateX(16px); }
.video-hover-preview-control input:focus-visible + .video-hover-preview-switch { outline: 2px solid var(--link); outline-offset: 2px; }
.browser-toolbar .toolbar-spacer { flex: 1; }
.browser-toolbar .browser-status { color: var(--text-muted); font-size: 12px; min-width: 78px; text-align: right; }
.browser-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.browser-container { min-height: 180px; }
.browser-empty, .browser-error, .browser-loading { display: grid; place-items: center; min-height: 180px;
  color: var(--text-muted); border: 1px dashed var(--border); border-radius: 9px; }
.browser-error { color: #d1242f; }
.content .browser-items { list-style: none; padding: 0; margin: 0; }
.content .browser-items > li { margin: 0; }
.browser-item { position: relative; min-width: 0; }
.compare-select { position: absolute; z-index: 4; left: 7px; top: 50%; display: none; width: 22px; height: 22px;
  place-items: center; transform: translateY(-50%); border: 1px solid var(--border); border-radius: 5px;
  background: rgba(255,255,255,.94); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
#file-browser.compare-selection-mode .compare-select { display: grid; }
#file-browser.video-playlist-selection-mode .video-playlist-select { display: grid; }
.compare-select input { width: 15px; height: 15px; margin: 0; accent-color: #0969da; cursor: pointer; }
#file-browser.compare-selection-mode .browser-item.compare-selected { background: #ddf4ff !important; outline: 1px solid #54aeff; outline-offset: -1px; }
#file-browser.video-playlist-selection-mode .browser-item.video-playlist-selected { background: #ddf4ff !important; outline: 1px solid #54aeff; outline-offset: -1px; }
.browser-item.locked-link { opacity: .58; }
.browser-item.locked-link .item-main { cursor: not-allowed; }
.browser-item a { color: var(--text); text-decoration: none; }
.browser-item a:hover { text-decoration: none; }
.browser-item .item-text { min-width: 0; }
.browser-item .item-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-item .item-album-path { display: block; overflow: hidden; margin-top: 2px; color: var(--text-muted);
  font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.browser-item .item-mobile-modified { display: none; }
.browser-item .item-thumb { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--code-bg);
  border: 1px solid var(--border); border-radius: 7px; color: var(--text-muted); }
.browser-item .item-thumb > * { grid-area: 1 / 1; }
.browser-item .item-thumb .item-placeholder { font-size: 26px; opacity: .65; }
.browser-item .item-thumb.loaded .item-placeholder { visibility: hidden; }
.browser-item .item-thumb img, .browser-item .item-thumb video {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.browser-item .item-thumb .hover-video-preview { z-index: 1; opacity: 0; background: #000; pointer-events: none;
  transition: opacity .08s linear; }
.browser-item .item-thumb .hover-video-preview.is-playing { opacity: 1; }
.browser-item .item-thumb.hover-previewing .video-type-badge { opacity: 0; }
.video-type-badge { display: grid; position: absolute; right: 2px; bottom: 2px; z-index: 2; width: 20px; height: 20px;
  place-items: center; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font-size: 8px; line-height: 1; }
.browser-items.view-list .video-type-badge, .browser-items.view-details .video-type-badge { width: 15px; height: 15px; }
.browser-items.view-icons .video-type-badge { width: clamp(14px, 16%, 24px); height: auto; aspect-ratio: 1;
  font-size: clamp(7px, 1vw, 11px); right: 3px; bottom: 3px; }
.browser-item .item-symbol { font-size: 30px; line-height: 1; }
.browser-item .item-actions { display: flex; gap: 5px; }
.browser-item.privacy-hidden .item-thumb { overflow: hidden; }
.browser-item.privacy-hidden .item-thumb > img,
.browser-item.privacy-hidden .item-thumb > video,
.browser-item.privacy-hidden .item-thumb > .item-symbol,
.browser-item.privacy-hidden .item-thumb > .item-placeholder { filter: blur(12px); transform: scale(1.08); }
.privacy-badge { position: absolute; left: 5px; bottom: 5px; z-index: 4; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 99px; background: rgba(27,31,36,.76); color: #fff; font-size: 11px; box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.folder-privacy-toggle { position: relative; display: inline-flex; flex: 0 0 38px; box-sizing: border-box; width: 38px; min-width: 38px; height: 38px; aspect-ratio: 1; padding: 0; border: 1px solid #8c959f99 !important;
  border-radius: 8px; color: #57606a !important; background: #fff !important; cursor: pointer; font-size: 0; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.folder-privacy-toggle::before { position: absolute; content: ""; left: 11px; top: 16px; width: 12px; height: 10px;
  border: 2px solid currentColor; border-radius: 3px; background: transparent; }
.folder-privacy-toggle::after { position: absolute; content: ""; left: 16px; top: 8px; width: 8px; height: 9px;
  box-sizing: border-box; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; transition: transform .16s, left .16s; }
.folder-privacy-toggle:not([aria-pressed="true"]):hover { color: #0969da !important; border-color: #0969da !important; background: #f6f8ff !important; }
.folder-privacy-toggle:not([aria-pressed="true"])::after { transform: rotate(24deg); transform-origin: 0 9px; }
.folder-privacy-toggle[aria-pressed="true"] { color: #6639ba !important; background: #e9ddff !important; border-color: #8250df !important; box-shadow: inset 0 0 0 1px #8250df22; }
.folder-privacy-toggle[aria-pressed="true"]::before { background: #8250df; border-color: #8250df; }
.folder-privacy-toggle[aria-pressed="true"]::after { left: 13px; transform: none; }
.folder-privacy-toggle.inherited { color: #6e7781 !important; border-color: #afb8c1 !important; background: #eaeef2 !important; box-shadow: none; opacity: 1; cursor: not-allowed; }
.folder-privacy-toggle.inherited::before { background: #6e7781; border-color: #6e7781; }
.folder-privacy-toggle.inherited::after { left: 13px; transform: none; }
.folder-privacy-toggle:focus-visible { outline: 2px solid #0969da; outline-offset: 2px; }
.privacy-context-menu { position: fixed; z-index: 120; min-width: 190px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: 0 10px 30px rgba(27,31,36,.24); }
.privacy-context-menu[hidden] { display: none !important; }
.privacy-context-menu button { display: block; width: 100%; min-height: 34px; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.privacy-context-menu button:hover:not(:disabled) { background: var(--hover); color: var(--link); }
.privacy-context-menu button:disabled { color: var(--text-muted); cursor: default; }
.browser-item.selection-selected { background: #ddf4ff !important; outline: 1px solid #54aeff; outline-offset: -1px; }
.browser-items.selection-dragging, .browser-items.selection-dragging * { cursor: crosshair !important; user-select: none !important; }
.browser-selection-box { position: fixed; z-index: 1190; pointer-events: none; border: 1px solid #2f81f7; background: rgba(47,129,247,.16); }
.browser-context-menu { position: fixed; z-index: 1300; min-width: 190px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: 0 10px 30px rgba(27,31,36,.24); }
.browser-context-menu[hidden] { display: none !important; }
.browser-context-menu button { display: block; width: 100%; min-height: 34px; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.browser-context-menu button:hover:not(:disabled) { background: var(--hover); color: var(--link); }
.browser-context-menu button:disabled { color: var(--text-muted); cursor: default; }
html[data-theme="dark"] .browser-item.selection-selected { background: #12253b !important; outline-color: #58a6ff; }
.browser-item .download-link { color: var(--link); padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.browser-item .download-link:hover { background: var(--hover); }
.browser-items.view-list .browser-item { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 4px 8px;
  border-bottom: 1px solid var(--border); content-visibility: auto; contain-intrinsic-size: 38px; }
.browser-items.view-list .browser-item:hover, .browser-items.view-details .browser-item:hover { background: var(--hover); }
.browser-items.view-list .item-main { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
#file-browser.compare-selection-mode .browser-items.view-list .browser-item.has-compare-select .item-main,
#file-browser.compare-selection-mode .browser-items.view-details .browser-item.has-compare-select .item-main { padding-left: 27px; }
.browser-items.view-list .item-thumb { width: 28px; height: 28px; flex: 0 0 28px; border: 0; background: transparent; }
.browser-items.view-list .item-symbol { font-size: 20px; }
.browser-items.view-list .item-meta { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.details-head, .browser-items.view-details .browser-item { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 100px 100px 58px;
  align-items: center; gap: 12px; min-height: 40px; padding: 4px 10px; border-bottom: 1px solid var(--border); }
.details-head { color: var(--text-muted); font-size: 12px; font-weight: 600; background: var(--bg-sidebar); border: 1px solid var(--border); }
.browser-items.view-details .item-main { display: flex; align-items: center; min-width: 0; gap: 9px; }
.browser-items.view-details .browser-item { content-visibility: auto; contain-intrinsic-size: 40px; }
.browser-items.view-details .item-thumb { width: 28px; height: 28px; flex: 0 0 28px; border: 0; background: transparent; }
.browser-items.view-details .item-symbol { font-size: 20px; }
.browser-items.view-details .item-meta { display: contents; color: var(--text-muted); font-size: 12px; }
.browser-items.view-icons { display: grid; align-items: start; gap: 7px;
  grid-template-columns: repeat(var(--icon-columns, 6), minmax(0, 1fr)); }
.browser-items.view-icons .browser-item {
  position: relative; padding: 4px; border: 1px solid transparent; border-radius: 7px; text-align: center;
  container-type: inline-size; content-visibility: auto; contain-intrinsic-size: 160px; }
.browser-items.view-icons .browser-item:hover { background: var(--hover); border-color: var(--border); }
#file-browser.compare-selection-mode .browser-items.view-icons .compare-select { top: 10px; transform: none; }
.browser-items.view-icons .item-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.browser-items.view-icons .item-symbol, .browser-items.view-icons .item-placeholder {
  font-size: clamp(20px, 28cqi, 72px); }
.browser-items.view-icons .item-main { display: block; min-width: 0; }
.browser-items.view-icons .item-name {
  display: block; width: 100%; margin-top: 7px; font-size: 13px; }
.browser-items.view-icons .item-meta { display: none; }
.browser-items.view-icons .item-actions {
  position: absolute; right: 7px; top: 7px; opacity: 0; transition: opacity .12s; }
.browser-items.view-icons .browser-item:hover .item-actions { opacity: 1; }
.browser-items.view-icons .download-link {
  background: rgba(255,255,255,.94); border: 1px solid var(--border); }
.browser-sentinel { grid-column: 1 / -1; height: 1px; list-style: none; }
.markdown-document { width: 100%; min-width: 0; max-width: none; overflow-wrap: anywhere; }
.markdown-document > h1:first-child { display: none; }
.markdown-source { margin: 0; max-width: 100%; min-height: 180px; white-space: pre; tab-size: 4; }
.markdown-source code { display: block; min-width: max-content; }
.json-viewer { max-width: 100%; min-height: 180px; overflow: auto; border: 1px solid var(--border);
  border-radius: 9px; background: #f8fafc; color: #24292f; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6; tab-size: 2; }
.content .json-lines { min-width: max-content; margin: 0; padding: 10px 0; counter-reset: json-line; list-style: none; }
.json-lines > .json-line { margin: 0; }
.json-line { display: grid; grid-template-columns: 3.2em minmax(max-content, 1fr); min-height: 1.6em; counter-increment: json-line; }
.json-line::before { content: counter(json-line); position: sticky; left: 0; z-index: 1; padding: 0 7px 0 4px;
  background: #eef1f4; color: #8c959f; text-align: right; user-select: none; }
.json-line:hover { background: transparent; }
.json-line:hover::before { background: #eef1f4; }
.json-line code { display: block; padding: 0 14px; background: transparent; color: inherit; font-size: inherit; line-height: inherit; white-space: pre; }
.json-key { color: #0550ae; font-weight: 600; }
.json-string { color: #0a7d33; }
.json-number { color: #953800; }
.json-literal { color: #8250df; font-weight: 600; }
.json-punctuation { color: #57606a; }
.content .json-viewer-large { margin: 0; padding: 14px 16px; white-space: pre; min-width: max-content; background: transparent; border: 0; }
.text-preview-warning { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid #d29922; background: #fff8c5; color: #633c01; }
.text-preview-notice { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-sidebar); }
.text-preview-notice p { margin: 0 0 8px; }
.text-preview-notice p:last-child { margin-bottom: 0; }
.privacy-document-guard { position: relative; min-height: min(52vh, 520px); overflow: hidden; border-radius: 9px; }
.privacy-document-guard.is-locked .privacy-document-content { filter: blur(18px); user-select: none; pointer-events: none; }
.privacy-document-content { min-height: inherit; transition: filter .18s ease; }
.markdown-document .privacy-document-content > h1:first-child { display: none; }
.privacy-document-lock { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(246,248,250,.38); backdrop-filter: blur(2px); }
.privacy-document-lock-card { max-width: 340px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,.94); color: var(--text); box-shadow: 0 12px 36px rgba(31,35,40,.18); text-align: center; }
.privacy-document-lock-card strong { display: block; margin-bottom: 5px; font-size: 16px; }
.privacy-document-lock-card p { margin: 0 0 12px; color: var(--text-muted); font-size: 12px; }
.privacy-unlock-button { min-height: 34px; padding: 5px 14px; border: 1px solid #8250df; border-radius: 7px;
  background: #8250df; color: #fff; font: inherit; cursor: pointer; }

.workspace-nav { margin: 0 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: hidden; }
.workspace-nav-title { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 6px 8px 6px 11px;
  border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .35px; }
.workspace-nav-title a { padding: 3px 6px; border-radius: 5px; color: var(--link); font-size: 12px; font-weight: 500; text-decoration: none; }
.workspace-nav-title a:hover { background: var(--hover); text-decoration: none; }
.workspace-nav-list, .workspace-nav-folders { list-style: none; margin: 0; padding: 0; }
.workspace-nav-list { max-height: 38vh; overflow-y: auto; padding: 4px; }
.workspace-nav-item + .workspace-nav-item { margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--border); }
.workspace-nav-link, .workspace-nav-folder { display: flex; align-items: center; min-width: 0; color: var(--text); text-decoration: none; }
.workspace-nav-link { gap: 9px; min-height: 38px; padding: 7px 8px; border-radius: 6px; font-size: 14px; font-weight: 650; }
.workspace-nav-link:hover, .workspace-nav-folder:hover { background: var(--hover); text-decoration: none; }
.workspace-nav-icon { position: relative; flex: 0 0 17px; width: 17px; height: 14px; border: 1.5px solid #8250df;
  border-radius: 3px; background: #f6f2ff; isolation: isolate; }
.workspace-nav-icon::before { position: absolute; content: ""; z-index: -1; width: 13px; height: 10px; left: 4px; top: -4px;
  border: 1.5px solid #a475e8; border-radius: 3px; background: var(--bg); }
.workspace-nav-name, .workspace-nav-folder-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-nav-folders { margin: 0 5px 3px 15px; padding: 1px 0 2px 9px; border-left: 1px solid var(--border); }
.workspace-nav-folder { gap: 8px; min-height: 34px; padding: 6px 7px; border-radius: 6px; color: var(--text-muted); font-size: 13px; line-height: 1.35; }
.workspace-nav-folder:hover { color: var(--text); }
.workspace-nav-folder-icon { position: relative; flex: 0 0 16px; width: 16px; height: 12px; margin-top: 2px;
  border: 1px solid #bf8700; border-radius: 2px; background: #ffd76a; }
.workspace-nav-folder-icon::before { position: absolute; content: ""; width: 7px; height: 3px; left: 1px; top: -4px;
  border: 1px solid #bf8700; border-bottom: 0; border-radius: 2px 2px 0 0; background: #ffd76a; }
.workspace-nav-lock-icon { flex: 0 0 16px; width: 16px; color: var(--text-muted); font-size: 13px; line-height: 1; text-align: center; }
.workspace-nav-more .workspace-nav-folder-icon { border: 0; background: transparent; }
.workspace-nav-more .workspace-nav-folder-icon::before { content: "•••"; width: auto; height: auto; left: 0; top: -5px;
  border: 0; background: transparent; color: var(--text-muted); font-size: 11px; letter-spacing: 1px; }
.workspace-nav-folder.unavailable { opacity: .6; cursor: not-allowed; }
.workspace-nav-empty { padding: 6px 9px 9px; color: var(--text-muted); font-size: 12px; }
.folder-workspace-add { height: 36px; padding: 0 10px; border: 1px solid #8250df66; border-radius: 7px; background: #f6f2ff;
  color: #6639ba; font: inherit; cursor: pointer; white-space: nowrap; }
.folder-workspace-add:hover { background: #ede3ff; border-color: #8250df; }
.workspace-home { margin: 0 0 24px; padding: 14px; border: 1px solid #8250df44; border-radius: 11px; background: #faf8ff; }
.workspace-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.workspace-section-header h2, .apps-home > h2 { margin: 0; padding: 0; border: 0; font-size: 17px; }
.workspace-section-header button, .workspace-page-actions button, .workspace-folder-manage button { min-height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.workspace-section-header button { border-color: #8250df77; color: #6639ba; }
.workspace-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.workspace-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid #8250df44;
  border-radius: 9px; background: var(--bg); color: var(--text); text-decoration: none;
  content-visibility: auto; contain-intrinsic-size: 62px; }
.workspace-card:hover { border-color: #8250df; background: #f6f2ff; text-decoration: none; }
.workspace-card-icon { flex: 0 0 auto; color: #8250df; font-size: 22px; }
.workspace-card-body { min-width: 0; }
.workspace-card-title { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card-meta { margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.workspace-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); text-align: center; }
.apps-home > h2 { margin-bottom: 10px; }
.apps-home .app-cards { margin-top: 0; }
.workspace-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.workspace-page-header h1 { margin: 6px 0 0; padding: 0; border: 0; font-size: 22px; }
.workspace-page-header .browser-breadcrumb { margin: 0; }
.workspace-page-actions { display: flex; gap: 7px; }
.workspace-page-actions .danger, .workspace-folder-manage .danger { color: #cf222e; }
.workspace-folder-list { --icon-columns: 6; }
.workspace-folder-list .browser-item { content-visibility: auto; contain-intrinsic-size: 180px; }
.workspace-folder-list .item-mobile-modified { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; }
.workspace-folder-list .locked-link .item-main { display: block; cursor: pointer; }
.workspace-folder-manage { display: inline-flex; gap: 6px; }
.workspace-folder-manage button { border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text);
  font: inherit; cursor: pointer; white-space: nowrap; }
.workspace-modal[hidden] { display: none !important; }
.workspace-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(0,0,0,.48); }
.workspace-modal-panel { width: min(440px, 100%); max-height: 90vh; overflow-y: auto; padding: 18px; border: 1px solid var(--border);
  border-radius: 11px; background: var(--bg); box-shadow: 0 18px 60px rgba(0,0,0,.3); }
.workspace-modal-panel h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 18px; }
.workspace-modal-panel label { display: block; margin: 10px 0 5px; font-size: 13px; font-weight: 600; }
.workspace-modal-panel input[type="text"], .workspace-modal-panel select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; }
.workspace-modal-modes { display: flex; gap: 12px; margin-bottom: 8px; }
.workspace-modal-modes label { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: 500; }
.workspace-modal-error { min-height: 18px; margin-top: 8px; color: #cf222e; font-size: 12px; }
.workspace-modal-note { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
.workspace-modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.workspace-modal-actions button { min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.workspace-modal-actions .primary { border-color: #8250df; background: #8250df; color: #fff; }
.workspace-modal-actions .danger { border-color: #cf222e; background: #cf222e; color: #fff; }
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.app-card { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 20px; text-decoration: none; color: var(--text); transition: box-shadow .15s; }
.app-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.app-card .card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.app-card .card-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.app-card .card-meta { color: var(--text-muted); font-size: 12px; }
.sidebar-toggle { position: fixed; top: 50%; left: 0; width: 30px; height: 56px; transform: translateY(-50%);
  z-index: 20; background: var(--bg); border: 1px solid var(--border); border-left: 0;
  cursor: pointer; font-size: 17px; color: var(--text-muted); display: flex; align-items: center;
  justify-content: center; border-radius: 0 8px 8px 0; box-shadow: 0 2px 8px rgba(31,35,40,.12); }
.sidebar-toggle:hover { background: var(--hover); color: var(--link); border-color: #8c959f; }
body:not(.sidebar-collapsed) .sidebar-toggle { left: var(--sidebar-w); width: 24px; border-right: 1px solid var(--border); border-left: 0; }
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .content { margin-left: 30px; max-width: calc(100vw - 30px); }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); }
.sidebar-footer { position: relative; gap: 5px; flex-wrap: nowrap; }
.sidebar-footer a { color: var(--text-muted); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.sidebar-footer a:hover { background: var(--hover); color: #d1242f; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; min-height: 30px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12px; }
.theme-toggle:hover { background: var(--hover); color: var(--text); }
.theme-toggle-icon { font-size: 16px; line-height: 1; }
.login-theme-toggle { position: fixed; top: 14px; right: 14px; z-index: 2; }

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html[data-theme="dark"] select, html[data-theme="dark"] textarea { background-color: var(--bg); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .header-tool-group-tools { border-color: #a371f755; background: #211a2e; }
html[data-theme="dark"] .header-tool-group-context { border-color: #58a6ff55; background: #12253b; }
html[data-theme="dark"] .header-tool-group-page { border-color: #d2992255; background: #2a2617; }
html[data-theme="dark"] .app-item-icon { color: #8b949e; }
html[data-theme="dark"] .app-item.active .app-item-icon { color: #58a6ff; }
html[data-theme="dark"] .workspace-memo-toggle, html[data-theme="dark"] .comfyui-top-toggle,
html[data-theme="dark"] .comfyui-sidebar-toggle { background: #211a2e; color: #d2a8ff; }
html[data-theme="dark"] .workspace-memo-toggle:hover, html[data-theme="dark"] .workspace-memo-toggle[aria-expanded="true"],
html[data-theme="dark"] .comfyui-top-toggle:hover, html[data-theme="dark"] .comfyui-top-toggle[aria-expanded="true"],
html[data-theme="dark"] .comfyui-sidebar-toggle:hover, html[data-theme="dark"] .comfyui-sidebar-toggle[aria-expanded="true"] { background: #2d2142; }
html[data-theme="dark"] .workspace-memo-mount { background: #12261b; color: #7ee787; }
html[data-theme="dark"] .workspace-memo-mount:hover { background: #193b25; }
html[data-theme="dark"] .recent-access-toggle { background: #12253b; color: #79c0ff; }
html[data-theme="dark"] .recent-access-toggle:hover, html[data-theme="dark"] .recent-access-toggle[aria-expanded="true"] { background: #1f3a5f; }
html[data-theme="dark"] .quick-access-badge { border-color: #d2992266; background: #3b2e12; color: #e3b341; }
html[data-theme="dark"] .quick-access-remove:hover, html[data-theme="dark"] .sidebar-footer a:hover,
html[data-theme="dark"] .workspace-memo-delete, html[data-theme="dark"] .workspace-memo-delete-item-action,
html[data-theme="dark"] .workspace-page-actions .danger, html[data-theme="dark"] .workspace-folder-manage .danger,
html[data-theme="dark"] .workspace-modal-error, html[data-theme="dark"] .browser-error { color: #ff7b72; }
html[data-theme="dark"] .workspace-memo-delete:hover, html[data-theme="dark"] .workspace-memo-delete-item:hover { border-color: #f8514966; background: #3d1719; }
html[data-theme="dark"] .workspace-home { border-color: #a371f755; background: #161b22; }
html[data-theme="dark"] .workspace-card:hover { background: #211a2e; }
html[data-theme="dark"] .workspace-section-header button, html[data-theme="dark"] .folder-workspace-add {
  border-color: #a371f766; background: #211a2e; color: #d2a8ff;
}
html[data-theme="dark"] .workspace-section-header button:hover, html[data-theme="dark"] .folder-workspace-add:hover {
  border-color: #a371f7; background: #2d2142;
}
html[data-theme="dark"] .workspace-nav-icon { border-color: #a371f7; background: #2d2142; }
html[data-theme="dark"] .workspace-nav-icon::before { border-color: #d2a8ff; background: #161b22; }
html[data-theme="dark"] .workspace-nav-folder-icon,
html[data-theme="dark"] .workspace-nav-folder-icon::before { border-color: #d29922; background: #3b2e12; }
html[data-theme="dark"] .workspace-nav-more .workspace-nav-folder-icon,
html[data-theme="dark"] .workspace-nav-more .workspace-nav-folder-icon::before { border-color: transparent; background: transparent; }
html[data-theme="dark"] .login-error { border-color: #f8514966; background: #3d1719; color: #ff7b72; }
html[data-theme="dark"] .md-canvas-tool-launch { border-color: #d2992266; background: #3b2e12; color: #e3b341; }
html[data-theme="dark"] .md-canvas-tool-launch:hover,
html[data-theme="dark"] .md-canvas-tool-launch[aria-expanded="true"] { border-color: #e3b341; background: #4b390f; color: #f2cc60; }
html[data-theme="dark"] .folder-shortcut-toggle:hover,
html[data-theme="dark"] .folder-shortcut-toggle[aria-pressed="true"],
html[data-theme="dark"] .browser-quick-access-link:hover { border-color: #d29922; background: #3b2e12; color: #e3b341; }
html[data-theme="dark"] .folder-privacy-toggle { border-color: #6e7681 !important; background: #161b22 !important; color: #8b949e !important; }
html[data-theme="dark"] .folder-privacy-toggle:not([aria-pressed="true"]):hover { border-color: #58a6ff !important; background: #12253b !important; color: #79c0ff !important; }
html[data-theme="dark"] .folder-privacy-toggle[aria-pressed="true"] { border-color: #a371f7 !important; background: #2d2142 !important; color: #d2a8ff !important; }
html[data-theme="dark"] .folder-privacy-toggle[aria-pressed="true"]::before { border-color: #a371f7; background: #a371f7; }
html[data-theme="dark"] .folder-privacy-toggle.inherited { border-color: #484f58 !important; background: #21262d !important; color: #6e7681 !important; }
html[data-theme="dark"] .folder-privacy-toggle.inherited::before { border-color: #6e7681; background: #6e7681; }
html[data-theme="dark"] .compare-select { border-color: #6e7681; background: rgba(22,27,34,.96); }
html[data-theme="dark"] #file-browser.compare-selection-mode .browser-item.compare-selected { background: #12253b !important; outline-color: #58a6ff; }
html[data-theme="dark"] .browser-items.view-icons .download-link { background: rgba(22,27,34,.96); }
html[data-theme="dark"] .json-viewer { background: #0d1117; color: #c9d1d9; }
html[data-theme="dark"] .json-line::before,
html[data-theme="dark"] .json-line:hover::before { background: #161b22; color: #6e7681; }
html[data-theme="dark"] .json-key { color: #79c0ff; }
html[data-theme="dark"] .json-string { color: #7ee787; }
html[data-theme="dark"] .json-number { color: #ffa657; }
html[data-theme="dark"] .json-literal { color: #d2a8ff; }
html[data-theme="dark"] .json-punctuation { color: #8b949e; }
html[data-theme="dark"] .text-preview-warning { border-left-color: #d29922; background: #3b2e12; color: #e3b341; }
html[data-theme="dark"] .privacy-document-lock { background: rgba(13,17,23,.48); }
html[data-theme="dark"] .privacy-document-lock-card { background: rgba(22,27,34,.96); box-shadow: 0 12px 36px rgba(0,0,0,.42); }
html[data-theme="dark"] .comfyui-panel-subtitle { background: #12261b; color: #7ee787; }
html[data-theme="dark"] .comfyui-instance-tab.active { border-color: #a371f7; background: #2d2142; color: #d2a8ff; }
html[data-theme="dark"] .comfyui-online { color: #7ee787; }
html[data-theme="dark"] .comfyui-offline { color: #ff7b72; }
html[data-theme="dark"] .comfyui-live-warn { color: #e3b341; }
html[data-theme="dark"] .comfyui-state-badge { background: #12253b; color: #79c0ff; }
html[data-theme="dark"] .comfyui-state-badge[data-state="success"] { background: #12261b; color: #7ee787; }
html[data-theme="dark"] .comfyui-state-badge[data-state="error"],
html[data-theme="dark"] .comfyui-state-badge[data-state="failed"] { background: #3d1719; color: #ff7b72; }
html[data-theme="dark"] .comfyui-state-badge[data-state="pending"] { background: #3b2e12; color: #e3b341; }
html[data-theme="dark"] .comfyui-progress { background: #30363d; }
html[data-theme="dark"] .comfyui-error-list { border-color: #f8514966; background: #3d1719; color: #ff7b72; }
html[data-theme="dark"] .hljs { color: #c9d1d9; background: #161b22; }
html[data-theme="dark"] .hljs-comment, html[data-theme="dark"] .hljs-quote { color: #8b949e; }
html[data-theme="dark"] .hljs-keyword, html[data-theme="dark"] .hljs-selector-tag,
html[data-theme="dark"] .hljs-literal, html[data-theme="dark"] .hljs-section { color: #ff7b72; }
html[data-theme="dark"] .hljs-string, html[data-theme="dark"] .hljs-title,
html[data-theme="dark"] .hljs-name, html[data-theme="dark"] .hljs-type { color: #a5d6ff; }
html[data-theme="dark"] .hljs-number, html[data-theme="dark"] .hljs-symbol,
html[data-theme="dark"] .hljs-bullet, html[data-theme="dark"] .hljs-variable { color: #79c0ff; }
html[data-theme="dark"] .hljs-built_in, html[data-theme="dark"] .hljs-attribute { color: #ffa657; }
html[data-theme="dark"] .hljs-meta, html[data-theme="dark"] .hljs-selector-attr,
html[data-theme="dark"] .hljs-selector-pseudo { color: #d2a8ff; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 99; }
body.sidebar-open .sidebar-overlay { display: block; }
@media (max-width: 768px), (max-width: 950px) and (max-height: 520px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body.sidebar-open { height: 100dvh; overflow: hidden; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: min(85vw, 300px); min-width: 0; max-width: 300px;
    height: 100vh; height: 100dvh; top: 0; bottom: auto; z-index: 100; overflow-x: hidden; overflow-y: scroll;
    padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom));
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-gutter: stable; }
  .sidebar > * { flex-shrink: 0; }
  .sidebar .comfyui-sidebar-entry { margin-top: 0; }
  .theme-toggle-label { display: none; }
  .sidebar .workspace-nav-list, .sidebar .workspace-nav-folders, .sidebar .quick-access-list, .sidebar .app-switcher {
    max-height: none; overflow: visible; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0 !important; max-width: 100vw !important; padding: 62px 12px 16px !important; }
  .sidebar-toggle { left: 10px !important; top: 10px; transform: none; width: auto; height: auto; border-radius: 6px; padding: 6px 10px; font-size: 18px; z-index: 101; border: 1px solid var(--border); }
  body.sidebar-open .sidebar-toggle { left: min(calc(85vw - 48px), 252px) !important; }
  body.sidebar-open .sidebar-title { min-height: 40px; padding-right: 52px; }
  .content h1 { font-size: 1.5em; }
  .quick-access-remove { opacity: 1; }
  .workspace-nav, .quick-access, .app-nav { margin-left: 8px; margin-right: 8px; }
  .workspace-nav-link { min-height: 44px; font-size: 15px; }
  .workspace-nav-folder { min-height: 40px; font-size: 14px; }
  .app-switcher .app-item, .quick-access-link { min-height: 42px; font-size: 14px; }
  .browser-header { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 7px; margin-bottom: 8px; }
  .browser-header h1 { display: none; }
  .browser-header-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
  .header-tool-group { min-height: 38px; max-width: 100%; flex-wrap: wrap; }
  .markdown-page .browser-header { align-items: stretch; justify-content: flex-start; gap: 7px; }
  .markdown-page .browser-header h1 { display: block; margin: 0; padding-bottom: 2px; font-size: 1.05em; line-height: 1.3; }
  .markdown-document { max-width: 100%; overflow-x: hidden; }
  .markdown-document pre, .markdown-source { max-width: 100%; overflow-x: hidden; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  .markdown-source code { min-width: 0; }
  .browser-breadcrumb { align-items: flex-start; gap: 4px; margin-bottom: 12px; }
  .breadcrumb-items { flex-basis: 100%; gap: 4px; }
  .browser-breadcrumb.show-absolute-path .absolute-path-prefix { flex: 1 1 calc(100% - 20px); }
  .json-viewer { font-size: 12px; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
  .json-lines { padding: 7px 0; }
  .json-line { grid-template-columns: 2.9em minmax(max-content, 1fr); }
  .json-line::before { padding: 0 5px 0 3px; }
  .json-line code { padding: 0 10px; }
  .json-viewer .json-viewer-large { overflow: visible; white-space: pre; overflow-wrap: normal; word-break: normal; }
  .markdown-document table { display: table; width: 100%; max-width: 100%; table-layout: fixed; overflow: visible; }
  .markdown-document th, .markdown-document td { overflow-wrap: anywhere; word-break: break-word; }
  .markdown-document img, .markdown-document video, .markdown-document svg { max-width: 100%; height: auto; }
  .folder-shortcut-toggle { width: 36px; padding: 0; font-size: 0; }
  .folder-shortcut-toggle::before { content: "☆"; font-size: 18px; }
  .folder-shortcut-toggle[aria-pressed="true"]::before { content: "★"; }
  .folder-workspace-add { width: 36px; padding: 0; font-size: 0; }
  .folder-workspace-add::before { content: "🗂️"; font-size: 17px; }
  .workspace-home { padding: 10px; }
  .workspace-cards { grid-template-columns: 1fr; }
  .workspace-folder-list { --icon-columns: 3; }
  .workspace-folder-list .browser-item { contain-intrinsic-size: 132px; }
  .workspace-page-header { flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .workspace-page-header h1 { margin-top: 2px; font-size: 18px; line-height: 1.3; }
  .workspace-page-actions { width: 100%; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 5px; }
  .workspace-page-actions > button { flex: 1 1 108px; min-width: 0; min-height: 40px; padding: 0 8px; }
  .workspace-page-actions .md-canvas-tool-anchor, .workspace-page-actions .recent-access-anchor { flex: 0 0 40px; }
  .workspace-page-actions .md-canvas-tool-launch, .workspace-page-actions .recent-access-toggle {
    flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; font-size: 0; }
  .workspace-memo-popover { left: 12px; top: 50%; right: 12px; transform: translateY(-50%); width: auto; height: 84vh; min-width: 0; max-height: 88vh; resize: none; }
  .workspace-memo-toggle { width: 36px; padding: 0; font-size: 0; }
  .workspace-memo-toggle::before { content: "🗒"; font-size: 17px; }
  .recent-access-popover { left: 12px; top: 50%; right: 12px; transform: translateY(-50%); width: auto; height: 72vh; min-width: 0; max-height: 88vh; resize: none; }
  .recent-access-toggle { width: 36px; padding: 0; font-size: 0; }
  .recent-access-toggle::before { content: "◷"; font-size: 17px; }
  .comfyui-top-toggle { width: 36px; padding: 0; justify-content: center; font-size: 0; }
  .comfyui-top-toggle::before { content: "◉"; font-size: 16px; }
  .comfyui-status-panel { left: 6px; right: 6px; top: 6px; transform: none; width: auto; height: calc(100dvh - 12px);
    min-width: 0; min-height: 360px; max-width: none; max-height: none; padding: 9px; resize: none; }
  .comfyui-panel-head { align-items: flex-start; }
  .comfyui-panel-actions { gap: 3px; }
  .comfyui-panel-actions button { padding: 0 6px; }
  .comfyui-auto-refresh { font-size: 0; }
  .comfyui-auto-refresh input { width: 18px; height: 18px; }
  .comfyui-refresh-interval { gap: 2px; font-size: 11px; }
  .comfyui-refresh-interval input { width: 40px; padding: 2px; }
  .comfyui-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comfyui-task-node { display: none; }
  .comfyui-task-grid { grid-template-columns: 1fr; }
  .md-canvas-tool-launch { width: 36px; padding: 0; font-size: 0; }
  .md-canvas-tool-launch::before { content: "✎"; font-size: 18px; }
  .browser-back-to-top { right: 12px; bottom: 16px; width: 42px; height: 42px; }
  .workspace-modal { align-items: flex-end; padding: 8px; }
  .workspace-modal-panel { padding: 14px; }
  .browser-quick-access-list { grid-template-columns: 1fr; }
  .browser-toolbar .toolbar-spacer { display: none; }
  .browser-toolbar .browser-status { width: 100%; text-align: left; }
  .details-head { display: none; }
  .browser-items.view-list .browser-item, .browser-items.view-details .browser-item {
    display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 6px 8px; contain-intrinsic-size: 58px; }
  .browser-items.view-list .item-main, .browser-items.view-details .item-main {
    display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; -webkit-touch-callout: none; }
  .browser-items.view-list .item-thumb, .browser-items.view-details .item-thumb {
    width: 38px; height: 38px; flex: 0 0 38px; }
  .browser-items.view-list .item-thumb.media-thumb, .browser-items.view-details .item-thumb.media-thumb {
    border: 1px solid var(--border); border-radius: 5px; background: var(--code-bg); }
  .browser-items.view-list .item-text, .browser-items.view-details .item-text {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .browser-items.view-list .item-name, .browser-items.view-details .item-name {
    display: block; overflow-x: auto; overflow-y: hidden; text-overflow: clip; white-space: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; -webkit-touch-callout: none; user-select: none; }
  .browser-items.view-list .item-name::-webkit-scrollbar, .browser-items.view-details .item-name::-webkit-scrollbar { display: none; }
  .browser-items.view-list .item-mobile-modified, .browser-items.view-details .item-mobile-modified {
    display: block; color: var(--text-muted); font-size: 11px; line-height: 1.25; white-space: nowrap; }
  .browser-items.view-list .item-meta, .browser-items.view-details .item-meta { display: none; }
  .browser-items.view-icons { gap: 4px; }
  .browser-items.view-icons .browser-item { padding: 2px; }
  .browser-items.view-icons .item-name {
    display: -webkit-box; min-height: 2.7em; line-height: 1.35; white-space: normal; overflow: hidden;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .browser-items.view-icons .item-actions { opacity: 1; top: 4px; right: 4px; }
  .browser-items.view-icons .download-link {
    padding: 2px 6px; }
  .preview-toolbar { min-height: 36px; gap: 3px; padding: 2px 4px; overflow-x: auto; }
  .preview-stage, .compare-stage { scrollbar-width: none; }
  .preview-stage::-webkit-scrollbar, .compare-stage::-webkit-scrollbar { display: none; }
  .preview-toolbar button, .preview-toolbar a { min-width: 28px; height: 28px; padding: 0 5px; font-size: 0; }
  .preview-toolbar button::before, .preview-toolbar a::before { font-size: 17px; line-height: 1; }
  #preview-back::before { content: "←"; }
  #preview-zoom-out::before { content: "−"; }
  #preview-zoom-in::before { content: "+"; }
  #preview-zoom-reset::before { content: "⊡"; }
  #preview-landscape::before { content: "↔"; }
  #preview-loop::before { content: "↻"; }
  #preview-metadata::before { content: "ⓘ"; }
  #preview-canvas-tool::before { content: "✎"; }
  #preview-export-frame::before { content: "▣"; }
  #preview-frame-prev::before { content: "◀"; }
  #preview-frame-next::before { content: "▶"; }
  #preview-export-audio::before { content: "♫"; }
  #preview-export-clip::before { content: "✂"; }
  #preview-download::before { content: "⬇"; }
  .preview-title { order: 0; flex: 1 1 36px; padding: 0 1px; font-size: 11px; }
  .preview-zoom-value { flex-basis: 36px; width: 36px; font-size: 9px; }
  .preview-frame-controls { gap: 2px; }
  .preview-frame-step-label { font-size: 0; gap: 2px; }
  .preview-frame-step-label::before { content: "帧"; font-size: 10px; }
  .preview-frame-step { width: 38px; height: 24px; font-size: 11px; }
  .preview-media { max-width: 100vw; max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); }
  .preview-edge-message { bottom: 10px; font-size: 11px; }
  .metadata-panel { top: 36px; left: 0; right: 0; width: auto; border-left: 0; }
  .compare-toolbar { min-height: 36px; padding: 2px 4px; gap: 3px; }
  .compare-toolbar button { min-width: 28px; height: 28px; padding: 0 5px; font-size: 0; }
  #compare-back::before { content: "←"; font-size: 17px; }
  #compare-layout-toggle::before { content: "叠"; font-size: 13px; }
  #compare-layout-toggle[aria-pressed="true"]::before { content: "并"; }
  #compare-zoom-out::before { content: "−"; font-size: 17px; }
  #compare-zoom-in::before { content: "+"; font-size: 17px; }
  #compare-zoom-reset::before { content: "⊡"; font-size: 17px; }
  .compare-quality { font-size: 9px; }
  .compare-zoom-value { flex-basis: 34px; font-size: 9px; }
  .overlay-controls { justify-content: flex-start; gap: 4px; overflow-x: auto; }
  .overlay-controls label > span { display: none; }
  .overlay-controls select { max-width: 120px; }
  .overlay-controls input[type="range"] { width: 80px; }
  .audio-export-overlay { inset: 36px 0 0; align-items: flex-end; padding: 10px; }
  .audio-export-panel { padding: 14px; border-radius: 10px; }
  .audio-export-times { grid-template-columns: 1fr; }
  .video-clip-overlay { inset: 36px 0 0; align-items: flex-end; padding: 8px; }
  .video-clip-panel { padding: 12px; border-radius: 10px; }
  .video-clip-preview-wrap { max-height: 28vh; }
  .video-clip-presets { gap: 5px; }
  .video-clip-presets button { flex: 1 1 52px; padding: 0 6px; }
  .video-clip-duration-custom { flex: 1 1 100%; justify-content: flex-end; }
  .video-playlist-toolbar { min-height: 36px; padding: 2px 4px; gap: 4px; }
  .video-playlist-toolbar button { min-width: 28px; height: 28px; padding: 0 6px; font-size: 0; }
  #video-playlist-close::before { content: "←"; font-size: 17px; }
  #video-playlist-play::before { content: "▶"; font-size: 13px; }
  .video-playlist-title { font-size: 12px; }
  .video-playlist-status { font-size: 10px; }
  .video-playlist-stage { padding: 5px 5px 0; }
  .video-playlist-controls { grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; padding: 3px 5px 6px; }
  .video-playlist-list-wrap { flex-basis: min(31vh, 220px); padding: 6px; }
  .video-playlist-list { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 5px; }
  .video-playlist-item { min-height: 42px; padding: 4px 5px; }
  .video-playlist-item-thumb { flex-basis: 48px; width: 48px; height: 30px; }
}
body.login-body { display: block; }
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: var(--bg-sidebar); }
.login-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 40px; width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.login-box h1 { text-align: center; font-size: 20px; margin-bottom: 24px; border: none; padding: 0; }
.login-box label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.login-box input[type=text], .login-box input[type=password] { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; margin-bottom: 16px; outline: none; }
.login-box input:focus { border-color: var(--link); box-shadow: 0 0 0 2px rgba(9,105,218,0.15); }
.pwd-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; background: var(--bg); }
.pwd-wrap:focus-within { border-color: var(--link); box-shadow: 0 0 0 2px rgba(9,105,218,0.15); }
.pwd-wrap input[type=text], .pwd-wrap input[type=password] { flex: 1; border: none !important; margin: 0 !important; box-shadow: none !important; background: transparent; }
.pwd-wrap input:focus { box-shadow: none !important; }
.login-box .pwd-toggle { flex: 0 0 auto; width: 38px; background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 0; line-height: 1; opacity: 0.55; color: var(--text-muted); }
.login-box .pwd-toggle:hover { opacity: 0.85; background: none; }
.login-box button { width: 100%; padding: 10px; background: var(--link); color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-box button:hover { opacity: .9; }
.login-box .login-remember { display: flex; align-items: center; gap: 7px; margin: -4px 0 14px; color: var(--text-muted); font-size: 12px; font-weight: 400; cursor: pointer; }
.login-box .login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--link); }
.login-error { background: #ffebe9; border: 1px solid #ff818266; color: #d1242f; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; text-align: center; }
@media print {
  .sidebar, .sidebar-toggle { display: none !important; }
  .content { margin-left: 0 !important; max-width: 100% !important; padding: 0 !important; }
  body { display: block; }
}
/* 全局暂离遮挡层：内容不卸载，回到页面时保留滚动位置和弹层状态。 */
html[data-screen-covered="1"] body > *:not(#screen-access-overlay) { visibility: hidden !important; }
.screen-access-overlay {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: #fff; color: #202124; overflow: hidden; isolation: isolate;
}
.screen-access-overlay[hidden] { display: none !important; }
.screen-access-input {
  position: fixed; left: 50%; top: 50%; width: 2px; height: 2px; opacity: .01; z-index: 2;
  border: 0; padding: 0; margin: 0; color: transparent; background: transparent; caret-color: transparent;
}
.screen-access-google { display: flex; flex-direction: column; align-items: center; gap: 26px; transform: translateY(-5vh); }
.screen-access-google-logo { font: 500 76px/1 Arial, sans-serif; letter-spacing: -5px; user-select: none; }
.screen-access-google-logo span:nth-child(1), .screen-access-google-logo span:nth-child(4) { color: #4285f4; }
.screen-access-google-logo span:nth-child(2), .screen-access-google-logo span:nth-child(6) { color: #ea4335; }
.screen-access-google-logo span:nth-child(3) { color: #fbbc05; }
.screen-access-google-logo span:nth-child(5) { color: #34a853; }
.screen-access-google-search {
  width: min(584px, 78vw); height: 44px; border: 1px solid #dfe1e5; border-radius: 24px;
  display: flex; align-items: center; padding: 0 16px; box-sizing: border-box;
  box-shadow: 0 1px 5px rgba(32,33,36,.18); background: #fff;
}
.screen-access-search-icon { width: 15px; height: 15px; border: 2px solid #9aa0a6; border-radius: 50%; position: relative; flex: 0 0 auto; }
.screen-access-search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: #9aa0a6; transform: rotate(45deg); right: -5px; bottom: -3px; border-radius: 2px; }
.screen-access-search-line { flex: 1; }
.screen-access-mic { width: 11px; height: 17px; border: 2px solid #4285f4; border-radius: 8px; opacity: .9; }
.screen-access-status { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 7px; min-height: 5px; }
.screen-access-status i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #dfe1e5; transition: background .12s ease, transform .12s ease; }
.screen-access-status i.filled { background: #4285f4; transform: scale(1.05); }
.screen-access-status.shake { animation: screen-access-shake .24s ease; }
@keyframes screen-access-shake { 25% { transform: translateX(calc(-50% - 7px)); } 75% { transform: translateX(calc(-50% + 7px)); } }
.screen-access-theme-dark { background: #202124; color: #e8eaed; }
.screen-access-theme-dark .screen-access-google-search { background: #202124; border-color: #5f6368; box-shadow: 0 1px 6px rgba(0,0,0,.45); }
.screen-access-theme-dark .screen-access-search-icon { border-color: #9aa0a6; }
.screen-access-theme-dark .screen-access-search-icon::after { background: #9aa0a6; }
.screen-access-theme-dark .screen-access-status i { background: #5f6368; }
.screen-access-theme-dark .screen-access-status i.filled { background: #8ab4f8; }
html[data-theme="dark"] .screen-access-theme-auto { background: #202124; color: #e8eaed; }
html[data-theme="dark"] .screen-access-theme-auto .screen-access-google-search { background: #202124; border-color: #5f6368; box-shadow: 0 1px 6px rgba(0,0,0,.45); }
html[data-theme="dark"] .screen-access-theme-auto .screen-access-status i { background: #5f6368; }
html[data-theme="dark"] .screen-access-theme-auto .screen-access-status i.filled { background: #8ab4f8; }
.screen-access-toggle, .screen-access-lock { min-width: 32px; height: 30px; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font-size: 17px; line-height: 1; }
.screen-access-toggle:hover, .screen-access-lock:hover { border-color: var(--link); color: var(--link); }
.sidebar-more { position: relative; }
.sidebar-more-toggle { min-width: 32px; height: 30px; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-size: 18px; line-height: 1; }
.sidebar-more-toggle:hover, .sidebar-more-toggle[aria-expanded="true"] { border-color: var(--link); color: var(--link); background: var(--hover); }
.sidebar-more-menu { position: absolute; right: 0; bottom: 38px; z-index: 1600; display: grid; min-width: 150px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: 0 10px 28px rgba(27,31,36,.22); }
.sidebar-more-menu[hidden] { display: none; }
.sidebar-more-menu > * { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-decoration: none; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.sidebar-more-menu > *:hover { background: var(--hover); color: var(--link); text-decoration: none; }

.screen-access-settings { position: fixed; left: 50%; top: 50%; z-index: 10001; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 28px)); box-sizing: border-box; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 14px 44px rgba(0,0,0,.24); }
.screen-access-settings[hidden] { display: none !important; }
.screen-access-settings-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.screen-access-settings-close { border: 0; background: transparent; color: var(--text-muted); font-size: 22px; cursor: pointer; }
.screen-access-setting-row { display: grid; grid-template-columns: 1fr minmax(150px, 1.25fr); align-items: center; gap: 12px; min-height: 38px; font-size: 13px; }
.screen-access-setting-row input[type=password], .screen-access-setting-row input[type=number], .screen-access-setting-row select { width: 100%; box-sizing: border-box; min-height: 30px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.screen-access-setting-row input[type=checkbox] { justify-self: start; width: 18px; height: 18px; }
.screen-access-policy-group { margin: 8px 0 4px; padding: 6px 10px 7px; border: 1px solid var(--border); border-radius: 8px; }
.screen-access-policy-group legend { padding: 0 5px; color: var(--text-muted); font-size: 12px; }
.screen-access-policy-group .screen-access-setting-row { min-height: 32px; }
.screen-access-settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.screen-access-settings-actions button { min-height: 32px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; }
.screen-access-settings-actions button:last-child { background: var(--link); border-color: var(--link); color: #fff; }
.screen-access-settings-status { min-height: 20px; margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.screen-access-preview-countdown { position: fixed; left: 50%; bottom: max(48px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(32,33,36,.62); font-size: 14px; }
body.screen-settings-open::after { content: ""; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.28); }
body.screen-settings-open .screen-access-settings { z-index: 10002; }
.path-jump-overlay { position: fixed; inset: 0; z-index: 9200; display: grid; place-items: start center;
  padding: min(16vh, 130px) 16px 16px; background: rgba(0,0,0,.34); }
.path-jump-overlay[hidden] { display: none !important; }
.path-jump-dialog { width: min(680px, calc(100vw - 28px)); padding: 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 16px 48px rgba(0,0,0,.28); }
.path-jump-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.path-jump-head strong { flex: 1; font-size: 17px; }
.path-jump-head span { color: var(--text-muted); font-size: 12px; }
.path-jump-head kbd { padding: 1px 5px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; background: var(--hover); font: inherit; }
.path-jump-close { border: 0; background: transparent; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.path-jump-dialog > label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: 13px; }
.path-jump-dialog > input { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text); font: 14px/1.4 Consolas, monospace; }
.path-jump-dialog > input:focus { outline: 2px solid color-mix(in srgb, var(--link) 36%, transparent); border-color: var(--link); }
.path-jump-status { min-height: 22px; padding-top: 6px; color: var(--text-muted); font-size: 12px; }
.path-jump-status.error { color: #cf222e; }
.path-jump-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.path-jump-actions button { min-height: 34px; padding: 5px 13px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text); cursor: pointer; }
.path-jump-actions .primary { border-color: var(--link); background: var(--link); color: #fff; }
.session-expired-overlay { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.38); }
.session-expired-overlay[hidden] { display: none !important; }
.session-expired-dialog { width: min(390px, calc(100vw - 28px)); box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.28); }
.session-expired-dialog h2 { margin: 0 0 8px; border: 0; padding: 0; font-size: 18px; }
.session-expired-dialog p { margin: 0 0 14px; color: var(--text-muted); font-size: 13px; }
.session-expired-dialog label { display: block; margin: 9px 0 5px; color: var(--text-muted); font-size: 12px; }
.session-expired-dialog input { width: 100%; box-sizing: border-box; min-height: 36px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.session-expired-dialog input:focus { outline: 2px solid color-mix(in srgb, var(--link) 35%, transparent); border-color: var(--link); }
.session-expired-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.session-expired-actions button { min-height: 34px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); cursor: pointer; }
.session-expired-actions .primary { border-color: var(--link); background: var(--link); color: #fff; }
.session-expired-actions button:disabled { opacity: .55; cursor: wait; }
.session-expired-status { min-height: 18px; margin-top: 8px; color: var(--danger, #cf222e); font-size: 12px; }
@media (max-width: 768px), (max-width: 950px) and (max-height: 520px) {
  .screen-access-google { gap: 20px; transform: translateY(-4vh); }
  .screen-access-google-logo { font-size: 58px; }
  .screen-access-google-search { width: min(584px, 84vw); height: 42px; }
  .screen-access-status { bottom: max(18px, env(safe-area-inset-bottom)); gap: 6px; }
  .screen-access-status i { width: 6px; height: 6px; }
  .screen-access-settings { width: min(420px, calc(100vw - 20px)); padding: 14px; }
  .path-jump-overlay { place-items: start center; padding: max(64px, env(safe-area-inset-top)) 10px 10px; }
  .path-jump-dialog { width: 100%; padding: 14px; }
}

html.preview-open, html.compare-open, body.preview-open, body.compare-open { overflow: hidden; }
html.comfyui-open, body.comfyui-open { overflow: hidden; }
.media-preview[hidden] { display: none; }
.standalone-preview .browser-page > :not(.media-preview) { display: none !important; }
.standalone-preview .browser-page { min-height: 100vh; padding: 0 !important; }
.standalone-preview .media-preview { position: fixed; inset: 0; }
.lw-standalone-preview { min-height: 100vh; display: flex; flex-direction: column; background: #080b0f; color: #fff; }
.lw-standalone-preview-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: #11161d; border-bottom: 1px solid rgba(255,255,255,.16); }
.lw-standalone-preview-toolbar strong { margin-right: auto; overflow-wrap: anywhere; }
.lw-standalone-preview-toolbar button, .lw-standalone-preview-toolbar a { min-height: 32px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; cursor: pointer; }
.lw-standalone-preview-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 16px; }
.lw-standalone-preview-media { display: block; max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; transform-origin: center center; }
.lw-standalone-preview-media[controls] { width: min(100%, 1100px); }
@media (max-width: 520px) { .lw-standalone-preview-toolbar { padding: 8px; } .lw-standalone-preview-toolbar strong { flex-basis: 100%; } .lw-standalone-preview-stage { padding: 8px; } }
.media-preview { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  background: rgba(15, 18, 22, .96); color: #fff; }
.preview-toolbar { flex: 0 0 auto; min-height: 40px; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px;
  padding: 4px 6px; background: rgba(27, 31, 36, .98); border-bottom: 1px solid rgba(255,255,255,.12); }
.preview-toolbar button, .preview-toolbar a { flex: 0 0 auto; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff;
  padding: 0 8px; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.preview-toolbar button:hover, .preview-toolbar a:hover { background: rgba(255,255,255,.17); text-decoration: none; }
.preview-toolbar button:disabled { opacity: .55; cursor: wait; }
.preview-toolbar [hidden] { display: none !important; }
.preview-frame-controls { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.preview-frame-controls button { min-width: 30px; padding: 0 6px; }
.preview-frame-step-label { display: inline-flex; align-items: center; gap: 3px; color: rgba(255,255,255,.8); font-size: 11px; white-space: nowrap; }
.preview-frame-step { width: 48px; height: 26px; box-sizing: border-box; padding: 0 4px; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 12px; text-align: center; }
.preview-frame-step:focus { outline: 1px solid rgba(255,255,255,.65); outline-offset: 1px; }
.preview-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px; font-size: 13px; font-weight: 600; }
.preview-zoom-value { flex: 0 0 48px; width: 48px; text-align: center; font-size: 11px; color: rgba(255,255,255,.75); }
  .preview-stage { position: relative; flex: 1; min-height: 0; overflow: auto; cursor: grab; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.preview-stage:focus { outline: none; }
.preview-stage.swipe-ready { touch-action: pan-x; }
.preview-stage.dragging { cursor: grabbing; user-select: none; }
.preview-canvas { min-width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 0; }
.preview-canvas.swipe-tracking { will-change: transform, opacity; }
.preview-canvas.swipe-settling { transition: transform .18s cubic-bezier(.2,.72,.2,1), opacity .18s ease; will-change: transform, opacity; }
.preview-canvas.swipe-enter-next { animation: preview-enter-next .2s cubic-bezier(.2,.72,.2,1); }
.preview-canvas.swipe-enter-prev { animation: preview-enter-prev .2s cubic-bezier(.2,.72,.2,1); }
@keyframes preview-enter-next { from { transform: translateY(42px); opacity: .35; } to { transform: translateY(0); opacity: 1; } }
@keyframes preview-enter-prev { from { transform: translateY(-42px); opacity: .35; } to { transform: translateY(0); opacity: 1; } }
.preview-stage.privacy-locked .preview-media { filter: blur(26px); }
.preview-stage.privacy-locked .preview-canvas { pointer-events: none; user-select: none; }
.preview-privacy-lock { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,.2); }
.preview-privacy-lock[hidden] { display: none !important; }
.preview-privacy-card { max-width: 320px; padding: 16px 20px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px;
  background: rgba(20,24,29,.9); color: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.34); text-align: center; }
.preview-privacy-card strong { display: block; margin-bottom: 5px; font-size: 16px; }
.preview-privacy-card p { margin: 0 0 12px; color: rgba(255,255,255,.72); font-size: 12px; }
.preview-privacy-card .privacy-unlock-button { border-color: #a371f7; background: #8250df; }
.preview-edge-message { position: absolute; left: 50%; bottom: 18px; z-index: 2; transform: translateX(-50%); padding: 6px 11px;
  border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.preview-edge-message.visible { opacity: 1; }
.preview-media { display: block; max-width: 100vw; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); object-fit: contain;
  box-shadow: none; transform-origin: center center; touch-action: manipulation; user-select: none; -webkit-user-drag: none; }
.preview-media.is-video { background: #000; box-shadow: none; }
/* Chromium 的原生 video controls 会在画面底部绘制一层很重的黑色渐变，
   它不是视频内容，会遮挡画面。保留控件本身，只去掉这层装饰背景。 */
.preview-media.is-video::-webkit-media-controls-panel,
.preview-media.is-video::-webkit-media-controls-enclosure { background: transparent !important; background-image: none !important; }
@media (prefers-reduced-motion: reduce) {
  .preview-canvas.swipe-settling { transition-duration: .01ms; }
  .preview-canvas.swipe-enter-next, .preview-canvas.swipe-enter-prev { animation-duration: .01ms; }
  .privacy-document-content { transition: none; }
}
.metadata-panel[hidden] { display: none !important; }
.metadata-panel { position: absolute; z-index: 6; top: 40px; right: 0; bottom: 0; width: min(520px, 94vw);
  display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,.18); background: rgba(20,24,29,.98);
  color: #fff; box-shadow: -12px 0 35px rgba(0,0,0,.3); }
.metadata-panel-header { flex: 0 0 auto; min-height: 42px; display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.metadata-panel-header h2 { flex: 1; margin: 0; padding: 0; border: 0; color: #fff; font-size: 15px; }
.metadata-panel-header button, .metadata-actions button { height: 30px; padding: 0 9px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.metadata-panel-header button { width: 32px; padding: 0; font-size: 21px; line-height: 1; }
.metadata-panel-header .workspace-memo-mount { width: auto; padding: 0 9px; font-size: 12px; line-height: 1; }
.metadata-panel-status { flex: 0 0 auto; min-height: 0; padding: 0 12px; color: rgba(255,255,255,.68); font-size: 12px; }
.metadata-panel-status:not(:empty) { padding-top: 10px; padding-bottom: 2px; }
.metadata-panel-content { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px 18px; }
.metadata-section { margin: 0 0 12px; padding: 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  background: rgba(255,255,255,.035); }
.metadata-section h3 { margin: 0 0 8px; padding: 0; border: 0; color: #fff; font-size: 13px; }
.metadata-summary { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 5px 10px; margin: 0; font-size: 12px; }
.metadata-summary dt { color: rgba(255,255,255,.62); }
.metadata-summary dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.metadata-copy-path { display: block; max-width: 100%; margin: -2px 0; padding: 2px 0; border: 0; background: transparent;
  color: #79c0ff; font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: left;
  overflow-wrap: anywhere; word-break: break-all; cursor: copy; }
.metadata-copy-path:hover, .metadata-copy-path:focus { color: #a5d6ff; text-decoration: underline; outline: none; }
.metadata-path-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.metadata-path-actions button { min-height: 28px; padding: 3px 8px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 5px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font: inherit; font-size: 11px; }
.metadata-path-actions button:hover { background: rgba(255,255,255,.16); }
.metadata-kind { margin: -3px 0 7px; color: #79c0ff; font-size: 11px; }
.content .media-preview pre.metadata-value { max-height: 46vh; margin: 0; padding: 10px; overflow: auto;
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: #0d1117; color: #e6edf3;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word; color-scheme: dark; scrollbar-color: #6e7681 #161b22; }
.metadata-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.metadata-entry { margin: 0 0 7px; }
.metadata-entry:last-child { margin-bottom: 0; }
.metadata-entry summary { cursor: pointer; color: rgba(255,255,255,.82); font-size: 12px; overflow-wrap: anywhere; }
.content .media-preview .metadata-entry pre.metadata-value { margin-top: 6px; max-height: 220px; }
.metadata-empty, .metadata-warning { margin: 0; color: rgba(255,255,255,.67); font-size: 12px; }
.metadata-warning { color: #e3b341; }
.image-compare[hidden] { display: none !important; }
.image-compare { position: fixed; inset: 0; z-index: 1010; display: flex; flex-direction: column;
  background: #0f1216; color: #fff; }
.compare-toolbar { flex: 0 0 auto; min-height: 40px; display: flex; align-items: center; gap: 5px; padding: 4px 6px;
  border-bottom: 1px solid rgba(255,255,255,.14); background: #1b1f24; }
.compare-toolbar button { flex: 0 0 auto; height: 30px; padding: 0 9px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; font: inherit; cursor: pointer; }
.compare-toolbar button.active { border-color: #58a6ff; background: rgba(47,129,247,.28); }
.compare-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.compare-quality { flex: 0 0 auto; color: #7ee787; font-size: 11px; }
.compare-zoom-value { flex: 0 0 48px; text-align: center; color: rgba(255,255,255,.72); font-size: 11px; }
.compare-stage { flex: 1; min-height: 0; overflow: auto; padding: 0; cursor: grab; overscroll-behavior: contain; }
.compare-stage.dragging { cursor: grabbing; user-select: none; }
.compare-stage:focus { outline: none; }
.compare-grid { display: flex; align-items: center; gap: 0; min-width: 100%; min-height: 100%; }
.compare-card { position: relative; flex: 0 0 auto; min-width: 0; min-height: 0; overflow: hidden; background: transparent; }
.compare-card:first-child { margin-left: auto; }
.compare-card:last-child { margin-right: auto; }
.compare-card-header { position: absolute; z-index: 2; top: 0; left: 0; right: 0; min-width: 0; height: 28px;
  display: flex; align-items: center; gap: 6px; padding: 0 7px; background: linear-gradient(rgba(9,12,16,.82), rgba(9,12,16,.28)); }
.compare-card-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.compare-card-download { flex: 0 0 auto; color: #79c0ff !important; text-decoration: none !important; font-size: 14px; }
.compare-image-wrap, .compare-image-canvas { width: 100%; height: 100%; }
.compare-image-canvas { position: relative; display: flex; align-items: center; justify-content: center; }
.compare-image { display: block; flex: 0 0 auto; max-width: none; max-height: none; object-fit: contain;
  user-select: none; -webkit-user-drag: none; touch-action: manipulation; }
.compare-image-error { margin: auto; padding: 12px; color: #ff7b72; font-size: 12px; text-align: center; }
.video-playlist-panel[hidden] { display: none !important; }
.video-playlist-panel { position: fixed; inset: 0; z-index: 1020; display: flex; flex-direction: column; background: #11161d; color: #fff; }
.video-playlist-toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,.15); background: rgba(27,31,36,.98); }
.video-playlist-toolbar button { height: 30px; padding: 0 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.video-playlist-toolbar button:hover { background: rgba(255,255,255,.17); }
.video-playlist-title { font-weight: 600; font-size: 14px; }
.video-playlist-status { margin-left: auto; color: rgba(255,255,255,.68); font-size: 12px; }
.video-playlist-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.video-playlist-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px 18px 5px; overflow: hidden; background: #090c10; }
.video-playlist-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-playlist-video.is-hidden { display: none; }
.video-playlist-controls { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 18px 9px; background: #090c10; }
.video-playlist-controls button { width: 32px; height: 28px; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.video-playlist-progress { width: 100%; min-width: 0; accent-color: #58a6ff; cursor: pointer; }
.video-playlist-time { min-width: 86px; color: rgba(255,255,255,.78); font: 12px/1.2 Consolas, monospace; text-align: right; white-space: nowrap; }
.video-playlist-list-wrap { flex: 0 0 min(29vh, 250px); min-height: 110px; overflow: auto; padding: 8px 12px 12px; border-top: 1px solid rgba(255,255,255,.15); background: #161b22; }
.video-playlist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.video-playlist-item { position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 48px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.17); border-radius: 7px; background: rgba(255,255,255,.06); cursor: grab; }
.video-playlist-item:active { cursor: grabbing; }
.video-playlist-item.dragging { opacity: .4; }
.video-playlist-item.active { border-color: #58a6ff; background: rgba(47,129,247,.22); }
.video-playlist-item-drop { border-color: #58a6ff; box-shadow: inset 0 0 0 1px #58a6ff; }
.video-playlist-item-index { flex: 0 0 23px; color: rgba(255,255,255,.6); font: 12px Consolas, monospace; text-align: center; }
.video-playlist-item-thumb { flex: 0 0 58px; width: 58px; height: 36px; object-fit: cover; background: #000; border-radius: 4px; }
.video-playlist-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.video-playlist-item-duration { margin-left: auto; color: rgba(255,255,255,.6); font: 11px Consolas, monospace; }
html.video-playlist-open, body.video-playlist-open { overflow: hidden; }
.overlay-wipe-line { position: absolute; z-index: 4; top: 0; bottom: 0; width: 1px; transform: translateX(-.5px);
  background: rgba(255,255,255,.92); box-shadow: 0 0 2px rgba(0,0,0,.8); pointer-events: none; }
.overlay-phase-badge { position: absolute; z-index: 5; top: 7px; left: 7px; max-width: calc(100% - 14px); overflow: hidden;
  padding: 3px 7px; border-radius: 5px; background: rgba(9,12,16,.82); color: #fff; font-size: 11px;
  line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.overlay-phase-badge.paused { background: rgba(35,99,49,.9); }
.compare-grid.overlay-mode { position: relative; display: block; }
.compare-grid.overlay-mode .compare-card { position: absolute; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%); }
.compare-grid.overlay-mode .compare-card-header { display: none; }
.overlay-controls[hidden] { display: none !important; }
.overlay-controls { flex: 0 0 auto; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 4px 7px; border-bottom: 1px solid rgba(255,255,255,.12); background: #161b22; font-size: 11px; }
.overlay-controls label { min-width: 0; display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.7); }
.overlay-controls select { min-width: 0; max-width: 240px; height: 28px; padding: 0 5px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px; background: #0f1216; color: #fff; }
.overlay-controls button { flex: 0 0 auto; height: 28px; padding: 0 7px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px; background: rgba(255,255,255,.07); color: #fff; cursor: pointer; }
.overlay-controls input[type="range"] { width: 110px; accent-color: #2f81f7; }
.overlay-range-value { flex: 0 0 46px; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.overlay-visible-label { flex: 0 1 220px; min-width: 72px; overflow: hidden; color: #7ee787; text-overflow: ellipsis; white-space: nowrap; }
.overlay-download { color: #79c0ff !important; text-decoration: none !important; font-size: 15px; }
.audio-export-overlay[hidden] { display: none !important; }
.audio-export-overlay { position: absolute; inset: 40px 0 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,.64); }
.audio-export-panel { width: min(500px, 100%); max-height: 100%; overflow-y: auto; padding: 18px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: #1b1f24; color: #fff;
  box-shadow: 0 16px 50px rgba(0,0,0,.45); }
.audio-export-panel h2 { margin: 0 0 12px; padding: 0; border: 0; color: #fff; font-size: 17px; }
.audio-export-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.audio-export-modes label { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px; cursor: pointer; }
.audio-range-preview[hidden] { display: none !important; }
.audio-range-preview { margin: 0 0 12px; padding: 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  background: #0f1216; }
.audio-range-video { display: block; width: 100%; max-height: min(28vh, 220px); aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: 6px; background: #000; }
.audio-range-playback { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.audio-range-playback button { flex: 0 0 auto; min-width: 76px; height: 32px; padding: 0 9px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.audio-range-position { min-width: 0; color: rgba(255,255,255,.72); font-size: 12px; font-variant-numeric: tabular-nums; }
.audio-range-slider { position: relative; height: 38px; margin: 3px 2px 0; }
.audio-range-rail { position: absolute; left: 0; right: 0; top: 17px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.2); }
.audio-range-selection { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: #2f81f7; }
.audio-range-playhead { position: absolute; top: -4px; bottom: -4px; width: 2px; transform: translateX(-1px); background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5); pointer-events: none; }
.audio-range-slider input[type="range"] { position: absolute; inset: 0; width: 100%; height: 38px; margin: 0;
  appearance: none; -webkit-appearance: none; background: transparent; pointer-events: none; }
.audio-range-slider input[type="range"]::-webkit-slider-runnable-track { height: 5px; background: transparent; }
.audio-range-slider input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7.5px; border: 2px solid #fff;
  border-radius: 50%; background: #2f81f7; box-shadow: 0 1px 5px rgba(0,0,0,.55); appearance: none; -webkit-appearance: none;
  pointer-events: auto; cursor: ew-resize; }
.audio-range-slider input[type="range"]::-moz-range-track { height: 5px; background: transparent; }
.audio-range-slider input[type="range"]::-moz-range-thumb { width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%;
  background: #2f81f7; box-shadow: 0 1px 5px rgba(0,0,0,.55); pointer-events: auto; cursor: ew-resize; }
#audio-range-start { z-index: 4; }
#audio-range-end { z-index: 3; }
.audio-range-labels { display: flex; justify-content: space-between; margin-top: -3px; color: rgba(255,255,255,.62);
  font-size: 11px; font-variant-numeric: tabular-nums; }
.audio-export-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.audio-time-field > label { display: block; margin-bottom: 5px; color: rgba(255,255,255,.78); font-size: 12px; }
.audio-time-row { display: flex; gap: 5px; }
.audio-time-row input { min-width: 0; width: 100%; height: 34px; padding: 0 8px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; background: #0f1216; color: #fff; font: inherit; }
.audio-time-row button, .audio-export-actions button { height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; white-space: nowrap; }
.audio-time-row button:disabled, .audio-export-actions button:disabled, .audio-time-row input:disabled { opacity: .5; cursor: not-allowed; }
.audio-export-help, .audio-export-summary { margin: 9px 0 0; color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.5; }
.audio-export-error { min-height: 18px; margin-top: 8px; color: #ffb4ab; font-size: 12px; }
.audio-export-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.audio-export-actions .primary { background: #1f6feb; border-color: #58a6ff; }
.video-clip-overlay[hidden] { display: none !important; }
.video-clip-overlay { position: absolute; inset: 40px 0 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,.68); }
.video-clip-panel { width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 16px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: #1b1f24; color: #fff;
  box-shadow: 0 16px 50px rgba(0,0,0,.45); }
.video-clip-panel h2 { margin: 0 0 10px; padding: 0; border: 0; color: #fff; font-size: 17px; }
.video-clip-preview-wrap { position: relative; width: 100%; max-height: min(34vh, 260px); aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 6px; background: #000; }
.video-clip-preview { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-clip-crop-layer[hidden] { display: none !important; }
.video-clip-crop-layer { position: absolute; z-index: 2; overflow: hidden; touch-action: none; }
.video-clip-crop-box { position: absolute; box-sizing: border-box; min-width: 12px; min-height: 12px;
  border: 1.5px solid #fff; background: transparent; box-shadow: 0 0 0 9999px rgba(0,0,0,.46); cursor: move; }
.video-clip-crop-box::before, .video-clip-crop-box::after { position: absolute; content: ""; pointer-events: none; opacity: .48; }
.video-clip-crop-box::before { left: 33.333%; right: 33.333%; top: 0; bottom: 0; border-left: 1px solid #fff; border-right: 1px solid #fff; }
.video-clip-crop-box::after { left: 0; right: 0; top: 33.333%; bottom: 33.333%; border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
.video-clip-crop-box i { position: absolute; z-index: 2; width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.7);
  border-radius: 2px; background: #fff; }
.video-clip-crop-box i[data-crop-handle="nw"] { left: -1px; top: -1px; cursor: nwse-resize; }
.video-clip-crop-box i[data-crop-handle="ne"] { right: -1px; top: -1px; cursor: nesw-resize; }
.video-clip-crop-box i[data-crop-handle="sw"] { left: -1px; bottom: -1px; cursor: nesw-resize; }
.video-clip-crop-box i[data-crop-handle="se"] { right: -1px; bottom: -1px; cursor: nwse-resize; }
.video-clip-playback { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: rgba(255,255,255,.72);
  font-size: 12px; font-variant-numeric: tabular-nums; }
.video-clip-playback button, .video-clip-presets button, .video-clip-actions button { height: 32px; padding: 0 10px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff;
  font: inherit; cursor: pointer; white-space: nowrap; }
.video-clip-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.video-clip-presets > span { margin-right: 2px; color: rgba(255,255,255,.72); font-size: 12px; }
.video-clip-presets button.active { border-color: #58a6ff; background: #1f6feb; }
.video-clip-duration-custom { display: inline-flex; align-items: center; gap: 4px; color: rgba(255,255,255,.72); font-size: 12px; }
.video-clip-duration-custom input { width: 66px; height: 32px; box-sizing: border-box; padding: 0 6px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: #0f1216; color: #fff; font: inherit; }
.video-clip-slider { position: relative; height: 48px; margin: 7px 2px 0; touch-action: none; outline: none; }
.video-clip-slider:focus-visible { outline: 2px solid #58a6ff; outline-offset: 2px; border-radius: 5px; }
.video-clip-rail { position: absolute; left: 0; right: 0; top: 21px; height: 7px; border-radius: 999px;
  background: rgba(255,255,255,.2); }
.video-clip-selection { position: absolute; top: -7px; height: 21px; min-width: 0; display: flex; align-items: center;
  justify-content: center; overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 5px;
  background: #2f81f7; box-shadow: 0 2px 7px rgba(0,0,0,.45); cursor: grab; user-select: none; }
.video-clip-selection.dragging { cursor: grabbing; }
.video-clip-selection span { min-width: max-content; padding: 0 5px; color: #fff; font-size: 10px; pointer-events: none; }
.video-clip-selection > i { position: absolute; z-index: 2; top: -2px; bottom: -2px; width: 10px;
  border: 1px solid rgba(255,255,255,.9); border-radius: 3px; background: #58a6ff; cursor: ew-resize; }
.video-clip-selection > i[data-clip-time-handle="start"] { left: -5px; }
.video-clip-selection > i[data-clip-time-handle="end"] { right: -5px; }
.video-clip-playhead { position: absolute; top: -11px; height: 29px; width: 2px; transform: translateX(-1px);
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); pointer-events: none; }
.video-clip-times { display: flex; justify-content: space-between; margin-top: -4px; color: rgba(255,255,255,.65);
  font-size: 11px; font-variant-numeric: tabular-nums; }
.video-clip-times strong { color: rgba(255,255,255,.9); font-weight: 500; }
.video-clip-description { display: block; margin-top: 10px; }
.video-clip-description span { display: block; margin-bottom: 5px; color: rgba(255,255,255,.78); font-size: 12px; }
.video-clip-description input { box-sizing: border-box; width: 100%; height: 34px; padding: 0 9px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: #0f1216; color: #fff; font: inherit; }
.video-clip-crop-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px;
  color: rgba(255,255,255,.8); font-size: 12px; }
.video-clip-crop-controls label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.video-clip-crop-controls input { accent-color: #2f81f7; }
.video-clip-crop-controls button { min-height: 30px; padding: 0 8px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; font: inherit; cursor: pointer; }
.video-clip-help, .video-clip-summary { margin: 8px 0 0; color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.45; }
.video-clip-error { min-height: 18px; margin-top: 7px; color: #ffb4ab; font-size: 12px; }
.video-clip-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.video-clip-actions button:disabled { opacity: .5; cursor: not-allowed; }
.video-clip-actions .primary { background: #1f6feb; border-color: #58a6ff; }

.sidebar-content-detection { margin-left: auto; padding: 3px 5px; border-radius: 5px; color: var(--link); text-decoration: none; }
.sidebar-content-detection:hover { background: var(--hover); text-decoration: none; }
.folder-content-detection { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid #0969da66; border-radius: 7px; background: var(--bg); color: var(--link); text-decoration: none; }
.folder-content-detection:hover { background: var(--hover); text-decoration: none; }
.content-detection-card { width: min(720px, 100%); box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); box-shadow: 0 6px 20px rgba(27,31,36,.06); }
.content-detection-card h2 { margin: 0 0 8px; border: 0; padding: 0; font-size: 18px; }
.content-detection-path { margin: 0 0 16px; color: var(--text-muted); overflow-wrap: anywhere; }
.content-detection-check { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.content-detection-fields { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.content-detection-fields label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.content-detection-fields input { width: 72px; min-height: 30px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.content-detection-actions { display: flex; gap: 8px; margin-top: 16px; }
.content-detection-actions button { min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); cursor: pointer; }
.content-detection-actions .primary { border-color: var(--link); background: var(--link); color: #fff; }
.content-detection-status, .content-detection-summary { min-height: 18px; margin: 12px 0 0; color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.content-detection-folder-list { list-style: none; margin: 0; padding: 0; }
.content-detection-folder-list li + li { margin-top: 6px; }
.content-detection-folder-link { display: block; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--link); text-decoration: none; }
.content-detection-folder-link:hover { background: var(--hover); text-decoration: none; }
.sidebar-content-detection-link { color: var(--link) !important; white-space: nowrap; }
.content-detection-intro { margin: 0 0 14px; color: var(--text-muted); }
.content-detection-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.content-detection-overview-card { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); color: var(--text); text-decoration: none; box-shadow: 0 4px 14px rgba(27,31,36,.05); }
.content-detection-overview-card:hover { border-color: var(--link); background: var(--hover); text-decoration: none; }
.content-detection-overview-card, .content-detection-overview-card:hover { text-decoration: none !important; }
.content-detection-strategy-nav { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 4px; border-bottom: 1px solid var(--border); }
.content-detection-strategy-nav a { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 12px; border-radius: 7px 7px 0 0; color: var(--text-muted); text-decoration: none; font-size: 13px; }
.content-detection-strategy-nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.content-detection-strategy-nav a.active { background: var(--link); color: #fff; font-weight: 650; }
.content-detection-overview-card strong { grid-row: span 2; font-size: 24px; color: var(--link); }
.content-detection-overview-card span { font-weight: 650; }
.content-detection-overview-card small { color: var(--text-muted); font-size: 11px; }
.content-detection-overview-card.review strong { color: #9a6700; }
.content-detection-overview-card.blur strong { color: #cf222e; }
.content-detection-layout { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(480px, 1.8fr); gap: 18px; align-items: start; }
.content-detection-tree-panel, .content-detection-main { min-width: 0; }
.content-detection-tree-panel { position: sticky; top: 14px; max-height: calc(100vh - 110px); overflow: auto; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(180deg, var(--bg-sidebar), color-mix(in srgb, var(--bg-sidebar) 72%, var(--bg))); box-shadow: 0 6px 20px rgba(27,31,36,.06); }
.content-detection-tree-panel h2, .content-detection-records h2 { margin: 0 0 8px; border: 0; padding: 0; font-size: 16px; }
.content-detection-help { margin: 0 0 10px; color: var(--text-muted); font-size: 12px; }
.content-tree-row { display: flex; align-items: center; gap: 7px; min-height: 38px; margin: 2px 0; padding-right: 7px; border: 1px solid transparent; border-radius: 7px; }
.content-tree-row:hover { border-color: var(--border); background: var(--hover); }
.content-tree-expand { width: 23px; height: 26px; padding: 0; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.content-tree-expand:disabled { opacity: .5; cursor: wait; }
.content-tree-check { width: 16px; height: 16px; accent-color: var(--link); }
.content-tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.content-detection-selected-list { display: grid; gap: 6px; margin: 10px 0; }
.content-detection-selected-dir { min-width: 0; padding: 8px 10px; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--link); text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font: inherit; font-size: 12px; }
.content-detection-selected-dir:hover { background: var(--hover); border-color: var(--link); }
.content-detection-main { display: grid; gap: 18px; }
.content-detection-records { width: auto; overflow: hidden; }
.content-detection-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.content-detection-section-head h2 { margin: 0; }
.content-detection-scan-all { min-height: 32px; padding: 5px 11px; border: 1px solid var(--link); border-radius: 7px; background: var(--link); color: #fff; cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.content-detection-scan-all:hover { filter: brightness(.95); }
.content-detection-scan-all:disabled { opacity: .55; cursor: wait; }
.content-detection-table-wrap { overflow: auto; }
.content-detection-records table { width: 100%; border-collapse: collapse; font-size: 12px; }
.content-detection-records th, .content-detection-records td { padding: 10px 11px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.content-detection-records th { color: var(--text-muted); font-weight: 600; }
.content-detection-row-scan { min-height: 28px; padding: 3px 9px; border: 1px solid var(--link); border-radius: 6px; background: var(--bg); color: var(--link); cursor: pointer; white-space: nowrap; }
.content-detection-row-edit { min-height: 28px; margin-right: 5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sidebar); color: var(--text); cursor: pointer; white-space: nowrap; }
.content-detection-row-edit:hover { border-color: var(--link); color: var(--link); background: var(--hover); }
.content-detection-row-scan:disabled { opacity: .55; cursor: wait; }
.content-detection-result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0; padding: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-sidebar); box-shadow: 0 4px 14px rgba(27,31,36,.05); }
.content-detection-result-filters, .content-detection-result-controls { display: flex; align-items: center; gap: 5px; }
.content-detection-result-batch { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.content-detection-result-batch button { min-height: 30px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font-size: 12px; }
.content-detection-result-batch button:hover { border-color: var(--link); color: var(--link); background: var(--hover); }
.content-result-select { position: absolute; left: 8px; top: 8px; z-index: 2; width: 18px; height: 18px; accent-color: var(--link); }
.content-result-item { position: relative; }
.content-detection-result-filters a, .content-detection-result-controls button, .content-detection-result-controls select { min-height: 32px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.content-detection-result-filters a:hover, .content-detection-result-controls button:hover { background: var(--hover); }
.content-detection-result-count { margin: 8px 0; color: var(--text-muted); font-size: 12px; }
.content-detection-result-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.content-detection-result-list.view-icons { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.content-result-item { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.content-result-thumb { display: block; width: 100%; height: 150px; object-fit: contain; background: var(--bg-sidebar); cursor: pointer; }
.content-result-item.is-sensitive .content-result-thumb { filter: none; transform: none; }
.content-result-text { min-width: 0; padding: 8px; }
.content-result-text strong, .content-result-text small, .content-result-text > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-result-text strong { font-size: 13px; }
.content-result-text small, .content-result-text > span { margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.content-result-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.content-result-actions button { min-height: 28px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-sidebar); color: var(--text); cursor: pointer; font-size: 11px; }
.content-result-actions button:hover { background: var(--hover); }
.content-detection-result-list.view-list { display: block; }
.content-detection-result-list.view-list .content-result-item { display: flex; align-items: center; margin-bottom: 6px; }
.content-detection-result-list.view-list .content-result-thumb { flex: 0 0 100px; width: 100px; height: 72px; }
.content-detection-result-list.view-list .content-result-text { flex: 1; }
.content-detection-result-list.view-details { display: block; }
.content-detection-result-list.view-details .content-result-item { display: grid; grid-template-columns: 90px minmax(0, 1fr); margin-bottom: 4px; }
.content-detection-result-list.view-details .content-result-thumb { width: 90px; height: 64px; }
.content-detection-image-modal[hidden] { display: none !important; }
.content-detection-image-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: stretch; justify-content: stretch; padding: 2vh 2vw; background: rgba(5,8,12,.94); }
.content-detection-image-panel { position: relative; display: flex; flex-direction: column; align-items: stretch; width: 96vw; height: 96vh; max-width: none; max-height: none; margin: auto; padding: 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: #11161d; color: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.42); }
.content-detection-image-toolbar { display: flex; align-items: center; gap: 6px; width: 100%; margin-bottom: 8px; }
.content-detection-image-toolbar button, .content-detection-image-toolbar a { min-height: 30px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; cursor: pointer; font: inherit; font-size: 12px; }
.content-detection-image-toolbar button:hover, .content-detection-image-toolbar a:hover { background: rgba(255,255,255,.18); }
.content-detection-image-toolbar span { min-width: 46px; color: rgba(255,255,255,.72); text-align: center; font-size: 11px; }
.content-detection-image-stage { flex: 1 1 auto; display: grid; place-items: center; width: 100%; min-height: 0; overflow: auto; background: #080b0f; border-radius: 7px; }
.content-detection-image-panel img { display: block; max-width: none; max-height: none; object-fit: contain; transform-origin: center center; transition: transform .12s ease; }
.content-detection-image-panel img.locked { filter: blur(24px); }
.content-detection-image-panel > button:first-child { position: absolute; top: 4px; right: 6px; z-index: 2; width: 30px; height: 30px; border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 5px; cursor: pointer; font-size: 20px; }
.content-detection-image-panel p { max-width: 100%; margin: 8px 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.78); font-size: 12px; }
.content-detection-image-panel #content-detection-image-unlock { min-height: 30px; padding: 4px 10px; border: 1px solid var(--link); border-radius: 6px; background: var(--link); color: #fff; cursor: pointer; }
@media (max-width: 1100px) { .content-detection-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .content-detection-overview { grid-template-columns: 1fr; } .content-detection-layout { grid-template-columns: 1fr; } .content-detection-tree-panel { position: static; max-height: 42vh; } }
@media (max-width: 700px) { .content-detection-image-modal { padding: 0; } .content-detection-image-panel { width: 100vw; height: 100dvh; border-radius: 0; padding: 6px; } .content-detection-image-toolbar { gap: 3px; } .content-detection-image-toolbar button, .content-detection-image-toolbar a { min-width: 30px; padding: 4px 6px; font-size: 11px; } }

.settings-center-page { width: min(1120px, 100%); margin: 0 auto; }
body.settings-standalone { display: block; min-height: 100vh; }
body.settings-standalone .content { width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 32px clamp(20px, 4vw, 64px); box-sizing: border-box; }
body.settings-standalone .settings-center-page { width: min(1440px, 100%); margin: 0 auto; }
.settings-center-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 6px 0 18px; border-bottom: 1px solid var(--border); }
.settings-center-head h1 { margin: 0 0 5px; border: 0; padding: 0; font-size: 25px; }
.settings-center-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.settings-center-back { display: inline-flex; min-height: 34px; align-items: center; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--link); text-decoration: none; }
.settings-center-back:hover { background: var(--hover); text-decoration: none; }
.settings-center-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; padding-top: 20px; }
.settings-center-nav { display: grid; align-content: start; gap: 4px; }
.settings-center-nav a { min-height: 36px; display: flex; align-items: center; padding: 5px 10px; border-radius: 7px; color: var(--text-muted); text-decoration: none; font-size: 13px; }
.settings-center-nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.settings-center-nav a.active { background: color-mix(in srgb, var(--link) 12%, transparent); color: var(--link); font-weight: 650; }
.settings-center-main { min-width: 0; }
.settings-center-section { max-width: 760px; }
.settings-center-section h2 { margin: 0 0 6px; border: 0; padding: 0; font-size: 20px; }
.settings-center-section > p { margin: 0 0 16px; color: var(--text-muted); font-size: 13px; }
.settings-center-card-list { display: grid; gap: 9px; }
.settings-center-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: 10px; width: 100%; min-height: 64px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-sidebar); color: var(--text); text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
.settings-center-card:hover { border-color: var(--link); background: var(--hover); text-decoration: none; }
.settings-center-card-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--bg); font-size: 19px; }
.settings-center-card strong, .settings-center-card small { display: block; }
.settings-center-card strong { font-size: 14px; }
.settings-center-card small { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.settings-center-card-arrow { color: var(--text-muted); font-size: 22px; text-align: right; }
.settings-center-note { padding: 12px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.settings-sidebar-brand { margin-bottom: 4px; }
.settings-sidebar-home { padding: 8px 12px; }
.settings-sidebar-home a { color: var(--text-muted); text-decoration: none; font-size: 12px; }
.settings-sidebar-home a:hover { color: var(--link); text-decoration: none; }
@media (max-width: 700px) { body.settings-standalone .content { padding: 18px 12px 28px; } .settings-center-head { padding-top: 0; } .settings-center-head h1 { font-size: 21px; } .settings-center-layout { grid-template-columns: 1fr; gap: 12px; padding-top: 12px; } .settings-center-nav { display: flex; overflow-x: auto; padding-bottom: 3px; } .settings-center-nav a { flex: 0 0 auto; } }

.article-import-page { width: min(760px, 100%); margin: 0 auto; }
body.article-import-body .content { width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 32px clamp(20px, 4vw, 64px); box-sizing: border-box; }
.article-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 6px 0 18px; border-bottom: 1px solid var(--border); }
.article-import-head h1 { margin: 0 0 6px; border: 0; padding: 0; font-size: 24px; }
.article-import-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.article-import-back { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--link); text-decoration: none; white-space: nowrap; }
.article-import-back:hover { background: var(--hover); text-decoration: none; }
.article-import-card { margin-top: 22px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); box-shadow: 0 6px 20px rgba(27,31,36,.06); }
.article-import-card label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: 13px; }
.article-import-url-row { display: flex; gap: 8px; }
.article-import-url { flex: 1; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; }
.article-import-url:focus { outline: 2px solid color-mix(in srgb, var(--link) 30%, transparent); border-color: var(--link); }
.article-import-submit { min-height: 40px; padding: 7px 15px; border: 1px solid var(--link); border-radius: 7px; background: var(--link); color: #fff; cursor: pointer; font: inherit; white-space: nowrap; }
.article-import-submit:disabled { opacity: .55; cursor: wait; }
.article-import-status { min-height: 22px; margin: 12px 0 0; color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.article-import-status.success { color: #1a7f37; }
.article-import-status.error { color: #cf222e; }
.article-import-help { margin: 16px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.article-import-clipboard { margin-top: 10px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--link); cursor: pointer; font: inherit; }
.article-import-clipboard:hover { background: var(--hover); }
.article-import-clipboard-modal[hidden] { display: none !important; }
.article-import-clipboard-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.4); }
.article-import-clipboard-dialog { width: min(560px, 100%); box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.28); }
.article-import-clipboard-dialog h2 { margin: 0 0 8px; border: 0; padding: 0; font-size: 18px; }
.article-import-clipboard-dialog p { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; }
.article-import-clipboard-link { display: block; max-height: 100px; overflow: auto; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-sidebar); color: var(--text); font: 12px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.article-import-clipboard-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.article-import-clipboard-actions button { min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; }
.article-import-clipboard-actions .primary { border-color: var(--link); background: var(--link); color: #fff; }
@media (max-width: 620px) {
  body.article-import-body .content { padding: 18px 12px 28px; }
  .article-import-head { flex-direction: column; gap: 10px; }
  .article-import-url-row { flex-direction: column; }
  .article-import-submit { width: 100%; }
}

.creation-page { width: 100%; max-width: none; margin: 0; }
body.creation-body .content { width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 28px clamp(16px, 4vw, 56px); box-sizing: border-box; }
.creation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 6px 0 18px; border-bottom: 1px solid var(--border); }
.creation-head h1 { margin: 0 0 6px; border: 0; padding: 0; font-size: 25px; }
.creation-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.creation-back { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--link); text-decoration: none; white-space: nowrap; }
.creation-back:hover { background: var(--hover); text-decoration: none; }
.creation-status { min-height: 22px; margin: 16px 0 0; color: var(--text-muted); font-size: 13px; }
.creation-status.error { color: #cf222e; }
.creation-empty { margin-top: 16px; padding: 20px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); background: var(--bg-sidebar); }
.creation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 16px; }
.creation-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); box-shadow: 0 4px 14px rgba(27,31,36,.05); }
.creation-card h2 { margin: 0 0 6px; border: 0; padding: 0; font-size: 17px; overflow-wrap: anywhere; }
.creation-function-id { display: block; margin: -2px 0 8px; color: var(--text-muted); font: 11px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.creation-card-description { min-height: 38px; margin: 0 0 12px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.creation-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--text-muted); font-size: 12px; }
.creation-version-select { min-height: 32px; max-width: 170px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.creation-detail { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); }
.creation-detail h2 { margin: 0 0 6px; border: 0; padding: 0; font-size: 19px; }
.creation-detail-subtitle { margin: 0 0 16px; color: var(--text-muted); font-size: 12px; }
.creation-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.creation-detail-section h3 { margin: 0 0 8px; border: 0; padding: 0; font-size: 14px; }
.creation-parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.creation-form-field-prompt { grid-column: 1 / -1; }
.creation-form-field-small { display: grid; grid-template-columns: minmax(90px, .28fr) minmax(0, 1fr); column-gap: 10px; align-items: center; }
.creation-form-field-small > label { grid-column: 1; grid-row: 1; margin: 0; color: var(--text); font-weight: 600; }
.creation-form-field-small > label::after { content: '：'; }
.creation-form-field-small > .creation-form-key,
.creation-form-field-small > .creation-form-description { grid-column: 1 / -1; margin: 4px 0 0; }
.creation-form-field-small > .creation-form-key { grid-row: 2; }
.creation-form-field-small > .creation-form-description { grid-row: 3; }
.creation-form-field-small > .creation-form-input-area { grid-column: 2; grid-row: 1; min-width: 0; }
.creation-form-field-small .creation-form-control,
.creation-form-field-small .creation-preset-select { margin: 0; }
.creation-form-field-small:has(.creation-preset-select) { align-items: start; }
.creation-form-field-small:has(.creation-preset-select) > label { padding-top: 8px; }
.creation-form-input-area { min-width: 0; }
.creation-input-list, .creation-output-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.creation-input-item, .creation-output-item { padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); }
.creation-input-item strong, .creation-output-item strong { display: block; font-size: 13px; }
.creation-input-item small, .creation-output-item small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; overflow-wrap: anywhere; }
.creation-options { margin-top: 5px; color: var(--text-muted); font-size: 11px; }
.creation-conflict, .creation-duplicate { margin: 7px 0; font-size: 11px; line-height: 1.45; }
.creation-conflict { color: #cf222e; }
.creation-duplicate { color: #9a6700; }
.creation-run-form { margin-top: 4px; }
.creation-form-field { margin-bottom: 10px; }
.creation-form-field label { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 12px; }
.creation-input-badge { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 999px; background: color-mix(in srgb, var(--link) 14%, transparent); color: var(--link); font-size: 10px; font-weight: 600; vertical-align: 1px; }
.creation-form-key { display: block; margin: -2px 0 5px; color: var(--text-muted); font: 10px/1.35 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.creation-form-description { display: block; margin: -1px 0 6px; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.creation-clear-prompt { margin-top: 6px; min-height: 28px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 11px; }
.creation-clear-prompt:hover { color: var(--link); border-color: var(--link); }
.creation-form-control { width: 100%; min-height: 34px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.creation-form-control:focus { outline: 2px solid color-mix(in srgb, var(--link) 30%, transparent); border-color: var(--link); }
.creation-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.creation-file-picker { display: inline-flex!important; align-items: center; justify-content: center; min-height: 38px; width: fit-content; margin: 2px 0 4px!important; padding: 6px 14px; border: 1px solid var(--link); border-radius: 7px; background: var(--link); color: #fff!important; cursor: pointer; font-size: 13px!important; }
.creation-file-picker:hover { filter: brightness(.94); }
.creation-file-picker:focus-within { outline: 2px solid color-mix(in srgb, var(--link) 32%, transparent); outline-offset: 2px; }
.creation-preset-select { width: 100%; min-height: 34px; margin-bottom: 6px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.creation-file-status { display: block; margin-top: 5px; color: var(--text-muted); font-size: 11px; overflow-wrap: anywhere; }
.creation-file-preview { display: block; width: auto; max-width: 100%; max-height: 200px; margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; object-fit: contain; background: var(--bg); }
.creation-file-preview[hidden] { display: none!important; }
.creation-output-hint { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.creation-form-checkbox { width: 18px; height: 18px; accent-color: var(--link); }
.creation-form-note { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.creation-run-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.creation-submit { min-height: 36px; padding: 6px 14px; border: 1px solid var(--link); border-radius: 7px; background: var(--link); color: #fff; cursor: pointer; font: inherit; }
.creation-submit:disabled { opacity: .55; cursor: wait; }
.creation-submit.is-loading { position: relative; padding-left: 34px; cursor: wait; }
.creation-submit.is-loading::before { content: ''; position: absolute; left: 12px; top: 50%; width: 13px; height: 13px; margin-top: -7px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: creation-spin .75s linear infinite; }
@keyframes creation-spin { to { transform: rotate(360deg); } }
.creation-run { margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); }
.creation-run h3 { margin: 0 0 8px; border: 0; padding: 0; font-size: 15px; }
.creation-run-status { margin: 0; color: var(--text); font-size: 13px; }
.creation-run-meta { margin: 5px 0 10px; color: var(--text-muted); font-size: 11px; }
.creation-run-card { margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.creation-run-card-title { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.creation-run-card > .creation-run-status { margin-top: 5px; }
.creation-run-progress { margin: -5px 0 9px; color: var(--link); font-size: 11px; }
.creation-run-card > .creation-run-asset-info { margin-top: 8px; }
.creation-run-asset-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.creation-run-asset-actions a { margin: 0; }
@media (max-width: 700px) {
  body.creation-body .content { padding: 18px 12px 28px; }
  .creation-head { flex-direction: column; gap: 10px; }
  .creation-detail-columns { grid-template-columns: 1fr; }
  .creation-parameter-grid { grid-template-columns: 1fr; gap: 0; }
  .creation-form-field-prompt { grid-column: 1; }
  .creation-form-field-small { grid-template-columns: 1fr; }
  .creation-form-field-small > label,
  .creation-form-field-small > .creation-form-input-area,
  .creation-form-field-small > .creation-form-key,
  .creation-form-field-small > .creation-form-description { grid-column: 1; grid-row: auto; }
  .creation-form-field-small > label { margin-bottom: 5px; }
}
.creation-layout { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.creation-library { position: sticky; top: 14px; max-height: calc(100vh - 120px); overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); }
.creation-library-head, .creation-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.creation-library-head h2, .creation-section-head h2 { margin: 0; border: 0; padding: 0; font-size: 16px; }
.creation-library-head span { color: var(--text-muted); font-size: 11px; }
.creation-search { width: 100%; min-height: 34px; box-sizing: border-box; margin: 11px 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.creation-grid { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 0; }
.creation-card { display: block; padding: 10px 11px; border-radius: 8px; box-shadow: none; cursor: pointer; }
.creation-card.active { border-color: var(--link); background: color-mix(in srgb, var(--link) 10%, var(--bg-sidebar)); }
.creation-card h2 { margin-bottom: 3px; font-size: 13px; }
.creation-card-description { min-height: 0; margin-bottom: 5px; font-size: 11px; }
.creation-card-meta { margin-top: 0; font-size: 11px; }
.creation-card-meta .creation-version-select { width: 100%; max-width: none; }
.creation-main { min-width: 0; display: grid; gap: 16px; }
.creation-detail { margin-top: 0; }
.creation-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.creation-detail-header > div { min-width: 0; }
.creation-detail-version { flex: 0 0 auto; min-width: 120px; }
.creation-release-notes { margin: 10px 0 14px; padding: 10px 12px; border-left: 3px solid var(--link); border-radius: 5px; background: var(--bg); color: var(--text); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.creation-detail-description { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.creation-section-head { margin-bottom: 10px; }
.creation-section-head button { min-height: 30px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; }
.creation-records { padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-sidebar); }
.creation-records-list { display: grid; gap: 8px; }
.creation-records-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.creation-records-pager button { min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; }
.creation-records-pager button:disabled { opacity: .45; cursor: not-allowed; }
.creation-record { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.creation-record-media { width: 110px; min-height: 78px; max-height: 150px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; place-items: center; overflow: hidden; border-radius: 5px; background: #0f1216; }
.creation-record-media img, .creation-record-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.creation-record-media.single { grid-template-columns: 1fr; }
.creation-record-media a { display: block; width: 100%; height: 78px; overflow: hidden; }
.creation-record-info { min-width: 0; }
.creation-record-title { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.creation-record-meta { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.creation-record-assets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.creation-record-assets a { color: var(--link); font-size: 11px; text-decoration: none; }
.creation-record-assets a:hover { text-decoration: underline; }
.creation-record-asset-line { flex-basis: 100%; display: flex; gap: 6px; min-width: 0; }
.creation-record-asset-name { color: var(--text-muted); overflow-wrap: anywhere; }
.creation-record-parameters { margin-top: 8px; padding: 7px 8px; border-radius: 6px; background: color-mix(in srgb, var(--bg) 72%, var(--border)); }
.creation-record-parameter { display: flex; gap: 8px; margin-top: 3px; font-size: 11px; }
.creation-record-parameter-key { color: var(--text-muted); flex: 0 0 auto; }
.creation-record-parameter-value { min-width: 0; overflow-wrap: anywhere; }
.creation-record-parameter-summary { margin-top: 6px; color: var(--text-muted); font-size: 11px; }
.creation-record-parameter-button { min-height: 28px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--link); cursor: pointer; font: inherit; font-size: 11px; }
.creation-record-parameter-button:disabled { opacity: .55; cursor: not-allowed; }
.creation-parameters-modal[hidden] { display: none !important; }
.creation-parameters-modal { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 18px; background: rgba(5,8,12,.72); }
.creation-parameters-panel { width: min(560px, 96vw); max-height: min(78vh, 620px); overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-sidebar); box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.creation-parameters-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.creation-parameters-head button { min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; }
.creation-parameter-row { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12px; }
.creation-parameter-key { color: var(--text-muted); overflow-wrap: anywhere; }
.creation-parameter-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.creation-parameters-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.creation-run-asset-info { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; }
.creation-asset-filename { color: var(--text-muted); font-size: 11px; overflow-wrap: anywhere; }
.creation-detail h2 { overflow-wrap: anywhere; }
.creation-detail-header .creation-function-id { margin-bottom: 6px; }
.creation-detail-header { margin-bottom: 10px; }
.creation-detail-version { min-width: 130px; }
.creation-release-notes { white-space: pre-wrap; }
.creation-run img, .creation-run video { display: block; max-width: min(560px, 100%); max-height: 360px; margin: 10px 0; object-fit: contain; border-radius: 7px; background: #0f1216; }
.creation-run > a { display: inline-block; margin: 4px 8px 4px 0; color: var(--link); font-size: 12px; }
.creation-preview-modal[hidden] { display: none !important; }
.creation-preview-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 18px; background: rgba(5,8,12,.9); }
.creation-preview-panel { display: flex; flex-direction: column; width: min(96vw, 1180px); height: min(94vh, 860px); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: #11161d; color: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.creation-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 5px 9px; border-bottom: 1px solid rgba(255,255,255,.14); }
.creation-preview-toolbar button { min-height: 30px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.creation-preview-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 10px; background: #080b0f; border-radius: 0 0 9px 9px; }
.creation-preview-stage img, .creation-preview-stage video { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.creation-preview-stage video { width: 100%; height: 100%; }
@media (max-width: 820px) {
  .creation-layout { grid-template-columns: 1fr; }
  .creation-library { position: static; max-height: none; }
  .creation-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 520px) {
  .creation-detail-header { flex-direction: column; }
  .creation-detail-version { width: 100%; }
  .creation-record { grid-template-columns: 1fr; }
  .creation-record-media { width: 100%; min-height: 150px; max-height: 220px; }
  .creation-record-media a { height: 150px; }
  .creation-detail { padding: 12px; }
  .creation-form-control { min-height: 42px; font-size: 16px; }
  textarea.creation-form-control { min-height: 130px; }
  .creation-run-actions { display: block; }
  .creation-submit { width: 100%; min-height: 44px; }
  .creation-record-assets { gap: 8px; }
  .creation-record-assets a, .creation-record-parameter-button { min-height: 32px; display: inline-flex; align-items: center; padding: 5px 9px; }
  .creation-parameter-row { grid-template-columns: 1fr; gap: 3px; }
  .creation-parameters-modal { padding: 8px; }
  .creation-parameters-panel { width: 100%; max-height: 90vh; padding: 12px; }
}
