/* ===== Zibll 风格浅色主题（对齐原站 xiazai4k.shop） ===== */
:root {
  --accent: #00a2e3;
  --accent-dark: #0090cc;
  --accent-soft: rgba(0, 162, 227, .08);
  --text: #4e5358;
  --title: #333;
  --muted: #999;
  --bg: #f5f6f7;
  --card: #ffffff;
  --line: #f0f1f2;
  --radius: 12px;
  --shadow: 0 0 10px rgba(116, 116, 116, .08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.container {
  max-width: 1236px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== 顶部导航（白色固定，高 68px） ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--card);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--title);
  white-space: nowrap;
}
.brand:hover { color: var(--accent); }
.brand-logo { height: 30px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 28px;
  flex: 1;
  min-width: 0;
}

.nav-link,
.nav-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-link:hover,
.nav-label:hover { color: var(--accent); background: var(--bg); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-label i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 1px; }

.nav-drop { position: relative; }
.drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  padding: 6px;
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .1);
}
.nav-drop:hover .drop-menu { display: block; }
.drop-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.drop-menu a:hover { color: var(--accent); background: var(--accent-soft); }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--title);
  border-radius: 1px;
}

/* ===== 主体 ===== */
.main {
  padding: 92px 16px 40px;
  min-height: 70vh;
}

/* ===== 购买邀请码页 ===== */
.pay-wrap { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.pay-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  text-align: center;
}
.pay-title { font-size: 20px; color: var(--title); margin-bottom: 8px; }
.pay-subtitle { font-size: 16px; color: var(--title); margin-bottom: 12px; text-align: left; }
.pay-note { font-size: 13px; color: var(--muted); line-height: 1.9; }
.pay-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin: 16px 0;
  background: var(--bg);
  border-radius: 10px;
  text-align: left;
}
.pay-item-info { display: flex; flex-direction: column; gap: 4px; }
.pay-item-info strong { font-size: 15px; color: var(--title); }
.pay-item-info span { font-size: 12.5px; color: var(--muted); }
.pay-price { font-size: 22px; font-weight: 700; color: #e5484d; white-space: nowrap; }
.pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.pay-btn:hover { color: #fff; text-decoration: none; opacity: .92; }
.pay-btn.wechat { background: #07c160; }
.pay-qr { margin: 14px 0; }
.pay-qr img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.pay-actions { margin-top: 12px; }
.pay-wait { margin-top: 14px; font-size: 13px; color: var(--accent); }
.pay-wait::after { content: '…'; animation: payDots 1.2s infinite; }
@keyframes payDots { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
.pay-code {
  margin: 16px 0 12px;
  padding: 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: all;
}
.pay-copy {
  padding: 9px 26px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 12px;
}
.pay-copy:hover { background: var(--accent-dark); }
.pay-orders { list-style: none; display: flex; flex-direction: column; }
.pay-orders li { border-bottom: 1px solid var(--line); }
.pay-orders li:last-child { border-bottom: none; }
.pay-order-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 2px;
  color: var(--text);
  font-size: 13px;
}
.pay-order-link:hover { color: var(--accent); text-decoration: none; }
.pay-order-num { font-family: ui-monospace, Menlo, monospace; }
.pay-order-price { color: #e5484d; font-weight: 600; }
.pay-order-status { padding: 1px 10px; border-radius: 999px; font-size: 12px; background: var(--bg); color: var(--muted); }
.pay-order-status.paid { background: rgba(7, 193, 96, .1); color: #07a352; }
.pay-order-status.pending { background: rgba(255, 165, 0, .12); color: #d97706; }
.pay-order-status.closed { background: rgba(229, 72, 77, .08); color: #e5484d; }
.pay-order-code { margin-left: auto; background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 6px; }

/* ===== 置顶角标 ===== */
.card-thumb { position: relative; }
.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: #e5484d;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(229, 72, 77, .35);
}

/* ===== 正文图片查看器（专业版） ===== */
.post-content img { cursor: zoom-in; }
.img-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-viewer[hidden] { display: none !important; }
.iv-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.iv-stage img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
  user-select: none;
  -webkit-user-drag: none;
}
.iv-btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  transition: background .2s;
  padding: 0;
}
.iv-btn:hover { background: rgba(255, 255, 255, .28); }
.iv-close { top: 18px; right: 20px; width: 40px; height: 40px; }
.iv-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.iv-next { right: 20px; top: 50%; transform: translateY(-50%); }
.iv-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
}

/* ===== 首页轮播图 ===== */
.home-slider {
  position: relative;
  height: var(--slider-h, 500px);
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
  will-change: transform;
}
.slider-track .slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.home-slider:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: rgba(0, 0, 0, .5); }
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }
.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.slider-dot.active { width: 20px; background: #fff; }

/* ===== 文章卡片网格 ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(116, 116, 116, .16);
}

.card-thumb { padding: 8px 8px 0; }
.card-thumb a { display: block; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #f5f6f8, #e9ecf1); }
.card-thumb img.img-broken { visibility: hidden; }   /* 图挂了就留白位，不显示破损图标/alt 文字 */
.card-thumb img.img-loading { opacity: 0; }         /* 未就绪时先留白，加载完再淡入 */
.card-thumb img { transition: opacity .35s ease, transform .35s ease; }
.card-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg);
  transition: transform .35s ease;
}
.post-card:hover .card-thumb img { transform: scale(1.06); }
.thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.card-body { padding: 10px 12px 12px; }

.card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a { color: var(--title); }
.card-title a:hover { color: var(--accent); }

.card-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.card-tags::-webkit-scrollbar { display: none; }

.tag-pill {
  flex: none;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.tag-pill:hover { color: var(--accent); background: var(--accent-soft); }
.tag-pill.cat { color: var(--accent); background: var(--accent-soft); }
.tag-pill.cat:hover { background: rgba(0, 162, 227, .16); }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.meta-stats { display: inline-flex; align-items: center; gap: 10px; }
.stat { display: inline-flex; align-items: center; gap: 3px; }
.stat svg { color: #c3c7cb; }

/* ===== 顶栏用户区 ===== */
.header-user { display: flex; align-items: center; gap: 10px; margin-left: 14px; white-space: nowrap; }
.user-login,
.user-logout {
  font-size: 14px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.user-login:hover,
.user-logout:hover { background: rgba(0, 162, 227, .16); color: var(--accent); text-decoration: none; }
.user-register { font-size: 14px; padding: 5px 16px; border-radius: 999px; color: var(--text); border: 1px solid var(--line); }
.user-register:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.user-name { font-size: 14px; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* ===== 前台登录页 ===== */
.login-wrap { display: flex; justify-content: center; padding: 30px 0 50px; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 30px 24px;
}
.login-head { font-size: 22px; color: var(--title); text-align: center; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 20px; }
.login-error {
  background: rgba(229, 72, 77, .08);
  color: #e5484d;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.field-block { display: block; margin-bottom: 14px; }
.field-block > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field-block input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--text);
}
.field-block input:focus { border-color: var(--accent); }
.login-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.login-btn:hover { background: var(--accent-dark); }
.login-tip { text-align: center; color: #c3c7cb; font-size: 12px; margin-top: 14px; }

/* ===== "登录后可见"提示框 ===== */
.hide-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
  padding: 16px 20px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
}
.hide-locked-icon { font-size: 18px; }
.hide-locked-btn {
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}
.hide-locked-btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* ===== 归档页头 ===== */
.archive-head {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.archive-head h1 { font-size: 20px; color: var(--title); margin-bottom: 4px; }
.archive-head p { color: var(--muted); font-size: 13px; }

/* ===== 文章详情 ===== */
.post-detail {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.detail-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--title);
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.detail-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.detail-meta .meta-item svg { color: #c3c7cb; }

.post-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
  overflow-wrap: break-word;
}
.post-content > *:first-child { margin-top: 0; }
.post-content p { margin: .8em 0; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  margin: 1.1em 0 .55em;
  line-height: 1.45;
  color: var(--title);
}
.post-content h2 { font-size: 19px; }
.post-content h3 { font-size: 16.5px; }
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
  display: block;
}
.post-content a { word-break: break-all; }
.post-content ul, .post-content ol { padding-left: 1.6em; margin: .8em 0; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg);
  padding: 10px 16px;
  margin: .8em 0;
  color: #667;
  border-radius: 0 8px 8px 0;
}
.post-content pre {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: .8em 0;
}
.post-content code {
  background: var(--bg);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .9em;
}
.post-content pre code { background: none; padding: 0; }
.post-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: .8em 0;
}
.post-content th, .post-content td {
  border: 1px solid var(--line);
  padding: 8px 12px;
}
.post-content .wp-block-heading { scroll-margin-top: 84px; }

.post-copyright {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.post-tags .tag-pill { font-size: 12.5px; padding: 2px 12px; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.post-nav span { max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 加载更多 ===== */
.load-more {
  display: flex;
  justify-content: center;
  margin: 26px 0 10px;
  min-height: 40px;
  /* 不参与滚动锚定：新内容插入时由上方卡片做锚点，页面不会被拽着抖一下 */
  overflow-anchor: none;
}
.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 132px;          /* 固定宽度：切换"加载中"文案时按钮不再抖动 */
  padding: 9px 24px 9px 20px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 14px;
  transition: color .18s ease;
}
.load-more-btn:hover { color: var(--accent); }
.lm-icon { transition: transform .2s ease; }
.load-more.loading .load-more-btn {
  color: var(--accent);
  pointer-events: none;
}
.load-more.loading .lm-icon {
  animation: lm-spin .9s linear infinite;   /* 连续旋转，比一次性转 90° 更顺眼 */
  transform-origin: 50% 50%;
}
@keyframes lm-spin { to { transform: rotate(360deg); } }
.load-more-end {
  color: #bbb;
  font-size: 13px;
  padding: 9px 0;
  text-align: center;
}

/* 新加载出来的卡片淡入，避免整块"啪"地弹出来 */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.post-card.card-enter { animation: card-enter .32s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .post-card.card-enter { animation: none; }
  .load-more.loading .lm-icon { animation: none; }
}

/* 分页按钮样式（404 页「返回首页」等场景仍在用） */
.page-link {
  display: inline-block;
  padding: 6px 16px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 14px;
}
.page-link:hover { color: var(--accent); }

/* ===== 空状态 / 404 ===== */
.empty {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h1 { font-size: 38px; color: var(--title); margin-bottom: 8px; }
.empty .page-link { margin-top: 16px; }

/* ===== 页脚（三栏：品牌 / 免责声明 / 二维码） ===== */
.site-footer {
  overflow-anchor: none;
  background: var(--card);
  color: var(--muted);
  margin-top: 20px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 40px;
  padding: 34px 16px 30px;
  align-items: start;
}
.footer-logo { height: 42px; width: auto; display: block; margin-bottom: 10px; }
.footer-brand strong { display: block; font-size: 16px; color: var(--title); margin-bottom: 10px; }
.footer-about { font-size: 13px; line-height: 1.8; }
.footer-disclaimer h4 { font-size: 14px; font-weight: 600; color: var(--title); margin-bottom: 10px; }
.footer-disclaimer p { font-size: 13px; line-height: 1.8; }
.footer-qr { display: flex; gap: 18px; }
.qr-item { text-align: center; margin: 0; }
.qr-item img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.qr-item figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ===== 前台注册（原站弹窗样式） ===== */
.reg-wrap { display: flex; justify-content: center; padding: 30px 0 50px; }
.reg-modal {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(116, 116, 116, .18);
  padding: 26px 30px 30px;
  text-align: center;
}
.reg-title { font-size: 22px; font-weight: 600; color: var(--title); text-align: left; }
.reg-login-link { display: block; text-align: left; font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.reg-login-link:hover { color: var(--accent); }
.reg-icon {
  width: 64px;
  height: 64px;
  margin: 6px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5f7e, #ff3b5c);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 59, 92, .28);
}
.reg-icon-sm { width: 46px; height: 46px; font-size: 22px; margin-bottom: 10px; }
.reg-desc-main { font-size: 15px; color: var(--text); }
.reg-desc-sub { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.8; }
.reg-invite-btn {
  display: inline-block;
  margin: 16px auto 0;
  padding: 11px 32px;
  background: #e62828;
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
}
.reg-invite-btn:hover { background: #cf2020; color: #fff; text-decoration: none; }
.reg-form { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.reg-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  text-align: center;
}
.reg-input:focus { border-color: var(--accent); background: #fff; }
.reg-input::placeholder { color: #b6bcc2; }
.reg-next {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 999px;
  background: #3a9bff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 16px rgba(58, 155, 255, .28);
}
.reg-next:hover { background: #2b8bf0; }
.reg-error {
  background: rgba(229, 72, 77, .08);
  color: #e5484d;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: left;
}
.reg-verified { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.reg-verified code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
}

/* ===== 顶栏铃铛与站内消息 ===== */
.header-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  color: var(--text);
  border-radius: 50%;
}
.header-bell:hover { background: var(--bg); color: var(--accent); text-decoration: none; }
.bell-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}
.msg-list { display: flex; flex-direction: column; gap: 14px; }
.msg-item {
  display: flex;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
}
.msg-icon { font-size: 22px; line-height: 1.4; }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.msg-title { font-size: 15px; font-weight: 600; color: var(--title); }
.msg-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.msg-content { font-size: 14px; line-height: 1.8; color: var(--text); word-break: break-word; }
.msg-content a { color: var(--accent); }

/* ===== 网站公告弹窗 ===== */
.notice-overlay[hidden] { display: none !important; }
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.notice-card {
  width: 100%;
  max-width: 540px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  animation: noticeIn .24s ease;
}
@keyframes noticeIn {
  from { transform: translateY(16px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff8e8, #fffdf8);
}
.notice-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
}
.notice-bell { color: #f0a020; flex: none; }
.notice-close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
}
.notice-close:hover { color: var(--text); }
.notice-body {
  padding: 16px 22px;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text);
}
.notice-body p { margin: .65em 0; }
.notice-body a { color: var(--accent); word-break: break-all; }
.notice-body img { max-width: 100%; height: auto; border-radius: 8px; }
.notice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.notice-btn {
  padding: 9px 28px;
  border-radius: 999px;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
}
.notice-btn:hover { color: #fff; text-decoration: none; opacity: .9; }
.notice-btn.c-green { background: #22c55e; }
.notice-btn.c-blue { background: var(--accent); }

/* ===== 搜索入口与搜索面板 ===== */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
}
.search-toggle:hover { background: var(--bg); color: var(--accent); }

.search-overlay[hidden] { display: none !important; }
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .3);
  overflow-y: auto;
}
.search-panel {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 0 0 14px 14px;
  padding: 24px 30px 28px;
  animation: searchDrop .22s ease;
}
@keyframes searchDrop {
  from { transform: translateY(-14px); opacity: .5; }
  to { transform: none; opacity: 1; }
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.search-scope { color: var(--text); font-size: 15px; white-space: nowrap; }
.search-scope i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 2px; }
.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  background: none;
}
.search-bar input::placeholder { color: #b6bcc2; }
.search-go, .search-close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
}
.search-go:hover { color: var(--accent); }
.search-close:hover { color: var(--text); }
.search-block { margin-top: 20px; }
.search-block-title { font-size: 14px; color: var(--muted); font-weight: 400; margin-bottom: 12px; }
.hot-words { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-word {
  padding: 6px 15px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
}
.hot-word:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.hot-posts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.hot-post { display: block; border-radius: 10px; overflow: hidden; background: var(--bg); color: var(--text); }
.hot-post:hover { text-decoration: none; color: var(--accent); }
.hot-post-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.hot-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hot-post:hover .hot-post-thumb img { transform: scale(1.05); }
.hot-post-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; }
.hot-post-title {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-head h1 { font-size: 20px; }
.search-head h1::before { content: none; }

/* ===== 点赞按钮 ===== */
.post-actions { display: flex; justify-content: center; margin: 22px 0 4px; }
.like-form { margin: 0; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .18s ease;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.like-btn .like-emoji { font-size: 17px; line-height: 1; filter: grayscale(1); transition: filter .18s; }
.like-btn .like-count { font-weight: 700; font-size: 16px; }
.like-btn em { font-style: normal; font-size: 14px; color: var(--muted); }
.like-btn:hover em { color: var(--accent); }
.like-btn.liked { border-color: #e5484d; background: rgba(229, 72, 77, .06); color: #e5484d; }
.like-btn.liked .like-emoji { filter: none; }
.like-btn.liked .like-count { color: #e5484d; }
.like-btn.liked em { color: #e5484d; }
.like-btn.guest .like-emoji { filter: grayscale(1); }

/* ===== 评论区 ===== */
.comments-section {
  max-width: 900px;
  margin: 16px auto 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  scroll-margin-top: 84px;
}
.comments-title { font-size: 17px; color: var(--title); margin-bottom: 14px; }
.comments-title em { font-style: normal; color: var(--muted); font-size: 14px; font-weight: 400; }
.comment-flash { padding: 8px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.comment-flash.ok { background: var(--accent-soft); color: var(--accent-dark); }
.comment-flash.err { background: rgba(229, 72, 77, .08); color: #e5484d; }
.comment-form { margin-bottom: 18px; }
.comment-as { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.comment-as strong { color: var(--text); }
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  color: var(--text);
  outline: none;
  resize: vertical;
  background: var(--bg);
}
.comment-form textarea:focus { border-color: var(--accent); background: #fff; }
.comment-submit {
  margin-top: 10px;
  padding: 9px 26px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.comment-submit:hover { background: var(--accent-dark); }
.comment-login-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-direction: column;
  padding: 22px 16px;
  margin-bottom: 16px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
}
.comment-list { list-style: none; }
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-head strong { font-size: 14px; color: var(--text); font-weight: 600; }
.comment-head time { font-size: 12px; color: var(--muted); }
.comment-text { font-size: 14px; line-height: 1.8; color: var(--text); overflow-wrap: break-word; }
.comment-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 0 6px; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px 14px;
    background: var(--card);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }
  .site-nav.open { display: flex; }
  .nav-link, .nav-label {
    padding: 12px 6px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .nav-drop:hover .drop-menu { display: block; }
  .drop-menu {
    position: static;
    display: block;
    box-shadow: none;
    padding: 2px 0 6px 16px;
  }

  .home-slider { height: var(--slider-h-m, 240px); border-radius: 10px; }
  .iv-btn { width: 40px; height: 40px; }
  .iv-prev { left: 8px; }
  .iv-next { right: 8px; }
  .iv-stage img { max-width: 96vw; max-height: 80vh; }
  .notice-card { max-height: 88vh; }
  .notice-body { padding: 14px 16px; }
  .hot-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-panel { padding: 18px 16px 22px; border-radius: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .footer-qr { justify-content: flex-start; }
  .reg-modal { padding: 22px 20px 24px; }
  .comments-section { padding: 18px 16px; }
  .main { padding-top: 84px; }
  .post-detail { padding: 20px 16px; }
  .detail-title { font-size: 19px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px 20px; }
  .post-nav { flex-direction: column; }
  .post-nav span { max-width: 100%; }
}

@media (max-width: 380px) {
  .posts-grid { grid-template-columns: 1fr; }
  .card-title { min-height: 0; }
}
