:root { 
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #fff;
  --text: #1d1d1f;
  --muted: #6b6b73;
  --line: rgba(30, 30, 40, .09);
  --accent: #252529;
  --accent-hover: #08080a;
  --accent-light: rgba(255, 255, 255, .82);
  --danger: #ab3e36;
  --radius: 16px;
  --sidebar-width: 252px;
  --focus: #575f75;
  --glass: rgba(250, 250, 252, .96);
  --glass-strong: rgba(252, 252, 254, .97);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-shadow: 0 8px 28px rgba(24, 28, 42, .045), inset 0 1px 0 rgba(255, 255, 255, .95);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
 }
* { box-sizing: border-box; }
html { scroll-padding-top: 92px; }
body { margin: 0; background: radial-gradient(ellipse at 10% 5%, #e9edf3 0, transparent 48%), radial-gradient(ellipse at 100% 0, #fdfdfe 0, transparent 60%), var(--bg); background-attachment: fixed; }
::selection { background: #dce2ec; color: #1d1d1f; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
input, select, textarea { min-width: 0; border: 1px solid rgba(30,30,40,.14); border-radius: 12px; background: rgba(255,255,255,.6); padding: 11px 13px; color: var(--text); caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: #8f929b; outline: 2px solid rgba(80,90,115,.16); outline-offset: 2px; }
textarea { resize: vertical; }
svg { width: 20px; height: 20px; display: block; flex-shrink: 0; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; }
button > span:has(svg) { display: inline-flex; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.75; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 20px; top: -70px; z-index: 250; padding: 12px 18px; background: var(--accent); color: white; border-radius: 6px; }
.skip-link:focus { top: 16px; }
.sidebar { 
  position: fixed; inset: 14px auto 14px 14px; width: calc(var(--sidebar-width) - 28px);
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 24px;
  display: flex; flex-direction: column; padding: 28px 12px 18px; z-index: 30; overflow-y: auto;
  -webkit-backdrop-filter: blur(30px) saturate(1.2); backdrop-filter: blur(30px) saturate(1.2);
  box-shadow: var(--glass-shadow);
 }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 22px; padding: 0 12px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 31px; height: 38px; color: #242428; display: grid; place-items: center; }
.brand-mark svg { width: 29px; height: 29px; stroke-width: 1.3; }
.brand small { display: block; font-size: 8px; letter-spacing: 1.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.local-badge { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin: 21px 14px 29px; }
.local-badge i, .storage-line i { width: 4px; height: 4px; border-radius: 50%; background: #8b8c93; flex-shrink: 0; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.main-nav button, .project-nav button { display: flex; align-items: center; gap: 11px; padding: 12px; width: 100%; min-height: 46px; text-align: left; border-radius: 13px; color: #606068; transition: background 180ms, box-shadow 180ms; border: 1px solid transparent; }
.main-nav button > span:nth-child(2), .project-nav .project-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav b, .project-nav b { font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.main-nav button:hover, .project-nav button:hover, .library-tools:hover { background: rgba(255,255,255,.38); color: var(--text); }
.main-nav button.active, .project-nav button.active { background: rgba(255,255,255,.7); color: var(--text); font-weight: 600; border-color: rgba(255,255,255,.9); box-shadow: 0 3px 10px rgba(30,30,45,.05), inset 0 1px 0 white; }
.main-nav button.active b, .project-nav button.active b { color: var(--accent); }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 32px 13px 10px; color: var(--muted); font-size: 10px; font-weight: 500; }
.section-label .icon-button { width: 28px; height: 28px; }
.project-nav { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; max-height: 38vh; overflow: auto; }
.project-nav button { font-size: 12px; min-height: 43px; }
.project-nav svg { width: 18px; height: 18px; }
.archived-projects { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.archived-projects summary { cursor: pointer; margin: 0 12px 8px; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.library-tools { display: flex; align-items: center; gap: 11px; color: #606068; padding: 13px 12px; width: 100%; border-radius: 13px; font-size: 12px; }
.storage-line { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 7px; margin-top: 14px; padding: 18px 12px 0; font-size: 10px; color: var(--muted); }
.storage-line #version { margin-left: auto; font-variant-numeric: tabular-nums; }
.main { margin-left: var(--sidebar-width); min-height: 100vh; }
.main:focus { outline: none; }
.topbar { 
  position: sticky; top: 16px; z-index: 20; height: 56px; margin: 16px 38px 0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; gap: 24px;
  border: 1px solid var(--glass-edge); border-radius: 28px; background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: var(--glass-shadow);
 }
.breadcrumb { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 13px; white-space: nowrap; overflow: hidden; }
.breadcrumb strong { font-weight: 500; color: #525252; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb > span { color: #b1b1b1; }
.search-wrap { display: flex; align-items: center; position: relative; color: var(--muted); min-width: 220px; width: 310px; flex-shrink: 0; }
.search-wrap > span { position: absolute; left: 13px; pointer-events: none; }
.search-wrap svg { width: 17px; height: 17px; }
.search-wrap input { background: transparent; border: 1px solid transparent; border-radius: 20px; width: 100%; font-size: 12px; padding: 9px 68px 9px 36px; }
.search-wrap kbd { position: absolute; right: 6px; border: 1px solid rgba(30,30,40,.1); border-radius: 6px; padding: 2px 6px; font-family: inherit; font-size: 10px; color: var(--muted); pointer-events: none; background: rgba(255,255,255,.35); }
.workspace { max-width: 1800px; margin: auto; padding: 42px 42px 28px; }
.page-heading { display: flex; justify-content: space-between; gap: 28px; align-items: center; margin-bottom: 18px; }
.page-heading > div:first-child { min-width: 0; }
h1 { font-size: 30px; letter-spacing: -.025em; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.page-heading p { font-size: 12px; color: var(--muted); margin-top: 10px; max-width: 65ch; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 24px; padding: 10px 19px; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; min-height: 41px; transition: background 180ms, box-shadow 180ms; }
.button:hover { text-decoration: none; }
.button svg { width: 17px; height: 17px; }
.primary { background: rgba(37,37,41,.92); color: white; border: 1px solid rgba(0,0,0,.75); box-shadow: 0 4px 12px rgba(25,25,30,.12), inset 0 1px 0 rgba(255,255,255,.23); }
.primary:hover { background: #101013; border-color: #101013; box-shadow: 0 5px 16px rgba(25,25,30,.2), inset 0 1px 0 rgba(255,255,255,.2); }
.secondary { background: var(--glass); border: 1px solid var(--glass-edge); color: #414148; box-shadow: 0 2px 8px rgba(25,25,40,.035), inset 0 1px 0 white; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.secondary:hover { background: rgba(255,255,255,.9); border-color: white; box-shadow: 0 3px 12px rgba(25,25,40,.07), inset 0 1px 0 white; }
.small { padding: 7px 12px; min-height: 34px; font-size: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: rgba(30,30,40,.06); color: var(--text); }
.icon-button svg { width: 18px; height: 18px; }
.overview { display: flex; align-items: center; gap: 20px; padding: 0 0 30px; color: var(--muted); font-size: 11px; }
.overview > div { display: flex; align-items: center; gap: 7px; }
.overview > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.overview svg { width: 16px; height: 16px; color: #828282; }
.overview strong { font-weight: 500; color: #4b4b53; font-size: 12px; font-variant-numeric: tabular-nums; }
.overview-hint { margin-left: auto; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.overview-hint svg { width: 14px; height: 14px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.type-tabs { display: flex; align-items: center; gap: 25px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.type-tabs::-webkit-scrollbar { display: none; }
.type-tabs button { min-height: 47px; position: relative; font-size: 13px; white-space: nowrap; color: var(--muted); padding: 0 2px; }
.type-tabs button:hover { color: var(--accent); }
.type-tabs button.active { color: var(--accent); font-weight: 600; }
.type-tabs button.active::after { position: absolute; content: ""; height: 2px; bottom: 0; left: 0; right: 0; background: var(--accent); }
.type-tabs button:focus-visible { outline-offset: -4px; }
.view-controls { display: flex; gap: 12px; align-items: center; padding-bottom: 7px; flex-shrink: 0; }
.view-controls select { font-size: 12px; border: 1px solid transparent; background: transparent; padding: 7px 4px; color: #636363; }
.view-switch { border: 1px solid var(--glass-edge); border-radius: 20px; display: flex; padding: 3px; background: var(--glass); gap: 2px; box-shadow: 0 2px 8px rgba(30,30,45,.04), inset 0 1px 0 white; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.view-switch button { width: 31px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.view-switch svg { width: 16px; height: 16px; }
.view-switch button.active { color: var(--text); background: rgba(255,255,255,.85); box-shadow: 0 2px 5px rgba(30,30,45,.1); }
.filter-row { min-height: 68px; padding: 17px 0; display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 4px 17px; }
.filter-tags:empty::before { content: "标签可帮助你更快找到素材"; font-size: 11px; line-height: 32px; color: var(--muted); }
.filter-tags button { border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; padding: 5px 0; font-size: 11px; color: var(--muted); min-height: 28px; line-height: 1.6; display: inline-flex; align-items: center; gap: 4px; }
.filter-tags button.active { background: transparent; border-bottom-color: #44444b; color: var(--text); }
.filter-tags button:hover { color: var(--text); border-bottom-color: #a0a0a7; }
.filter-tags .clear-filters { color: var(--accent); border-color: transparent; background: transparent; }
.clear-filters svg { width: 13px; height: 13px; }
.filter-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; min-height: 30px; }
#filter-result { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.text-button { color: #656565; font-size: 12px; white-space: nowrap; padding: 7px 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.text-button svg { width: 15px; height: 15px; }
#select-toggle[aria-pressed="true"] { color: var(--accent); font-weight: 600; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 30px 24px; }
.asset-grid[aria-busy="true"] .asset-card { opacity: .6; pointer-events: none; }
.asset-card { border: 0; border-radius: 0; background: transparent; transition: opacity 180ms; position: relative; min-width: 0; cursor: pointer; }
.asset-card:hover { box-shadow: none; }
.asset-card:focus-visible { outline-offset: 3px; }
.asset-preview { aspect-ratio: 1.48; background: rgba(231,232,237,.55); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; transition: box-shadow 180ms; }
.asset-preview img { width: 100%; height: 100%; object-fit: contain; }
.asset-preview .file-symbol { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #85858e; }
.asset-preview .file-symbol svg { width: 44px; height: 44px; stroke-width: 1.2; }
.file-symbol small { font-size: 11px; letter-spacing: 1.6px; font-weight: 600; }
.font-symbol { font-family: Georgia, serif; font-size: 56px; color: #73737e; }
.card-kind { position: absolute; left: 11px; bottom: 11px; padding: 4px 8px; background: rgba(255,255,255,.76); font-size: 9px; color: #4f4f57; border: 1px solid rgba(255,255,255,.8); border-radius: 12px; line-height: 1.5; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.card-check { position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(255,255,255,.76); color: transparent; display: grid; place-items: center; opacity: 0; z-index: 2; padding: 0; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 2px 8px rgba(20,20,35,.08); }
.card-check svg { width: 16px; height: 16px; }
.selecting .card-check, .asset-card:hover .card-check, .asset-card:focus-within .card-check, .asset-card.selected .card-check { opacity: 1; }
.asset-card.selected .card-check { background: #2b2b30; border-color: rgba(255,255,255,.7); color: white; }
.card-favorite { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(255,255,255,.76); color: #45454d; display: grid; place-items: center; opacity: 0; z-index: 2; padding: 0; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 2px 8px rgba(20,20,35,.08); }
.asset-card:hover .card-favorite, .asset-card:focus-within .card-favorite, .card-favorite.is-favorite { opacity: 1; }
.card-favorite:hover { color: #966a1d; }
.card-favorite.is-favorite { color: #8d641e; }
.card-favorite svg { width: 16px; height: 16px; }
.card-favorite.is-favorite svg { fill: #eacc7d; }
.card-info { padding: 13px 2px 0; }
.card-info h3 { font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; line-height: 1.65; color: var(--text); }
.card-meta { display: flex; gap: 7px; align-items: center; margin-top: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.card-meta > span:last-child { flex-shrink: 0; }
.card-project { min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 70%; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #bababa; flex-shrink: 0; }
.card-tags { display: flex; align-items: center; gap: 9px; margin-top: 8px; white-space: nowrap; overflow: hidden; min-height: 18px; }
.card-tags span { font-size: 10px; background: transparent; color: var(--muted); padding: 0; line-height: 1.6; }
.card-tags .more-tags { background: transparent; padding-left: 1px; }
.asset-grid.list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.list .asset-card { display: flex; align-items: center; padding: 14px 8px; gap: 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.list .asset-card:hover { background: rgba(255,255,255,.45); box-shadow: none; }
.list .asset-card.selected { background: rgba(255,255,255,.72); }
.list .asset-preview { height: 64px; width: 86px; aspect-ratio: auto; border-radius: 5px; flex-shrink: 0; }
.list .card-info { display: flex; gap: 24px; align-items: center; flex: 1; padding: 0; min-width: 0; }
.list .card-info h3 { flex: 1; min-width: 0; }
.list .card-meta { width: 165px; margin: 0; flex-shrink: 0; }
.list .card-tags { width: 170px; margin: 0; flex-shrink: 0; }
.list .card-kind { display: none; }
.list .card-check { top: 6px; left: 6px; }
.list .card-favorite { position: static; opacity: 1; order: 3; flex-shrink: 0; }
.list .asset-preview .file-symbol svg { width: 27px; height: 27px; }
.list .file-symbol small { display: none; }
.list .font-symbol { font-size: 32px; }
.asset-skeleton { border: 0; border-radius: var(--radius); overflow: hidden; background: transparent; padding-bottom: 20px; }
.skeleton-preview { aspect-ratio: 1.48; background: #e7e7eb; border-radius: var(--radius); }
.skeleton-line { height: 12px; margin: 18px 16px 0; background: #eaeaea; border-radius: 3px; width: 68%; }
.skeleton-line.short { width: 44%; height: 9px; margin-top: 12px; }
.empty-state { padding: 75px 20px 85px; text-align: center; border: 0; border-radius: 0; background: transparent; }
.empty-state > span { display: inline-flex; color: #7c7c7c; margin-bottom: 22px; }
.empty-state svg { width: 54px; height: 54px; stroke-width: 1.1; }
.empty-state h2 { font-size: 20px; font-weight: 600; }
.empty-state p { font-size: 13px; color: var(--muted); margin: 12px auto 24px; max-width: 420px; }
.load-more { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; margin: 30px 0 24px; font-size: 11px; color: var(--muted); }
.selection-bar { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-width) / 2); transform: translateX(-50%); display: flex; align-items: center; gap: 20px; padding: 12px 16px 12px 22px; background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-edge); border-radius: 28px; box-shadow: 0 8px 32px rgba(24,28,42,.1), inset 0 1px 0 white; z-index: 35; max-width: calc(100vw - var(--sidebar-width) - 40px); white-space: nowrap; font-size: 12px; -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4); }
.selection-bar button { font-size: 12px; color: #50505a; white-space: nowrap; padding: 8px 0; }
.selection-bar button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.selection-bar .icon-button { width: 28px; color: #50505a; }
.selection-bar :focus-visible { outline-color: var(--focus); }
.bar-divider { height: 18px; width: 1px; background: var(--line); }
.danger-text { color: var(--danger) !important; }
.selection-bar .danger-text { color: var(--danger) !important; }
.drop-overlay { position: fixed; inset: 16px; background: var(--glass-strong); z-index: 100; border: 1px solid var(--glass-edge); border-radius: 30px; display: flex; align-items: center; justify-content: center; flex-direction: column; pointer-events: none; gap: 15px; color: var(--text); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px rgba(30,30,40,.08); }
.drop-overlay svg { width: 56px; height: 56px; stroke-width: 1.3; }
.drop-overlay h2 { font-size: 24px; }
.drop-overlay p { color: var(--muted); }
.drawer-scrim { position: fixed; inset: 0; background: rgba(20,20,30,.12); z-index: 40; }
.detail-drawer { position: fixed; right: 12px; top: 12px; bottom: 12px; width: 500px; max-width: calc(100% - 24px); background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: 26px; z-index: 41; overflow-y: auto; box-shadow: 0 20px 60px rgba(20,25,40,.16), inset 0 1px 0 white; -webkit-backdrop-filter: blur(34px) saturate(1.25); backdrop-filter: blur(34px) saturate(1.25); animation: drawer-in 220ms cubic-bezier(.16,1,.3,1); }
@keyframes drawer-in { from { transform: translateX(35px); } to { transform: translateX(0); } }
.drawer-top { position: sticky; top: 0; z-index: 3; background: var(--glass-strong); border-bottom: 1px solid var(--line); padding: 17px 24px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.detail-preview { min-height: 190px; max-height: 400px; background: rgba(225,225,231,.4); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-preview img { max-width: 100%; max-height: 400px; object-fit: contain; }
.detail-preview video { width: 100%; max-height: 350px; }
.detail-preview audio { width: 90%; margin: 40px 0; }
.detail-preview iframe { width: 100%; height: 380px; border: 0; }
.detail-preview pre { white-space: pre-wrap; overflow: auto; max-height: 350px; margin: 0; padding: 20px; font: 12px/1.8 monospace; color: #545454; width: 100%; }
.detail-preview .file-symbol { padding: 40px; display: flex; align-items: center; flex-direction: column; gap: 10px; color: #7d7d7d; }
.detail-preview .file-symbol svg { width: 44px; height: 44px; }
.detail-form { padding: 24px 26px 30px; }
.detail-actions { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.detail-actions .button { flex: 1; }
.detail-file-meta { border-top: 1px solid var(--line); padding: 20px 0 0; margin-top: 24px; display: grid; grid-template-columns: 65px 1fr; gap: 11px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.detail-file-meta dd { margin: 0; color: #606060; overflow-wrap: anywhere; }
.detail-file-meta dt { margin: 0; }
.detail-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }
.detail-bottom .button { min-width: 110px; }
.detail-link { font-size: 12px; display: flex; gap: 5px; align-items: center; margin: 8px 0 18px; }
.detail-link svg { width: 13px; height: 13px; }
.font-preview { font-size: 38px; line-height: 1.7; padding: 30px; text-align: center; color: #616161; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--glass-edge); border-radius: 28px; padding: 30px 32px; width: 520px; max-width: calc(100vw - 32px); color: var(--text); background: var(--glass-strong); box-shadow: 0 24px 80px rgba(20,25,40,.18), inset 0 1px 0 white; max-height: calc(100dvh - 48px); overflow: auto; -webkit-backdrop-filter: blur(36px) saturate(1.25); backdrop-filter: blur(36px) saturate(1.25); }
dialog::backdrop { background: rgba(20,20,30,.17); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 26px; }
.dialog-heading h2 { font-size: 22px; font-weight: 600; }
.dialog-heading p { font-size: 12px; color: var(--muted); margin-top: 8px; }
.dialog-heading .icon-button { margin: -3px -8px 0 0; }
label { display: flex; flex-direction: column; gap: 9px; margin: 0 0 19px; font-size: 12px; font-weight: 500; color: #565656; }
label input, label textarea, label select { width: 100%; font-size: 13px; font-weight: 400; }
label .optional { font-size: 11px; color: var(--muted); font-weight: 400; }
.checkbox-label { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; }
.checkbox-label input { width: auto; accent-color: var(--accent); }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-error { color: var(--danger); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.upload-zone { border: 1px dashed rgba(30,30,40,.23); border-radius: 18px; display: flex; flex-direction: column; align-items: center; padding: 30px 15px; margin: 0 0 19px; background: rgba(255,255,255,.25); cursor: pointer; text-align: center; }
.upload-zone.dragging { background: rgba(255,255,255,.85); border-color: #6b6b75; }
.upload-zone > span { color: #6d6d6d; margin-bottom: 15px; }
.upload-zone svg { width: 30px; height: 30px; stroke-width: 1.3; }
.upload-zone strong { font-size: 14px; font-weight: 500; color: #505050; }
.upload-zone p { font-size: 11px; color: var(--muted); margin: 8px 0 19px; }
.upload-zone > div { display: flex; align-items: center; gap: 18px; }
.upload-files { max-height: 150px; overflow: auto; margin-bottom: 16px; display: flex; flex-direction: column; gap: 5px; }
.upload-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f3f3f3; border-radius: 5px; font-size: 11px; color: #626262; }
.upload-file .file-label { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-file .icon-button { width: 26px; height: 26px; }
.upload-file svg { width: 15px; height: 15px; }
.import-metadata { font-size: 12px; color: #626262; margin-top: 5px; }
.import-metadata summary { cursor: pointer; margin-bottom: 16px; padding: 5px 0; }
.progress-track { height: 5px; background: #ececec; border-radius: 4px; overflow: hidden; margin-top: 20px; }
.progress-track i { height: 100%; display: block; background: var(--accent); width: 0; transition: width 160ms; }
#progress-text { font-size: 12px; color: var(--muted); margin-top: 8px; }
#tools-dialog { width: 560px; }
.data-location { display: flex; align-items: center; gap: 13px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.8); border-radius: 16px; padding: 16px; margin-bottom: 10px; color: #72727c; }
.data-location > div { flex: 1; min-width: 0; }
.data-location strong { font-size: 12px; font-weight: 500; color: #575757; }
.data-location code { display: block; font-size: 11px; color: #6d6d6d; margin-top: 7px; overflow-wrap: anywhere; line-height: 1.7; }
.tool-row { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; gap: 15px; align-items: center; justify-content: space-between; }
.tool-row h3 { font-size: 14px; font-weight: 500; color: #505050; }
.tool-row p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tools-note { font-size: 11px; line-height: 1.9; color: var(--muted); padding-top: 20px; }
.tool-status { font-size: 12px; color: var(--accent); line-height: 1.8; margin-top: 15px; }
.toast-container { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: min(400px, calc(100vw - 32px)); }
.toast { padding: 13px 18px; background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-edge); border-radius: 20px; box-shadow: 0 8px 28px rgba(24,28,42,.1), inset 0 1px 0 white; font-size: 13px; line-height: 1.7; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.toast.error { background: #fff2ee; color: #933f36; border-color: #e6c8c4; }
.mobile-menu, .mobile-scrim { display: none; }
#error-banner { border: 1px solid #dbaaa4; color: #933f36; background: #fff2ee; border-radius: 8px; padding: 14px; font-size: 13px; margin-bottom: 20px; }
.confirm-message { font-size: 13px; line-height: 1.9; color: #626262; }
.button.destructive { background: #ab3e36; border-color: #ab3e36; }
.pdf-preview-hint { text-align: center; font-size: 11px; color: var(--muted); padding: 10px; background: #f4f4f4; }
.preview-fallback { font-size: 13px; padding: 35px; color: var(--muted); line-height: 1.8; }

.asset-card:hover .asset-preview { box-shadow: 0 6px 20px rgba(20,25,40,.08); }
.asset-card.selected .asset-preview { box-shadow: 0 0 0 2px #55555e; }
.asset-preview:has(img) .card-kind { display: none; }
.project-view .card-project, .project-view .card-meta .dot { display: none; }
.card-tags span + span::before { content: "·"; padding-right: 9px; color: #9c9ca4; }
.card-tags .more-tags::before { content: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255,255,255,.46); --glass-strong: rgba(250,250,252,.82); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: #f8f8fa; --glass-strong: #fcfcfd; }
  .sidebar, .topbar, .view-switch, .secondary, .detail-drawer, .drawer-top, dialog, .selection-bar, .toast, .card-kind, .card-check, .card-favorite, .drop-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card-kind, .card-check, .card-favorite { background: #f8f8fa; }
  .asset-card.selected .card-check { background: #2b2b30; }
}

@media (max-width: 1280px) {
  :root { --sidebar-width: 236px; }
  .workspace { padding: 30px 28px 24px; }
  .topbar { margin-left: 28px; margin-right: 28px; padding: 0 17px; }
  .type-tabs { gap: 17px; }
  .type-tabs button { font-size: 12px; }
  .overview-hint { display: none; }
  .list .card-tags { display: none; }
  .asset-grid { gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .filter-actions { gap: 12px; }
  #filter-result { display: none; }
}
@media (max-width: 1050px) {
  :root { --sidebar-width: 218px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .breadcrumb { display: none; }
  .search-wrap { width: 100%; }
  .page-heading { align-items: flex-start; gap: 16px; }
  .page-heading h1 { font-size: 25px; }
  .heading-actions { flex-direction: column-reverse; }
  .heading-actions .button { padding: 9px 12px; font-size: 12px; min-height: 39px; }
  .toolbar { flex-wrap: wrap; gap: 0; }
  .type-tabs { width: 100%; gap: 23px; }
  .view-controls { width: 100%; justify-content: flex-end; padding: 10px 0; }
  .type-tabs button { min-height: 44px; }
  .selection-bar { flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
  .list .card-meta { width: 80px; }
  .list .card-project, .list .dot { display: none; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 264px; }
  .sidebar { transform: translateX(calc(-100% - 20px)); transition: transform 220ms cubic-bezier(.16,1,.3,1); visibility: hidden; background: var(--glass-strong); }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .mobile-scrim:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(20,20,30,.16); z-index: 29; }
  .main { margin-left: 0; }
  .mobile-menu { display: flex; width: 38px; height: 38px; }
  .topbar { top: 10px; height: 52px; margin: 10px 14px 0; padding: 0 9px; gap: 6px; }
  .search-wrap { min-width: 0; flex-shrink: 1; }
  .search-wrap input { padding-right: 14px; }
  .search-wrap kbd { display: none; }
  .workspace { padding: 30px 20px 22px; }
  .page-heading { gap: 12px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 12px; margin-top: 9px; }
  .heading-actions { gap: 7px; }
  .heading-actions .button { padding: 9px 12px; min-height: 40px; }
  .overview { padding-bottom: 18px; gap: 18px; }
  .overview > div + div { padding-left: 18px; }
  .type-tabs { gap: 23px; }
  .type-tabs button { min-height: 46px; }
  .view-controls { padding: 8px 0; }
  .view-switch button { width: 34px; height: 30px; }
  .filter-row { gap: 12px; min-height: 62px; }
  .filter-tags { gap: 6px; }
  .filter-tags button { font-size: 11px; min-height: 32px; padding: 5px 8px; }
  .filter-tags:empty::before { font-size: 10px; }
  #select-toggle { min-height: 32px; font-size: 11px; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .asset-preview { aspect-ratio: 1.3; }
  .card-info { padding: 12px 1px 0; }
  .card-info h3 { font-size: 12px; }
  .card-meta { font-size: 10px; }
  .card-project { display: none; }
  .card-meta .dot { display: none; }
  .card-tags { margin-top: 10px; }
  .card-tags span { font-size: 9px; padding: 0; }
  .card-favorite { opacity: 1; width: 32px; height: 32px; right: 7px; top: 7px; }
  .card-check { width: 30px; height: 30px; left: 7px; top: 7px; }
  .card-kind { left: 9px; bottom: 9px; font-size: 9px; }
  .selection-bar { left: 50%; max-width: calc(100vw - 28px); width: max-content; bottom: 14px; padding: 10px 14px; }
  .bar-divider { display: none; }
  .list .card-info { display: block; }
  .list .card-info h3 { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
  .list .card-meta { display: flex; width: auto; margin-top: 6px; }
  .list .asset-card { gap: 12px; padding: 12px 6px; }
  .list .asset-preview { width: 65px; height: 54px; }
  .toast-container { right: 16px; bottom: 18px; }
  .detail-drawer { width: min(480px, 100%); }
  dialog { padding: 24px 22px; }
  .empty-state { padding: 50px 18px 60px; }
}
@media (max-width: 420px) {
  .workspace { padding-left: 16px; padding-right: 16px; }
  .page-heading { flex-wrap: wrap; }
  .heading-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  .page-heading h1 { font-size: 23px; }
  .asset-grid { gap: 24px 14px; }
  .card-info { padding: 11px 1px 0; }
  .card-tags span:nth-child(n+3) { display: none; }
  .filter-tags { max-width: 100%; }
  .filter-tags:empty::before { content: "按标签整理素材"; }
  .filter-actions { align-self: flex-start; }
  .tool-row { flex-wrap: wrap; }
  .detail-form { padding: 22px 20px; }
  .dialog-heading h2 { font-size: 20px; }
}
@media (hover: none) {
  .card-favorite { opacity: 1; }
  .card-check, .card-favorite { min-width: 36px; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px; }
.auth-panel { width: 360px; max-width: 100%; padding: 36px; border: 1px solid var(--glass-edge); border-radius: 30px; background: var(--glass-strong); box-shadow: 0 18px 64px rgba(24,28,42,.08), inset 0 1px 0 white; -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.auth-mark { width: 38px; height: 38px; margin-bottom: 23px; stroke-width: 1.3; }
.auth-panel h1 { font-size: 28px; margin-bottom: 8px; }
.auth-panel > p { color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.auth-panel .button { width: 100%; margin-top: 8px; }
.auth-panel .auth-note { margin: 24px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
#auth-error { font-size: 12px; margin-bottom: 10px; }
#cloud-logout { font-size: 11px; padding: 8px 10px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
@media(max-width:760px) { #cloud-logout { padding: 8px 5px; } .auth-screen { padding: 20px; } .auth-panel { padding: 32px; } }
