/* ================================================================
   豆浆小屋 · 二次元粉彩美化
   适用主题：DoIt v0.4.0（浅色/深色均兼容，暗色用 body[theme="dark"]）
   ================================================================ */

/* ---------- 基础：滚动条 & 选中 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffc3d6, #a8d8ff);
  border-radius: 8px;
}
body[theme="dark"] ::-webkit-scrollbar-thumb,
body[theme="black"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7a4a5c, #415d84);
}
::selection { background: rgba(255, 182, 213, 0.45); }
body[theme="dark"] ::selection { background: rgba(255, 130, 175, 0.35); }

/* ---------- 主页：整体网格 ---------- */
.page.home.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.page.home.posts > .home-profile,
.page.home.posts > div.single,
.page.home.posts > .pagination { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .page.home.posts { grid-template-columns: 1fr; }
}

/* ---------- 作者卡片（左头像 + 右侧信息） ---------- */
.home-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.6rem 1.8rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 163, 199, 0.35);
  background: linear-gradient(120deg, rgba(255, 214, 231, 0.5), rgba(197, 222, 255, 0.5));
  box-shadow: 0 4px 18px rgba(190, 160, 220, 0.12);
  backdrop-filter: blur(4px);
}
body[theme="dark"] .home-profile,
body[theme="black"] .home-profile {
  background: linear-gradient(120deg, rgba(90, 55, 75, 0.55), rgba(50, 70, 105, 0.55));
  border-color: rgba(255, 163, 199, 0.25);
}
.home-profile .home-avatar {
  flex: 0 0 auto;
}
.home-profile .home-avatar img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(247, 143, 179, 0.45);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
}
.home-profile .home-avatar:hover img {
  transform: scale(1.08) rotate(8deg);
  box-shadow: 0 10px 26px rgba(247, 143, 179, 0.6);
}
.home-profile-info { flex: 1 1 260px; min-width: 0; }
.home-profile .home-title { margin: 0; font-size: 1.5rem; font-weight: 700; }
.home-profile .home-subtitle { margin: 0.35rem 0 0; font-size: 0.98rem; font-weight: 400; opacity: 0.8; }
.home-profile .home-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.home-profile .chip {
  font-size: 0.76rem;
  line-height: 1.5;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(247, 143, 179, 0.4);
  color: inherit;
}
body[theme="dark"] .home-profile .chip,
body[theme="black"] .home-profile .chip {
  background: rgba(30, 30, 45, 0.5);
  border-color: rgba(255, 160, 195, 0.35);
}
.home-profile .links { margin-top: 0.7rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.home-profile .links a { font-size: 1.05rem; opacity: 0.85; transition: transform 0.25s, opacity 0.25s; }
.home-profile .links a:hover { opacity: 1; transform: translateY(-2px) scale(1.15); }
.home-profile .home-disclaimer { margin: 0.7rem 0 0; font-size: 0.85rem; opacity: 0.65; }

/* ---------- 主页欢迎语横幅 ---------- */
.page.home.posts > div.single {
  padding: 1.3rem 1.6rem;
  border-radius: 18px;
  border: 1px dashed rgba(255, 163, 199, 0.5);
  background: rgba(255, 245, 250, 0.65);
}
body[theme="dark"] .page.home.posts > div.single,
body[theme="black"] .page.home.posts > div.single {
  background: rgba(55, 45, 60, 0.55);
  border-color: rgba(255, 163, 199, 0.3);
}
.page.home.posts > div.single .content { font-size: 0.98rem; }

/* ---------- 文章卡片 ---------- */
.single.summary {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(190, 205, 255, 0.35);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 3px 12px rgba(150, 160, 220, 0.1);
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.28s, border-color 0.28s;
  animation: cardIn 0.6s both;
}
body[theme="dark"] .single.summary,
body[theme="black"] .single.summary {
  background: rgba(44, 44, 60, 0.78);
  border-color: rgba(150, 130, 180, 0.3);
}
.single.summary:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(247, 143, 179, 0.28);
  border-color: rgba(247, 143, 179, 0.6);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.single.summary:nth-child(4n+2) { animation-delay: 0.06s; }
.single.summary:nth-child(4n+3) { animation-delay: 0.12s; }
.single.summary:nth-child(4n+4) { animation-delay: 0.18s; }

/* 卡片头部：渐变 + 大 emoji */
.summary .summary-cover {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.summary .cover-emoji {
  font-size: 2.9rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(120, 90, 150, 0.25));
  animation: floaty 3.2s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}
.summary:hover .cover-emoji { animation-duration: 1.4s; }
.card-g0 { background: linear-gradient(135deg, #ffd3e0, #c9e4ff); }
.card-g1 { background: linear-gradient(135deg, #d8f3dc, #c7e2ff); }
.card-g2 { background: linear-gradient(135deg, #ffe8cc, #ffd3e0); }
.card-g3 { background: linear-gradient(135deg, #e0d7ff, #d4f0ff); }
.card-g4 { background: linear-gradient(135deg, #fff3c4, #ffd9ec); }
.card-g5 { background: linear-gradient(135deg, #d1f6e8, #e6dcff); }

/* 卡片正文 */
.summary .summary-body { padding: 1rem 1.2rem 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.summary .single-title { margin: 0; font-size: 1.14rem; font-weight: 700; line-height: 1.45; }
.summary .single-title a { text-decoration: none; transition: color 0.25s; }
.summary .single-title a:hover { color: #f06a9c; }
.summary .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.78rem; opacity: 0.78; }
.summary .post-meta .post-tags { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.summary .post-tag {
  font-size: 0.72rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: rgba(247, 143, 179, 0.14);
  border: 1px solid rgba(247, 143, 179, 0.35);
  transition: background 0.25s, transform 0.25s;
}
.summary .post-tag:hover { background: rgba(247, 143, 179, 0.3); transform: translateY(-1px); }
.summary .content {
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.summary .content p { margin: 0; }
.summary .post-footer { margin-top: auto; padding-top: 0.4rem; }
.summary .post-footer a.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #ffb6cf, #a8c8ff);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(247, 143, 179, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}
.summary .post-footer a.read-more:hover { transform: translateX(3px) scale(1.04); box-shadow: 0 5px 14px rgba(247, 143, 179, 0.5); }
.summary .post-footer a.read-more i { font-size: 0.72rem; }

/* ---------- 分页 ---------- */
.page.home .pagination .page-link {
  border-radius: 10px !important;
  transition: background 0.25s, transform 0.25s;
}
.page.home .pagination .page-link:hover { transform: translateY(-2px); }
.page.home .pagination .active .page-link {
  background: linear-gradient(120deg, #ffb6cf, #a8c8ff);
  border-color: transparent;
}

/* ---------- 文章列表页（/posts/）轻美化 ---------- */
.page.archive .group-title { position: relative; padding-left: 0.9rem; }
.page.archive .group-title::before {
  content: "🌸";
  position: absolute;
  left: -0.4rem;
  top: 0.1rem;
  font-size: 0.85rem;
}
.page.archive .archive-item-link { transition: color 0.25s, padding-left 0.25s; }
.page.archive .archive-item-link:hover { color: #f06a9c; padding-left: 0.5rem; }

/* ---------- 全局链接 hover 色 ---------- */
a { transition: color 0.2s; }

/* ---------- 音乐播放器（悬浮小窗） ---------- */
.aplayer.aplayer-fixed { z-index: 60; }
.aplayer.aplayer-fixed .aplayer-body { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(150, 110, 180, 0.35); }
.aplayer { background: rgba(255, 255, 255, 0.93) !important; }
body[theme="dark"] .aplayer,
body[theme="black"] .aplayer { background: rgba(38, 38, 55, 0.94) !important; }
body[theme="dark"] .aplayer .aplayer-info,
body[theme="black"] .aplayer .aplayer-info { color: #ddd; }
body[theme="dark"] .aplayer .aplayer-list,
body[theme="black"] .aplayer .aplayer-list { color: #ccc; background: rgba(30, 30, 45, 0.95) !important; }
body[theme="dark"] .aplayer .aplayer-list ol li:hover,
body[theme="black"] .aplayer .aplayer-list ol li:hover { background: rgba(255, 255, 255, 0.06) !important; }

/* ---------- 飘落的花瓣 ---------- */
.petal {
  position: fixed;
  top: -8vh;
  z-index: 45;
  pointer-events: none;
  animation: petal-fall linear infinite;
  will-change: transform, opacity;
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); }
  25%  { transform: translate3d(calc(var(--drift, 2) * 0.6vw), 24vh, 0) rotate(90deg); }
  50%  { transform: translate3d(calc(var(--drift, 2) * 1.1vw), 50vh, 0) rotate(180deg); }
  75%  { transform: translate3d(calc(var(--drift, 2) * 0.4vw), 76vh, 0) rotate(270deg); }
  100% { transform: translate3d(calc(var(--drift, 2) * -0.8vw), 110vh, 0) rotate(360deg); }
}

/* ---------- 点击头像冒出的爱心 ---------- */
.heart-burst {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  font-size: 1.1rem;
  animation: heartUp 0.9s ease-out forwards;
}
@keyframes heartUp {
  0%   { opacity: 1; transform: translateY(0) scale(0.6); }
  100% { opacity: 0; transform: translateY(-90px) scale(1.3) rotate(15deg); }
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 720px) {
  .home-profile { padding: 1.1rem; gap: 1rem; justify-content: center; text-align: center; }
  .home-profile-info { flex: 1 1 100%; }
  .home-profile .links { justify-content: center; }
  .summary .summary-cover { height: 84px; }
  .summary .cover-emoji { font-size: 2.3rem; }
}

/* ================================================================
   豆浆小屋 v2 · lvyovo-wiki 风格融合
   青绿主色 #35bfab · 毛玻璃卡片 · Averia 标题字体 · 奶昔光标
   ================================================================ */

/* ---------- 自定义光标（奶昔杯 🥛） ---------- */
body {
  cursor: url("/images/cursor.svg") 8 9, auto;
}
a, button, .single.summary, .home-profile a, .post-tag, .page-link,
summary, [role="button"], input[type="submit"], select {
  cursor: url("/images/cursor-pointer.svg") 8 9, pointer;
}

/* ---------- 页面背景（浅灰，衬托毛玻璃） ---------- */
body {
  background: linear-gradient(165deg, #f3f6f4 0%, #eceff1 55%, #f2f6f8 100%);
  background-attachment: fixed;
}
body[theme="dark"],
body[theme="black"] { background: #23282b; }

/* ---------- 背景光斑动画层 ---------- */
#glow-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
body[theme="dark"] #glow-bg,
body[theme="black"] #glow-bg { opacity: 0.55; }
.main {
  position: relative;
  z-index: 1;
}

/* ---------- 标题字体 Averia Gruesa Libre（拉丁字符生效） ---------- */
h1, h2, h3, h4, h5, h6,
.single-title, .home-title, .archive-item-link, .post-title {
  font-family: "Averia Gruesa Libre", var(--global-font-family, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0.01em;
}

/* ---------- 毛玻璃卡片（覆盖 v1 实色背景） ---------- */
.single.summary,
.home-profile,
.page.home.posts > div.single {
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}
body[theme="dark"] .single.summary,
body[theme="black"] .single.summary,
body[theme="dark"] .home-profile,
body[theme="black"] .home-profile,
body[theme="dark"] .page.home.posts > div.single,
body[theme="black"] .page.home.posts > div.single {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(34, 40, 44, 0.55);
}
.single.summary:hover {
  border-color: rgba(53, 191, 171, 0.55);
  box-shadow: 0 14px 30px rgba(53, 191, 171, 0.22), 0 4px 14px rgba(247, 143, 179, 0.18);
}
.home-profile:hover {
  border-color: rgba(53, 191, 171, 0.4);
  box-shadow: 0 8px 24px rgba(53, 191, 171, 0.15);
}

/* ---------- 青绿强调色点缀（保留粉彩基调） ---------- */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffc3d6, #5fd8c9);
}
body[theme="dark"] ::-webkit-scrollbar-thumb,
body[theme="black"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7a4a5c, #2f8578);
}
.summary .post-footer a.read-more {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  box-shadow: 0 3px 8px rgba(53, 191, 171, 0.35);
}
.summary .post-footer a.read-more:hover {
  box-shadow: 0 5px 16px rgba(53, 191, 171, 0.55);
}
.page.home .pagination .active .page-link {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
}
.summary .post-tag:hover {
  background: rgba(53, 191, 171, 0.28);
  border-color: rgba(53, 191, 171, 0.5);
}
.summary .single-title a:hover {
  color: #189a88;
}
.single.summary .cover-emoji {
  filter: drop-shadow(0 3px 6px rgba(53, 191, 171, 0.22));
}

/* ---------- 卡片封面新增青绿渐变（配合 summary.html mod 8） ---------- */
.card-g6 { background: linear-gradient(135deg, #c8f0e4, #a5e8dd); }
.card-g7 { background: linear-gradient(135deg, #d5e9ff, #bfeee9); }

/* ---------- 不蒜子访客统计 ---------- */
.busuanzi-item {
  color: #7a8a99;
  font-size: 0.9em;
  white-space: nowrap;
}
.busuanzi-item:first-child {
  margin-right: 1.2em;
}
.busuanzi-item .busuanzi-label {
  margin-right: 0.2em;
}
.busuanzi-item i {
  color: #35bfab;
}
.busuanzi-item span[id^="busuanzi_value_"] {
  font-weight: 600;
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[theme="dark"] .busuanzi-item,
body[theme="black"] .busuanzi-item {
  color: #9aa7b4;
}

/* ---------- 在线写作页 ---------- */
.write-tip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9em;
  color: #d15f8e;
  background: linear-gradient(120deg, rgba(255, 195, 214, 0.35), rgba(95, 216, 201, 0.3));
  margin-bottom: 18px;
}
.write-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.write-panel {
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(240, 250, 250, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 12px rgba(53, 191, 171, 0.1);
}
body[theme="dark"] .write-panel,
body[theme="black"] .write-panel {
  background: linear-gradient(135deg, rgba(40, 48, 58, 0.8), rgba(35, 45, 52, 0.75));
  border-color: rgba(255, 255, 255, 0.08);
}
.write-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.write-field > span {
  font-size: 0.85em;
  color: #7a8a99;
  font-weight: 600;
}
.write-field input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(53, 191, 171, 0.35);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.95em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.write-field input[type="text"]:focus {
  outline: none;
  border-color: #35bfab;
  box-shadow: 0 0 0 3px rgba(53, 191, 171, 0.18);
}
body[theme="dark"] .write-field input[type="text"],
body[theme="black"] .write-field input[type="text"] {
  background: rgba(20, 26, 32, 0.7);
  border-color: rgba(95, 216, 201, 0.3);
  color: #e8eef4;
}
.write-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.write-field-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #7a8a99;
}
.write-editor-area {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 12px rgba(53, 191, 171, 0.1);
}
.write-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(120deg, #ffe9f2, #e6faf6);
  border-bottom: 1px solid rgba(53, 191, 171, 0.25);
}
body[theme="dark"] .write-toolbar,
body[theme="black"] .write-toolbar {
  background: linear-gradient(120deg, #3a2a33, #23403b);
}
.write-toolbar button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: #5c7a75;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.write-toolbar button:hover {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  color: #fff;
  transform: translateY(-1px);
}
body[theme="dark"] .write-toolbar button,
body[theme="black"] .write-toolbar button {
  background: rgba(255, 255, 255, 0.08);
  color: #b8d6d0;
}
#write-editor {
  width: 100%;
  min-height: 380px;
  padding: 14px 16px;
  border: none;
  resize: vertical;
  background: rgba(255, 255, 255, 0.85);
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.92em;
  line-height: 1.6;
  color: #334f52;
}
#write-editor:focus {
  outline: none;
}
body[theme="dark"] #write-editor,
body[theme="black"] #write-editor {
  background: rgba(20, 26, 32, 0.85);
  color: #d7e3e8;
}
.write-panel-preview {
  max-height: 480px;
  overflow-y: auto;
}
.write-preview-title {
  font-weight: 700;
  font-size: 0.95em;
  color: #35bfab;
  margin-bottom: 10px;
}
.write-preview-empty {
  color: #9ab5ad;
  text-align: center;
  padding: 30px 0;
  font-style: italic;
}
.write-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.write-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(120deg, rgba(255, 195, 214, 0.6), rgba(95, 216, 201, 0.55));
  color: #2f8578;
}
.write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(53, 191, 171, 0.35);
}
.write-btn-primary {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  color: #fff;
  box-shadow: 0 3px 8px rgba(53, 191, 171, 0.35);
}
.write-btn-ghost {
  background: transparent;
  border: 1px solid rgba(53, 191, 171, 0.4);
  color: #7a8a99;
}
.write-btn-ghost:hover {
  box-shadow: none;
  border-color: #e868a8;
  color: #e868a8;
}
.write-tip-sm {
  font-size: 0.82em;
  color: #9ab5ad;
  line-height: 1.6;
}
.write-tip-sm code {
  background: rgba(53, 191, 171, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  color: #35bfab;
}



/* ---------- 在线写作页 ---------- */
.write-tip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9em;
  color: #d15f8e;
  background: linear-gradient(120deg, rgba(255, 195, 214, 0.35), rgba(95, 216, 201, 0.3));
  margin-bottom: 18px;
}
.write-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.write-panel {
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(240, 250, 250, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 12px rgba(53, 191, 171, 0.1);
}
body[theme="dark"] .write-panel,
body[theme="black"] .write-panel {
  background: linear-gradient(135deg, rgba(40, 48, 58, 0.8), rgba(35, 45, 52, 0.75));
  border-color: rgba(255, 255, 255, 0.08);
}
.write-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.write-field > span {
  font-size: 0.85em;
  color: #7a8a99;
  font-weight: 600;
}
.write-field input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(53, 191, 171, 0.35);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.95em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.write-field input[type="text"]:focus {
  outline: none;
  border-color: #35bfab;
  box-shadow: 0 0 0 3px rgba(53, 191, 171, 0.18);
}
body[theme="dark"] .write-field input[type="text"],
body[theme="black"] .write-field input[type="text"] {
  background: rgba(20, 26, 32, 0.7);
  border-color: rgba(95, 216, 201, 0.3);
  color: #e8eef4;
}
.write-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.write-field-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #7a8a99;
}
.write-editor-area {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 12px rgba(53, 191, 171, 0.1);
}
.write-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(120deg, #ffe9f2, #e6faf6);
  border-bottom: 1px solid rgba(53, 191, 171, 0.25);
}
body[theme="dark"] .write-toolbar,
body[theme="black"] .write-toolbar {
  background: linear-gradient(120deg, #3a2a33, #23403b);
}
.write-toolbar button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: #5c7a75;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.write-toolbar button:hover {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  color: #fff;
  transform: translateY(-1px);
}
body[theme="dark"] .write-toolbar button,
body[theme="black"] .write-toolbar button {
  background: rgba(255, 255, 255, 0.08);
  color: #b8d6d0;
}
#write-editor {
  width: 100%;
  min-height: 380px;
  padding: 14px 16px;
  border: none;
  resize: vertical;
  background: rgba(255, 255, 255, 0.85);
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.92em;
  line-height: 1.6;
  color: #334f52;
}
#write-editor:focus {
  outline: none;
}
body[theme="dark"] #write-editor,
body[theme="black"] #write-editor {
  background: rgba(20, 26, 32, 0.85);
  color: #d7e3e8;
}
.write-panel-preview {
  max-height: 480px;
  overflow-y: auto;
}
.write-preview-title {
  font-weight: 700;
  font-size: 0.95em;
  color: #35bfab;
  margin-bottom: 10px;
}
.write-preview-empty {
  color: #9ab5ad;
  text-align: center;
  padding: 30px 0;
  font-style: italic;
}
.write-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.write-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(120deg, rgba(255, 195, 214, 0.6), rgba(95, 216, 201, 0.55));
  color: #2f8578;
}
.write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(53, 191, 171, 0.35);
}
.write-btn-primary {
  background: linear-gradient(120deg, #f78fb3, #35bfab);
  color: #fff;
  box-shadow: 0 3px 8px rgba(53, 191, 171, 0.35);
}
.write-btn-ghost {
  background: transparent;
  border: 1px solid rgba(53, 191, 171, 0.4);
  color: #7a8a99;
}
.write-btn-ghost:hover {
  box-shadow: none;
  border-color: #e868a8;
  color: #e868a8;
}
.write-tip-sm {
  font-size: 0.82em;
  color: #9ab5ad;
  line-height: 1.6;
}
.write-tip-sm code {
  background: rgba(53, 191, 171, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  color: #35bfab;
}
/* ---------- 分类总览悬浮卡片 ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.category-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 16px rgba(53, 191, 171, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  overflow: hidden;
}
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 60%);
  pointer-events: none;
}
.category-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 32px rgba(53, 191, 171, 0.32);
  border-color: rgba(255, 255, 255, 0.9);
}
.category-emoji {
  font-size: 2.4em;
  filter: drop-shadow(0 3px 8px rgba(53, 191, 171, 0.3));
  transition: transform 0.3s ease;
}
.category-card:hover .category-emoji {
  transform: rotate(-8deg) scale(1.12);
}
.category-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1;
}
.category-name {
  font-size: 1.15em;
  font-weight: 700;
  color: #2f8578;
}
.category-count {
  font-size: 0.8em;
  color: #7a8a99;
}
.category-arrow {
  margin-left: auto;
  color: rgba(47, 133, 120, 0.45);
  font-size: 0.9em;
  transition: all 0.3s ease;
  z-index: 1;
}
.category-card:hover .category-arrow {
  transform: translateX(4px);
  color: #e868a8;
}
body[theme="dark"] .category-name,
body[theme="black"] .category-name {
  color: #7fd6c6;
}
body[theme="dark"] .category-count,
body[theme="black"] .category-count {
  color: #9aa7b4;
}
.card-g0 { background: linear-gradient(135deg, #ffe3ee, #ffd1e2); }
.card-g1 { background: linear-gradient(135deg, #d5f5ec, #bcefe3); }
.card-g2 { background: linear-gradient(135deg, #e3ecff, #d2e0ff); }
.card-g3 { background: linear-gradient(135deg, #fff3d6, #ffe8b8); }
.card-g4 { background: linear-gradient(135deg, #eadfff, #dccfff); }
.card-g5 { background: linear-gradient(135deg, #d4f6ff, #bdecff); }
.card-g6 { background: linear-gradient(135deg, #c8f0e4, #a5e8dd); }
.card-g7 { background: linear-gradient(135deg, #d5e9ff, #bfeee9); }
/* ---------- 鍙嬮摼鍗＄墖 ---------- */
.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 195, 214, 0.28), rgba(95, 216, 201, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 3px 10px rgba(53, 191, 171, 0.12);
  transition: all 0.25s ease;
}
.friend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(53, 191, 171, 0.3);
  background: linear-gradient(135deg, rgba(255, 195, 214, 0.4), rgba(95, 216, 201, 0.35));
}
.friend-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #f78fb3, #35bfab);
  padding: 2px;
}
.friend-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.friend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.friend-name {
  font-weight: 700;
  font-size: 1.05em;
  color: #d15f8e;
  background: linear-gradient(120deg, #e868a8, #2fb39f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.friend-bio {
  font-size: 0.85em;
  color: #7a8a99;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[theme="dark"] .friend-bio,
body[theme="black"] .friend-bio {
  color: #9aa7b4;
}
