/* ============================================================
   留白手帐 LIBAI · main.css
   奶油粉彩主题 · 参考 cocolia.fun 的氛围，原创实现
   ============================================================ */
:root {
  --bg: #fff8f6;
  --bg2: #fffDF7;
  --card: rgba(255, 255, 255, .78);
  --ink: #4a3d45;
  --ink2: #8a7a83;
  --pink: #3fa7e0;
  --pink-soft: #e3f2fd;
  --lav: #a78bfa;
  --lav-soft: #efe9ff;
  --mint: #5fd0b8;
  --mint-soft: #e2f8f2;
  --honey: #ffd45e;
  --line: #f3e4e9;
  --shadow: 0 6px 18px rgba(63, 167, 224, .09);
  --navbg: rgba(255, 250, 248, .85);
  --r: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bfe0f5; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::selection { background: #bfe3ff; color: #1c4a6e; }
:focus-visible { outline: 2.5px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 90% -10%, var(--lav-soft) 0%, transparent 60%),
    radial-gradient(900px 400px at -10% 20%, var(--pink-soft) 0%, transparent 55%),
    radial-gradient(1000px 520px at -8% 92%, rgba(178,236,214,.5) 0%, transparent 58%),
    radial-gradient(1100px 560px at 96% 88%, rgba(226,214,250,.45) 0%, transparent 58%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
h1, h2, h3, .brand, .btn, .tab, .sign { font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif; }
a { color: var(--pink); text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 导航 ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--navbg);
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(120, 150, 180, .06);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; color: var(--ink); }
.brand .logo { width: 38px; height: 38px; }
.brand .en { font-size: 12px; color: var(--ink2); letter-spacing: 2px; margin-left: 2px; }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  padding: 7px 14px; border-radius: 999px; color: var(--ink2);
  font-size: 15px; transition: all .2s;
}
.nav-links a:hover { background: var(--pink-soft); color: var(--pink); }
.nav-links a.on { background: var(--pink); color: #fff; box-shadow: var(--shadow); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 30px; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: center;
}
.kicker {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--lav-soft); color: var(--lav); font-size: 13px; margin-bottom: 14px;
}
.hero h1 { font-size: 44px; line-height: 1.25; margin-bottom: 12px; }
.hero h1 em { font-style: normal; color: var(--pink); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 10px;
  background: var(--honey); opacity: .4; border-radius: 6px; z-index: -1;
}
.sign { color: var(--ink2); font-size: 16px; margin-bottom: 20px; }
.sign .kaomoji { color: var(--pink); }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; font-size: 15px;
  border: none; cursor: pointer; transition: all .2s;
}
.btn-main { background: linear-gradient(135deg, var(--pink), #7cc7f5); color: #fff; box-shadow: var(--shadow); }
.btn-main:hover { transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn-danger { background: #ffecec; color: #e05555; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
  background: var(--card); border: none; border-radius: var(--r);
  padding: 12px 20px; text-align: center; min-width: 92px; box-shadow: var(--shadow);
}
.stat .num { font-size: 26px; font-weight: 900; color: var(--pink); }
.stat .lab { font-size: 12px; color: var(--ink2); }

.mascot-wrap { position: relative; text-align: center; }
.mascot { width: 82%; max-width: 300px; filter: drop-shadow(0 12px 20px rgba(107, 184, 240, .25)); animation: bob 4s ease-in-out infinite; }
.avatar {
  width: 92%; max-width: 340px; cursor: pointer;
  mix-blend-mode: multiply; /* 白底融入浅色背景 = 免抠图贴纸效果 */
  animation: bob 4s ease-in-out infinite;
}
html[data-theme="dark"] .avatar {
  mix-blend-mode: normal;
  border-radius: 50%; /* 暗色下裁成圆形“月光盘” */
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .35);
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
.mascot-name {
  display: inline-block; margin-top: 6px; padding: 5px 16px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1.5px solid #bfe3ff; color: #3b7db8;
  font-size: 14px; font-family: "ZCOOL KuaiLe"; box-shadow: 0 4px 12px rgba(107,184,240,.18);
}
.bubble {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95), rgba(160,215,250,.35));
  border: 1.5px solid rgba(255,255,255,.8); animation: rise 9s linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translateY(-320px) scale(1.15); opacity: 0; }
}
.deco { position: absolute; font-size: 26px; animation: float 3.4s ease-in-out infinite; }
.deco.d1 { top: -6px; left: 6%; animation-delay: 0s; }
.deco.d2 { top: 18%; right: 2%; animation-delay: .6s; }
.deco.d3 { bottom: 6%; left: 0; animation-delay: 1.2s; }
.deco.d4 { bottom: -4px; right: 12%; animation-delay: 1.8s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(5deg); } }

/* ---------- 跑马灯 ---------- */
.marquee {
  overflow: hidden;
  background: var(--bg2); margin: 18px 0 8px;
}
.marquee-track { display: inline-flex; gap: 42px; padding: 10px 0; white-space: nowrap; animation: mq 22s linear infinite; }
.marquee-track span { color: var(--ink2); font-size: 14px; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- 毛玻璃 ---------- */
.site-nav, .stat, .panel, .post-card, .g-item, .article, .admin-panel, .friend-card, .tab, .btn-ghost, .theme-btn, .mascot-name, .mascot-say {
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ---------- 点击水波纹 ---------- */
.ripple {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 98;
  background: radial-gradient(circle, rgba(107,184,240,.4) 0%, rgba(107,184,240,.14) 55%, transparent 70%);
  transform: translate(-50%, -50%); animation: rip .65s ease-out forwards;
}
@keyframes rip { from { width: 0; height: 0; opacity: .85; } to { width: 190px; height: 190px; opacity: 0; } }

/* ---------- 滚动渐入 ---------- */
.js .sec, .js .admin-panel, .js .article { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .sec.in, .js .admin-panel.in, .js .article.in { opacity: 1; transform: none; }

/* ---------- 全局水泡泡背景 ---------- */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .5;
  animation: blobfloat 26s ease-in-out infinite alternate;
}
.bg-blob.b1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(140,205,255,.55), transparent 70%); }
.bg-blob.b2 { width: 40vw; height: 40vw; right: -10vw; top: 22vh; background: radial-gradient(circle, rgba(255,196,222,.42), transparent 70%); animation-delay: -8s; }
.bg-blob.b3 { width: 44vw; height: 44vw; left: 18vw; bottom: -18vw; background: radial-gradient(circle, rgba(168,240,215,.45), transparent 70%); animation-delay: -16s; }
@keyframes blobfloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(4vw, 3vh) scale(1.12); } }
html[data-theme="dark"] .bg-blob { opacity: .16; }
.bg-bubble {
  position: absolute; bottom: -40px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.9), rgba(160,215,250,.22));
  border: 1px solid rgba(255,255,255,.55); opacity: .5;
  animation: bgup linear infinite;
}
@keyframes bgup { to { transform: translateY(-110vh); opacity: 0; } }

/* ---------- 搜索框 / 阅读信息 / 上下篇 ---------- */
.search-box {
  width: 100%; max-width: 420px; display: block; padding: 10px 18px; margin-bottom: 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 14.5px; color: var(--ink); outline: none; font-family: inherit;
  backdrop-filter: blur(10px); transition: border .2s;
}
.search-box:focus { border-color: var(--pink); }
.read-info { color: var(--ink2); font-size: 13px; margin-bottom: 18px; }
.post-read { color: var(--ink2); font-size: 12px; opacity: .85; }
.pn-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.pn {
  flex: 1 1 260px; padding: 12px 16px; border-radius: 12px; background: var(--pink-soft);
  color: #2c6f9e; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all .2s;
}
.pn:hover { transform: translateY(-2px); }
.pn.next { text-align: right; }

/* ---------- 区块 ---------- */
.sec { padding: 34px 0 6px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.sec-head h2 { font-size: 26px; }
.sec-head .en { color: var(--ink2); font-size: 13px; letter-spacing: 2px; }
.sec-head .more { margin-left: auto; font-size: 14px; }
.flower { color: var(--pink); margin-right: 6px; }

/* ---------- 四宫格（2x2 错开）：右列下沉参差 · 倒计时/画作 左列 · 档案/热力 右列 ---------- */
.duo { display: flex; gap: 18px; margin-top: 26px; align-items: stretch; }
.duo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.duo-col-r { margin-top: 26px; }
.cafe-card { display: flex; flex-direction: column; }
.cafe-card .cafe-quote { margin-top: auto; }
.rand-art { padding: 0; flex: 1 1 auto; }
.cafe-cover { margin: -22px -22px 14px; border-radius: var(--r) var(--r) 0 0; overflow: hidden; max-height: 190px; }
.cafe-cover img { width: 100%; height: 190px; object-fit: cover; object-position: center 20%; display: block; }
.cafe-card h3 { display: flex; align-items: baseline; gap: 8px; position: relative; padding-bottom: 9px; margin-bottom: 12px; }
.cafe-card h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--pink), var(--lav)); }
.cafe-en { font-size: 11px; letter-spacing: 2px; color: var(--lav); font-family: sans-serif; }
.cafe-row { display: flex; gap: 10px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.65; }
.cafe-row .cl { flex: 0 0 auto; font-weight: 700; color: var(--pink); }
.cafe-quote { font-size: 14px; color: var(--ink2); border-left: 3px solid var(--pink-soft); padding-left: 10px; margin: 10px 0 12px; }
.cafe-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ctag { padding: 4px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--pink); font-size: 12.5px; }
.ctag-b { background: var(--lav-soft); color: var(--lav); }
.ctag-c { background: #e8f8f0; color: #3aa97c; }
.ctag-d { background: #fdeef4; color: #e0709a; }

/* ---------- 彩叶页 ---------- */
.caiye-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-bottom: 18px; }
.caiye-side { display: flex; flex-direction: column; gap: 18px; }
.caiye-tag { font-size: 14px; color: var(--ink2); margin: 6px 0 4px; }
.caiye-story p { font-size: 14.5px; color: var(--ink); line-height: 1.9; margin-top: 8px; }
.st-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.st-refresh { width: 28px; height: 28px; border: none; border-radius: 999px; background: var(--pink-soft); color: var(--pink); cursor: pointer; font-size: 15px; transition: transform .4s; }
.st-refresh:hover { transform: rotate(180deg); }
.status-row { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.status-row:last-of-type { border-bottom: none; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: 0 0 auto; }
.dot-ok { background: #3aa97c; box-shadow: 0 0 6px rgba(58,169,124,.5); animation: pulse 2s infinite; }
.dot-bad { background: #e0709a; }
.dot-wait { background: #d0c7ce; }
@keyframes pulse { 50% { opacity: .55; } }
.st-info { margin-top: 10px; font-size: 13.5px; color: var(--ink2); line-height: 1.7; }
.st-time { margin-top: 6px; font-size: 12px; color: var(--ink2); opacity: .8; }
@media (max-width: 860px) { .caiye-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .duo { flex-direction: column; } .duo-col-r { margin-top: 0; } }
#randArt { position: relative; height: 100%; min-height: 150px; }
#randArt img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .45s; }
.rand-art:hover #randArt img { transform: scale(1.045); }
.rand-empty { height: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink2); font-size: 14px; }
.rand-btn { position: absolute; top: 10px; right: 12px; z-index: 3; width: 30px; height: 30px; border: none; border-radius: 999px; background: var(--card); cursor: pointer; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .2s; }
.rand-btn:hover { transform: rotate(90deg); }
.panel {
  background: var(--card); border: none; border-radius: var(--r);
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.panel:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(63, 167, 224, .16); }
.duo .cafe-card:hover { box-shadow: 0 10px 26px rgba(63, 167, 224, .16); }
.panel h3 { font-size: 18px; margin-bottom: 10px; }
.panel .corner { position: absolute; top: 10px; right: 14px; color: var(--pink); opacity: .5; font-size: 20px; }
.cd-panel { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; align-content: center; text-align: center; gap: 10px; background: linear-gradient(150deg, var(--pink-soft), var(--card) 48%, var(--lav-soft)); flex: 1 1 auto; }
.cd-name { color: var(--ink2); font-size: 16px; width: 100%; letter-spacing: 1px; }
.cd-num { font-size: 42px; font-weight: 900; color: var(--pink); line-height: 1.2; }
.cd-sub { font-size: 42px; font-weight: 900; color: var(--ink2); font-variant-numeric: tabular-nums; line-height: 1.2; }

/* ---------- 热力图 ---------- */
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.hm-cell { width: 14px; height: 14px; border-radius: 4px; background: var(--pink-soft); transition: transform .15s; }
.hm-cell:hover { transform: scale(1.35); }
#heatmap .hm-cell { cursor: pointer; }
/* 点击反馈：Q 弹 + 气泡迸发 */
#heatmap .hm-cell.pop { animation: hmPop .32s ease; }
@keyframes hmPop { 0% { transform: scale(1); } 40% { transform: scale(1.65); } 100% { transform: scale(1); } }
.hm-bubble { position: fixed; z-index: 899; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95), rgba(174,224,248,.8)); box-shadow: 0 0 6px rgba(174,224,248,.5); animation: hmFloat .75s ease-out forwards; }
@keyframes hmFloat { to { transform: translate(var(--dx, 0px), var(--dy, -14px)) scale(.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #heatmap .hm-cell.pop, .hm-bubble { animation: none; } }
/* 热力图当日弹窗 */
.hm-pop { position: fixed; z-index: 900; max-width: 300px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 14px 16px; animation: hmIn .18s ease; }
@keyframes hmIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.hm-pop h4 { margin: 0 0 2px; font-size: 14px; color: var(--ink); }
.hm-pop .hm-date { font-size: 12px; color: var(--ink2); margin-bottom: 8px; }
.hm-pop a.hm-item { display: block; padding: 6px 8px; margin: 4px -8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.5; transition: background .15s; }
.hm-pop a.hm-item:hover { background: rgba(174, 224, 248, .25); }
.hm-pop .hm-empty { color: var(--ink2); font-size: 13px; }
.hm-pop .hm-close { position: absolute; top: 6px; right: 10px; border: none; background: none; color: var(--ink2); font-size: 15px; cursor: pointer; padding: 2px 4px; }
.hm-cell.l1 { background: #a8d8f5; } .hm-cell.l2 { background: #6cb8f0; }
.hm-cell.l3 { background: var(--pink); } .hm-cell.l4 { background: #2b7cb8; }
.span2 { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; padding: 16px 18px; flex: 1 0 auto; }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; color: var(--ink2); }
.hm-legend .hm-cell { width: 11px; height: 11px; border-radius: 3px; cursor: default; }
.hm-legend .hm-cell:hover { transform: none; }
.hm-legend span { margin: 0 3px; }

/* ---------- 文章列表 ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 6px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink2); cursor: pointer; font-size: 14px; transition: all .2s;
}
.tab.on, .tab:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.post-list { display: grid; gap: 14px; }
.post-card {
  display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); transition: all .2s;
  text-decoration: none; color: inherit; cursor: pointer;
}
.post-card { border: none; position: relative; overflow: hidden; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(63,167,224,.18); }
.post-bg {
  position: absolute; top: 0; right: 0; width: 40%; height: 100%;
  background-size: cover; background-position: center;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.55), transparent 88%);
  mask-image: linear-gradient(to left, rgba(0,0,0,.55), transparent 88%);
  pointer-events: none;
}
.post-card .grow { position: relative; z-index: 1; }
.post-thumb {
  flex: 0 0 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #fff; font-family: "ZCOOL KuaiLe";
  background: linear-gradient(135deg, var(--pink), var(--lav));
}
.post-meta { font-size: 12.5px; color: var(--ink2); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.post-meta .cat { background: var(--lav-soft); color: var(--lav); padding: 1px 10px; border-radius: 999px; }
.post-card h3 { font-size: 18px; margin-bottom: 4px; }
.post-card h3 a { color: var(--ink); }
.post-card p { font-size: 14px; color: var(--ink2); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--pink-soft); }
.tl-item { position: relative; padding: 0 0 22px 14px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 7px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--pink); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--pink-soft);
}
.tl-item .tl-date { font-size: 12.5px; color: var(--ink2); }
.tl-item h3 { font-size: 17px; margin: 2px 0; }
.tl-item p { font-size: 14px; color: var(--ink2); }
.tl-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tl-imgs img { width: 108px; height: 108px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }

/* ---------- 画廊瀑布流 ---------- */
.masonry { column-count: 3; column-gap: 14px; }
@media (max-width: 860px) { .masonry { column-count: 2; } }
@media (max-width: 560px) { .masonry { column-count: 1; } .hero-grid { grid-template-columns: 1fr; } .cd-num, .cd-sub { font-size: 30px; } }
.g-item { break-inside: avoid; margin-bottom: 14px; background: var(--card); border: none; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; transition: all .2s; }
.g-item:hover { transform: translateY(-3px); }
.g-item img { display: block; width: 100%; }
.g-item .g-cap { padding: 10px 14px; font-size: 13.5px; color: var(--ink2); }
.g-ph { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff; }

/* ---------- 友链 ---------- */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.friend-card {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border: none; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); transition: all .2s;
}
.friend-card:hover { transform: translateY(-3px); border-color: #d8ccff; }
.friend-avatar { flex: 0 0 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--lav-soft); }
.friend-card b { display: block; font-size: 15px; color: var(--ink); }
.friend-card span { font-size: 12.5px; color: var(--ink2); }

/* ---------- 文章正文 ---------- */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 34px; box-shadow: var(--shadow); max-width: 860px; margin: 26px auto; }
.article { border: none; }
.article h1 { font-size: 30px; margin-bottom: 8px; }
.article .art-meta { color: var(--ink2); font-size: 13px; margin-bottom: 20px; }
.art-hero {
  height: 190px; margin: -34px -34px 24px;
  background-size: cover; background-position: center 30%;
  border-radius: var(--r) var(--r) 0 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 58%, transparent 100%);
  pointer-events: none;
}
.md h2 { font-size: 21px; margin: 22px 0 10px; padding-left: 12px; border-left: 4px solid var(--pink); }
.md p { margin: 10px 0; font-size: 15.5px; }
.md ul, .md ol { margin: 10px 0 10px 24px; }
.md blockquote { margin: 14px 0; padding: 10px 16px; background: var(--pink-soft); border-radius: 12px; color: #2c6f9e; font-size: 14.5px; }
.md img { border-radius: 12px; margin: 10px 0; }
.md code { background: var(--lav-soft); padding: 2px 8px; border-radius: 6px; font-size: 13.5px; }

/* ---------- 表单 / admin ---------- */
.admin-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.admin-panel { border: none; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--ink2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 14.5px; font-family: inherit; color: var(--ink); background: var(--bg2); outline: none; transition: border .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--pink); }
.field textarea { min-height: 160px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 8px; background: var(--bg2); font-size: 14px;
}
.list-row { border: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 700; }
.list-row .s { color: var(--ink2); font-size: 12.5px; }

/* ---------- 灯箱 / toast ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(50, 35, 45, .82); display: none; align-items: center; justify-content: center; z-index: 99; flex-direction: column; gap: 12px; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 14px; }
.lightbox .lb-cap { color: #fff; font-size: 14px; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); font-size: 34px; color: #fff; background: rgba(255,255,255,.14); border: none; border-radius: 50%; width: 52px; height: 52px; cursor: pointer; }
.lb-prev { left: 18px; } .lb-next { right: 18px; } .lb-close { position: absolute; top: 16px; right: 22px; font-size: 28px; color: #fff; background: none; border: none; cursor: pointer; }
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 100;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
footer { margin-top: 50px; border-top: 1px solid var(--line); background: var(--bg2); }
footer { border-top: none; }
.foot { max-width: 1080px; margin: 0 auto; padding: 26px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: "ZCOOL KuaiLe"; font-size: 17px; }
.foot-brand .logo { width: 30px; height: 30px; }
.foot-links { color: var(--ink2); font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.visit-note { color: var(--ink2); font-size: 13px; opacity: .85; }

/* ---------- 全局音乐播放器 ---------- */
.music-bar {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 12px; border-radius: 999px;
  background: var(--card); backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(63,167,224,.18);
  max-width: calc(100vw - 120px);
}
.music-bar.playing { animation: musicPulse 2.4s ease-in-out infinite; }
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(63,167,224,.18), 0 0 0 0 rgba(108,198,255,.35); }
  50% { box-shadow: 0 6px 18px rgba(63,167,224,.18), 0 0 0 10px rgba(108,198,255,0); }
}
.music-play {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--lav)); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(63,167,224,.28); transition: transform .2s;
}
.music-play:hover { transform: scale(1.1); }
.music-nav { border: none; background: none; cursor: pointer; color: var(--ink2); font-size: 15px; padding: 4px 2px; transition: color .2s, transform .2s; }
.music-nav:hover { color: var(--pink); transform: scale(1.15); }
.music-info { min-width: 0; cursor: pointer; padding-right: 2px; }
.music-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.music-sub { font-size: 10.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; margin-top: 1px; }
.music-prog { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 999px; background: rgba(63,167,224,.14); cursor: pointer; }
.music-prog i { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--lav)); transition: width .25s linear; }
.music-vol {
  position: fixed; left: 18px; bottom: 76px; z-index: 90;
  width: 46px; height: 96px; border-radius: 999px; padding: 16px 0;
  background: var(--card); backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(63,167,224,.18);
  display: none; align-items: center; justify-content: center;
}
.music-vol.show { display: flex; }
.music-vol input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 4px; height: 64px; accent-color: var(--pink); cursor: pointer; }
.music-list {
  position: fixed; left: 18px; bottom: 76px; z-index: 89;
  min-width: 240px; max-width: calc(100vw - 36px); padding: 10px;
  border-radius: 16px; background: var(--card); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(63,167,224,.22);
  display: none; flex-direction: column;
}
.music-list.show { display: flex; }
.ml-head { font-size: 11px; color: var(--ink2); padding: 4px 10px 8px; }
.music-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 12.5px; color: var(--ink); transition: background .15s; }
.music-item:hover { background: var(--lav-soft); }
.music-item.on { background: var(--lav-soft); color: var(--lav); font-weight: 600; }
.mi-idx { font-size: 10px; opacity: .65; flex: 0 0 12px; }
@media (max-width: 560px) {
  .music-bar { left: 12px; bottom: 12px; padding: 8px 12px 11px; gap: 6px; }
  .music-name, .music-sub { max-width: 34vw; }
}
.kaomoji-foot { color: var(--pink); }
.empty { text-align: center; color: var(--ink2); padding: 40px 0; font-size: 14.5px; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 620px) {
  .nav-inner { padding: 10px 14px; flex-direction: column; gap: 6px; }
  .brand { font-size: 19px; }
  .brand .logo { width: 32px; height: 32px; }
  .brand .en { display: none; }
  .nav-links { justify-content: center; gap: 2px; }
  .nav-links a { padding: 6px 10px; font-size: 13.5px; }
  .post-card { min-height: 104px; }
  .post-bg { opacity: .32; }
  .hero-grid { gap: 14px; }
  .friend-grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .article { padding: 22px 18px; }
  .art-hero { height: 150px; margin: -22px -18px 18px; }
  .admin-panel { padding: 18px 16px; }
}
@media (max-width: 400px) {
  .nav-links a { padding: 5px 7px; font-size: 12.5px; }
  .post-card { padding: 14px; }
  .post-bg { opacity: .22; }
}

/* ---------- 小滴交互 ---------- */
.mascot { cursor: pointer; }
.mascot-say {
  position: absolute; top: -8px; right: 2%; z-index: 5;
  background: var(--card); border: 1.5px solid #bfe3ff; color: #3b7db8;
  padding: 8px 14px; border-radius: 14px; font-size: 13.5px;
  opacity: 0; transform: translateY(6px) scale(.9); transition: all .25s;
  pointer-events: none; box-shadow: 0 6px 16px rgba(107,184,240,.2); white-space: nowrap;
}
.mascot-say.show { opacity: 1; transform: translateY(0) scale(1); }
.mascot-say::after {
  content: ""; position: absolute; bottom: -7px; left: 24px; width: 12px; height: 12px;
  background: var(--card); border-right: 1.5px solid #bfe3ff; border-bottom: 1.5px solid #bfe3ff;
  transform: rotate(45deg);
}
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }

/* ---------- 主题切换 ---------- */
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 16px; transition: all .2s; flex: 0 0 auto;
}
.theme-btn:hover { border-color: var(--pink); transform: rotate(20deg); }

/* ---------- 回到顶部 / 阅读进度 ---------- */
.backtop {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--pink); color: #fff; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: all .3s; z-index: 60;
}
.backtop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.readbar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--pink), var(--lav)); z-index: 99; transition: width .1s; }

/* ---------- 暗色模式 ---------- */
html[data-theme="dark"] {
  --bg: #1c222d; --bg2: #212936; --card: rgba(40, 48, 63, .78); --ink: #e7e9f0; --ink2: #9aa6ba;
  --pink: #5db4ef; --pink-soft: #20374a; --lav: #9f8df5; --lav-soft: #2b2c4e;
  --mint: #4fc4ab; --mint-soft: #1d3a35; --honey: #ffd45e; --line: #38445a;
  --navbg: rgba(28, 34, 45, .88);
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .mascot-name { background: rgba(40, 48, 63, .9); border-color: #3a556e; color: #8ec8f5; }
html[data-theme="dark"] .mascot-say { border-color: #3a556e; color: #8ec8f5; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a556e; border: 2px solid transparent; background-clip: content-box; }
html[data-theme="dark"] ::selection { background: #2c4f66; color: #d9edff; }
