/* ===== 柠檬的奇思妙想 · 星空门户 ===== */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden 属性优先：防止 display:flex 等样式覆盖导致该藏的面板常显 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body.night {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% -10%, #101a30 0%, #0a0f1e 45%, #05070d 100%);
  color: #e8ecf4;
  min-height: 100vh;
  overflow: hidden;
}

/* ---- 星空 ---- */
#sky { position: fixed; inset: 0; z-index: 0; }

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--d, 3s) ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .12; }
  50%      { opacity: .85; }
}

.firefly {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d8ffa6;
  box-shadow: 0 0 14px 5px rgba(196, 255, 150, .38);
  opacity: 0;
  animation: drift var(--d, 12s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes drift {
  0%   { transform: translate(0, 0); opacity: 0; }
  18%  { opacity: .9; }
  50%  { transform: translate(var(--dx, 40px), var(--dy, -30px)); opacity: .3; }
  82%  { opacity: .8; }
  100% { transform: translate(calc(var(--dx, 40px) * .35), calc(var(--dy, -30px) * 1.5)); opacity: 0; }
}

/* ---- 登录框 ---- */
.login-box {
  position: relative;
  z-index: 1;
  width: min(420px, 88vw);
  margin: 24vh auto 0;
  text-align: center;
}

.login-box h1 {
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 700;
  letter-spacing: .05em;
  color: #f4f7ff;
  text-shadow: 0 2px 24px rgba(120, 160, 255, .25);
}

.login-box .sub {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .35em;
  color: #7d8bab;
}

.tagline {
  margin-top: 8px;
  font-size: 13px;
  color: #6c7a99;
}

.login-box input {
  display: block;
  width: 260px;
  margin: 38px auto 0;
  padding: 10px 6px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #2c3a58;
  color: #e8ecf4;
  font-size: 17px;
  text-align: center;
  letter-spacing: .2em;
  outline: none;
  transition: border-color .25s;
}
.login-box input:focus { border-bottom-color: #c4ff96; }
.login-box input::placeholder { color: #55617e; letter-spacing: .1em; }

.login-box button {
  margin-top: 30px;
  padding: 10px 44px;
  background: transparent;
  border: 1px solid #33415f;
  border-radius: 999px;
  color: #aebadb;
  font-size: 15px;
  letter-spacing: .3em;
  text-indent: .3em;
  cursor: pointer;
  transition: all .25s;
}
.login-box button:hover {
  border-color: #c4ff96;
  color: #d8ffa6;
  box-shadow: 0 0 18px rgba(196, 255, 150, .18);
}

.err { margin-top: 14px; font-size: 13px; color: #ff8a8a; }

.shake { animation: shake .4s; border-bottom-color: #ff8a8a !important; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* ---- 页脚（登录页） ---- */
.foot {
  position: fixed;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  z-index: 1;
}
.foot a { color: #55617e; text-decoration: none; }
.foot a:hover { color: #7d8bab; }

/* ================= 空间页 · 左右分屏 ================= */

body.space {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #101a30 0%, #0a0f1e 55%, #070b14 100%);
  color: #e8ecf4;
  min-height: 100vh;
  overflow: hidden;
}

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
}
.brand .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #FFD84D;
  box-shadow: 0 0 10px rgba(255, 216, 77, .55);
}

.logout {
  color: #7d8bab;
  font-size: 13px;
  text-decoration: none;
  padding: 5px 14px;
  border: 1px solid #2c3a58;
  border-radius: 999px;
  transition: all .2s;
}
.logout:hover { color: #d8ffa6; border-color: #3a4c72; }

/* ---- 分屏 ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
}

.pane {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 24px 80px;
  transition: filter .35s ease;
}

.pane-hollow {
  background: radial-gradient(ellipse at 50% 46%, rgba(196, 255, 150, .05) 0%, rgba(0, 0, 0, 0) 58%), #0a0f1e;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.pane-forest {
  background: radial-gradient(ellipse at 50% 46%, rgba(255, 216, 77, .04) 0%, rgba(0, 0, 0, 0) 58%), #0b1220;
}

.split:has(.pane-hollow:hover) .pane-forest,
.split:has(.pane-forest:hover) .pane-hollow { filter: brightness(.55); }

.pane:hover { filter: brightness(1.18); }

.scene { width: min(72%, 40vh); }
.scene svg { width: 100%; height: auto; display: block; }

.pane-info { text-align: center; margin-top: 4px; }
.pane-info h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 600;
  letter-spacing: .16em;
  text-indent: .16em;
}
.pane-info p { margin-top: 8px; font-size: 13.5px; color: #8fa0c4; }

.pill {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(196, 255, 150, .1);
  color: #c4ff96;
  border: 1px solid rgba(196, 255, 150, .25);
}

/* ---- 无障碍与窄屏 ---- */
@media (prefers-reduced-motion: reduce) {
  .star, .firefly { animation: none; opacity: .35; }
  .pane, .logout, .login-box button, .login-box input { transition: none; }
}
@media (max-height: 560px) {
  .login-box { margin-top: 12vh; }
}
@media (max-width: 480px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .pane-hollow { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .scene { width: min(58%, 26vh); }
  body.space { overflow: auto; }
}

/* ================= 萤火信箱 ================= */

body.write, body.mailbox {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #101a30 0%, #0a0f1e 55%, #070b14 100%);
  color: #e8ecf4;
  min-height: 100vh;
}

.write-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 11px 30px;
  border-radius: 999px;
  border: 1px solid rgba(196, 255, 150, .4);
  color: #c4ff96;
  font-size: 14.5px;
  letter-spacing: .1em;
  text-decoration: none;
  transition: all .25s;
}
.write-btn svg { width: 17px; height: 17px; }
.write-btn:hover {
  border-color: #c4ff96;
  box-shadow: 0 0 20px rgba(196, 255, 150, .22);
  background: rgba(196, 255, 150, .06);
}

.write .page, .mailbox .page { max-width: 560px; margin: 0 auto; padding: 34px 18px 70px; }

.mini-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: #8fa0c4; margin-bottom: 22px;
}
.mini-brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #FFD84D; box-shadow: 0 0 8px rgba(255, 216, 77, .55);
}
.mini-brand .logout { margin-left: auto; }

/* ---- 信纸 ---- */
.handwriting {
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.paper .from, .paper textarea {
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.paper {
  background: linear-gradient(170deg, #faf4e2 0%, #f1e9cf 100%);
  color: #3a3222; border-radius: 16px; padding: 26px 24px 24px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 216, 77, .12);
}
.paper h1 { font-size: 21px; font-weight: 700; text-align: center; letter-spacing: .08em; }
.paper .paper-sub { text-align: center; font-size: 12px; color: #8b8064; margin-top: 7px; }

.paper .from {
  width: 100%; margin-top: 20px; padding: 9px 4px;
  background: transparent; border: none; border-bottom: 1px dashed #c9bd97;
  font-size: 14px; color: #3a3222; outline: none;
}
.paper .from::placeholder { color: #6f6440; }
.paper .from { color: #3a3222; }

.paper textarea {
  width: 100%; min-height: 180px; margin-top: 14px; padding: 4px 4px 12px;
  border: none; font-size: 16px; line-height: 32px; color: #3a3222;
  resize: vertical; outline: none; font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
  background-image: linear-gradient(
    transparent 28px,
    rgba(150, 136, 96, .4) 28px, rgba(150, 136, 96, .4) 29px,
    transparent 29px);
  background-size: 100% 32px;
  background-attachment: local;
  background-origin: content-box;
  background-repeat: repeat;
}
.paper textarea::placeholder { color: #6f6440; }

.attach { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.attach button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer; font-size: 13px;
  background: rgba(58, 50, 34, .05); border: 1px solid #c9bd97; color: #5a4f33;
}
.attach button:hover { background: rgba(58, 50, 34, .09); }
.attach svg { width: 15px; height: 15px; }
.attach button.rec-on { border-color: #d96a4a; color: #b8482a; background: rgba(217, 106, 74, .08); }

.audio-preview { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.audio-preview audio { width: 100%; height: 36px; }
.audio-preview .re-rec {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  background: transparent; border: 1px solid #c9bd97; color: #5a4f33;
}

.paper .msg { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #b8482a; text-align: center; }

.paper .send {
  display: block; margin: 16px auto 0; padding: 11px 52px;
  border-radius: 999px; cursor: pointer; font-size: 15px; letter-spacing: .4em; text-indent: .4em;
  background: #3a3222; color: #faf4e2; border: none;
  box-shadow: 0 4px 18px rgba(58, 50, 34, .35);
}
.paper .send:disabled { opacity: .6; cursor: default; }

.paper-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #a39877;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}

.hint { text-align: center; font-size: 12px; color: #55617e; margin-top: 16px; }

/* ---- 寄出成功 ---- */
.sent { text-align: center; padding-top: 8vh; }
.sent-sky { position: relative; height: 130px; }
.sent-sky .orb {
  position: absolute; left: 12%; bottom: 14%;
  width: 10px; height: 10px; border-radius: 50%;
  background: #d8ffa6; box-shadow: 0 0 16px 6px rgba(196, 255, 150, .5);
  animation: flyaway 1.8s ease-in forwards;
}
@keyframes flyaway {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  80%  { opacity: .9; }
  100% { transform: translate(52vw, -34vh) scale(.35); opacity: .15; }
}
.sent-line { font-size: 18px; letter-spacing: .08em; color: #f4f7ff; }
.sent-sub { margin-top: 10px; font-size: 13px; color: #7d8bab; }
.sent .again {
  display: inline-block; margin-top: 26px; padding: 8px 26px;
  border: 1px solid #33415f; border-radius: 999px;
  color: #aebadb; font-size: 13px; text-decoration: none; transition: all .25s;
}
.sent .again:hover { border-color: #c4ff96; color: #d8ffa6; }

/* ---- 信箱页 ---- */
.mailbox .mini-brand { margin-bottom: 12px; }
.mb-head { text-align: center; margin: 4px 0 24px; }
.mb-head h1 { font-size: 26px; letter-spacing: .3em; text-indent: .3em; }
.mb-head p { font-size: 13px; color: #8fa0c4; margin-top: 8px; }
.mb-head b { color: #d8ffa6; }

.letter {
  background: #121a2c; border: 1px solid #1d2942; border-radius: 14px;
  padding: 18px 18px 16px; margin-bottom: 14px;
}
.letter.unread { border-color: rgba(196, 255, 150, .35); box-shadow: 0 0 22px rgba(196, 255, 150, .1); }
.l-head { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.l-head .fly {
  width: 7px; height: 7px; border-radius: 50%; background: #d8ffa6;
  box-shadow: 0 0 8px 2px rgba(196, 255, 150, .5); flex: none;
}
.l-head b { color: #f4f7ff; font-weight: 600; }
.l-head time { margin-left: auto; color: #55617e; font-size: 12px; }
.l-body { margin-top: 11px; font-size: 15px; line-height: 1.9; color: #c7d2e8; white-space: pre-wrap; word-break: break-word; font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif; }
.l-img { display: block; margin-top: 12px; max-width: 100%; max-height: 320px; border-radius: 10px; }
.l-voice { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.l-voice audio { width: 100%; height: 36px; }
.l-voice .dur { font-size: 12px; color: #7d8bab; flex: none; }

.empty { text-align: center; padding: 40px 10px; color: #8fa0c4; font-size: 14px; line-height: 2; }
.empty b { color: #d8ffa6; }

/* ---- 空间页信箱入口 ---- */
.mailbox-btn {
  position: fixed; right: 22px; bottom: 40px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(18, 26, 44, .85); border: 1px solid #2c3a58;
  color: #c7d2e8; font-size: 13.5px; text-decoration: none;
  backdrop-filter: blur(6px); transition: all .25s;
}
.mailbox-btn:hover { border-color: #c4ff96; color: #d8ffa6; }
.mailbox-btn svg { width: 16px; height: 16px; }
.mb-count {
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #FFD84D; color: #4a3b00;
  font-size: 11px; font-weight: 700;
}

/* ================= 柠檬的树洞（Web 版） ================= */

a.pane { text-decoration: none; }

body.holepage {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #101a30 0%, #0a0f1e 55%, #070b14 100%);
  color: #e8ecf4;
  min-height: 100vh;
}

.hole-wrap { max-width: 720px; margin: 0 auto; padding: 30px 18px 70px; }

.hole-write {
  background: #121a2c; border: 1px solid #1d2942; border-radius: 16px;
  padding: 18px; transition: border-color .25s;
}
.hole-write:focus-within { border-color: #33436a; }
.hole-write textarea {
  width: 100%; min-height: 96px; border: none; resize: vertical; outline: none;
  background: transparent; color: #e8ecf4;
  font-size: 16px; line-height: 1.8; font-family: inherit;
}
.hole-write textarea::placeholder { color: #55617e; }
.hole-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.hole-actions .tip { font-size: 12px; color: #55617e; }
.hole-actions button {
  padding: 9px 30px; border-radius: 999px; cursor: pointer;
  background: rgba(196, 255, 150, .12); border: 1px solid rgba(196, 255, 150, .4);
  color: #d8ffa6; font-size: 14px; letter-spacing: .2em; text-indent: .2em;
  transition: all .25s;
}
.hole-actions button:hover { background: rgba(196, 255, 150, .2); }
.hole-actions button:disabled { opacity: .5; cursor: default; }

.hole-filter { margin: 22px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.hole-filter input {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  background: #121a2c; border: 1px solid #1d2942; color: #e8ecf4;
  font-size: 14px; outline: none; font-family: inherit;
}
.hole-filter input:focus { border-color: #33436a; }
.hole-filter input::placeholder { color: #55617e; }

.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pills button {
  padding: 5px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
  transition: all .2s;
}
.tag-pills button.on { border-color: rgba(196, 255, 150, .45); color: #d8ffa6; background: rgba(196, 255, 150, .08); }

.hole-feed { columns: 2; column-gap: 14px; }
@media (max-width: 640px) { .hole-feed { columns: 1; } }

.hole-card {
  break-inside: avoid; position: relative;
  background: #121a2c; border: 1px solid #1d2942; border-radius: 14px;
  padding: 16px 16px 12px; margin-bottom: 14px;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.hole-card .n-body { font-size: 15px; line-height: 1.9; color: #dce4f2; word-break: break-word; }
.hole-card time { display: block; margin-top: 8px; font-size: 11.5px; color: #55617e; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.hole-card .n-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.hole-card .n-tag {
  padding: 2px 10px; border-radius: 999px; cursor: pointer; font-size: 11.5px;
  background: rgba(196, 255, 150, .08); border: 1px solid rgba(196, 255, 150, .22); color: #c4ff96;
}
.hole-card .n-tag:hover { background: rgba(196, 255, 150, .16); }
.hole-card .n-del {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  background: transparent; border: none; color: #3d4b6e; font-size: 15px; line-height: 1;
  transition: all .2s;
}
.hole-card:hover .n-del { color: #7d8bab; }
.hole-card .n-del:hover { color: #ff8a8a; background: rgba(255, 138, 138, .08); }

.hole-card .n-ops {
  position: absolute; top: 10px; right: 12px;
  display: none; gap: 6px; align-items: center;
}
.hole-card:hover .n-ops { display: inline-flex; }
.hole-card .n-edit-btn {
  padding: 2px 10px; border-radius: 999px; cursor: pointer; font-size: 11.5px;
  background: transparent; border: 1px solid #2c3a58; color: #7d8bab; transition: all .2s;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.hole-card .n-edit-btn:hover { color: #d8ffa6; border-color: rgba(196, 255, 150, .4); }

/* 编辑态 */
.hole-card .n-edit textarea {
  width: 100%; min-height: 110px; border: 1px solid #2c3a58; border-radius: 10px;
  background: #0d1424; color: #e8ecf4; padding: 10px 12px;
  font-size: 15px; line-height: 1.8; outline: none; resize: vertical; font-family: inherit;
}
.hole-card .n-edit textarea:focus { border-color: #33436a; }
.hole-card .edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.hole-card .edit-actions button {
  padding: 6px 18px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
}
.hole-card .edit-actions .e-save {
  background: rgba(196, 255, 150, .12); border-color: rgba(196, 255, 150, .4); color: #d8ffa6;
}

/* Markdown 渲染样式（深色卡片内） */
.hole-card .n-body.md h1, .hole-card .n-body.md h2, .hole-card .n-body.md h3,
.hole-card .n-body.md h4 { margin: 10px 0 6px; line-height: 1.5; color: #f4f7ff; }
.hole-card .n-body.md h1 { font-size: 19px; }
.hole-card .n-body.md h2 { font-size: 17.5px; }
.hole-card .n-body.md h3, .hole-card .n-body.md h4 { font-size: 16px; }
.hole-card .n-body.md p { margin: 4px 0; }
.hole-card .n-body.md ul, .hole-card .n-body.md ol { margin: 6px 0; padding-left: 24px; }
.hole-card .n-body.md li { margin: 3px 0; }
.hole-card .n-body.md blockquote {
  margin: 8px 0; padding: 4px 14px; border-left: 3px solid #33436a;
  color: #8fa0c4; background: rgba(51, 67, 106, .12); border-radius: 0 8px 8px 0;
}
.hole-card .n-body.md code {
  background: #0d1424; padding: 1px 6px; border-radius: 5px;
  font-size: 13px; font-family: Consolas, monospace; color: #c4ff96;
}
.hole-card .n-body.md pre {
  background: #0d1424; padding: 12px 14px; border-radius: 10px;
  overflow-x: auto; margin: 8px 0; border: 1px solid #1d2942;
}
.hole-card .n-body.md pre code { background: transparent; padding: 0; color: #dce4f2; }
.hole-card .n-body.md a { color: #c4ff96; }
.hole-card .n-body.md strong { color: #fff; }
.hole-card .n-body.md hr { border: none; border-top: 1px solid #1d2942; margin: 12px 0; }
.hole-card .n-body.md img { max-width: 100%; border-radius: 8px; }
.hole-card .n-body.md table { border-collapse: collapse; margin: 8px 0; font-size: 13.5px; }
.hole-card .n-body.md th, .hole-card .n-body.md td {
  border: 1px solid #1d2942; padding: 5px 10px; text-align: left;
}

.hole-empty { text-align: center; color: #6c7a99; font-size: 14px; padding: 40px 0; }
.hole-more {
  display: block; margin: 6px auto 0; padding: 9px 40px;
  border-radius: 999px; cursor: pointer; font-size: 13.5px; letter-spacing: .3em; text-indent: .3em;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4; transition: all .2s;
}
.hole-more:hover { border-color: #c4ff96; color: #d8ffa6; }

/* ================= 柠檬的知识森林（Web 版） ================= */

body.forestpage {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #101a30 0%, #0a0f1e 55%, #070b14 100%);
  color: #e8ecf4;
  min-height: 100vh;
  overflow: hidden;
}

.forest-brand {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  margin: 0; padding: 12px 20px;
  background: rgba(7, 11, 20, .85); border-bottom: 1px solid #1d2942;
  backdrop-filter: blur(6px);
}

.forest-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  padding-top: 54px;
}
@media (max-width: 760px) {
  body.forestpage { overflow: auto; }
  .forest-layout { grid-template-columns: 1fr; height: auto; }
  .f-tree { max-height: 44vh; }
}

/* 左：知识树 */
.f-tree {
  border-right: 1px solid #1d2942;
  display: flex; flex-direction: column;
  background: rgba(16, 26, 40, .5);
}
.f-tree-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 14px; color: #8fa0c4; letter-spacing: .1em;
}
.f-tree-head button {
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  background: rgba(46, 174, 95, .12); border: 1px solid rgba(46, 174, 95, .45); color: #7fe0a0;
  transition: all .2s;
}
.f-tree-head button:hover { background: rgba(46, 174, 95, .22); }

.f-tree-head select {
  flex: 1; min-width: 0; padding: 6px 10px; border-radius: 9px;
  background: #121a2c; border: 1px solid #2c3a58; color: #e8ecf4;
  font-size: 13.5px; outline: none; cursor: pointer;
}

.f-tree-tools {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 12px;
}
.f-tree-tools button {
  padding: 5px 11px; border-radius: 9px; cursor: pointer; font-size: 12px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4; transition: all .2s;
}
.f-tree-tools button:hover { color: #7fe0a0; border-color: rgba(46, 174, 95, .5); }
.f-tree-tools #add-root { border-color: rgba(46, 174, 95, .45); color: #7fe0a0; background: rgba(46, 174, 95, .1); }

/* 回收站面板（森林 + 树洞共用） */
.f-trash-mask {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(3, 5, 10, .7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.f-trash {
  width: min(560px, 94vw); max-height: 70vh;
  background: #121a2c; border: 1px solid #2c3a58; border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
}
.f-trash-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid #1d2942;
}
.f-trash-head span { display: flex; gap: 8px; }
.f-trash-head button {
  padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 12px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
}
.f-trash-head button:hover { color: #d8ffa6; border-color: #3a4c72; }
.f-trash-list { overflow-y: auto; padding: 10px 14px 16px; }
.tr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 8px;
  background: #0e1526; border: 1px solid #1d2942;
}
.tr-title {
  flex: 1; min-width: 0; font-size: 13.5px; color: #c7d2e8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tr-meta { flex: none; font-size: 11.5px; color: #55617e; }
.tr-ops { display: flex; gap: 6px; flex: none; }
.tr-ops button {
  padding: 4px 11px; border-radius: 999px; cursor: pointer; font-size: 11.5px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
}
.tr-ops .tr-restore { color: #7fe0a0; border-color: rgba(46, 174, 95, .45); }
.tr-ops button:hover { color: #d8ffa6; }
.tr-ops .tr-purge:hover { color: #ff8a8a; border-color: rgba(255, 138, 138, .5); }
.tr-empty { text-align: center; color: #6c7a99; font-size: 13px; padding: 24px 0; }

.f-tree-body { flex: 1; overflow-y: auto; padding: 4px 10px 20px; }
.f-tree-body ul { list-style: none; margin: 0; padding-left: 0; }
.f-tree-body ul ul { padding-left: 18px; }

.f-tree-body .t-row {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px; border-radius: 9px; cursor: pointer;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
  transition: background .15s;
}
.f-tree-body .t-row:hover { background: rgba(46, 174, 95, .08); }
.f-tree-body .t-row.sel { background: rgba(46, 174, 95, .16); }
.f-tree-body .t-row.sel .t-title { color: #7fe0a0; }

.f-tree-body .t-caret {
  flex: none; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #55617e; cursor: pointer; font-size: 12px;
}
.f-tree-body .t-caret.t-leaf { cursor: default; font-size: 9px; }
.f-tree-body .t-title {
  flex: 1; font-size: 14.5px; color: #dce4f2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.f-tree-body .t-ops { display: none; gap: 4px; }
.f-tree-body .t-row:hover .t-ops { display: inline-flex; }
.f-tree-body .t-ops button {
  padding: 1px 7px; border-radius: 7px; cursor: pointer; font-size: 11px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
}
.f-tree-body .t-ops button:hover { color: #7fe0a0; border-color: rgba(46, 174, 95, .5); }
.f-tree-body .t-ops .t-del:hover { color: #ff8a8a; border-color: rgba(255, 138, 138, .5); }

.f-tree-empty { text-align: center; color: #6c7a99; font-size: 13px; padding: 24px 12px; }

/* 右：节点内容 */
.f-content { overflow-y: auto; padding: 26px 30px 60px; }
@media (max-width: 760px) { .f-content { padding: 20px 16px 50px; } }

.f-none { text-align: center; margin-top: 22vh; color: #6c7a99; font-size: 15px; line-height: 2.2; }

#n-title {
  width: 100%; padding: 10px 2px; background: transparent; border: none;
  border-bottom: 1px solid #1d2942; outline: none;
  color: #f4f7ff; font-size: 24px; font-weight: 700; letter-spacing: .04em;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
#n-title:focus { border-bottom-color: rgba(46, 174, 95, .5); }

.f-tabs { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; }
.f-tabs button {
  padding: 5px 16px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4; transition: all .2s;
}
.f-tabs button.on { border-color: rgba(46, 174, 95, .5); color: #7fe0a0; background: rgba(46, 174, 95, .1); }
.f-save-state { margin-left: auto; font-size: 12px; color: #55617e; }

#n-content {
  width: 100%; min-height: 52vh; padding: 14px 4px;
  background: transparent; border: none; outline: none; resize: vertical;
  color: #dce4f2; font-size: 16px; line-height: 1.9;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}

.f-view {
  min-height: 52vh; padding: 6px 4px;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 16px; line-height: 1.9; color: #dce4f2;
}
.f-view h1, .f-view h2, .f-view h3, .f-view h4 { color: #f4f7ff; margin: 16px 0 8px; line-height: 1.5; }
.f-view h1 { font-size: 22px; } .f-view h2 { font-size: 19px; } .f-view h3, .f-view h4 { font-size: 17px; }
.f-view p { margin: 6px 0; }
.f-view ul, .f-view ol { margin: 8px 0; padding-left: 26px; }
.f-view li { margin: 4px 0; }
.f-view blockquote {
  margin: 10px 0; padding: 6px 16px; border-left: 3px solid rgba(46, 174, 95, .5);
  color: #9fb2d9; background: rgba(46, 174, 95, .07); border-radius: 0 10px 10px 0;
}
.f-view code {
  background: #0d1424; padding: 1px 6px; border-radius: 5px;
  font-size: 13.5px; font-family: Consolas, monospace; color: #7fe0a0;
}
.f-view pre {
  background: #0d1424; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; margin: 10px 0; border: 1px solid #1d2942;
}
.f-view pre code { background: transparent; padding: 0; color: #dce4f2; }
.f-view a { color: #7fe0a0; }
.f-view strong { color: #fff; }
.f-view hr { border: none; border-top: 1px solid #1d2942; margin: 14px 0; }
.f-view img { max-width: 100%; border-radius: 8px; }
.f-view table { border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.f-view th, .f-view td { border: 1px solid #1d2942; padding: 6px 12px; text-align: left; }

/* ================= 知识森林 v2.1 思维导图画布 ================= */

body.fmp-page { overflow: hidden; }

.fmp-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.fmp-tools button, .fmp-tools select {
  padding: 4px 11px; border-radius: 8px; cursor: pointer; font-size: 11.5px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4; outline: none;
}
.fmp-tools button:hover { color: #dce4f2; border-color: #3a4c72; }
.fmp-tools button.hl { color: #7fe0a0; border-color: rgba(46, 174, 95, .5); background: rgba(46, 174, 95, .08); }
.fmp-tools select { color: #e8ecf4; background: #121a2c; }
.forest-brand .logout { margin-left: 0; }

.fmp-canvas {
  position: fixed; inset: 44px 0 26px 0; overflow: hidden; cursor: grab;
  background: radial-gradient(ellipse at 50% 0%, #101a30 0%, #0a0f1e 55%, #070b14 100%);
}
.fmp-canvas.grabbing { cursor: grabbing; }
.fmp-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fmp-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.fmp-lines path { stroke: #33436a; stroke-width: 2; fill: none; }
.fmp-lines path.fmp-edge {
  stroke: rgba(196, 255, 150, .45); stroke-width: 1.6; stroke-dasharray: 5 4;
}

#edge-labels { position: absolute; left: 0; top: 0; }
.fmp-elabel {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  font-size: 10.5px; color: #c4ff96; white-space: nowrap; cursor: pointer;
  background: rgba(196, 255, 150, .08); border: 1px solid rgba(196, 255, 150, .25);
  border-radius: 999px; padding: 1px 8px;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.fmp-elabel:hover { background: rgba(196, 255, 150, .16); color: #e2ffbf; }

#nodes-layer { position: absolute; left: 0; top: 0; }
.fmp-node {
  position: absolute; z-index: 2;
  background: #121a2c; border: 1.5px solid #2c3a58; border-radius: 12px;
  display: flex; align-items: center; padding: 0 12px;
  color: #dce4f2; font-size: 13.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
  user-select: none; cursor: pointer;
}
.fmp-node:hover { border-color: #3a4c72; }
.fmp-node.root { border-color: rgba(255, 216, 77, .55); box-shadow: 0 0 18px rgba(255, 216, 77, .15); font-size: 14.5px; }
.fmp-node.sel { border-color: #2eae5f; box-shadow: 0 0 16px rgba(46, 174, 95, .3); }
.fmp-node-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmp-fold {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: #0d1424; border: 1px solid #2eae5f; color: #7fe0a0;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

.fmp-empty {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  text-align: center; color: #6c7a99; font-size: 15px; line-height: 2.4; pointer-events: none;
}
.fmp-empty b { color: #7fe0a0; }

.fmp-zoom {
  position: absolute; right: 14px; bottom: 12px; z-index: 4;
  font-size: 11px; color: #55617e; background: rgba(13, 20, 36, .8);
  border: 1px solid #1d2942; border-radius: 999px; padding: 3px 10px; pointer-events: none;
}
.fmp-linkmode {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 7;
  font-size: 12.5px; color: #c4ff96; background: rgba(13, 20, 36, .92);
  border: 1px solid rgba(196, 255, 150, .35); border-radius: 999px; padding: 6px 16px;
}
.fmp-linkmode b { color: #e2ffbf; }

.fmp-drawer {
  position: fixed; right: 0; top: 44px; bottom: 26px; width: 330px; z-index: 6;
  background: rgba(14, 21, 38, .96); border-left: 1px solid #1d2942;
  padding: 16px; backdrop-filter: blur(4px);
  display: flex; flex-direction: column;
}
.fmp-drawer-head { display: flex; align-items: center; margin-bottom: 12px; }
.fmp-drawer-head h3 {
  font-size: 15px; color: #7fe0a0; font-weight: 600; margin: 0;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'KaiTi', '楷体', serif;
}
.fmp-drawer-head button {
  margin-left: auto; padding: 2px 10px; border-radius: 8px; cursor: pointer; font-size: 12px;
  background: transparent; border: 1px solid #2c3a58; color: #8fa0c4;
}
.fmp-drawer-head button:hover { color: #dce4f2; border-color: #3a4c72; }
.fmp-drawer input {
  width: 100%; padding: 8px 10px; border-radius: 9px; outline: none;
  background: #0d1424; border: 1px solid #2c3a58; color: #f4f7ff; font-size: 14.5px;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'KaiTi', '楷体', serif;
}
.fmp-drawer .f-tabs { margin: 12px 0 8px; }
.fmp-drawer textarea {
  width: 100%; flex: 1; min-height: 200px; padding: 10px 12px; border-radius: 10px;
  outline: none; resize: none;
  background: #0d1424; border: 1px solid #2c3a58; color: #dce4f2;
  font-size: 14px; line-height: 1.8;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.fmp-drawer #n-view { flex: 1; overflow-y: auto; }

.fmp-menu {
  position: fixed; z-index: 60; min-width: 150px; display: none;
  background: #121a2c; border: 1px solid #2eae5f; border-radius: 12px;
  padding: 6px; box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
}
.fmp-menu.show { display: block; }
.fmp-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 11px; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: #dce4f2; font-size: 13px; text-align: left;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.fmp-menu button:hover { background: rgba(46, 174, 95, .16); color: #7fe0a0; }
.fmp-menu button.danger { color: #e08f8f; }
.fmp-menu button.danger:hover { background: rgba(224, 143, 143, .14); color: #ffb3b3; }
.fmp-menu-sep { height: 1px; background: #1d2942; margin: 5px 8px; }
.fmp-menu-title { padding: 5px 11px 7px; font-size: 11px; color: #55617e; letter-spacing: .1em; }

/* ================= 森林 v2.2 两段式：全景 + 面包屑 + 根角标 ================= */

.fmp-pan {
  position: fixed; inset: 44px 0 26px 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% -10%, #14203c 0%, #0a0f1e 52%, #070b14 100%);
}
.fmp-stars { position: absolute; inset: 0 0 45% 0; }
.fmp-pan-brand {
  position: absolute; top: 34px; left: 0; right: 0; text-align: center; z-index: 3;
  font-size: 15px; color: #8fa0c4; letter-spacing: .22em;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
}
.fmp-pan-brand b { color: #dce4f2; }
.fmp-hills { position: absolute; left: 0; right: 0; bottom: 22%; height: 30%; }
.fmp-hills-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(180deg, rgba(16,26,44,0) 0%, #0c1526 30%, #0a1120 100%);
  border-top: 1px solid #16223c;
}
.fmp-trees-row {
  position: absolute; left: 0; right: 0; bottom: 9%; display: flex;
  justify-content: center; align-items: flex-end; gap: 8vw; z-index: 3;
}
.fmp-tree { cursor: pointer; text-align: center; transition: transform .2s; }
.fmp-tree:hover { transform: translateY(-6px); }
.fmp-tree svg { display: block; margin: 0 auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); }
.fmp-tree:hover .c1 { fill: #1d5c38; }
.fmp-tree:hover .c2 { fill: #226a44; }
.fmp-tree:hover .c3 { fill: #27794f; }
.fmp-tree.fmp-tree-new svg { opacity: .75; }
.fmp-plate {
  margin-top: 10px; display: inline-block; padding: 5px 16px; border-radius: 999px;
  background: rgba(13,20,36,.9); border: 1px solid #2c3a58; font-size: 13px; color: #dce4f2;
  font-family: 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif;
  white-space: nowrap;
}
.fmp-tree:hover .fmp-plate { border-color: rgba(46,174,95,.55); color: #7fe0a0; }
.fmp-plate .meta { font-size: 10.5px; color: #55617e; margin-left: 7px; }
.fmp-pan-hint {
  position: absolute; left: 0; right: 0; bottom: 3.5%; text-align: center;
  font-size: 11.5px; color: #55617e; z-index: 3;
}
.fmp-pan-hint b { color: #7fe0a0; }

.fmp-crumb { display: flex; align-items: center; margin-left: 14px; }
.fmp-crumb a { color: #7fe0a0; cursor: pointer; text-decoration: none; font-size: 12.5px; }
.fmp-crumb a:hover { text-decoration: underline; }
.fmp-crumb-sep { margin: 0 8px; color: #3a4a6e; }
.fmp-crumb b { color: #e8ecf4; font-weight: 600; font-size: 12.5px; }
.fmp-tools { margin-left: auto; }
.forest-brand .fmp-crumb + .fmp-tools { margin-left: auto; }
.forest-brand .fmp-tools + .logout { margin-left: 14px; }

.fmp-node.root {
  border-color: rgba(255, 216, 77, .75); border-width: 2px;
  box-shadow: 0 0 22px rgba(255, 216, 77, .28);
  font-size: 14.5px;
}
.fmp-roottag {
  position: absolute; left: -11px; top: -11px; z-index: 3;
  font-size: 10px; color: #0a1120; background: #FFD84D;
  border-radius: 999px; padding: 1px 8px; font-weight: 700;
}
