/* =========================================================
   日记猫 · 视觉系统
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --fs-scale: 1;
  --preview-lines: 5;
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --bg: #130f0b;
  --bg-soft: #19140f;
  --panel: #201811;
  --panel-2: #271e16;
  --panel-3: #30251b;
  --card: rgba(32, 24, 17, .93);
  --card-solid: #201811;
  --text: #f7efe4;
  --text-2: #dfd0bd;
  --muted: #a8957f;
  --faint: #796957;
  --line: rgba(255, 233, 207, .085);
  --line-strong: rgba(255, 233, 207, .15);
  --accent: #d98e57;
  --accent-2: #f0b27a;
  --accent-deep: #9c5c2f;
  --accent-soft: rgba(217, 142, 87, .16);
  --accent-softer: rgba(217, 142, 87, .09);
  --danger: #ff7d74;
  --danger-soft: rgba(255, 125, 116, .12);
  --success: #83c79c;
  --gold: #ecc37d;
  --paw-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23d98e57' fill-opacity='.055'%3E%3Cellipse cx='60' cy='67' rx='13' ry='10'/%3E%3Cellipse cx='43' cy='50' rx='5' ry='6' transform='rotate(-20 43 50)'/%3E%3Cellipse cx='56' cy='45' rx='5' ry='6'/%3E%3Cellipse cx='69' cy='46' rx='5' ry='6' transform='rotate(18 69 46)'/%3E%3Cellipse cx='80' cy='55' rx='5' ry='6' transform='rotate(30 80 55)'/%3E%3C/g%3E%3C/svg%3E");
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, .55);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, .3);
  --shadow-sm: 0 5px 16px rgba(0, 0, 0, .2);
  --glass: rgba(24, 18, 13, .82);
  --selection: rgba(217, 142, 87, .42);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #faf4ea;
  --bg-soft: #f3ebdf;
  --panel: #fffaf3;
  --panel-2: #fbf3e7;
  --panel-3: #f3e7d7;
  --card: rgba(255, 250, 243, .95);
  --card-solid: #fffaf3;
  --text: #3a2e24;
  --text-2: #524235;
  --muted: #8d7a66;
  --faint: #b4a18c;
  --line: rgba(74, 52, 34, .09);
  --line-strong: rgba(74, 52, 34, .17);
  --accent: #bb7446;
  --accent-2: #d18b57;
  --accent-deep: #91532d;
  --accent-soft: rgba(187, 116, 70, .13);
  --accent-softer: rgba(187, 116, 70, .07);
  --danger: #cf554d;
  --danger-soft: rgba(207, 85, 77, .1);
  --success: #3d946e;
  --gold: #b8833b;
  --paw-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23bb7446' fill-opacity='.045'%3E%3Cellipse cx='60' cy='67' rx='13' ry='10'/%3E%3Cellipse cx='43' cy='50' rx='5' ry='6' transform='rotate(-20 43 50)'/%3E%3Cellipse cx='56' cy='45' rx='5' ry='6'/%3E%3Cellipse cx='69' cy='46' rx='5' ry='6' transform='rotate(18 69 46)'/%3E%3Cellipse cx='80' cy='55' rx='5' ry='6' transform='rotate(30 80 55)'/%3E%3C/g%3E%3C/svg%3E");
  --shadow-lg: 0 22px 58px rgba(74, 52, 34, .08);
  --shadow-md: 0 12px 30px rgba(74, 52, 34, .07);
  --shadow-sm: 0 4px 14px rgba(74, 52, 34, .07);
  --glass: rgba(255, 250, 243, .86);
  --selection: rgba(187, 116, 70, .25);
  color-scheme: light;
}

html {
  font-size: calc(16px * var(--fs-scale));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(173, 108, 65, .2), transparent 55%),
    radial-gradient(800px 600px at 100% 110%, rgba(217, 142, 87, .14), transparent 60%),
    var(--paw-pattern) 0 0 / 150px 150px repeat,
    #0b0806;
  color: var(--text);
  font-family: var(--app-font);
  font-size: .95rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

html[data-theme="light"] body {
  background:
    radial-gradient(1200px 760px at 50% -6%, rgba(214, 164, 113, .12), transparent 62%),
    var(--paw-pattern) 0 0 / 150px 150px repeat,
    #f1e7d9;
}

::selection { background: var(--selection); color: var(--text); }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; opacity: .48; }
input, textarea { border: 0; background: none; }
input:focus, textarea:focus, button:focus-visible, [tabindex]:focus-visible {
  outline: none;
}
button:focus-visible, [tabindex]:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
[hidden], .is-hidden { display: none !important; }

.svg-sprite {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon.fill, .icon.paw-icon { fill: currentColor; stroke: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168, 149, 127, .24); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 149, 127, .4); }

/* =========================================================
   登录 / 注册
   ========================================================= */
.auth {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 26px;
  overflow: auto;
  background:
    radial-gradient(800px 520px at 15% 10%, rgba(173, 108, 65, .2), transparent 60%),
    radial-gradient(900px 600px at 90% 95%, rgba(217, 142, 87, .19), transparent 55%),
    var(--paw-pattern) 0 0 / 170px 170px repeat,
    #0b0806;
}
.auth-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  justify-self: center;
  align-self: center;
  min-height: min(730px, calc(100dvh - 52px));
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  border-radius: 30px;
  overflow: hidden;
  background: #120d09;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 110px rgba(0, 0, 0, .55);
}
.auth-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.scene-auth {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.auth-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 12, 8, .3), transparent 45%),
    linear-gradient(180deg, rgba(32, 18, 11, .1) 12%, rgba(24, 12, 8, .04) 45%, rgba(14, 8, 5, .82) 100%);
  z-index: -1;
}
.auth-visual-copy {
  position: absolute;
  left: clamp(30px, 5vw, 64px);
  right: 40px;
  top: clamp(38px, 8vh, 88px);
  max-width: 440px;
}
.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(60, 32, 16, .2);
  margin-bottom: 24px;
}
.auth-logo .icon { width: 27px; height: 27px; stroke-width: 1.5; }
.auth-logo .brand-symbol { width: 28px; height: 28px; display: block; }
.auth-kicker {
  font-size: .67rem;
  letter-spacing: .32em;
  color: rgba(255, 255, 255, .62);
  font-weight: 600;
  margin-bottom: 9px;
}
.auth-visual h1 {
  margin: 0;
  font-size: clamp(2.7rem, 4.6vw, 4.05rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 650;
  text-shadow: 0 6px 30px rgba(50, 24, 12, .25);
}
.auth-visual p {
  margin: 14px 0 0;
  font-size: 1.06rem;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .82);
}
.auth-quote {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: rgba(255, 255, 255, .60);
  letter-spacing: .06em;
}
.auth-quote span {
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, .4);
}
.auth-float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 16px;
  background: rgba(40, 20, 11, .34);
  border: 1px solid rgba(255, 255, 255, .19);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(40, 20, 11, .2);
  color: #fff;
}
.auth-float-card b { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.auth-float-card small { display: block; font-size: .67rem; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.auth-float-card .icon { width: 23px; height: 23px; color: rgba(255, 255, 255, .82); }
.auth-float-one { left: clamp(30px, 5vw, 64px); bottom: 118px; }
.auth-float-two { right: 36px; bottom: 60px; }
.float-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd89a;
  box-shadow: 0 0 0 5px rgba(255, 216, 154, .12);
}
.auth-panel {
  background:
    radial-gradient(500px 340px at 100% 0%, rgba(217, 142, 87, .12), transparent 70%),
    var(--paw-pattern) 0 0 / 160px 160px repeat,
    #150f0b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px clamp(30px, 4.5vw, 68px);
}
.auth-card { width: 100%; max-width: 390px; margin: 0 auto; }
.auth-mini-logo {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 18px;
}
.auth-mini-logo .brand-symbol { width: 25px; height: 25px; display: block; }
.auth-eyebrow {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .28em;
  color: #e0a36f;
  margin-bottom: 12px;
}
.auth-card h2 {
  margin: 0;
  font-size: 2.05rem;
  letter-spacing: -.035em;
  font-weight: 650;
  line-height: 1.18;
  color: #f7efe4;
}
.auth-sub {
  color: #b5a08a;
  font-size: .82rem;
  margin: 10px 0 30px;
  line-height: 1.7;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 25px;
}
.auth-tab {
  height: 38px;
  border-radius: 9px;
  color: #a99580;
  font-size: .8rem;
  font-weight: 550;
  transition: .22s ease;
}
.auth-tab.is-active {
  background: #2b2018;
  color: #f7efe4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}
.auth-form { display: grid; gap: 17px; }
.field { display: block; }
.field-label {
  display: block;
  font-size: .69rem;
  color: #a08b75;
  margin: 0 0 7px 3px;
  letter-spacing: .04em;
}
.field-box {
  height: 49px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 0 14px;
  background: #1d1611;
  border: 1px solid rgba(255, 233, 207, .09);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field-box:focus-within {
  border-color: rgba(217, 142, 87, .7);
  box-shadow: 0 0 0 3px rgba(217, 142, 87, .14);
  background: #241b14;
}
.field-box > .icon { width: 17px; height: 17px; color: #907d68; }
.field-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: .87rem;
  color: #f7efe4;
  letter-spacing: .015em;
}
.field-box input::placeholder { color: #7d6b58; }
.field-eye {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #8c7964;
  border-radius: 7px;
}
.field-eye:hover { color: #d8c3ab; background: rgba(255, 255, 255, .05); }
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #a08c77;
  font-size: .69rem;
  line-height: 1.55;
  cursor: pointer;
  user-select: none;
}
.checkline input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #665646;
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: .2s ease;
}
.checkmark .icon { width: 10px; height: 10px; stroke-width: 2.8; opacity: 0; transform: scale(.5); transition: .18s ease; }
.checkline .privacy-link { color: var(--accent-2); text-decoration: none; }
.checkline .privacy-link:hover { text-decoration: underline; }
.checkline input:checked + .checkmark { background: var(--accent); border-color: var(--accent); color: #fff; }
.checkline input:checked + .checkmark .icon { opacity: 1; transform: scale(1); }
.checkline:focus-within .checkmark { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-2); }
.auth-error {
  min-height: 18px;
  margin: -4px 0 -2px;
  color: #ff8f8f;
  font-size: .72rem;
  line-height: 1.5;
}
.btn-auth {
  height: 51px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #b96f3d, #d98e57);
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .12em;
  box-shadow: 0 14px 30px rgba(156, 92, 47, .35);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.btn-auth:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0) scale(.995); }
.btn-auth .icon { width: 16px; height: 16px; }
.btn-auth.is-loading { opacity: .65; pointer-events: none; }
.auth-hint {
  margin: 22px 0 0;
  text-align: center;
  font-size: .74rem;
  color: #a08c77;
}
.auth-hint button { color: #e0a36f; font-size: inherit; padding: 2px; }
.auth-hint button:hover { text-decoration: underline; }
.auth-local {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  color: #907d68;
  font-size: .65rem;
  line-height: 1.65;
}
.auth-local .icon { width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto; }
.auth-foot {
  text-align: center;
  margin: 34px 0 0;
  color: #8a7562;
  font-size: .62rem;
  letter-spacing: .06em;
}

/* =========================================================
   应用外壳 / 顶栏
   ========================================================= */
.app {
  position: relative;
  width: min(100%, 900px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(700px 440px at 76% -8%, rgba(217, 142, 87, .09), transparent 65%),
    var(--paw-pattern) 0 0 / 160px 160px repeat,
    var(--bg);
  isolation: isolate;
}
@media (min-width: 940px) {
  body { display: grid; place-items: center; padding: 18px; }
  .app {
    height: min(940px, calc(100dvh - 36px));
    border-radius: 30px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
}
.topbar {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  background: linear-gradient(180deg, var(--bg) 28%, rgba(19, 15, 11, .82) 75%, transparent);
}
html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, var(--bg) 24%, rgba(250, 244, 234, .9) 72%, transparent);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  opacity: .65;
}
.topbar-side { display: flex; align-items: center; gap: 1px; z-index: 2; }
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.brand-symbol { width: 30px; height: 30px; flex: 0 0 auto; display: block; }
.brand-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.brand-words b { color: var(--text); font-size: .8rem; font-weight: 650; letter-spacing: .04em; }
.brand-words small { color: var(--faint); font-size: .46rem; letter-spacing: .09em; margin-top: 2px; }
.topbar-brand { display: inline-flex; align-items: center; min-height: 40px; padding: 0 5px 0 2px; border-radius: 12px; text-align: left; }
.topbar-brand:hover { background: rgba(255, 255, 255, .04); }
html[data-theme="light"] .topbar-brand:hover { background: rgba(0, 0, 0, .035); }
.topbar-brand-lockup .brand-symbol { width: 28px; height: 28px; }
.topbar-brand-lockup .brand-words b { font-size: .76rem; }
.topbar-side.end { margin-left: auto; }
.topbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 160px);
  z-index: 1;
}
.topbar-title {
  font-size: .98rem;
  font-weight: 560;
  letter-spacing: .015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-subtitle {
  display: block;
  font-size: .61rem;
  color: var(--muted);
  letter-spacing: .02em;
  margin-top: -2px;
  font-weight: 400;
  white-space: nowrap;
}
.topbar-kicker {
  font-size: .56rem;
  letter-spacing: .22em;
  color: var(--faint);
  display: block;
  text-align: center;
  margin-bottom: 1px;
}
.topbar-editor-title { text-align: center; line-height: 1.3; }
.topbar-editor-title strong {
  display: block;
  font-size: .9rem;
  font-weight: 560;
  letter-spacing: .02em;
}
.topbar-editor-title span {
  display: block;
  font-size: .61rem;
  color: var(--muted);
  font-weight: 400;
}
.home-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 1rem;
  font-weight: 570;
  letter-spacing: -.01em;
  transition: background .18s ease;
}
.home-date-btn:hover { background: rgba(255, 255, 255, .045); }
html[data-theme="light"] .home-date-btn:hover { background: rgba(0, 0, 0, .035); }
.home-date-btn .icon { width: 15px; height: 15px; color: var(--muted); }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn .icon { width: 21px; height: 21px; }
.icon-btn:hover { background: rgba(255, 255, 255, .055); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-accent { color: var(--accent-2); }
html[data-theme="light"] .icon-btn:hover { background: rgba(0, 0, 0, .045); }
.icon-btn.text { width: auto; padding: 0 11px; font-size: .7rem; color: var(--muted); }
.main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
}
.page { animation: pageIn .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.fab {
  position: absolute;
  z-index: 40;
  right: 20px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #e0a36f, #b96f3d);
  box-shadow: 0 12px 32px rgba(156, 92, 47, .42), inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.fab .icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  opacity: .8;
  stroke-width: 1.7;
}
.fab-plus {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  border-radius: 0;
  display: block;
  background: none;
  color: #9c5c2f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-shadow: none;
  box-shadow: none;
}
.fab:hover { transform: translateY(-2px) rotate(4deg); box-shadow: 0 16px 38px rgba(156, 92, 47, .48); }
.fab:active { transform: scale(.94); }
.app[data-fab-side="left"] .fab { left: 20px; right: auto; }
.app[data-editor="true"] .fab { opacity: 0; pointer-events: none; transform: scale(.7); }

/* =========================================================
   侧边抽屉
   ========================================================= */
.drawer-scrim {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, .54);
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.drawer-open .drawer-scrim {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  backdrop-filter: blur(2px);
}
.drawer {
  position: absolute;
  z-index: 56;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(83%, 342px);
  background: var(--panel);
  transform: translateX(-103%);
  transition: transform .34s cubic-bezier(.22, .8, .24, 1), visibility .34s ease;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  visibility: hidden;
  overflow: hidden;
}
.drawer-open .drawer {
  transform: none;
  visibility: visible;
  box-shadow: 24px 0 65px rgba(0, 0, 0, .35);
}
.drawer-hero {
  position: relative;
  flex: 0 0 auto;
  min-height: 214px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.drawer-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.drawer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(38, 20, 12, .08), rgba(25, 13, 8, .18) 56%, rgba(15, 8, 5, .86) 100%),
    linear-gradient(90deg, rgba(32, 16, 9, .4), transparent 70%);
}
.drawer-brand {
  position: absolute;
  left: 20px;
  top: 78px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 9px;
  border-radius: 99px;
  color: #fff;
  background: rgba(40, 20, 11, .24);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(12px);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .28);
}
.drawer-brand .icon { width: 18px; height: 18px; stroke-width: 1.6; }
.drawer-account {
  position: absolute;
  left: 20px;
  right: 18px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #fff;
  padding: 6px;
  border-radius: 15px;
  transition: background .18s ease;
}
.drawer-account:hover { background: rgba(255, 255, 255, .09); }
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .10));
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
}
.drawer-account-copy { min-width: 0; flex: 1; }
.drawer-account-copy strong {
  display: block;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-account-copy span {
  display: block;
  font-size: .64rem;
  color: rgba(255, 255, 255, .64);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-account > .icon { width: 17px; height: 17px; color: rgba(255, 255, 255, .62); }
.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px calc(20px + env(safe-area-inset-bottom));
}
.drawer-group { display: grid; gap: 2px; padding: 5px 0; }
.drawer-group + .drawer-group { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 12px; }
.drawer-item {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 14px;
  border-radius: 13px;
  color: var(--text-2);
  font-size: .85rem;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}
.drawer-item .icon { width: 21px; height: 21px; color: var(--muted); stroke-width: 1.55; transition: color .16s ease; }
.drawer-item span { flex: 1; }
.drawer-item:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
html[data-theme="light"] .drawer-item:hover { background: rgba(0, 0, 0, .04); }
.drawer-item.is-active { background: var(--accent-soft); color: var(--accent-2); }
.drawer-item.is-active .icon { color: var(--accent-2); }
.drawer-item .mini-chev { width: 15px; height: 15px; opacity: .45; flex: 0 0 auto; }
.drawer-toggle { min-height: 50px; }
.switch {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: #363c49;
  transition: background .22s ease;
}
html[data-theme="light"] .switch { background: #d3d7df; }
html[data-theme="light"] .switch.is-on { background: var(--accent); }
.switch::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(14px); }
.drawer-foot {
  flex: 0 0 auto;
  padding: 0 24px 18px;
  color: var(--faint);
  font-size: .6rem;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 10px;
}
.drawer-foot .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 5px; }
.cloud-status { display: inline-flex; align-items: center; gap: 5px; font-size: .6rem; color: var(--faint); }
.cloud-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.cloud-status.cloud-synced::before { background: var(--success); box-shadow: 0 0 0 3px rgba(97, 201, 155, .12); }
.cloud-status.cloud-syncing::before { background: var(--gold); animation: softPulse 1.1s infinite; }
.cloud-status.cloud-offline::before, .cloud-status.cloud-error::before { background: var(--danger); }

/* =========================================================
   通用页面组件
   ========================================================= */
.page-pad { padding: 8px 18px 24px; }
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .67rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 9px 5px 10px;
}
.section-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin: 26px 4px 13px;
  letter-spacing: -.01em;
}
.section-title small { font-size: .66rem; color: var(--muted); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.surface {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 0 17px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: .78rem;
  font-weight: 520;
  transition: .18s ease;
}
.btn:hover { background: var(--panel-3); border-color: var(--line-strong); }
.btn .icon { width: 16px; height: 16px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #8a79d1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(156, 92, 47, .26);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .7rem; border-radius: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: .65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  white-space: nowrap;
}
html[data-theme="light"] .pill { background: rgba(0, 0, 0, .035); }
.pill.accent { color: var(--accent-2); background: var(--accent-soft); border-color: rgba(217, 142, 87, .18); }
.pill.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.pill .icon { width: 12px; height: 12px; }
.empty {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 26px;
  color: var(--muted);
}
.empty-art {
  width: 100px;
  height: 100px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent-soft), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  margin-bottom: 20px;
  color: var(--accent-2);
  position: relative;
}
.empty-art::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px dashed rgba(217, 142, 87, .3);
  right: -9px;
  bottom: -8px;
}
.empty-art .icon { width: 42px; height: 42px; stroke-width: 1.25; }
.empty-cat .icon { width: 52px; height: 52px; color: var(--accent-2); stroke-width: 1.3; }
.empty h3 { margin: 0 0 7px; color: var(--text-2); font-size: .96rem; font-weight: 570; }
.empty p { margin: 0 0 20px; max-width: 280px; font-size: .74rem; line-height: 1.75; color: var(--muted); }
.empty .btn { margin-top: 3px; }
.loading-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 25px 0;
  color: var(--faint);
  font-size: .68rem;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.grow { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.danger-text { color: var(--danger); }
.accent-text { color: var(--accent-2); }
.nowrap { white-space: nowrap; }

/* =========================================================
   首页
   ========================================================= */
.home-head {
  padding: 3px 18px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.home-eyebrow {
  color: var(--faint);
  font-size: .63rem;
  letter-spacing: .17em;
  margin: 2px 0 5px;
}
.home-title {
  margin: 0;
  font-size: 1.73rem;
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 600;
}
.home-title .thin { color: var(--muted); font-weight: 300; }
.home-weekday {
  display: inline-block;
  font-size: .72rem;
  color: var(--muted);
  margin-left: 7px;
  letter-spacing: 0;
  font-weight: 400;
}
.home-count {
  text-align: center;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .01em;
  padding: 17px 20px 24px;
}
.home-count strong { color: var(--text-2); font-weight: 570; }
.count-paw {
  display: inline-flex;
  align-items: center;
  vertical-align: -3px;
  margin-right: 5px;
  color: var(--accent-2);
}
.count-paw .icon { width: 14px; height: 14px; }
.home-count .clear-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 9px;
  padding: 3px 8px;
  border-radius: 99px;
  color: var(--accent-2);
  background: var(--accent-soft);
  font-size: .62rem;
}
.home-count .clear-filter .icon { width: 11px; height: 11px; }
.memory-strip {
  position: sticky;
  top: 7px;
  z-index: 20;
  margin: 0 16px 4px;
  padding: 11px 11px 10px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(135deg, rgba(48, 33, 22, .84), rgba(27, 20, 15, .88));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 233, 207, .06);
  backdrop-filter: blur(20px) saturate(1.2);
}
html[data-theme="light"] .memory-strip {
  border-color: rgba(120, 77, 45, .1);
  background: linear-gradient(135deg, rgba(255, 247, 236, .94), rgba(255, 250, 243, .92));
  box-shadow: 0 12px 30px rgba(74, 52, 34, .09), inset 0 1px 0 rgba(255, 255, 255, .75);
}
.memory-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 3px 8px;
}
.memory-head .icon { width: 15px; height: 15px; color: var(--accent-2); }
.memory-head b { font-size: .71rem; font-weight: 570; letter-spacing: .015em; }
.memory-head small { color: var(--faint); font-size: .59rem; margin-left: auto; }
.memory-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 1px 2px 2px;
}
.memory-scroll::-webkit-scrollbar { display: none; }
.memory-chip {
  flex: 0 0 auto;
  min-width: 104px;
  scroll-snap-align: start;
  text-align: left;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .065);
  transition: .18s ease;
}
html[data-theme="light"] .memory-chip { background: rgba(120, 77, 45, .055); border-color: rgba(120, 77, 45, .07); }
.memory-chip:hover { background: var(--accent-soft); border-color: rgba(217, 142, 87, .23); transform: translateY(-1px); }
.memory-chip .m-label { display: flex; align-items: center; gap: 5px; font-size: .64rem; color: var(--text-2); font-weight: 530; white-space: nowrap; }
.memory-chip .m-date { display: block; font-size: .57rem; color: var(--faint); margin-top: 3px; white-space: nowrap; }
.memory-chip .m-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(97, 201, 155, .12); }
.memory-chip.no-entry .m-dot { background: var(--faint); box-shadow: none; }
.memory-chip.custom { min-width: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .64rem; padding: 8px 12px; }
.memory-chip.custom .icon { width: 14px; height: 14px; }
.entry-list { padding: 4px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.entry-row {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr);
  gap: 11px;
  animation: cardIn .38s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.entry-date { padding-top: 18px; text-align: center; color: var(--muted); user-select: none; background: transparent; border: 0; box-shadow: none; }
.entry-day {
  display: block;
  font-size: 1.83rem;
  line-height: 1;
  font-weight: 300;
  color: var(--text-2);
  letter-spacing: -.055em;
}
.entry-month {
  display: block;
  font-size: .6rem;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.35;
}
.entry-card {
  position: relative;
  min-width: 0;
  padding: 19px 19px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  -webkit-touch-callout: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  background: var(--panel-2);
}
html[data-theme="light"] .entry-card:hover { background: #fff; }
.app[data-card-bg="false"] .entry-card,
.app[data-card-bg="false"] .entry-big,
.app[data-card-bg="false"] .entry-bookmark,
.app[data-card-bg="false"] .entry-small { background: transparent; box-shadow: none; }
.entry-text {
  margin: 0;
  font-size: .82rem;
  line-height: 1.82;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: var(--preview-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-text.blank { color: var(--faint); font-style: italic; }
.entry-text .hl,
mark.hl {
  color: var(--accent-2);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 0 2px;
}
.entry-media {
  display: flex;
  gap: 7px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.entry-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel-3);
  flex: 0 0 auto;
  cursor: zoom-in;
}
.entry-thumb:first-child:last-child { width: 132px; height: 108px; }
.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.entry-card:hover .entry-thumb img { transform: scale(1.035); }
.entry-thumb .play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .18);
  color: #fff;
}
.entry-thumb .play-badge .icon {
  width: 27px;
  height: 27px;
  fill: rgba(255, 255, 255, .86);
  stroke: none;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, .3));
}
.entry-thumb .vid-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-size: .54rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  letter-spacing: .01em;
}
.entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin-top: 14px;
  color: var(--faint);
  font-size: .62rem;
  line-height: 1.5;
}
.entry-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.entry-meta .icon { width: 12px; height: 12px; }
.entry-meta .mood { color: var(--text-2); }
.entry-meta .cat {
  margin-left: auto;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-2);
  font-size: .61rem;
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 99px;
}
.entry-row.masked .entry-text { color: var(--muted); letter-spacing: .2em; }
.entry-row.masked .entry-thumb img { filter: blur(14px) saturate(.4); transform: scale(1.1); }
.entry-row.masked .entry-thumb::after {
  content: "***";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .32);
  font-size: .8rem;
  letter-spacing: .25em;
}
.entry-row.masked .entry-meta .cat { filter: blur(6px); }

/* 首页：大图 */
.entry-big {
  margin: 0 16px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background: var(--card-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  min-height: 230px;
  animation: cardIn .38s cubic-bezier(.2, .7, .2, 1) both;
}
.entry-big .big-media {
  width: 100%;
  height: 260px;
  object-fit: cover;
  opacity: .94;
}
.entry-big .big-media.placeholder {
  height: 170px;
  background:
    radial-gradient(400px 200px at 80% 10%, rgba(217, 142, 87, .2), transparent 70%),
    linear-gradient(145deg, #302219, #1b140f);
}
.entry-big .big-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .04) 20%, rgba(4, 6, 10, .86) 100%);
}
.entry-big .big-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 22px 18px;
  color: #fff;
}
.entry-big .big-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .63rem;
  color: rgba(255, 255, 255, .62);
  margin-bottom: 7px;
}
.entry-big .big-date b { font-size: 1.05rem; color: #fff; font-weight: 550; }
.entry-big .big-text {
  font-size: .85rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, .9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.entry-big .big-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: rgba(255, 255, 255, .56);
  font-size: .62rem;
}
.entry-big .big-foot .icon { width: 12px; height: 12px; }
.entry-big .big-thumbs {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 5px;
}
.entry-big .big-thumbs img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .3);
}

/* 首页：书签 */
.entry-bookmark {
  margin: 0 16px;
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 19px 20px 15px 23px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  animation: cardIn .38s cubic-bezier(.2, .7, .2, 1) both;
  transition: transform .2s ease, box-shadow .2s ease;
}
.entry-bookmark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-deep));
}
.entry-bookmark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.entry-bookmark .bm-head { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .64rem; margin-bottom: 9px; }
.entry-bookmark .bm-head b { color: var(--text-2); font-weight: 560; }
.entry-bookmark .bm-ribbon { position: absolute; right: 18px; top: 0; width: 17px; height: 32px; background: var(--accent-soft); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.entry-bookmark .entry-text { font-size: .82rem; }
.entry-bookmark .entry-media { margin-top: 12px; }
.entry-bookmark .bm-foot { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--faint); font-size: .62rem; }
.entry-bookmark .bm-foot .cat { margin-left: auto; color: var(--accent-2); }

/* 首页：简约 */
.entry-minimal {
  margin: 0 20px;
  padding: 19px 5px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  animation: cardIn .36s ease both;
}
.entry-minimal:last-child { border-bottom: 0; }
.entry-minimal .mm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--faint); font-size: .61rem; margin-bottom: 8px; }
.entry-minimal .mm-top b { color: var(--muted); font-weight: 500; }
.entry-minimal .entry-text { font-size: .83rem; -webkit-line-clamp: 4; }
.entry-minimal .mm-media { margin-top: 10px; display: flex; gap: 6px; }
.entry-minimal .mm-media img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.entry-minimal .mm-foot { margin-top: 10px; color: var(--faint); font-size: .6rem; display: flex; gap: 8px; align-items: center; }

/* 首页：小图 */
.entry-small {
  margin: 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 16px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  animation: cardIn .36s ease both;
  transition: transform .2s ease;
}
.entry-small:hover { transform: translateY(-1px); }
.entry-small .sm-body { flex: 1; min-width: 0; }
.entry-small .sm-head { color: var(--faint); font-size: .59rem; margin-bottom: 5px; display: flex; gap: 7px; }
.entry-small .entry-text { font-size: .78rem; -webkit-line-clamp: 2; }
.entry-small .sm-thumb { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; background: var(--panel-3); }
.entry-small .sm-foot { color: var(--faint); font-size: .58rem; margin-top: 6px; display: flex; gap: 6px; }
.entry-date.hidden { display: none; }
.entry-small-wrap { display: block; }
.entry-small-wrap .entry-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 20px 7px;
  text-align: left;
}
.entry-small-wrap .entry-day { font-size: .65rem; color: var(--faint); letter-spacing: .02em; font-weight: 400; }
.entry-small-wrap .entry-month { margin: 0; font-size: .58rem; }
.list-end {
  text-align: center;
  color: var(--faint);
  font-size: .63rem;
  letter-spacing: .12em;
  padding: 30px 20px 8px;
}
.list-end .line { width: 24px; height: 1px; background: var(--line-strong); display: inline-block; vertical-align: middle; margin: 0 8px; }
.home-fab-space { height: 20px; }

/* =========================================================
   统计
   ========================================================= */
.stats-wrap { padding: 8px 17px 28px; }
.stats-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 255px;
  padding: 30px 27px;
  background:
    radial-gradient(380px 300px at 85% 10%, rgba(240, 178, 122, .28), transparent 70%),
    linear-gradient(145deg, #35251a, #221810 62%, #1b130e);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: var(--shadow-md);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stats-hero::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  right: -135px;
  top: -150px;
}
.stats-hero::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px dashed rgba(255, 255, 255, .09);
  border-radius: 50%;
  right: -65px;
  top: -85px;
}
.stats-hero .sh-kicker { font-size: .61rem; letter-spacing: .25em; color: rgba(255, 255, 255, .48); }
.stats-hero h2 {
  margin: 8px 0 3px;
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
}
.stats-hero h2 b { font-weight: 600; }
.stats-days {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.stats-days strong {
  font-size: 4.4rem;
  line-height: .9;
  font-weight: 230;
  letter-spacing: -.07em;
  background: linear-gradient(180deg, #fff, #b7acdf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats-days span { color: rgba(255, 255, 255, .58); font-size: .75rem; letter-spacing: .05em; }
.stats-hero .sh-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, .48);
  font-size: .64rem;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.stats-hero .sh-foot .spark { display: inline-flex; align-items: center; gap: 5px; }
.stats-hero .sh-foot .icon { width: 14px; height: 14px; color: #c9b9ff; }
.stats-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.metric-card {
  border-radius: 17px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 10px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.metric-card .m-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 9px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.metric-card .m-icon .icon { width: 15px; height: 15px; }
.metric-card strong {
  display: block;
  font-size: 1.43rem;
  font-weight: 340;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.15;
}
.metric-card small { display: block; color: var(--muted); font-size: .6rem; margin-top: 5px; letter-spacing: .03em; }
.stats-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.7;
  background: var(--accent-softer);
  border: 1px solid var(--line);
}
.stats-note .icon { width: 15px; height: 15px; color: var(--accent-2); margin-top: 2px; }
.heat-card {
  margin-top: 14px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}
.heat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.heat-head b { font-size: .8rem; font-weight: 570; }
.heat-head span { color: var(--faint); font-size: .6rem; }
.heat-scroll { overflow-x: auto; padding-bottom: 4px; }
.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 14px);
  grid-auto-flow: column;
  grid-auto-columns: 14px;
  gap: 5px;
  min-width: min-content;
}
.heat-cell { width: 14px; height: 14px; border-radius: 3px; background: var(--panel-3); }
.heat-cell.l1 { background: rgba(187, 116, 70, .32); }
.heat-cell.l2 { background: rgba(187, 116, 70, .54); }
.heat-cell.l3 { background: rgba(156, 92, 47, .78); }
.heat-cell.l4 { background: var(--accent-deep); }
.heat-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 10px; color: var(--faint); font-size: .56rem; }
.heat-legend .heat-cell { width: 9px; height: 9px; border-radius: 2px; }
.stats-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.stats-mini .mini-card { border-radius: 16px; border: 1px solid var(--line); background: var(--card); padding: 15px 16px; }
.stats-mini .mini-card small { color: var(--faint); font-size: .61rem; display: block; }
.stats-mini .mini-card b { display: block; color: var(--text-2); font-size: .82rem; font-weight: 550; margin-top: 5px; }

/* =========================================================
   图库
   ========================================================= */
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 17px 15px;
}
.gallery-toolbar .filter-note { font-size: .67rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.gallery-toolbar .filter-note .icon { width: 13px; height: 13px; }
.gallery-toolbar .btn { margin-left: auto; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0 4px;
}
.media-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--panel-3);
  cursor: zoom-in;
  border-radius: 3px;
}
.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .2s ease;
}
.media-tile:hover img { transform: scale(1.045); }
.media-tile .tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, .58));
  pointer-events: none;
}
.media-tile .tile-date {
  position: absolute;
  left: 7px;
  bottom: 5px;
  font-size: .54rem;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.media-tile .tile-video {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .53rem;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(4px);
}
.media-tile .tile-video .icon { width: 9px; height: 9px; fill: currentColor; stroke: none; }
.media-tile.video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .24) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='m9 6 10 6-10 6Z'/%3E%3C/svg%3E") center / 16px no-repeat;
  backdrop-filter: blur(3px);
}
.gallery-groups { padding: 0 0 20px; }
.gallery-group { margin-bottom: 18px; }
.gallery-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 18px 9px;
  color: var(--muted);
  font-size: .66rem;
}
.gallery-group-head b { color: var(--text-2); font-weight: 560; font-size: .75rem; }
.gallery-group-head span { margin-left: auto; color: var(--faint); font-size: .59rem; }
.gallery-empty { padding-top: 55px; }

/* =========================================================
   分类
   ========================================================= */
.cat-intro {
  padding: 8px 20px 20px;
  color: var(--muted);
  font-size: .7rem;
  text-align: center;
  line-height: 1.6;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 0 17px 18px;
}
.cat-card {
  position: relative;
  min-height: 150px;
  border-radius: 19px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 19px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .2s ease;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -55px auto;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: var(--accent-softer);
  pointer-events: none;
}
.cat-card:hover { transform: translateY(-2px); border-color: rgba(217, 142, 87, .32); box-shadow: var(--shadow-md); }
.cat-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cat-card .cat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 15px;
}
.cat-card .cat-icon .icon { width: 17px; height: 17px; }
.cat-card .cat-name {
  font-size: .92rem;
  font-weight: 560;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-card .cat-count { font-size: .63rem; color: var(--muted); margin-top: 5px; }
.cat-card .cat-subtitle { font-size: .57rem; color: var(--faint); margin-top: 2px; letter-spacing: .02em; }
.cat-card .cat-menu {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--faint);
  opacity: .8;
}
.cat-card .cat-menu:hover { background: var(--panel-3); color: var(--text); }
.cat-card .cat-menu .icon { width: 15px; height: 15px; }
.cat-card.add {
  min-height: 150px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  box-shadow: none;
}
.cat-card.add .plus-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.cat-card.add .plus-ring .icon { width: 18px; height: 18px; }
.cat-card.add span { font-size: .7rem; }
.cat-card.add::before { display: none; }

/* =========================================================
   漫步
   ========================================================= */
.wander-page {
  min-height: calc(100dvh - 140px);
  display: flex;
  flex-direction: column;
  padding: 4px 18px 18px;
}
.wander-head { text-align: center; padding: 12px 0 18px; }
.wander-head .eyebrow { font-size: .59rem; letter-spacing: .24em; color: var(--faint); }
.wander-head h2 { margin: 7px 0 3px; font-size: 1.18rem; font-weight: 520; letter-spacing: .04em; }
.wander-head p { margin: 0; color: var(--muted); font-size: .67rem; }
.wander-stage {
  flex: 1;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: pan-y;
}
.wander-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 142, 87, .24), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
}
.wander-card {
  position: relative;
  width: min(100%, 410px);
  min-height: 390px;
  border-radius: 25px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .035), transparent 36%),
    var(--card-solid);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .34);
  padding: 28px 27px 22px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  transition: transform .25s ease, opacity .25s ease;
  overflow: hidden;
}
html[data-theme="light"] .wander-card { box-shadow: 0 24px 60px rgba(40, 45, 65, .13); }
.wander-card::before {
  content: "“";
  position: absolute;
  top: -22px;
  right: 17px;
  font-family: Georgia, serif;
  font-size: 7rem;
  color: var(--accent-soft);
  line-height: 1;
  pointer-events: none;
}
.wander-card .w-date {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
  font-size: .67rem;
  margin-bottom: 17px;
}
.wander-card .w-date b { font-size: 1.85rem; font-weight: 300; color: var(--text); letter-spacing: -.05em; line-height: 1; }
.wander-card .w-date .week { font-size: .63rem; color: var(--muted); }
.wander-card .w-date .w-day-count {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--accent-2);
  background: var(--accent-soft);
  font-size: .54rem;
  white-space: nowrap;
}
.wander-card .w-text {
  flex: 1;
  font-size: .88rem;
  line-height: 1.95;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 11;
  -webkit-box-orient: vertical;
}
.wander-card .w-text.blank { color: var(--faint); font-style: italic; }
.wander-card .w-media {
  display: flex;
  gap: 6px;
  margin-top: 15px;
}
.wander-card .w-media img { width: 48px; height: 48px; object-fit: cover; border-radius: 7px; opacity: .88; }
.wander-card .w-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: var(--faint);
  font-size: .62rem;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  padding-right: 58px;
}
.wander-card .w-foot .cat { margin-left: auto; color: var(--accent-2); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wander-card .w-index {
  position: absolute;
  right: 24px;
  bottom: 18px;
  font-size: .55rem;
  color: var(--faint);
  letter-spacing: .08em;
}
.wander-card.swipe-out-left { transform: translateX(-55px) rotate(-2.5deg); opacity: 0; }
.wander-card.swipe-out-right { transform: translateX(55px) rotate(2.5deg); opacity: 0; }
.wander-card.swipe-in { animation: wanderIn .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes wanderIn {
  from { opacity: .2; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.wander-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: .61rem;
  padding: 16px 0 3px;
  letter-spacing: .03em;
}
.wander-hint .icon { width: 13px; height: 13px; }
.wander-hint .arrows { display: inline-flex; gap: 2px; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.wander-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
}
.wander-nav .wbtn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: .18s ease;
}
.wander-nav .wbtn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.wander-nav .wbtn .icon { width: 19px; height: 19px; }
.wander-bottom-note { text-align: center; color: var(--faint); font-size: .61rem; padding: 17px 0 7px; }
.wander-bottom-note button { color: var(--accent-2); font-size: inherit; }
.wander-empty .empty { min-height: 55vh; }

/* =========================================================
   日历
   ========================================================= */
.calendar-wrap { padding: 5px 17px 20px; }
.calendar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 11px 0 22px;
}
.calendar-year {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.16rem;
  font-weight: 560;
  letter-spacing: .02em;
  color: var(--text);
  padding: 5px 7px;
  border-radius: 9px;
}
.calendar-year:hover { background: var(--panel-2); }
.calendar-year .icon { width: 16px; height: 16px; color: var(--muted); }
.calendar-top .cal-arrow {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
}
.calendar-top .cal-arrow:hover { color: var(--text); background: var(--panel-2); }
.calendar-top .cal-arrow .icon { width: 17px; height: 17px; }
.calendar-hero {
  text-align: center;
  margin: 0 0 18px;
}
.calendar-hero h2 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 260;
  letter-spacing: .18em;
  padding-left: .18em;
  color: var(--text);
  line-height: 1.25;
}
.calendar-hero p { margin: 4px 0 0; color: var(--muted); font-size: .64rem; letter-spacing: .1em; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--faint);
  font-size: .62rem;
  padding: 0 0 9px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.cal-cell {
  position: relative;
  aspect-ratio: .92;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 9px;
  color: var(--text-2);
  font-size: .73rem;
  transition: .16s ease;
  min-height: 47px;
}
.cal-cell.blank { background: transparent; pointer-events: none; }
.cal-cell.has-media { color: #fff; border-color: rgba(255, 255, 255, .12); }
.cal-cell .cal-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cal-cell.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .52));
  z-index: 1;
}
.cal-cell .cal-num { position: relative; z-index: 2; line-height: 1; font-weight: 450; text-shadow: 0 1px 4px rgba(0, 0, 0, .26); }
.cal-cell.has-media .cal-num { color: #fff; }
.cal-cell .cal-dots {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  z-index: 2;
}
.cal-cell .cal-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 2px rgba(0, 0, 0, .16); }
.cal-cell.has-media .cal-dots i { background: #fff; }
.cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-cell.today .cal-num { color: var(--accent-2); }
.cal-cell.has-media.today .cal-num { color: #fff; }
.cal-cell.selected { background: var(--accent); color: #fff; }
.cal-cell.selected .cal-num { color: #fff; }
.cal-cell:hover { border-color: rgba(217, 142, 87, .42); }
.cal-cell.has-media:hover .cal-thumb { transform: scale(1.04); transition: transform .3s ease; }
.cal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: .67rem;
}
.cal-summary b { color: var(--text-2); font-weight: 550; }
.cal-summary .btn { margin-left: auto; }
.cal-section-title { margin: 28px 3px 12px; font-size: .92rem; font-weight: 550; }
.cal-recent { display: flex; flex-direction: column; gap: 8px; }
.cal-recent-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: .72rem;
}
.cal-recent-item .day-chip {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-size: .7rem;
  flex: 0 0 auto;
}
.cal-recent-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-recent-item time { margin-left: auto; color: var(--faint); font-size: .58rem; flex: 0 0 auto; }

/* =========================================================
   设置 / 列表行
   ========================================================= */
.settings-wrap { padding: 7px 16px 30px; }
.settings-group {
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 13px;
  box-shadow: var(--shadow-sm);
}
.settings-row {
  width: 100%;
  min-height: 59px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  text-align: left;
  color: var(--text-2);
  font-size: .8rem;
  transition: background .16s ease;
}
.settings-row + .settings-row { border-top: 1px solid var(--line); }
a.settings-row { text-decoration: none; }
.settings-row:hover { background: rgba(255, 255, 255, .028); }
html[data-theme="light"] .settings-row:hover { background: rgba(0, 0, 0, .02); }
.settings-row .row-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.settings-row .row-icon .icon { width: 18px; height: 18px; }
.settings-row .row-main { flex: 1; min-width: 0; }
.settings-row .row-main b { display: block; font-weight: 480; color: var(--text); font-size: .8rem; }
.settings-row .row-main small { display: block; color: var(--faint); font-size: .61rem; margin-top: 2px; line-height: 1.5; }
.settings-row .row-value { color: var(--muted); font-size: .68rem; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.settings-row .row-value .icon { width: 14px; height: 14px; opacity: .5; }
.settings-row.tall { min-height: 68px; }
.settings-row.danger .row-main b { color: var(--danger); }
.settings-group-title {
  color: var(--faint);
  font-size: .59rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  padding: 15px 6px 8px;
}
.settings-group-title:first-child { padding-top: 4px; }
.settings-footer-note {
  padding: 13px 6px 3px;
  color: var(--faint);
  font-size: .61rem;
  line-height: 1.75;
}
.mini-switch-row { display: flex; align-items: center; gap: 12px; }
.link-btn { color: var(--accent-2); font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* 字体设置 */
.font-page { padding: 12px 18px 30px; }
.font-preview {
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 285px;
  padding: 25px 23px;
  line-height: 2.05;
  color: var(--text-2);
  font-size: .92rem;
  letter-spacing: .015em;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.font-preview::after {
  content: "Aa";
  position: absolute;
  right: 16px;
  bottom: -8px;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent-soft);
  font-weight: 300;
  pointer-events: none;
}
.font-toolbar {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 14px 17px;
  box-shadow: var(--shadow-sm);
}
.font-toolbar .font-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  font-size: .8rem;
}
.font-toolbar .font-btn .icon { width: 18px; height: 18px; color: var(--muted); }
.font-toolbar .font-btn span { flex: 1; text-align: left; }
.font-toolbar .font-btn small { color: var(--faint); font-size: .62rem; }
.font-size-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}
.font-size-row .size-small { font-size: .64rem; }
.font-size-row .size-large { font-size: 1.05rem; }
.font-size-row input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-pct, 50%), var(--panel-3) var(--range-pct, 50%) 100%);
  appearance: none;
  outline: none;
}
.font-size-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .24);
  cursor: pointer;
}
.font-size-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  cursor: pointer;
}
.font-size-value { min-width: 41px; text-align: right; color: var(--muted); font-size: .64rem; }
.font-list { display: flex; flex-direction: column; gap: 8px; }
.font-option {
  width: 100%;
  min-height: 53px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--panel-2);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--text-2);
  transition: .16s ease;
  font-size: .88rem;
}
.font-option:hover { background: var(--panel-3); }
.font-option.is-selected { border-color: var(--accent); background: var(--accent-softer); }
.font-option .check { margin-left: auto; color: var(--accent-2); opacity: 0; }
.font-option.is-selected .check { opacity: 1; }
.font-option .check .icon { width: 17px; height: 17px; }
.font-option small { color: var(--faint); font-size: .58rem; margin-left: 4px; }
.font-sample-system { font-family: var(--app-font); }
.font-sample-hei { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; }
.font-sample-song { font-family: "Songti SC", SimSun, "Noto Serif CJK SC", serif; }
.font-sample-kai { font-family: "Kaiti SC", KaiTi, STKaiti, "KaiTi_GB2312", serif; }
.font-sample-fang { font-family: "FangSong", STFangsong, "仿宋", serif; }
.font-sample-round { font-family: "YouYuan", "幼圆", "Arial Rounded MT Bold", "Microsoft YaHei", sans-serif; }
.font-sample-hand { font-family: "Segoe Print", "Bradley Hand", "Kaiti SC", cursive; }
.font-sample-mono { font-family: "Cascadia Code", Consolas, "Courier New", monospace; }

/* 更多样式 */
.more-page { padding: 3px 16px 30px; }
.style-desc {
  color: var(--faint);
  font-size: .61rem;
  line-height: 1.7;
  padding: 7px 6px 0;
}
.select-row { cursor: pointer; }

/* 往年今日 */
.memory-page { padding: 4px 16px 30px; }
.memory-enable {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 19px;
  border-radius: 19px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  cursor: pointer;
}
.memory-enable .memory-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.memory-enable .memory-icon .icon { width: 21px; height: 21px; }
.memory-enable .me-copy { flex: 1; }
.memory-enable .me-copy b { display: block; font-size: .85rem; font-weight: 550; }
.memory-enable .me-copy small { display: block; color: var(--faint); font-size: .62rem; margin-top: 3px; }
.memory-feed {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 4px;
}
.memory-group-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .64rem;
  margin: 18px 4px 7px;
}
.memory-group-title .line { height: 1px; background: var(--line); flex: 1; }
.memory-group-title b { color: var(--text-2); font-weight: 550; font-size: .7rem; }
.memory-mini {
  padding: 16px 17px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: .77rem;
  line-height: 1.75;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .18s ease;
}
.memory-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.memory-mini .mm-meta { color: var(--faint); font-size: .61rem; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.memory-mini .mm-meta time { color: var(--muted); }
.memory-mini p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.memory-mini .mm-thumb { width: 100%; max-height: 150px; object-fit: cover; border-radius: 10px; margin-top: 10px; }

/* 导入导出 */
.io-page { padding: 5px 16px 30px; }
.io-group { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--card); margin-bottom: 13px; box-shadow: var(--shadow-sm); }
.io-row {
  width: 100%;
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 17px;
  text-align: left;
  color: var(--text-2);
  font-size: .8rem;
  transition: background .16s ease;
}
.io-row + .io-row { border-top: 1px solid var(--line); }
.io-row:hover { background: rgba(255, 255, 255, .028); }
.io-row .io-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--panel-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.io-row .io-icon .icon { width: 16px; height: 16px; }
.io-row .io-copy { flex: 1; min-width: 0; }
.io-row .io-copy b { display: block; font-weight: 480; color: var(--text); font-size: .8rem; }
.io-row .io-copy small { display: block; color: var(--faint); font-size: .6rem; margin-top: 2px; }
.io-row > .icon { width: 16px; height: 16px; color: var(--faint); opacity: .55; }
.io-row.danger .io-copy b { color: var(--danger); }
.io-note { display: flex; gap: 9px; align-items: flex-start; color: var(--faint); font-size: .61rem; line-height: 1.75; padding: 6px 4px 0; }
.io-note .icon { width: 14px; height: 14px; margin-top: 2px; flex: 0 0 auto; }
.io-badge { margin-left: auto; color: var(--gold); font-size: .58rem; border: 1px solid rgba(227, 187, 118, .3); border-radius: 4px; padding: 1px 5px; }

/* =========================================================
   回收站
   ========================================================= */
.recycle-page { padding: 2px 16px 30px; }
.recycle-hint { text-align: center; color: var(--faint); font-size: .64rem; padding: 8px 0 22px; }
.recycle-card {
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 17px 17px 13px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.recycle-card .rc-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .62rem; margin-bottom: 8px; }
.recycle-card .rc-head b { color: var(--text-2); font-weight: 550; font-size: .73rem; }
.recycle-card .rc-text {
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.recycle-card .rc-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.recycle-card .rc-foot .deleted-at { color: var(--faint); font-size: .58rem; }
.recycle-card .rc-actions { margin-left: auto; display: flex; gap: 5px; }
.recycle-card .rc-actions button {
  font-size: .6rem;
  padding: 5px 9px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.recycle-card .rc-actions button .icon { width: 11px; height: 11px; }
.recycle-card .rc-actions button.restore { color: var(--accent-2); }
.recycle-card .rc-actions button.delete { color: var(--danger); }
.recycle-bulk { display: flex; justify-content: center; padding: 8px 0 0; }

/* =========================================================
   编辑器
   ========================================================= */
.editor-page { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; }
.editor-scroll { flex: 1; padding: 3px 20px 10px; }
.editor-date {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 0 15px;
  text-align: left;
}
.editor-date .ed-date-main { font-size: 1rem; font-weight: 570; letter-spacing: -.01em; }
.editor-date .ed-date-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .62rem; margin-top: 2px; }
.editor-date .ed-date-sub .icon { width: 11px; height: 11px; }
.editor-date > .icon { margin-left: auto; width: 16px; height: 16px; color: var(--faint); }
.editor-body {
  width: 100%;
  min-height: 315px;
  resize: none;
  padding: 4px 0;
  color: var(--text);
  font-family: var(--app-font);
  font-size: .93rem;
  line-height: 1.95;
  letter-spacing: .012em;
  caret-color: var(--accent-2);
  background: transparent;
  overflow: hidden;
}
.editor-body::placeholder { color: var(--faint); }
.app[data-indent="true"] .editor-body,
.app[data-indent="true"] .detail-content p { text-indent: 2em; }
.editor-media {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 11px 0 0;
}
.editor-media:empty { display: none; }
.edit-media-item {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel-3);
}
.edit-media-item img { width: 100%; height: 100%; object-fit: cover; }
.edit-media-item .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.edit-media-item .remove .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.edit-media-item .type {
  position: absolute;
  left: 5px;
  bottom: 4px;
  font-size: .49rem;
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
  background: rgba(0, 0, 0, .46);
}
.edit-media-item.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E") center no-repeat;
  animation: softPulse 1.1s ease-in-out infinite;
}
@keyframes softPulse { 50% { opacity: .55; } }
.add-media-box {
  width: 92px;
  height: 92px;
  border-radius: 11px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, .025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--faint);
  transition: .18s ease;
  flex: 0 0 auto;
}
.add-media-box:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-softer); }
.add-media-box .icon { width: 19px; height: 19px; }
.add-media-box span { font-size: .53rem; }
.add-media-box.compact { width: 100%; height: 48px; flex-direction: row; gap: 7px; }
.add-media-box.compact span { font-size: .65rem; }
.editor-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
}
.attr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .67rem;
  transition: .16s ease;
  max-width: 100%;
}
.attr-chip:hover { background: var(--panel-2); color: var(--text-2); }
.attr-chip.has-value { color: var(--text-2); border-color: rgba(217, 142, 87, .24); background: var(--accent-softer); }
.attr-chip .icon { width: 14px; height: 14px; }
.attr-chip .emoji { font-size: .9rem; line-height: 1; }
.attr-chip .value { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-count {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: .6rem;
  padding: 18px 1px 5px;
}
.editor-count b { color: var(--muted); font-weight: 500; }
.editor-save-state {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: .58rem;
}
.editor-save-state .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.editor-save-state.saving .dot { background: var(--gold); }
.editor-save-state.saved .dot { background: var(--success); }
.editor-toolbar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.3);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}
.editor-toolbar::-webkit-scrollbar { display: none; }
.editor-tool {
  flex: 0 0 auto;
  min-width: 47px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  transition: .16s ease;
}
.editor-tool:hover { background: var(--panel-3); color: var(--text); }
.editor-tool .icon { width: 18px; height: 18px; }
.editor-tool span { font-size: .49rem; line-height: 1; }
.editor-tool.more-tools { min-width: 36px; }
.editor-tool.more-tools .icon { width: 19px; height: 19px; }
.editor-toolbar .spacer { flex: 1; min-width: 2px; }
.editor-toolbar .project-hint { color: var(--faint); font-size: .5rem; white-space: nowrap; padding: 0 6px; }
.editor-date-pill { display: inline-flex; align-items: center; gap: 4px; }

/* 详情 */
.detail-page { padding: 5px 20px 30px; }
.detail-head { padding: 5px 0 22px; }
.detail-date-line { display: flex; align-items: baseline; gap: 11px; color: var(--muted); font-size: .66rem; }
.detail-date-line b { font-size: 2.3rem; font-weight: 250; letter-spacing: -.06em; color: var(--text); line-height: 1; }
.detail-date-line .week { color: var(--muted); font-size: .66rem; }
.detail-time { color: var(--faint); font-size: .62rem; margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.detail-time .icon { width: 12px; height: 12px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.detail-content {
  font-size: .9rem;
  line-height: 2;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: .012em;
  padding: 5px 0 10px;
}
.detail-content p { margin: 0 0 .7em; }
.detail-content p:last-child { margin-bottom: 0; }
.detail-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 16px;
}
.detail-media .dm-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 13px;
  overflow: hidden;
  background: var(--panel-3);
  cursor: zoom-in;
}
.detail-media .dm-item:only-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .dm-item.video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .16);
}
.detail-media .dm-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .36);
  border: 1px solid rgba(255, 255, 255, .52);
  z-index: 2;
  backdrop-filter: blur(4px);
}
.detail-media .dm-play .icon { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.detail-foot {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 10px;
  color: var(--faint);
  font-size: .59rem;
}
.detail-foot .edit-link { color: var(--accent-2); font-size: .66rem; display: inline-flex; gap: 5px; align-items: center; }
.detail-foot .edit-link .icon { width: 13px; height: 13px; }
.detail-actions { display: flex; gap: 8px; margin-top: 23px; }
.detail-actions .btn { flex: 1; }

/* =========================================================
   弹层 / 底部面板 / 对话框
   ========================================================= */
.overlay-root { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.overlay-root.is-open { pointer-events: auto; }
.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, .58);
  backdrop-filter: blur(3px);
  opacity: 0;
  animation: scrimIn .22s ease forwards;
}
@keyframes scrimIn { to { opacity: 1; } }
.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(100%, 560px);
  max-height: min(88dvh, 800px);
  padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .4);
  overflow-y: auto;
  animation: sheetIn .3s cubic-bezier(.2, .82, .2, 1) forwards;
}
@keyframes sheetIn { to { transform: translate(-50%, 0); } }
.sheet-grabber {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 2px auto 13px;
}
.sheet-head { padding: 0 8px 12px; }
.sheet-head h3 { margin: 0; font-size: 1rem; font-weight: 590; letter-spacing: -.01em; color: var(--text); }
.sheet-head p { margin: 5px 0 0; color: var(--muted); font-size: .65rem; line-height: 1.6; }
.sheet-list { display: flex; flex-direction: column; gap: 6px; }
.option-item {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: .8rem;
  transition: .16s ease;
}
.option-item:hover { background: var(--panel-3); }
.option-item .opt-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  flex: 0 0 auto;
}
html[data-theme="light"] .option-item .opt-icon { background: rgba(0, 0, 0, .04); }
.option-item .opt-icon .icon { width: 15px; height: 15px; }
.option-item .opt-copy { flex: 1; min-width: 0; }
.option-item .opt-copy b { display: block; font-weight: 480; color: inherit; font-size: .8rem; }
.option-item .opt-copy small { display: block; color: var(--faint); font-size: .59rem; margin-top: 2px; line-height: 1.5; }
.option-item .opt-check { color: var(--accent-2); opacity: 0; }
.option-item .opt-check .icon { width: 17px; height: 17px; }
.option-item.is-checked { background: var(--accent-softer); border-color: rgba(217, 142, 87, .22); }
.option-item.is-checked .opt-check { opacity: 1; }
.option-item.is-danger { color: var(--danger); }
.option-item.is-danger .opt-icon { color: var(--danger); background: var(--danger-soft); }
.option-item:disabled { opacity: .38; }
.option-item:disabled:hover { background: var(--panel-2); }
.sheet-cancel {
  width: 100%;
  min-height: 49px;
  margin-top: 8px;
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: .78rem;
}
.sheet-cancel:hover { background: var(--panel-3); }
.dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(.97);
  width: min(calc(100% - 42px), 390px);
  border-radius: 23px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 25px 22px 17px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  animation: dialogIn .27s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes dialogIn { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.dialog h3 { margin: 0 0 9px; color: var(--text); font-size: 1.02rem; font-weight: 590; text-align: center; letter-spacing: -.01em; }
.dialog p { margin: 0 auto 20px; color: var(--muted); font-size: .72rem; line-height: 1.75; text-align: center; max-width: 300px; white-space: pre-line; }
.dialog .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dialog .dialog-actions .btn { min-height: 45px; border-radius: 12px; font-size: .76rem; }
.dialog .dialog-actions .btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.dialog.single .dialog-actions { grid-template-columns: 1fr; }
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.dialog-close:hover { background: var(--panel-2); color: var(--text); }
.dialog-close .icon { width: 15px; height: 15px; }
.dialog-input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
  font-size: .82rem;
  margin: 0 0 17px;
}
.dialog-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dialog-input::placeholder { color: var(--faint); }
.password-dialog .dialog-input { margin-bottom: 10px; }
.password-error { min-height: 18px; margin: -2px auto 9px !important; color: var(--danger); font-size: .62rem !important; line-height: 1.5 !important; }
.auth-forgot { display: block; margin: -7px 0 12px auto; padding: 2px; color: var(--accent-2); font-size: .65rem; }
.auth-forgot:hover { text-decoration: underline; }
.recovery-code {
  padding: 14px 10px;
  margin: 4px 0 12px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-2);
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-align: center;
  user-select: all;
  word-break: break-all;
}
.recovery-help { margin: 10px auto 0 !important; color: var(--faint) !important; font-size: .58rem !important; line-height: 1.6 !important; }

/* 日期选择器 */
.date-sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 7px 15px;
}
.picker-head .picker-title { font-size: .94rem; font-weight: 570; color: var(--text); text-align: center; flex: 1; }
.picker-nav {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.picker-nav:hover { background: var(--panel-2); color: var(--text); }
.picker-nav .icon { width: 17px; height: 17px; }
.picker-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--faint);
  font-size: .6rem;
  text-align: center;
  padding-bottom: 8px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.picker-day {
  aspect-ratio: 1;
  min-height: 39px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  font-size: .73rem;
  position: relative;
  transition: .14s ease;
}
.picker-day:hover { background: var(--panel-2); }
.picker-day.blank { pointer-events: none; }
.picker-day.other { color: var(--faint); }
.picker-day.today { color: var(--accent-2); font-weight: 650; }
.picker-day.today::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-2);
}
.picker-day.selected { background: var(--accent); color: #fff; font-weight: 550; }
.picker-day.selected::after { background: #fff; }
.picker-day.has-media::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: .55;
}
.picker-day.has-media { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); overflow: hidden; }
.picker-day.has-media::after { z-index: 2; }
.picker-day.has-media > span { position: relative; z-index: 2; }
.picker-day.selected.has-media::before { opacity: .3; }
.picker-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 2px 0;
}
.picker-time {
  height: 43px;
  min-width: 106px;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}
.picker-time .icon { width: 14px; height: 14px; color: var(--muted); }
.picker-time input {
  width: 100%;
  min-width: 0;
  font-size: .78rem;
  color: var(--text);
  background: transparent;
}
.picker-time input::-webkit-calendar-picker-indicator { filter: invert(.65); cursor: pointer; }
.picker-foot .btn { flex: 1; height: 43px; }
.picker-note { color: var(--faint); font-size: .58rem; text-align: center; padding-top: 10px; }

/* 列表样式选择：带预览小图 */
.style-option {
  width: 100%;
  border-radius: 14px;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  text-align: left;
  transition: .16s ease;
}
.style-option:hover { background: var(--panel-3); }
.style-option.is-checked { background: var(--accent-softer); box-shadow: inset 0 0 0 1px rgba(217, 142, 87, .24); }
.style-preview {
  width: 55px;
  height: 44px;
  border-radius: 7px;
  background: var(--panel-3);
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
  padding: 6px;
}
.style-preview i { display: block; height: 3px; border-radius: 3px; background: var(--line-strong); margin-bottom: 3px; }
.style-preview .sp-date { width: 12px; height: 16px; float: left; margin-right: 5px; border-radius: 3px; background: var(--accent-soft); }
.style-preview .sp-line { width: 28px; }
.style-preview .sp-line.short { width: 20px; }
.style-preview .sp-img { width: 17px; height: 17px; border-radius: 3px; background: linear-gradient(145deg, #53617a, #303846); position: absolute; right: 6px; bottom: 6px; }
.style-option .so-copy { flex: 1; }
.style-option .so-copy b { display: block; font-size: .77rem; font-weight: 500; color: var(--text-2); }
.style-option .so-copy small { display: block; color: var(--faint); font-size: .58rem; margin-top: 2px; }
.style-option .opt-check { color: var(--accent-2); opacity: 0; }
.style-option.is-checked .opt-check { opacity: 1; }
.style-option .opt-check .icon { width: 17px; height: 17px; }

/* Toast */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(calc(100% - 40px), 420px);
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 99px;
  color: #f2f3f7;
  background: rgba(35, 26, 19, .95);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .35);
  font-size: .72rem;
  line-height: 1.5;
  backdrop-filter: blur(18px);
  animation: toastIn .26s cubic-bezier(.2, .8, .2, 1);
  text-align: center;
}
html[data-theme="light"] .toast { background: rgba(58, 46, 36, .94); }
.toast .icon { width: 15px; height: 15px; color: var(--accent-2); flex: 0 0 auto; }
.toast.is-danger .icon { color: #ff8f8f; }
.toast.is-success .icon { color: #78d9b0; }
.toast.out { animation: toastOut .22s ease forwards; }
@media (min-width: 700px) {
  .toast-root {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: translateY(-50%);
  }
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(5px) scale(.98); } }

/* 图片查看 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 54px 18px 30px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.lightbox img,
.lightbox video {
  max-width: min(100%, 1200px);
  max-height: calc(100dvh - 130px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .55);
}
.lightbox-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
}
.lightbox-close .icon { width: 19px; height: 19px; }
.lightbox-caption {
  color: rgba(255, 255, 255, .62);
  font-size: .66rem;
  margin-top: 14px;
  text-align: center;
  max-width: 80%;
}
.lightbox-actions {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
}
.lightbox-actions a,
.lightbox-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 99px;
  padding: 8px 13px;
  font-size: .65rem;
}
.lightbox-actions .icon { width: 14px; height: 14px; }

/* 进度 / 导入遮罩 */
.busy-mask {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 11, .66);
  backdrop-filter: blur(4px);
}
.busy-box {
  width: min(calc(100% - 50px), 330px);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.busy-box .spinner { width: 28px; height: 28px; margin: 0 auto 14px; border-width: 3px; }
.busy-box b { display: block; color: var(--text); font-size: .84rem; font-weight: 560; }
.busy-box p { margin: 5px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.6; }

/* 桌面端细节 */
@media (min-width: 700px) {
  .entry-list { padding-left: 24px; padding-right: 24px; }
  .entry-row { grid-template-columns: 64px minmax(0, 1fr); gap: 15px; }
  .entry-card { padding: 22px 23px 17px; }
  .entry-text { font-size: .84rem; }
  .memory-strip { margin-left: 24px; margin-right: 24px; }
  .home-head { padding-left: 26px; padding-right: 26px; }
  .home-title { font-size: 1.95rem; }
  .entry-big, .entry-bookmark, .entry-small { margin-left: 24px; margin-right: 24px; }
  .entry-big .big-media { height: 305px; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0 5px; }
  .cat-grid { gap: 13px; padding-left: 24px; padding-right: 24px; }
  .cat-card { min-height: 165px; }
  .stats-grid-desktop { display: grid; grid-template-columns: 1fr; }
  .wander-card { min-height: 420px; padding: 32px; }
  .sheet { width: min(100% - 28px, 540px); border-radius: 25px; bottom: 14px; border-bottom: 1px solid var(--line-strong); }
  .sheet-grabber { display: none; }
  .dialog { padding-top: 29px; }
}
@media (max-width: 640px) {
  .auth { padding: 0; place-items: stretch; }
  .auth-shell { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; grid-template-columns: 1fr; }
  .auth-visual { min-height: 230px; height: 230px; }
  .auth-visual-copy { left: 25px; top: 28px; right: 25px; }
  .auth-logo { width: 43px; height: 43px; border-radius: 13px; margin-bottom: 14px; }
  .auth-logo .icon, .auth-logo .brand-symbol { width: 28px; height: 28px; }
.auth-logo .brand-symbol { display: block; }
.auth-mini-logo .brand-symbol { width: 25px; height: 25px; display: block; }
  .auth-kicker { font-size: .57rem; margin-bottom: 6px; }
  .auth-visual h1 { font-size: 2.45rem; }
  .auth-visual p { font-size: .83rem; margin-top: 9px; }
  .auth-quote, .auth-float-card { display: none; }
  .auth-panel { padding: 27px 24px 35px; justify-content: flex-start; }
  .auth-card { max-width: 430px; }
  .auth-mini-logo { display: grid; width: 39px; height: 39px; border-radius: 12px; margin-bottom: 13px; }
  .auth-mini-logo .icon { width: 21px; height: 21px; }
  .auth-eyebrow { display: none; }
  .auth-card h2 { font-size: 1.65rem; }
  .auth-sub { margin: 7px 0 23px; font-size: .76rem; }
  .auth-tabs { margin-bottom: 20px; }
  .field-label { font-size: .64rem; }
  .field-box { height: 47px; }
  .auth-foot { display: none; }
  .topbar { height: 58px; padding: 0 8px; }
  .icon-btn { width: 39px; height: 39px; border-radius: 11px; }
  .icon-btn .icon { width: 20px; height: 20px; }
  .home-date-btn { font-size: .94rem; }
  .home-head { padding-left: 17px; padding-right: 17px; }
  .home-title { font-size: 1.52rem; }
  .home-weekday { font-size: .65rem; }
  .home-count { font-size: .68rem; padding-top: 15px; padding-bottom: 20px; }
  .memory-strip { margin-left: 12px; margin-right: 12px; border-radius: 17px; }
  .entry-list { padding-left: 12px; padding-right: 12px; gap: 13px; }
  .entry-row { grid-template-columns: 47px minmax(0, 1fr); gap: 7px; }
  .entry-date { padding-top: 16px; }
  .entry-day { font-size: 1.62rem; }
  .entry-month { font-size: .56rem; margin-top: 6px; }
  .entry-card { padding: 16px 15px 12px; border-radius: 16px; }
  .entry-text { font-size: .78rem; line-height: 1.78; }
  .entry-thumb { width: 76px; height: 76px; border-radius: 9px; }
  .entry-thumb:first-child:last-child { width: 112px; height: 94px; }
  .entry-meta { margin-top: 12px; font-size: .58rem; }
  .entry-meta .cat { font-size: .56rem; }
  .entry-big, .entry-bookmark, .entry-small { margin-left: 12px; margin-right: 12px; }
  .entry-big { border-radius: 18px; }
  .entry-big .big-media { height: 218px; }
  .entry-big .big-copy { padding: 20px 17px 15px; }
  .entry-big .big-text { font-size: .79rem; }
  .entry-bookmark { padding: 16px 16px 13px 20px; border-radius: 15px; }
  .entry-minimal { margin-left: 11px; margin-right: 11px; }
  .entry-small { padding: 13px; border-radius: 14px; }
  .entry-small .sm-thumb { width: 55px; height: 55px; }
  .page-pad { padding-left: 13px; padding-right: 13px; }
  .stats-wrap { padding-left: 12px; padding-right: 12px; }
  .stats-hero { min-height: 235px; padding: 24px 22px; border-radius: 22px; }
  .stats-hero h2 { font-size: 1.42rem; }
  .stats-days strong { font-size: 3.85rem; }
  .stats-metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 15px 8px 13px; }
  .metric-card strong { font-size: 1.5rem; }
  .gallery-toolbar { padding-left: 13px; padding-right: 13px; }
  .cat-grid { padding-left: 12px; padding-right: 12px; gap: 9px; }
  .cat-card { min-height: 141px; padding: 16px; border-radius: 17px; }
  .cat-card.add { min-height: 141px; }
  .settings-wrap { padding-left: 12px; padding-right: 12px; }
  .settings-row { padding-left: 14px; padding-right: 14px; }
  .font-page { padding-left: 13px; padding-right: 13px; }
  .font-preview { min-height: 250px; padding: 20px 18px; font-size: .87rem; }
  .memory-page, .io-page, .recycle-page, .more-page { padding-left: 12px; padding-right: 12px; }
  .calendar-wrap { padding-left: 12px; padding-right: 12px; }
  .calendar-hero h2 { font-size: 1.86rem; }
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 44px; border-radius: 9px; padding-top: 8px; font-size: .7rem; }
  .wander-page { padding-left: 13px; padding-right: 13px; }
  .wander-card { min-height: 380px; padding: 23px 20px 18px; border-radius: 21px; }
  .wander-card .w-text { font-size: .83rem; line-height: 1.9; -webkit-line-clamp: 10; }
  .editor-scroll { padding: 2px 17px 8px; }
  .editor-body { min-height: 290px; font-size: .88rem; }
  .detail-page { padding-left: 17px; padding-right: 17px; }
  .detail-date-line b { font-size: 2rem; }
  .fab { width: 55px; height: 55px; right: 17px; }
  .app[data-fab-side="left"] .fab { left: 17px; }
  .drawer { width: min(86%, 326px); }
  .sheet { border-radius: 24px 24px 0 0; max-height: 90dvh; }
  .toast-root { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .lightbox { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 380px) {
  .auth-panel { padding-left: 18px; padding-right: 18px; }
  .home-title { font-size: 1.4rem; }
  .entry-row { grid-template-columns: 42px minmax(0, 1fr); }
  .entry-day { font-size: 1.45rem; }
  .entry-card { padding: 14px 13px 11px; }
  .entry-text { font-size: .75rem; }
  .stats-metrics { gap: 7px; }
  .metric-card strong { font-size: 1.3rem; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   小屏精细适配：避免页面整体偏大、横向溢出
   ========================================================= */
@media (max-width: 480px) {
  html { font-size: calc(15px * var(--fs-scale)); }
  .app { width: 100%; max-width: 100%; }
  .topbar { height: 56px; padding: 0 7px; }
  .topbar-center { max-width: calc(100% - 142px); }
  .icon-btn { width: 38px; height: 38px; }
  .home-date-btn { padding: 7px 7px; font-size: .9rem; }
  .home-count { padding: 13px 14px 17px; font-size: .66rem; }
  .memory-strip { margin: 0 9px 2px; padding: 9px 9px 8px; border-radius: 15px; }
  .memory-head { padding-bottom: 7px; }
  .memory-head b { font-size: .67rem; }
  .memory-head small { font-size: .54rem; }
  .memory-chip { min-width: 92px; padding: 7px 9px; }
  .memory-chip .m-label { font-size: .59rem; }
  .memory-chip .m-date { font-size: .53rem; }
  .entry-list { padding-left: 9px; padding-right: 9px; gap: 11px; }
  .entry-row { grid-template-columns: 42px minmax(0, 1fr); gap: 6px; }
  .entry-date { padding-top: 14px; }
  .entry-day { font-size: 1.5rem; }
  .entry-month { font-size: .52rem; letter-spacing: -.02em; }
  .entry-card { padding: 14px 13px 11px; border-radius: 14px; }
  .entry-text { font-size: .78rem; line-height: 1.76; }
  .entry-thumb { width: 68px; height: 68px; border-radius: 8px; }
  .entry-thumb:first-child:last-child { width: 102px; height: 86px; }
  .entry-meta { gap: 5px 7px; margin-top: 10px; font-size: .58rem; }
  .entry-meta .cat { font-size: .55rem; }
  .entry-big, .entry-bookmark, .entry-small { margin-left: 9px; margin-right: 9px; }
  .entry-big .big-media { height: 200px; }
  .entry-big .big-copy { padding: 17px 15px 13px; }
  .entry-big .big-text { font-size: .76rem; }
  .entry-bookmark { padding: 14px 14px 12px 18px; }
  .entry-minimal { margin-left: 10px; margin-right: 10px; padding: 15px 3px; }
  .entry-small { padding: 12px; gap: 10px; }
  .entry-small .sm-thumb { width: 50px; height: 50px; }
  .stats-wrap { padding: 6px 9px 22px; }
  .stats-hero { min-height: 220px; padding: 21px 18px; border-radius: 20px; }
  .stats-hero .sh-kicker { font-size: .54rem; }
  .stats-hero h2 { font-size: 1.3rem; margin-top: 6px; }
  .stats-days { margin-top: 17px; }
  .stats-days strong { font-size: 3.25rem; }
  .stats-days span { font-size: .65rem; }
  .stats-hero .sh-foot { font-size: .56rem; margin-top: 14px; flex-wrap: wrap; gap: 5px; }
  .stats-metrics { gap: 6px; margin-top: 10px; }
  .metric-card { padding: 12px 6px 11px; border-radius: 14px; }
  .metric-card .m-icon { width: 24px; height: 24px; margin-bottom: 6px; }
  .metric-card strong { font-size: 1.16rem; }
  .metric-card small { font-size: .56rem; margin-top: 3px; }
  .heat-card { padding: 14px 13px; border-radius: 16px; }
  .gallery-grid { gap: 3px; padding: 0 3px; }
  .cat-grid { padding-left: 9px; padding-right: 9px; gap: 8px; }
  .cat-card { min-height: 128px; padding: 14px; border-radius: 15px; }
  .cat-card.add { min-height: 128px; }
  .cat-card .cat-icon { width: 29px; height: 29px; margin-bottom: 10px; }
  .cat-card .cat-name { font-size: .83rem; }
  .cat-card .cat-count { font-size: .56rem; }
  .calendar-wrap { padding: 3px 9px 18px; }
  .calendar-top { padding: 8px 0 16px; gap: 8px; }
  .calendar-year { font-size: 1.02rem; }
  .calendar-hero { margin-bottom: 14px; }
  .calendar-hero h2 { font-size: 1.62rem; letter-spacing: .14em; }
  .calendar-hero p { font-size: .57rem; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 39px; border-radius: 8px; padding-top: 7px; font-size: .68rem; }
  .cal-weekdays { font-size: .56rem; padding-bottom: 7px; }
  .cal-summary { padding: 10px 12px; font-size: .6rem; margin-top: 12px; }
  .cal-summary .btn { min-height: 30px; padding: 0 8px; font-size: .58rem; }
  .settings-wrap { padding: 5px 9px 24px; }
  .settings-row { min-height: 53px; padding-left: 12px; padding-right: 12px; font-size: .77rem; gap: 9px; }
  .settings-row .row-main b { font-size: .77rem; }
  .settings-row .row-main small { font-size: .58rem; }
  .settings-row .row-value { font-size: .62rem; }
  .settings-group { border-radius: 15px; margin-bottom: 10px; }
  .font-page { padding: 8px 9px 24px; }
  .font-preview { min-height: 220px; padding: 17px 15px; font-size: .84rem; line-height: 1.9; }
  .font-toolbar { padding: 11px 13px; }
  .memory-page, .io-page, .recycle-page, .more-page { padding-left: 9px; padding-right: 9px; }
  .wander-page { padding: 2px 10px 14px; }
  .wander-head { padding: 8px 0 13px; }
  .wander-head h2 { font-size: 1.06rem; }
  .wander-card { min-height: 342px; padding: 20px 17px 16px; border-radius: 19px; }
  .wander-card .w-date b { font-size: 1.6rem; }
  .wander-card .w-text { font-size: .81rem; line-height: 1.85; -webkit-line-clamp: 9; }
  .wander-card .w-foot { font-size: .57rem; }
  .wander-hint { font-size: .55rem; gap: 5px; padding-top: 12px; }
  .wander-nav .wbtn { width: 42px; height: 42px; }
  .editor-page { min-height: calc(100dvh - 56px); }
  .editor-scroll { padding: 2px 14px 8px; }
  .editor-body { min-height: 255px; font-size: .87rem; line-height: 1.88; }
  .editor-date .ed-date-main { font-size: .94rem; }
  .add-media-box { width: 82px; height: 82px; }
  .edit-media-item { width: 82px; height: 82px; }
  .editor-toolbar { min-height: 57px; padding-left: 3px; padding-right: 3px; }
  .editor-tool { min-width: 43px; height: 43px; }
  .editor-tool .icon { width: 17px; height: 17px; }
  .editor-tool span { font-size: .46rem; }
  .detail-page { padding: 3px 14px 24px; }
  .detail-date-line b { font-size: 1.85rem; }
  .detail-content { font-size: .87rem; line-height: 1.92; }
  .detail-actions .btn { min-height: 39px; font-size: .72rem; }
  .search-body { padding: 16px 9px 24px; }
  .search-topbar { width: 51vw; height: 37px; padding: 0 9px; }
  .search-result { padding: 12px; gap: 9px; border-radius: 13px; }
  .search-result-date b { font-size: .95rem; }
  .search-result-thumb { width: 44px; height: 44px; }
  .sr-text { font-size: .71rem; }
  .sheet { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .sheet-head h3 { font-size: .94rem; }
  .option-item { min-height: 47px; padding: 7px 13px; font-size: .75rem; }
  .dialog { width: min(calc(100% - 28px), 380px); padding: 22px 17px 15px; }
  .dialog h3 { font-size: .96rem; }
  .dialog p { font-size: .68rem; }
  .auth { padding: 0; }
  .auth-visual { min-height: 205px; height: 205px; }
  .auth-visual-copy { left: 21px; top: 23px; right: 21px; }
  .auth-visual h1 { font-size: 2.15rem; }
  .auth-visual p { font-size: .76rem; }
  .auth-panel { padding: 23px 20px 28px; }
  .auth-card h2 { font-size: 1.46rem; }
  .auth-sub { font-size: .72rem; margin-bottom: 19px; }
  .auth-tabs { margin-bottom: 17px; }
  .field-box { height: 45px; }
  .btn-auth { height: 47px; }
  .auth-local { margin-top: 22px; padding-top: 16px; }
  .drawer { width: min(88%, 318px); }
  .drawer-hero { min-height: 198px; }
  .drawer-item { min-height: 47px; gap: 14px; font-size: .8rem; }
  .fab { width: 52px; height: 52px; right: 14px; bottom: calc(17px + env(safe-area-inset-bottom)); }
  .app[data-fab-side="left"] .fab { left: 14px; }
}

@media (max-width: 370px) {
  .auth-panel { padding-left: 16px; padding-right: 16px; }
  .home-date-btn { font-size: .84rem; }
  .topbar-center { max-width: calc(100% - 132px); }
  .entry-row { grid-template-columns: 39px minmax(0, 1fr); }
  .entry-day { font-size: 1.38rem; }
  .entry-text { font-size: .71rem; }
  .topbar-title { font-size: .9rem; }
  .calendar-hero h2 { font-size: 1.48rem; }
  .stats-days strong { font-size: 3rem; }
  .wander-card { padding: 18px 14px; }
  .wander-card .w-text { font-size: .75rem; }
  .editor-tool { min-width: 41px; }
  .search-topbar { width: 47vw; }
  .topbar-text-btn { font-size: .64rem; }
  .metric-card strong { font-size: 1.04rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   补充细节：搜索、样式列表、编辑器、缩略图占位
   ========================================================= */
.search-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(62vw, 390px);
  height: 41px;
  padding: 0 13px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.search-topbar .icon { width: 16px; height: 16px; color: var(--faint); }
.search-topbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  appearance: none;
  scroll-margin-top: 72px;
}
.search-topbar input::-webkit-search-cancel-button { display: none; }
.search-topbar input::placeholder { color: var(--faint); }
.topbar-text-btn {
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--accent-2);
  font-size: .72rem;
  white-space: nowrap;
}
.topbar-text-btn:hover { background: var(--accent-soft); }
.save-check {
  color: var(--accent-2);
  background: var(--accent-soft);
}
.save-check:hover { background: var(--accent-soft); filter: brightness(1.15); }
.save-check .icon { width: 23px; height: 23px; stroke-width: 2; }

/* 搜索页 */
.search-body { padding: 22px 18px 30px; }
.search-idle {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 35px 20px;
}
.search-idle-art {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent-soft), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  color: var(--accent-2);
  margin-bottom: 19px;
}
.search-idle-art .icon { width: 33px; height: 33px; stroke-width: 1.4; }
.search-idle h3 { margin: 0 0 8px; color: var(--text-2); font-size: .94rem; font-weight: 560; }
.search-idle p { margin: 0; max-width: 290px; color: var(--muted); font-size: .71rem; line-height: 1.8; }
.search-suggestions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 22px; }
.search-suggestions button {
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .65rem;
}
.search-suggestions button:hover { color: var(--accent-2); border-color: rgba(217, 142, 87, .3); background: var(--accent-softer); }
.search-result-head { color: var(--muted); font-size: .67rem; padding: 1px 4px 13px; }
.search-result-head b { color: var(--accent-2); font-weight: 570; }
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: .17s ease;
}
.search-result:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.search-result-date { width: 36px; flex: 0 0 auto; text-align: center; padding-top: 2px; color: var(--muted); }
.search-result-date b { display: block; color: var(--text-2); font-size: 1.05rem; font-weight: 350; line-height: 1.2; letter-spacing: -.04em; }
.search-result-date span { display: block; font-size: .52rem; color: var(--faint); margin-top: 3px; }
.search-result-main { flex: 1; min-width: 0; }
.sr-text {
  font-size: .76rem;
  line-height: 1.72;
  color: var(--text-2);
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.sr-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--faint); font-size: .58rem; margin-top: 7px; }
.search-result-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.masked-text { letter-spacing: .22em; }

/* 首页特殊样式列表 */
.entry-list.style-list { padding: 5px 0 0; gap: 16px; }
.entry-list.style-list > .entry-big,
.entry-list.style-list > .entry-bookmark,
.entry-list.style-list > .entry-small-wrap,
.entry-list.style-list > .entry-minimal { margin-left: 16px; margin-right: 16px; }
.entry-list.style-list > .entry-minimal { margin-left: 20px; margin-right: 20px; }
.entry-list.style-list > .entry-small-wrap .entry-small { margin-left: 0; margin-right: 0; }
.entry-small-wrap { display: block; }
.entry-small-wrap > .entry-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 3px 6px;
  text-align: left;
}
.entry-small-wrap > .entry-date .entry-day { font-size: .62rem; color: var(--faint); letter-spacing: .02em; font-weight: 400; }
.entry-small-wrap > .entry-date .entry-month { margin: 0; font-size: .56rem; }
.entry-big.masked .big-media { filter: blur(18px) saturate(.45); transform: scale(1.06); }
.entry-big.masked .big-text { letter-spacing: .18em; }
.entry-bookmark.masked .entry-text { letter-spacing: .2em; }
.entry-bookmark.masked .entry-thumb img,
.entry-small.masked .sm-thumb,
.entry-minimal.masked .mm-media img { filter: blur(14px) saturate(.4); }
.entry-bookmark.masked .cat,
.entry-small.masked .sm-head,
.entry-minimal.masked .mm-foot { filter: blur(6px); }

/* 缩略图兜底 */
.entry-thumb { padding: 0; border: 0; display: block; }
.entry-thumb .thumb-fallback,
.edit-media-item .thumb-fallback,
.dm-item .thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: linear-gradient(145deg, var(--panel-3), var(--panel-2));
}
.entry-thumb .thumb-fallback .icon,
.edit-media-item .thumb-fallback .icon,
.dm-item .thumb-fallback .icon { width: 24px; height: 24px; }
.entry-thumb .more-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .48);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  pointer-events: none;
}
.entry-thumb { position: relative; }

/* 日期选择器缩略图 */
.picker-day.has-media {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}
.picker-day.has-media::before { display: none; }
.picker-day.has-media > span { position: relative; z-index: 2; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.picker-day.selected.has-media { box-shadow: inset 0 0 0 2px #fff; }
.picker-day { isolation: isolate; }

/* 编辑器 */
.main.editor-main { padding-bottom: 0; overflow-anchor: none; }
.editor-page { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; }
@media (min-width: 940px) {
  .editor-page { min-height: calc(min(940px, 100dvh - 36px) - 64px); }
}
.editor-scroll { flex: 1; padding: 3px 20px 12px; }
.editor-body { display: block; }
.editor-date > span { display: flex; flex-direction: column; }
.editor-attrs .attr-chip .icon { width: 14px; height: 14px; }
.editor-attrs .attr-chip > .icon:last-child { opacity: .5; }
.editor-count .editor-save-state { margin-left: auto; }
.editor-toolbar { min-height: 60px; }
.editor-toolbar .editor-tool { min-width: 49px; }
.editor-toolbar .project-hint { padding-right: 8px; }
.editor-media .edit-media-item img { width: 100%; height: 100%; object-fit: cover; }
.attr-chip .emoji { font-size: .9rem; line-height: 1; }

/* 分类卡片（article） */
.cat-card { font-family: inherit; color: var(--text); }
.cat-card:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cat-card.add { cursor: pointer; }
.cat-card.add span { display: block; }

/* 日历按钮 */
.cal-cell { font: inherit; cursor: pointer; }
.cal-cell.blank { background: transparent; }
.cal-cell.has-entries:not(.has-media) { background: var(--panel-3); }
.cal-cell.today { background: var(--accent-softer); }
.cal-cell.has-media.today { background: var(--panel-2); }
.cal-recent-item { font-family: inherit; }
.calendar-year { cursor: default; }

/* 图库媒体按钮 */
.media-tile { font: inherit; padding: 0; border: 0; }

/* 详情媒体按钮 */
.dm-item { font: inherit; padding: 0; border: 0; }
.dm-item .thumb-fallback { position: absolute; inset: 0; }

/* 回收站按钮 */
.recycle-card .rc-actions button { cursor: pointer; }

/* 登录页眼睛按钮 */
.field-eye { cursor: pointer; }

/* 小屏补充 */
@media (max-width: 640px) {
  .search-topbar { width: 58vw; height: 38px; padding: 0 10px; }
  .topbar-text-btn { padding: 7px 4px; font-size: .68rem; }
  .search-body { padding-left: 13px; padding-right: 13px; }
  .entry-list.style-list > .entry-big,
  .entry-list.style-list > .entry-bookmark,
  .entry-list.style-list > .entry-small-wrap,
  .entry-list.style-list > .entry-minimal { margin-left: 12px; margin-right: 12px; }
  .editor-scroll { padding-left: 17px; padding-right: 17px; }
  .editor-toolbar { padding-left: 5px; padding-right: 5px; }
  .editor-toolbar .editor-tool { min-width: 45px; }
  .editor-toolbar .project-hint { display: none; }
  .search-result { padding: 13px 13px; }
  .search-result-thumb { width: 48px; height: 48px; }
  .search-topbar .icon { width: 14px; height: 14px; }
}

/* 手机端：固定应用视口，避免编辑时页面整体缩放、顶栏被顶走 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .app {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .topbar { height: 58px; }
  .main { min-height: 0; }
  input,
  textarea,
  .dialog-input,
  .field-box input {
    font-size: 16px;
  }
  .editor-body {
    font-size: max(16px, .87rem);
    line-height: 1.9;
  }
  .editor-page { min-height: calc(100dvh - 58px); }
}

/* =========================================================
   账号信息
   ========================================================= */
.account-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}
.account-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0 24px;
}
.account-avatar-btn {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .34), transparent 55%),
    linear-gradient(145deg, var(--accent-2), var(--accent-deep));
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease;
}
.account-avatar-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent-2), var(--shadow-md); }
.account-avatar-btn:active { transform: scale(.98); }
.account-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-letter { font-size: 2.2rem; font-weight: 650; line-height: 1; }
.account-avatar-edit {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  padding: 6px 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff;
  font-size: .58rem;
  letter-spacing: .04em;
  background: rgba(12, 8, 5, .56);
  backdrop-filter: blur(6px);
}
.account-avatar-edit .icon { width: 11px; height: 11px; }
.account-head h2 {
  margin: 16px 0 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.25;
}
.account-handle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .02em;
}
.account-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.account-field {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}
.account-field:last-child { border-bottom: 0; }
.account-field:hover { background: var(--panel-2); }
.account-field .af-label {
  width: 66px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .72rem;
}
.account-field .af-value {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-field .af-value.is-placeholder { color: var(--faint); }
.account-field > .icon { width: 15px; height: 15px; color: var(--faint); flex: 0 0 auto; }
.account-field.static { cursor: default; }
.account-field.static:hover { background: transparent; }
.account-field.static .af-value { color: var(--muted); font-size: .76rem; }
.account-actions {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.account-action {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: .8rem;
  transition: background .18s ease, color .18s ease;
}
.account-action:last-child { border-bottom: 0; }
.account-action:hover { background: var(--panel-2); color: var(--text); }
.account-action .icon { width: 16px; height: 16px; color: var(--muted); }
.account-action.danger { color: var(--danger); }
.account-action.danger .icon { color: var(--danger); }
.account-action.danger:hover { background: var(--danger-soft); }
.account-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding: 0 4px;
  color: var(--faint);
  font-size: .62rem;
}
.account-legal a { color: var(--accent-2); text-decoration: none; }
.account-legal a:hover { text-decoration: underline; }
.avatar.has-image { overflow: hidden; padding: 0; }
.avatar.has-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) {
  .account-page { padding: 16px 14px 38px; }
  .account-head { padding-top: 8px; }
  .account-avatar-btn { width: 96px; height: 96px; }
  .account-avatar-letter { font-size: 1.9rem; }
  .account-head h2 { font-size: 1.28rem; margin-top: 13px; }
  .account-field { min-height: 56px; padding: 10px 13px; }
  .account-field .af-label { width: 60px; font-size: .69rem; }
  .account-field .af-value { font-size: .78rem; }
  .account-action { min-height: 51px; font-size: .77rem; }
}

/* =========================================================
   最近登录账号
   ========================================================= */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 8px;
  max-height: 46vh;
  overflow-y: auto;
}
.recent-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  border-radius: 15px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.recent-row.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.recent-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px 9px 11px;
  text-align: left;
  color: var(--text-2);
  background: none;
  border: 0;
}
.recent-main > .icon { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); }
.recent-avatar { width: 38px; height: 38px; flex: 0 0 auto; font-size: .82rem; }
.recent-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.recent-copy b {
  color: var(--text);
  font-size: .82rem;
  font-weight: 520;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-copy small {
  color: var(--muted);
  font-size: .59rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 99px;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  font-size: .54rem;
  white-space: nowrap;
}
.recent-remove {
  width: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  transition: color .16s ease, background .16s ease;
}
.recent-remove .icon { width: 15px; height: 15px; }
.recent-remove:hover { color: var(--danger); background: rgba(217, 95, 85, .08); }
.recent-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.8;
}
.recent-sheet .sheet-cancel { margin-top: 6px; }

@media (min-width: 700px) {
  .sheet {
    animation: none;
    transform: translate(-50%, 0);
  }
}

/* =========================================================
   发现 / 好友 / 消息 / 我的
   ========================================================= */
.social-page { padding: 8px 16px 30px; }
.social-tabs {
  display: flex;
  gap: 8px;
  margin: 2px 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.social-tabs button {
  flex: 1;
  min-height: 38px;
  border-radius: 11px;
  color: var(--muted);
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.social-tabs button.is-active { color: var(--accent-2); background: var(--accent-soft); }
.tab-count, .list-unread {
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 99px;
  color: #fff;
  background: var(--danger);
  font-size: .52rem;
  line-height: 14px;
  text-align: center;
}
.social-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.social-author-avatar { flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; }
.social-avatar { width: 38px; height: 38px; flex: 0 0 auto; font-size: .8rem; }
.social-author-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.social-author-copy b { overflow: hidden; color: var(--text); font-size: .82rem; font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.social-author-copy small { overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.social-permission {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 99px;
  color: var(--accent-2);
  background: var(--accent-soft);
  font-size: .54rem;
  white-space: nowrap;
}
.social-permission .icon { width: 12px; height: 12px; }
.social-feed-card {
  padding: 16px;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.social-feed-text {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: .8rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.social-feed-media { display: flex; gap: 6px; margin-top: 12px; }
.social-feed-thumb { position: relative; width: 92px; height: 92px; border-radius: 11px; overflow: hidden; background: var(--panel-3); flex: 0 0 auto; }
.social-feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.social-video-mark { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); }
.social-video-mark .icon { width: 22px; height: 22px; }
.social-feed-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; margin-top: 13px; color: var(--faint); font-size: .58rem; }
.social-feed-foot span { display: inline-flex; align-items: center; gap: 4px; }
.social-feed-foot .icon { width: 12px; height: 12px; }
.social-open-hint { margin-left: auto; color: var(--accent-2); }
.social-load-more { display: block; width: 100%; margin-top: 8px; }
.social-interactions {
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: .62rem;
}
.social-interactions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 8px; border-radius: 10px; color: var(--muted); font-size: .6rem; }
.social-interactions button:hover { background: var(--accent-softer); }
.social-interactions .icon { width: 14px; height: 14px; color: var(--accent-2); }
.social-interactions b { color: var(--accent-2); font-size: .72rem; }
.entry-engagement { margin-top: 20px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.engagement-row { display: flex; align-items: center; gap: 8px; }
.engagement-view { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: .62rem; }
.engagement-view .icon { width: 15px; height: 15px; }
.engagement-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border-radius: 10px; color: var(--muted); background: var(--panel-3); font-size: .62rem; }
.engagement-btn .icon { width: 15px; height: 15px; }
.engagement-btn.is-active { color: var(--accent-2); background: var(--accent-soft); }
.engagement-btn.is-active .icon { fill: currentColor; }
.engagement-error { color: var(--faint); font-size: .6rem; }
.received-entry-card { padding: 14px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); cursor: pointer; }
.received-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent-2); font-size: .66rem; }
.received-entry-head span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.received-entry-head .icon { width: 14px; height: 14px; color: var(--accent-2); }
.received-entry-card p { margin: 8px 0 6px; color: var(--text-2); font-size: .74rem; line-height: 1.65; }
.received-entry-card small { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: .56rem; }
.social-empty { padding-top: 40px; }
.social-list-row, .social-request-row, .social-notice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-2);
  text-align: left;
}
.social-list-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.social-list-copy b { color: var(--text); font-size: .8rem; font-weight: 530; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-list-copy small { color: var(--muted); font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-list-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--faint); font-size: .55rem; }
.social-list-meta .icon { width: 14px; height: 14px; }
.social-section-title { margin: 18px 2px 9px; color: var(--muted); font-size: .64rem; letter-spacing: .08em; }
.social-request-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.mini-action { min-height: 29px; padding: 0 9px; border-radius: 9px; color: var(--muted); background: var(--panel-3); font-size: .6rem; }
.mini-action.primary { color: #fff; background: var(--accent); }
.social-notice { border-color: var(--line-strong); background: var(--accent-softer); color: var(--text-2); font-size: .7rem; }
.social-notice b { color: var(--accent-2); }
.social-notice .avatar { width: 30px; height: 30px; }
.social-empty-inline { padding: 20px 12px; color: var(--muted); font-size: .68rem; text-align: center; line-height: 1.8; }
.social-friend-count { padding: 8px 2px 10px; color: var(--faint); font-size: .6rem; text-align: center; letter-spacing: .04em; }
.social-profile { padding: 12px 18px 34px; }
.social-profile-head { text-align: center; padding: 12px 0 8px; }
.social-profile-avatar { width: 88px; height: 88px; margin: 0 auto 12px; font-size: 1.6rem; }
.social-profile-head h2 { margin: 0; color: var(--text); font-size: 1.35rem; font-weight: 560; }
.social-profile-head > p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.social-profile-bio { max-width: 360px; margin: 12px auto 0 !important; line-height: 1.75 !important; }
.social-profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.social-profile-actions .btn { min-height: 42px; flex: 0 1 160px; font-size: .72rem; }
.social-profile-entry { padding: 13px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.social-profile-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent-2); font-size: .67rem; }
.social-profile-entry p { margin: 7px 0 4px; color: var(--text-2); font-size: .74rem; line-height: 1.7; }
.social-profile-entry small { color: var(--faint); font-size: .58rem; }
.social-profile-entry.is-mine { cursor: pointer; border-color: var(--line-strong); }
.social-profile-entry.is-mine:hover { background: var(--panel-3); }
.social-removed-banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 13px; color: var(--danger); background: var(--danger-soft); font-size: .67rem; }
.social-removed-banner .avatar { width: 28px; height: 28px; }
.social-detail { padding-top: 12px; }
.social-author-detail { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.social-detail-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.social-detail-media figure { margin: 0; overflow: hidden; border-radius: 12px; background: var(--panel-3); }
.social-detail-media img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.social-detail-media figcaption { padding: 5px 8px; color: var(--faint); font-size: .56rem; }
.main.chat-main { padding-bottom: 0; overflow: hidden; }
.main.chat-main .page { height: 100%; }
.chat-page { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 6px 14px 8px; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 8px 0 16px; }
.chat-bubble-row { display: flex; justify-content: flex-start; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble { max-width: 78%; padding: 9px 12px; border-radius: 15px 15px 15px 4px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); font-size: .75rem; line-height: 1.6; word-break: break-word; }
.chat-bubble-row.mine .chat-bubble { border-radius: 15px 15px 4px 15px; color: #fff; background: var(--accent); border-color: transparent; }
.chat-bubble small { display: block; margin-top: 4px; color: var(--faint); font-size: .52rem; text-align: right; }
.chat-bubble-row.mine small { color: rgba(255, 255, 255, .72); }
.chat-notice { flex: 0 0 auto; margin: 0 0 6px; padding: 7px 10px; border-radius: 10px; color: var(--muted); background: var(--accent-softer); font-size: .6rem; line-height: 1.5; }
.chat-form { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 8px 0 calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.chat-attach { width: 40px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.chat-attach .icon { width: 19px; height: 19px; }
.chat-attach.is-disabled { opacity: .35; pointer-events: none; }
.chat-media { display: block; max-width: 100%; width: min(240px, 65vw); max-height: 300px; border-radius: 10px; margin-top: 6px; object-fit: cover; background: var(--panel-3); }
.chat-text { display: block; white-space: pre-wrap; word-break: break-word; }
.chat-recalled { display: block; color: var(--faint); font-size: .66rem; font-style: italic; }
.chat-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.chat-action { padding: 2px 5px; border-radius: 5px; color: var(--faint); font-size: .52rem; }
.chat-action:hover { color: var(--accent-2); background: var(--accent-soft); }
.chat-media-error { display: block; margin-top: 5px; color: var(--faint); font-size: .58rem; }
.chat-form input { flex: 1; min-width: 0; height: 43px; padding: 0 13px; border-radius: 13px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); font-size: 16px; }
.chat-form button { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.chat-form button .icon { width: 18px; height: 18px; }
.mine-page { padding-top: 4px; }
.mine-hero {
  position: relative;
  min-height: 88px;
  padding: 6px 2px 4px;
  margin: 0 0 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
}
.mine-sun {
  position: absolute;
  top: 4px;
  right: 22px;
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff0cf, #f2c78e 62%, #d99b5f);
  box-shadow: 0 0 30px rgba(242, 199, 142, .28);
  opacity: .72;
}
.mine-hero-brand .brand-symbol { width: 42px; height: 42px; }
.mine-hero-brand .brand-words b { font-size: 1.12rem; }
.mine-hero-brand .brand-words small { font-size: .56rem; color: var(--accent-2); letter-spacing: .12em; }
.mine-tagline { margin: 4px 0 0; color: var(--muted); font-size: .66rem; letter-spacing: .03em; }
.mine-page .social-section-title { margin: 13px 2px 7px; }
.mine-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.mine-avatar { width: 58px; height: 58px; flex: 0 0 auto; font-size: 1.1rem; }
.mine-identity { flex: 1; min-width: 0; }
.mine-identity h2 { margin: 0; font-size: 1.05rem; font-weight: 560; }
.mine-identity p { margin: 2px 0; color: var(--accent-2); font-size: .65rem; }
.mine-identity small { display: block; overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.mine-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.mine-stats div { padding: 12px 5px; border-radius: 13px; text-align: center; background: var(--panel-2); border: 1px solid var(--line); }
.mine-stats b { display: block; color: var(--text); font-size: 1.05rem; font-weight: 560; }
.mine-stats span { color: var(--muted); font-size: .56rem; }
.mine-periods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mine-period { padding: 14px; border-radius: 15px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.mine-period span { color: var(--muted); font-size: .62rem; }
.mine-period b { color: var(--text); font-size: 1.15rem; font-weight: 560; }
.mine-period small { color: var(--faint); font-size: .58rem; }
.mine-engagement { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.mine-engagement button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); color: var(--muted); font-size: .64rem; }
.mine-engagement .icon { width: 18px; height: 18px; color: var(--accent-2); }
.mine-engagement b { color: var(--accent-2); font-size: 1rem; margin-left: auto; }
.mine-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.mine-links button { min-height: 63px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--panel-2); font-size: .6rem; }
.mine-links .icon { width: 20px; height: 20px; color: var(--accent-2); }
.mine-theme-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: .72rem;
  text-align: left;
}
.mine-theme-row .icon { width: 18px; height: 18px; color: var(--accent-2); }
.mine-theme-row .switch { margin-left: auto; }
@media (max-width: 640px) {
  .social-page { padding: 5px 12px 20px; }
  .social-profile { padding: 8px 14px 30px; }
  .social-feed-thumb { width: 78px; height: 78px; }
  .mine-links { grid-template-columns: repeat(4, 1fr); }
  .mine-links button { min-height: 66px; font-size: .58rem; }
  .mine-sun { width: 46px; height: 46px; top: 20px; right: 22px; }
  .chat-page { height: 100%; min-height: 0; }
}
@media (max-width: 380px) {
  .mine-stats { grid-template-columns: repeat(2, 1fr); }
  .social-profile-actions { flex-direction: column; }
  .social-profile-actions .btn { flex-basis: auto; }
}

/* =========================================================
   底部主导航
   ========================================================= */
.bottom-nav {
  position: absolute;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 42;
  width: min(calc(100% - 24px), 560px);
  height: 68px;
  display: grid;
  grid-template-columns: 1fr 1fr 68px 1fr 1fr;
  align-items: center;
  padding: 0 6px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}
.bottom-nav[hidden] { display: none; }
.bottom-nav-item {
  position: relative;
  height: 54px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--faint);
  font-size: .58rem;
  letter-spacing: .02em;
}
.bottom-nav-item .icon { width: 20px; height: 20px; stroke-width: 1.65; }
.bottom-nav-item.is-active { color: var(--accent-2); background: var(--accent-softer); }
.nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 22px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: .5rem;
  line-height: 15px;
  text-align: center;
  font-weight: 600;
}
.bottom-nav-gap { display: block; height: 58px; }
.fab {
  left: 50%;
  right: auto;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 43;
  transform: translateX(-50%);
}
.fab:hover { transform: translateX(-50%) translateY(-2px) rotate(4deg); }
.fab:active { transform: translateX(-50%) scale(.94); }
.app[data-fab-side="left"] .fab { left: 50%; right: auto; }
.drawer-open .bottom-nav,
.drawer-open .fab {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}
.main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  .bottom-nav { width: calc(100% - 16px); bottom: calc(7px + env(safe-area-inset-bottom)); }
  .main { padding-bottom: calc(142px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav, .fab { transition: none; }
}

/* 首页日期栏：用和卡片一致的底色，避免左侧看起来更暗 */
.entry-list {
  --date-rail-left: 16px;
  --date-rail-width: 57px;
  --date-rail-gap: 11px;
  position: relative;
}
.entry-list:not(.style-list)::before {
  content: "";
  position: absolute;
  left: var(--date-rail-left);
  top: 0;
  bottom: 0;
  width: calc(var(--date-rail-width) + var(--date-rail-gap));
  border-radius: 18px;
  background: var(--card-solid);
  pointer-events: none;
  z-index: 0;
}
.entry-list:not(.style-list) > .entry-row { position: relative; z-index: 1; }
@media (min-width: 700px) {
  .entry-list {
    --date-rail-left: 24px;
    --date-rail-width: 64px;
    --date-rail-gap: 15px;
  }
}
@media (max-width: 640px) {
  .entry-list {
    --date-rail-left: 12px;
    --date-rail-width: 47px;
    --date-rail-gap: 7px;
  }
}
@media (max-width: 480px) {
  .entry-list {
    --date-rail-left: 9px;
    --date-rail-width: 42px;
    --date-rail-gap: 6px;
  }
  .topbar-brand-lockup { gap: 5px; }
  .topbar-brand-lockup .brand-symbol { width: 25px; height: 25px; }
  .topbar-brand-lockup .brand-words small { display: none; }
  .topbar-brand-lockup .brand-words b { font-size: .7rem; }
}