/* ═══════════════════════════════════════════════════════════════════════════
   EVENT HORIZON
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #f4f1ee;
  --dim: rgba(244, 241, 238, 0.56);
  --dimmer: rgba(244, 241, 238, 0.34);
  --hair: rgba(244, 241, 238, 0.14);
  --accent: rgb(255, 122, 47);

  /* Geist Mono carries every latin glyph and numeral. It has no CJK coverage,
     so the chinese display title falls through to the system CJK faces below —
     that fallback is intentional, not a gap. */
  --f-display: "Geist Mono", "PingFang SC", "Noto Sans SC", ui-monospace, monospace;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, "PingFang SC", "Noto Sans SC", monospace;

  --pad: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--bg);
  /* 平滑滚动交给 JS：ScrollTrigger 刷新时要先把页面归零再量元素位置，
     CSS 的 smooth 会把那次归零变成一段动画，于是所有 start/end 都被量偏
     一整个滚动距离（缩放窗口后回到顶部，首屏就整块不见了）。 */
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-booting { overflow: hidden; height: 100vh; }

::selection { background: var(--accent); color: #000; }

a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd, dt, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }

/* ── stage ───────────────────────────────────────────────────────────────── */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
body.is-live #stage { opacity: 1; }

/* readability scrim: dark on the left where the type lives, plus top/bottom */
.fx-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.42) 30%, rgba(0,0,0,0) 62%),
    linear-gradient(to bottom, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 26%);
}

/* hairline frame — the whole page reads as an instrument panel */
.fx-grain {
  position: fixed;
  inset: clamp(10px, 1.5vw, 20px);
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(244, 241, 238, 0.07);
  mix-blend-mode: screen;
}

/* ── chrome ──────────────────────────────────────────────────────────────── */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 3.2vw, 40px) var(--pad);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  mix-blend-mode: difference;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 14px 1px var(--accent);
  transition: box-shadow 0.7s var(--ease);
}
.brand-name { letter-spacing: 0.22em; }

.chrome-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); }
.chrome-meta .sep { color: var(--dimmer); }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── rail ────────────────────────────────────────────────────────────────── */

.rail {
  position: fixed;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  padding-right: 22px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rail-item {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--dimmer);
  transition: color 0.5s var(--ease);
}
.rail-item b {
  font-weight: 400;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.rail-item i { font-style: normal; font-variant-numeric: tabular-nums; }
.rail-item:hover { color: var(--dim); }
.rail-item:hover b { opacity: 0.7; transform: none; }
.rail-item.is-on { color: var(--accent); }
.rail-item.is-on b { opacity: 1; transform: none; }

.rail-line {
  position: absolute;
  right: 0; top: 2px; bottom: 2px;
  width: 1px;
  background: rgba(244, 241, 238, 0.16);
  overflow: hidden;
}
.rail-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

/* ── chapters ────────────────────────────────────────────────────────────── */

main { position: relative; z-index: 4; }

.chapter { position: relative; height: 240vh; }
#sc0 { height: 300vh; }

.panel {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
  padding-right: clamp(var(--pad), 14vw, 200px);
}

.stage {
  grid-area: 1 / 1;
  max-width: min(52ch, 46vw);
  will-change: transform, opacity;
}

/* ── type ────────────────────────────────────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: clamp(20px, 2.4vw, 34px);
}
.eyebrow .idx {
  font-style: normal;
  color: var(--accent);
  padding-right: 3px;
  transition: color 0.7s var(--ease);
}

.display {
  /* 四个汉字必须整体成行：窄视口下一旦折行，0.86 的行高会让上下两行叠在一起。
     字号按视口收敛，保证任何宽度下四个字都放得下。 */
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-weight: 200;
  margin: 0 0 clamp(26px, 3vw, 46px);
}
.ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.ln > span { display: block; }

.title {
  /* 与首屏标题同一路数：更小更细。行高必须 > 1，中文多行标题在 0.98 下会上下相碰 */
  font-size: clamp(1.7rem, 3.6vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 200;
  margin-bottom: clamp(22px, 2.6vw, 38px);
}

.lead {
  font-size: clamp(14.5px, 1.02vw, 17.5px);
  line-height: 1.66;
  color: var(--dim);
  max-width: 44ch;
  font-weight: 400;
}
.lead.dim { color: var(--dimmer); margin-top: 14px; }
.hero-lead { max-width: 38ch; }

.specs {
  margin-top: clamp(30px, 3.6vw, 52px);
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hair);
  max-width: 40ch;
}
.specs > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.specs dt { color: var(--dimmer); }
.specs dd { color: var(--fg); opacity: 0.82; }
.specs sub { font-size: 0.8em; }

.cue {
  margin-top: clamp(34px, 4vw, 60px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
.cue-line {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: sweep 2.4s var(--ease) infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ── outro ───────────────────────────────────────────────────────────────── */

.outro {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 11vh, 130px) var(--pad) 0;
}
.outro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.72) 26%, rgba(0,0,0,0.88) 100%);
  pointer-events: none;
}
.outro-inner, .foot { position: relative; }
.outro-inner { max-width: 94ch; }
.outro-title { font-size: clamp(1.7rem, 3.6vw, 3.4rem); }  /* 与章节标题同一尺度 */
.outro-lead { max-width: 52ch; }

.ledger {
  margin-top: clamp(30px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--hair);
}
.ledger li {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 15px 18px 17px 0;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ledger i { font-style: normal; color: var(--dimmer); }
.ledger b { font-weight: 400; color: var(--fg); opacity: 0.85; }

.backtop {
  margin-top: clamp(32px, 4vw, 56px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 14px 22px;
  border: 1px solid var(--hair);
  border-radius: 100px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), gap 0.4s var(--ease);
}
.backtop svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.backtop:hover { color: var(--accent); border-color: var(--accent); gap: 18px; }

/* ── 语言切换器：常驻底右，紧邻「回到顶部」 ───────────────────────────── */
.langdock {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--hair);
  border-radius: 100px;
  background: rgba(8, 9, 13, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}
.langdock-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
  padding: 0 6px 0 4px;
  user-select: none;
}
.langbtn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.langbtn:hover { color: var(--fg); background: rgba(244, 241, 238, 0.08); transform: translateY(-1px); }
.langbtn.is-on {
  color: #000;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 14px 1px rgba(255, 122, 47, 0.45);
}
.langdock-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border-left: 1px solid var(--hair);
  padding-left: 10px;
  color: var(--dim);
  transition: color 0.3s var(--ease);
}
.langdock-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.langdock-top:hover { color: var(--accent); }

@media (max-width: 640px) {
  .langdock { gap: 3px; padding: 6px 8px; }
  .langdock-label { display: none; }
  .langbtn { width: 30px; height: 30px; font-size: 15px; }
  .langdock-top { width: 30px; height: 30px; margin-left: 2px; padding-left: 8px; }
}

.foot {
  margin-top: auto;
  padding: 24px 0 clamp(26px, 3.4vw, 40px);
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
}

/* ── boot ────────────────────────────────────────────────────────────────── */

.boot {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  display: grid;
  place-items: center;
}
.boot-inner { display: grid; justify-items: center; gap: 22px; }
.boot-mark {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 26px 2px var(--accent);
  animation: breathe 2.2s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.68); opacity: 0.55; }
}
.boot-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}
.boot-bar { width: 168px; height: 1px; background: rgba(244,241,238,0.16); overflow: hidden; }
.boot-fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.boot.is-gone { opacity: 0; pointer-events: none; transition: opacity 0.9s var(--ease); }

/* ── no gpu ──────────────────────────────────────────────────────────────── */

.nogpu {
  position: fixed;
  inset: 0;
  z-index: 22;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(255,122,47,0.10), transparent 60%),
    #000;
  display: grid;
  align-content: center;
  padding: 0 var(--pad);
}
.nogpu[hidden] { display: none; }
.nogpu-inner { max-width: 54ch; }

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stage { max-width: none; }
  .panel { padding-right: var(--pad); }
  .rail { gap: 13px; }
  .rail-item b { display: none; }
  .fx-scrim {
    background:
      linear-gradient(to top, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.30) 46%, rgba(0,0,0,0.55) 100%);
  }
  .panel { align-content: end; padding-bottom: 16vh; }
  .stage-hero { align-content: end; }
}

@media (max-width: 640px) {
  .chapter { height: 200vh; }
  #sc0 { height: 260vh; }
  .specs > div { grid-template-columns: 1fr; gap: 4px; }
  /* the rail would sit on top of full-bleed copy — keep only the progress line */
  .rail { padding-right: 0; gap: 0; }
  .rail-item { display: none; }
  .rail-line { top: -22vh; bottom: -22vh; }
  .outro { justify-content: flex-start; }
  .foot { margin-top: clamp(56px, 10vh, 96px); }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .boot-mark, .cue-line::after { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ── wall / signal form (致意) ───────────────────────────────────────────── */

.wall-block {
  margin-top: clamp(40px, 5vw, 72px);
  max-width: 56ch;
}

.wall-eyebrow { margin-bottom: clamp(18px, 2vw, 28px); }

.signal-form {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
  padding-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--hair);
}

.sf-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dimmer);
  margin-top: 6px;
}

.sf-input {
  appearance: none;
  background: rgba(244, 241, 238, 0.03);
  border: 1px solid var(--hair);
  border-radius: 2px;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.35s var(--ease);
}

.sf-input::placeholder { color: var(--dimmer); }
.sf-input:focus { border-color: var(--accent); }

.sf-area {
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}

.sf-btn {
  appearance: none;
  margin-top: 8px;
  justify-self: start;
  background: transparent;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--hair);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), gap 0.4s var(--ease);
}

.sf-btn:hover { color: var(--accent); border-color: var(--accent); }

.wall {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.wall > li {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--hair);
  display: grid;
  gap: 8px;
}

.wall blockquote {
  margin: 0;
  font-size: clamp(14px, 1.05vw, 16.5px);
  line-height: 1.65;
  color: var(--fg);
  font-weight: 300;
  quotes: none;
}

.wall cite {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.wall time {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dimmer);
  margin-left: 10px;
}

.ledger a:hover { color: var(--accent); }
.nogpu a { color: var(--accent); border-bottom: 1px solid rgba(255,122,47,0.35); }

/* ═══════════════════════════════════════════════════════════════════════════
   PAI OATH — content blocks reskinned onto the EVENT HORIZON visual system
   ═══════════════════════════════════════════════════════════════════════════ */

/* account cluster (replaces the old profile dropdown) */
.account { display: inline-flex; align-items: center; gap: 14px; }
.account .pai { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); }
.account .pai b { color: var(--accent); font-weight: 400; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg);
  padding: 9px 16px; border: 1px solid var(--hair); border-radius: 100px;
  transition: color .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.btn:hover { color: var(--accent); border-color: var(--accent); }
.btn--solid { background: var(--accent); color: #000; border-color: var(--accent); }
.btn--solid:hover { background: #ff8c4d; color: #000; border-color: #ff8c4d; }
.chrome .btn { mix-blend-mode: normal; }

/* ── 账号弹窗 ───────────────────────────────────────────────────────────── */
.authmask {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  padding: var(--pad);
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(7px);
}
.authmask.is-open { display: flex; }
.authmodal {
  position: relative;
  width: min(420px, 100%);
  background: #0a0a0a;
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.6);
  font-family: var(--f-mono);
  animation: authIn 0.38s var(--ease);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.auth-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: transparent; border: 1px solid var(--hair);
  color: var(--dim); font-size: 17px; line-height: 1; cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.auth-close:hover { color: var(--fg); border-color: var(--dim); }
.auth-title {
  margin: 0 0 18px; font-size: 15px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-tab {
  flex: 1; padding: 9px 0; cursor: pointer;
  background: transparent; border: 1px solid var(--hair); border-radius: 9px;
  color: var(--dim); font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.auth-tab.is-on { color: #000; background: var(--accent); border-color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field > span {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
}
.auth-field input {
  background: #000; border: 1px solid var(--hair); border-radius: 9px;
  padding: 12px 13px; color: var(--fg); font-family: var(--f-mono); font-size: 14px;
  outline: none; transition: border-color 0.3s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-err { margin: 0; color: #ff6b6b; font-size: 12px; letter-spacing: 0.03em; }
.auth-submit { margin-top: 4px; padding: 13px; font-size: 12px; letter-spacing: 0.16em; cursor: pointer; }
.auth-submit:disabled { opacity: 0.5; cursor: default; }
.auth-switch { margin: 2px 0 0; text-align: center; font-size: 11px; }
.auth-switch a { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-switch a:hover { color: var(--accent); }
.user-name { color: var(--fg); margin-right: 4px; }

/* compose box */
.compose {
  margin-top: clamp(26px, 3vw, 42px); max-width: 52ch;
  border: 1px solid var(--hair); border-radius: 16px;
  padding: 16px 18px 14px; background: rgba(0,0,0,0.30);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.compose .who {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dimmer); margin-bottom: 12px;
}
.compose .who .avatar {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hair);
  display: grid; place-items: center; font-size: 12px;
}
.compose textarea {
  width: 100%; background: transparent; border: none; resize: none;
  color: var(--fg); font-family: var(--f-display);
  font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6; outline: none;
}
.compose textarea::placeholder { color: var(--dimmer); }
.compose .bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dimmer);
}
.compose .bar .right { display: inline-flex; align-items: center; gap: 16px; }
.compose .bar .count.limit { color: var(--accent); }

/* ── 发送纸条的神秘反馈特效 ──────────────────────────────────────────────────
   光环涟漪 + 上飘光尘 + 若隐若现的低语。固定定位、不拦截指针、自清理。 */
.send-fx {
  position: fixed; left: 0; top: 0; width: 0; height: 0;
  pointer-events: none; z-index: 60; will-change: transform;
}
.send-fx__ripple {
  position: absolute; left: 0; top: 0; width: 130px; height: 130px;
  margin: -65px 0 0 -65px; border-radius: 50%;
  border: 2px solid rgba(255, 122, 47, 0.85);
  background: radial-gradient(circle, rgba(255, 122, 47, 0.32), rgba(255, 122, 47, 0) 70%);
  box-shadow: 0 0 40px rgba(255, 122, 47, 0.6);
}
.send-fx__dust {
  position: absolute; left: 0; top: 0; width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 205, 155, 0.95) 42%, rgba(255, 122, 47, 0) 78%);
  box-shadow: 0 0 14px rgba(255, 220, 180, 1); opacity: 0;
}
.send-fx__whisper {
  position: absolute; left: 0; top: 0;
  white-space: nowrap; font-family: var(--f-mono);
  font-size: 13px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--fg); font-weight: 600;
  text-shadow: 0 0 14px rgba(255, 122, 47, 0.9), 0 0 34px rgba(255, 122, 47, 0.55);
  opacity: 0;
}

/* 发送后整框脉冲发光，强化「已发出」的确认感 */
.compose.is-sent { animation: sentPulse 1.2s var(--ease); }
@keyframes sentPulse {
  0%   { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 38px rgba(255, 122, 47, 0.55); transform: translateY(-3px); }
  55%  { border-color: rgba(255, 122, 47, 0.6);  box-shadow: 0 0 26px rgba(255, 122, 47, 0.35); }
  100% { border-color: var(--hair); box-shadow: none; transform: none; }
}

/* feed filters */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(22px, 2.6vw, 34px);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}
.tabs button {
  padding: 8px 13px; border: 1px solid var(--hair); border-radius: 100px;
  color: var(--dim); transition: color .35s var(--ease), border-color .35s var(--ease);
}
.tabs button:hover { color: var(--fg); }
.tabs button.is-on { color: #000; background: var(--accent); border-color: var(--accent); }

/* post cards */
.feed { margin-top: clamp(22px, 2.6vw, 34px); display: grid; gap: 12px; max-width: 56ch; }
.post {
  border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px;
  background: rgba(0,0,0,0.26); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.post .meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 9px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dimmer);
}
.post .meta .avatar {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--hair);
  display: grid; place-items: center; font-size: 11px;
}
.post .meta .hug { margin-left: auto; color: var(--accent); }
.post p { font-size: clamp(14px, 1vw, 16px); line-height: 1.62; color: var(--fg); opacity: 0.9; }

/* wallet specs + actions */
.specs > div { grid-template-columns: 1fr auto; }
.specs dd { text-align: right; }
.actions { margin-top: clamp(22px, 2.6vw, 34px); display: flex; gap: 12px; flex-wrap: wrap; }

/* tree-hole duty roster */
.roster { margin-top: clamp(24px, 2.8vw, 40px); display: grid; gap: 0; max-width: 50ch; }
.roster .row {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.roster .row .day { color: var(--dimmer); }
.roster .row .ai { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); }
.roster .row .ai .emoji { font-size: 14px; }
.roster .row .task { color: var(--dim); text-transform: none; letter-spacing: 0; font-size: 12px; }
.roster .row.is-today { background: linear-gradient(90deg, rgba(255,122,47,0.16), transparent 70%); }
.roster .row.is-today .day { color: var(--accent); }

/* invite copy link */
.invite { margin-top: clamp(24px, 2.8vw, 40px); display: flex; gap: 10px; max-width: 46ch; }
.invite input {
  flex: 1; background: rgba(0,0,0,0.30); border: 1px solid var(--hair);
  border-radius: 100px; padding: 10px 16px; color: var(--dim);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; outline: none;
}

/* chapter pacing for 5 stacked sections */
.chapter { height: 210vh; }
#sc0 { height: 210vh; }

/* ── 01 写纸条：左列“最近的人类留言” ──────────────────────────────────────── */
.panel--split {
  grid-template-columns: minmax(240px, 0.85fr) 1.15fr;
  gap: clamp(26px, 4vw, 72px);
  align-items: stretch;
}
.panel--split .notes-rail { grid-area: 1 / 1; }
.panel--split .stage { grid-area: 1 / 2; max-width: none; }

.notes-rail {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 560px);
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}
.notes-rail-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.notes-rail-title { font-weight: 400; margin: 0; }
.notes-list {
  list-style: none;
  margin: 0;
  padding: 6px 16px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
}
.notes-list li { padding: 11px 0; border-bottom: 1px solid var(--hair); }
.notes-list li:last-child { border-bottom: none; }
.notes-list .nm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.notes-list .nm .av {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  display: grid; place-items: center;
  font-size: 10px;
  flex: none;
}
.notes-list .nm time { margin-left: auto; color: var(--dimmer); letter-spacing: 0.1em; }
.notes-list .tx {
  margin: 0;
  font-size: clamp(13.5px, 0.98vw, 15.5px);
  line-height: 1.58;
  color: var(--fg);
  opacity: 0.9;
  word-break: break-word;
}
.notes-empty {
  margin: 0;
  padding: 22px 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dimmer);
}

@media (max-width: 900px) {
  .panel--split { grid-template-columns: 1fr; gap: clamp(18px, 3vw, 28px); }
  .panel--split .notes-rail { grid-area: auto; max-height: clamp(160px, 30vh, 240px); }
  .panel--split .stage { grid-area: auto; }
}

@media (max-width: 640px) {
  .account .pai { display: none; }
  .compose, .feed, .specs, .roster, .invite { max-width: none; }
}
