:root {
  --ink: #35332f;
  --ink-soft: #726e67;
  --ink-faint: #918b82;
  --surface: rgba(255, 253, 249, .74);
  --surface-strong: rgba(255, 253, 249, .94);
  --surface-muted: rgba(244, 240, 233, .76);
  --line: rgba(92, 80, 61, .14);
  --line-bright: rgba(255, 253, 249, .92);
  --accent: #5f5b55;
  --accent-hover: #48443e;
  --on-accent: #fffdfa;
  --accent-deep: #49453f;
  --warm: #8e6e43;
  --warm-soft: rgba(174, 140, 88, .14);
  --danger: #ad5851;
  --shadow: 0 18px 48px rgba(76, 65, 48, .12);
  --shadow-soft: 0 8px 24px rgba(76, 65, 48, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #e9edf1;
  background-image: linear-gradient(135deg, rgba(255,255,255,.58), transparent 44%), linear-gradient(320deg, rgba(220,185,120,.24) 0%, rgba(220,185,120,.14) 42%, transparent 65%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
a { color: inherit; }
[v-cloak] { display: none; }
.site-footer { position: fixed; z-index: 75; right: 0; bottom: 5px; left: 0; color: var(--ink-faint); font-size: 11px; line-height: 16px; text-align: center; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink-soft); text-decoration: underline; }

.surface {
  background: var(--surface);
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
}
.workspace { position: relative; z-index: 1; width: min(1080px, 100%); margin: 0 auto; padding: clamp(16px, 2vh, 28px) 34px 156px; transition: filter .25s; }
.workspace--blurred, .topbar--blurred { filter: blur(2px); }
.topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(24px, 2.5vw, 64px) 0; transition: filter .25s; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 21px; line-height: 1; box-shadow: 0 5px 13px rgba(76,65,48,.18); }
.brand-lockup strong { display: block; font-size: 14px; letter-spacing: .04em; }
.brand-subtitle { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 11px; }
.account-chip { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.44); color: var(--ink-soft); font-size: 12px; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #77a177; box-shadow: 0 0 0 3px rgba(119,161,119,.15); }
.account-role { flex-shrink: 0; padding-left: 8px; border-left: 1px solid var(--line); color: var(--warm); font-size: 11px; }

.hero { margin: 0 0 28px; text-align: center; }
.eyebrow, .section-kicker { margin: 0; color: var(--warm); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 8px 0 5px; color: var(--ink); font-size: clamp(58px, 10vw, 104px); font-weight: 250; letter-spacing: .025em; line-height: .98; text-shadow: 0 3px 18px rgba(255,255,255,.72); }
.date-line { margin: 0; color: var(--ink-soft); font-size: 14px; letter-spacing: .12em; }
.search-area { position: relative; width: min(650px, 100%); margin: 0 auto 50px; }
.search-box { position: relative; display: flex; align-items: center; min-height: 62px; padding: 7px; border-radius: 18px; }
.engine-trigger { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 12px; border-radius: 13px; background: rgba(255,255,255,.5); color: var(--ink-soft); font-size: 13px; }
.engine-trigger:hover, .engine-menu button:hover, .engine-menu button.active { background: rgba(255,255,255,.92); color: var(--ink); }
.engine-badge { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #eadfcb; color: #775d38; font-size: 12px; font-weight: 700; }
.chevron { margin-left: 2px; color: var(--ink-faint); font-size: 14px; }
.search-box input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-box input::placeholder { color: var(--ink-faint); }
.icon-button { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-size: 23px; transition: transform .18s, background .18s; }
.icon-button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.engine-menu { position: absolute; z-index: 20; top: 69px; left: 8px; width: 142px; padding: 6px; border-radius: 15px; }
.engine-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 10px; background: transparent; text-align: left; font-size: 13px; }
.search-hint { margin-top: 10px; color: var(--ink-faint); font-size: 11px; text-align: center; }
.keycap { display: inline-block; min-width: 33px; padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: rgba(255,253,249,.44); font-size: 10px; }
.hint-separator { padding: 0 6px; }

.bookmark-section { margin: 0 auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2, .panel-heading h3, .modal-heading h3 { margin: 5px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.count-label { color: var(--ink-faint); font-size: 12px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.category-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,253,249,.6); color: #625e57; font-size: 13px; font-weight: 600; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.category-tab span { color: #7e786f; font-size: 11px; font-weight: 600; }
.category-tab:hover { border-color: rgba(142,110,67,.32); background: rgba(255,253,249,.92); color: var(--ink); transform: translateY(-1px); }
.category-tab.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 5px 14px rgba(76,65,48,.16); }
.category-tab.active:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.category-tab.active span { color: var(--on-accent); }
.category-tab--new { border-style: dashed; background: rgba(255,253,249,.32); color: var(--ink-soft); }
.bookmark-board {
  position: relative;
  padding: 2px 0 88px;
  touch-action: pan-y;
  user-select: none;
}
.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  align-content: start;
  gap: 16px 30px;
}
.section-list { display: grid; gap: 16px; }
.nav-section { padding: 17px 18px 18px; border: 1px solid rgba(255,255,255,.82); border-radius: 20px; background: rgba(255,255,255,.48); box-shadow: var(--shadow-soft); backdrop-filter: blur(18px) saturate(1.08); -webkit-backdrop-filter: blur(18px) saturate(1.08); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--ink); font-size: 16px; font-weight: 650; }
.section-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--warm-soft); color: var(--warm); font-size: 14px; }
.section-actions { display: flex; align-items: center; gap: 4px; }
.section-actions button { min-width: 28px; padding: 5px 7px; border-radius: 8px; background: transparent; color: var(--ink-soft); font-size: 11px; }
.section-actions button:hover { background: rgba(255,255,255,.72); color: var(--ink); }
.pager { position: fixed; z-index: 36; bottom: 88px; left: 50%; display: flex; align-items: center; gap: 16px; transform: translateX(-50%); }
.pager button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.68); color: var(--ink-soft); font-size: 22px; line-height: 1; box-shadow: 0 5px 16px rgba(57,70,78,.08); transition: background .18s, color .18s, transform .18s; }
.pager button:hover:not(:disabled) { background: rgba(255,255,255,.94); color: var(--ink); transform: translateY(-1px); }
.pager button:disabled { cursor: default; opacity: .34; }
.pager-info { min-width: 44px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.bookmark-tile--add { border: 1px dashed rgba(93,110,118,.3); background: rgba(255,255,255,.16); }
.bookmark-tile { position: relative; display: flex; min-height: 118px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 6px 10px; border: 1px solid transparent; border-radius: 18px; background: transparent; color: var(--ink); text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s, border .2s; }
.bookmark-tile:hover { border-color: rgba(255,255,255,.66); background: rgba(255,255,255,.38); box-shadow: 0 8px 20px rgba(57,70,78,.08); transform: translateY(-2px); }
.bookmark-icon { display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; border-radius: 15px; background: rgba(255,255,255,.92); color: #fff; box-shadow: 0 3px 10px rgba(60,70,90,.12); font-size: 23px; font-weight: 700; }
.bookmark-icon img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: transparent; }
.bookmark-title { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-category { max-width: 100%; overflow: hidden; color: var(--ink-faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-actions { position: absolute; top: 7px; right: 7px; display: flex; gap: 3px; opacity: 0; transform: translateY(-3px); transition: opacity .18s, transform .18s; }
.bookmark-tile:hover .bookmark-actions, .bookmark-actions:focus-within { opacity: 1; transform: translateY(0); }
.bookmark-actions button { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: rgba(255,255,255,.85); color: var(--ink-soft); font-size: 13px; }
.bookmark-actions button:hover { color: var(--ink); }
.bookmark-tile--add { border: 1px dashed rgba(93,110,118,.3); background: rgba(255,255,255,.13); color: var(--ink-soft); }
.bookmark-tile--add:hover { border-color: var(--accent); }
.add-icon { color: var(--accent); font-size: 32px; font-weight: 200; line-height: 1; }
.empty-state { display: flex; min-height: 240px; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 1px dashed rgba(93,110,118,.25); border-radius: 18px; color: var(--ink-soft); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 15px; }
.empty-state span:not(.empty-icon) { font-size: 12px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 3px; border-radius: 14px; background: rgba(255,255,255,.55); color: var(--accent); font-size: 24px; }
.text-button { padding: 3px 0; background: transparent; color: var(--accent-deep); font-size: 12px; }
.text-button span { padding-left: 5px; font-size: 16px; }

.dock { position: fixed; z-index: 35; bottom: 24px; left: 50%; display: flex; align-items: center; gap: 3px; max-width: calc(100vw - 30px); padding: 8px; border-radius: 20px; transform: translateX(-50%); }
.dock-pins { display: flex; align-items: center; gap: 5px; }
.dock-pin { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.48); transition: transform .18s, background .18s; }
.dock-pin:hover { background: rgba(255,255,255,.88); transform: translateY(-3px); }
.dock-pin-icon { display: grid; place-items: center; width: 27px; height: 27px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.92); color: #fff; font-size: 13px; font-weight: 700; }
.dock-pin-icon img { width: 26px; height: 26px; object-fit: contain; border-radius: 7px; background: transparent; }
.dock-divider { width: 1px; height: 28px; margin: 0 5px; background: var(--line); }
.dock-action { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 57px; padding: 7px 8px; border-radius: 13px; background: transparent; color: var(--ink-soft); font-size: 10px; transition: background .18s, color .18s, transform .18s; }
.dock-action:hover, .dock-action.active { background: rgba(255,255,255,.72); color: var(--ink); transform: translateY(-2px); }
.dock-action.active { background: var(--warm-soft); color: var(--accent-deep); }
.dock-action--quiet { color: var(--ink-faint); }
.dock-icon { font-size: 20px; line-height: 1; }
.dock-badge { position: absolute; top: 3px; right: 8px; display: grid; place-items: center; min-width: 15px; height: 15px; border-radius: 999px; background: var(--warm); color: #fff; font-size: 9px; }

.tool-panel { position: fixed; z-index: 34; bottom: 99px; left: 50%; width: min(560px, calc(100vw - 30px)); padding: 22px; border-radius: 20px; transform: translateX(-50%); }
.panel-heading, .modal-heading, .panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading { margin-bottom: 17px; }
.panel-heading h3, .modal-heading h3 { font-size: 18px; }
.close-button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.38); color: var(--ink-soft); font-size: 20px; }
.close-button:hover { background: rgba(255,255,255,.8); color: var(--ink); }
.todo-list { max-height: 285px; margin-bottom: 15px; overflow-y: auto; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 9px; border-radius: 11px; font-size: 13px; }
.todo-item:hover { background: rgba(255,255,255,.42); }
.todo-item input { width: 16px; height: 16px; accent-color: var(--accent); }
.todo-item span { flex: 1; word-break: break-word; }
.todo-item.done span { color: var(--ink-faint); text-decoration: line-through; }
.todo-item button { padding: 3px 8px; border-radius: 7px; background: transparent; color: var(--ink-faint); font-size: 17px; line-height: 1; }
.todo-item button:hover { background: rgba(255,255,255,.7); color: var(--danger); }
.inline-form, .user-create { display: flex; gap: 8px; }
.inline-form input, .user-create input, .form-field input, .form-field select { min-width: 0; width: 100%; height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.9); border-radius: 11px; outline: 0; background: rgba(255,255,255,.54); font-size: 13px; }
.inline-form input:focus, .user-create input:focus, .form-field input:focus, .form-field select:focus, .note-editor:focus { border-color: rgba(142,110,67,.48); background: rgba(255,253,249,.9); }
.primary-button, .secondary-button { min-height: 42px; padding: 0 17px; border-radius: 11px; font-size: 13px; white-space: nowrap; }
.primary-button { background: var(--accent); color: var(--on-accent); }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { background: rgba(255,255,255,.58); color: var(--ink-soft); }
.secondary-button:hover { background: rgba(255,255,255,.9); color: var(--ink); }
.note-editor { width: 100%; min-height: 220px; resize: vertical; padding: 13px; border: 1px solid rgba(255,255,255,.9); border-radius: 13px; outline: 0; background: rgba(255,255,255,.53); font-size: 13px; line-height: 1.7; }
.panel-footer { margin-top: 10px; }
.save-status { color: var(--ink-faint); font-size: 11px; }
.panel-empty { padding: 27px 10px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.user-list { max-height: 260px; overflow-y: auto; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 9px; border-radius: 11px; }
.user-row:hover { background: rgba(255,255,255,.42); }
.user-row strong { font-size: 13px; }
.user-row small { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.mini-badge { margin-left: 7px; padding: 2px 6px; border-radius: 5px; background: var(--warm-soft); color: var(--warm); font-size: 10px; }
.user-details { flex: 1; min-width: 0; }
.user-password { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; font-size: 12px; }
.user-password-label { flex-shrink: 0; color: var(--ink-soft); font-size: 11px; }
.user-password-value { font-family: Consolas, monospace; overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }
.user-password-mask { color: var(--ink-soft); letter-spacing: .08em; }
.user-row .user-password-hint { color: var(--ink-soft); line-height: 1.5; }
.user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 225px; }
.user-actions button { padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.52); color: var(--ink-soft); font-size: 11px; }
.user-actions button:hover { background: rgba(255,255,255,.86); color: var(--ink); }
.user-actions .danger:hover { color: var(--danger); }
.user-actions button:disabled { cursor: default; opacity: .5; }
.user-create { margin-top: 13px; }
.form-error { margin: 9px 0 0; color: var(--danger); font-size: 12px; }

.context-menu { position: fixed; z-index: 80; min-width: 150px; padding: 6px; border-radius: 13px; }
.context-menu button { display: block; width: 100%; padding: 9px 11px; border-radius: 9px; background: transparent; text-align: left; font-size: 12px; }
.context-menu button:hover { background: rgba(255,255,255,.8); }
.context-menu button.danger { color: var(--danger); }
.modal-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(40,51,58,.27); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal-card { width: min(410px, 100%); padding: 24px; border-radius: 20px; }
.modal-heading { margin-bottom: 18px; }
.form-field { display: block; margin-bottom: 14px; }
.form-field span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.auth-backdrop { background: rgba(48,57,62,.32); }
.auth-card { width: min(390px, 100%); padding: 34px 30px 28px; text-align: center; }
.auth-symbol { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 17px; background: var(--accent); color: var(--on-accent); font-size: 30px; box-shadow: 0 8px 18px rgba(76,65,48,.18); }
.auth-card h2 { margin: 7px 0 8px; font-size: 23px; letter-spacing: -.03em; }
.auth-copy { margin: 0 auto 23px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.auth-card .form-field { text-align: left; }
.auth-submit { width: 100%; margin-top: 7px; }
.auth-hint { margin: 16px 0 0; color: var(--ink-faint); font-size: 11px; }
.auth-switch { margin-top: 13px; padding: 4px 8px; background: transparent; color: var(--accent-deep); font-size: 12px; }
.auth-switch:hover { text-decoration: underline; }
.register-card { max-height: calc(100vh - 40px); overflow-y: auto; }
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.code-field .form-field { min-width: 0; }
.code-field .secondary-button { margin-bottom: 14px; padding: 0 12px; }
.tool-panel--settings { width: min(640px, calc(100vw - 30px)); max-height: calc(100vh - 125px); overflow-y: auto; }
.settings-form .form-field { margin-bottom: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.38); }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle strong { font-size: 13px; }
.setting-toggle small { margin-top: 4px; color: var(--ink-faint); font-size: 11px; line-height: 1.45; }
.setting-toggle input { width: 38px; height: 22px; flex: 0 0 auto; accent-color: #548b68; cursor: pointer; }
.settings-status { margin: 9px 0 0; color: #548b68; font-size: 12px; }
.settings-form .modal-actions { justify-content: flex-end; }

.panel-enter-active, .panel-leave-active { transition: opacity .18s, transform .18s; }
.panel-enter-from, .panel-leave-to { opacity: 0; transform: translate(-50%, 10px); }

@media (max-width: 700px) {
  .site-footer { bottom: 0; font-size: 10px; }
  .topbar { gap: 12px; padding: 22px 18px 0; }
  .workspace { padding: 24px 18px 145px; }
  .bookmark-board { padding-top: 5px; }
  .bookmark-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 16px; }
  .bookmark-tile { min-height: 119px; }
  .dock { bottom: 13px; padding: 6px; }
  .dock-action { min-width: 48px; padding: 6px 5px; }
  .dock-pin { width: 37px; height: 37px; }
  .dock-divider { margin: 0 2px; }
  .settings-grid { grid-template-columns: 1fr; gap: 9px; }
  .tool-panel--settings { max-height: calc(100vh - 105px); padding: 17px; }
}
@media (max-width: 470px) {
  .brand-subtitle { display: none; }
  .account-chip { padding: 7px 9px; }
  .account-name { max-width: 100px; }
  .account-role { display: none; }
  .hero h1 { font-size: 56px; }
  .search-box { min-height: 56px; }
  .engine-trigger { padding: 0 8px; }
  .engine-trigger > span:not(.engine-badge):not(.chevron) { display: none; }
  .search-box input { font-size: 14px; }
  .bookmark-board { padding-bottom: 72px; }
  .pager { bottom: 76px; }
  .bookmark-tile { min-height: 112px; }
  .dock-action span:last-child { display: none; }
  .dock-action { min-width: 39px; }
  .dock-icon { font-size: 21px; }
  .tool-panel { bottom: 78px; padding: 17px; }
  .user-create { flex-wrap: wrap; }
  .user-create > button[type="submit"] { width: 100%; }
  .user-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .user-details { width: 100%; }
  .user-actions { justify-content: flex-start; max-width: 100%; }
}
