/* ================================================================
   豆浆小屋 · 二次元粉彩美化
   适用主题：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;
}

/* ================================================================
   豆浆小屋 · 新主页 v2（huxx 粗野贴纸风：3px 描边 + 硬投影 + 平涂色）
   数据/配色在 data/home.toml；模板 layouts/index.html
   ================================================================ */
.dj-home {
  --t-light: #CFE1EF;
  --t-dark: #0058C0;
  max-width: 880px;
  margin: 0 auto;
  padding-top: 18px;
}
.dj-home[data-dj-theme="green"]  { --t-light:#BDF1CD; --t-dark:#16A062; }
.dj-home[data-dj-theme="yellow"] { --t-light:#FEF8BB; --t-dark:#F6A200; }
.dj-home[data-dj-theme="orange"] { --t-light:#FDCEA4; --t-dark:#F06E1C; }
.dj-home[data-dj-theme="purple"] { --t-light:#E8D6F4; --t-dark:#7B1897; }
.dj-home[data-dj-theme="red"]    { --t-light:#FFCABD; --t-dark:#D30000; }
.dj-home[data-dj-theme="soy"]    { --t-light:#F6EBD8; --t-dark:#8A5A18; }

/* 深色模式下：正文墨色换成主题色的亮化版（卡片仍是白底贴纸） */
[theme='dark'] .dj-home, [data-theme='dark'] .dj-home {
  --t-ink: color-mix(in srgb, var(--t-dark) 55%, #ffffff);
}
.dj-home { --t-ink: var(--t-dark); }

/* 进场动画：--i 为序号，逐个浮起 */
.dj-in {
  animation: dj-fade-up 0.55s cubic-bezier(0.2, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes dj-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 开场 ---------- */
.dj-hero { text-align: center; padding: 26px 0 6px; }
.dj-kaomoji {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--t-ink);
  letter-spacing: 2px;
}
.dj-hero-title {
  margin: 10px 0 6px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--t-ink);
  line-height: 1.3;
}
.dj-hero-sub { margin: 0; font-size: 1.02rem; opacity: 0.75; color: var(--t-ink); }

/* ---------- 贴纸卡基元 ---------- */
.dj-card {
  background: #ffffff;
  border: 3px solid var(--t-dark);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--t-dark);
  color: var(--t-dark);
  transition: transform 0.18s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.18s ease;
}

/* ---------- 身份卡 ---------- */
.dj-idcard {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 26px;
  padding: 24px 28px;
}
.dj-avatar {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--t-dark);
  box-shadow: 3px 3px 0 var(--t-dark);
  transform: rotate(-2deg);
  transition: transform 0.25s ease;
}
.dj-idcard:hover .dj-avatar { transform: rotate(2deg) scale(1.04); }
.dj-idcard-text { min-width: 0; }
.dj-idcard-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 800; }
.dj-idcard-sub { margin: 0 0 12px; font-size: 0.92rem; opacity: 0.85; }

/* 评级条（学 huxx：Lv + 细进度条 + +1/秒） */
.dj-lv {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.dj-lv-num { font-weight: 800; font-size: 1.02rem; letter-spacing: 1px; white-space: nowrap; }
.dj-lv-track {
  position: relative;
  width: 132px;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--t-dark) 18%, transparent);
  overflow: hidden;
  flex-shrink: 0;
}
.dj-lv-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: var(--t-dark);
  transition: width 0.5s ease-out;
}
.dj-lv-rate {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0.8;
  white-space: nowrap;
}

/* 快捷圆钮 */
.dj-quick { display: flex; gap: 12px; flex-wrap: wrap; }
.dj-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--t-light);
  border: 3px solid var(--t-dark);
  box-shadow: 3px 3px 0 var(--t-dark);
  color: var(--t-dark);
  font-size: 1.05rem;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dj-quick-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--t-dark);
}

/* ---------- 作品集 ---------- */
.dj-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 34px 2px 16px;
  color: var(--t-ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.dj-works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.dj-work-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-decoration: none !important;
}
.dj-work-card:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--t-dark);
}
.dj-work-emoji {
  font-size: 38px;
  line-height: 1.1;
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--t-light);
  border: 3px solid var(--t-dark);
  box-shadow: 2px 2px 0 var(--t-dark);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.2, 1, 0.3, 1);
}
.dj-work-card:hover .dj-work-emoji { transform: rotate(-8deg) scale(1.08); }
.dj-work-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dj-work-title { font-weight: 800; font-size: 1.06rem; }
.dj-ext { font-size: 0.66rem; opacity: 0.55; }
.dj-work-desc { font-size: 0.84rem; opacity: 0.78; line-height: 1.55; }

/* ---------- 关于我 ---------- */
.dj-about-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}
.dj-about-card:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--t-dark);
}
.dj-about-desc { font-size: 0.92rem; line-height: 1.65; opacity: 0.9; }
.dj-about-link {
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  border-bottom: 3px solid var(--t-light);
}

/* ---------- PJAX 切页过渡（丝滑的核心） ---------- */
#pjax-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #ff8fab, #ffd166);
  z-index: 9999;
  transition: width 0.25s ease, opacity 0.3s ease;
  opacity: 0;
}
body.pjax-loading #pjax-bar { opacity: 1; width: 82%; }
body.pjax-loading main.main .container {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
body.pjax-in main.main .container {
  animation: dj-page-in 0.42s cubic-bezier(0.2, 1, 0.3, 1);
}
@keyframes dj-page-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
  .dj-idcard { flex-direction: column; text-align: center; padding: 22px 16px; }
  .dj-lv { justify-content: center; }
  .dj-quick { justify-content: center; }
  .dj-works { grid-template-columns: 1fr; }
  .dj-hero-title { font-size: 1.5rem; }
  .dj-kaomoji { font-size: 2rem; }
  .dj-about-card { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .dj-in, body.pjax-in main.main .container { animation: none; }
}

/* ================================================================
   主页 v3 修复与增强
   ================================================================ */

/* [修复] 主题给全站 a 和 a:hover 配了颜色（[theme=dark] a:hover 优先级
   高于类选择器），悬停贴纸卡时整卡文字被染成白色。这里用更高优先级
   把卡片内文字颜色锁回主题色。 */
.dj-home .dj-card,
.dj-home .dj-card:active,
.dj-home .dj-card:hover {
  color: var(--t-dark);
}
.dj-home .dj-card *,
.dj-home .dj-card:active *,
.dj-home .dj-card:hover * {
  color: inherit;
}
.dj-home .dj-quick-btn,
.dj-home .dj-quick-btn:active,
.dj-home .dj-quick-btn:hover {
  color: var(--t-dark);
}
.dj-home .dj-quick-btn:hover * {
  color: inherit;
}

/* ---------- 滚动变脸：头像右下角的表情贴纸 ---------- */
.dj-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.dj-face {
  position: absolute;
  right: -14px;
  bottom: -10px;
  font-size: 1.7rem;
  line-height: 1;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.15));
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.2, 1, 0.3, 1);
}
.dj-face.is-pop {
  animation: dj-face-pop 0.32s cubic-bezier(0.2, 1, 0.3, 1);
}
@keyframes dj-face-pop {
  0% { transform: scale(0.4) rotate(-18deg); }
  70% { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---------- 滚动进场（作品卡/关于我卡进入视口才浮起） ---------- */
[data-dj-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.2, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.2, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
[data-dj-reveal].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-dj-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- 牛奶海背景（滚动 = 往牛奶海里下潜） ---------- */
#milk-sea {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* 300vh 高的渐变，随滚动下移，营造"越潜越深" */
  background: linear-gradient(
    180deg,
    var(--sea-0) 0%,
    var(--sea-1) 34%,
    var(--sea-2) 62%,
    var(--sea-3) 100%
  );
  background-size: 100% 300vh;
  background-repeat: no-repeat;
}
:root {
  --sea-0: #fffdf7;
  --sea-1: #f7efdd;
  --sea-2: #e8f0f7;
  --sea-3: #d4e4f2;
}
[theme='dark'] #milk-sea, [data-theme='dark'] #milk-sea {
  --sea-0: #1c2026;
  --sea-1: #232a33;
  --sea-2: #283442;
  --sea-3: #2e3f52;
}
.dj-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.35) 60%,
    rgba(255, 255, 255, 0.12));
  box-shadow: inset -2px -3px 6px rgba(160, 190, 220, 0.25);
  will-change: transform;
}
[theme='dark'] .dj-bubble, [data-theme='dark'] .dj-bubble {
  background: radial-gradient(circle at 32% 30%,
    rgba(255, 244, 220, 0.5),
    rgba(255, 244, 220, 0.16) 60%,
    rgba(255, 244, 220, 0.05));
}

/* ================================================================
   主页 v3.1 弹射进场 + 竖杠标题（用户批注版）
   ================================================================ */

/* 区块标题：不要 emoji，用彩色竖杠（作品/关于我颜色不同） */
.dj-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 34px 2px 16px;
  color: var(--t-ink);
}
.dj-section-title::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 1.05em;
  border-radius: 4px;
  background: var(--t-dark);
  box-shadow: 2px 2px 0 var(--t-light);
}
.dj-about-section .dj-section-title::before {
  background: #ff8fab;
  box-shadow: 2px 2px 0 #ffd3e2;
}

/* 作品卡：去掉 emoji 牌子后的排版 */
.dj-work-card {
  padding: 18px 22px;
}

/* 弹射进场：奇数卡从左、偶数卡从右，带回弹的弹簧曲线 */
[data-dj-reveal] {
  transition: opacity 0.45s ease,
              transform 0.62s cubic-bezier(0.3, 1.75, 0.45, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: transform, opacity;
}
[data-dj-reveal]:not([data-dj-reveal="left"]):not([data-dj-reveal="right"]) {
  transform: translateY(26px);
}
[data-dj-reveal="left"] {
  transform: translateX(-72px) rotate(-2deg) scale(0.94);
}
[data-dj-reveal="right"] {
  transform: translateX(72px) rotate(2deg) scale(0.94);
}
[data-dj-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* 底部颜文字模式：脸变小一号装得下 */
.dj-face.is-kaomoji {
  font-size: 1.05rem;
  right: -6px;
  bottom: -8px;
  letter-spacing: -1px;
}

/* [fix] v2 残留的 space-between 会把竖杠和标题文字拆到两端 */
.dj-section-title { justify-content: flex-start; }

/* ================================================================
   主页 v6 最终版：磨砂玻璃卡片（用户偏好）+ 简洁深色背景
   ================================================================ */

/* 滚动条：纯色，不要渐变 */
::-webkit-scrollbar-thumb { background: #8fb5e6; }
body[theme="dark"] ::-webkit-scrollbar-thumb,
body[theme="black"] ::-webkit-scrollbar-thumb { background: #46618f; }

/* 首屏居中：开场+身份卡占满第一屏 */
.dj-first {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dj-works-section { margin-top: 10vh; }

/* 区块标题纯淡入，不再下坠（修复与卡片重叠） */
.dj-section-title[data-dj-reveal] {
  transform: none;
  transition: opacity 0.5s ease;
}

/* ---------- 磨砂玻璃卡片（替换粗描边贴纸） ---------- */
.dj-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(80, 110, 200, 0.16);
  color: var(--t-dark);
  transition: transform 0.22s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.22s ease;
}
.dj-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(80, 110, 200, 0.26);
}
[theme='dark'] .dj-card, [data-theme='dark'] .dj-card {
  background: rgba(40, 45, 54, 0.5);
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
[theme='dark'] .dj-card:hover, [data-theme='dark'] .dj-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
/* 悬停锁色（防主题 a:hover 把文字染白） */
.dj-home .dj-card,
.dj-home .dj-card:active,
.dj-home .dj-card:hover { color: var(--t-dark); }
[theme='dark'] .dj-home .dj-card,
[theme='dark'] .dj-home .dj-card:active,
[theme='dark'] .dj-home .dj-card:hover,
[data-theme='dark'] .dj-home .dj-card,
[data-theme='dark'] .dj-home .dj-card:active,
[data-theme='dark'] .dj-home .dj-card:hover { color: #e6eaf0; }
.dj-home .dj-card * { color: inherit; }

/* 快捷圆钮同步磨砂 */
.dj-quick-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(80, 110, 200, 0.14);
}
.dj-quick-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(80, 110, 200, 0.26);
}
[theme='dark'] .dj-quick-btn, [data-theme='dark'] .dj-quick-btn {
  background: rgba(56, 62, 72, 0.55);
  border-color: rgba(255, 255, 255, 0.1);
}

/* 头像回归圆形大尺寸 */
.dj-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(120, 140, 220, 0.3);
  transform: none;
}
[theme='dark'] .dj-avatar, [data-theme='dark'] .dj-avatar {
  border-color: rgba(255, 255, 255, 0.25);
}

/* [fix] :not() 链使初始位移规则优先级达 (0,3,0)，压过 .is-in 复位。
   这里用同级优先级 + 靠后位置压回来 */
.dj-home [data-dj-reveal].is-in {
  opacity: 1;
  transform: none;
}
.dj-home .dj-section-title[data-dj-reveal] {
  transform: none;
}

/* ================================================================
   主页 v7：黄昏动态壁纸背景（Wallpaper Engine 预览 + 磨砂模糊）
   打字机标题（只打一次）+ 可爱字体 + 滚动条隐藏
   ================================================================ */

/* 黄昏壁纸：铺满全屏，模糊放大，上深色渐变保文字可读 */
#dj-dusk-bg {
  position: fixed;
  inset: -34px;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
#dj-dusk-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}
#dj-dusk-bg .dj-dusk-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.32), rgba(10, 14, 24, 0.5));
}

/* 打字机光标 */
.dj-type-cursor {
  display: inline-block;
  margin-left: 2px;
  color: #7fb0e8;
  animation: dj-cursor-blink 0.9s steps(1) infinite;
}
@keyframes dj-cursor-blink { 50% { opacity: 0; } }
.dj-idcard-title { min-height: 1.5em; }

/* 可爱字体：只用在标题，不碰正文排版 */
.dj-hero-title, .dj-idcard-title, .dj-section-title {
  font-family: 'ZCOOL KuaiLe', 'Yuanti SC', 'YouYuan', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  letter-spacing: 0.5px;
}

/* 滚动条整个隐藏（页面仍可滚动） */
::-webkit-scrollbar { width: 0; height: 0; }
html { scrollbar-width: none; }

/* 区块标题永远在卡片上层 */
.dj-section-title { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .dj-type-cursor { animation: none; }
}

/* ================================================================
   主页 v8：滚动零阻力（模糊已烘焙）+ 首屏占满 + 页眉磨砂
   + 主题切换圆环扩散
   ================================================================ */

/* 首屏占满整个视口：作品区完全在折叠线外 */
.dj-first { min-height: 100vh; }

/* 页眉磨砂玻璃（浅色/深色） */
#header, #header .nav {
  background-color: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
body[theme='dark'] #header, body[theme='dark'] #header .nav,
body[theme='black'] #header, body[theme='black'] #header .nav {
  background-color: rgba(28, 32, 40, 0.55) !important;
}

/* 主题切换：圆环扩散过渡 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2147483646; }

/* ================================================================
   v8 补丁：清晰壁纸 + 轻遮罩 + 黑白双主题
   ================================================================ */
/* 遮罩调轻：让壁纸清晰可见，只保留一点点压暗 */
#dj-dusk-bg .dj-dusk-overlay {
  background: linear-gradient(180deg, rgba(16, 20, 30, 0.18), rgba(16, 20, 30, 0.34));
}
body[theme='dark'] #dj-dusk-bg .dj-dusk-overlay,
body[theme='black'] #dj-dusk-bg .dj-dusk-overlay {
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.42), rgba(10, 12, 20, 0.58));
}
/* 光斑柔光在清晰壁纸上太抢，移除 */
#glow-bg { display: none !important; }

/* ================================================================
   主页 v9：动态视频壁纸 + 页眉无 logo 磨砂透明
   ================================================================ */

/* 动态视频背景（替代静态图） */
#dj-video-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
#dj-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#dj-dusk-bg { display: none !important; } /* 旧静态图背景停用 */

/* 轻遮罩：一点点压暗保证可读 */
#dj-video-bg .dj-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.16), rgba(12, 16, 24, 0.3));
}
body[theme='dark'] #dj-video-bg .dj-video-overlay,
body[theme='black'] #dj-video-bg .dj-video-overlay {
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.3), rgba(8, 10, 16, 0.44));
}

/* 页眉：无 logo，整体磨砂透明 */
/* 页眉标题 = 「首页」入口，保留 */
header, header .nav {
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
body[theme='dark'] header, body[theme='dark'] header .nav,
body[theme='black'] header, body[theme='black'] header .nav {
  background-color: rgba(16, 20, 28, 0.32) !important;
}
/* 菜单文字加一点投影保证在亮背景上可读 */
#header .menu-item, #header .menu-item a {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* 页眉搜索框玻璃化 */
header .search input, header .search-input {
  background-color: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: inherit;
}
body[theme='dark'] header .search input,
body[theme='black'] header .search input {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ================================================================
   访客特效设置面板（⚙️ 按钮 + 玻璃面板，localStorage 持久化）
   ================================================================ */
.dj-fx-gear {
  position: fixed;
  right: 30px;
  bottom: 150px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 18px;
  cursor: pointer;
  z-index: 90;
  transition: transform 0.25s ease;
}
.dj-fx-gear:hover { transform: rotate(90deg) scale(1.08); }
body[theme='dark'] .dj-fx-gear, body[theme='black'] .dj-fx-gear {
  background: rgba(40, 46, 56, 0.4);
  border-color: rgba(255, 255, 255, 0.18);
}
.dj-fx-panel {
  position: fixed;
  right: 22px;
  bottom: 202px;
  width: 240px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 30px rgba(80, 110, 200, 0.16);
  z-index: 95;
  color: var(--t-dark, #4a7fd4);
}
body[theme='dark'] .dj-fx-panel, body[theme='black'] .dj-fx-panel {
  background: rgba(40, 45, 54, 0.5);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: #e6eaf0;
}
.dj-fx-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.dj-fx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.dj-fx-toggle {
  border: none;
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: #7bd88f;
  color: #14351f;
}
.dj-fx-toggle.off { background: #c9ced6; color: #4a4f57; }
.dj-fx-blur { width: 110px; accent-color: #f78fb3; }
.dj-fx-note { font-size: 0.68rem; opacity: 0.55; margin-top: 2px; }

/* ================================================================
   v10：设置入口挪进页眉（右上），面板挂页眉下方
   ================================================================ */
.dj-fx-gear { display: none !important; } /* 旧浮动齿轮停用 */
.dj-fx-panel {
  left: 50%;
  right: auto;
  bottom: auto;
  top: 64px;
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.dj-fx-panel:not([hidden]) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
/* 页眉"首页"文字用可爱字体加重一点 */

/* ================================================================
   v10：页眉居中（Win11 任务栏式）+ 壁纸切换面板样式
   ================================================================ */
#dj-video-bg img { width: 100%; height: 100%; object-fit: cover; }
.dj-fx-wall {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  border-radius: 10px;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.dj-fx-wall.active {
  border-color: #7fb0e8;
  background: rgba(127, 176, 232, 0.25);
}
.dj-fx-url {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: inherit;
}
.dj-fx-apply {
  border: none;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  background: #7fb0e8;
  color: #10203a;
}
.dj-fx-label { font-size: 0.78rem; opacity: 0.7; margin-bottom: 6px; }
.dj-fx-walls { display: flex; gap: 8px; margin-bottom: 10px; }
.dj-fx-apply:active { transform: scale(0.96); }
#back-to-top-button { transition: transform 0.2s ease; }
#back-to-top-button:hover { transform: scale(1.12); }

/* 菜单自带 margin-left:auto，会破坏居中——压掉 */

/* ================================================================
   v11：轻量纯 CSS 渐变背景（零媒体，不卡电脑）
   ================================================================ */
#dj-simple-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 72% 88%, rgba(94, 118, 184, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 40% at 18% 78%, rgba(120, 90, 150, 0.22), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(40, 60, 110, 0.4), transparent 75%),
    linear-gradient(180deg, #171c26 0%, #1a2130 45%, #1e2740 100%);
}
body[theme='light'] #dj-simple-bg, [theme='light'] #dj-simple-bg {
  background:
    radial-gradient(ellipse 60% 45% at 72% 88%, rgba(255, 214, 232, 0.5), transparent 70%),
    radial-gradient(ellipse 50% 40% at 18% 78%, rgba(214, 226, 250, 0.6), transparent 70%),
    linear-gradient(180deg, #f5f2ec 0%, #eef0f6 55%, #e4e9f5 100%);
}

/* 品牌图标：CSS mask + currentColor（黑白单色，随主题变色） */
.dj-brand-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

/* ================================================================
   v13：页眉整组居中（真正的）+ 首页字体统一 + 手机视频浅适配
   ================================================================ */
/* 根因：DoIt 给 .header-title 设了 flex 撑满（765px），把菜单顶到右边 */
/* 首页字体和导航栏统一 */
/* 手机端视频壁纸浅浅适配：遮罩稍强 + 轻微压暗 */
@media (max-width: 720px) {
  #dj-video-bg .dj-video-overlay {
    background: linear-gradient(180deg, rgba(8, 10, 16, 0.3), rgba(8, 10, 16, 0.46));
  }
  #dj-video-bg video { filter: brightness(0.92); }
  .dj-first { min-height: calc(100vh - 120px); }
}

/* 菜单不再撑满右半边，让整组跟随居中 */

/* ================================================================
   v14：开场动画 —— 默认只有居中头像+磨砂波纹，点击后卡片向两边
   展开成长条、正文栏目渐显（跳过逻辑见 custom.js initIntro）
   ================================================================ */
.dj-intro-lock { overflow: hidden; }

/* 身份卡：宽度/圆角可过渡（展开动画的主演）
   [fix] border-box：content-box 下 width:100% 会加上自身 padding/border，
   手机端卡片比屏幕宽出一截、看起来不居中 */
.dj-idcard {
  box-sizing: border-box;
  width: 100%;
  transition: transform 0.22s cubic-bezier(0.2, 1, 0.3, 1),
              box-shadow 0.22s ease,
              width 0.65s cubic-bezier(0.3, 1.3, 0.4, 1),
              border-radius 0.65s ease;
}

/* 开场态：卡片收缩成头像圆盘 */
.dj-home.dj-intro .dj-idcard {
  width: 152px;
  margin-inline: auto;
  padding: 24px;
  border-radius: 50%;
  cursor: pointer;
}
.dj-home.dj-intro .dj-idcard-text { display: none; }
.dj-home.dj-intro [data-dj-reveal] { opacity: 0 !important; }

/* 波纹：磨砂质感圆环向外闪动，引导点击 */
.dj-ripple {
  display: none;
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
}
.dj-home.dj-intro .dj-ripple {
  display: block;
  animation: dj-ripple 2.6s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}
.dj-home.dj-intro .dj-ripple:nth-of-type(2) { animation-delay: 0.85s; }
.dj-home.dj-intro .dj-ripple:nth-of-type(3) { animation-delay: 1.7s; }
@keyframes dj-ripple {
  0% { transform: scale(0.9); opacity: 0.75; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 开场时头像轻轻呼吸 */
.dj-home.dj-intro .dj-avatar { animation: dj-breathe 2.6s ease-in-out infinite; }
@keyframes dj-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* 展开后：卡片文字渐显（标题打字机由 JS 在此时启动） */
.dj-home:not(.dj-intro) .dj-idcard-text {
  animation: dj-idcard-text-in 0.55s ease 0.3s both;
}
@keyframes dj-idcard-text-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dj-home.dj-intro .dj-ripple { animation: none; opacity: 0.5; }
  .dj-home.dj-intro .dj-avatar { animation: none; }
  .dj-idcard { transition: none; }
  .dj-home:not(.dj-intro) .dj-idcard-text { animation: none; }
}

/* ================================================================
   v15：反馈修复 —— 手机端设置面板稳妥居中、头像圆盘随屏幕自适应、
   首屏用 svh 防止手机地址栏导致的不居中
   ================================================================ */

/* 设置面板：left/right 归零 + margin auto 居中（比 translateX 更稳），
   窄屏时自动收窄不贴边 */
.dj-fx-panel {
  box-sizing: border-box;
  left: 0;
  right: 0;
  top: 64px;
  width: min(240px, calc(100vw - 24px));
  margin-inline: auto;
  transform: translateY(-8px);
}
.dj-fx-panel:not([hidden]) { transform: translateY(0); }

/* 头像尺寸：小屏缩小一点，大屏略放大（圆盘卡片跟着变） */
.dj-home { --dj-avatar-size: clamp(84px, 18vw, 112px); }
.dj-home .dj-avatar {
  width: var(--dj-avatar-size);
  height: var(--dj-avatar-size);
}
.dj-home.dj-intro .dj-idcard {
  width: calc(var(--dj-avatar-size) + 2 * clamp(18px, 4vw, 26px) + 4px);
  padding: clamp(18px, 4vw, 26px);
}
@media (max-width: 680px) {
  .dj-home { --dj-avatar-size: clamp(76px, 21vw, 96px); }
}

/* 首屏高度用 svh：手机浏览器地址栏收起/展开时头像仍然真正居中 */
.dj-first {
  min-height: calc(100vh - 140px);
  min-height: calc(100svh - 140px);
}
@media (max-width: 720px) {
  .dj-first {
    min-height: calc(100vh - 120px);
    min-height: calc(100svh - 120px);
  }
}

/* ================================================================
   v16：关于/作品/文章页 —— 磨砂玻璃外框卡片
   （这些页面文字原来直接压在视频壁纸上，黑主题下看不清；
   套上和主页同款的磨砂卡，正文配色也明确到两个主题）
   ================================================================ */
.page.single {
  box-sizing: border-box;
  margin-top: 96px; /* 给固定页眉让位（main 的 margin 已被页眉改版清零），96 留出舒服的呼吸空隙 */
  padding: 1.4rem 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(80, 110, 200, 0.16);
}
body[theme="dark"] .page.single,
body[theme="black"] .page.single {
  background: rgba(38, 43, 52, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* 正文与标题配色：亮主题墨色、黑主题浅色，副标题/次要信息降一档但仍可读 */
.page.single .single-title { color: #2c3440; }
.page.single .single-subtitle { color: #5a6472; }
.page.single .content { color: #3c4450; }
body[theme="dark"] .page.single .single-title,
body[theme="black"] .page.single .single-title { color: #f2f5fa; }
body[theme="dark"] .page.single .single-subtitle,
body[theme="black"] .page.single .single-subtitle { color: #c3ccd9; }
body[theme="dark"] .page.single .content,
body[theme="black"] .page.single .content { color: #e9edf4; }

/* 手机端内边距收一点 */
@media (max-width: 680px) {
  .page.single { padding: 1.1rem 1.15rem; }
}

/* v16 补充：首页身份卡副标题黑主题配色（原来带透明度显得发灰） */
body[theme="dark"] .dj-home .dj-idcard-sub,
body[theme="black"] .dj-home .dj-idcard-sub { color: #d9e2ef; opacity: 1; }

/* ================================================================
   v17：反馈修复
   1) pjax 切页动画会让磨砂卡瞬间失去模糊（祖先 opacity/transform
      把 backdrop-filter 的采样范围切断了），含磨砂卡的页面直接停用
   2) 作品卡片：磨砂底 + 描线边框，替代原来的全白/全黑
   3) 作品卡之间、与外框之间隔开一点
   ================================================================ */
body.pjax-in main.main .container:has(.page.single),
body.pjax-in main.main .container:has(.dj-card) { animation: none; }

.page.single .showcase-box {
  box-sizing: border-box;
  width: calc(50% - 12px);
  margin: 14px 0 0 0;
  border: 2px solid rgba(45, 54, 68, 0.75);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(80, 110, 200, 0.12);
}
.page.single .showcase-box + .showcase-box { margin-left: 16px; }
body[theme="dark"] .page.single .showcase-box,
body[theme="black"] .page.single .showcase-box {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(40, 45, 54, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
@media (max-width: 680px) {
  .page.single .showcase-box,
  .page.single .showcase-box + .showcase-box {
    width: 100%;
    margin-left: 0;
    margin-top: 14px;
  }
}
