/* ==========================================================================
   日常集 · 动态空间
   视觉语言沿用「映像世界」：暖金 + 纸感 + 发丝线 + 衬线标题
   ========================================================================== */

:root {
  --hdr-h: 64px;
  --paper: #faf8f4;
  --surface: #fffefc;
  --sheet: #fffdf9;
  --cover-bg: #f2e8d9;
  --ink: #262421;
  --t2: #57534c;
  --t3: #6e685f;
  --muted: #7a7164;
  --line: #e7e1d6;
  --line-2: #f0e9dd;
  --line-strong: #d8d0c1;
  --gold: #f2c45a;
  --amber: #d8ad4e;
  --amber-deep: #8a6a28;
  --brown: #6e5526;
  --link: #9a561a;
  --hover: #f2ece1;
  --title-ink: #262421;
  --hdr-bg: rgba(250, 248, 244, .985);
  --shadow-card: 0 1px 2px rgba(38, 36, 33, .03), 0 8px 24px rgba(38, 36, 33, .045);
  --shadow-hover: 0 2px 6px rgba(38, 36, 33, .05), 0 16px 38px rgba(38, 36, 33, .08);
  --shadow-pop: 0 22px 54px rgba(38, 36, 33, .16), 0 1px 0 rgba(255, 255, 255, .7) inset;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ff: "MiSans", "Plus Jakarta Sans", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --fm: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, Menlo, "Microsoft YaHei", monospace;
  --fs: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "STSong", SimSun, Georgia, serif;
  --danger: #c0503a;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #13110e;
  --surface: #1b1915;
  --sheet: #1d1a16;
  --cover-bg: #2a241b;
  --ink: #e9e3d6;
  --t2: #b6ae9f;
  --t3: #8d8577;
  --muted: #948b7c;
  --line: #302a22;
  --line-2: #262119;
  --line-strong: #423a2e;
  --gold: #e5b343;
  --amber: #d8ad4e;
  --amber-deep: #d8ad4e;
  --brown: #e7c98f;
  --link: #e0a35d;
  --hover: #241f18;
  --title-ink: #f1ebdd;
  --hdr-bg: rgba(19, 17, 14, .985);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .18);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, .3), 0 18px 42px rgba(0, 0, 0, .3);
  --shadow-pop: 0 26px 60px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 238, 210, .06) inset;
  --danger: #e08268;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 18px); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .025em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(242, 196, 90, .14), transparent 70%),
    linear-gradient(rgba(38, 36, 33, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 36, 33, .022) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(242, 196, 90, .09), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
}

::selection { background: rgba(242, 196, 90, .38); }

a { color: inherit; text-decoration: none; }
a, button, textarea, input { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
button { cursor: pointer; font-family: inherit; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(122, 113, 100, .24); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(122, 113, 100, .48); }
html[data-theme="dark"] *::-webkit-scrollbar-thumb { background: rgba(214, 203, 184, .28); }
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover { background: rgba(214, 203, 184, .52); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 200; padding: 8px 16px; border-radius: 0 0 10px 10px;
  background: var(--ink); color: var(--paper); font-size: 13px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ------------------------------- 顶部导航 -------------------------------- */

.hdr {
  position: sticky; top: 0; z-index: 60;
  background: var(--hdr-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 1px 0 var(--line);
}

.hdr-in {
  max-width: 1180px; margin: 0 auto; height: var(--hdr-h);
  padding: 0 30px; display: flex; align-items: center; gap: 26px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }

.brand-mark {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  transition: transform .45s var(--ease), filter .45s var(--ease);
}
.brand-mark svg { width: 100%; height: 100%; }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); filter: drop-shadow(0 0 9px rgba(229, 179, 67, .32)); }

.brand-name {
  font-size: 15px; font-weight: 700; letter-spacing: .08em; white-space: nowrap;
  color: var(--title-ink);
}

.domain-plaque {
  display: inline-flex; align-items: center; padding: 2px 9px 2px 7px;
  border-radius: 999px; border: 1px dashed rgba(168, 132, 56, .34);
  background: rgba(242, 196, 90, .07);
  font-size: 11.5px; line-height: 1.5; letter-spacing: .02em; color: var(--t2);
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
html[data-theme="light"] .domain-plaque { background: rgba(238, 229, 213, .52); border-color: rgba(38, 36, 33, .16); }
.domain-text { display: inline-flex; align-items: center; gap: 4px; }
.domain-sub {
  font-weight: 700; color: var(--brown);
  padding: .5px 5px; border-radius: 4px; background: rgba(242, 196, 90, .2);
  letter-spacing: .04em;
}
.domain-root, .domain-tld { font-weight: 600; color: var(--t2); }
.domain-sep { width: 9px; height: 9px; flex: none; transform: rotate(-8deg); transition: transform .35s var(--ease); }
.brand:hover .domain-plaque { border-color: rgba(216, 173, 78, .6); color: var(--ink); }
.brand:hover .domain-sep { transform: rotate(37deg) scale(1.12); }

.topnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.navlink {
  position: relative; padding: 6px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--t2); font-size: 12.5px; font-weight: 500;
  letter-spacing: .04em; line-height: 1.6; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.navlink:hover { background: var(--hover); color: var(--ink); }
.navlink.on { color: var(--ink); font-weight: 650; }
.navlink.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--amber);
}

.hdr-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.hdr-sep { width: 1px; height: 20px; flex: none; background: var(--line); margin: 0 1px; }

.iconbtn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: linear-gradient(180deg, var(--surface), var(--sheet));
  color: var(--t2);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.iconbtn:hover { color: var(--ink); border-color: var(--amber); background: var(--hover); }
.iconbtn:active { transform: scale(.96); }
.iconbtn:disabled { opacity: .45; cursor: progress; transform: none; }
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn .ico-sun { display: none; }
html[data-theme="light"] .iconbtn .ico-moon { display: none; }
html[data-theme="light"] .iconbtn .ico-sun { display: block; }

.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #221d16; font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
  box-shadow: 0 4px 14px rgba(216, 173, 78, .26), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
}
.btn-gold svg { width: 14px; height: 14px; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(216, 173, 78, .34), inset 0 1px 0 rgba(255, 255, 255, .4); filter: saturate(1.06); }
.btn-gold:active { transform: translateY(0) scale(.985); }
.btn-gold:disabled { cursor: not-allowed; opacity: .4; box-shadow: none; transform: none; filter: grayscale(.2); }

/* --------------------------------- 布局 ---------------------------------- */

.main { max-width: 1180px; margin: 0 auto; padding: 0 30px 20px; }

/* ---------------------------------- Hero --------------------------------- */

/* 两屏结构：首屏 = 主视觉 + 发布器；第二屏 = 筛选 + 卡片墙 */

.stage {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--hdr-h));
  min-height: calc(100svh - var(--hdr-h));
  padding: 6px 0 22px;
}

.hero {
  flex: 1 1 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 356px;
  gap: 44px; align-items: center; padding: 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .2em;
  text-transform: uppercase; color: var(--amber-deep);
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 3px rgba(216, 173, 78, .16);
}
.eyebrow-sep { color: var(--line-strong); letter-spacing: 0; }

.hero-title {
  margin-top: 16px;
  font-family: var(--fs);
  font-size: clamp(31px, 3.9vw, 46px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: .02em;
  color: var(--title-ink);
}
.hero-title em {
  font-style: normal; color: var(--gold);
  background-image: linear-gradient(transparent 66%, rgba(242, 196, 90, .18) 66%, rgba(242, 196, 90, .18) 92%, transparent 92%);
}
.hero-tail { display: block; }

.hero-lead {
  max-width: 500px; margin-top: 16px;
  font-size: 14px; line-height: 1.9; color: var(--t2); letter-spacing: .03em;
}

.hero-stats { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.stat { display: flex; align-items: baseline; gap: 7px; }
.stat b {
  font-family: var(--fm); font-size: 21px; font-weight: 600;
  letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat span { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.stat-sep { width: 1px; height: 20px; background: var(--line); }

/* 今日一句 */
.today {
  position: relative; padding: 22px 24px 14px;
  border: 1px solid var(--line); border-radius: 14px;
  background:
    radial-gradient(ellipse 72% 92% at 90% 0%, rgba(242, 196, 90, .16), transparent 62%),
    linear-gradient(148deg, var(--surface), var(--sheet));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
html[data-theme="dark"] .today {
  background:
    radial-gradient(ellipse 72% 92% at 90% 0%, rgba(242, 196, 90, .1), transparent 62%),
    linear-gradient(148deg, var(--surface), var(--sheet));
}
.today-ribbon {
  position: absolute; top: 0; left: 50%; width: 26px; height: 19px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ecc46c, #b3872f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 66%, 0 100%);
  box-shadow: 0 3px 8px rgba(120, 90, 30, .22);
  pointer-events: none;
}
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .18em;
  text-transform: uppercase; color: var(--amber-deep);
}
.seal {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(168, 132, 56, .45); border-radius: 5px;
  background: rgba(242, 196, 90, .13); color: #826220;
  font-family: var(--fs); font-size: 12px; font-weight: 700; line-height: 1;
}
html[data-theme="dark"] .seal { border-color: rgba(231, 201, 143, .34); background: rgba(242, 196, 90, .1); color: #e7c98f; }

.today-index { font-family: var(--fm); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.today-index b { color: var(--amber); font-weight: 600; }

.today-body { position: relative; margin: 17px 0 0; padding-left: 4px; min-height: 78px; }
.quote-mark {
  position: absolute; left: -5px; top: -22px;
  font-family: Georgia, "Times New Roman", serif; font-size: 54px; font-weight: 700; line-height: 1;
  color: rgba(242, 196, 90, .22); pointer-events: none;
}
.today-body p {
  position: relative;
  font-family: var(--fs); font-size: 16.5px; font-weight: 500;
  line-height: 1.95; letter-spacing: .02em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: pretty;
}
.today-body p.is-long { font-size: 16px; }
.today-body p.is-empty { color: var(--muted); font-size: 15px; }

.today-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--line);
}
.today-foot cite {
  font-style: normal; font-size: 11px; color: var(--muted);
  letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.today-next {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t2);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), gap .2s var(--ease);
}
.today-next:hover { color: var(--ink); border-color: var(--amber); background: rgba(242, 196, 90, .1); gap: 8px; }

/* -------------------------------- 发布器 --------------------------------- */

.composer {
  position: relative; margin-top: 4px; padding: 15px 19px 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--sheet));
  box-shadow: var(--shadow-card);
  transition: border-color .25s var(--ease), box-shadow .3s var(--ease);
}
.composer::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 40% 70% at 100% 0%, rgba(242, 196, 90, .08), transparent 70%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.composer:focus-within { border-color: rgba(216, 173, 78, .55); box-shadow: 0 0 0 3px rgba(242, 196, 90, .09), var(--shadow-card); }
.composer:focus-within::after { opacity: 1; }
.composer.is-drag {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 196, 90, .16), var(--shadow-hover);
}
.composer.is-drag::after {
  opacity: 1;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(242, 196, 90, .14), transparent 70%);
}

.composer-top { display: flex; gap: 13px; }
.composer-avatar {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(168, 132, 56, .4); border-radius: 8px;
  background: rgba(242, 196, 90, .1); color: var(--amber-deep);
  font-family: var(--fs); font-size: 14px; font-weight: 700;
}
html[data-theme="dark"] .composer-avatar { border-color: rgba(231, 201, 143, .3); color: #e7c98f; }
.composer-main { flex: 1 1 auto; min-width: 0; }

#editor {
  display: block; width: 100%; min-height: 46px; padding: 4px 0 2px;
  border: 0; outline: none; background: transparent; resize: none;
  color: var(--ink); font-family: var(--ff); font-size: 15px; line-height: 1.9;
  letter-spacing: .02em;
}
#editor::placeholder { color: var(--muted); opacity: .85; }

.composer-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 9px; padding-top: 10px; border-top: 1px solid var(--line-2);
}
.cbar-left, .cbar-right { display: flex; align-items: center; gap: 10px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line-2); }
.seg-btn {
  height: 26px; padding: 0 13px; border: 0; border-radius: 999px; background: none;
  color: var(--t3); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.on {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #221d16; box-shadow: 0 2px 8px rgba(216, 173, 78, .24);
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t2);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.ghost-btn svg { width: 16px; height: 16px; }
.ghost-btn:hover { color: var(--ink); border-color: var(--amber); background: rgba(242, 196, 90, .08); }

/* 发布时间选择 */
.date-field {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t2);
  font-family: var(--fm); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.date-field svg { width: 13px; height: 13px; flex: none; opacity: .75; }
.date-field::after {
  content: ""; flex: none; width: 0; height: 0;
  border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-top: 4px solid currentColor; opacity: .45; margin-left: 1px;
}
.date-field:hover { border-color: var(--amber); color: var(--ink); }
.date-field:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242, 196, 90, .14); }
.date-field:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.date-field.is-open { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242, 196, 90, .14); }
.date-field.is-custom { border-color: rgba(216, 173, 78, .48); background: rgba(242, 196, 90, .07); color: var(--amber-deep); }
.date-field input { display: none; }

.cbar-hint { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.counter { font-family: var(--fm); font-size: 10.5px; color: var(--muted); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--amber); }
.btn-publish { height: 34px; padding: 0 18px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumb {
  position: relative; width: 82px; height: 82px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: var(--cover-bg);
  animation: pop .3s var(--ease) both;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(12, 10, 8, .62);
  color: #fff; font-size: 12px; line-height: 1; backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .2s var(--ease), background .2s;
}
.thumb:hover .thumb-x, .thumb:focus-within .thumb-x { opacity: 1; }
.thumb-x:hover { background: rgba(192, 80, 58, .92); }
.thumb.is-uploading::after {
  content: ""; position: absolute; inset: 0; background: rgba(12, 10, 8, .5);
}
.thumb.is-uploading::before {
  content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28); border-top-color: #f2c45a;
  animation: spin .8s linear infinite;
}
.thumb.is-error::after { content: "上传失败"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(60, 20, 14, .8); color: #ffd9cd; font-size: 10px; }

/* ------------------------------- 筛选工具条 ------------------------------ */

.feed-zone {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--hdr-h));
  min-height: calc(100svh - var(--hdr-h));
  padding-top: 20px;
}

.feed-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 0 0 6px; padding-bottom: 15px; border-bottom: 1px solid var(--line);
}
.feed-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.viewseg {
  display: inline-flex; gap: 2px; flex: none; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--hover);
}
.viewseg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 11px; border: 0; border-radius: 999px; background: none;
  color: var(--t3); font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.viewseg-btn svg { width: 13px; height: 13px; }
.viewseg-btn:hover { color: var(--ink); }
.viewseg-btn.on {
  background: rgba(242, 196, 90, .16);
  color: var(--amber-deep);
  box-shadow: inset 0 0 0 1px rgba(216, 173, 78, .4);
}
html[data-theme="dark"] .viewseg-btn.on { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(229, 179, 67, .34); }

.chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--t2);
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .2s var(--ease);
}
.chip span {
  font-family: var(--fm); font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 4px; background: var(--hover); color: var(--muted);
  transition: background .18s, color .18s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); background: var(--hover); }
.chip.on {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-color: transparent; color: #221d16;
  box-shadow: 0 3px 12px rgba(216, 173, 78, .26);
}
.chip.on span { background: rgba(34, 29, 22, .16); color: #3a2d16; }

.feed-tools { display: flex; align-items: center; gap: 14px; flex: none; }
.search {
  display: flex; align-items: center; gap: 7px;
  width: 226px; height: 33px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  transition: border-color .2s var(--ease), width .28s var(--ease), background .2s;
}
.search:focus-within { width: 268px; border-color: var(--amber); color: var(--amber); background: var(--sheet); }
.search svg { width: 14px; height: 14px; flex: none; }
.search input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; outline: none; background: transparent;
  color: var(--ink); font-family: var(--ff); font-size: 12.5px; letter-spacing: .02em;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .5; }
.feed-meta { font-size: 11px; color: var(--muted); letter-spacing: .05em; white-space: nowrap; }

/* --------------------------------- 时间轴 -------------------------------- */

.feed { padding-top: 26px; }

.month { margin-top: 36px; max-width: 980px; margin-left: auto; margin-right: auto; }
.month + .month { margin-top: 40px; }
.month-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.month-head h3 {
  font-family: var(--fs); font-size: 19px; font-weight: 700;
  letter-spacing: .04em; color: var(--title-ink); white-space: nowrap;
}
.month-head span { font-family: var(--fm); font-size: 10.5px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.month-head::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
  align-self: center; margin-top: 5px;
}

.entry {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 26px;
  position: relative; padding-bottom: 18px;
  animation: rise .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}
.entry::after {
  content: ""; position: absolute; left: 73.5px; top: 0; bottom: 0; width: 1px;
  background: var(--line-2); pointer-events: none;
}
.rail {
  position: relative; text-align: right; padding: 6px 20px 0 0;
}
.rail .day {
  display: block; font-family: var(--fs); font-size: 26px; font-weight: 700;
  line-height: 1.1; letter-spacing: .01em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.rail .sub { display: block; margin-top: 5px; font-size: 10px; line-height: 1.5; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.rail .dot {
  position: absolute; right: -4.5px; top: 14px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--paper); border: 1.5px solid var(--line-strong);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.entry.is-quote .rail .dot { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 0 3px rgba(216, 173, 78, .12); }
.entry:hover .rail .dot { border-color: var(--amber); }

.post {
  position: relative; padding: 19px 22px 15px; max-width: 920px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--surface), var(--sheet));
  box-shadow: var(--shadow-card);
  transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.post:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.post.is-quote {
  background:
    radial-gradient(ellipse 56% 90% at 100% 0%, rgba(242, 196, 90, .1), transparent 64%),
    linear-gradient(180deg, var(--surface), var(--sheet));
}
html[data-theme="dark"] .post.is-quote {
  background:
    radial-gradient(ellipse 56% 90% at 100% 0%, rgba(242, 196, 90, .065), transparent 64%),
    linear-gradient(180deg, var(--surface), var(--sheet));
}
.post.is-quote::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, rgba(229, 179, 67, .8), rgba(216, 173, 78, .12));
}

.post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.kind {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 650; letter-spacing: .1em; color: var(--amber-deep);
}
.kind .kseal {
  width: 18px; height: 18px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(168, 132, 56, .4); border-radius: 4px;
  background: rgba(242, 196, 90, .1);
  font-family: var(--fs); font-size: 9.5px; font-weight: 700; line-height: 1;
}
html[data-theme="dark"] .kind .kseal { border-color: rgba(231, 201, 143, .3); }
.kind.daily { color: var(--t3); }
.kind.daily .kseal { border-color: var(--line-strong); background: var(--hover); color: var(--t3); }

.stamp { font-family: var(--fm); font-size: 10.5px; color: var(--muted); letter-spacing: .03em; }
.stamp .edited { color: var(--line-strong); }

.post-acts { display: flex; align-items: center; gap: 1px; margin-left: auto; opacity: 0; transition: opacity .22s var(--ease); }
.post:hover .post-acts, .post:focus-within .post-acts { opacity: 1; }
@media (hover: none) { .post-acts { opacity: 1; } }
.mini {
  height: 25px; padding: 0 8px; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  transition: background .18s, color .18s;
}
.mini:hover { background: var(--hover); color: var(--ink); }
.mini.danger:hover { background: rgba(192, 80, 58, .12); color: var(--danger); }
.mini.edit { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--t2); }
.mini.edit svg { width: 12px; height: 12px; }
.mini.edit:hover { color: var(--ink); background: var(--hover); }
.post-foot .mini.edit { height: 22px; padding: 0 7px; font-size: 11px; }
.pcard-foot .mini.edit { height: 22px; }

.q { position: relative; padding-left: 20px; }
.q::before {
  content: "\201C"; position: absolute; left: 0; top: -7px;
  font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; line-height: 1;
  color: rgba(229, 179, 67, .5);
}
.q p {
  max-width: 44em;
  font-family: var(--fs); font-size: clamp(17px, 1.45vw, 19px); font-weight: 500;
  line-height: 1.92; letter-spacing: .02em; color: var(--ink);
  white-space: pre-wrap; text-wrap: pretty; overflow-wrap: anywhere;
}

.txt {
  max-width: 46em;
  font-size: 14.5px; line-height: 1.98; letter-spacing: .025em;
  color: var(--ink); white-space: pre-wrap; text-wrap: pretty; overflow-wrap: anywhere;
}

.shots { display: grid; gap: 7px; margin-top: 14px; }
.shot {
  display: block; position: relative; padding: 0; border: 0;
  border-radius: 8px; overflow: hidden; background: var(--cover-bg); cursor: zoom-in;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.shot:hover img { transform: scale(1.035); }
.shot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  pointer-events: none;
}

.shots.n1 { display: block; max-width: 460px; }
.shots.n1 .shot { display: inline-block; max-width: 100%; }
.shots.n1 .shot img { width: auto; max-width: 100%; max-height: 460px; object-fit: contain; }

.shots.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.shots.n2 .shot { aspect-ratio: 4 / 3; }

.shots.n3 { grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; height: 318px; max-width: 620px; }
.shots.n3 .shot:first-child { grid-row: 1 / span 2; }

.shots.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 480px; }
.shots.n4 .shot { aspect-ratio: 1 / 1; }

.shots.n5, .shots.n6, .shots.n7, .shots.n8, .shots.n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; }
.shots.n5 .shot, .shots.n6 .shot, .shots.n7 .shot, .shots.n8 .shot, .shots.n9 .shot { aspect-ratio: 1 / 1; }

.post-foot {
  display: flex; align-items: center; gap: 9px; margin-top: 15px;
  font-family: var(--fm); font-size: 10px; color: var(--muted); letter-spacing: .02em;
}
.post-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* ------------------------------- 卡片视图 ------------------------------- */

.card-grid { position: relative; margin-top: 6px; }
.card-grid.is-laying { visibility: hidden; }

.pcard {
  position: absolute; top: 0; left: 0; width: 100%;
  padding: 17px 18px 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--surface), var(--sheet));
  box-shadow: var(--shadow-card);
  animation: rise .5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 26ms);
  transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.pcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pcard:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.pcard.is-quote {
  background:
    radial-gradient(ellipse 62% 84% at 100% 0%, rgba(242, 196, 90, .11), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--sheet));
}
html[data-theme="dark"] .pcard.is-quote {
  background:
    radial-gradient(ellipse 62% 84% at 100% 0%, rgba(242, 196, 90, .07), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--sheet));
}
.pcard.is-editing {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 196, 90, .12), var(--shadow-hover);
}
.pcard.is-new, .entry.is-new .post { animation: goldPulse 1.9s var(--ease) both; }
.pcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pcard-date {
  margin-left: auto; font-family: var(--fm); font-size: 10px; font-weight: 500;
  color: var(--t3); letter-spacing: .02em; white-space: nowrap;
}

.pcard .q { padding-left: 17px; }
.pcard .q::before { font-size: 30px; top: -5px; }
.pcard .q p {
  font-size: 16.5px; line-height: 1.86;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .txt {
  font-size: 14px; line-height: 1.92;
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}

.pcard-cover {
  display: block; width: 100%; margin-top: 12px; padding: 0;
  border: 0; border-radius: 8px; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--cover-bg); cursor: zoom-in;
}
.pcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard-cover:hover img { transform: scale(1.03); }

.pcard-shots { display: grid; gap: 5px; margin-top: 12px; }
.pcard-shots.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcard-shots.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcard-shot {
  position: relative; display: block; padding: 0; border: 0;
  aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden;
  background: var(--cover-bg); cursor: zoom-in;
}
.pcard-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard-shot:hover img { transform: scale(1.04); }
.pcard-shot .more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 9, 7, .52); color: #f5ecdb;
  font-family: var(--fm); font-size: 13px; font-weight: 600; letter-spacing: .02em;
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}

.pcard-foot {
  display: flex; align-items: center; gap: 8px;
  min-height: 22px; margin-top: 11px;
  font-family: var(--fm); font-size: 10px; color: var(--t3); letter-spacing: .02em;
}
.pcard-foot > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcard-foot .post-acts { margin-left: auto; }
.pcard .mini { height: 22px; padding: 0 6px; font-size: 10.5px; }
.pcard:hover .post-acts, .pcard:focus-within .post-acts { opacity: 1; }

@keyframes goldPulse {
  0% { box-shadow: 0 0 0 2px rgba(242, 196, 90, .6), 0 18px 44px rgba(0, 0, 0, .3); }
  70% { box-shadow: 0 0 0 2px rgba(242, 196, 90, .28), var(--shadow-card); }
  100% { box-shadow: var(--shadow-card); }
}
@keyframes sheetUp { from { opacity: .5; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* ------------------------------- 空 / 载入 ------------------------------- */

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 58px 24px 62px; margin-top: 10px;
  border: 1px dashed var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(242, 196, 90, .03), transparent 70%);
  text-align: center;
}
.empty-seal {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 4px;
  border: 1px solid rgba(168, 132, 56, .4); border-radius: 10px;
  background: rgba(242, 196, 90, .08); color: var(--amber-deep);
  font-family: var(--fs); font-size: 19px; font-weight: 700;
}
.empty b { font-size: 15px; font-weight: 650; letter-spacing: .04em; color: var(--ink); }
.empty p { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.empty .btn-ghost { margin-top: 10px; height: 34px; padding: 0 15px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn-ghost:hover { background: var(--hover); border-color: var(--amber); }

.loading { display: flex; justify-content: center; gap: 7px; padding: 40px 0 10px; }
.loading-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); opacity: .3; animation: blink 1.1s infinite; }
.loading-dot:nth-child(2) { animation-delay: .16s; }
.loading-dot:nth-child(3) { animation-delay: .32s; }

/* --------------------------------- 页脚 ---------------------------------- */

.foot { margin-top: 46px; border-top: 1px solid var(--line); }
.foot-in {
  max-width: 1180px; margin: 0 auto; padding: 24px 30px 44px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.foot-brand { font-size: 11.5px; font-weight: 650; letter-spacing: .1em; color: var(--t2); }
.foot-note { font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.foot-mark {
  margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid rgba(168, 132, 56, .35); border-radius: 5px;
  background: rgba(242, 196, 90, .08); color: var(--amber-deep);
  font-family: var(--fs); font-size: 11px; font-weight: 700;
}

/* ------------------------------- 编辑浮层 -------------------------------- */

.sheet {
  position: fixed; inset: 0; z-index: 125;
  display: grid; place-items: center; padding: 24px;
  background: rgba(9, 8, 6, .58);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  animation: fade .2s var(--ease) both;
}
.sheet-card {
  position: relative;
  width: min(620px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(242, 196, 90, .1), transparent 60%),
    var(--sheet);
  box-shadow: var(--shadow-pop);
  animation: pop .28s var(--ease) both;
}
.sheet-grabber { display: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px 8px; flex: none;
}
.sheet-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 650; letter-spacing: .14em; color: var(--amber-deep);
}
.sheet-close {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--t2);
  transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease);
}
.sheet-close svg { width: 15px; height: 15px; }
.sheet-close:hover { color: var(--ink); border-color: var(--amber); background: var(--hover); transform: rotate(90deg); }

.sheet-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 20px 6px; }
.sheet-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 4px 0 14px; border-bottom: 1px solid var(--line-2);
}

.pin-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t2);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pin-btn svg { width: 13px; height: 13px; }
.pin-btn:hover { border-color: var(--amber); color: var(--ink); }
.pin-btn.on {
  background: rgba(242, 196, 90, .15); border-color: rgba(216, 173, 78, .5);
  color: var(--amber-deep);
}
html[data-theme="dark"] .pin-btn.on { color: var(--gold); border-color: rgba(229, 179, 67, .45); }

#sheetText {
  display: block; width: 100%; min-height: 132px; max-height: 36vh;
  padding: 16px 0 10px; border: 0; outline: none; background: transparent; resize: none;
  color: var(--ink); font-family: var(--ff); font-size: 15px; line-height: 1.92; letter-spacing: .02em;
}
#sheetText::placeholder { color: var(--muted); }

.sheet-thumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; }
.sheet-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 6px; padding: 9px 0 6px; border-top: 1px solid var(--line-2);
}
.sheet-count { font-family: var(--fm); font-size: 10px; color: var(--muted); letter-spacing: .02em; }

.sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 20px 14px; border-top: 1px solid var(--line); flex: none;
}
.sheet-actions { display: flex; align-items: center; gap: 8px; }
.sheet-del {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  transition: background .2s, color .2s;
}
.sheet-del svg { width: 14px; height: 14px; }
.sheet-del:hover { color: var(--danger); background: rgba(192, 80, 58, .1); }

/* 置顶标识 */
.pin-flag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(242, 196, 90, .14); color: var(--amber-deep);
  font-size: 9.5px; font-weight: 650; letter-spacing: .04em; line-height: 1.5;
}
.pin-flag svg { width: 9px; height: 9px; }
html[data-theme="dark"] .pin-flag { color: var(--gold); }

.pcard { cursor: default; }
.post { cursor: default; }
.month.is-pinned .month-head h3 { color: var(--amber-deep); }
html[data-theme="dark"] .month.is-pinned .month-head h3 { color: var(--gold); }

/* --------------------------- 自定义日期选择器 ---------------------------- */

.dp-layer { position: fixed; inset: 0; z-index: 128; touch-action: none; }
.dp-scrim { position: absolute; inset: 0; background: transparent; }
.dp {
  position: absolute; z-index: 1; width: 306px; padding: 13px 13px 11px;
  border: 1px solid var(--line); border-radius: 13px;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(242, 196, 90, .08), transparent 60%),
    var(--sheet);
  box-shadow: var(--shadow-pop);
  animation: pop .18s var(--ease) both;
}
html[data-theme="light"] .dp {
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(242, 196, 90, .06), transparent 60%),
    var(--surface);
}
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dp-title { font-family: var(--fs); font-size: 15px; font-weight: 700; letter-spacing: .03em; color: var(--title-ink); }
.dp-nav {
  width: 27px; height: 27px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--t2);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.dp-nav svg { width: 13px; height: 13px; }
.dp-nav:hover { color: var(--ink); border-color: var(--amber); background: var(--hover); }

.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px; }
.dp-week span { padding: 4px 0; text-align: center; font-size: 9.5px; letter-spacing: .05em; color: var(--muted); }

.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day {
  position: relative; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: none; color: var(--ink);
  font-family: var(--fm); font-size: 11px; letter-spacing: .01em; cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.dp-day:hover { background: var(--hover); }
.dp-day.is-blank { pointer-events: none; }
.dp-day.is-today::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 3px; height: 3px;
  margin-left: -1.5px; border-radius: 50%; background: var(--amber);
}
.dp-day.is-on { background: var(--ink); color: var(--paper); font-weight: 600; }
.dp-day.is-on::after { background: currentColor; opacity: .55; }

.dp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line-2);
}
.dp-time { display: flex; align-items: center; gap: 4px; }
.dp-time-label { margin-right: 2px; font-size: 10px; color: var(--muted); }
.dp-time select {
  height: 26px; padding: 0 14px 0 5px; border: 1px solid var(--line); border-radius: 6px;
  background-color: var(--surface); color: var(--ink);
  font-family: var(--fm); font-size: 10.5px; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%23948b7c' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.dp-time select:focus { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(242, 196, 90, .14); }
.dp-time i { font-style: normal; color: var(--muted); font-size: 10px; }
.dp-acts { display: flex; align-items: center; gap: 5px; }
.dp-now {
  height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: 10.5px; font-weight: 600;
}
.dp-now:hover { color: var(--ink); background: var(--hover); }
.dp-done {
  height: 26px; padding: 0 11px; border: 0; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
}
.dp-done:hover { opacity: .9; }

@media (max-width: 620px) {
  .dp-layer {
    display: grid; place-items: center; padding: 14px;
    background: rgba(9, 8, 6, .5);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  }
  .dp { position: static; width: min(326px, 100%); }
}

/* --------------------------------- 灯箱 ---------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: grid; grid-template-columns: 68px minmax(0, 1fr) 68px; align-items: center;
  padding: 34px 6px;
  background: rgba(9, 8, 6, .975);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fade .22s var(--ease) both;
}
.lb-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; grid-column: 2; }
.lb-stage img {
  max-width: 100%; max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px);
  object-fit: contain; border-radius: 5px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}
.lb-stage figcaption { font-family: var(--fm); font-size: 11px; color: rgba(233, 227, 214, .62); letter-spacing: .05em; }

.lb-close {
  position: absolute; top: 18px; right: 20px; width: 40px; height: 40px;
  display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(233, 227, 214, .2); border-radius: 50%;
  background: rgba(233, 227, 214, .06); color: rgba(233, 227, 214, .82);
  transition: background .2s, transform .2s;
}
.lb-close:hover { background: rgba(233, 227, 214, .16); transform: rotate(90deg); }
.lb-close svg { width: 18px; height: 18px; }

.lb-nav {
  width: 42px; height: 42px; display: grid; place-items: center; justify-self: center;
  padding: 0; border: 1px solid rgba(233, 227, 214, .2); border-radius: 50%;
  background: rgba(233, 227, 214, .05); color: rgba(233, 227, 214, .82);
  transition: background .2s, border-color .2s;
}
.lb-nav:hover { background: rgba(242, 196, 90, .16); border-color: rgba(242, 196, 90, .5); }
.lb-nav svg { width: 18px; height: 18px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

/* --------------------------------- 弹窗 ---------------------------------- */

.modal {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center; padding: 24px;
  background: rgba(10, 9, 7, .62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade .2s var(--ease) both;
}
.modal-card {
  width: min(360px, 100%); padding: 26px 24px 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(ellipse 70% 90% at 90% 0%, rgba(242, 196, 90, .1), transparent 62%), var(--sheet);
  box-shadow: var(--shadow-pop);
  text-align: center;
  animation: pop .28s var(--ease) both;
}
.modal-seal {
  width: 40px; height: 40px; display: grid; place-items: center; margin: 0 auto 14px;
  border: 1px solid rgba(192, 80, 58, .4); border-radius: 9px;
  background: rgba(192, 80, 58, .1); color: var(--danger);
  font-family: var(--fs); font-size: 17px; font-weight: 700;
}
.modal-card b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: .03em; color: var(--ink); }
.modal-card p { margin-top: 8px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.modal-acts { display: flex; gap: 9px; margin-top: 20px; }
.modal-acts > * { flex: 1 1 0; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; border: 1px solid rgba(192, 80, 58, .45); border-radius: 999px;
  background: rgba(192, 80, 58, .12); color: var(--danger);
  font-size: 12px; font-weight: 650; letter-spacing: .04em;
  transition: background .2s, color .2s;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

/* --------------------------------- 提示 ---------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 140;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 40px);
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .26s var(--ease), transform .34s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex: none; }

/* ------------------------------- 回到顶部 -------------------------------- */

.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 55;
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--surface); color: var(--t2);
  box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .35s var(--ease), color .2s, border-color .2s, background .2s;
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { color: var(--ink); border-color: var(--amber); background: var(--hover); }
.fab svg { width: 17px; height: 17px; }

/* --------------------------------- 动效 ---------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.965); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: .22; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-2px); } }

/* -------------------------------- 响应式 --------------------------------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; }
  .hero-title { font-size: clamp(30px, 3.8vw, 42px); }
}

@media (max-width: 1024px) {
  .feed-meta { display: none; }
}

@media (max-width: 900px) {
  .domain-plaque { display: none; }
  .topnav { display: none; }
  .search input { font-size: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 0; }
  .hero-title { font-size: clamp(30px, 6vw, 40px); }
  .hero-lead { max-width: none; }
  .today { max-width: 520px; }
  .entry { grid-template-columns: 62px minmax(0, 1fr); gap: 18px; }
  .entry::after { left: 61.5px; }
  .rail { padding-right: 15px; }
  .rail .day { font-size: 23px; }
}

@media (max-width: 760px) {
  .main { padding: 0 20px 12px; }
  .hdr-in { padding: 0 18px; gap: 14px; }
  body { background-attachment: scroll; }
  .search { width: 100%; }
  .search:focus-within { width: 100%; }
  .feed-bar { flex-wrap: wrap; gap: 12px; }
  .feed-left { width: 100%; gap: 10px; }
  .chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .feed-tools { width: 100%; }
  .feed-tools .search { flex: 1 1 auto; }
  .foot-in { padding: 22px 20px 40px; }
}

@media (max-width: 620px) {
  .hdr-in { padding: 0 14px; gap: 10px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 14px; letter-spacing: .06em; }
  .hdr-actions { gap: 7px; margin-left: auto; }
  .btn-gold { height: 36px; padding: 0 13px; font-size: 12px; }
  .btn-gold svg { width: 13px; height: 13px; }
  .iconbtn { width: 36px; height: 36px; }

  .main { padding: 0 14px 10px; }
  .stage { padding: 16px 0 18px; }
  .hero { padding: 0; gap: 24px; }
  .hero-title { font-size: clamp(28px, 8.2vw, 35px); line-height: 1.4; margin-top: 14px; }
  .hero-title .hero-tail { display: block; }
  .hero-lead { margin-top: 14px; font-size: 13.5px; line-height: 1.9; }
  .hero-stats { margin-top: 20px; gap: 14px; }
  .stat { gap: 5px; }
  .stat b { font-size: 19px; }
  .stat span { font-size: 10.5px; }
  .stat-sep { height: 16px; }

  .today { padding: 20px 18px 13px; }
  .today-body { margin-top: 14px; min-height: 0; }
  .today-body p { font-size: 16px; line-height: 1.95; }

  .composer { padding: 15px 15px 12px; margin-top: 4px; }
  .composer-top { gap: 10px; }
  .composer-avatar { width: 30px; height: 30px; font-size: 13px; }
  #editor { font-size: 16px; }
  .composer-bar { gap: 10px; }
  .cbar-left { gap: 8px; flex-wrap: wrap; }
  .cbar-hint { display: none; }
  .cbar-right { width: 100%; margin-left: 0; }
  .cbar-right .btn-publish { flex: 1 1 auto; }
  .counter { display: none; }
  .ghost-btn { padding: 0 10px; font-size: 11.5px; }
  .date-field { height: 30px; padding: 0 9px; font-size: 10px; }
  .date-field span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }

  .feed-bar { margin-top: 0; padding-bottom: 13px; }
  .feed-meta { display: none; }

  .month-head { margin-bottom: 14px; }
  .month-head h3 { font-size: 17px; }

  .entry { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
  .entry::after { left: 45.5px; }
  .rail { padding: 5px 10px 0 0; }
  .rail .day { font-size: 20px; }
  .rail .sub { font-size: 9px; }
  .rail .dot { top: 11px; width: 7px; height: 7px; right: -4px; }

  .post { padding: 15px 14px 12px; border-radius: 11px; }
  .pcard { padding: 15px 15px 9px; }  .pcard .q { padding-left: 15px; }
  .pcard .q::before { font-size: 27px; }
  .pcard .q p { font-size: 16px; line-height: 1.82; }
  .pcard .txt { font-size: 13.5px; }
  .pcard-foot { margin-top: 9px; }
  .q { padding-left: 16px; }
  .q::before { font-size: 28px; top: -5px; }
  .q p { font-size: 16.5px; line-height: 1.9; }
  .txt { font-size: 14px; }
  .shots { gap: 5px; margin-top: 12px; }
  .shots.n3 { height: 226px; }
  .shots.n1 .shot img { max-height: 380px; }
  .post-foot { margin-top: 12px; }

  .empty { padding: 44px 18px 48px; }
  .lightbox { grid-template-columns: 46px minmax(0, 1fr) 46px; padding: 26px 2px; }
  .lb-nav { width: 36px; height: 36px; }
  .lb-nav svg { width: 16px; height: 16px; }
  .lb-stage img { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .toast { bottom: 22px; font-size: 12px; }
  .fab { right: 14px; bottom: 18px; width: 38px; height: 38px; }

  .sheet { place-items: end center; padding: 0; }
  .sheet-card {
    width: 100%; max-height: 90vh; max-height: 90dvh;
    border-radius: 16px 16px 0 0; border-bottom: 0;
    animation: sheetUp .32s var(--ease) both;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-head { padding: 20px 16px 8px; }
  .sheet-body { padding: 0 16px 4px; }
  .sheet-foot { padding: 10px 16px 14px; }
  .sheet-meta { gap: 8px; }
  #sheetText { min-height: 110px; max-height: 28vh; font-size: 16px; }
  .sheet-thumbs .thumb { width: 72px; height: 72px; }
  .sheet-actions { gap: 7px; }
  .sheet-actions .btn-ghost { padding: 0 13px; }
  .sheet-grabber {
    display: block; position: absolute; top: 7px; left: 50%;
    width: 36px; height: 3px; margin-left: -18px; border-radius: 2px;
    background: var(--line-strong); opacity: .7;
  }
  .sheet-close { width: 36px; height: 36px; }
  .sheet-actions .btn-ghost, .sheet-actions .btn-gold { height: 40px; }
  .sheet-del { height: 40px; padding: 0 10px; }
  .mini.edit { height: 30px; }
  .post-foot .mini.edit { height: 28px; font-size: 11px; }
}

/* ------------------------ 白天模式（对齐 ssoo.asia） ----------------------- */

/* 参考站白天模式：标题用墨色 + 金色短线，金色只做点缀 */
html[data-theme="light"] .hero-title em {
  color: var(--ink);
  background-image: linear-gradient(
    transparent calc(100% - 7px),
    rgba(216, 173, 78, .55) calc(100% - 7px),
    rgba(216, 173, 78, .55) calc(100% - 3px),
    transparent calc(100% - 3px)
  );
}
html[data-theme="light"] .today {
  background:
    radial-gradient(ellipse 70% 90% at 90% 0%, rgba(242, 196, 90, .08), transparent 62%),
    var(--surface);
}
html[data-theme="light"] .pcard.is-quote,
html[data-theme="light"] .post.is-quote {
  background: var(--surface);
}
html[data-theme="light"] .chip.on {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  box-shadow: 0 2px 8px rgba(38, 36, 33, .16);
}
html[data-theme="light"] .chip.on span {
  background: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .86);
}
html[data-theme="light"] .viewseg-btn.on {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 3px rgba(38, 36, 33, .1), inset 0 0 0 1px var(--line);
}
html[data-theme="light"] .btn-gold {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 4px 14px rgba(38, 36, 33, .16), inset 0 1px 0 rgba(255, 255, 255, .1);
}
html[data-theme="light"] .btn-gold:hover {
  box-shadow: 0 8px 22px rgba(38, 36, 33, .22), inset 0 1px 0 rgba(255, 255, 255, .14);
}
html[data-theme="light"] .seg-btn.on {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 2px 8px rgba(38, 36, 33, .16);
}
html[data-theme="light"] .dp-day.is-on,
html[data-theme="light"] .dp-done {
  background: var(--ink); color: var(--paper);
}

/* 小屏手机：压缩首屏密度，保证主视觉 + 发布器仍在一屏内 */
@media (max-width: 760px) and (max-height: 720px) {
  .stage { padding: 8px 0 12px; }
  .hero { gap: 13px; }
  .hero-lead { display: none; }
  .hero-title { font-size: clamp(23px, 6.9vw, 30px); margin-top: 10px; line-height: 1.32; }
  .hero-stats { margin-top: 13px; }
  .today { padding: 14px 15px 9px; }
  .today-body { margin-top: 9px; }
  .today-body p { font-size: 14px; line-height: 1.82; }
  .today-foot { margin-top: 9px; padding-top: 8px; }
  .composer { padding: 12px 13px 10px; }
  #editor { min-height: 38px; }
  .composer-bar { margin-top: 7px; padding-top: 8px; }
}

/* 高视口：首屏按封面比例放大，避免上下一屏过于空 */
@media (min-width: 901px) and (min-height: 800px) {
  .hero { gap: 52px; grid-template-columns: minmax(0, 1fr) 384px; }
  .hero-title { font-size: clamp(36px, 4.35vw, 58px); margin-top: 20px; }
  .hero-lead { max-width: 540px; margin-top: 22px; font-size: 15px; }
  .hero-stats { margin-top: 32px; gap: 20px; }
  .today { padding: 30px 28px 20px; }
  .today-body { margin-top: 24px; min-height: 116px; }
  .today-body p { font-size: 18px; }
  .composer { padding: 17px 21px 14px; }
}

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

/* ----------------------------- 访问口令浮层 ----------------------------- */

.gate-hint {
  margin: 0 0 14px;
  color: var(--t3);
  font-size: 13.5px;
  line-height: 1.65;
}

.gate-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.gate-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  letter-spacing: .05em;
}

.gate-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 196, 90, .22);
}

.gate-go {
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s var(--ease), opacity .15s;
}

.gate-go:hover { opacity: .9; }
.gate-go:active { transform: scale(.97); }
.gate-go:disabled { opacity: .55; cursor: wait; }

.gate-err {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}
