/* ===== 米白浅色主题：暖白底 + 橙黄强调（Corona Studio 式编辑排版风）=====
   三层暖白纵深：#F8F6F0 页面底 · #FFFFFF 卡片 · #F1EEE6 hover
   强调橙黄 #FFB21A · 浅底上的链接/强调深橙棕 #815000（保证对比度）
   直角 + 1px 细边框，靠留白与编号排版分层；卡片/按钮/输入框圆角归零 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 三层暖白纵深：#F8F6F0 页面底 · #FFFFFF 卡片 · #F1EEE6 hover */
  --miku: #FFB21A;          /* 主强调橙黄 */
  --miku-dark: #E09A00;     /* 深一档（hover） */
  --miku-light: #FFD166;    /* 浅一档 */
  --miku-ink: #815000;      /* 浅底上的链接/强调深橙棕（保证对比度） */
  --bg: #F8F6F0;
  --bg-2: #FFFFFF;
  --bg-3: #F1EEE6;
  --bg-4: #E9E5DA;
  --text: #29251F;
  --text-light: #5D574D;
  --text-mute: #8B8478;
  --text-dim: #6B655A;      /* 之前漏定义的变量，AI 挂件在用 */
  --magenta: #C8375A;
  --yellow: #8A6A15;        /* 浅底上的金色，需压深 */
  --border: rgba(41, 37, 31, .12);
  --border-strong: rgba(41, 37, 31, .22);
  --orange-soft: rgba(255, 178, 26, .14);
  --orange-line: rgba(255, 178, 26, .5);
  --danger: #B52D37;
  --radius: 0px;            /* 直角体系：卡片 / 按钮 / 输入框 */
  --radius-lg: 0px;
  /* 浅底投影：低扩散 + 低不透明度，靠边框和留白分层 */
  --shadow-sm: 0 1px 2px rgba(41, 37, 31, .06);
  --shadow-md: 0 6px 20px -10px rgba(41, 37, 31, .18);
  --shadow-lg: 0 18px 40px -18px rgba(41, 37, 31, .22);
}

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  /* 顶部一团极淡的橙色光晕，让纯黑不至于死板 */
  background-image:
    radial-gradient(ellipse 900px 420px at 50% -10%, rgba(255, 178, 26, .16), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.container { width: min(920px, 92%); margin: 0 auto; }
main.container { flex: 1; padding: 40px 0 64px; }

a { color: var(--miku-ink); text-decoration: none; transition: color .18s; }
a:hover { color: var(--miku-light); }

::selection { background: rgba(255, 178, 26, .45); color: #29251F; }

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #D8D3C8; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #C5BFB2; }

/* ===== 首屏加载条（仅首次进入显示；毛玻璃遮罩盖住内容）===== */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(248, 246, 240, .72);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  transition: opacity .26s cubic-bezier(.33, 0, .15, 1), visibility .26s cubic-bezier(.33, 0, .15, 1);
}
#page-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
/* 非首次进入：<html> 带 skip-loader，直接不渲染加载层 */
html.skip-loader #page-loader { display: none; }

.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-logo {
  font-size: 22px; font-weight: 800; letter-spacing: 6px; color: var(--text);
}
.loader-logo i { color: var(--miku); font-style: normal; }
.loader-track {
  width: 220px; height: 3px; border-radius: 99px;
  background: rgba(41, 37, 31, .1); overflow: hidden;
}
.loader-bar {
  display: block; width: 40%; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--miku), transparent);
  animation: scan 1.1s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes scan {
  from { transform: translateX(-260%); }
  to { transform: translateX(300%); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-bar { animation: none !important; }
}

/* 加载期间：页面内容被毛玻璃盖住（loader 本身也 blur，这里是双保险 + 平滑揭开） */
.site-header, main.container, .site-footer {
  transition: filter .26s cubic-bezier(.33, 0, .15, 1);
}
body.frosted .site-header,
body.frosted main.container,
body.frosted .site-footer {
  filter: blur(14px) saturate(.7) brightness(.85);
}

/* ===== 头部导航：扁平深色 sticky 栏 ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(248, 246, 240, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px;
}

.logo {
  font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: .5px;
}
.logo:hover { color: var(--text); text-decoration: none; }
.logo-dot { color: var(--miku); }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a {
  padding: 6px 13px; border-radius: var(--radius);
  color: var(--text-light); font-size: 14.5px; line-height: 1.4;
  border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}
.nav a:hover {
  color: var(--text); text-decoration: none;
  background: var(--bg-3);
}
.nav a.is-active {
  color: var(--miku-ink);
  background: var(--orange-soft);
  border-color: var(--orange-line);
}
.nav a.nav-admin { color: var(--text-mute); }

/* ===== 右上角登录区 ===== */
.auth-corner {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.login-btn {
  display: inline-block; padding: 6px 20px;
  background: var(--miku);
  color: #2D210D !important; font-weight: 600; font-size: 13.5px;
  border-radius: var(--radius); text-decoration: none !important;
  transition: background .18s;
}
.login-btn:hover { background: var(--miku-dark); }
.auth-chip {
  font-size: 12.5px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--orange-line);
  background: var(--orange-soft); color: var(--miku-ink);
}
.admin-chip {
  border-color: rgba(232, 179, 57, .4);
  background: rgba(232, 179, 57, .1); color: var(--yellow);
}
.auth-link { font-size: 13px; color: var(--text-mute); }
.auth-link:hover { color: var(--text); }

/* ===== Hero（首页门厅：左头像 + 右文字）===== */
.hero { padding: 72px 0 56px; }
.hero-grid { display: flex; align-items: center; gap: 56px; }
.hero-avatar { flex-shrink: 0; }
.avatar-img {
  width: 180px; height: 180px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 4px var(--bg-3);
  transition: box-shadow .3s, transform .3s;
}
.avatar-img:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 4px var(--orange-soft), 0 0 0 5px var(--orange-line);
}
.hero-text { text-align: left; }
.hero-hello { font-size: 14px; color: var(--text-mute); letter-spacing: 3px; }
.hero-name {
  font-size: clamp(34px, 5.5vw, 52px);
  font-weight: 800; letter-spacing: 2px; margin: 6px 0 14px;
  color: var(--text);
}
.hero-tagline { font-size: 16.5px; color: var(--text-light); margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== 通用区块 ===== */
.home-section { margin-top: 28px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px;
}
.section-head h2 { font-size: 21px; color: var(--text); }
.section-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 17px;
  background: var(--miku); border-radius: 2px; margin-right: 10px;
  vertical-align: -3px;
}
.more-link { font-size: 14px; color: var(--text-mute); }
.more-link:hover { color: var(--miku-ink); }

.page-hero { text-align: center; padding: 24px 0 12px; margin-bottom: 26px; }
.page-hero h1 { font-size: 29px; color: var(--text); }
.page-hero p { color: var(--text-light); margin-top: 6px; }

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  background: var(--miku);
  color: #2D210D !important; font-weight: 600;
  padding: 10px 26px; border: none; border-radius: var(--radius); cursor: pointer;
  font-size: 14.5px; text-decoration: none !important; letter-spacing: .5px;
  transition: background .18s, transform .18s;
}
.btn-primary:hover { background: var(--miku-dark); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block; padding: 10px 26px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  color: var(--text) !important; font-size: 14.5px;
  text-decoration: none !important;
  background: var(--bg-2);
  transition: border-color .18s, background .18s;
}
.btn-ghost:hover {
  border-color: var(--orange-line); background: var(--bg-3);
}

/* ===== 作品卡片 ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  color: var(--text); display: block;
  transition: transform .2s, border-color .2s, background .2s;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-3);
  text-decoration: none;
}
.project-thumb {
  height: 150px; display: flex; align-items: center; justify-content: center;
  font-size: 44px; position: relative; overflow: hidden;
  color: var(--miku-ink);
  background: linear-gradient(135deg, rgba(255, 178, 26, .16), rgba(255, 178, 26, .05));
}
.project-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(41, 37, 31, .3));
}
.thumb-glyph { position: relative; z-index: 2; }
.thumb-badge {
  position: absolute; z-index: 2; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; line-height: 1.6;
  background: rgba(255, 255, 255, .94); color: var(--miku-ink);
  border: 1px solid var(--orange-line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.thumb-badge svg { width: 12px; height: 12px; fill: currentColor; }
.project-body { padding: 16px 18px 20px; }
.project-cat {
  display: inline-block; font-size: 12px; color: var(--miku-ink);
  border: 1px solid var(--orange-line); border-radius: 999px;
  padding: 1px 10px; margin-bottom: 8px;
  background: var(--orange-soft);
}
.project-body h3 { font-size: 17px; margin-bottom: 4px; color: var(--text); }
.project-body p { font-size: 13.5px; color: var(--text-light); line-height: 1.6; }

/* ===== 分类筛选 ===== */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px;
}
.filter-btn {
  padding: 6px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-light);
  font-size: 14px; cursor: pointer; transition: all .18s;
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
  background: var(--miku);
  border-color: var(--miku); color: #2D210D; font-weight: 600;
}

/* ===== 博客列表 ===== */
.blog-hero .search-form { max-width: 420px; margin: 18px auto 0; }
.search-form { display: flex; }
.search-form input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; outline: none;
  background: var(--bg-2); color: var(--text);
}
.search-form input::placeholder { color: var(--text-mute); }
.search-form input:focus { border-color: var(--orange-line); box-shadow: 0 0 0 3px var(--orange-soft); }
.search-form button {
  padding: 10px 22px; border: none;
  background: var(--miku);
  color: #2D210D; font-weight: 600;
  border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 14px;
}
.search-form button:hover { background: var(--miku-dark); }
.search-meta { color: var(--text-light); font-size: 14px; margin-bottom: 14px; }

.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex; align-items: center; gap: 22px;
  padding: 20px 16px; border-bottom: 1px solid var(--border);
  color: var(--text); transition: background .18s, padding-left .18s;
  border-radius: var(--radius);
}
.post-row:first-child { border-top: 1px solid var(--border); }
.post-row:hover {
  background: var(--bg-3);
  padding-left: 22px;
  text-decoration: none;
}
.post-date { font-size: 13px; color: var(--text-mute); min-width: 88px; }
.post-row-main { flex: 1; display: flex; flex-direction: column; }
.post-row-title { font-size: 16.5px; font-weight: 600; }
.post-row:hover .post-row-title { color: var(--miku-ink); }
.post-row-summary { font-size: 13.5px; color: var(--text-light); margin-top: 2px; }
.post-arrow { color: var(--text-mute); font-size: 18px; transition: color .18s, transform .18s; }
.post-row:hover .post-arrow { color: var(--miku); transform: translateX(4px); }

/* ===== 分页 ===== */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 20px; margin-top: 34px; color: var(--text-light); font-size: 14px;
}

/* ===== 文章详情 ===== */
.post-detail {
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 42px 46px;
}
.post-detail h1 { font-size: 26px; margin-bottom: 10px; color: var(--text); }
.post-meta {
  font-size: 13px; color: var(--text-mute);
  margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.post-content h2 { font-size: 20px; margin: 26px 0 10px; color: var(--miku-ink); }
.post-content h3 { font-size: 17px; margin: 20px 0 8px; color: var(--miku-ink); }
.post-content p { margin: 10px 0; }
.post-content ul { margin: 10px 0 10px 22px; }
.post-content li::marker { color: var(--miku); }
.post-content strong { color: var(--text); }
.post-content blockquote {
  border-left: 3px solid var(--miku);
  background: var(--orange-soft);
  padding: 10px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 14px 0;
  color: var(--text-light);
}
.post-content code {
  background: var(--bg-4); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 5px;
  font-family: Consolas, "Courier New", monospace; font-size: 13.5px;
  color: var(--miku-ink);
}
.post-content pre {
  background: var(--bg-3); color: var(--text); padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; margin: 14px 0;
}
.post-content pre code { background: none; border: none; color: inherit; padding: 0; }
.back-link { display: inline-block; margin-top: 28px; font-size: 14px; }

/* ===== 评论区 ===== */
.comments { margin-top: 34px; }
.comments-title {
  font-size: 19px; margin-bottom: 18px; color: var(--text);
}
.comments-title::before {
  content: ""; display: inline-block; width: 4px; height: 16px;
  background: var(--miku); border-radius: 2px; margin-right: 10px;
  vertical-align: -2px;
}
.comment {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px;
}
.comment-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.comment-name { font-size: 14px; font-weight: 600; color: var(--miku-ink); }
.comment-name.is-author { color: var(--yellow); }
.comment-name.is-author::after {
  content: "作者"; font-size: 11px; color: #FFFFFF; background: var(--yellow);
  border-radius: 4px; padding: 0 6px; margin-left: 8px; font-weight: 600;
}
.comment-time { font-size: 12.5px; color: var(--text-mute); }
.comment-body { font-size: 14.5px; color: var(--text); white-space: pre-wrap; }
.comment-form, .comment-login {
  margin-top: 18px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px;
}
.comment-form textarea, .comment-login input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none;
  background: var(--bg); color: var(--text); font-family: inherit;
}
.comment-form textarea { resize: vertical; margin-bottom: 12px; }
.comment-form textarea:focus, .comment-login input:focus {
  border-color: var(--orange-line); box-shadow: 0 0 0 3px var(--orange-soft);
}
.comment-login .login-row { display: flex; gap: 12px; margin-bottom: 12px; }
.comment-login .login-row input { margin: 0; flex: 1; }
.comment-login .login-row .btn-inline { flex-shrink: 0; white-space: nowrap; }
.comment-login .hint-line { font-size: 13.5px; color: var(--text-light); margin-bottom: 12px; }
.comment-identity {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-mute); margin-bottom: 10px;
}
.comment-identity .who { color: var(--miku-ink); }
.comment-identity a { font-size: 12.5px; color: var(--text-mute); }
.comment-identity a:hover { color: var(--text); }

/* ===== 关于我 ===== */
.about-hero h1 { font-size: 30px; margin-bottom: 26px; }
.about-grid {
  display: grid; grid-template-columns: 300px 1fr; gap: 40px;
  align-items: start; margin-bottom: 46px;
}
.about-photo-wrap { text-align: center; }
.about-img {
  width: 230px; height: 230px; border-radius: var(--radius-lg); object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 4px var(--bg-3);
}
.fun-facts { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fact-chip {
  font-size: 12.5px; color: var(--miku-ink); background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  border-radius: 999px; padding: 4px 14px;
}
.about-bio { font-size: 15.5px; margin-bottom: 14px; }
.skill-wrap h3, .timeline-section h2 { font-size: 18px; margin-bottom: 14px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-light); border-radius: var(--radius); padding: 5px 14px; font-size: 13.5px;
  transition: border-color .18s, color .18s, background .18s;
}
.skill-tag:hover {
  border-color: var(--orange-line); color: var(--miku-ink);
  background: var(--bg-3);
}

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--miku), var(--border));
}
.timeline-item { position: relative; padding: 0 0 24px 18px; }
.timeline-node {
  position: absolute; left: -26px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--miku); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--orange-line);
}
.timeline-year { font-size: 13px; color: var(--yellow); font-weight: 700; margin-bottom: 4px; }
.timeline-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  transition: border-color .18s;
}
.timeline-card:hover { border-color: var(--border-strong); }
.timeline-card h3 { font-size: 15.5px; color: var(--text); }
.timeline-card p { font-size: 13.5px; color: var(--text-light); }

/* ===== 作品详情 ===== */
.project-detail {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.project-detail-hero {
  height: 220px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 178, 26, .2), rgba(255, 178, 26, .06));
}
.project-detail-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.project-detail-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(41, 37, 31, .25));
}
.project-detail-emoji { font-size: 72px; position: relative; z-index: 2; }
.project-detail-body { padding: 30px 40px 40px; }
.project-detail-body h1 { font-size: 26px; margin: 8px 0 6px; }
.project-detail-desc { color: var(--text-light); font-size: 15px; margin-bottom: 24px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.meta-grid > div {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; font-size: 14px;
}
.meta-label { display: block; font-size: 12.5px; color: var(--text-mute); margin-bottom: 2px; }
.project-detail-text h2 { font-size: 18px; margin-bottom: 10px; color: var(--miku-ink); }
.project-detail-text p { font-size: 15px; }
.project-detail .form-actions { margin-top: 28px; }

/* ===== 联系我 ===== */
.contact-wrap { max-width: 640px; margin: 0 auto; }
.contact-hero { text-align: center; margin-bottom: 34px; }
.contact-hero h1 { font-size: 30px; margin-bottom: 8px; }
.contact-hero p { color: var(--text-light); }
.contact-email { font-size: 14px; margin-top: 8px; }
.contact-form {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px 32px;
}
.form-row { display: flex; gap: 16px; }
.form-col { flex: 1; }
.contact-form label, .edit-form label {
  display: block; font-size: 13.5px; color: var(--text-light); margin: 14px 0 6px;
}
.contact-form label:first-child { margin-top: 0; }
.contact-form input, .contact-form textarea,
.edit-form input[type=text], .edit-form input[type=number], .edit-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none;
  background: var(--bg); color: var(--text); font-family: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-mute); }
.contact-form input:focus, .contact-form textarea:focus,
.edit-form input:focus, .edit-form textarea:focus {
  border-color: var(--orange-line); box-shadow: 0 0 0 3px var(--orange-soft);
}
.contact-form textarea { resize: vertical; }
.contact-form button { margin-top: 22px; }

/* ===== 登录 / 404 ===== */
.auth-card {
  max-width: 380px; margin: 48px auto;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 38px; text-align: center;
}
.auth-card h1 { font-size: 22px; margin-bottom: 18px; }
.auth-card form { text-align: left; }
.auth-card label { font-size: 14px; color: var(--text-light); display: block; margin-bottom: 6px; }
.auth-card input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; outline: none;
  background: var(--bg); color: var(--text);
}
.auth-card input:focus { border-color: var(--orange-line); box-shadow: 0 0 0 3px var(--orange-soft); }
/* 验证码行：输入框 + 获取按钮并排 */
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.code-btn { flex-shrink: 0; padding: 0 16px; font-size: 13.5px; height: 42px; }
.code-btn:disabled { opacity: .55; cursor: not-allowed; }
.opt-mark { font-weight: 400; font-size: 12px; color: var(--text-mute); }
.hint { font-size: 12.5px; color: var(--text-mute); margin-top: 14px; }
.login-switch { display: flex; justify-content: flex-end; margin-top: 6px; }
.login-switch a { font-size: 13.5px; color: var(--miku-ink); font-weight: 600; }
.login-switch a:hover { color: var(--miku-light); }

/* ===== 管理后台 ===== */
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-head h1 { font-size: 22px; }
.admin-quick { display: flex; gap: 12px; align-items: center; }
.inline-form { display: inline; margin-left: 10px; }
.admin-table {
  width: 100%; background: var(--bg-2); border-collapse: separate;
  border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14.5px;
}
.admin-table th { background: var(--bg-3); font-weight: 600; color: var(--text-light); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: 14px; align-items: center; }
.admin-table .actions form { display: inline; }
/* 用户表内的状态标签 */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--border); color: var(--text-light);
  background: var(--bg-3);
}
.tag-ok { border-color: var(--orange-line); color: var(--miku-ink); background: var(--orange-soft); }
.link-danger {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 14.5px; padding: 0;
}
.link-danger:hover { text-decoration: underline; }

/* 后台：AI 翻译操作 */
.link-btn {
  background: none; border: none; color: var(--miku-ink);
  cursor: pointer; font-size: 14.5px; padding: 0;
}
.link-btn:hover { text-decoration: underline; }
.ai-batch.admin-hint {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 9px 13px;
  background: var(--orange-soft); border: 1px solid var(--orange-line);
  border-radius: var(--radius); font-size: 13px; color: var(--text-light);
}
.ai-batch.admin-hint form { margin-left: auto; }
.message-block {
  background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid var(--miku);
  border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 12px;
}
.message-block .msg-head { font-size: 13px; color: var(--text-mute); }
.message-block .msg-body { font-size: 14.5px; margin-top: 4px; }
.admin-section-title { font-size: 18px; margin: 30px 0 16px; color: var(--text); }

/* ===== 编辑页 ===== */
.edit-wrap {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 40px;
}
.edit-wrap h1 { font-size: 22px; margin-bottom: 20px; }
.edit-form textarea { font-family: Consolas, "Courier New", monospace; line-height: 1.6; }
.form-actions { margin-top: 22px; display: flex; gap: 14px; }

/* ===== 提示 ===== */
.flash {
  background: var(--orange-soft); color: var(--miku-ink);
  border: 1px solid var(--orange-line);
  padding: 11px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14px;
}

.empty { color: var(--text-mute); text-align: center; padding: 30px 0; }

/* ===== 作品集空状态 ===== */
.portfolio-empty {
  text-align: center; padding: 76px 24px;
  background: var(--bg-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.portfolio-empty .pe-icon {
  font-size: 46px; line-height: 1; color: var(--miku);
  margin-bottom: 18px; opacity: .9;
  animation: peSpin 6s linear infinite;
}
@keyframes peSpin { to { transform: rotate(360deg); } }
.portfolio-empty h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }
.portfolio-empty p { color: var(--text-light); font-size: 14.5px; margin-bottom: 24px; }
@media (prefers-reduced-motion: reduce) {
  .portfolio-empty .pe-icon { animation: none; }
}

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 26px 0; text-align: center; color: var(--text-mute); font-size: 13.5px;
}
.footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer-email a { color: var(--text-mute); font-size: 13px; }
.footer-email a:hover { color: var(--miku-ink); }

/* ===== 博客列表缩略图 ===== */
.post-thumb {
  position: relative; width: 62px; height: 62px; flex-shrink: 0;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-3);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-count {
  position: absolute; right: 3px; bottom: 3px; z-index: 2;
  font-style: normal; font-size: 10.5px; line-height: 1.4;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--miku-ink);
  border: 1px solid var(--orange-line);
}
.post-row-meta { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }

/* ===== 帖子配图：展示画廊 ===== */
.post-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 0 0 26px;
}
.post-gallery[data-count="1"] { grid-template-columns: 1fr; }
.post-gallery .gallery-item {
  position: relative; display: block; width: 100%; padding: 0; line-height: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-3); cursor: zoom-in; font: inherit;
  transition: transform .2s, border-color .2s;
}
.post-gallery .gallery-item:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
}
.post-gallery .gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3;
}
.post-gallery[data-count="1"] .gallery-item img {
  aspect-ratio: auto; max-height: 460px; object-fit: contain;
}

/* ===== 图片灯箱 ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw; background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 86vh; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.lb-close {
  position: absolute; top: 16px; right: 18px; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: #FFFFFF; font-size: 22px;
  line-height: 1; cursor: pointer;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 68px; border: none; border-radius: var(--radius);
  background: rgba(255, 255, 255, .1); color: #FFFFFF; font-size: 30px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-close:hover, .lb-nav:hover { background: var(--miku); }
.lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: rgba(255, 255, 255, .85); letter-spacing: 1px;
}

/* ===== 下载按钮（带图标）===== */
.download-btn, .btn-primary.download-btn { display: inline-flex; align-items: center; gap: 8px; }
.download-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* 下载人数（按独立访客指纹去重，与「次数」分开显示） */
.dl-users {
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--text-mute);
  letter-spacing: .02em;
}

/* ===== 多线程加速下载引导 ===== */
.dl-tip {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  padding: 14px 18px;
}
.dl-tip summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--miku-ink);
  font-weight: 600;
  list-style-position: inside;
}
.dl-tip summary:hover { color: var(--text); }
.dl-tip p {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-light);
}
.dl-cmd-row {
  margin-top: 12px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.dl-cmd {
  flex: 1 1 320px;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  padding: 9px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
}
.dl-copy {
  flex: 0 0 auto;
  border: 1px solid var(--miku);
  background: var(--miku);
  color: var(--text);
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease;
}
.dl-copy:hover { background: var(--miku-light); }
.dl-copy.is-copied { background: var(--miku-ink); border-color: var(--miku-ink); color: var(--bg-2); }
.dl-hint { font-size: 12.5px !important; color: var(--text-mute) !important; }

/* ===== 快速下载通道 =====
   单独一块，用左侧竖线 + 浅底和普通下载区分开：
   访客一眼能看出「这条是快的」，但整体配色仍跟随站点主题。 */
.dl-fast {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--miku);
  background: var(--bg-2);
  padding: 16px 18px 18px;
}
.dl-fast-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-fast-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--miku-ink);
  background: var(--miku);
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.dl-fast-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}
.dl-fast-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dl-fast-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dl-fast-btn svg { width: 17px; height: 17px; fill: currentColor; }
.dl-fast-size {
  font-size: 13px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.dl-fast-cmd {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.dl-fast-cmd-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}


/* ===== Windows 桌面客户端入口 =====
   复用 .dl-fast 的骨架，但左边线换成强调橙黄，
   与「快速通道」区分开，提示这是另一条路径。 */
.dl-client {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--miku);
  background: var(--bg-2);
  padding: 16px 18px 18px;
}
.dl-client .dl-fast-badge {
  color: #2d210d;
  background: var(--miku);
}
.dl-client .dl-fast-size {
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 460px;
  font-variant-numeric: normal;
}


.dl-client-ver {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--miku-ink);
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  padding: 3px 9px;
  white-space: nowrap;
}
.dl-client-src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dl-client-src svg { width: 16px; height: 16px; fill: currentColor; }
.dl-client-notes {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--text-mute);
  line-height: 1.65;
}

/* ===== 下载落地页：正在下载 + 30 秒后客户端提示 ===== */
.dl-page {
  max-width: 620px; margin: 8px auto 0;
  display: flex; flex-direction: column; gap: 22px;
}
.dl-page-card {
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 44px 40px 36px; text-align: center;
}
.dl-spinner {
  width: 44px; height: 44px; margin: 0 auto 22px;
  border: 3px solid var(--orange-soft);
  border-top-color: var(--miku);
  border-radius: 999px;
  animation: dl-spin .8s linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }
.dl-page-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.dl-page-file { margin-top: 8px; font-size: 14px; color: var(--text-light); }
.dl-page-tip { margin-top: 12px; font-size: 13.5px; color: var(--text-mute); }
.dl-page-track {
  margin: 26px auto 0; max-width: 380px; height: 4px; overflow: hidden;
  background: var(--bg-4);
}
.dl-page-bar {
  display: block; height: 100%; width: 38%;
  background: var(--miku);
  animation: dl-bar 1.3s ease-in-out infinite;
}
@keyframes dl-bar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(300%); }
}
.dl-page-foot {
  margin-top: 26px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.dl-page-count { font-size: 12.5px; color: var(--text-mute); }

.dl-prompt {
  background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid var(--miku); padding: 20px 22px 18px;
}
.dl-prompt-head { margin-bottom: 8px; }
.dl-prompt-badge {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--miku-ink);
}
.dl-prompt-desc { font-size: 13.5px; line-height: 1.8; color: var(--text-light); }
.dl-prompt-actions { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-prompt-actions .btn-primary,
.dl-prompt-actions .btn-ghost { padding: 8px 16px; font-size: 13px; }
.dl-prompt-ver {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px; color: var(--text-mute);
  border: 1px solid var(--border); padding: 1px 8px;
}
.dl-prompt-keep { margin-top: 12px; font-size: 12.5px; color: var(--text-mute); }
.dl-trigger {
  position: absolute; width: 0; height: 0; border: 0;
  visibility: hidden;
}

/* ===== 帖子编辑器（多图 + 实时预览）===== */
.post-editor { padding: 26px 26px 32px; }
.editor-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.editor-head h1 { font-size: 22px; }
.seg-switch {
  display: none; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
}
.seg-btn {
  border: none; background: none; color: var(--text-light);
  font-size: 13px; padding: 6px 18px; border-radius: 999px;
  cursor: pointer; font-family: inherit; transition: color .2s;
}
.seg-btn.is-active {
  background: var(--miku);
  color: #2D210D; font-weight: 600;
}
.editor-layout {
  display: grid; gap: 24px; align-items: start;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
.preview-pane { position: sticky; top: 84px; }
.preview-tag {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font-size: 12.5px; letter-spacing: 1.5px; color: var(--text-mute);
}
.preview-tag svg { width: 14px; height: 14px; fill: currentColor; }
.preview-article { padding: 24px 24px 28px; }
.preview-article h1 { font-size: 21px; }
.preview-article .post-meta { margin-bottom: 18px; padding-bottom: 12px; }
.preview-article .post-content { font-size: 14.5px; }
.pv-empty { color: var(--text-mute); font-size: 14px; }

/* 配图管理 */
.image-manager { margin-top: 22px; }
.img-label { display: block; font-size: 13.5px; color: var(--text-light); margin-bottom: 8px; }
.drop-zone {
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg);
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-over {
  outline: none; border-color: var(--orange-line); background: var(--orange-soft);
}
.drop-zone svg { width: 34px; height: 34px; fill: var(--miku-ink); opacity: .9; }
.drop-zone p { font-size: 14px; color: var(--text); margin: 8px 0 2px; }
.drop-zone span { font-size: 12px; color: var(--text-mute); }

.img-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
  touch-action: pan-y;
}
.img-strip:empty { margin-top: 0; }
.img-item {
  position: relative; width: 92px; height: 92px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-3); cursor: grab;
  user-select: none; -webkit-user-select: none;
  transition: box-shadow .2s, border-color .2s, opacity .2s;
}
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.img-item:hover { border-color: var(--orange-line); }
.img-item.is-dragging {
  position: fixed; z-index: 9999; cursor: grabbing;
  transform: scale(1.06) rotate(1.5deg); border-color: var(--miku);
  box-shadow: 0 18px 40px rgba(41, 37, 31, .28);
}
.img-placeholder {
  border-radius: var(--radius); border: 1.5px dashed var(--orange-line);
  background: var(--orange-soft);
}
.img-index {
  position: absolute; left: 5px; top: 5px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--miku-ink);
  font-size: 11px; line-height: 18px; text-align: center;
}
.img-grip {
  position: absolute; right: 5px; top: 5px; z-index: 2;
  display: flex; flex-direction: column; gap: 2px; padding: 4px;
  border-radius: 6px; background: rgba(255, 255, 255, .94);
  cursor: grab; touch-action: none;
}
.img-grip i { display: block; width: 10px; height: 1.5px; border-radius: 2px; background: var(--text-light); }
.img-remove {
  position: absolute; right: 4px; bottom: 4px; z-index: 3;
  width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%;
  background: rgba(240, 80, 110, .92); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-remove:hover { background: var(--danger); }
.img-item.is-loading { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.img-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--orange-soft); border-top-color: var(--miku);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.img-hint {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 12.5px; color: var(--text-mute);
}
.img-hint svg { width: 14px; height: 14px; fill: var(--text-mute); flex-shrink: 0; }
/* 上传校验提示（跳过/超限的文件） */
.img-warn {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.55;
  color: var(--yellow);
  background: rgba(232, 179, 57, .1);
  border: 1px solid rgba(232, 179, 57, .35);
}
.img-warn::before { content: "!"; flex-shrink: 0; font-weight: 700; color: var(--yellow); }
.img-warn[hidden] { display: none; }
body.is-sorting { cursor: grabbing; }
body.is-sorting * { cursor: grabbing !important; }

/* ===== 管理后台：分区导航 / 上传面板 ===== */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-nav a {
  font-size: 13px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text-light);
}
.admin-nav a:hover { border-color: var(--orange-line); color: var(--miku-ink); }

.upload-panel {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 22px; overflow: hidden;
}
.upload-panel > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; font-size: 15.5px; font-weight: 600; color: var(--text);
  background: var(--bg-3);
}
.upload-panel[open] > summary { border-bottom: 1px solid var(--border); }
.upload-panel > summary::-webkit-details-marker { display: none; }
.upload-panel > summary .up-icon {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--miku-ink); font-weight: 700;
}
.upload-panel > summary em {
  margin-left: auto; font-style: normal; font-weight: 400;
  font-size: 12.5px; color: var(--text-mute);
}
.upload-form { padding: 20px; }
.upload-form label { display: block; font-size: 13.5px; color: var(--text-light); margin: 14px 0 6px; }
.upload-form label:first-child { margin-top: 0; }
.upload-form input[type=text], .upload-form textarea, .upload-form input[type=file] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none; font-family: inherit;
  background: var(--bg); color: var(--text);
}
.upload-form input[type=file] { padding: 8px 12px; font-size: 13px; }
.upload-form input[type=file]::file-selector-button {
  margin-right: 12px; padding: 6px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--orange-soft);
  color: var(--miku-ink); cursor: pointer; font-size: 13px; font-family: inherit;
}
.upload-form input:focus, .upload-form textarea:focus {
  border-color: var(--orange-line); box-shadow: 0 0 0 3px var(--orange-soft);
}
.upload-form textarea { resize: vertical; }
.upload-form .field-hint {
  display: block; margin-top: 7px;
  font-size: 12px; line-height: 1.6; color: var(--text-mute);
}
/* ===== 后台「站点信息」自助编辑（中英双语分组）=====
   配色/字体一律沿用 :root 里的变量，不额外引入新颜色 */
.site-form .form-row { margin-top: 0; }
.site-form .form-row .form-col > label { font-size: 12.5px; color: var(--text-mute); }
.site-bgroup {
  margin-top: 22px; padding: 16px 18px 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
}
.site-bgroup:first-of-type { margin-top: 20px; }
.site-bhead {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
}
.site-bhead em {
  display: block; margin-top: 4px; font-style: normal; font-weight: 400;
  font-size: 12px; line-height: 1.6; color: var(--text-mute);
}
.site-bgroup textarea { font-size: 13.5px; line-height: 1.7; }
.site-reset-form {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px 20px;
}
.site-reset-form .field-hint { margin-top: 0; }
.site-reset-btn {
  padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-2); color: var(--text-light); cursor: pointer;
  font-size: 13px; font-family: inherit; line-height: 1.5;
}
.site-reset-btn:hover { border-color: var(--orange-line); color: var(--miku-ink); }

.table-wrap { width: 100%; }

/* ===== 移动端底部导航（手机主导航）===== */
.tabbar { display: none; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
  .preview-pane { position: static; }
  .seg-switch { display: inline-flex; }
  .editor-pane, .preview-pane { display: none; }
  .editor-pane.is-active, .preview-pane.is-active { display: block; }
}

@media (max-width: 820px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .post-row { flex-wrap: nowrap; gap: 14px; }
  .post-arrow { display: none; }

  /* 顶部导航只留 Logo 与登录区，主导航下沉到底部 */
  .header-inner { padding: 10px 4px; }
  .nav { display: none; }
  .logo { font-size: 17px; }

  /* 底部导航：扁平深色面板 */
  .tabbar {
    display: flex; position: fixed; z-index: 30;
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 0px;
    background: rgba(248, 246, 240, .94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 32px -12px rgba(41, 37, 31, .3);
  }
  .tab-item {
    position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 2px 6px; border-radius: var(--radius-lg);
    color: var(--text-mute); font-size: 10.5px; letter-spacing: .5px;
    border: 1px solid transparent;
    transition: color .18s, background .18s, border-color .18s;
  }
  .tab-item svg { width: 22px; height: 22px; fill: currentColor; transition: transform .22s; }
  .tab-item.is-active {
    color: var(--miku-ink);
    background: var(--orange-soft);
    border-color: var(--orange-line);
  }
  .tab-item:active svg { transform: scale(.88); }

  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  main.container { padding-bottom: 28px; }
  .pagination { margin-bottom: 8px; }
}

@media (max-width: 640px) {
  main.container { padding: 24px 0 32px; }
  .hero { padding: 36px 0 30px; }
  .hero-grid { flex-direction: column; text-align: center; gap: 26px; }
  .hero-text { text-align: center; }
  .hero-actions { justify-content: center; }
  .avatar-img { width: 140px; height: 140px; }
  .about-img { width: 180px; height: 180px; }
  .project-grid { grid-template-columns: 1fr; }
  .post-detail { padding: 24px 18px; }
  .project-detail-hero { height: 176px; }
  .project-detail-body { padding: 22px 18px 28px; }
  .edit-wrap { padding: 22px 16px; }
  .post-editor { padding: 20px 16px 26px; }
  .form-row { flex-direction: column; gap: 0; }
  .meta-grid { grid-template-columns: 1fr; }
  .page-hero h1, .about-hero h1, .contact-hero h1 { font-size: 25px; }
  .post-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .post-gallery[data-count="1"] { grid-template-columns: 1fr; }
  .post-thumb { width: 54px; height: 54px; }
  .lb-nav { width: 38px; height: 58px; font-size: 26px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }

  /* 后台头部与快捷入口 */
  .admin-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .admin-quick { width: 100%; }
  .admin-quick .btn-primary, .admin-quick .btn-ghost { flex: 1; text-align: center; }
  .admin-nav { gap: 6px; }
  .admin-nav a { font-size: 12px; padding: 4px 11px; }
  .admin-section-title { font-size: 17px; margin: 26px 0 14px; }
  .upload-panel > summary { padding: 13px 16px; font-size: 14.5px; }
  .upload-panel > summary em { display: none; }
  .upload-form { padding: 16px; }
  .upload-form input[type=file] { font-size: 12.5px; }
  .site-bgroup { padding: 14px 14px 4px; }
  .site-reset-form { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 16px 16px; }

  /* 表格转卡片（后台移动端优化）*/
  .table-wrap .admin-table,
  .table-wrap .admin-table thead,
  .table-wrap .admin-table tbody,
  .table-wrap .admin-table tr,
  .table-wrap .admin-table td { display: block; width: 100%; }
  .table-wrap .admin-table { background: none; border: none; border-radius: 0; }
  .table-wrap .admin-table thead { display: none; }
  .table-wrap .admin-table tr {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 6px 14px; margin-bottom: 12px;
  }
  .table-wrap .admin-table td {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 9px 0; font-size: 14px;
    border-bottom: 1px dashed var(--border);
    word-break: break-word;
  }
  .table-wrap .admin-table tr td:last-child { border-bottom: none; }
  .table-wrap .admin-table td::before {
    content: attr(data-label); flex: 0 0 70px;
    font-size: 12.5px; color: var(--text-mute); line-height: 1.9;
  }
  .table-wrap .admin-table td.empty { display: block; text-align: center; padding: 18px 0; }
  .table-wrap .admin-table td.empty::before { content: none; }
  .table-wrap .admin-table .actions { gap: 16px; }
  .comment-login .login-row { flex-direction: column; gap: 10px; }
  .comment-login .login-row .btn-inline { width: 100%; }
}

/* ===== 作品：可直接在线运行的网页应用 ===== */
/* 卡片角标容器：可运行 / 可下载 两个角标并排 */
.thumb-badges {
  position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px;
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.thumb-badges .thumb-badge { position: static; right: auto; bottom: auto; }
.thumb-badge.is-run {
  background: var(--miku);
  color: #2D210D; border-color: var(--miku); font-weight: 700;
}
.thumb-badge.is-run svg { fill: #2D210D; }

/* 作品详情：运行提示 */
.run-note {
  margin-top: 18px; padding: 14px 17px; border-radius: var(--radius-lg);
  font-size: 13.5px; line-height: 1.8; color: var(--text-light);
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
}
.run-note b { color: var(--miku-ink); }
.run-btn, .btn-primary.run-btn { display: inline-flex; align-items: center; gap: 8px; }
.run-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* 后台：网页应用上传区 */
.app-box {
  margin-top: 20px; padding: 16px 18px; border-radius: var(--radius-lg);
  border: 1px dashed var(--orange-line);
  background: var(--orange-soft);
}
.app-box .app-label { margin-top: 0; color: var(--miku-ink); font-weight: 600; }
.app-sdk-note {
  margin-top: 13px; padding: 12px 15px; border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.9; color: var(--text-light);
  background: var(--bg); border: 1px solid var(--border);
}
.app-sdk-note b { display: block; margin-bottom: 4px; color: var(--text); }
.app-sdk-note code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px; padding: 1px 6px; border-radius: 5px;
  background: var(--orange-soft); color: var(--miku-ink);
}
.app-demo-link {
  display: inline-block; margin: 9px 16px 0 0; font-size: 12.5px;
  color: var(--miku-ink); border-bottom: 1px dashed var(--orange-line);
}
.app-demo-link:hover { color: var(--miku-light); text-decoration: none; }
.check-line {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0;
  font-size: 13px; color: var(--text-light); cursor: pointer;
}
.check-line input { width: auto; accent-color: var(--miku); }
.hl { color: var(--miku-ink); }
.link-plain {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 14.5px; color: var(--text-light);
}
.link-plain:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 640px) {
  .app-box { padding: 14px; }
  .app-sdk-note { font-size: 12px; line-height: 1.8; }
  .thumb-badges { left: 8px; right: 8px; bottom: 8px; }
}

/* ===== 人机验证页（Cloudflare Turnstile 入口闸门）===== */
.verify-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 260px); padding: 30px 0;
}
.verify-card {
  width: min(430px, 100%);
  text-align: center;
  padding: 44px 36px 38px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.verify-badge {
  width: 62px; height: 62px; margin: 0 auto 20px;
  border-radius: 0px;
  display: flex; align-items: center; justify-content: center;
  background: var(--miku);
}
.verify-badge svg { width: 30px; height: 30px; }
.verify-badge svg path:first-child { fill: rgba(41, 37, 31, .28); }
.verify-card h1 {
  font-size: 22px; color: var(--text); margin-bottom: 8px; font-weight: 800;
}
.verify-sub {
  font-size: 13.5px; color: var(--text-light); line-height: 1.75; margin-bottom: 26px;
}
/* Turnstile 组件容器：固定高度避免加载时布局跳动 */
.cf-slot {
  display: flex; justify-content: center; align-items: center;
  min-height: 68px; margin-bottom: 18px;
}
.verify-tip {
  font-size: 13px; color: var(--text-light); letter-spacing: .5px;
  transition: color .2s;
  min-height: 20px;
}
.verify-tip.is-err { color: var(--danger); font-weight: 600; }
.verify-noscript {
  margin-top: 16px; font-size: 13px; color: var(--danger);
  background: rgba(240, 80, 110, .08);
  border: 1px solid rgba(240, 80, 110, .3);
  border-radius: var(--radius); padding: 10px 14px;
}
@media (max-width: 640px) {
  .verify-card { padding: 34px 22px 30px; }
  .verify-card h1 { font-size: 19px; }
}

/* ============ 顶栏语言切换器（中 / EN）============ */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; margin-right: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); line-height: 1;
}
.lang-switch .lang-opt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; padding: 5px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: var(--text-mute); border-radius: 5px;
  transition: color .16s, background .16s;
}
.lang-switch .lang-opt:hover { color: var(--text); text-decoration: none; }
.lang-switch .lang-opt.is-on {
  color: var(--miku-ink); background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px var(--orange-line);
}

/* ============ 首页落地页（Cloudflare 式门厅结构）============ */
/* 首页比常规内容页宽一点，卡片网格才铺得开 */
.landing-wide { width: min(1080px, 92%); margin: 0 auto; }

/* ① Hero：眉标 + 大标题 + 价值主张 + 双 CTA + 指标条 */
.landing-hero { padding: 84px 0 56px; text-align: center; }
.landing-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--miku-ink);
  border: 1px solid var(--orange-line); background: var(--orange-soft);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 22px;
}
.landing-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--miku); }
.landing-h1 {
  font-size: clamp(34px, 5.4vw, 56px); font-weight: 800;
  letter-spacing: -.5px; line-height: 1.22; margin-bottom: 20px; color: var(--text);
}
.landing-h1 em { font-style: normal; color: var(--miku); }
.landing-sub {
  max-width: 620px; margin: 0 auto 32px;
  font-size: 16.5px; line-height: 1.85; color: var(--text-light);
}
.landing-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stat-row {
  display: flex; justify-content: center; gap: 44px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--text); }
.stat span { font-size: 12.5px; color: var(--text-mute); }

/* ② 能力卡片网格 */
.sec { margin-top: 66px; }
.sec-head { text-align: center; margin-bottom: 28px; }
.sec-head h2 { font-size: 26px; color: var(--text); margin-bottom: 8px; font-weight: 800; }
.sec-head p { font-size: 14.5px; color: var(--text-light); }
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cap-card {
  display: flex; flex-direction: column;
  padding: 22px 20px 18px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text);
  transition: border-color .18s, background .18s, transform .18s;
}
.cap-card:hover {
  transform: translateY(-3px); border-color: var(--orange-line);
  background: var(--bg-3); text-decoration: none;
}
.cap-icon {
  width: 38px; height: 38px; border-radius: 0px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); border: 1px solid var(--orange-line);
}
.cap-icon svg { width: 19px; height: 19px; fill: var(--miku-ink); }
.cap-title { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.cap-desc { font-size: 13.5px; line-height: 1.7; color: var(--text-light); flex: 1; }
.cap-more {
  margin-top: 14px; font-size: 13px; color: var(--miku-ink);
  display: inline-flex; align-items: center; gap: 5px;
}
.cap-more span { transition: transform .18s; }
.cap-card:hover .cap-more span { transform: translateX(3px); }

/* ③ 引导区 */
.start-box {
  margin-top: 66px; padding: 40px 32px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.start-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.start-box > p { font-size: 14.5px; color: var(--text-light); margin-bottom: 26px; }
.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.start-item {
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); transition: border-color .18s, background .18s;
}
.start-item:hover { border-color: var(--orange-line); background: var(--bg-3); text-decoration: none; }
.start-item b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.start-item span { font-size: 13px; color: var(--text-light); }

/* 精选作品：3 列小卡 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.no-cover { display: flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .start-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .landing-hero { padding: 46px 0 32px; }
  .cap-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 26px; }
  .start-box { padding: 30px 20px; }
  .lang-switch { margin-right: 6px; }
}

/* ===== AI 助手：右下角悬浮挂件 =====
   层级刻意低于加载遮罩(9999)但高于移动端 tabbar(9999)，设为 9990 并让
   tabbar 之上留足间距，避免手机上被底部导航栏压住。 */
.ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--miku); color: #2D210D; border: none; cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(255, 178, 26, .6);
  cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.ai-fab:hover { background: var(--miku-dark); transform: translateY(-2px) scale(1.05); }
.ai-fab:active { transform: translateY(0) scale(.97); }
/* 拖动中：关掉过渡动画，否则图标会"追"着指针慢半拍 */
.ai-fab.is-dragging { cursor: grabbing; transition: box-shadow .18s ease; transform: scale(1.08); }
.ai-fab svg { width: 24px; height: 24px; fill: currentColor; }
.ai-fab.is-open svg { transform: rotate(90deg); }

.ai-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 9990;
  width: 384px; max-width: calc(100vw - 24px);
  height: min(560px, calc(100vh - 110px));
  display: none; flex-direction: column; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.ai-panel.is-open { display: flex; animation: aiIn .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes aiIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ai-head {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding: 13px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.ai-head-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--miku);
  box-shadow: 0 0 0 3px var(--orange-soft); flex-shrink: 0;
}
.ai-head-txt { flex: 1; min-width: 0; }
.ai-head-txt b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; }
.ai-head-txt span {
  display: block; font-size: 11.5px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-close {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-light);
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.ai-close:hover { background: var(--bg-4); color: var(--text); border-color: var(--border-strong); }
.ai-close svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; }

/* Agent 模式条（仅管理员会话渲染） */
.ai-agent {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: rgba(255, 178, 26, .06);
}
.ai-agent-tip { font-size: 11px; color: var(--text-mute); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.ai-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ai-switch-track {
  position: relative; width: 30px; height: 17px; border-radius: 999px;
  background: rgba(41, 37, 31, .18); transition: background .18s ease;
}
.ai-switch-track i {
  position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; transition: transform .18s ease;
}
.ai-switch input:checked + .ai-switch-track { background: var(--miku); }
.ai-switch input:checked + .ai-switch-track i { transform: translateX(13px); }
.ai-switch em { font-size: 11.5px; font-style: normal; color: var(--text); }

.ai-mini {
  flex-shrink: 0; font-size: 11px; padding: 3px 8px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-strong); transition: all .15s ease;
}
.ai-mini:hover { color: var(--miku-ink); border-color: rgba(255, 178, 26, .5); }
.ai-mini.danger:hover { color: #B52D37; border-color: rgba(181, 45, 55, .5); }
.ai-mini.yes { color: #2D210D; background: var(--miku); border-color: transparent; }
.ai-mini.yes:hover { color: #2D210D; background: var(--miku-dark); }
.ai-mini:disabled { opacity: .45; cursor: default; }
.ai-grant-left { font-size: 11px; color: var(--miku-ink); flex-shrink: 0; }

/* 动作轨迹：让管理员看清 AI 到底动了什么 */
.ai-act {
  margin: 6px 0; padding: 6px 9px; border-radius: 7px; font-size: 11.5px;
  color: var(--text-dim); background: var(--bg-3);
  border-left: 2px solid var(--border-strong); word-break: break-word;
}
.ai-msg.sys { align-self: center; color: var(--text-mute); font-size: 11.5px; }
.ai-act.write { color: var(--miku-ink); border-left-color: var(--miku); }
.ai-act.bad { color: #B52D37; border-left-color: #B52D37; }
.ai-msg.ask {
  align-self: stretch; margin: 8px 0; padding: 9px 10px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid rgba(255, 178, 26, .35);
  color: var(--text); font-size: 12.5px;
}
.ai-act-args {
  margin: 7px 0; padding: 7px 8px; border-radius: 6px; overflow: auto;
  max-height: 150px; font-size: 11px; line-height: 1.5;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-dim);
}
.ai-act-btns { display: flex; gap: 7px; }
.ai-panel.is-agent { border-color: rgba(255, 178, 26, .45); }

.ai-msgs {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.ai-msgs::-webkit-scrollbar { width: 8px; }
.ai-msgs::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }

.ai-msg {
  max-width: 88%; padding: 10px 13px; font-size: 13.5px; line-height: 1.68;
  border-radius: 12px; white-space: pre-wrap; word-break: break-word;
}
.ai-msg.user {
  align-self: flex-end; background: var(--miku); color: #2D210D;
  border-bottom-right-radius: 4px;
}
.ai-msg.bot {
  align-self: flex-start; background: var(--bg-3); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.ai-msg.err { align-self: flex-start; background: rgba(181, 45, 55, .08); color: #B52D37; border: 1px solid rgba(240, 80, 110, .3); }

/* AI 回答的 Markdown 渲染（.ai-md 由 ai-md.js 生成 HTML 后才加上） */
.ai-msg.ai-md { white-space: normal; }        /* 换行交给 <p>/<br>，别再 pre-wrap */
.ai-md p { margin: 0 0 8px; }
.ai-md p:last-child { margin-bottom: 0; }
.ai-md .ai-md-h { display: block; font-size: 14.5px; margin: 10px 0 6px; }
.ai-md .ai-list { margin: 2px 0 8px; padding-left: 20px; }
.ai-md .ai-list li { margin: 3px 0; }
.ai-md a { color: var(--miku-ink); text-decoration: underline; text-underline-offset: 2px; }
.ai-md a:hover { color: var(--miku); }
.ai-md .ai-code {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
}
.ai-md .ai-pre {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0; overflow-x: auto; white-space: pre;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.55;
}
.ai-md .ai-quote {
  margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--miku);
  background: var(--bg-2); color: var(--text-light); border-radius: 0 6px 6px 0;
}
.ai-md .ai-hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.ai-md .ai-tex { font-family: "Times New Roman", Georgia, serif; font-style: italic; }
.ai-md b { font-weight: 700; }

/* 面板底部：左边一句话说明，右边「清空对话」 */
.ai-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ai-clear {
  flex: none; font-size: 11.5px; color: var(--text-mute); background: none;
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px;
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.ai-clear:hover { color: var(--miku-ink); border-color: var(--miku); }

/* 思考中的三个跳点 */
.ai-typing { display: flex; gap: 4px; align-items: center; height: 20px; }
.ai-typing i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--text-mute);
  animation: aiBounce 1.1s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-src { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border-strong); }
.ai-src b { display: block; font-size: 11px; color: var(--text-mute); margin-bottom: 5px; font-weight: 600; }
.ai-src ol { margin: 0; padding-left: 16px; }
.ai-src li { font-size: 11.5px; color: var(--text-mute); margin-bottom: 3px; line-height: 1.5; }
.ai-src a { color: var(--miku-ink); text-decoration: none; }
.ai-src a:hover { text-decoration: underline; }

.ai-input {
  flex-shrink: 0; display: flex; gap: 8px; align-items: flex-end;
  padding: 11px 12px; border-top: 1px solid var(--border); background: var(--bg-3);
}
.ai-input textarea {
  flex: 1; min-height: 38px; max-height: 110px; resize: none;
  padding: 9px 11px; font: inherit; font-size: 13.5px; line-height: 1.5;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .15s;
}
.ai-input textarea::placeholder { color: var(--text-mute); }
.ai-input textarea:focus { outline: none; border-color: var(--orange-line); }
.ai-send {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--miku); color: #2D210D; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.ai-send:hover { background: var(--miku-dark); }
.ai-send:disabled { opacity: .45; cursor: not-allowed; }
.ai-send svg { width: 17px; height: 17px; fill: currentColor; }

.ai-foot { padding: 0 12px 9px; text-align: center; font-size: 10.5px; color: var(--text-mute); background: var(--bg-3); }

@media (max-width: 640px) {
  .ai-fab { right: 14px; bottom: 74px; }          /* 抬到 tabbar 之上 */
  .ai-panel {
    right: 12px; left: 12px; bottom: 74px; width: auto; max-width: none;
    height: min(70vh, calc(100vh - 150px));
  }
}

/* ============ 首页：编号分区体系（Corona Studio 式编辑排版）============
   结构：超大站名 → 01 关于 / 02 精选 / 03 作品索引 / 04 文章 / 05 入口 / 06 原则
   手法：等宽字体编号标签 + 超大标题 + 大量留白 + 细分隔线，直角无圆角 */

/* ---- Hero：站名即标题 ---- */
.cs-hero { padding: 92px 0 8px; }
.cs-mark {
  font-size: clamp(50px, 11vw, 124px); font-weight: 800;
  letter-spacing: -.035em; line-height: .92; color: var(--text);
}
.cs-mark i { font-style: normal; color: var(--miku); }
.cs-mark-sub {
  margin-top: 16px; font-size: 14px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-mute);
}
.cs-lead {
  max-width: 560px; margin: 30px 0 34px;
  font-size: 16px; line-height: 1.95; color: var(--text-light);
}
.cs-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Hero 右侧：头像 + 客户端入口 ---- */
.cs-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px; align-items: center;
}
.cs-hero-side {
  display: flex; flex-direction: column; gap: 22px;
}
.cs-avatar img {
  width: 230px; height: 230px; display: block;
  border-radius: var(--radius-lg); object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 4px var(--bg-3);
}
.cs-client {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--miku);
  padding: 16px 18px 15px;
}
.cs-client-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.cs-client-badge {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--miku-ink);
}
.cs-client-ver {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px; color: var(--text-mute);
  border: 1px solid var(--border); padding: 1px 8px;
}
.cs-client-desc {
  font-size: 13px; line-height: 1.75; color: var(--text-light);
  margin-bottom: 14px;
}
.cs-client-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-client-actions .btn-primary,
.cs-client-actions .btn-ghost { padding: 8px 16px; font-size: 13px; }
.cs-client-git {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; font-size: 12.5px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text-mute); word-break: break-all;
}
.cs-client-git:hover { color: var(--miku-ink); }
.cs-client-git svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

.cs-stats {
  display: flex; gap: 46px; flex-wrap: wrap;
  margin-top: 58px; padding-top: 26px; border-top: 1px solid var(--border);
}
.cs-stat b { display: block; font-size: 27px; font-weight: 800; color: var(--text); line-height: 1.2; }
.cs-stat span { font-size: 12px; letter-spacing: .04em; color: var(--text-mute); }

/* ---- 区块骨架：编号标签 + 超大标题 ---- */
.cs-sec { margin-top: 96px; }
.cs-sec-last { margin-bottom: 12px; }
.cs-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--miku-ink); margin-bottom: 16px;
}
.cs-tag b { font-weight: 700; }
.cs-tag i { font-style: normal; color: var(--border-strong); }

.cs-sec-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.cs-eyebrow {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 10px;
}
.cs-sec-title {
  font-size: clamp(24px, 3.2vw, 36px); font-weight: 800;
  letter-spacing: -.01em; line-height: 1.35; color: var(--text);
}
.cs-sec-lead {
  font-size: 15px; line-height: 1.95; color: var(--text-light);
  max-width: 620px; margin-top: 12px;
}
.cs-head-more { font-size: 13.5px; color: var(--text-mute); white-space: nowrap; }
.cs-head-more:hover { color: var(--miku-ink); }
.cs-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--miku-ink);
}
.cs-inline span { transition: transform .18s; }
a:hover .cs-inline span { transform: translateX(3px); }

/* ---- 01 关于：左文右图组 ---- */
.cs-about { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.cs-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cs-skill {
  font-size: 12.5px; padding: 4px 12px; color: var(--text-light);
  background: var(--bg-2); border: 1px solid var(--border);
}
.cs-about-body .cs-inline { margin-top: 24px; }

.cs-shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cs-shot {
  position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 178, 26, .18), rgba(255, 178, 26, .05));
  border: 1px solid var(--border);
}
.cs-shot:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.cs-shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.cs-shot:hover img { transform: scale(1.05); }
.cs-shot figcaption {
  position: absolute; left: 8px; bottom: 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10.5px; letter-spacing: .14em;
  padding: 3px 8px; color: #FFFFFF; background: rgba(41, 37, 31, .74);
}

/* ---- 02 精选作品：大图 + 大字，只推一个 ---- */
.cs-feature {
  display: grid; grid-template-columns: 1.1fr .9fr;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  transition: border-color .2s;
}
.cs-feature:hover { border-color: var(--orange-line); text-decoration: none; }
.cs-feature-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 178, 26, .2), rgba(255, 178, 26, .05));
  display: flex; align-items: center; justify-content: center;
}
.cs-feature-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.cs-feature:hover .cs-feature-media img { transform: scale(1.04); }
.cs-feature-glyph { font-size: 64px; color: var(--miku-ink); position: relative; z-index: 2; }
.cs-feature-body {
  padding: 34px 32px; display: flex; flex-direction: column; justify-content: center;
}
.cs-cat {
  align-self: flex-start; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--miku-ink);
  background: var(--orange-soft); border: 1px solid var(--orange-line);
  padding: 3px 10px; margin-bottom: 16px;
}
.cs-feature-body h3 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.cs-feature-body p { font-size: 14.5px; line-height: 1.85; color: var(--text-light); }
.cs-feature-body .cs-inline { margin-top: 20px; }

/* ---- 03 / 04 编号列表：[[ 01 ]] 行式索引 ---- */
.cs-list { border-top: 1px solid var(--border); }
.cs-row {
  display: grid; grid-template-columns: 96px 1fr 24px; gap: 22px; align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--border);
  color: var(--text); transition: background .2s, padding-left .2s;
}
.cs-row:hover { background: var(--bg-2); padding-left: 14px; text-decoration: none; }
.cs-num {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .06em; color: var(--text-mute); white-space: nowrap;
}
.cs-row:hover .cs-num { color: var(--miku-ink); }
.cs-row-main { display: flex; flex-direction: column; min-width: 0; }
.cs-row-title { font-size: 16.5px; font-weight: 700; }
.cs-row-desc {
  font-size: 13.5px; color: var(--text-light); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-arrow {
  color: var(--text-mute); font-size: 17px; text-align: right;
  transition: color .18s, transform .18s;
}
.cs-row:hover .cs-arrow { color: var(--miku); transform: translateX(4px); }

/* ---- 05 入口：四个去向 ---- */
.cs-eco { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cs-eco-item {
  display: flex; flex-direction: column; padding: 24px 22px 26px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color .18s, transform .18s;
}
.cs-eco-item:hover {
  border-color: var(--orange-line); transform: translateY(-3px); text-decoration: none;
}
.cs-eco-num {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--miku-ink);
}
.cs-eco-item b { display: block; font-size: 15.5px; margin: 12px 0 6px; }
.cs-eco-item > span:last-child { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* ---- 06 原则：粗分隔线 + 编号 ---- */
.cs-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 30px; }
.cs-principle { border-top: 2px solid var(--text); padding-top: 16px; }
.cs-pnum {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11.5px; letter-spacing: .14em; color: var(--text-mute);
}
.cs-principle h3 { font-size: 17px; font-weight: 700; margin: 10px 0 8px; }
.cs-principle p { font-size: 13.5px; line-height: 1.9; color: var(--text-light); }

/* ---- 滚动渐入：进入视口才上浮显现 ---- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .75s cubic-bezier(.22, 1, .36, 1),
              transform .75s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cs-shot img, .cs-feature-media img { transition: none; }
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
  .cs-about { grid-template-columns: 1fr; gap: 34px; }
  .cs-feature { grid-template-columns: 1fr; }
  .cs-eco { grid-template-columns: repeat(2, 1fr); }
  .cs-principles { grid-template-columns: 1fr; gap: 26px; }
  .cs-stats { gap: 32px; }
  .cs-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cs-hero-side { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .cs-avatar img { width: 150px; height: 150px; }
  .cs-client { flex: 1; min-width: 260px; }
}
@media (max-width: 640px) {
  .cs-hero { padding: 44px 0 4px; }
  .cs-sec { margin-top: 64px; }
  .cs-eco { grid-template-columns: 1fr; }
  .cs-row { grid-template-columns: 74px 1fr; gap: 14px; padding: 18px 4px; }
  .cs-arrow { display: none; }
  .cs-shots { grid-template-columns: 1fr; }
  .cs-shot:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
  .cs-stats { gap: 24px; }
  .cs-feature-body { padding: 26px 20px; }
  .cs-feature-body h3 { font-size: 20px; }
}
