:root {
  --bg: #f4f1eb;
  --panel: #fbf9f5;
  --panel-2: #efebe4;
  --card: #fffdfa;
  --text: #222026;
  --muted: #77727e;
  --faint: #a49faa;
  --line: rgba(37, 32, 44, .1);
  --line-strong: rgba(37, 32, 44, .18);
  --accent: #6e56e7;
  --accent-2: #8f79ff;
  --accent-soft: rgba(110, 86, 231, .12);
  --orange: #e6814f;
  --shadow: 0 18px 48px rgba(47, 38, 71, .12);
  --radius: 18px;
  --sidebar: 248px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111014;
  --panel: #17161b;
  --panel-2: #1e1d23;
  --card: #1c1b20;
  --text: #f3efe7;
  --muted: #aaa4b0;
  --faint: #74707a;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --accent: #8e78ff;
  --accent-2: #a796ff;
  --accent-soft: rgba(142, 120, 255, .15);
  --orange: #f09a66;
  --shadow: 0 22px 60px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 22px 16px 18px; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); transition: transform .3s ease, background .25s; }
.brand { height: 46px; display: flex; align-items: center; gap: 11px; padding: 0 7px; }
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 21px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 1px; color: var(--faint); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark { position: relative; width: 31px; height: 31px; border-radius: 10px; background: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 6px 18px rgba(110,86,231,.25); transform: rotate(-3deg); }
.brand-mark span { position: absolute; display: block; border: 1.5px solid white; border-radius: 50%; opacity: .94; }
.brand-mark span:nth-child(1) { width: 13px; height: 13px; left: 5px; top: 5px; }
.brand-mark span:nth-child(2) { width: 12px; height: 12px; right: 4px; bottom: 4px; }
.brand-mark span:nth-child(3) { width: 4px; height: 4px; right: 5px; top: 6px; background: white; }

.primary-import { display: flex; align-items: center; gap: 9px; height: 42px; margin: 21px 0 18px; padding: 0 13px; border-radius: 12px; background: var(--accent); color: white; font-size: 13px; font-weight: 650; box-shadow: 0 9px 24px rgba(110,86,231,.25); transition: transform .18s, background .18s; }
.primary-import:hover { transform: translateY(-1px); background: var(--accent-2); }
.primary-import svg { width: 17px; }
.primary-import span { flex: 1; text-align: left; }
kbd { min-width: 28px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(128,128,128,.08); color: var(--faint); font: 10px/1.2 inherit; text-align: center; box-shadow: none; }
.primary-import kbd { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: rgba(255,255,255,.76); }

.nav-stack { display: grid; gap: 3px; }
.nav-item, .collection-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; text-align: left; transition: background .17s, color .17s; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item span { flex: 1; }
.nav-item b { min-width: 20px; color: var(--faint); font-size: 11px; font-weight: 500; text-align: right; }
.nav-item:hover, .collection-row:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; left: -16px; width: 3px; height: 19px; border-radius: 0 3px 3px 0; background: var(--accent); }

.side-section { margin-top: 23px; }
.side-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 8px 10px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.side-heading button { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: transparent; color: var(--faint); }
.side-heading button:hover { background: var(--panel-2); color: var(--text); }
.side-heading svg { width: 14px; height: 14px; }
.collection-nav { display: grid; gap: 2px; }
.collection-entry { position: relative; display: flex; align-items: center; border-radius: 10px; }
.collection-entry.active { background: var(--accent-soft); }
.collection-row { min-height: 34px; padding-right: 32px; }
.collection-entry.active .collection-row { color: var(--accent-2); font-weight: 650; }
.collection-row .color-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color), transparent 82%); }
.collection-row .collection-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-row em { padding: 2px 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent), transparent 86%); color: var(--accent-2); font-size: 7px; font-style: normal; }
.collection-row b { color: var(--faint); font-size: 11px; font-weight: 500; }
.project-delete { position: absolute; right: 5px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; color: var(--faint); opacity: .55; }
.collection-entry:hover .project-delete, .project-delete:focus-visible { opacity: 1; }
.project-delete:hover { background: color-mix(in srgb, #d95b67, transparent 85%); color: #e56a76; }
.project-delete svg { width: 13px; }
.project-empty { display: block; padding: 5px 10px; }
.new-project-row { display: flex; width: 100%; height: 32px; align-items: center; gap: 8px; margin-top: 5px; padding: 0 10px; border: 1px dashed transparent; border-radius: 9px; background: transparent; color: var(--accent-2); font-size: 10px; }
.new-project-row:hover { border-color: color-mix(in srgb, var(--accent), transparent 55%); background: var(--accent-soft); }
.new-project-row svg { width: 13px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 6px; }
.tag-pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; transition: border .17s, color .17s, background .17s; }
.tag-pill:hover, .tag-pill.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.muted-mini { padding: 4px; color: var(--faint); font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding-top: 22px; }
.storage-card { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, var(--panel-2), transparent); }
.storage-icon { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); }
.storage-icon svg { width: 16px; }
.storage-card strong, .storage-card small { display: block; }
.storage-card strong { font-size: 10px; }
.storage-card small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.theme-toggle { display: flex; align-items: center; gap: 9px; width: 100%; height: 34px; padding: 0 10px; border-radius: 9px; background: transparent; color: var(--faint); font-size: 11px; }
.theme-toggle:hover { background: var(--panel-2); color: var(--text); }
.theme-toggle svg { width: 15px; }
[data-theme="dark"] .sun-icon, :root:not([data-theme="dark"]) .moon-icon { display: none; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 clamp(24px, 4vw, 60px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg), transparent 8%); backdrop-filter: blur(18px); }
.mobile-menu { display: none; width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--panel); }
.mobile-menu span { display: block; width: 100%; height: 1.5px; margin: 4px 0; background: var(--text); }
.search-box { display: flex; width: min(490px, 48vw); height: 38px; align-items: center; gap: 9px; padding: 0 10px 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); transition: border .2s, box-shadow .2s; }
.search-box:focus-within { border-color: color-mix(in srgb, var(--accent), transparent 35%); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { width: 16px; color: var(--faint); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.search-box input::placeholder { color: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button, .share-button { display: flex; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); transition: background .17s, color .17s, transform .17s; }
.icon-button { width: 36px; }
.share-button { gap: 7px; padding: 0 13px; font-size: 11px; font-weight: 600; }
.icon-button:hover, .share-button:hover { background: var(--panel-2); color: var(--text); transform: translateY(-1px); }
.icon-button svg, .share-button svg { width: 16px; }
.avatar { width: 34px; height: 34px; margin-left: 5px; border-radius: 50%; background: linear-gradient(145deg, var(--orange), #9a5ce0); color: white; font-size: 9px; font-weight: 700; letter-spacing: .05em; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }

.content { padding: 46px clamp(24px, 4vw, 60px) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-2); font-size: 9px; font-weight: 800; letter-spacing: .23em; }
.page-head h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 4.4vw, 54px); font-weight: 500; letter-spacing: -.045em; line-height: 1.04; }
.page-head > div > p:last-child { max-width: 550px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.head-actions { display: flex; gap: 9px; padding-bottom: 2px; }
.soft-button, .accent-button, .ghost-button { display: inline-flex; height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 10px; font-size: 11px; font-weight: 650; transition: transform .17s, background .17s, color .17s; }
.soft-button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.soft-button svg { width: 13px; transform: rotate(90deg); }
.paste-button svg { width: 14px; transform: none; }
.paste-button kbd { margin-left: 2px; padding: 2px 5px; font-size: 8px; }
.classify-button svg { width: 14px; transform: none; }
.classify-button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.accent-button { background: var(--accent); color: white; box-shadow: 0 9px 24px rgba(110,86,231,.2); }
.accent-button svg { width: 15px; }
.accent-button:hover { background: var(--accent-2); transform: translateY(-1px); }
.accent-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ghost-button { background: transparent; color: var(--muted); }
.ghost-button:hover { background: var(--panel-2); color: var(--text); }

.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)) 1.4fr; margin: 32px 0 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.stats-strip > div { display: flex; min-height: 68px; flex-direction: column; justify-content: center; padding: 12px 20px; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip span { color: var(--faint); font-size: 9px; letter-spacing: .08em; }
.stats-strip strong { margin-top: 4px; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.stats-strip .palette-stat { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.palette-dots { display: flex; align-items: center; }
.palette-dots i { width: 23px; height: 23px; margin-left: -5px; border: 2px solid var(--panel); border-radius: 50%; background: var(--dot); }
.filter-row { display: flex; align-items: center; justify-content: space-between; margin: -10px 0 20px; padding: 10px 13px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); font-size: 11px; }
.filter-row button { display: flex; align-items: center; gap: 4px; background: transparent; color: inherit; font-size: 10px; }
.filter-row svg { width: 12px; }
.selection-bar { position: sticky; z-index: 10; top: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -10px 0 20px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent), transparent 55%); border-radius: 13px; background: color-mix(in srgb, var(--panel), transparent 4%); box-shadow: 0 10px 28px rgba(0,0,0,.12); backdrop-filter: blur(15px); }
.selection-bar > div { display: flex; align-items: center; gap: 8px; }
.selection-bar > div:first-child { min-width: 0; }
.selection-count { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--accent); color: white; font-size: 11px; font-weight: 800; }
.selection-bar strong { font-size: 11px; }
.selection-bar small { color: var(--muted); font-size: 9px; }

.gallery { columns: 4 230px; column-gap: 16px; }
.media-card { position: relative; display: inline-block; width: 100%; margin: 0 0 16px; break-inside: avoid; border: 1px solid var(--line); border-radius: 15px; background: var(--card); overflow: hidden; box-shadow: 0 2px 0 rgba(0,0,0,.015); cursor: pointer; transition: transform .22s ease, border-color .22s, box-shadow .22s; animation: card-in .38s both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.media-card:hover { z-index: 2; border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-3px); }
.media-card.selection-mode { cursor: pointer; }
.media-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); transform: translateY(-2px); }
.card-selector { position: absolute; z-index: 4; top: 10px; left: 10px; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 8px; background: rgba(17,16,20,.72); color: white; backdrop-filter: blur(8px); }
.card-selector svg { width: 14px; height: 14px; opacity: 0; }
.media-card.selected .card-selector { border-color: var(--accent); background: var(--accent); }
.media-card.selected .card-selector svg { opacity: 1; }
.media-card.selection-mode .card-tools { display: none; }
.media-wrap { position: relative; min-height: 150px; background: var(--panel-2); overflow: hidden; }
.media-wrap img, .media-wrap video { display: block; width: 100%; min-height: 140px; max-height: 470px; object-fit: cover; transition: transform .45s ease; }
.media-card:hover .media-wrap img { transform: scale(1.025); }
.card-shade { position: absolute; inset: 0 0 auto; height: 65px; background: linear-gradient(rgba(0,0,0,.45), transparent); opacity: 0; transition: opacity .2s; pointer-events: none; }
.media-card:hover .card-shade { opacity: 1; }
.card-tools { position: absolute; z-index: 2; top: 9px; right: 9px; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.media-card:hover .card-tools, .card-tools:focus-within { opacity: 1; transform: none; }
.card-tool { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: rgba(17,16,20,.72); color: white; backdrop-filter: blur(8px); }
.card-tool:hover, .card-tool.active { background: var(--accent); }
.card-tool svg { width: 14px; height: 14px; }
.card-tool.active svg { fill: currentColor; }
.video-badge { position: absolute; left: 9px; bottom: 9px; display: flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; background: rgba(17,16,20,.75); color: white; font-size: 9px; backdrop-filter: blur(8px); }
.video-badge svg { width: 12px; height: 12px; fill: white; }
.card-info { padding: 13px 13px 12px; }
.card-title-row { display: flex; align-items: flex-start; gap: 8px; }
.card-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 650; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.favorite-mark { width: 14px; height: 14px; color: #e7a84f; fill: currentColor; }
.card-note { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.card-tags span { max-width: 110px; padding: 3px 7px; overflow: hidden; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.card-tags span:first-child { color: var(--text); box-shadow: inset 2px 0 var(--tag-color, var(--accent)); }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--faint); font-size: 8px; }
.color-chip { width: 11px; height: 11px; border: 1px solid rgba(128,128,128,.2); border-radius: 50%; background: var(--chip); }
[data-density="compact"] .gallery { columns: 5 190px; column-gap: 11px; }
[data-density="compact"] .media-card { margin-bottom: 11px; border-radius: 12px; }
[data-density="compact"] .card-info { padding: 10px; }
[data-density="compact"] .card-note, [data-density="compact"] .card-meta { display: none; }

.empty-state { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; padding: 42px; border: 1px dashed var(--line-strong); border-radius: 20px; text-align: center; }
.empty-art { position: relative; width: 170px; height: 130px; margin-bottom: 14px; }
.art-card { position: absolute; width: 92px; height: 112px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 15px 30px rgba(0,0,0,.12); }
.art-one { left: 21px; top: 5px; background: linear-gradient(160deg, #7b63f2 0 48%, #f4a267 48% 67%, #232027 67%); transform: rotate(-9deg); }
.art-one span { position: absolute; right: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; background: #f3df9c; }
.art-two { right: 16px; top: 15px; display: grid; place-items: center; background: linear-gradient(145deg, #314b42, #101211); transform: rotate(8deg); color: white; }
.art-two svg { width: 31px; height: 31px; }
.art-spark { position: absolute; right: 4px; top: 0; color: var(--orange); font-size: 24px; }
.empty-state h2 { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.empty-state p { max-width: 380px; margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.boards-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.boards-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.boards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.board-card { position: relative; min-height: 250px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); cursor: pointer; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.board-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.board-collage { display: grid; height: 150px; grid-template-columns: 1.25fr .75fr; grid-template-rows: 1fr 1fr; gap: 4px; border-radius: 12px; background: var(--panel-2); overflow: hidden; }
.board-collage .board-tile:first-child { grid-row: 1 / 3; }
.board-tile { position: relative; overflow: hidden; background: color-mix(in srgb, var(--board), var(--panel) 70%); }
.board-tile img, .board-tile video { width: 100%; height: 100%; object-fit: cover; }
.board-placeholder { display: grid; height: 150px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--board), transparent 88%), transparent); color: var(--faint); font-size: 11px; }
.board-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; }
.board-meta h3 { margin: 0 0 4px; font-size: 14px; }
.board-meta p { margin: 0; color: var(--muted); font-size: 9px; }
.board-count { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--panel-2); color: var(--faint); font-size: 9px; }
.board-delete { position: absolute; z-index: 2; top: 26px; right: 26px; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: rgba(17,16,20,.72); color: white; opacity: 0; }
.board-card:hover .board-delete { opacity: 1; }
.board-delete svg { width: 14px; }

.backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(7,6,10,.62); backdrop-filter: blur(7px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: fixed; z-index: 50; inset: 50% auto auto 50%; width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 36px); margin: 0; padding: 29px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.modal::backdrop { display: none; }
.modal[open] { animation: modal-in .24s both; }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } }
.modal-close, .inspector-head button { position: absolute; top: 17px; right: 17px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--panel-2); color: var(--muted); }
.modal-close:hover, .inspector-head button:hover { color: var(--text); }
.modal-close svg, .inspector-head button svg { width: 15px; }
.modal-kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--accent-2); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.modal-kicker svg { width: 13px; }
.modal h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 500; }
.modal > p { margin: 7px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.upload-zone { display: flex; min-height: 170px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed color-mix(in srgb, var(--accent), transparent 45%); border-radius: 15px; background: linear-gradient(145deg, var(--accent-soft), transparent 70%); cursor: pointer; transition: border .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone strong { margin: 10px 0 4px; font-size: 12px; }
.upload-zone > span:last-child { color: var(--muted); font-size: 9px; }
.paste-tip { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 10px 0 -2px; color: var(--faint); font-size: 8px; }
.paste-tip kbd { min-width: 27px; padding: 3px 5px; background: var(--card); color: var(--muted); }
.paste-tip i { font-style: normal; }
.paste-tip span { margin-left: 4px; }
.upload-orbit { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent), transparent 55%); border-radius: 50%; background: var(--panel); color: var(--accent-2); box-shadow: 0 0 0 8px var(--accent-soft); }
.upload-orbit svg { width: 19px; }
.file-queue { display: grid; max-height: 160px; gap: 6px; margin-top: 10px; overflow: auto; }
.queue-item { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.queue-thumb { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 7px; background: var(--panel-2); color: var(--faint); overflow: hidden; }
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.queue-thumb svg { width: 16px; }
.queue-info { min-width: 0; }
.queue-info strong, .queue-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-info strong { font-size: 10px; }
.queue-info small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.queue-remove { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; background: transparent; color: var(--faint); }
.queue-remove:hover { background: var(--panel-2); color: #d76161; }
.queue-remove svg { width: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field:first-child { grid-column: 1 / 3; }
.field > span, .color-field > span { color: var(--muted); font-size: 9px; font-weight: 650; }
.field em { color: var(--faint); font-size: 8px; font-style: normal; font-weight: 400; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--card); font-size: 11px; transition: border .2s, box-shadow .2s; }
.field input, .field select { height: 38px; padding: 0 11px; }
.field textarea { padding: 10px 11px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.check-field { display: flex; align-items: center; gap: 9px; padding-top: 16px; cursor: pointer; }
.check-field input { position: absolute; opacity: 0; }
.fake-check { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--card); color: white; }
.fake-check svg { width: 12px; opacity: 0; }
.check-field input:checked + .fake-check { border-color: var(--accent); background: var(--accent); }
.check-field input:checked + .fake-check svg { opacity: 1; }
.check-field strong, .check-field small { display: block; }
.check-field strong { font-size: 9px; }
.check-field small { margin-top: 2px; color: var(--faint); font-size: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 22px; }
.modal-actions .accent-button b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 8px; }
.simple-modal { width: min(440px, calc(100vw - 28px)); }
.simple-modal form { display: grid; gap: 14px; }
.simple-modal .field:first-child { grid-column: auto; }
.color-field { display: grid; gap: 8px; }
.color-options { display: flex; gap: 9px; }
.color-option { width: 25px; height: 25px; border: 3px solid var(--panel); border-radius: 50%; background: var(--color); box-shadow: 0 0 0 1px var(--line); }
.color-option.active { box-shadow: 0 0 0 2px var(--color); }
.classify-project-list { display: grid; max-height: 300px; gap: 7px; overflow-y: auto; }
.project-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.project-choice:hover { border-color: var(--line-strong); background: var(--panel-2); }
.project-choice input { accent-color: var(--accent); }
.project-choice i { width: 10px; height: 10px; border-radius: 50%; background: var(--project); }
.project-choice span { flex: 1; font-size: 11px; font-weight: 650; }
.project-choice small { color: var(--faint); font-size: 8px; }
.new-inline-project { display: flex; width: 100%; height: 40px; align-items: center; justify-content: center; gap: 7px; margin-top: 9px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--accent-2); font-size: 10px; }
.new-inline-project:hover { background: var(--accent-soft); }
.new-inline-project svg { width: 14px; }
.export-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.scope-option { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-align: left; }
.scope-option.active { border-color: var(--accent); background: var(--accent-soft); }
.scope-option strong, .scope-option small { display: block; }
.scope-option strong { font-size: 10px; }
.scope-option small { margin-top: 4px; color: var(--faint); font-size: 8px; }
.privacy-note { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 10px; background: var(--panel-2); }
.privacy-note > svg { width: 18px; height: 18px; color: #59a78c; }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { font-size: 9px; }
.privacy-note small { margin-top: 2px; color: var(--faint); font-size: 8px; }

.inspector { position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; width: min(410px, 92vw); border-left: 1px solid var(--line); background: var(--panel); box-shadow: -24px 0 70px rgba(0,0,0,.28); transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.inspector.open { transform: none; }
.inspector-head { position: sticky; z-index: 2; top: 0; display: flex; height: 58px; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel), transparent 5%); backdrop-filter: blur(12px); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.inspector-head button { position: absolute; top: 13px; right: 14px; }
.detail-media { margin: 18px; border-radius: 14px; background: var(--panel-2); overflow: hidden; }
.detail-media img, .detail-media video { display: block; width: 100%; max-height: 430px; object-fit: contain; }
.detail-form { display: grid; gap: 16px; padding: 2px 20px 28px; }
.detail-title-wrap { display: flex; align-items: center; gap: 8px; }
.detail-title { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid transparent; outline: 0; background: transparent; font: 500 24px/1.3 Georgia, "Songti SC", serif; }
.detail-title:focus { border-bottom-color: var(--accent); }
.favorite-big { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--panel-2); color: var(--faint); }
.favorite-big.active { background: rgba(231,168,79,.15); color: #e7a84f; }
.favorite-big.active svg { fill: currentColor; }
.detail-label { display: block; margin-bottom: 6px; color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.detail-note { width: 100%; min-height: 86px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--card); font-size: 11px; line-height: 1.7; resize: vertical; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.editable-tag { display: flex; align-items: center; gap: 3px; padding: 4px 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 9px; }
.editable-tag button { display: grid; width: 13px; height: 13px; place-items: center; background: transparent; color: var(--faint); }
.editable-tag svg { width: 9px; }
.tag-input { min-width: 80px; flex: 1; height: 25px; border: 0; outline: 0; background: transparent; font-size: 9px; }
.collection-checks, .board-checks { display: grid; gap: 4px; }
.mini-check { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.mini-check:hover { background: var(--panel-2); }
.mini-check input { accent-color: var(--accent); }
.mini-check span { flex: 1; font-size: 10px; }
.mini-check i { width: 7px; height: 7px; border-radius: 50%; background: var(--check); }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meta-cell { padding: 9px; border-radius: 9px; background: var(--panel-2); }
.meta-cell span, .meta-cell strong { display: block; }
.meta-cell span { color: var(--faint); font-size: 8px; }
.meta-cell strong { margin-top: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions { display: flex; gap: 7px; padding-top: 3px; border-top: 1px solid var(--line); }
.detail-actions a { text-decoration: none; }
.detail-actions a svg { transform: none; }

@media (hover: none) {
  .card-tools { opacity: 1; transform: none; }
}
.danger-button { display: flex; height: 36px; align-items: center; gap: 6px; margin-left: auto; padding: 0 11px; border-radius: 9px; background: transparent; color: #d86b6b; font-size: 9px; }
.danger-button:hover { background: rgba(216,107,107,.1); }
.danger-button svg { width: 14px; }

.drop-overlay { position: fixed; z-index: 100; inset: 12px; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: 22px; background: color-mix(in srgb, var(--bg), transparent 8%); backdrop-filter: blur(18px); }
.drop-overlay > div { display: flex; flex-direction: column; align-items: center; }
.drop-overlay svg { width: 40px; height: 40px; color: var(--accent-2); }
.drop-overlay strong { margin: 18px 0 6px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.drop-overlay span { color: var(--muted); font-size: 11px; }
.toast-stack { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; width: min(330px, calc(100vw - 40px)); gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); animation: toast-in .25s both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.toast-icon { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); }
.toast.error .toast-icon { background: rgba(216,107,107,.12); color: #d86b6b; }
.toast-icon svg { width: 13px; }
.toast-content { flex: 1; }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 10px; }
.toast span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.toast button { background: transparent; color: var(--accent-2); font-size: 9px; }

@media (max-width: 1050px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
  .palette-stat { display: none !important; }
  .gallery { columns: 3 210px; }
}

@media (max-width: 760px) {
  :root { --sidebar: 238px; }
  .sidebar { transform: translateX(-105%); box-shadow: 18px 0 50px rgba(0,0,0,.25); }
  .sidebar.mobile-open { transform: none; }
  .main { margin-left: 0; }
  .mobile-menu { display: block; }
  .topbar { height: 62px; padding: 0 14px; }
  .search-box { flex: 1; width: auto; }
  .search-box kbd { display: none; }
  .density-button, .avatar { display: none; }
  .share-button span { display: none; }
  .share-button { width: 36px; padding: 0; }
  .content { padding: 32px 16px 60px; }
  .page-head { align-items: flex-start; }
  .head-actions .soft-button { display: none; }
  .head-actions .paste-button { display: inline-flex; }
  .head-actions .classify-button { display: inline-flex; }
  .paste-button kbd { display: none; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stats-strip > div { min-height: 58px; border-bottom: 1px solid var(--line); }
  .stats-strip > div:nth-child(2) { border-right: 0; }
  .stats-strip > div:nth-child(3), .stats-strip > div:nth-child(4) { border-bottom: 0; }
  .gallery, [data-density="compact"] .gallery { columns: 2 150px; column-gap: 11px; }
  .media-card { margin-bottom: 11px; }
  .selection-bar { top: 72px; align-items: flex-start; }
  .selection-bar small { display: none; }
  .page-head h1 { font-size: 36px; }
}

@media (max-width: 470px) {
  .top-actions .share-button { display: none; }
  .page-head { display: block; }
  .head-actions { margin-top: 18px; }
  .head-actions .accent-button { width: 100%; }
  .head-actions { flex-wrap: wrap; }
  .selection-bar { position: static; flex-direction: column; }
  .selection-bar > div:last-child { width: 100%; justify-content: flex-end; }
  .gallery, [data-density="compact"] .gallery { columns: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field:first-child { grid-column: auto; }
  .modal { padding: 22px 18px; }
  .upload-zone { min-height: 145px; }
  .boards-toolbar { align-items: flex-start; gap: 14px; }
  .boards-toolbar p { display: none; }
}
