/* =========================================================
   SurfHub 冲浪首页 · 主样式
   定位：个人生活 / 工作项目面板（网址导航收进左侧抽屉）
   主题：data-theme = light | dark
   材质：data-material = glass | aurora | neumorph | flat | paper | terminal
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #4f6bff;
  --brand-2: #8b5cf6;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --blur: 16px;

  --bg: #eef2f9;
  --bg-soft: #e6ecf6;
  --text: #111827;
  --text-2: #59637a;
  --text-3: #8b93a5;
  --line: rgba(17, 24, 39, .075);
  --line-strong: rgba(17, 24, 39, .14);
  --card: rgba(255, 255, 255, .76);
  --card-solid: #ffffff;
  --card-hover: rgba(255, 255, 255, .96);
  --topbar: rgba(255, 255, 255, .72);
  --input: rgba(255, 255, 255, .92);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px -12px rgba(16, 24, 40, .3);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, .06), 0 18px 40px -24px rgba(16, 24, 40, .45);
  --shadow-lg: 0 24px 60px -28px rgba(16, 24, 40, .5);
  --blob-op: .5;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0e17;
  --bg-soft: #0f1521;
  --text: #e7ecf6;
  --text-2: #a3acbd;
  --text-3: #6d7688;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .16);
  --card: rgba(21, 27, 40, .72);
  --card-solid: #151b28;
  --card-hover: rgba(31, 39, 56, .92);
  --topbar: rgba(10, 14, 23, .74);
  --input: rgba(21, 27, 40, .92);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 22px -14px rgba(0, 0, 0, .9);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, .5), 0 22px 50px -26px rgba(0, 0, 0, .95);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 1);
  --blob-op: .38;
}

/* ---------------- 材质 ---------------- */
[data-material="glass"] { --blur: 18px; }

[data-material="aurora"] {
  --brand: #7c5cff;
  --brand-2: #ff5c8a;
  --bg: #eef1ff;
  --blur: 22px;
  --blob-op: .85;
  --card: rgba(255, 255, 255, .62);
}
[data-material="aurora"][data-theme="dark"] {
  --bg: #070914;
  --card: rgba(24, 26, 48, .6);
}

[data-material="neumorph"] {
  --bg: #e8ecf4;
  --card: #e8ecf4;
  --card-hover: #eef2f9;
  --card-solid: #e8ecf4;
  --line: rgba(255, 255, 255, .1);
  --blur: 0px;
  --shadow-sm: 5px 5px 12px rgba(163, 177, 198, .55), -5px -5px 12px rgba(255, 255, 255, .95);
  --shadow-md: 10px 10px 26px rgba(163, 177, 198, .55), -10px -10px 26px rgba(255, 255, 255, .95);
  --blob-op: 0;
}
[data-material="neumorph"][data-theme="dark"] {
  --bg: #131722;
  --card: #131722;
  --card-hover: #171c29;
  --card-solid: #131722;
  --shadow-sm: 5px 5px 12px rgba(0, 0, 0, .55), -5px -5px 12px rgba(255, 255, 255, .035);
  --shadow-md: 10px 10px 26px rgba(0, 0, 0, .6), -10px -10px 26px rgba(255, 255, 255, .04);
}

[data-material="flat"] {
  --blur: 0px;
  --card: #ffffff;
  --card-hover: #ffffff;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --line: rgba(17, 24, 39, .12);
  --blob-op: 0;
}
[data-material="flat"][data-theme="dark"] {
  --card: #121722;
  --card-hover: #171d2a;
  --line: rgba(255, 255, 255, .12);
}

[data-material="paper"] {
  --bg: #f6f1e6;
  --card: #fffdf7;
  --card-hover: #ffffff;
  --card-solid: #fffdf7;
  --line: rgba(120, 96, 60, .16);
  --shadow-sm: 0 1px 0 rgba(120, 96, 60, .12), 0 8px 20px -16px rgba(120, 96, 60, .5);
  --shadow-md: 0 2px 0 rgba(120, 96, 60, .1), 0 20px 40px -26px rgba(120, 96, 60, .6);
  --blur: 0px;
  --brand: #b45309;
  --brand-2: #d97706;
  --blob-op: .22;
}
[data-material="paper"][data-theme="dark"] {
  --bg: #1a1712;
  --card: #241f18;
  --card-hover: #2b251c;
  --card-solid: #241f18;
  --line: rgba(255, 236, 200, .12);
}

[data-material="terminal"] {
  --bg: #05080a;
  --bg-soft: #070c0e;
  --text: #b8f5d0;
  --text-2: #6fcf97;
  --text-3: #4a8a68;
  --line: rgba(80, 255, 170, .18);
  --card: rgba(8, 24, 18, .82);
  --card-hover: rgba(12, 34, 25, .95);
  --card-solid: #08170f;
  --topbar: rgba(5, 8, 10, .9);
  --input: rgba(8, 24, 18, .9);
  --brand: #35f0a0;
  --brand-2: #12b981;
  --shadow-sm: 0 0 0 1px rgba(80, 255, 170, .12), 0 10px 24px -18px rgba(53, 240, 160, .5);
  --shadow-md: 0 0 0 1px rgba(80, 255, 170, .2), 0 20px 44px -24px rgba(53, 240, 160, .4);
  --blob-op: .2;
  --font: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}
[data-material="terminal"] .brand-name { letter-spacing: .02em; }

/* ---------------- 基础 ---------------- */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .3s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.ico {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* ---------------- 背景装饰 ---------------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  opacity: var(--blob-op);
  transition: opacity .4s ease;
}
.blob.b1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 30% 30%, #8ab4ff, #c4b5fd 70%); }
.blob.b2 { width: 40vw; height: 40vw; right: -10vw; top: 6vh; background: radial-gradient(circle at 60% 40%, #ffd6e7, #a5f3fc 75%); }
.blob.b3 { width: 52vw; height: 52vw; left: 22vw; bottom: -30vw; background: radial-gradient(circle at 50% 50%, #d9f99d, #93c5fd 70%); }

[data-theme="dark"] .blob.b1 { background: radial-gradient(circle at 30% 30%, #1d4ed8, #6d28d9 70%); }
[data-theme="dark"] .blob.b2 { background: radial-gradient(circle at 60% 40%, #9d174d, #0e7490 75%); }
[data-theme="dark"] .blob.b3 { background: radial-gradient(circle at 50% 50%, #14532d, #1e3a8a 70%); }

[data-material="aurora"] .blob { animation: floatBlob 22s ease-in-out infinite alternate; }
[data-material="aurora"] .blob.b2 { animation-delay: -7s; }
[data-material="aurora"] .blob.b3 { animation-delay: -13s; }
@keyframes floatBlob {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(5vw, 4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, -3vh, 0) scale(.95); }
}

.grid-lines { display: none; }
[data-material="terminal"] .grid-lines {
  display: block; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(53, 240, 160, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(53, 240, 160, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 78%);
}
[data-material="paper"] .bg-decor::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(120, 96, 60, .1) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--topbar);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  padding: 11px 22px;
  display: flex; align-items: center; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px -8px var(--brand);
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }

/* 搜索框 */
.search-box {
  position: relative;
  flex: 1 1 auto; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center;
  height: 42px;
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease, background .3s;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.search-box:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent), var(--shadow-md);
}
.eng-current {
  display: flex; align-items: center; gap: 4px;
  height: 100%; padding: 0 6px 0 6px;
  background: none; border: 0; border-radius: 999px 0 0 999px;
  color: var(--text-2);
}
.eng-current:hover { color: var(--text); }
.eng-badge {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: #fff;
  background: #2932e1;
  transition: background .2s;
}
.eng-current .caret { width: 14px; height: 14px; opacity: .6; }

#searchInput {
  flex: 1; min-width: 0;
  height: 100%; padding: 0 6px;
  border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text);
}
#searchInput::placeholder { color: var(--text-3); }
#searchInput::-webkit-search-cancel-button { -webkit-appearance: none; }

.btn-search {
  height: 32px; margin-right: 5px; padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 14px -8px var(--brand);
  transition: transform .15s ease, filter .2s;
}
.btn-search .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.btn-search:hover { filter: brightness(1.06); }
.btn-search:active { transform: scale(.97); }

/* 搜索引擎下拉 */
.eng-menu {
  position: absolute; left: 0; top: calc(100% + 8px);
  min-width: 190px; padding: 6px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
  z-index: 50;
  max-height: 320px; overflow: auto;
}
.eng-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.eng-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text); font-size: 13.5px; text-align: left;
}
.eng-item:hover, .eng-item.active { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.eng-item .eng-badge { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.eng-item .eng-name { flex: 1; }
.eng-item .eng-check { width: 15px; height: 15px; color: var(--brand); opacity: 0; }
.eng-item.active .eng-check { opacity: 1; }

/* 右侧动作 */
.top-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--text-2);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: all .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.95); }
.icon-btn[aria-expanded="true"] { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--card)); }

#btnTheme .ico-sun { display: none; }
[data-theme="dark"] #btnTheme .ico-moon { display: none; }
[data-theme="dark"] #btnTheme .ico-sun { display: block; }

.btn-user {
  height: 36px; padding: 0 11px 0 4px;
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text); font-size: 13px; font-weight: 600;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: all .2s ease;
}
.btn-user:hover { border-color: var(--line-strong); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  flex: none;
}

/* 公告 */
.notice-bar {
  display: flex; align-items: center; gap: 8px;
  max-width: 1156px; margin: 0 auto 10px;
  padding: 8px 12px;
  font-size: 12.5px; color: var(--text-2);
  background: color-mix(in srgb, var(--brand) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: var(--radius-sm);
}
.notice-bar .ico { width: 15px; height: 15px; color: var(--brand); }
.notice-bar span { flex: 1; }
.notice-close { border: 0; background: none; color: var(--text-3); padding: 2px; display: grid; place-items: center; }
.notice-close .ico { width: 14px; height: 14px; }

/* ---------------- 更多菜单（不常用操作收纳） ---------------- */
.more-menu {
  position: absolute; right: 22px; top: calc(100% - 4px);
  width: 216px; padding: 6px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: all .18s ease;
  z-index: 55;
}
.more-menu.open { opacity: 1; visibility: visible; transform: none; }
.mm-group { padding: 4px 0; border-bottom: 1px solid var(--line); }
.mm-group:last-child { border-bottom: 0; }
.mm-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 9px;
  background: none; color: var(--text);
  font-size: 13px; font-weight: 500; text-align: left;
}
.mm-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.mm-item .ico { width: 16px; height: 16px; color: var(--text-3); }
.mm-item:hover .ico { color: var(--brand); }
.mm-item span { flex: 1; }
.mm-item kbd {
  font-family: inherit; font-size: 10px; color: var(--text-3);
  border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0 4px; line-height: 15px;
}
.mm-item.danger { color: #ef4444; }
.mm-item.danger .ico { color: #ef4444; }
.mm-item.danger:hover { background: rgba(239, 68, 68, .1); color: #ef4444; }

/* ---------------- 左侧网址导航：边缘触发条 ---------------- */
.nav-rail {
  position: fixed; left: 0; top: 50%; z-index: 46;
  transform: translateY(-50%);
  padding: 13px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 13px 13px 0;
  background: var(--topbar);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: color .2s, box-shadow .2s, padding .2s;
}
.nav-rail:hover { color: var(--brand); box-shadow: var(--shadow-md); }
.nav-rail .ico { width: 17px; height: 17px; }
.rail-label {
  writing-mode: vertical-rl;
  font-size: 10.5px; font-weight: 700; letter-spacing: 2px;
}
.rail-caret { display: grid; place-items: center; opacity: .5; }
.rail-caret .ico { width: 12px; height: 12px; }

/* 窄屏专用：顶栏里的导航按钮 */
.nav-toggle { display: none; }
.nav-toggle .ico { width: 18px; height: 18px; }

/* 抽屉本体 */
.nav-panel {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 62;
  width: 376px; max-width: 94vw;
  display: flex; flex-direction: column;
  background: var(--card-solid);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 60px -32px rgba(9, 13, 22, .7);
  transform: translateX(-102%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
[data-material="terminal"] .nav-panel { background: #06110c; }
.nav-panel.open { transform: none; }

.np-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 14px 10px;
}
.np-head h2 { margin: 0; font-size: 15px; font-weight: 750; letter-spacing: -.2px; }
.np-head-acts { display: flex; gap: 4px; }
.np-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--text-3);
}
.np-icon:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.np-icon .ico { width: 16px; height: 16px; }
.np-icon.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }

.np-search {
  display: flex; align-items: center; gap: 7px;
  margin: 0 14px 10px; padding: 0 11px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--input);
}
.np-search:focus-within { border-color: var(--brand); }
.np-search .ico { width: 15px; height: 15px; color: var(--text-3); }
.np-search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 13px; color: var(--text);
}
.np-search input::placeholder { color: var(--text-3); }
.np-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.np-cats {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 0 14px 10px;
  max-height: 132px; overflow-y: auto;
}
.np-cat {
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--text-2);
  font-size: 11.5px; font-weight: 600;
  transition: all .16s;
  white-space: nowrap;
}
.np-cat:hover { border-color: var(--line-strong); color: var(--text); }
.np-cat.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.np-cat .nc-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

.np-links {
  flex: 1; overflow-y: auto;
  padding: 4px 14px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-content: start;
  overscroll-behavior: contain;
}

.np-foot {
  display: flex; gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}
.np-foot button {
  flex: 1;
  height: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent; color: var(--text-2);
  font-size: 11.5px; font-weight: 600;
}
.np-foot button:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.np-foot .ico { width: 13px; height: 13px; }

.np-mask {
  position: fixed; inset: 0; z-index: 61;
  background: rgba(9, 13, 22, .42);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: all .26s ease;
}
.np-mask.show { opacity: 1; visibility: visible; }

/* ---------------- 页面主体 ---------------- */
.page { max-width: 1200px; margin: 0 auto; padding: 20px 22px 60px; }

/* 今日条 */
.today-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin: 2px 0 16px;
}
.today-text h1 { margin: 0 0 5px; font-size: 23px; font-weight: 760; letter-spacing: -.5px; }
.today-meta { margin: 0; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.today-meta .dot { opacity: .4; }
#heroClock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
#todaySummary { color: var(--text-2); }

.today-quick { display: flex; gap: 7px; flex: none; }
.qa {
  height: 34px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--text-2);
  font-size: 12.5px; font-weight: 600;
  backdrop-filter: blur(var(--blur));
  transition: all .18s ease;
}
.qa .ico { width: 15px; height: 15px; }
.qa:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); transform: translateY(-1px); }
.qa:active { transform: scale(.97); }

/* 按钮 */
.btn {
  height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text); font-size: 13.5px; font-weight: 600;
  transition: all .18s ease;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px -10px var(--brand);
}
.btn.primary:hover { color: #fff; filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ef4444; border-color: rgba(239, 68, 68, .35); }
.btn.danger:hover { background: rgba(239, 68, 68, .08); border-color: #ef4444; color: #ef4444; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn.sm .ico { width: 14px; height: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------------- 仪表盘栅格 ---------------- */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}
.dash-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* 双列时右列最后一张卡吃掉剩余高度，与日历底部对齐 */
@media (min-width: 1081px) {
  .dash-right .w-quick { flex: 1; }
  .dash-right .w-quick .w-body { display: flex; flex-direction: column; flex: 1; }
  .dash-right .w-quick .textarea { flex: 1; min-height: 78px; }
}
.dash-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* 组件卡 */
.widget {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  transition: background .3s, box-shadow .3s, border-color .3s;
}
[data-material="neumorph"] .widget { border-color: transparent; }
[data-material="flat"] .widget { border-radius: var(--radius-lg); }

.w-head { display: flex; align-items: center; gap: 8px; padding: 13px 15px 0; }
.w-title {
  margin: 0;
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: -.1px;
}
.w-title .ico { width: 15px; height: 15px; color: var(--brand); }
.w-badge {
  min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-size: 10.5px; font-weight: 700;
}
.w-link {
  margin-left: auto;
  border: 0; background: none;
  padding: 3px 6px; border-radius: 7px;
  color: var(--text-3);
  font-size: 11.5px; font-weight: 600;
}
.w-link:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.w-body { padding: 11px 15px 15px; }

.pane-empty { text-align: center; padding: 22px 8px; color: var(--text-3); font-size: 12.5px; line-height: 1.6; }

/* ---------------- 日历 ---------------- */
.cal-body { display: flex; flex-direction: column; gap: 8px; }
.cal-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.cal-btn {
  height: 26px; min-width: 26px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent; color: var(--text-2);
}
.cal-btn:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.cal-btn .ico { width: 14px; height: 14px; }
.cal-btn.today { font-size: 11.5px; font-weight: 600; padding: 0 9px; }

.cal-month { font-size: 15px; font-weight: 750; letter-spacing: -.3px; }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week span {
  text-align: center;
  font-size: 10.5px; font-weight: 700; color: var(--text-3);
  padding: 1px 0 3px;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell {
  position: relative;
  height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s, border-color .15s;
}
.cal-cell:hover { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.cal-cell.out { color: var(--text-3); opacity: .48; }
.cal-cell.weekend { color: var(--text-2); }
.cal-cell.today { border-color: color-mix(in srgb, var(--brand) 55%, transparent); font-weight: 700; color: var(--brand); }
.cal-cell.sel {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-color: transparent;
  font-weight: 700;
  box-shadow: 0 6px 14px -8px var(--brand);
}
.cal-dots { display: flex; gap: 2px; height: 4px; }
.cal-dots i { width: 4px; height: 4px; border-radius: 50%; display: block; }
.cal-dots i.t { background: #10b981; }
.cal-dots i.r { background: #f59e0b; }
.cal-dots i.e { background: #6366f1; }
.cal-cell.sel .cal-dots i { background: #fff; }

.cal-day-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  margin-top: 1px;
}
.cal-day-head strong { font-size: 12.5px; font-weight: 700; }
.cal-items {
  display: flex; flex-direction: column; gap: 5px;
  max-height: 200px; overflow-y: auto;
  overscroll-behavior: contain;
}
.cal-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card-solid) 45%, transparent);
  transition: background .16s, border-color .16s;
}
.cal-item:hover { background: var(--card-hover); border-color: var(--line-strong); }
.ci-check {
  width: 16px; height: 16px; flex: none;
  display: grid; place-items: center;
  border: 1.7px solid var(--line-strong);
  border-radius: 5px;
  background: transparent; color: transparent;
  transition: all .15s;
}
.ci-check .ico { width: 10px; height: 10px; stroke-width: 3.2; }
.ci-check:hover { border-color: var(--brand); }
.cal-item[data-kind="event"] .ci-check { border-radius: 50%; }
.cal-item[data-kind="reminder"] .ci-check { border: 0; color: var(--text-3); }
.cal-item[data-kind="reminder"] .ci-check .ico { width: 13px; height: 13px; stroke-width: 1.8; }
.cal-item.done .ci-check { background: #10b981; border-color: #10b981; color: #fff; }
.ci-time { font-size: 10.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.ci-title { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.done .ci-title { text-decoration: line-through; color: var(--text-3); }
.ci-del {
  border: 0; background: none; color: var(--text-3);
  padding: 1px; opacity: 0;
  display: grid; place-items: center;
  transition: opacity .15s;
}
.cal-item:hover .ci-del { opacity: 1; }
.ci-del:hover { color: #ef4444; }
.ci-del .ico { width: 13px; height: 13px; }

/* ---------------- 待办小组件 ---------------- */
.quick-add { display: flex; gap: 6px; margin-bottom: 8px; }
.quick-add .input { flex: 1; min-width: 0; }

.todo-mini { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; overscroll-behavior: contain; }
.tm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px;
  border-radius: 8px;
  transition: background .15s;
}
.tm-item:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.tm-check {
  width: 16px; height: 16px; flex: none;
  display: grid; place-items: center;
  border: 1.7px solid var(--line-strong);
  border-radius: 5px;
  background: transparent; color: transparent;
  transition: all .15s;
}
.tm-check .ico { width: 10px; height: 10px; stroke-width: 3.2; }
.tm-check:hover { border-color: var(--brand); }
.tm-item.done .tm-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.tm-title { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-item.done .tm-title { text-decoration: line-through; color: var(--text-3); }
.tm-meta { display: flex; align-items: center; gap: 5px; flex: none; }
.tm-prio { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.tm-prio.p2 { background: #f59e0b; }
.tm-prio.p3 { background: #ef4444; }
.tm-time { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tm-time.overdue { color: #ef4444; font-weight: 600; }

/* ---------------- 倒计时 ---------------- */
.cd-list { display: flex; flex-direction: column; gap: 6px; max-height: 168px; overflow-y: auto; }
.cd-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
}
.cd-num {
  font-size: 13px; font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  flex: none; min-width: 60px;
  line-height: 1.15;
}
.cd-item.expired .cd-num { color: var(--text-3); }
.cd-name { flex: 1; min-width: 0; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-del { border: 0; background: none; color: var(--text-3); padding: 1px; opacity: 0; display: grid; place-items: center; }
.cd-item:hover .cd-del { opacity: 1; }
.cd-del:hover { color: #ef4444; }
.cd-del .ico { width: 13px; height: 13px; }

/* ---------------- 随手记 ---------------- */
.quick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.quick-row .hint { margin: 0; }

/* ---------------- 便签墙 / 备忘录 组件 ---------------- */
.note-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px;
  max-height: 214px; overflow-y: auto;
  overscroll-behavior: contain;
}
.note-mini .note-item { min-height: 82px; padding: 10px; font-size: 12px; }

.memo-mini { display: flex; flex-direction: column; gap: 7px; max-height: 214px; overflow-y: auto; overscroll-behavior: contain; }
.memo-mini .memo-item { margin-bottom: 0; padding: 10px 12px; }

/* ---------------- 表单元素 ---------------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--text); font-size: 14px;
  outline: 0;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input.sm { padding: 7px 10px; font-size: 12.5px; border-radius: 9px; }
.select.sm { padding: 7px 10px; font-size: 12.5px; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }

/* 便签 */
.note-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note-item {
  position: relative;
  min-height: 104px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
  overflow: hidden;
}
.note-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.note-item .note-meta { position: absolute; bottom: 7px; right: 10px; font-size: 10.5px; opacity: .6; }
.note-item .note-pin { position: absolute; top: 8px; right: 8px; opacity: .55; }
.note-item .note-pin .ico { width: 13px; height: 13px; fill: currentColor; stroke-width: 0; }
.note-yellow { background: #fff3bf; color: #6b4f00; }
.note-pink   { background: #ffd9e6; color: #7d1d3f; }
.note-blue   { background: #d6e8ff; color: #123a63; }
.note-green  { background: #d3f5d9; color: #14532d; }
.note-purple { background: #e6dcff; color: #3b1d78; }
.note-orange { background: #ffe0c2; color: #6b3410; }
.note-gray   { background: #e8ecf2; color: #33404f; }
[data-theme="dark"] .note-item { filter: brightness(.82) saturate(.9); color: #1a1a1a; }

/* 待办（列表页/弹层用） */
.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--card);
  transition: all .16s;
}
.todo-item:hover { border-color: var(--line-strong); }
.todo-check {
  width: 19px; height: 19px; margin-top: 1px; flex: none;
  border: 1.8px solid var(--line-strong);
  border-radius: 6px;
  background: transparent; color: transparent;
  display: grid; place-items: center;
  transition: all .16s;
}
.todo-check .ico { width: 12px; height: 12px; stroke-width: 3; }
.todo-item.done .todo-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--text-3); }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.todo-meta { display: flex; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.todo-meta .overdue { color: #ef4444; }
.prio { display: inline-block; padding: 0 5px; border-radius: 4px; font-size: 10px; line-height: 15px; }
.prio-2 { background: rgba(245, 158, 11, .16); color: #b45309; }
.prio-3 { background: rgba(239, 68, 68, .16); color: #dc2626; }
.todo-del {
  border: 0; background: none; color: var(--text-3); padding: 2px; opacity: 0;
  transition: opacity .16s;
}
.todo-item:hover .todo-del { opacity: 1; }
.todo-del:hover { color: #ef4444; }
.todo-del .ico { width: 14px; height: 14px; }

/* 备忘录 */
.memo-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 9px;
  background: var(--card);
  cursor: pointer;
  transition: all .16s;
}
.memo-item:hover { transform: translateX(2px); border-color: var(--line-strong); }
.memo-title { font-size: 13.5px; font-weight: 650; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.memo-title .ico { width: 12px; height: 12px; color: #f59e0b; fill: currentColor; stroke-width: 0; }
.memo-preview {
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.memo-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* 提醒 */
.reminder-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 9px;
  background: var(--card);
}
.reminder-cd {
  min-width: 74px; text-align: center;
  padding: 6px 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.reminder-cd.expired { background: rgba(148, 163, 184, .16); color: var(--text-3); }
.reminder-cd small { display: block; font-size: 9.5px; font-weight: 500; opacity: .75; }
.reminder-main { flex: 1; min-width: 0; }
.reminder-title { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.reminder-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.reminder-del { border: 0; background: none; color: var(--text-3); padding: 4px; }
.reminder-del:hover { color: #ef4444; }

/* 保险箱 */
.vault-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 9px;
  background: var(--card);
}
.vault-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand); flex: none;
  font-size: 13px; font-weight: 700;
}
.vault-main { flex: 1; min-width: 0; }
.vault-title { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.vault-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-pwd {
  font-family: ui-monospace, monospace; font-size: 12px;
  letter-spacing: .5px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  padding: 3px 7px; border-radius: 6px;
  margin-top: 5px; display: inline-block;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vault-acts { display: flex; gap: 3px; }
.vault-acts button {
  width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-3);
  display: grid; place-items: center;
}
.vault-acts button:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.vault-acts .ico { width: 15px; height: 15px; }

/* 分类标签 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card); color: var(--text-2);
  font-size: 12px; font-weight: 600;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 设置面板 */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .sr-label { color: var(--text); font-weight: 600; }
.setting-row .sr-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.setting-group { margin-bottom: 18px; }
.setting-group h4 { margin: 0 0 6px; font-size: 12px; color: var(--text-3); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.device-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.device-item small { color: var(--text-3); }

.site-foot { text-align: center; padding: 18px 20px 0; font-size: 12px; color: var(--text-3); }
.site-foot a { color: var(--text-2); border-bottom: 1px dashed var(--line-strong); }

/* ---------------- 网址卡片（导航抽屉内使用） ---------------- */
.site-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px 9px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--card-solid) 55%, transparent);
  transition: transform .18s ease, background .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  min-width: 0;
}
[data-theme="dark"] .site-card { background: color-mix(in srgb, var(--card) 60%, transparent); }
[data-material="neumorph"] .site-card { background: var(--card); box-shadow: var(--shadow-sm); border-color: transparent; }
[data-material="flat"] .site-card { background: var(--card); border-color: var(--line); }

.site-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  box-shadow: var(--shadow-md);
}
.site-card:active { transform: translateY(-1px) scale(.98); }

.site-ico {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px -4px rgba(16, 24, 40, .4);
  flex: none;
}
[data-theme="dark"] .site-ico { background: #f7f8fa; }
.site-ico img { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; object-fit: contain; display: block; }
.site-letter {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #8b5cf6));
}
.site-emoji { font-size: 19px; line-height: 1; }
.site-title {
  width: 100%;
  font-size: 11.5px; font-weight: 600; line-height: 1.3;
  text-align: center; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.site-host { display: none; }

.pin-flag {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px;
  display: grid; place-items: center;
  color: #f59e0b;
}
.pin-flag .ico { width: 11px; height: 11px; fill: currentColor; stroke-width: 0; }

.card-tools {
  position: absolute; top: 3px; left: 3px;
  display: none; gap: 2px;
}
body.editing .card-tools { display: flex; }
.card-tools button {
  width: 20px; height: 20px; border-radius: 6px;
  border: 0; background: rgba(17, 24, 39, .72); color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
}
.card-tools button .ico { width: 11px; height: 11px; }
.card-tools button.del { background: rgba(239, 68, 68, .85); }

.np-links .pane-empty { grid-column: 1 / -1; }
/* 抽屉里按分类看，每张卡都挂星标反而噪音大 */
.np-links .pin-flag { display: none; }

/* ---------------- 模态 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all .22s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-mask { position: absolute; inset: 0; background: rgba(9, 13, 22, .5); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.98);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.modal.open .modal-card { transform: none; }
.modal-card.wide { max-width: 560px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px 16px;
}
.modal-foot:empty { display: none; }

/* Toast */
.toast-wrap {
  position: fixed; left: 50%; top: 22px; z-index: 120;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: 90vw;
}
.toast {
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(17, 24, 39, .9);
  color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn .24s ease;
  backdrop-filter: blur(8px);
  text-align: center;
}
.toast.ok { background: rgba(16, 122, 87, .94); }
.toast.err { background: rgba(185, 28, 28, .94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* 提醒弹窗 */
.remind-pop {
  position: fixed; right: 22px; bottom: 24px; z-index: 90;
  width: 330px; max-width: calc(100vw - 44px);
  border-radius: var(--radius-lg);
  background: var(--card-solid);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.remind-pop-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 700;
}
.remind-pop-head .ico { width: 16px; height: 16px; }
.remind-pop-body { padding: 14px; }
.remind-pop-body h4 { margin: 0 0 6px; font-size: 15px; }
.remind-pop-body p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.55; white-space: pre-wrap; }
.remind-pop-foot { display: flex; gap: 8px; padding: 0 14px 14px; }
.remind-pop-foot .btn { flex: 1; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   材质选择器 / 颜色选择 / 杂项
   ========================================================= */
.material-list { display: flex; flex-direction: column; gap: 8px; }
.material-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  transition: all .16s;
}
.material-opt:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.material-opt.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.material-swatch { width: 46px; height: 34px; border-radius: 9px; flex: none; border: 1px solid var(--line); }
.sw-glass { background: linear-gradient(135deg, #dbeafe, #fce7f3); }
.sw-aurora { background: linear-gradient(135deg, #a78bfa, #f472b6 50%, #67e8f9); }
.sw-neumorph { background: #e8ecf4; box-shadow: inset 2px 2px 5px #c8d0dd, inset -2px -2px 5px #ffffff; }
.sw-flat { background: #ffffff; border: 1px solid #d1d5db; }
.sw-paper { background: linear-gradient(#fdf6e3, #f3ead8); }
.sw-terminal { background: #05110a; border: 1px solid #35f0a0; }
.material-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.material-text strong { font-size: 13.5px; font-weight: 700; }
.material-text small { font-size: 11.5px; color: var(--text-3); }
.mat-check { width: 16px; height: 16px; color: var(--brand); opacity: 0; }
.material-opt.active .mat-check { opacity: 1; }

.color-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cp {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: all .15s;
  padding: 0;
}
.cp.active { border-color: var(--card-solid); box-shadow: 0 0 0 2px var(--brand); transform: scale(1.08); }

.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; margin-top: 2px; }
.check-line input { width: 16px; height: 16px; accent-color: var(--brand); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.eng-tip { padding: 8px 10px; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 4px; }

/* =========================================================
   登录 / 注册页
   ========================================================= */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 18px; }
.auth-card {
  width: 100%; max-width: 900px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-side {
  position: relative;
  padding: 40px 34px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(155deg, #4f6bff 0%, #7c5cff 55%, #b06bff 100%);
  color: #fff;
  overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; width: 320px; height: 320px;
  right: -110px; bottom: -120px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); filter: blur(20px);
}
.auth-side .as-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.auth-side .as-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255, 255, 255, .22);
  display: grid; place-items: center; font-size: 18px;
  backdrop-filter: blur(6px);
}
.auth-side h2 { font-size: 27px; line-height: 1.35; margin: 34px 0 12px; font-weight: 800; letter-spacing: -.5px; }
.auth-side p { margin: 0; font-size: 13.5px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.auth-side li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .9); }
.auth-side li .ico { width: 16px; height: 16px; opacity: .9; }
.auth-side .as-foot { position: relative; z-index: 1; font-size: 11.5px; color: rgba(255, 255, 255, .6); margin-top: 30px; }

.auth-main { padding: 38px 36px 32px; display: flex; flex-direction: column; }
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.auth-head h1 { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.3px; }
.auth-head .auth-back { font-size: 12.5px; color: var(--text-3); }
.auth-head .auth-back:hover { color: var(--brand); }

.auth-tabs { display: flex; gap: 4px; padding: 4px; background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 11px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; padding: 8px 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 600;
  transition: all .18s;
}
.auth-tabs button.active { background: var(--card-solid); color: var(--text); box-shadow: var(--shadow-sm); }

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeUp .22s ease; }

.af-field { margin-bottom: 14px; }
.af-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.af-input {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--input);
  transition: border-color .18s, box-shadow .18s;
}
.af-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.af-input > .ico { width: 17px; height: 17px; margin-left: 12px; color: var(--text-3); flex: none; }
.af-input input {
  flex: 1; min-width: 0;
  height: 44px; padding: 0 12px;
  border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text);
}
.af-input .af-suffix {
  border: 0; background: transparent;
  color: var(--brand); font-size: 12.5px; font-weight: 600;
  padding: 0 12px; height: 100%; white-space: nowrap;
}
.af-input .af-suffix:disabled { color: var(--text-3); }

.af-btn {
  width: 100%; height: 44px; margin-top: 6px;
  border: 0; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 14.5px; font-weight: 650;
  box-shadow: 0 10px 22px -12px var(--brand);
  transition: all .18s;
}
.af-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.af-btn:active { transform: scale(.99); }
.af-btn[disabled] { opacity: .6; pointer-events: none; }

.af-tip { font-size: 11.5px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }
.af-tip a { color: var(--brand); }

.auth-alert {
  display: none;
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(239, 68, 68, .1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, .22);
}
.auth-alert.show { display: block; animation: fadeUp .2s ease; }
.auth-alert.ok { background: rgba(16, 185, 129, .1); color: #059669; border-color: rgba(16, 185, 129, .25); }

.af-code-tip {
  display: none; margin-top: 8px; padding: 8px 10px;
  border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}
.af-code-tip.show { display: block; }

.auth-switch-line { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 16px; }
.auth-switch-line button { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 12.5px; padding: 0 2px; }

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; max-width: 460px; border-radius: 20px; }
  .auth-side { display: none; }
  .auth-main { padding: 28px 22px 24px; }
  .auth-head h1 { font-size: 19px; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1080px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-right { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .dash-right .w-quick { grid-column: 1 / -1; }
  .dash-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .topbar-inner { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .brand { order: 1; }
  .top-actions { order: 2; margin-left: auto; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .brand-name { display: none; }
  .notice-bar { margin: 0 14px 8px; }
  .btn-user-name { display: none; }
  .btn-user { padding: 0 4px; width: 36px; justify-content: center; }
  .more-menu { right: 14px; top: calc(100% - 2px); }

  /* 窄屏：边缘条换成顶栏按钮，避免悬浮钮遮挡内容 */
  .nav-rail { display: none; }
  .nav-toggle { display: grid; order: 0; }

  .page { padding: 16px 14px 40px; }
}

@media (max-width: 640px) {
  .page { padding: 14px 12px 40px; }
  .today-bar { margin-bottom: 12px; gap: 10px; }
  .today-text h1 { font-size: 19px; margin-bottom: 4px; }
  .today-meta { font-size: 11.5px; gap: 6px; }
  .today-quick { width: 100%; }
  .qa { flex: 1; justify-content: center; }

  .widget { border-radius: var(--radius-lg); }
  .w-head { padding: 12px 13px 0; }
  .w-body { padding: 10px 13px 13px; }

  .dash-right { grid-template-columns: minmax(0, 1fr); }
  .dash-right .w-quick { grid-column: auto; }

  .cal-cell { height: 38px; font-size: 12px; border-radius: 8px; }
  .cal-items { max-height: 178px; }
  .cal-day-head strong { font-size: 12px; }

  .site-card { padding: 9px 3px 7px; }
  .site-ico { width: 32px; height: 32px; border-radius: 10px; }
  .site-ico img { width: 21px; height: 21px; }
  .site-letter { font-size: 13px; }
  .site-title { font-size: 11px; -webkit-line-clamp: 1; }

  .btn-search { padding: 0 11px; }
  .btn-search-text { display: none; }
  .btn-search .ico { width: 16px; height: 16px; }

  .nav-panel { width: 100%; max-width: none; }
  .remind-pop { left: 12px; right: 12px; width: auto; bottom: 76px; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal-card { max-width: none; }
  .note-wall { grid-template-columns: 1fr; }
  .page .site-foot { padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
