:root {
  color-scheme: light;
  --radius: .75rem;
  --radius-sm: calc(var(--radius) * .5);
  --radius-md: calc(var(--radius) * .75);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.85);
  --background: #fbfaf8;
  --foreground: #232824;
  --card: #ffffff;
  --card-foreground: #232824;
  --popover: #ffffff;
  --popover-foreground: #232824;
  --primary: #35634c;
  --primary-foreground: #ffffff;
  --secondary: #edf2ed;
  --secondary-foreground: #35634c;
  --muted: #f2f1ed;
  --muted-foreground: #747a73;
  --accent: #eeeee8;
  --accent-foreground: #232824;
  --destructive: #b54740;
  --destructive-foreground: #ffffff;
  --border: #e6e7df;
  --input: #dddfd7;
  --ring: #638d71;
  --sidebar: #f4f4ee;
  --sidebar-foreground: #424b41;
  --sidebar-primary: #35634c;
  --sidebar-primary-foreground: #35634c;
  --sidebar-accent: #e5ece2;
  --sidebar-accent-foreground: #35634c;
  --sidebar-border: #e3e5da;
  --sidebar-ring: #638d71;
  --success: #35634c;
  --success-background: #edf3eb;
  --warning: #99702e;
  --warning-background: #f8f1e2;
  --destructive-background: #fbedea;
  --overlay: #18231db0;
  --shadow: #14231c24;
  --illustration: #d7e1d0;
  --story-background: #edf0e5;
  --story-foreground: #334735;
  --duration: 160ms;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

:root.dark {
  color-scheme: dark;
  --background: #171c19;
  --foreground: #e4e9e2;
  --card: #1e2520;
  --card-foreground: #e4e9e2;
  --popover: #202821;
  --popover-foreground: #e4e9e2;
  --primary: #a8c3a6;
  --primary-foreground: #18291e;
  --secondary: #2c372d;
  --secondary-foreground: #bbd0b7;
  --muted: #242c25;
  --muted-foreground: #9da79d;
  --accent: #2c362d;
  --accent-foreground: #e4e9e2;
  --destructive: #e9a39a;
  --destructive-foreground: #351c18;
  --border: #ffffff16;
  --input: #ffffff26;
  --ring: #98b694;
  --sidebar: #1c231d;
  --sidebar-foreground: #c7d0c2;
  --sidebar-primary: #b4ccae;
  --sidebar-primary-foreground: #b4ccae;
  --sidebar-accent: #2b392c;
  --sidebar-accent-foreground: #bbd0b7;
  --sidebar-border: #ffffff16;
  --sidebar-ring: #98b694;
  --success: #b2cea8;
  --success-background: #2a392b;
  --warning: #dbc392;
  --warning-background: #3a3223;
  --destructive-background: #3a2725;
  --overlay: #060c08c7;
  --shadow: #00000055;
  --illustration: #455641;
  --story-background: #222e23;
  --story-foreground: #d5e3ce;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--background); scroll-padding-top: 82px; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.6; color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, textarea { color: inherit; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
button, a, input, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); }
input, textarea { width: 100%; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--card); padding: 10px 12px; font-size: 14px; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--ring); outline: 2px solid color-mix(in srgb, var(--ring) 22%, transparent); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: .8; }
textarea { resize: vertical; min-height: 72px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
p, h1, h2, h3, h4 { margin: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.small { width: 15px; height: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted-foreground); }
.eyebrow { display: block; color: var(--primary); font-size: 10px; letter-spacing: 2px; font-weight: 650; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 39px; padding: 8px 15px; border: 1px solid transparent; border-radius: var(--radius-md); font-size: 13px; font-weight: 550; line-height: 1.5; white-space: nowrap; transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), opacity var(--duration) var(--ease); }
.button.primary { background: var(--primary); color: var(--primary-foreground); }
.button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 88%, var(--foreground)); }
.button.outline { background: var(--card); border-color: var(--border); color: var(--foreground); }
.button.outline:hover:not(:disabled) { background: var(--accent); border-color: var(--input); }
.button.secondary { color: var(--secondary-foreground); background: var(--secondary); }
.button.destructive { color: var(--destructive-foreground); background: var(--destructive); }
.button.destructive:hover:not(:disabled) { opacity: .85; }
.button.small-button { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 35px; height: 35px; padding: 7px; border-radius: var(--radius-md); background: transparent; color: var(--muted-foreground); transition: background var(--duration), color var(--duration); }
.icon-button:hover:not(:disabled) { color: var(--foreground); background: var(--accent); }
.icon-button.compact { width: 27px; height: 27px; padding: 5px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 550; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.button-group { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet-enter { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
.boot-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted-foreground); font-size: 12px; }
.boot-screen .brand-mark { margin-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: 1px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 42px; background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius-md); transform: rotate(-4deg); }
.brand-mark .icon { width: 22px; height: 22px; transform: rotate(4deg); }
.brand-mark.large { width: 50px; height: 55px; }
.brand-mark.large .icon { width: 29px; height: 29px; }
.brand-en { display: block; margin-top: 3px; color: var(--muted-foreground); font-size: 8px; font-weight: 500; letter-spacing: 1.6px; }

/* 登录 */
.login-view { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); min-height: 100dvh; }
.login-story { display: flex; flex-direction: column; padding: 45px 10%; background: var(--story-background); color: var(--story-foreground); overflow: hidden; }
.login-story .brand { align-self: flex-start; }
.story-copy { margin: auto 0; padding: 65px 0 28px; }
.story-copy .eyebrow { font-size: 10px; letter-spacing: 2.4px; }
.story-copy h1 { margin-top: 23px; font-size: clamp(35px, 3.4vw, 51px); font-weight: 550; line-height: 1.45; letter-spacing: -1.5px; }
.story-copy > p { margin-top: 22px; line-height: 2; opacity: .76; font-size: 14px; }
.story-foot { display: flex; gap: 7px; align-items: center; font-size: 11px; opacity: .7; margin-top: 24px; }
.story-foot .icon { width: 14px; height: 14px; }
.story-illustration { position: relative; width: 290px; height: 210px; margin-top: 45px; }
.illustration-orbit { position: absolute; inset: 9px -12px -24px; border: 1px solid var(--illustration); border-radius: 50%; transform: rotate(-16deg); opacity: .8; }
.paper { position: absolute; width: 170px; height: 175px; border: 1px solid var(--illustration); border-radius: var(--radius-lg); background: var(--card); padding: 25px 23px; }
.paper-back { left: 34px; top: 7px; transform: rotate(-11deg); background: color-mix(in srgb, var(--card) 45%, var(--story-background)); }
.paper span { display: block; height: 5px; margin-bottom: 11px; border-radius: 3px; background: var(--illustration); }
.paper span:nth-last-of-type(1) { width: 62%; }
.paper-front { top: 27px; left: 88px; transform: rotate(9deg); }
.paper-front > .icon { margin-bottom: 18px; color: var(--primary); width: 25px; height: 25px; }
.paper-label { margin-top: 12px; color: var(--muted-foreground); font-size: 9px; letter-spacing: .7px; }
.floating-tag { position: absolute; top: 141px; left: 7px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius-md); transform: rotate(-5deg); font-size: 11px; }
.floating-tag .icon { width: 14px; height: 14px; }
.login-panel { min-width: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 70px 35px; background: var(--card); }
.login-form-wrap { width: 100%; max-width: 345px; }
.login-form-wrap h2 { font-size: 27px; font-weight: 600; letter-spacing: -.7px; margin-top: 13px; }
.login-description { font-size: 13px; margin-top: 10px; }
#login-form { margin-top: 36px; }
.password-field { display: flex; align-items: center; border: 1px solid var(--input); background: var(--background); border-radius: var(--radius-md); margin-top: 9px; padding-right: 4px; }
.password-field:focus-within { outline: 2px solid color-mix(in srgb, var(--ring) 22%, transparent); border-color: var(--ring); }
.password-field input { height: 45px; padding: 11px 13px; border: 0; outline: none; background: transparent; min-width: 0; }
.login-submit { width: 100%; margin-top: 23px; height: 44px; justify-content: space-between; padding-inline: 16px; }
.login-privacy { margin-top: 21px; color: var(--muted-foreground); display: flex; justify-content: center; gap: 6px; font-size: 10px; align-items: center; }
.login-privacy .icon { width: 12px; height: 12px; }
.login-bottom { position: absolute; bottom: 28px; font-size: 11px; color: var(--muted-foreground); letter-spacing: 1px; }
.login-mobile-brand { display: none; }

/* 主界面 */
.app-layout { min-height: 100dvh; }
.sidebar { width: 245px; height: 100dvh; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--sidebar-border); color: var(--sidebar-foreground); z-index: 20; padding: 30px 19px 16px; }
.sidebar > .brand { margin: 0 12px 31px; }
.workspace-label { display: flex; gap: 10px; align-items: center; padding: 12px 9px; margin-bottom: 25px; border-top: 1px solid var(--sidebar-border); border-bottom: 1px solid var(--sidebar-border); }
.workspace-avatar { display: flex; align-items: center; justify-content: center; border: 1px solid var(--sidebar-border); border-radius: var(--radius-md); background: var(--card); width: 33px; height: 33px; font-size: 12px; color: var(--primary); }
.workspace-label > div { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.workspace-label strong { font-size: 12px; font-weight: 550; }
.workspace-label > div > span { font-size: 10px; color: var(--muted-foreground); }
.workspace-label > .icon { color: var(--muted-foreground); width: 12px; height: 12px; }
.privacy-dot { display: inline-block; width: 5px; height: 5px; background: var(--primary); border-radius: 50%; vertical-align: 1px; margin-right: 3px; }
.sidebar-main { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.nav-caption { color: var(--muted-foreground); font-size: 10px; letter-spacing: 1px; padding-left: 12px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 41px; padding: 9px 12px; border-radius: var(--radius-md); color: var(--sidebar-foreground); background: transparent; text-align: left; font-size: 12px; }
.nav-item:hover { background: var(--accent); }
.nav-item.active { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 600; }
#all-items { margin-top: 9px; }
.nav-item .icon { width: 17px; height: 17px; }
.nav-count { margin-left: auto; font-size: 10px; padding: 0 5px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 9%, transparent); color: var(--primary); min-width: 21px; text-align: center; }
.tag-heading { display: flex; align-items: center; justify-content: space-between; margin: 30px 12px 10px 0; color: var(--muted-foreground); }
.tag-heading .icon { width: 12px; height: 12px; }
.tag-placeholder { margin: 15px 12px; font-size: 11px; line-height: 1.9; color: var(--muted-foreground); }
.sidebar-tags .nav-item { min-height: 36px; }
.tag-hash { width: 17px; text-align: center; font-size: 15px; color: var(--muted-foreground); }
.tag-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sidebar-tags .nav-count { background: transparent; color: var(--muted-foreground); }
.sidebar-bottom { padding-top: 24px; }
.capture-tip { border: 1px solid var(--sidebar-border); background: color-mix(in srgb, var(--card) 45%, transparent); border-radius: var(--radius-lg); padding: 14px 12px; margin-bottom: 16px; }
.tip-heading { display: flex; gap: 7px; align-items: center; color: var(--primary); }
.tip-heading .icon { width: 15px; height: 15px; }
.tip-heading strong { font-size: 11px; font-weight: 550; }
.capture-tip p { font-size: 11px; line-height: 1.9; color: var(--muted-foreground); margin: 8px 0 10px; }
.capture-tip .text-button { font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 8px 0; padding-top: 16px; border-top: 1px solid var(--sidebar-border); font-size: 9px; color: var(--muted-foreground); }
.sidebar-footer > span { display: inline-flex; gap: 5px; align-items: center; }
.sidebar-footer .icon { width: 11px; height: 11px; }
.version-label { font-size: 8px; }
.main-area { margin-left: 245px; }
.topbar { height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 37px; border-bottom: 1px solid var(--border); background: var(--background); }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--foreground); }
.breadcrumb-space { color: var(--muted-foreground); }
.breadcrumb-chevron { color: var(--muted-foreground); width: 11px !important; height: 11px !important; opacity: .65; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.private-label { display: inline-flex; align-items: center; gap: 5px; padding-right: 16px; margin-right: 6px; border-right: 1px solid var(--border); color: var(--muted-foreground); font-size: 10px; }
.private-label .icon { width: 12px; height: 12px; }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: 8px; border-radius: 50%; background: var(--secondary); border: 1px solid var(--border); color: var(--primary); font-size: 11px; }
.main-content { padding: 41px 38px 0; max-width: 1640px; margin-inline: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 31px; }
.heading-kicker { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted-foreground); letter-spacing: .35px; margin-bottom: 9px; }
.tiny-square { display: inline-block; width: 5px; height: 5px; border: 1px solid var(--primary); border-radius: 1px; transform: rotate(-10deg); }
.page-heading h1 { display: flex; align-items: center; gap: 11px; font-size: 27px; letter-spacing: -.8px; line-height: 1.4; font-weight: 600; }
.heading-count { font-size: 11px; letter-spacing: 0; color: var(--muted-foreground); background: var(--muted); border: 1px solid var(--border); padding: 1px 7px; border-radius: var(--radius-sm); font-weight: 450; line-height: 1.7; }
.page-heading p { font-size: 12px; margin-top: 7px; }
.page-heading > .button { margin-top: 10px; }
.collection-toolbar { display: flex; gap: 10px; align-items: center; }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; height: 43px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-md); padding: 0 12px; }
.search-field > .icon { width: 17px; height: 17px; color: var(--muted-foreground); }
.search-field:focus-within { border-color: var(--ring); outline: 2px solid color-mix(in srgb, var(--ring) 16%, transparent); }
.search-field input { min-width: 0; padding: 0; border: 0; background: transparent; font-size: 12px; height: 100%; outline: none; }
.search-shortcut { flex-shrink: 0; font-family: inherit; font-size: 9px; border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; color: var(--muted-foreground); white-space: nowrap; background: var(--background); }
.collection-toolbar > .button { height: 43px; font-size: 12px; }
.collection-toolbar > .button .icon { width: 15px; height: 15px; }
.collection-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 25px 0 16px; color: var(--muted-foreground); font-size: 10px; }
.active-filter { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.collection-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.filter-reset { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; margin-left: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--primary); font-size: 10px; }
.filter-reset .icon { width: 11px; height: 11px; }
.sort-label { display: inline-flex; gap: 4px; align-items: center; flex-shrink: 0; font-size: 10px; }
.sort-label .icon { width: 11px; height: 11px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.collection-card { min-width: 0; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; transition: border-color var(--duration); animation: enter 230ms var(--ease) both; }
.collection-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card-main { display: flex; flex-direction: column; flex: 1; min-height: 198px; text-align: left; padding: 20px 20px 14px; background: transparent; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; margin-bottom: 17px; }
.source-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--primary); background: var(--secondary); }
.source-icon .icon { width: 16px; height: 16px; }
.card-type { display: flex; align-items: center; gap: 5px; color: var(--muted-foreground); font-size: 10px; }
.card-type .icon { width: 12px; height: 12px; opacity: .7; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--card-foreground); font-size: 14px; line-height: 1.65; font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
.card-excerpt { color: var(--muted-foreground); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 11px; line-height: 1.95; margin-bottom: 16px; overflow-wrap: anywhere; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.tag-badge { display: inline-flex; gap: 4px; align-items: center; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 2px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted-foreground); background: var(--background); font-size: 9px; font-weight: 450; }
button.tag-badge:hover { background: var(--secondary); color: var(--primary); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 19px; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 9px; }
.card-date { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.card-source { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-foreground); background: var(--muted); font-size: 10px; padding: 3px 7px; border-radius: var(--radius-sm); max-width: 100%; }
.status-badge .icon { width: 12px; height: 12px; }
.status-badge.success { background: var(--success-background); color: var(--success); }
.status-badge.warning { background: var(--warning-background); color: var(--warning); }
.status-badge.error { background: var(--destructive-background); color: var(--destructive); }
.status-dot { display: inline-block; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.card-skeleton { min-height: 260px; padding: 20px; gap: 17px; pointer-events: none; }
.skeleton-line { display: block; height: 9px; border-radius: 3px; background: var(--muted); animation: pulse 1.5s ease-in-out infinite; }
.skeleton-line:nth-child(1) { height: 32px; width: 32px; border-radius: var(--radius-md); margin-bottom: 7px; }
.skeleton-line:nth-child(2) { width: 80%; height: 13px; }
.skeleton-line:nth-child(4) { width: 65%; }
.skeleton-line:nth-child(5) { margin-top: 22px; width: 35%; }
@keyframes pulse { 50% { opacity: .45; } }
.empty-state { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; border: 1px dashed var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--card) 55%, transparent); }
.empty-art { position: relative; width: 64px; height: 69px; border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; background: var(--secondary); color: var(--primary); transform: rotate(-6deg); margin: 0 0 26px; }
.empty-art > .icon { width: 29px; height: 29px; }
.empty-art-plus { position: absolute; right: -10px; bottom: -5px; width: 27px; height: 27px; display: flex; justify-content: center; align-items: center; border: 3px solid var(--background); border-radius: 50%; background: var(--primary); color: var(--primary-foreground); font-size: 18px; line-height: 1; }
.empty-state h2 { font-size: 17px; font-weight: 550; margin-bottom: 10px; }
.empty-state p { font-size: 12px; line-height: 2; color: var(--muted-foreground); max-width: 330px; white-space: pre-line; }
.empty-state > .button { margin-top: 23px; font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 17px; margin-top: 28px; }
.pagination > p { font-size: 10px; }
.pagination > .button { font-size: 11px; }
.collection-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted-foreground); margin-top: 42px; padding: 23px 0; border-top: 1px solid var(--border); font-size: 9px; }
.collection-footer > span:last-child { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; letter-spacing: 1px; }
.collection-footer .icon { width: 10px; height: 10px; }
.inline-error, .form-error { padding: 10px 12px; color: var(--destructive); background: var(--destructive-background); border-radius: var(--radius-md); font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.inline-error { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-error { margin-top: 12px; }
.inline-error .text-button { color: var(--destructive); flex-shrink: 0; }
.offline-banner { display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--warning-background); color: var(--warning); padding: 9px 16px; font-size: 11px; }
.mobile-only { display: none; }
.nav-backdrop { display: none; }

/* 抽屉和弹窗 */
dialog { color: var(--popover-foreground); background: var(--popover); border: 1px solid var(--border); padding: 0; box-shadow: 0 16px 64px var(--shadow); max-height: calc(100dvh - 48px); }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
dialog[open] { animation: enter 200ms var(--ease); }
.modal-dialog { width: min(570px, calc(100vw - 32px)); border-radius: var(--radius-xl); overflow: hidden; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 25px 27px 22px; border-bottom: 1px solid var(--border); }
.modal-header .eyebrow { font-size: 8px; letter-spacing: 1.8px; margin-bottom: 6px; }
.modal-header h2 { font-size: 21px; font-weight: 600; letter-spacing: -.5px; }
.modal-header p { font-size: 11px; margin-top: 7px; }
.modal-header > .icon-button { margin-top: -4px; margin-right: -8px; }
#item-form { min-height: 0; display: flex; flex-direction: column; }
.form-scroll { overflow-y: auto; max-height: calc(100dvh - 258px); padding: 22px 27px 25px; scrollbar-width: thin; }
.field + .field { margin-top: 19px; }
.field-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; margin-bottom: 7px; }
.optional { color: var(--muted-foreground); font-size: 10px; font-weight: 400; }
.field input, .field textarea { font-size: 12px; }
.field-hint { font-size: 10px; color: var(--muted-foreground); margin-top: 6px; line-height: 1.8; }
.input-with-icon { position: relative; }
.input-with-icon > .icon { position: absolute; left: 11px; top: 12px; width: 15px; height: 15px; color: var(--muted-foreground); pointer-events: none; }
.input-with-icon input { padding-left: 34px; }
.tags-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tags-preview:empty { display: none; }
.tags-preview .tag-badge { font-size: 10px; background: var(--secondary); color: var(--primary); }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; margin-top: 19px; }
.checkbox-field input { margin: 2px 0 0; }
.checkbox-field label { flex: 1; cursor: pointer; }
.checkbox-field strong { display: block; font-size: 11px; font-weight: 550; }
.checkbox-field label > span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted-foreground); }
.checkbox-field > .icon { color: var(--muted-foreground); width: 17px; height: 17px; }
.attachment-field { margin-top: 19px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--input); border-radius: var(--radius-md); min-height: 115px; padding: 13px; color: var(--muted-foreground); cursor: pointer; transition: background var(--duration), border-color var(--duration); position: relative; }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-within { border-color: var(--ring); background: var(--secondary); }
.dropzone.busy { opacity: .55; pointer-events: none; }
.dropzone input { width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; position: absolute; }
.dropzone strong { font-weight: 500; font-size: 11px; }
.dropzone > span:last-of-type { font-size: 9px; margin-top: 3px; }
.upload-icon { margin-bottom: 7px; color: var(--primary); }
.upload-icon .icon { width: 20px; height: 20px; }
.selected-files { list-style: none; padding: 0; margin: 8px 0 0; }
.selected-file { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding: 5px 0; font-size: 11px; color: var(--muted-foreground); }
.selected-file > span:first-of-type { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; color: var(--foreground); }
.selected-file .icon { width: 13px; height: 13px; }
.selected-file .file-size { font-size: 9px; white-space: nowrap; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 27px; border-top: 1px solid var(--border); background: var(--background); }
.save-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted-foreground); }
.save-hint .icon { width: 11px; height: 11px; }
.modal-footer .button { font-size: 12px; min-height: 36px; }
.sheet-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(590px, 100vw); height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid var(--border); overflow-y: auto; scrollbar-width: thin; }
.sheet-dialog[open] { animation: sheet-enter 240ms var(--ease); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 12px; padding: 12px 25px; position: sticky; top: 0; z-index: 2; background: var(--popover); border-bottom: 1px solid var(--border); }
.sheet-header > span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.sheet-header > span .icon { color: var(--primary); width: 16px; height: 16px; }
.detail-content { padding: 28px 29px 40px; }
.detail-loading { min-height: 220px; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12px; color: var(--muted-foreground); }
.detail-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.detail-type { display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: 11px; }
.detail-type .icon { width: 15px; height: 15px; }
.detail-created { color: var(--muted-foreground); font-size: 10px; }
.detail-title { font-size: 25px; font-weight: 600; line-height: 1.55; letter-spacing: -.6px; overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.detail-tags .tag-badge { font-size: 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 23px 0; border-bottom: 1px solid var(--border); }
.detail-actions .button { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.detail-actions .icon { width: 14px; height: 14px; }
.detail-source { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 13px; background: var(--muted); border-radius: var(--radius-md); }
.detail-source > .icon { color: var(--muted-foreground); margin-top: 2px; width: 15px; height: 15px; }
.detail-source > div { min-width: 0; }
.detail-source .field-label { font-size: 10px; color: var(--muted-foreground); margin-bottom: 3px; }
.detail-source a { color: var(--primary); font-size: 11px; word-break: break-all; }
.detail-source a:hover { text-decoration: underline; }
.detail-section { padding-top: 25px; }
.detail-section h3 { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; margin-bottom: 11px; }
.detail-section h3 .icon { width: 14px; height: 14px; color: var(--muted-foreground); }
.detail-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 2; }
.detail-note { background: var(--secondary); color: var(--secondary-foreground); border-left: 2px solid var(--primary); padding: 12px 15px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-placeholder { color: var(--muted-foreground); font-size: 11px; }
.screenshot-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.screenshot-heading h3 { margin-bottom: 0; }
.screenshot-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 16px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--background); color: var(--muted-foreground); font-size: 11px; }
.screenshot-placeholder > .icon { width: 24px; height: 24px; opacity: .7; margin-bottom: 3px; }
.screenshot-placeholder p { max-width: 350px; }
.screenshot-placeholder .button { margin-top: 4px; }
.screenshot-preview { position: relative; display: block; width: 100%; background: var(--muted); border: 1px solid var(--border); padding: 0; border-radius: var(--radius-md); overflow: hidden; text-align: left; }
.screenshot-preview img { width: 100%; display: block; max-height: 290px; object-fit: cover; object-position: top; }
.screenshot-caption { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 9px 11px; border-top: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); font-size: 10px; }
.screenshot-caption .icon { width: 13px; height: 13px; }
.assets-list { list-style: none; padding: 0; margin: 0; }
.asset-link { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 7px; background: var(--card); }
.asset-link:hover { background: var(--accent); }
.asset-link > .icon:first-child { width: 19px; height: 19px; color: var(--primary); }
.asset-info { flex: 1; min-width: 0; }
.asset-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.asset-size { display: block; font-size: 9px; margin-top: 2px; color: var(--muted-foreground); }
.asset-link > .icon:last-child { width: 14px; height: 14px; color: var(--muted-foreground); }
.detail-upload { margin-top: 10px; }
.detail-upload .dropzone { min-height: 80px; }
.detail-upload .upload-icon { margin-bottom: 2px; }
.detail-archive-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--border); margin-top: 30px; padding-top: 20px; }
.detail-archive-row p { font-size: 10px; color: var(--muted-foreground); }
.detail-archive-row .button { color: var(--destructive); }
.settings-dialog { width: min(580px, calc(100vw - 32px)); }
.settings-content { max-height: calc(100dvh - 195px); overflow-y: auto; padding: 0 27px; scrollbar-width: thin; }
.settings-section { padding: 23px 0; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h3 { font-size: 13px; font-weight: 550; }
.settings-section p.muted { font-size: 11px; margin-top: 4px; line-height: 1.9; }
.section-heading { display: flex; gap: 11px; align-items: flex-start; }
.setting-icon { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; background: var(--secondary); color: var(--primary); border: 1px solid var(--border); border-radius: var(--radius-md); flex-shrink: 0; }
.setting-icon .icon { width: 17px; height: 17px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.theme-option { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 5px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--muted-foreground); font-size: 11px; }
.theme-option:hover { background: var(--accent); }
.theme-option[aria-pressed="true"] { border-color: var(--primary); background: var(--secondary); color: var(--primary); }
.theme-option .icon { width: 16px; height: 16px; }
.setup-steps { list-style: none; padding: 0; margin: 20px 0 0; }
.setup-steps > li { display: flex; gap: 11px; margin-top: 22px; }
.setup-steps > li:first-child { margin-top: 0; }
.setup-steps > li > div { flex: 1; min-width: 0; }
.step-number { border: 1px solid var(--border); color: var(--muted-foreground); border-radius: 50%; width: 21px; height: 21px; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.setup-steps strong { font-size: 12px; font-weight: 550; }
.setup-steps .button { margin-top: 11px; }
.token-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); }
.token-panel textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; padding: 8px; min-height: 68px; }
.token-panel .field-label { font-size: 10px; }
.token-panel .button { margin-top: 8px; }
.install-section > .button { margin-left: 46px; margin-top: 12px; }
.session-section { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.session-section > .button { color: var(--destructive); font-size: 11px; }
.confirm-dialog { max-width: 405px; padding: 28px; }
.confirm-icon { width: 43px; height: 43px; background: var(--muted); border: 1px solid var(--border); color: var(--foreground); display: flex; align-items: center; justify-content: center; border-radius: var(--radius-lg); margin-bottom: 17px; }
.confirm-dialog h2 { font-size: 19px; font-weight: 550; margin-bottom: 10px; }
.confirm-dialog > p { font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.confirm-dialog .button-group { margin-top: 23px; }
.confirm-dialog .button { font-size: 12px; }
.image-dialog { border: 0; width: min(1100px, calc(100vw - 32px)); max-width: calc(100vw - 32px); border-radius: var(--radius-lg); background: var(--background); overflow-y: auto; }
.image-dialog img { display: block; width: 100%; height: auto; min-height: 40px; }
.image-close { position: fixed; top: 18px; right: 20px; z-index: 1; border: 1px solid var(--border); background: var(--popover); color: var(--foreground); box-shadow: 0 2px 12px var(--shadow); }
.toast-region { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; background: var(--popover); color: var(--popover-foreground); padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 4px 20px var(--shadow); font-size: 12px; animation: enter 180ms var(--ease); pointer-events: auto; }
.toast .icon { width: 16px; height: 16px; color: var(--primary); margin-top: 1px; }
.toast.error .icon { color: var(--destructive); }
.toast > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.noscript-message { padding: 20px; text-align: center; color: var(--destructive); }

@media (min-width: 1650px) { .main-content { padding: 47px 48px 0; } .collection-grid { gap: 22px; } .card-main { padding: 23px 23px 18px; min-height: 218px; } .card-title { font-size: 15px; } .card-excerpt { font-size: 12px; } }
@media (max-width: 1250px) { .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sidebar { width: 225px; padding-inline: 15px; } .main-area { margin-left: 225px; } .main-content { padding: 34px 30px 0; } .topbar { padding-inline: 30px; } }
@media (max-width: 900px) { .sidebar { width: 215px; padding-inline: 13px; } .main-area { margin-left: 215px; } .main-content { padding: 29px 23px 0; } .topbar { padding-inline: 23px; } .private-label { display: none; } .card-main { padding: 17px 16px 13px; } .card-footer { padding-inline: 16px; } .collection-grid { gap: 13px; } .page-heading h1 { font-size: 25px; } .login-story { padding: 35px 8%; } .login-privacy { font-size: 9px; } }
@media (max-width: 720px) {
  .mobile-only { display: inline-flex; }
  .sidebar { width: 253px; transform: translateX(-100%); transition: transform 220ms var(--ease); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .sidebar.open { transform: translateX(0); }
  .nav-backdrop { display: block; position: fixed; inset: 0; width: 100%; height: 100dvh; background: var(--overlay); z-index: 19; }
  .main-area { margin-left: 0; }
  .topbar { height: 59px; padding: 0 16px 0 9px; }
  .breadcrumb { gap: 7px; font-size: 10px; }
  .topbar-actions { gap: 1px; }
  .topbar-actions .icon-button { width: 32px; height: 32px; }
  .user-avatar { width: 27px; height: 27px; margin-left: 8px; }
  .main-content { padding: 27px 20px 0; }
  .heading-kicker { font-size: 9px; margin-bottom: 9px; }
  .page-heading { gap: 12px; margin-bottom: 25px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 11px; margin-top: 6px; }
  .page-heading > .button { min-height: 37px; font-size: 12px; padding: 8px 12px; margin-top: 15px; gap: 5px; }
  .page-heading > .button .icon { width: 16px; height: 16px; }
  .search-shortcut { display: none; }
  .collection-meta { margin-top: 21px; }
  .card-title { font-size: 13px; }
  .card-main { min-height: 200px; }
  .collection-footer { margin-top: 29px; font-size: 9px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .collection-footer > span:last-child { display: none; }
  .login-view { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100dvh; padding: 55px 27px 90px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 11px; font-size: 24px; letter-spacing: 2px; margin-bottom: 61px; }
  .login-mobile-brand strong { font-weight: 600; }
  .login-mobile-brand .brand-mark { width: 37px; height: 41px; }
  .login-form-wrap h2 { font-size: 27px; }
  .login-privacy { font-size: 10px; }
  .modal-dialog { max-height: calc(100dvh - 26px); }
  .form-scroll { max-height: calc(100dvh - 243px); }
}
@media (max-width: 460px) {
  .main-content { padding-inline: 16px; }
  .page-heading h1 { font-size: 24px; }
  .heading-kicker { letter-spacing: 0; }
  .heading-count { font-size: 10px; padding-inline: 5px; }
  .page-heading > .button { padding-inline: 10px; font-size: 11px; }
  .page-heading > .button .icon { width: 14px; height: 14px; }
  .page-heading p { max-width: 210px; font-size: 10px; }
  .collection-toolbar { gap: 7px; }
  .collection-toolbar > .button { width: 42px; padding: 0; }
  .refresh-label { display: none; }
  .search-field { padding-inline: 11px; }
  .search-field input { font-size: 11px; }
  .collection-grid { grid-template-columns: 1fr; gap: 13px; }
  .card-main { min-height: 190px; padding: 19px 20px 14px; }
  .card-top { margin-bottom: 13px; }
  .card-title { font-size: 14px; margin-bottom: 7px; }
  .card-excerpt { -webkit-line-clamp: 2; }
  .card-footer { padding-inline: 20px; }
  .collection-meta { font-size: 9px; }
  .sort-label { font-size: 9px; }
  .empty-state { min-height: 380px; }
  .empty-state h2 { font-size: 16px; }
  .empty-state p { font-size: 11px; }
  .modal-header { padding: 21px 20px 18px; }
  .modal-header h2 { font-size: 20px; }
  .modal-header p { font-size: 10px; }
  .form-scroll { padding: 18px 20px 20px; max-height: calc(100dvh - 236px); }
  .modal-footer { padding: 14px 20px; }
  .save-hint { font-size: 9px; gap: 3px; }
  .modal-footer .button { font-size: 11px; padding-inline: 12px; }
  .button-group { gap: 7px; }
  .detail-content { padding: 23px 20px 30px; }
  .detail-title { font-size: 23px; }
  .sheet-header { padding-inline: 20px; min-height: 59px; }
  .detail-actions { gap: 6px; }
  .detail-actions .button { font-size: 10px; padding-inline: 10px; }
  .settings-content { padding-inline: 20px; max-height: calc(100dvh - 174px); }
  .settings-section p.muted { font-size: 10px; }
  .theme-option { font-size: 10px; gap: 4px; }
  .theme-option .icon { width: 14px; height: 14px; }
  .session-section { align-items: flex-start; }
  .session-section .button { font-size: 10px; padding-inline: 9px; }
  .confirm-dialog { padding: 24px; }
  .image-dialog { max-width: calc(100vw - 16px); width: calc(100vw - 16px); }
  .offline-banner { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
