/* ==========================================================================
   Nexus 社区 · 日系清新主题
   ========================================================================== */

:root {
  --bg: #fff8fc;
  --bg-tint: #f6f2ff;
  --card: #ffffff;
  --card-soft: #fff9fd;
  --ink: #3b2f4a;
  --ink-soft: #5f5372;
  --muted: #9c8fae;
  --line: #f2e6f3;
  --line-strong: #e6d5ec;

  --pink: #ff86b8;
  --pink-deep: #ff5f9e;
  --purple: #a78bfa;
  --purple-deep: #8b5cf6;
  --blue: #7dd3fc;
  --mint: #7ee7c7;
  --gold: #ffb020;
  --gold-soft: #fff3d6;
  --danger: #f15b7d;

  --grad: linear-gradient(120deg, #ffa8cc 0%, #bda6ff 55%, #96dcff 100%);
  --grad-solid: linear-gradient(120deg, #ff5f9e 0%, #a06bff 58%, #4fb8ff 100%);
  --grad-vip: linear-gradient(120deg, #ffd27a, #ffa8cc 45%, #bda6ff);
  --grad-soft: linear-gradient(180deg, #ffffff, #fff6fb);

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -18px rgba(190, 120, 190, 0.55);
  --shadow-lg: 0 22px 50px -28px rgba(160, 100, 180, 0.6);

  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI',
    sans-serif;
  --mono: 'SFMono-Regular', Consolas, Menlo, monospace;
}

html[data-theme='dark'] {
  --bg: #171225;
  --bg-tint: #1d1730;
  --card: #221b33;
  --card-soft: #261e3a;
  --ink: #f4eefb;
  --ink-soft: #d6cbe8;
  --muted: #a294bb;
  --line: #33294a;
  --line-strong: #443760;
  --grad-soft: linear-gradient(180deg, #241c38, #1e1830);
  --shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 22px 50px -28px rgba(0, 0, 0, 0.9);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(circle at 12% 8%, rgba(255, 168, 204, 0.32), transparent 40%),
    radial-gradient(circle at 88% 4%, rgba(167, 139, 250, 0.26), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(125, 211, 252, 0.18), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 18px;
}

/* -------------------------------- 顶栏 -------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 14px -6px var(--pink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
  transition: all 0.16s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--card-soft);
}

.nav a.active {
  color: #fff;
  background: var(--grad-solid);
  font-weight: 600;
  box-shadow: 0 6px 16px -10px var(--pink-deep);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#user-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid #ffe2a8;
  color: #a06a00;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--grad-vip);
  color: #7a4500;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 10px -6px rgba(255, 176, 32, 0.9);
}

/* -------------------------------- 按钮 -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, opacity 0.14s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--grad-solid);
  color: #fff;
  box-shadow: 0 10px 22px -14px var(--pink-deep);
}

.btn-vip {
  background: var(--grad-vip);
  color: #6d3c00;
  box-shadow: 0 10px 22px -14px rgba(255, 176, 32, 0.9);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.btn-soft {
  background: var(--card-soft);
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-danger {
  background: #fff0f4;
  border-color: #ffd3df;
  color: var(--danger);
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.icon-btn:hover {
  color: var(--pink-deep);
  border-color: var(--pink);
}

/* ------------------------------ 用户菜单 ------------------------------ */

.user-menu {
  position: relative;
}

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.user-trigger:hover {
  border-color: var(--pink);
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 70;
}

.user-menu.open .menu {
  display: block;
  animation: pop 0.16s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.menu a,
.menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  background: none;
  border-radius: 10px;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  color: var(--ink-soft);
}

.menu a:hover,
.menu button:hover {
  background: var(--card-soft);
  color: var(--ink);
}

.menu em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--pink-deep);
  border-radius: 999px;
  padding: 0 6px;
}

.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 2px;
}

/* -------------------------------- 主体 -------------------------------- */

#app {
  padding-top: 22px;
  padding-bottom: 80px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  margin-bottom: 18px;
  border-radius: 26px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.5), transparent 45%);
  pointer-events: none;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0.01em;
  font-weight: 800;
}

.hero p {
  margin: 0;
  font-size: 13.5px;
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.hero .btn {
  background: rgba(255, 255, 255, 0.94);
  color: #6a3d9e;
}

.hero .btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

/* -------------------------------- 板块 -------------------------------- */

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s;
}

.chip:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--grad-solid);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -12px var(--pink-deep);
}

.chip small {
  font-size: 11px;
  opacity: 0.75;
}

/* -------------------------------- 工具栏 ------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 190px;
  position: relative;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  outline: none;
  font-size: 13.5px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.search input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 134, 184, 0.16);
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
}

.seg button {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.seg button.active {
  background: var(--grad-solid);
  color: #fff;
}

/* -------------------------------- 帖子卡 -------------------------------- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  position: relative;
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.18s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #ffd9e8;
}

.post-card:hover::before {
  opacity: 1;
}

.post-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 9px;
  border-radius: 7px;
  background: #f3efff;
  color: #7b62d8;
  font-size: 11.5px;
  font-weight: 700;
}

.tag-pin {
  background: #fff0f5;
  color: var(--pink-deep);
}

.tag-vip {
  background: var(--grad-vip);
  color: #6d3c00;
}

.tag-pay {
  background: var(--gold-soft);
  color: #a06a00;
}

.tag-new {
  background: #e9fbf4;
  color: #1f9d76;
}

.post-title {
  margin: 0 0 5px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.post-card:hover .post-title a {
  color: var(--pink-deep);
}

.post-excerpt {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-soft);
}

.author:hover {
  color: var(--pink-deep);
}

.spacer {
  flex: 1;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------- 头像 -------------------------------- */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: hsl(var(--hue, 320) 90% 94%);
  color: hsl(var(--hue, 320) 55% 42%);
  font-weight: 800;
  line-height: 1;
  user-select: none;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px hsl(var(--hue, 320) 90% 88%);
}

html[data-theme='dark'] .avatar {
  background: hsl(var(--hue, 320) 40% 28%);
  color: hsl(var(--hue, 320) 70% 82%);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3px hsl(var(--hue, 320) 40% 40%);
}

/* -------------------------------- 详情 -------------------------------- */

.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.backlink:hover {
  color: var(--pink-deep);
}

.article-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-title {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.prose {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.prose p {
  margin: 0 0 12px;
}

.prose h2,
.prose h3 {
  color: var(--ink);
  margin: 22px 0 8px;
  font-weight: 800;
}

.prose h2 {
  font-size: 18px;
}

.prose h3 {
  font-size: 16px;
}

.prose strong {
  color: var(--ink);
  font-weight: 800;
}

.prose a {
  color: var(--pink-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.prose li {
  margin-bottom: 4px;
}

.prose li::marker {
  color: var(--pink);
}


/* 发帖页：图片预览 */
.compose-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.compose-previews img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* 正文里的图片 */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.prose pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
}

/* ------------------------------- 付费墙 ------------------------------- */

.paywall {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px dashed #ffc9de;
  background: linear-gradient(135deg, #fff6fb, #f8f4ff);
}

html[data-theme='dark'] .paywall {
  border-color: #4a3a62;
  background: linear-gradient(135deg, #241b36, #201a30);
}

.paywall-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-solid);
  color: #fff;
  box-shadow: 0 8px 18px -12px var(--pink-deep);
}

.paywall-text {
  flex: 1;
  min-width: 180px;
}

.paywall-text b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.paywall-text p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.paywall-hint {
  font-size: 12px;
  color: var(--muted);
}

.lock-block {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
}

.lock-chip {
  display: inline-block;
  margin-bottom: 8px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #6d3c00;
  background: var(--grad-vip);
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  flex-wrap: wrap;
}

.like-btn.liked {
  color: var(--danger);
  border-color: #ffd3df;
  background: #fff0f4;
}

/* -------------------------------- 回复 -------------------------------- */

.replies-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.replies-head span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.reply {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.reply.nested {
  background: var(--card-soft);
  border-style: dashed;
}

.reply-main {
  flex: 1;
  min-width: 0;
}

.reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.reply-head b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.role-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef4ff;
  color: #4a6bd8;
}

.reply-target {
  color: var(--pink-deep);
  font-size: 12px;
}

.reply-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.reply-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.reply-actions button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.reply-actions button:hover {
  color: var(--pink-deep);
}

.reply-actions button.liked {
  color: var(--danger);
}

/* -------------------------------- 表单 -------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 14px;
}

.field > label,
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
}

input[type='text'],
input:not([type]),
input[type='password'],
input[type='email'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  outline: none;
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 134, 184, 0.15);
}

textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.75;
}

.composer {
  padding: 20px 22px;
}

.composer h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 800;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.form-error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 8px;
  min-height: 18px;
}

.hide-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hide-tools button {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--card-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hide-tools button:hover {
  color: var(--pink-deep);
  border-color: var(--pink);
}

/* -------------------------------- 登录页 ------------------------------- */

.auth-wrap {
  max-width: 420px;
  margin: 18px auto 0;
}

.auth-card {
  padding: 26px 24px 22px;
  border-radius: 26px;
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 800;
}

.auth-card .sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.auth-card .switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-card .switch a {
  color: var(--pink-deep);
  font-weight: 700;
}

.demo-hint {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card-soft);
  border: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.demo-hint code {
  font-family: var(--mono);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 4px;
  color: var(--ink-soft);
}

/* ------------------------------ 会员中心 ------------------------------ */

.vip-hero {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 26px;
  background: var(--grad-vip);
  color: #6b3a00;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}

.vip-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(10px);
  pointer-events: none;
}

.vip-hero h1 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 900;
}

.vip-hero p {
  margin: 0;
  font-size: 13.5px;
  opacity: 0.85;
}

.vip-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
}

.panel {
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 800;
}

.panel h2 span {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.checkin-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 2px 7px;
  border-radius: 13px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.day-cell i {
  font-style: normal;
  font-size: 15px;
  line-height: 1;
}

.day-cell.done {
  background: var(--grad-solid);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 16px -12px var(--pink-deep);
}

.day-cell.today {
  border-color: var(--pink);
  border-style: dashed;
}

.checkin-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.checkin-cta .tip {
  font-size: 12px;
  color: var(--muted);
}

.redeem-row {
  display: flex;
  gap: 8px;
}

.redeem-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
  font-size: 13px;
}

.log-list {
  display: flex;
  flex-direction: column;
}

.log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.log-row:last-child {
  border-bottom: 0;
}

.log-row .what {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
}

.log-row .what small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.log-row .delta {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.log-row .delta.up {
  color: #12a06b;
}

.log-row .delta.down {
  color: var(--danger);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row .no {
  width: 20px;
  font-weight: 900;
  color: var(--muted);
  font-size: 12px;
}

.rank-row .no.top {
  color: var(--gold);
}

.rank-row .who {
  flex: 1;
  font-weight: 600;
}

.rank-row .amt {
  color: var(--gold);
  font-weight: 800;
}

/* -------------------------------- 后台 -------------------------------- */

.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-tabs button {
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tabs button.active {
  background: var(--grad-solid);
  border-color: transparent;
  color: #fff;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat-card b {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .mono {
  font-family: var(--mono);
  letter-spacing: 0.04em;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.pill-unused {
  background: #e9fbf4;
  color: #12855c;
}

.pill-used {
  background: #f0f1f6;
  color: #6b6f80;
}

.pill-void {
  background: #fff0f4;
  color: var(--danger);
}

/* -------------------------------- 通用 -------------------------------- */

.empty {
  padding: 44px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.empty strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 4px;
}

.loading {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--pink);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-box {
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff0f4;
  border: 1px solid #ffd3df;
  color: var(--danger);
  font-size: 13.5px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  padding: 11px 20px;
  border-radius: 999px;
  background: #3b2f4a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(60, 40, 80, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  max-width: 86vw;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

.topbar::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--grad);
  opacity: 0.7;
}

@media (max-width: 760px) {
  .container {
    padding: 0 14px;
  }

  .nav a {
    padding: 7px 9px;
    font-size: 12.5px;
  }

  .brand span:not(.brand-mark) {
    display: none;
  }

  .coin-pill {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .checkin-days {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .day-cell {
    padding: 7px 0 5px;
    font-size: 9.5px;
  }
}



/* 一级/二级板块 */
.sub-chips {
  margin-top: -6px;
  margin-bottom: 14px;
  align-items: center;
}

.sub-chips .sub-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 4px;
}
/* ------------------------------ 门户首页 ------------------------------ */

.portal-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
  margin-bottom: 18px;
  border-radius: 26px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.portal-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(120, 60, 140, 0.25);
}

.portal-hero p {
  margin: 0 0 16px;
  font-size: 14px;
  opacity: 0.94;
  max-width: 52ch;
}

.portal-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 520px;
}

.portal-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b48ac4;
}

.portal-search input {
  flex: 1;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  outline: none;
  font-size: 13.5px;
}

.portal-stats {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  font-size: 12.5px;
  opacity: 0.95;
  flex-wrap: wrap;
}

.portal-stats b {
  font-size: 16px;
  font-weight: 900;
  margin-left: 2px;
}

/* 模块 */
.block {
  margin-bottom: 18px;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.block-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.block-head h2::before {
  content: '✦';
  color: var(--pink-deep);
  margin-right: 6px;
  font-size: 12px;
}

.block-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* 推荐卡片 */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.rec-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}

.rec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.rec-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-tint);
}

.rec-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.rec-card:hover .rec-cover img {
  transform: scale(1.04);
}

.rec-cover .ph,
.post-cover .ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.rec-body {
  padding: 12px 14px 14px;
}

.rec-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.rec-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.rec-body p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* 板块分区 */
.section-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.16s, transform 0.16s;
}

.section-row:hover {
  border-color: #ffd9e8;
  transform: translateY(-1px);
}

.section-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  background: hsl(var(--h, 320) 90% 92%);
  color: hsl(var(--h, 320) 55% 40%);
}

.section-main {
  flex: 1;
  min-width: 0;
}

.section-name {
  font-size: 15.5px;
  font-weight: 800;
}

.section-name:hover {
  color: var(--pink-deep);
}

.section-main p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.section-kids {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.kid {
  font-size: 11.5px;
  color: var(--ink-soft);
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}

.kid:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.kid small {
  color: var(--muted);
  margin-left: 2px;
}

.section-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 4px;
  align-items: baseline;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  min-width: 76px;
}

.section-stats b {
  font-size: 14px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.section-last {
  width: 210px;
  flex: none;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-last a {
  display: block;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-last a:hover {
  color: var(--pink-deep);
}

.section-last small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.section-last .muted {
  color: var(--muted);
}

/* 三栏列表 */
.portal-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: mini;
}

.mini-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.mini-list li:last-child {
  border-bottom: 0;
}

.mini-list .no {
  width: 18px;
  flex: none;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mini-list li:nth-child(-n + 3) .no {
  color: var(--pink-deep);
}

.mini-list a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
}

.mini-list a:hover {
  color: var(--pink-deep);
}

.mini-meta {
  flex: none;
  font-size: 11px;
  color: var(--muted);
}

/* 列表页帖子封面 */
.post-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.post-main {
  flex: 1;
  min-width: 0;
}

.post-cover {
  width: 132px;
  height: 88px;
  flex: none;
  order: 2;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-tint);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 后台首页装修 */
.block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.block-row .switch {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .portal-cols {
    grid-template-columns: 1fr;
  }

  .section-last {
    display: none;
  }

  .post-cover {
    width: 96px;
    height: 68px;
  }
}

/* ==========================================================================
   大气版：半透明玻璃 + 店招
   ========================================================================== */

:root {
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-blur: blur(20px) saturate(160%);
  --shadow-xl: 0 30px 70px -40px rgba(150, 90, 160, 0.65);
}

html[data-theme='dark'] {
  --glass: rgba(32, 25, 48, 0.6);
  --glass-strong: rgba(40, 31, 60, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-xl: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}

/* 背景光斑 */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

body::before {
  width: 520px;
  height: 520px;
  left: -160px;
  top: -120px;
  background: rgba(255, 150, 200, 0.35);
}

body::after {
  width: 620px;
  height: 620px;
  right: -220px;
  bottom: -260px;
  background: rgba(150, 170, 255, 0.3);
}

/* 顶栏 LOGO */
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 6px 14px -6px var(--pink);
}

/* 店招 */
.signboard {
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 34px 38px 24px;
  border-radius: 34px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-xl);
}

.signboard::before {
  content: '';
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 220px;
  background: radial-gradient(closest-side, rgba(255, 168, 204, 0.5), transparent);
  pointer-events: none;
}

.sign-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.sign-logo {
  width: 78px;
  height: 78px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  font-size: 34px;
  color: var(--pink-deep);
  box-shadow: 0 16px 30px -22px var(--pink-deep);
  overflow: hidden;
}

.sign-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sign-copy {
  min-width: 220px;
}

.sign-copy h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #ff5f9e, #8b5cf6 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sign-copy h1 em {
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: 6px;
}

.sign-copy p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 46ch;
}

.sign-search {
  position: relative;
  display: flex;
  gap: 8px;
  margin-left: auto;
  min-width: 260px;
  flex: 0 1 380px;
}

.sign-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.sign-search input {
  flex: 1;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--ink);
  outline: none;
  font-size: 13.5px;
}

.sign-stats {
  position: relative;
  display: flex;
  gap: 34px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.sign-stats b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* 模块标题 */
.block {
  margin-bottom: 26px;
}

.block-head {
  margin-bottom: 14px;
  gap: 14px;
}

.block-head h2 {
  font-size: 17px;
  letter-spacing: 0.03em;
}

.block-head h2::before {
  font-size: 13px;
}

/* 大板块卡片 */
.section-list {
  gap: 14px;
}

.section-row {
  padding: 22px 24px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-xl);
  gap: 18px;
}

.section-row:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 138, 186, 0.6);
}

.section-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  font-size: 24px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: hsl(var(--h, 320) 55% 42%);
}

.section-name {
  font-size: 19px;
  letter-spacing: 0.01em;
}

.section-main p {
  margin-top: 4px;
  font-size: 12.5px;
}

.section-stats {
  min-width: 92px;
  gap: 0 6px;
}

.section-stats b {
  font-size: 19px;
  font-weight: 900;
}

.section-last {
  width: 250px;
  font-size: 12.5px;
}

/* 推荐卡片玻璃化 */
.rec-card,
.post-card,
.mini-block {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-xl);
}

.mini-block {
  padding: 18px 20px;
  border-radius: 22px;
}

.mini-list li {
  padding: 9px 0;
  font-size: 13px;
}

.mini-list a {
  color: var(--ink-soft);
}

/* 三栏在玻璃下面更透气 */
.portal-cols {
  gap: 16px;
}

@media (max-width: 860px) {
  .signboard {
    padding: 24px 22px 20px;
    border-radius: 26px;
  }

  .sign-copy h1 {
    font-size: 26px;
  }

  .sign-search {
    margin-left: 0;
    flex-basis: 100%;
  }

  .sign-stats {
    gap: 22px;
  }

  .section-row {
    padding: 16px;
    gap: 12px;
  }

  .section-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 18px;
  }

  .section-name {
    font-size: 16px;
  }
}

/* 板块统计：数字在上、标签在下 */
.section-stats {
  display: flex;
  gap: 18px;
  text-align: left;
  min-width: 96px;
}

.section-stats span {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.section-stats b {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
}
/* ==========================================================================
   搜索：图标不被文字压住 + 范围选择
   ========================================================================== */

form.search input[type='text'],
form.sign-search input[type='text'] {
  padding-left: 42px;
}

.toolbar .search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar .search input[type='text'] {
  flex: 1;
  min-width: 140px;
}

.search-scope,
.sign-cat {
  width: auto;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.search-scope:focus,
.sign-cat:focus {
  border-color: var(--pink);
}

.sign-search {
  align-items: center;
}

.sign-cat {
  height: 42px;
  border-color: var(--glass-border);
  background: var(--glass-strong);
}

.sign-search .btn {
  flex: none;
}

@media (max-width: 640px) {
  .toolbar .search {
    width: 100%;
  }

  .search-scope {
    height: 36px;
  }
}
/* 整块可点 + 提示条 */
[data-hit-url] {
  cursor: pointer;
}

[data-hit-url]:hover {
  border-color: #ffd9e8;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  background: var(--card-soft);
  color: var(--ink-soft);
}

.notice b {
  font-size: 13.5px;
}

.notice-warn {
  border-color: rgba(255, 176, 90, 0.45);
  background: rgba(255, 190, 120, 0.16);
}

html[data-theme='dark'] .notice-warn {
  background: rgba(255, 176, 90, 0.12);
}
/* 验证码输入行 */
.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.code-row input {
  flex: 1;
  min-width: 0;
}

.code-row .btn {
  flex: none;
  height: 42px;
  white-space: nowrap;
}

/* ==========================================================================
   统一搜索条：图标进流、输入框自适应、下拉和按钮同一行
   ========================================================================== */

form.search,
form.sign-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

form.search > svg,
form.sign-search > svg {
  position: static;
  transform: none;
  flex: none;
  margin-left: 8px;
  color: var(--muted);
}

form.search input[type='text'],
form.search input[type='email'],
form.search input[type='search'],
form.sign-search input[type='text'],
form.sign-search input[type='email'] {
  flex: 1;
  min-width: 130px;
  height: 38px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  outline: none;
  font-size: 13.5px;
}

form.search input[type='text']:focus,
form.sign-search input[type='text']:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

form.search .search-scope,
form.search .sign-cat,
form.sign-search .sign-cat {
  flex: none;
  height: 38px;
  border-radius: 11px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: var(--card-soft);
  font-size: 13px;
}

form.search > .btn,
form.sign-search > .btn {
  flex: none;
  height: 38px;
  border-radius: 11px;
}

@media (max-width: 560px) {
  form.search .search-scope,
  form.search > .btn {
    height: 34px;
  }
}


/* ==========================================================================
   小屏适配：导航横向滚动 + 搜索条整行
   ========================================================================== */

@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .brand {
    flex: none;
  }

  .nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    white-space: nowrap;
    flex: none;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar .search,
  form.search,
  form.sign-search {
    width: 100%;
    flex: none;
  }

  form.search input[type='text'],
  form.search input[type='email'],
  form.sign-search input[type='text'] {
    min-width: 0;
    flex: 1 1 100px;
  }

  .toolbar .seg {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .toolbar .seg::-webkit-scrollbar {
    display: none;
  }
}

/* 商城 / 发卡入口 */
.shop-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0 4px;
}

.shop-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.16s, box-shadow 0.16s;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.shop-vip {
  background: linear-gradient(120deg, rgba(255, 214, 235, 0.9), rgba(255, 246, 250, 0.95));
  border-color: #ffd0e6;
}

.shop-coins {
  background: linear-gradient(120deg, rgba(255, 238, 200, 0.9), rgba(255, 251, 240, 0.95));
  border-color: #ffe2b0;
}

html[data-theme='dark'] .shop-vip {
  background: linear-gradient(120deg, rgba(90, 45, 70, 0.75), rgba(50, 32, 60, 0.85));
  border-color: rgba(255, 150, 200, 0.25);
}

html[data-theme='dark'] .shop-coins {
  background: linear-gradient(120deg, rgba(90, 70, 35, 0.7), rgba(50, 40, 30, 0.85));
  border-color: rgba(255, 200, 120, 0.25);
}

.shop-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  color: var(--pink-deep);
}

html[data-theme='dark'] .shop-icon {
  background: rgba(255, 255, 255, 0.1);
}

.shop-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-text b {
  font-size: 15px;
}

.shop-text small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.shop-go {
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pink-deep);
  white-space: nowrap;
}

.shop-notice {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card-soft);
  border: 1px dashed var(--line-strong);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* 付费墙下的购买入口 */
.pay-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 238, 200, 0.5);
  border: 1px dashed #ffd9a0;
  font-size: 13px;
  color: var(--ink-soft);
}

html[data-theme='dark'] .pay-buy {
  background: rgba(255, 220, 150, 0.1);
  border-color: rgba(255, 210, 150, 0.3);
}
/* 板块图标：自定义图片 */
.section-icon img,
.icon-prev img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.icon-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.icon-prev {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 800;
  color: var(--pink-deep);
  overflow: hidden;
}
/* 发帖：板块多选 */
.cat-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-soft);
  max-height: 240px;
  overflow-y: auto;
}

.cat-group-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}

.cat-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.cat-opt.kid {
  font-size: 12.5px;
  opacity: 0.92;
}

.cat-opt input {
  width: 15px;
  height: 15px;
  accent-color: var(--pink-deep);
  cursor: pointer;
}

.cat-opt:has(input:checked) {
  border-color: var(--pink);
  background: rgba(255, 200, 225, 0.28);
  color: var(--pink-deep);
  font-weight: 700;
}
/* ==========================================================================
   等级徽章 / VIP 称号
   ========================================================================== */

.lv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.7;
  color: #fff;
  background: linear-gradient(120deg, var(--lv, #b9b3c9), color-mix(in srgb, var(--lv, #b9b3c9) 55%, #ffffff));
  box-shadow: 0 4px 12px -6px var(--lv, #b9b3c9);
  white-space: nowrap;
  vertical-align: middle;
}

.lv-badge.sm {
  font-size: 10.5px;
  padding: 1px 7px 1px 5px;
  gap: 3px;
}

.lv-badge i {
  font-style: normal;
  font-size: 10px;
  opacity: 0.95;
}

.lv-badge img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.lv-badge b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lv-badge em {
  font-style: normal;
  font-weight: 600;
  opacity: 0.96;
}

.vip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--vc, #ff7fb2), color-mix(in srgb, var(--vc, #ff7fb2) 45%, #fff));
  box-shadow: 0 4px 14px -6px var(--vc, #ff7fb2);
  white-space: nowrap;
}

/* 个人页 / 会员中心的等级卡 */
.lv-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.lv-orb {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--lv, #b9b3c9), color-mix(in srgb, var(--lv, #b9b3c9) 45%, #fff));
  box-shadow: 0 10px 22px -12px var(--lv, #b9b3c9);
  overflow: hidden;
}

.lv-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lv-main {
  flex: 1;
  min-width: 0;
}

.lv-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 15px;
}

.lv-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}

.lv-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.lv-sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
/* 顶栏不换行（多了等级徽章后防止挤成竖排） */
.nav a {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  #user-area .lv-badge {
    display: none;
  }
}
/* 顶栏更紧凑 */
.topbar-inner {
  gap: 10px;
}

.nav {
  gap: 2px;
}

.nav a {
  padding: 6px 10px;
}

.topbar-right {
  gap: 6px;
}

#user-area {
  gap: 6px;
}

#user-area .btn {
  padding: 5px 10px;
}

#user-area .btn.icon-only {
  padding: 5px 9px;
  min-width: 0;
}

#user-area .coin-pill {
  padding: 4px 10px;
  font-size: 12.5px;
}

@media (max-width: 1320px) {
  #user-area .shop-link {
    display: none;
  }
}
/* 金币药丸：数字不换行、不被挤压 */
.coin-pill,
#user-area .coin-pill {
  white-space: nowrap;
  flex: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

#user-area .coin-pill {
  height: 30px;
  padding: 0 10px 0 8px;
  min-width: 0;
}

.coin-pill .coin-num {
  display: inline-block;
  white-space: nowrap;
}
.coin-pill svg,
.coin-pill .coin-num {
  flex: none;
}

.coin-pill .coin-num {
  font-weight: 800;
}
/* ==========================================================================
   头像菜单：悬停弹出 + 顶部余额/等级
   ========================================================================== */

.menu-head {
  padding: 8px 10px 10px;
}

.menu-head-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.menu-head-top b {
  font-size: 14px;
}

.menu-head-coins {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--gold-deep, #a06a00);
}

.menu-head-coins b {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--gold-deep, #a06a00);
}

.menu-head-coins span {
  color: var(--muted);
  font-size: 11.5px;
}

.menu-head-level {
  margin-top: 6px;
}

.menu-head + hr {
  margin: 2px 6px 6px;
}

/* 悬停打开（触屏仍然点击） */
@media (hover: hover) {
  .user-menu:hover .menu {
    display: block;
    animation: pop 0.16s ease;
  }
}

.user-menu {
  padding-bottom: 6px;
  margin-bottom: -6px;
}

/* 编辑资料 */
.profile-edit {
  max-width: 620px;
  margin: 0 auto;
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.avatar-preview .avatar {
  border-radius: 50%;
}

.avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* ==========================================================================
   赚金币任务
   ========================================================================== */

.task-panel {
  padding: 0;
  overflow: hidden;
}

.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  background: linear-gradient(120deg, rgba(255, 236, 246, 0.9), rgba(240, 236, 255, 0.9));
  border-bottom: 1px dashed var(--line-strong);
}

html[data-theme='dark'] .task-head {
  background: linear-gradient(120deg, rgba(70, 40, 62, 0.7), rgba(45, 38, 70, 0.7));
}

.task-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

.task-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.task-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.task-balance b {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold-deep, #a06a00);
  font-variant-numeric: tabular-nums;
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px dashed var(--line);
}

.task-card:last-child {
  border-bottom: 0;
}

.task-card.ready {
  background: rgba(255, 236, 246, 0.45);
}

html[data-theme='dark'] .task-card.ready {
  background: rgba(255, 150, 200, 0.06);
}

.task-card.done {
  opacity: 0.62;
}

.task-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  font-size: 20px;
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
}

.task-reward {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pink-deep);
  background: rgba(255, 200, 225, 0.35);
  border-radius: 999px;
  padding: 1px 9px;
}

.task-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.task-progress {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.task-action {
  flex: none;
}

.task-done,
.task-todo {
  font-size: 12px;
  color: var(--muted);
}

.task-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-top: 1px dashed var(--line);
}
/* 长用户名不撑爆顶栏 */
.user-trigger span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 头像菜单：补一段透明的「悬停桥」，鼠标从头像移到菜单不会断开 */
.menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.user-menu {
  padding-bottom: 10px;
  margin-bottom: -10px;
}

/* 菜单本身也留一点缓冲，鼠标划过边缘不会立刻关 */
.menu {
  padding-top: 10px;
  background-clip: padding-box;
}
/* ==========================================================================
   头像选择：预选头像 + VIP 限制
   ========================================================================== */

.avatar-picker {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(120, 70, 140, 0.6);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-side {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.avatar-lock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 236, 200, 0.5);
  border: 1px dashed #ffd9a0;
  font-size: 12px;
  color: var(--ink-soft);
  width: 100%;
}

.avatar-lock b {
  font-size: 13px;
  color: #a06a00;
}

.avatar-lock .btn {
  align-self: flex-start;
  margin-top: 4px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-soft);
}

.avatar-opt {
  padding: 0;
  border: 3px solid transparent;
  border-radius: 16px;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.14s, border-color 0.14s;
}

.avatar-opt img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 13px;
  display: block;
}

.avatar-opt:hover {
  transform: translateY(-2px);
}

.avatar-opt.active {
  border-color: var(--pink-deep);
  box-shadow: 0 6px 16px -10px var(--pink-deep);
}
/* 主管理 / 限制开关 */
.tag-owner {
  background: linear-gradient(120deg, #ffb347, #ff7b9c);
  color: #fff;
  border: 0;
}

.owner-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.btn.ban-on {
  color: #fff;
  background: linear-gradient(120deg, #ff7b9c, #ff5f8a);
  border-color: transparent;
}

.btn.ban-on:hover {
  filter: brightness(1.05);
}
/* 会员管理：操作按钮自动换行 */
td.ops-cell {
  white-space: normal;
  line-height: 1.9;
}

td.ops-cell .btn {
  margin: 2px 0 2px 4px;
  padding: 3px 9px;
  font-size: 12px;
}
/* ==========================================================================
   板块：每行两个
   ========================================================================== */

.section-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.section-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.section-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head {
  flex: 1;
  min-width: 0;
}

.section-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-stats {
  display: flex;
  gap: 14px;
  flex: none;
}

.section-stats span {
  display: flex;
  flex-direction: column;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
  text-align: right;
}

.section-stats b {
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.section-last {
  width: auto;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-last .last-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--pink-deep);
  background: rgba(255, 200, 225, 0.32);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
}

.section-last a {
  color: var(--ink-soft);
  font-weight: 600;
}

.section-last a:hover {
  color: var(--pink-deep);
}

.section-last small {
  margin-left: 6px;
  font-size: 11px;
}

.section-kids {
  margin-top: 0;
}

@media (max-width: 900px) {
  .section-list {
    grid-template-columns: 1fr;
  }
}
/* 两列板块卡：修正对齐 */
.section-row {
  align-items: stretch;
}

.section-last {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.section-last a,
.section-last small {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-last a {
  flex: 0 1 auto;
  min-width: 0;
}

.section-last small {
  flex: none;
  margin-left: 0;
}

.section-last .last-label {
  flex: none;
}
/* ==========================================================================
   后台列表：会员卡片 / 批量操作
   ========================================================================== */

.list-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px dashed var(--line);
}

.bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.bulk-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--pink-deep);
  cursor: pointer;
}

.list-count {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}

.member-list {
  display: flex;
  flex-direction: column;
}

.member-row {
  display: grid;
  grid-template-columns: 26px 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--line);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row:hover {
  background: var(--card-soft);
}

.m-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--pink-deep);
  cursor: pointer;
}

.m-avatar .avatar {
  border-radius: 50%;
}

.m-main {
  min-width: 0;
}

.m-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 700;
}

.m-name a {
  color: var(--ink);
}

.m-name a:hover {
  color: var(--pink-deep);
}

.m-handle {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.m-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.m-coins {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold-deep, #a06a00);
  font-weight: 800;
  font-size: 12.5px;
}

.m-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.m-actions .btn,
.m-extra .btn {
  padding: 3px 9px;
  font-size: 12px;
}

.m-extra {
  grid-column: 2 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.m-extra[hidden] {
  display: none;
}

.tag-ban {
  background: rgba(255, 120, 150, 0.16);
  color: #d6456b;
  border-color: rgba(255, 120, 150, 0.35);
}

@media (max-width: 900px) {
  .member-row {
    grid-template-columns: 26px 40px 1fr;
  }

  .m-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}
/* 分页条 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pager-total {
  font-size: 12px;
  color: var(--muted);
  margin-right: 6px;
}

.pager-single {
  font-size: 12px;
  color: var(--muted);
}

.page-num {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.page-num:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.page-num.active {
  background: linear-gradient(120deg, var(--pink), var(--purple));
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
/* 卡密分栏 tab */
.code-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.code-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}

.code-tab:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.code-tab.active {
  background: linear-gradient(120deg, var(--pink), var(--purple));
  border-color: transparent;
  color: #fff;
}
/* ==========================================================================
   A2：手机端顶栏收窄（390 宽不再溢出）
   ========================================================================== */

@media (max-width: 480px) {
  .topbar-inner {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #user-area {
    gap: 4px;
  }

  #user-area .btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  #user-area .shop-link {
    display: none;
  }

  #user-area .btn.icon-only {
    display: none;
  }

  .user-trigger {
    padding: 0 8px 0 3px;
    height: 32px;
  }

  .user-trigger span {
    max-width: 56px;
  }

  .nav a {
    padding: 6px 7px;
    font-size: 12.5px;
  }
}

/* ==========================================================================
   A3：深色模式对比度
   ========================================================================== */

html[data-theme='dark'] .empty,
html[data-theme='dark'] .empty-box,
html[data-theme='dark'] .empty small {
  color: #cbbfd9;
}

html[data-theme='dark'] .empty strong {
  color: #f1e9fb;
}

html[data-theme='dark'] .avatar {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  filter: saturate(0.9) brightness(0.92);
}

html[data-theme='dark'] .btn:disabled,
html[data-theme='dark'] .btn[disabled] {
  opacity: 1;
  color: #d9cfe6;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .m-meta,
html[data-theme='dark'] .hint,
html[data-theme='dark'] .pager-single,
html[data-theme='dark'] .list-count {
  color: #b9aecb;
}

html[data-theme='dark'] .log-row .what small,
html[data-theme='dark'] .task-desc {
  color: #b9aecb;
}

html[data-theme='dark'] .vip-hero {
  filter: brightness(0.82) saturate(0.9);
}
/* 空状态插画 */
.empty-art {
  width: 96px;
  height: 68px;
  display: block;
  margin: 0 auto 10px;
  color: var(--pink-deep);
}

html[data-theme='dark'] .empty-art {
  color: #d9b8ff;
  opacity: 0.9;
}

/* 深色模式下 VIP 横幅压暗一些 */
html[data-theme='dark'] .vip-hero {
  filter: none;
  background:
    radial-gradient(120% 120% at 88% 10%, rgba(255, 190, 120, 0.28), transparent 60%),
    radial-gradient(120% 140% at 10% 90%, rgba(176, 140, 255, 0.34), transparent 62%),
    linear-gradient(135deg, #3a2340, #4a2a4e 55%, #5a2f57);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

html[data-theme='dark'] .vip-hero h1,
html[data-theme='dark'] .vip-hero p {
  color: #fdf3ff;
}

html[data-theme='dark'] .vip-hero .vip-pill {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
/* 深色模式：压掉 VIP 横幅右上角的亮斑 */
html[data-theme='dark'] .vip-hero::after {
  opacity: 0.12;
  background: rgba(255, 255, 255, 0.35);
}

/* 品牌与导航之间留点空 */
.brand {
  margin-right: 6px;
}
/* 后台文章：写文章按钮行 / 精华标签 / 开关态 */
.list-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tag-essence {
  background: linear-gradient(120deg, #FFE9B0, #FFD27A);
  color: #7A4B00;
  border-color: #F0C069;
}

.btn.is-on {
  background: linear-gradient(120deg, var(--pink), var(--purple));
  color: #fff;
  border-color: transparent;
}

.flag-row {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 42px;
  flex-wrap: wrap;
}

.flag-row .check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  cursor: pointer;
}

.flag-row .check input {
  width: 16px;
  height: 16px;
  accent-color: var(--pink-deep);
}
/* 后台文章操作分组 + 筛选框宽度 */
.ops-cell .ops-group {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.ops-cell .ops-group:last-child {
  margin-bottom: 0;
}

.ops-cell .ops-group .btn {
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.search-scope {
  min-width: 108px;
}
/* 标题里的置顶 / 精华 开关标签 */
.chip-toggle {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  margin-left: 4px;
  border-radius: 6px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  vertical-align: middle;
}

.chip-toggle:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.chip-toggle.on {
  border: 0;
  background: linear-gradient(120deg, var(--pink), var(--purple));
  color: #fff;
  font-weight: 700;
}

.chip-toggle.gold.on {
  background: linear-gradient(120deg, #FFE9B0, #FFCB66);
  color: #7A4B00;
}
/* 后台文章标题列 */
.title-cell {
  max-width: 320px;
}

.title-cell .title-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.title-cell .title-flags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.title-cell .title-flags .chip-toggle,
.title-cell .title-flags .tag {
  margin-left: 0;
}
/* 采集页 */
.crawl-url {
  max-width: 320px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 采集来源标签 */
.tag-source {
  color: var(--muted);
  border-style: dashed;
}

.tag-source:hover {
  color: var(--pink-deep);
  border-color: var(--pink);
}
/* 采集页顶部开关 */
.crawl-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--card-soft, #FAF6FC);
  border: 1px dashed var(--line-strong);
}

.crawl-switch .hint {
  font-size: 12px;
}
/* 采集：登录账号区 */
.login-fields[hidden] {
  display: none;
}

.login-fields {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--card-soft, #FAF6FC);
  border: 1px dashed var(--line-strong);
}
/* 采集：登录方式切换 */
.login-fields {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--card-soft, #FAF6FC);
  border: 1px dashed var(--line-strong);
}

.login-fields[hidden] {
  display: none;
}

.login-fields code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.06);
}
/* 审核列表：标题单行省略，行更紧凑 */
#admin-review .title-cell,
.title-cell {
  max-width: 460px;
}

.table td.title-cell .title-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 审核表格：紧凑 */
.table td.title-cell {
  max-width: 360px;
}

.ops-cell .ops-group {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.ops-cell .ops-group .btn {
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}

/* 采集源表格：紧凑两行 + 按钮不外溢 */
.crawl-table {
  table-layout: fixed;
  width: 100%;
}

.crawl-table th,
.crawl-table td {
  padding: 10px 10px;
  vertical-align: middle;
}

.crawl-table td:first-child b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.crawl-table .crawl-url {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.crawl-table .src-last {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.crawl-table .src-last b {
  color: var(--text, inherit);
  font-weight: 600;
  display: block;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crawl-table .ops-cell {
  padding-right: 6px;
}

.crawl-ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  justify-items: stretch;
}

.crawl-ops .btn {
  padding: 3px 6px;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
  min-width: 0;
}


/* 采集源操作按钮：一行紧凑排开 */
.crawl-ops {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.crawl-ops .btn {
  padding: 2px 5px;
  font-size: 10.5px;
  line-height: 1.6;
  white-space: nowrap;
  min-width: 0;
}
/* 后台文章表格：紧凑 + 操作列不外溢 */
.article-table {
  table-layout: fixed;
  width: 100%;
}

.article-table th,
.article-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.article-table .title-cell {
  max-width: none;
}

.article-table td.title-cell .title-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-table .title-flags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.article-table .ops-cell .ops-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  justify-content: flex-end;
}

.article-table .ops-cell .btn {
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.chip-toggle {
  opacity: 0.55;
}

.chip-toggle.on {
  opacity: 1;
}
/* ===== 商城入口：醒目版 ===== */
.shop-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin: 16px 0 6px;
}

.shop-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  border-radius: 20px;
  border: 1px solid transparent;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shop-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.65), transparent 60%);
  pointer-events: none;
}

.shop-card:hover {
  transform: translateY(-3px);
}

.shop-card:active {
  transform: translateY(-1px);
}

/* 会员卡：粉紫渐变 */
.shop-vip {
  background: linear-gradient(135deg, #ffe4f1 0%, #ffd9ea 45%, #f6e0ff 100%);
  border-color: rgba(255, 145, 196, 0.45);
  box-shadow: 0 10px 26px -12px rgba(255, 105, 170, 0.55);
}

.shop-vip:hover {
  box-shadow: 0 16px 34px -12px rgba(255, 90, 160, 0.65);
}

/* 金币卡：金橙渐变 */
.shop-coins {
  background: linear-gradient(135deg, #fff3d6 0%, #ffe6b8 50%, #ffe9d0 100%);
  border-color: rgba(255, 190, 90, 0.5);
  box-shadow: 0 10px 26px -12px rgba(235, 165, 40, 0.5);
}

.shop-coins:hover {
  box-shadow: 0 16px 34px -12px rgba(225, 150, 30, 0.6);
}

.shop-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(140deg, #ff6fae, #b36bff);
  box-shadow: 0 8px 18px -6px rgba(255, 100, 165, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.shop-coins .shop-icon {
  background: linear-gradient(140deg, #ffb02e, #ff7a3d);
  box-shadow: 0 8px 18px -6px rgba(235, 150, 30, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.shop-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-text b {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #8a2f5e;
}

.shop-coins .shop-text b {
  color: #8a5410;
}

.shop-text small {
  font-size: 12.5px;
  line-height: 1.55;
  color: #9b6b83;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-coins .shop-text small {
  color: #9a7332;
}

.shop-cta {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #ff5fa2, #a35bff);
  box-shadow: 0 8px 18px -8px rgba(255, 80, 150, 0.9);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.shop-coins .shop-cta {
  background: linear-gradient(135deg, #ffa41b, #ff6f3c);
  box-shadow: 0 8px 18px -8px rgba(235, 140, 20, 0.9);
}

.shop-card:hover .shop-cta {
  filter: brightness(1.06);
  transform: translateX(2px);
}

.shop-cta i {
  font-style: normal;
  font-size: 13px;
}

/* 深色主题 */
html[data-theme='dark'] .shop-vip {
  background: linear-gradient(135deg, rgba(92, 44, 74, 0.95), rgba(64, 40, 86, 0.95));
  border-color: rgba(255, 145, 196, 0.3);
}

html[data-theme='dark'] .shop-coins {
  background: linear-gradient(135deg, rgba(88, 64, 28, 0.95), rgba(70, 48, 26, 0.95));
  border-color: rgba(255, 190, 90, 0.3);
}

html[data-theme='dark'] .shop-text b {
  color: #ffc0dd;
}

html[data-theme='dark'] .shop-coins .shop-text b {
  color: #ffd79a;
}

html[data-theme='dark'] .shop-text small {
  color: #d5a8c0;
}

html[data-theme='dark'] .shop-coins .shop-text small {
  color: #d8b98a;
}

@media (max-width: 560px) {
  .shop-card {
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }

  .shop-cta {
    width: 100%;
    justify-content: center;
  }
}
/* 深色主题：图标保持彩色渐变（覆盖旧的灰底规则） */
html[data-theme='dark'] .shop-card .shop-icon {
  background: linear-gradient(140deg, #ff6fae, #b36bff);
  box-shadow: 0 8px 18px -6px rgba(255, 100, 165, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
}

html[data-theme='dark'] .shop-coins .shop-icon {
  background: linear-gradient(140deg, #ffb02e, #ff7a3d);
  box-shadow: 0 8px 18px -6px rgba(235, 150, 30, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* ===== 商城入口：再放大一号 ===== */
.shop-row {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin: 18px 0 8px;
}

.shop-card {
  gap: 20px;
  padding: 26px 26px;
  border-radius: 22px;
  min-height: 118px;
}

.shop-icon {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  font-size: 30px;
}

.shop-text {
  gap: 6px;
}

.shop-text b {
  font-size: 21px;
}

.shop-text small {
  font-size: 13.5px;
  line-height: 1.6;
}

.shop-cta {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 999px;
  gap: 6px;
}

.shop-cta i {
  font-size: 15px;
}

@media (max-width: 560px) {
  .shop-card {
    padding: 20px;
    min-height: 0;
    gap: 14px;
  }

  .shop-icon {
    width: 54px;
    height: 54px;
    font-size: 24px;
    border-radius: 16px;
  }

  .shop-text b {
    font-size: 18px;
  }

  .shop-cta {
    padding: 12px 18px;
    font-size: 14px;
  }
}
/* ===== 商城入口：按钮放到底部整行，文字不再挤 ===== */
.shop-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px 20px;
  padding: 24px 24px 20px;
}

.shop-card .shop-text {
  gap: 6px;
}

.shop-card .shop-text b {
  font-size: 21px;
}

.shop-card .shop-text small {
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-line-clamp: 3;
}

.shop-card .shop-cta {
  grid-column: 1 / -1;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  margin-top: 4px;
}

.shop-card:hover .shop-cta {
  transform: none;
  filter: brightness(1.07);
}

@media (max-width: 560px) {
  .shop-card {
    padding: 18px;
    gap: 14px;
  }
}
/* ===== 签到卡片：醒目版 ===== */
.checkin-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 22px 22px 20px;
  background: linear-gradient(135deg, #ffe2f0 0%, #f7dcff 55%, #e7e4ff 100%);
  border: 1px solid rgba(255, 160, 205, 0.45);
  box-shadow: 0 14px 32px -18px rgba(255, 105, 170, 0.6);
}

.checkin-panel::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 65%);
  pointer-events: none;
}

.checkin-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.checkin-title h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #8a2f5e;
  letter-spacing: 0.3px;
}

.checkin-title h2 span {
  display: none;
}

.checkin-title p {
  margin: 0;
  font-size: 12.5px;
  color: #a06b85;
  line-height: 1.6;
}

.streak-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(140deg, #ff6fae, #a35bff);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(255, 90, 160, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.streak-badge b {
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.streak-badge span {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.92;
  letter-spacing: 0.5px;
}

.checkin-panel .checkin-days {
  display: grid;
  padding: 0 2px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.checkin-panel .day-cell {
  min-width: 0;
}

.checkin-panel .day-cell {
  padding: 12px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  text-align: center;
  transition: transform 0.15s ease;
}

.checkin-panel .day-cell i {
  display: block;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  color: #c58aa8;
  margin-bottom: 4px;
}

.checkin-panel .day-cell span {
  font-size: 11px;
  color: #a8788f;
}

.checkin-panel .day-cell.done {
  background: linear-gradient(140deg, #ffb3d8, #cf9bff);
  border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(255, 110, 175, 0.8);
}

.checkin-panel .day-cell.done i,
.checkin-panel .day-cell.done span {
  color: #fff;
}

.checkin-panel .day-cell.today {
  background: #fff;
  box-shadow: 0 0 0 2px #ff5fa2, 0 10px 20px -12px rgba(255, 70, 150, 0.8);
}

.checkin-panel .day-cell.today i {
  color: #ff3d8e;
}

.checkin-btn {
  position: relative;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff5fa2 0%, #b55bff 100%);
  box-shadow: 0 14px 26px -12px rgba(255, 70, 150, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.checkin-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.checkin-btn:active:not(:disabled) {
  transform: translateY(0);
}

.checkin-btn:disabled {
  cursor: default;
  color: #8a2f5e;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
  border: 1px dashed rgba(255, 120, 180, 0.6);
}

.checkin-foot {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #a06b85;
}

/* 深色主题 */
html[data-theme='dark'] .checkin-panel {
  background: linear-gradient(135deg, rgba(92, 44, 74, 0.95), rgba(62, 42, 92, 0.95));
  border-color: rgba(255, 145, 196, 0.28);
}

html[data-theme='dark'] .checkin-title h2 {
  color: #ffc0dd;
}

html[data-theme='dark'] .checkin-title p,
html[data-theme='dark'] .checkin-foot {
  color: #d2a4bd;
}

html[data-theme='dark'] .checkin-panel .day-cell {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme='dark'] .checkin-panel .day-cell span {
  color: #c9a2b9;
}

html[data-theme='dark'] .checkin-panel .day-cell.today {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 560px) {
  .checkin-panel {
    padding: 18px 16px 16px;
  }

  .checkin-panel .checkin-days {
    gap: 5px;
  }

  .checkin-panel .day-cell {
    padding: 10px 2px;
  }

  .streak-badge {
    min-width: 66px;
  }

  .streak-badge b {
    font-size: 22px;
  }

  .checkin-btn {
    font-size: 15px;
    padding: 13px 14px;
  }
}
/* 推荐帖子表格：标题不压住浏览数 */
.featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--line);
}

.featured-search {
  flex: 1 1 260px;
  max-width: 420px;
}

.featured-table {
  table-layout: fixed;
  width: 100%;
}

.featured-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.featured-table .title-cell {
  max-width: none;
}

.featured-table .title-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-meta {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.featured-pick {
  text-align: right;
  white-space: nowrap;
}

.featured-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px dashed var(--line);
}

@media (max-width: 560px) {
  .featured-table {
    table-layout: auto;
  }

  .featured-table td {
    padding: 8px;
  }

  .featured-meta {
    font-size: 11.5px;
  }
}
/* ===== 会员中心两列布局 ===== */
/* 会员中心：两列，各自按内容高度堆叠（不拉伸卡片） */
.member-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 10px;
}

.member-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

@media (max-width: 820px) {
  .member-grid {
    grid-template-columns: 1fr;
  }
}

/* 兑换卡密：填满高度，加步骤与购买入口 */
.redeem-panel {
  display: flex;
  flex-direction: column;
}

.redeem-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 4px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 233, 246, 0.75), rgba(240, 234, 255, 0.75));
  border: 1px dashed rgba(255, 170, 205, 0.6);
}

.redeem-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #7c5a72;
  line-height: 1.55;
}

.redeem-step i {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6fae, #b36bff);
  box-shadow: 0 4px 10px -4px rgba(255, 90, 160, 0.8);
}

.redeem-buy {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.redeem-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

html[data-theme='dark'] .redeem-steps {
  background: linear-gradient(135deg, rgba(92, 52, 78, 0.6), rgba(60, 46, 88, 0.6));
  border-color: rgba(255, 150, 200, 0.25);
}

html[data-theme='dark'] .redeem-step {
  color: #d9b3c9;
}
/* 怎么赚金币 */
.earn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 14px;
}

.earn-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card-soft);
  border: 1px solid var(--line);
}

.earn-item b {
  display: block;
  font-size: 13px;
}

.earn-item small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.earn-ico {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  background: linear-gradient(135deg, #ffe0ef, #eee0ff);
}

html[data-theme='dark'] .earn-ico {
  background: linear-gradient(135deg, rgba(255, 120, 180, 0.25), rgba(160, 120, 255, 0.25));
}

.earn-go {
  display: inline-flex;
  width: 100%;
  justify-content: center;
}
/* 回收站表格：紧凑 + 批量栏 */
.trash-table {
  table-layout: fixed;
  width: 100%;
}

.trash-table th,
.trash-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.trash-table .title-cell {
  max-width: none;
}

.trash-table td.title-cell .title-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-table .ops-cell .ops-group {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.trash-table .ops-cell .btn {
  padding: 3px 8px;
  font-size: 11.5px;
  white-space: nowrap;
}
/* ===== 付费下载卡片：放大、更醒目 ===== */
.paywall-pay {
  display: block;
  padding: 22px 24px;
  margin: 22px 0;
  border-radius: 22px;
  border: 1.5px solid rgba(255, 150, 195, 0.55);
  background: linear-gradient(135deg, #fff1f8 0%, #f3ecff 60%, #eef4ff 100%);
  box-shadow: 0 16px 34px -22px rgba(255, 90, 160, 0.75);
}

.paywall-pay .paywall-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.paywall-pay .paywall-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 26px;
  box-shadow: 0 12px 26px -12px rgba(255, 90, 160, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.paywall-pay .paywall-text {
  flex: 1;
  min-width: 0;
}

.paywall-pay .paywall-text b {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #8a2f5e;
}

.paywall-pay .paywall-text p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #96627f;
}

.paywall-pay .paywall-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.paywall-pay .paywall-cta {
  flex: 1 1 240px;
  justify-content: center;
  padding: 14px 22px;
  font-size: 15.5px;
  font-weight: 900;
  border-radius: 999px;
  box-shadow: 0 14px 26px -14px rgba(255, 70, 150, 0.9);
}

.paywall-pay .paywall-vip-btn {
  flex: 0 1 190px;
  justify-content: center;
  padding: 14px 18px;
  font-size: 14px;
  border-radius: 999px;
}

html[data-theme='dark'] .paywall-pay {
  border-color: rgba(255, 150, 195, 0.3);
  background: linear-gradient(135deg, rgba(92, 44, 74, 0.9), rgba(58, 44, 86, 0.9));
}

html[data-theme='dark'] .paywall-pay .paywall-text b {
  color: #ffc0dd;
}

html[data-theme='dark'] .paywall-pay .paywall-text p {
  color: #d5a8c0;
}

@media (max-width: 560px) {
  .paywall-pay {
    padding: 18px;
  }

  .paywall-pay .paywall-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .paywall-pay .paywall-text b {
    font-size: 16px;
  }

  .paywall-pay .paywall-cta,
  .paywall-pay .paywall-vip-btn {
    flex: 1 1 100%;
    font-size: 14px;
    padding: 12px 16px;
  }
}
/* VIP 按钮：提高对比度，别被渐变冲淡 */
.paywall-pay .paywall-vip-btn {
  background: #fff;
  color: #b3266b;
  border: 1.5px solid rgba(255, 120, 180, 0.6);
  font-weight: 800;
  box-shadow: none;
}

.paywall-pay .paywall-vip-btn:hover {
  background: #fff5fa;
  border-color: #ff6fae;
}

html[data-theme='dark'] .paywall-pay .paywall-vip-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffc0dd;
  border-color: rgba(255, 150, 195, 0.45);
}
/* ===== 后台：图片管理 ===== */
.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px 4px;
}

.media-auto {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
}

.media-auto input {
  width: 76px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  text-align: center;
}

.media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}

.media-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-card-unused {
  border-color: rgba(255, 150, 190, 0.7);
  background: rgba(255, 240, 246, 0.6);
}

.media-pick {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
}

.media-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-tint);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px 0;
  font-size: 11.5px;
  color: var(--muted);
}

.media-size {
  color: var(--ink-soft);
  font-weight: 700;
}

.media-time {
  padding: 2px 10px 8px;
  font-size: 11px;
  color: var(--muted);
}

.media-del {
  margin: 0 10px 10px;
  justify-content: center;
}

html[data-theme='dark'] .media-card-unused {
  background: rgba(92, 52, 78, 0.35);
  border-color: rgba(255, 150, 190, 0.35);
}

html[data-theme='dark'] .media-pick {
  background: rgba(0, 0, 0, 0.55);
}

@media (max-width: 560px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .media-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
/* 图片管理：筛选 chips 在工具条里 */
.list-bar .media-chips {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.list-bar .media-chips .chip {
  padding: 5px 12px;
  font-size: 12.5px;
}
/* ===== 分页：跳转页码 ===== */
.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px dashed var(--line-strong);
  font-size: 12.5px;
  color: var(--muted);
}

.page-jump input {
  width: 64px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}

.page-jump input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 120, 180, 0.18);
}

.page-jump-total {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .page-jump {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}
/* 页码省略号 */
.page-gap {
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
}
/* 推荐帖子：序号与排序按钮 */
.featured-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: var(--grad-solid);
  vertical-align: middle;
}

.featured-rank-empty {
  color: var(--muted);
  background: var(--bg-tint);
}

.featured-move {
  display: inline-flex;
  gap: 2px;
  margin-right: 10px;
}

.featured-move .btn {
  padding: 2px 7px;
  font-size: 12px;
  line-height: 1.2;
}

.featured-pick {
  white-space: nowrap;
}
.featured-rank-out {
  background: var(--bg-tint);
  color: var(--muted);
}

.featured-out {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #a0642a;
  background: #fff4e6;
  white-space: nowrap;
}
/* 预选头像：6 个一排更好看 */
.avatar-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
}

@media (max-width: 720px) {
  .avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* 板块图标：预设选择面板 */
.icon-presets {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  gap: 6px;
  margin: 8px 0 6px;
  padding: 8px;
  border-radius: 12px;
  background: var(--card-soft);
  border: 1px dashed var(--line-strong);
}

.icon-preset-opt {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
}

.icon-preset-opt img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.icon-preset-opt:hover {
  border-color: var(--pink);
}

.icon-preset-opt.active {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 120, 180, 0.2);
}
/* 板块表：图标面板改成浮层，避免撑开列宽 */
.cat-table {
  table-layout: fixed;
}

.cat-table .icon-cell {
  position: relative;
}

.cat-table .icon-presets {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  margin-top: 6px;
  grid-template-columns: repeat(6, 38px);
  background: var(--card);
  box-shadow: 0 18px 40px -20px rgba(60, 20, 60, 0.5);
}

.cat-table .icon-cell .icon-prev {
  width: 30px;
  height: 30px;
}
/* ===== 板块管理：卡片式列表 ===== */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 18px;
}

.cat-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--card);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.cat-item:hover {
  border-color: rgba(255, 150, 190, 0.6);
  box-shadow: 0 10px 26px -22px rgba(220, 60, 130, 0.7);
}

.cat-item-child {
  margin-left: 22px;
  background: var(--card-soft);
}

.cat-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-child-mark {
  color: var(--muted);
  font-size: 13px;
}

.cat-main .icon-cell {
  flex: none;
}

.cat-name {
  flex: 1 1 200px;
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.cat-ops {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.cat-ops .btn {
  padding: 6px 12px;
  font-size: 12.5px;
}

.cat-del {
  padding: 6px 10px;
}

.cat-sub {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.cat-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.cat-field input,
.cat-field select {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
}

.cat-field-desc {
  flex: 1 1 260px;
  min-width: 200px;
}

.cat-field-sort input {
  width: 84px;
}

.cat-count {
  margin-left: auto;
  padding-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .cat-item-child {
    margin-left: 10px;
  }

  .cat-ops {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .cat-count {
    margin-left: 0;
  }
}
/* ===== 首页模块配置：样式 / 板块选择 ===== */
.block-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.block-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.block-row-extra {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card-soft);
  border: 1px dashed var(--line-strong);
}

.block-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.block-opt select {
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
}

.block-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-left: auto;
}
.block-opt {
  white-space: nowrap;
  flex: none;
}

.block-opt > span {
  white-space: nowrap;
  min-width: 28px;
}
/* 顶栏 LOGO：浅色 / 深色两套，按主题切换 */
.brand-logo-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-logo-wrap .brand-logo {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}

.brand-logo-wrap .logo-dark,
.sign-logo .logo-dark {
  display: none;
}

html[data-theme='dark'] .brand-logo-wrap .logo-dark,
html[data-theme='dark'] .sign-logo .logo-dark {
  display: block;
}

/* 只有存在深色版时才隐藏浅色版，否则深色主题下会没有 LOGO */
html[data-theme='dark'] .brand-logo-wrap:has(.logo-dark) .logo-light,
html[data-theme='dark'] .sign-logo:has(.logo-dark) .logo-light {
  display: none;
}

/* 头图里的 LOGO 两套也叠在同一格 */
.sign-logo {
  position: relative;
}

.sign-logo img {
  grid-area: 1 / 1;
}
/* 搜索框下面的标签行 */
.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 2px;
  padding: 0 2px;
}

.tag-row-label {
  font-size: 12px;
  color: var(--muted, #8a7a96);
  letter-spacing: 0.04em;
  margin-right: 2px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #b34a86;
  background: rgba(255, 138, 200, 0.13);
  border: 1px solid rgba(255, 138, 200, 0.28);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tag-chip:hover {
  background: rgba(255, 138, 200, 0.24);
  transform: translateY(-1px);
}

.tag-chip.active {
  color: #fff;
  background: linear-gradient(135deg, #ff7fb2, #b07bff);
  border-color: transparent;
}

.tag-chip.tag-clear {
  color: var(--muted, #8a7a96);
  background: transparent;
  border-style: dashed;
}

html[data-theme='dark'] .tag-chip {
  color: #ffb3d9;
  background: rgba(255, 138, 200, 0.14);
  border-color: rgba(255, 138, 200, 0.26);
}

html[data-theme='dark'] .tag-chip.active {
  color: #1a1224;
  background: linear-gradient(135deg, #ffb3d9, #c9a7ff);
}
/* ============ 页脚（后台首页装修里可编辑） ============ */
.site-footer {
  margin-top: 40px;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(160, 110, 180, 0.16);
}

.site-footer[hidden] {
  display: none;
}

.footer-inner {
  text-align: center;
  font-size: 12.5px;
  line-height: 1.9;
  color: #6f5f7d;
  word-break: break-word;
}

html[data-theme='dark'] .site-footer {
  border-top-color: rgba(200, 170, 230, 0.14);
}

html[data-theme='dark'] .footer-inner {
  color: #bcadd0;
}

@media (max-width: 640px) {
  .site-footer {
    margin-top: 28px;
    padding: 18px 12px 26px;
  }

  .footer-inner {
    font-size: 11.5px;
  }
}

/* 手机端：搜索栏 = 图标 + 输入框 + 搜索按钮 一行，范围下拉独占第二行 */
@media (max-width: 640px) {
  .toolbar {
    gap: 8px;
  }

  .toolbar .search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex: none;
    padding: 8px 10px;
  }

  .toolbar .search > svg {
    flex: none;
    margin-left: 2px;
  }

  .toolbar .search input[type='text'] {
    flex: 1 1 40%;
    min-width: 0;
    height: 42px;
    font-size: 14px;
  }

  .toolbar .search > .btn {
    flex: none;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
  }

  .toolbar .search .search-scope {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    height: 36px;
    margin: 0;
  }

  .toolbar .seg {
    width: 100%;
  }

  .toolbar .seg button {
    flex: 1;
  }
}

/* ==========================================================================
   手机端顶栏改两行：第一行 站点名 + 主题 + 头像，第二行 五个导航均分
   ========================================================================== */
@media (max-width: 640px) {
  .topbar-inner {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    padding-top: 8px;
    padding-bottom: 9px;
    gap: 8px 10px;
  }

  /* 第一行：LOGO + 站名 */
  .topbar-inner .brand {
    order: 1;
    flex: none;
    font-size: 16px;
  }

  /* 站名和 LOGO 在手机上也显示（原来整块被隐藏了） */
  .topbar-inner .brand span:not(.brand-mark) {
    display: inline;
  }

  .topbar-inner .brand .brand-logo-wrap {
    display: inline-grid;
    width: 28px;
    height: 28px;
  }

  .topbar-inner .brand .brand-logo-wrap .brand-logo {
    width: 28px;
    height: 28px;
  }

  /* 第一行右侧：主题 + 用户 */
  .topbar-inner .topbar-right {
    order: 2;
    margin-left: auto;
    gap: 6px;
  }

  /* 第二行：导航铺满，均分 */
  .topbar-inner .nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1px;
  }

  .topbar-inner .nav::-webkit-scrollbar {
    display: none;
  }

  .topbar-inner .nav a {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 6px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* 手机端第一行空间紧：头像只留图、名字放到菜单里 */
  .topbar-inner .user-trigger span {
    display: none;
  }

  .topbar-inner .user-trigger {
    padding: 3px;
    gap: 0;
  }

  /* 头像胶囊压缩一点，别把第一行撑爆 */
  .topbar-inner #user-area {
    gap: 6px;
  }

  /* 顶栏空间有限：等级 / VIP 胶囊先收起来，会员中心里还能看到 */
  .topbar-inner #user-area .badge,
  .topbar-inner #user-area .vip-chip,
  .topbar-inner #user-area .vip-pill {
    display: none;
  }

  /* 昵称超长就省略，别把发帖按钮挤走 */
  .topbar-inner #user-area .user-pill span,
  .topbar-inner #user-area .user-name {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-inner #user-area .btn-sm {
    padding: 0 10px;
  }
}

/* 超窄屏（360 以下）再收一档 */
@media (max-width: 380px) {
  .topbar-inner .nav a {
    padding: 8px 4px;
    font-size: 11.5px;
  }

  .topbar-inner .brand {
    font-size: 15px;
  }
}
/* ==========================================================================
   手机端：板块 / 最新发布 改成和电脑端一样的多列排版，整体缩小
   ========================================================================== */

@media (max-width: 900px) {
  /* 板块：恢复两列（原来 900 以下被压成一列） */
  .section-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 640px) {
  /* ---------- 板块卡 ---------- */
  .section-row {
    flex-direction: row;
    align-items: center;
    padding: 10px 11px;
    gap: 9px;
    border-radius: 14px;
    min-height: 0;
  }

  .section-row .section-top {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-width: 0;
  }

  .section-row .section-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    flex: none;
    font-size: 15px;
  }

  .section-row .section-icon img {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .section-row .section-head {
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
  }

  .section-row .section-name {
    font-size: 13px;
    line-height: 1.25;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 简介在手机上收掉，一列放不下 */
  .section-row .section-head p {
    display: none;
  }

  /* 卡片太窄：统计只留一个数字，去掉「主题 / 回复」文字 */
  .section-row .section-stats {
    margin-left: 4px;
    flex: none;
    width: auto;
    min-width: 0;
    display: flex;
    gap: 0;
    font-size: 0;
  }

  .section-row .section-stats b {
    font-size: 13px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .section-row .section-stats span:nth-child(2) {
    display: none;
  }

  /* 子板块和「最新一帖」收成一行小字，超出省略 */
  .section-row .section-kids {
    display: none;
  }

  .section-row .section-last {
    display: none;
  }

  /* ---------- 最新发布卡片 ---------- */
  .rec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .rec-card {
    border-radius: 14px;
  }

  .rec-card .rec-cover {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .rec-card .rec-body {
    padding: 8px 9px 9px;
    gap: 4px;
  }

  .rec-card .rec-body h3 {
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 摘要和作者行在手机上收掉，留标题 + 板块/价格 */
  .rec-card .rec-body p,
  .rec-card .rec-meta {
    display: none;
  }

  .rec-card .rec-tags {
    gap: 4px;
  }

  .rec-card .rec-tags .tag,
  .rec-card .rec-tags .chip,
  .rec-card .rec-tags span {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* 模块之间的间距也收一点 */
  .block {
    margin-bottom: 18px;
  }

  .block-head h2 {
    font-size: 15px;
  }
}
/* ==========================================================================
   手机端头图整体缩小：390 宽从 394px 压到 ~290px
   ========================================================================== */
@media (max-width: 720px) {
  .signboard {
    padding: 14px 16px 12px;
    border-radius: 18px;
    min-height: 0;
  }

  .sign-main {
    gap: 10px;
  }

  /* LOGO 78 → 48 */
  .sign-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .sign-logo img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  /* 标题 26 → 21，副标题 13.5 → 12.5 两行封顶 */
  .sign-copy h1 {
    font-size: 21px;
    line-height: 1.25;
  }

  .sign-copy p {
    font-size: 12.5px;
    line-height: 1.45;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 搜索条 58 → 44 */
  .sign-search {
    height: 44px;
    padding: 0 5px 0 13px;
    gap: 6px;
    border-radius: 14px;
    margin-top: 10px;
  }

  .sign-search input {
    font-size: 13.5px;
  }

  .sign-search svg {
    width: 16px;
    height: 16px;
  }

  .sign-go {
    height: 34px;
    padding: 0 15px;
    font-size: 13px;
    border-radius: 10px;
  }

  /* 数据条 65 → 42 */
  .sign-stats {
    margin-top: 10px;
    padding-top: 8px;
    gap: 14px;
  }

  .sign-stats b {
    font-size: 17px;
    line-height: 1.1;
  }

  .sign-stats span {
    font-size: 10.5px;
  }
}

/* ==========================================================================
   手机端整体缩小（≤640px）：卡片 / 列表 / 标签 / 表单 / 按钮统一收一档
   ========================================================================== */
@media (max-width: 640px) {
  /* ---------- 容器与卡片 ---------- */
  .container {
    padding: 0 12px;
  }

  .card {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .page-head {
    font-size: 12.5px;
    margin-bottom: 10px;
  }

  .block {
    margin-bottom: 16px;
  }

  .block-head h2 {
    font-size: 15px;
  }

  /* ---------- 板块 / 排序 / 标签 ---------- */
  .chips {
    gap: 6px;
    margin-bottom: 10px;
  }

  .chip {
    height: 28px;
    padding: 0 11px;
    font-size: 12px;
  }

  .chip small {
    font-size: 10.5px;
  }

  .seg {
    padding: 2px;
  }

  .seg button {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .tag-chip {
    height: 24px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .tag-row {
    margin: 8px 0 0;
    gap: 6px;
  }

  .tag-row-label {
    font-size: 11px;
  }

  /* ---------- 帖子列表卡片 ---------- */
  .post-card {
    padding: 12px 13px;
    border-radius: 16px;
  }

  .post-card .post-title {
    font-size: 14.5px;
    line-height: 1.35;
  }

  .post-card .post-excerpt {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .post-card .post-meta {
    font-size: 11.5px;
    margin-top: 8px;
    gap: 8px;
  }

  .post-card .post-top {
    gap: 5px;
  }

  .post-card .tag {
    font-size: 10.5px;
    padding: 2px 7px;
  }

  .post-card .thumb,
  .post-card .post-thumb {
    width: 78px;
    height: 78px;
    border-radius: 12px;
  }

  /* ---------- 小模块列表（编辑推荐 / 最多浏览） ---------- */
  .mini-list li {
    padding: 8px 0;
    font-size: 12.5px;
  }

  .mini-list .no {
    width: 18px;
    font-size: 12px;
  }

  .mini-list .mini-meta {
    font-size: 11px;
  }

  /* ---------- 分页 ---------- */
  .pager {
    gap: 6px;
    font-size: 12px;
  }

  .pager a,
  .pager span {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    font-size: 12px;
    border-radius: 10px;
  }

  .page-jump input,
  .page-jump button {
    height: 30px;
    font-size: 12px;
  }

  /* ---------- 表单 ---------- */
  .field {
    margin-bottom: 12px;
  }

  .field > label {
    font-size: 12.5px;
    margin-bottom: 6px;
  }

  .field input[type='text'],
  .field input[type='password'],
  .field input[type='number'],
  .field input[type='email'],
  .field select {
    height: 40px;
    font-size: 13.5px;
    border-radius: 12px;
  }

  .field textarea {
    font-size: 13.5px;
    border-radius: 12px;
    padding: 10px 12px;
  }

  .field .hint {
    font-size: 11.5px;
    margin-top: 5px;
  }

  /* ---------- 按钮 ---------- */
  .btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .btn-sm {
    height: 30px;
    padding: 0 11px;
    font-size: 12px;
  }

  .btn-lg {
    height: 40px;
    font-size: 14px;
  }

  /* ---------- 帖子详情 ---------- */
  .post-head h1,
  .post-title-main {
    font-size: 19px;
    line-height: 1.35;
  }

  .post-content,
  .post-body {
    font-size: 13.5px;
    line-height: 1.75;
  }

  .post-content h2,
  .post-body h2 {
    font-size: 15px;
  }

  .post-content h3,
  .post-body h3 {
    font-size: 14px;
  }

  /* ---------- 回复 ---------- */
  .reply {
    padding: 10px 0;
  }

  .reply .reply-body,
  .reply-content {
    font-size: 13px;
    line-height: 1.65;
  }

  /* ---------- 会员中心 / 任务 ---------- */
  .vip-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .vip-hero h2 {
    font-size: 19px;
  }

  .vip-card,
  .task-card {
    padding: 12px 14px;
    border-radius: 14px;
  }

  /* ---------- 空状态 ---------- */
  .empty {
    padding: 34px 16px;
    font-size: 13px;
  }

  .empty strong {
    font-size: 14.5px;
  }

  /* ---------- 提示条 ---------- */
  .toast {
    font-size: 13px;
    padding: 9px 16px;
  }


  /* ---------- 会员中心 / 商城卡 ---------- */
  .shop-card {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .shop-card b {
    font-size: 15px;
  }

  .shop-card small {
    font-size: 11.5px;
    line-height: 1.5;
  }

  .shop-card .btn,
  .shop-card .shop-go {
    height: 38px;
    font-size: 13px;
    border-radius: 12px;
  }

  .shop-row {
    gap: 12px;
  }

  .panel {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .checkin-panel {
    padding: 14px 14px 12px;
  }

  .checkin-btn {
    height: 42px;
    font-size: 14px;
  }

  .checkin-week .day,
  .checkin-week span {
    font-size: 11px;
  }

  .member-col {
    gap: 12px;
  }

  /* ---------- 帖子正文（.prose）---------- */
  .prose {
    font-size: 13.5px;
    line-height: 1.78;
  }

  .prose h1,
  .prose h2 {
    font-size: 15.5px;
    margin: 16px 0 8px;
  }

  .prose h3 {
    font-size: 14px;
    margin: 14px 0 6px;
  }

  .prose p {
    margin: 0 0 11px;
  }

  .prose ul,
  .prose ol {
    padding-left: 18px;
    margin: 0 0 11px;
  }

  .prose img {
    border-radius: 12px;
  }

  .prose blockquote {
    padding: 8px 12px;
    font-size: 13px;
  }

  .prose pre,
  .prose code {
    font-size: 12.5px;
  }

  .article-card {
    padding: 16px 15px;
    border-radius: 16px;
  }

  .article-card h1 {
    font-size: 19px;
    line-height: 1.38;
  }

  .article-meta {
    font-size: 11.5px;
  }

  .article-actions {
    gap: 6px;
  }

}


/* ==========================================================================
   手机端后台（≤640px）：标签横滑、统计卡压缩、表格可横滑、表单单列
   ========================================================================== */
@media (max-width: 640px) {
  /* ---------- 后台标签：全部换行显示，不做隐藏横向滚动 ---------- */
  .admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 2px;
    margin-bottom: 10px;
    overflow: visible;
  }

  .admin-tabs a,
  .admin-tabs button {
    flex: none;
    height: 26px;
    padding: 0 9px;
    font-size: 11.5px;
    border-radius: 999px;
    white-space: nowrap;
  }

  /* ---------- 概览统计卡：2 列，矮一半 ---------- */
  .admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .stat-card {
    padding: 9px 11px;
    border-radius: 13px;
    min-height: 0;
  }

  .stat-card span {
    font-size: 11px;
    line-height: 1.3;
  }

  .stat-card b {
    font-size: 18px;
    line-height: 1.2;
    margin-top: 2px;
  }

  /* ---------- 表格：字号缩小 + 容器可横滑 ---------- */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    font-size: 12px;
    min-width: 520px;
  }

  .table th,
  .table td {
    padding: 7px 9px;
    white-space: nowrap;
  }

  .table th {
    font-size: 11px;
  }

  /* 只有两三列的表（如「最近编辑」）不强制最小宽度，直接换行显示 */
  .table:not(:has(thead th:nth-child(4))) {
    min-width: 0;
  }

  .table:not(:has(thead th:nth-child(4))) td {
    white-space: normal;
    word-break: break-word;
  }

  /* 这类表第二列是「阅读数」，窄屏放不下就藏掉 */
  .table:not(:has(thead th:nth-child(4))) td:nth-child(2) {
    display: none;
  }

  /* 表格里的按钮再小一号 */
  .table .btn {
    height: 26px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  /* ---------- 卡片头部 / 工具条 ---------- */
  .card > div[style*='border-bottom'] {
    padding: 10px 12px !important;
    font-size: 13px;
  }

  .admin-toolbar,
  .toolbar-actions {
    gap: 6px;
    flex-wrap: wrap;
  }

  /* ---------- 表单：全部单列 ---------- */
  .grid-2,
  .admin-grid-2 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  /* ---------- 首页装修的模块行 ---------- */
  .block-row {
    padding: 9px 10px;
    gap: 8px;
    border-radius: 12px;
  }

  .block-row input[type='text'] {
    height: 32px;
    font-size: 12.5px;
  }

  .block-row select {
    height: 30px;
    font-size: 12px;
  }

  /* ---------- 采集源卡片 ---------- */
  .crawl-card {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .crawl-card h3 {
    font-size: 13.5px;
  }

  .crawl-card .crawl-url {
    font-size: 11px;
    word-break: break-all;
  }


  /* ---------- 后台会员列表 ---------- */
  .member-row {
    grid-template-columns: 20px 40px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 11px;
    border-radius: 13px;
  }

  .member-row .m-avatar,
  .member-row .m-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .member-row .m-name {
    font-size: 13.5px;
    gap: 5px;
    flex-wrap: wrap;
  }

  .member-row .m-meta {
    font-size: 11px;
    gap: 5px 9px;
    margin-top: 3px;
  }

  .member-row .m-actions {
    grid-column: 1 / -1;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
  }

  .member-row .m-actions .btn {
    height: 26px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .member-row .m-extra {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  /* ---------- 会员中心（用户端）再收一档 ---------- */
  .vip-hero {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .vip-hero h2,
  .vip-hero h1 {
    font-size: 17px;
  }

  .vip-hero p {
    font-size: 12.5px;
    line-height: 1.6;
    margin-top: 4px;
  }

  .vip-ledger,
  .vip-pills {
    gap: 6px;
    margin-top: 10px;
  }

  .vip-ledger span,
  .vip-pill {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .shop-card {
    padding: 12px 13px;
    gap: 10px;
  }

  .shop-card .shop-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 17px;
  }

  .shop-card b {
    font-size: 14.5px;
  }

  /* ---------- 签到区 ---------- */
  .checkin-week {
    gap: 4px;
  }

  .checkin-week > * {
    min-width: 0;
    padding: 5px 2px;
    font-size: 10.5px;
  }

  /* ---------- 等级 / 排行榜 ---------- */
  .level-row,
  .leader-row {
    padding: 8px 10px;
    font-size: 12.5px;
    border-radius: 12px;
  }

  /* 商城卡的 CTA 也收一档 */
  .shop-card .shop-cta {
    height: 40px;
    font-size: 13px;
    border-radius: 12px;
  }

  .shop-card .shop-text b {
    font-size: 14.5px;
  }

  .shop-card .shop-text small {
    font-size: 11.5px;
    line-height: 1.5;
  }

  /* ---------- 后台分页 ---------- */
  .pager {
    flex-wrap: wrap;
  }
}


/* ==========================================================================
   手机端会员中心：保持电脑端两列结构，整体缩小
   （商城两张卡并排、签到与兑换卡密并排）
   ========================================================================== */
@media (max-width: 640px) {
  /* 商城两卡并排 */
  .shop-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin: 10px 0 6px;
  }

  .shop-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 14px;
    min-height: 0;
  }

  .shop-card .shop-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
  }

  .shop-card .shop-text {
    gap: 2px;
  }

  .shop-card .shop-text b {
    font-size: 13px;
    line-height: 1.3;
  }

  .shop-card .shop-text small {
    font-size: 10.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .shop-card .shop-cta {
    width: 100%;
    height: 30px;
    font-size: 12px;
    border-radius: 9px;
    margin-top: 2px;
  }

  /* 签到 + 兑换卡密 两列并排，其余（金币流水 / 金币榜 / 怎么赚）通栏 */
  .member-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  /* 让两个容器里的卡片直接参与网格布局 */
  .member-grid > .member-col {
    display: contents;
  }

  .member-grid > .member-col > * {
    grid-column: 1 / -1;
    min-width: 0;
  }

  /* 兑换卡密通栏，排在「开通会员 / 购买金币」下面 */
  .member-grid > .member-col > .redeem-panel {
    grid-column: 1 / -1;
    order: 1;
  }

  /* 每日签到通栏，排在兑换卡密下面 */
  .member-grid > .member-col > .checkin-panel {
    grid-column: 1 / -1;
    order: 2;
  }

  /* 其余卡片（金币流水 / 金币榜 / 怎么赚）排最后 */
  .member-grid > .member-col > *:not(.checkin-panel):not(.redeem-panel) {
    order: 3;
  }

  /* 签到面板收窄后：天数格子变小、说明文字缩一号 */
  .checkin-panel {
    padding: 11px 10px 10px;
  }

  .checkin-panel h3,
  .checkin-panel .panel-title {
    font-size: 13px;
  }

  .checkin-panel .checkin-sub,
  .checkin-panel p {
    font-size: 10.5px;
    line-height: 1.5;
  }

  .checkin-days,
  .checkin-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  .checkin-panel .day-cell,
  .checkin-week > * {
    padding: 4px 1px;
    border-radius: 8px;
    min-width: 0;
  }

  .checkin-panel .day-cell i,
  .checkin-week > * i {
    font-size: 9px;
  }

  .checkin-panel .day-cell span,
  .checkin-week > * span {
    font-size: 8.5px;
    letter-spacing: -0.02em;
  }

  .checkin-btn {
    height: 32px;
    font-size: 12px;
    border-radius: 10px;
  }

  .checkin-streak,
  .checkin-tip {
    font-size: 10px;
  }

  /* 兑换卡密面板 */
  .redeem-panel {
    padding: 11px 10px;
  }

  .redeem-panel h3,
  .redeem-panel .panel-title {
    font-size: 13px;
  }

  .redeem-row {
    gap: 5px;
  }

  .redeem-row input {
    height: 32px;
    font-size: 11px;
    padding: 0 8px;
    border-radius: 9px;
  }

  .redeem-row .btn {
    height: 32px;
    padding: 0 10px;
    font-size: 11.5px;
    border-radius: 9px;
  }

  .redeem-steps {
    gap: 5px;
    padding: 8px;
    border-radius: 10px;
    margin-top: 8px;
  }

  .redeem-step {
    font-size: 10px;
    line-height: 1.5;
    gap: 5px;
  }

  .redeem-step i {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }

  .redeem-note {
    font-size: 9.5px;
    line-height: 1.5;
    margin-top: 6px;
  }

  .redeem-buy {
    gap: 5px;
    margin-top: 8px;
  }

  .redeem-buy .btn {
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  /* 签到面板太窄：日期只留标记，标题不换行 */
  .checkin-panel .panel-head,
  .checkin-panel .checkin-head {
    flex-wrap: wrap;
    gap: 6px;
  }

  .checkin-panel h3,
  .checkin-panel .panel-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  .checkin-streak-badge,
  .checkin-panel .streak-badge {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 18px;
  }

  .checkin-streak-badge small,
  .checkin-panel .streak-badge small {
    font-size: 8px;
  }

  /* 通栏后「连续天数」徽章改成横排小胶囊，不再竖着挤 */
  .checkin-panel .streak-badge,
  .checkin-panel .checkin-streak-badge {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 5px 10px;
    border-radius: 999px;
  }

  .checkin-panel .streak-badge b,
  .checkin-panel .checkin-streak-badge b {
    font-size: 15px;
    line-height: 1;
  }

  .checkin-panel .streak-badge span,
  .checkin-panel .checkin-streak-badge span,
  .checkin-panel .streak-badge small {
    font-size: 9px;
    white-space: nowrap;
    writing-mode: horizontal-tb;
  }

  .checkin-panel .checkin-head {
    align-items: flex-start;
    gap: 8px;
  }

  .checkin-panel .checkin-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .checkin-panel .checkin-title h2 {
    font-size: 16px;
  }

  .checkin-panel .checkin-title p {
    font-size: 11.5px;
    line-height: 1.5;
  }

  /* 通栏后 7 个格子放得下日期 */
  .checkin-panel .day-cell {
    padding: 6px 2px;
  }

  .checkin-panel .day-cell i {
    font-size: 11px;
  }

  .checkin-panel .day-cell span {
    font-size: 9.5px;
  }

  .checkin-btn {
    width: 100%;
    padding: 0 6px;
    white-space: nowrap;
    font-size: 11.5px;
  }

  /* 等级卡与流水卡保持通栏，只缩内边距 */
  .level-card {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .level-card .level-badge {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* 用户菜单里的「每日签到」项 */
.menu .menu-checkin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.menu .menu-checkin:hover {
  background: var(--card-soft);
}

.menu .menu-checkin em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #b06a00;
  background: var(--gold-soft, #fff3d6);
  border-radius: 999px;
  padding: 2px 7px;
}

.menu .menu-checkin.done {
  color: var(--muted);
  cursor: default;
  font-weight: 600;
}

.menu .menu-checkin.done:hover {
  background: transparent;
}

html[data-theme='dark'] .menu .menu-checkin em {
  color: #ffcf70;
  background: rgba(255, 190, 80, 0.16);
}
/* 顶栏「签到」按钮：手机端才显示，在发帖左边 */
.top-checkin {
  display: none;
}

@media (max-width: 640px) {
  /* 旧的那个「签到」链接在手机端藏起来，统一用新的金色按钮 */
  .topbar-inner #user-area > .btn-vip {
    display: none !important;
  }

  .topbar-inner #user-area .top-checkin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
  }

  .topbar-inner #user-area .btn-checkin {
    color: #8a5200;
    background: linear-gradient(135deg, #ffe9a8, #ffc46b);
    box-shadow: 0 6px 14px -8px rgba(200, 140, 30, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }

  .topbar-inner #user-area .btn-checkin:active {
    transform: translateY(1px);
  }

  .topbar-inner #user-area .top-checkin.done {
    color: var(--muted);
    background: var(--card-soft);
    border: 1px solid var(--line);
    font-weight: 700;
    cursor: default;
  }

  html[data-theme='dark'] .topbar-inner #user-area .btn-checkin {
    color: #3a2200;
    background: linear-gradient(135deg, #ffdf8f, #ffb648);
  }
}
/* ============ 兑换卡密弹窗 ============ */
.redeem-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(40, 24, 48, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: redeemFade 0.16s ease;
}

@keyframes redeemFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.redeem-modal {
  width: min(400px, 100%);
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl, 0 30px 60px -30px rgba(60, 30, 70, 0.5));
  animation: redeemPop 0.18s ease;
}

@keyframes redeemPop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.redeem-modal h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.redeem-modal-tip {
  margin: 6px 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.redeem-modal-form {
  display: flex;
  gap: 8px;
}

.redeem-modal-form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--card-soft);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.06em;
  outline: none;
}

.redeem-modal-form input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 134, 184, 0.16);
}

.redeem-modal-form .btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  flex: none;
}

.redeem-modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* 菜单里的「兑换卡密」行 */
.menu .menu-redeem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.menu .menu-redeem:hover {
  background: var(--card-soft);
}

.menu .menu-redeem em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #8a5a00;
  background: rgba(255, 205, 120, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
}

html[data-theme='dark'] .menu .menu-redeem em {
  color: #ffd88a;
  background: rgba(255, 205, 120, 0.16);
}

@media (max-width: 640px) {
  .redeem-modal {
    padding: 15px 14px 12px;
    border-radius: 16px;
  }

  .redeem-modal h3 {
    font-size: 15px;
  }

  .redeem-modal-form input,
  .redeem-modal-form .btn {
    height: 40px;
  }
}
/* ==========================================================================
   手机端后台补充：图片管理 / 自动清理 / 开关行
   ========================================================================== */
@media (max-width: 640px) {
  /* 自动清理那一行整体竖排，别让文字绕着输入框 */
  .media-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .media-auto {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 6px 8px;
    font-size: 12px;
  }

  .media-auto input {
    width: 64px;
    height: 32px;
    text-align: center;
    font-size: 13px;
    padding: 0 6px;
    border-radius: 9px;
  }

  .media-auto .btn {
    grid-column: 1 / -1;
    height: 30px;
    font-size: 12px;
    justify-self: start;
    padding: 0 12px;
  }

  .media-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .media-actions .btn {
    height: 30px;
    font-size: 12px;
    padding: 0 11px;
  }

  /* 图片网格：手机端三列小图 */
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .media-card {
    border-radius: 10px;
  }

  .media-card .media-img,
  .media-card img {
    aspect-ratio: 1;
    height: auto;
  }

  .media-card .media-meta,
  .media-card .media-info {
    padding: 5px 6px;
    font-size: 9.5px;
    line-height: 1.35;
  }

  .media-card .btn {
    height: 22px;
    padding: 0 7px;
    font-size: 10px;
  }

  /* 开关行不再溢出 */
  .switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
  }

  .switch input {
    flex: none;
  }
}
/* 菜单里的「手机 APP 下载」 */
.menu .menu-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.menu .menu-app em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #0b6b52;
  background: rgba(72, 220, 170, 0.24);
  border-radius: 999px;
  padding: 2px 7px;
}

html[data-theme='dark'] .menu .menu-app em {
  color: #9df3d4;
  background: rgba(72, 220, 170, 0.16);
}
/* ============ 登录公告弹窗 ============ */
.notice-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(40, 24, 48, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: redeemFade 0.16s ease;
}

.notice-modal {
  width: min(460px, 100%);
  max-height: min(76vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl, 0 30px 60px -30px rgba(60, 30, 70, 0.5));
  animation: redeemPop 0.18s ease;
}

.notice-modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.notice-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 800;
  color: #b3236a;
  background: rgba(255, 130, 190, 0.18);
  border: 1px solid rgba(255, 130, 190, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
}

.notice-modal-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
  min-width: 0;
}

.notice-modal-body {
  flex: 1;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink);
}

.notice-modal-body p {
  margin: 0 0 8px;
}

.notice-modal-body p:last-child {
  margin-bottom: 0;
}

.notice-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.notice-modal-foot .btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 12px;
}

html[data-theme='dark'] .notice-badge {
  color: #ffb0d4;
  background: rgba(255, 130, 190, 0.14);
}

@media (max-width: 640px) {
  .notice-modal {
    padding: 16px 15px 13px;
    border-radius: 18px;
    max-height: 80vh;
  }

  .notice-modal-head h3 {
    font-size: 15.5px;
  }

  .notice-modal-body {
    font-size: 12.5px;
    line-height: 1.75;
  }

  .notice-modal-foot .btn {
    height: 36px;
    width: 100%;
  }
}
/* ==========================================================================
   手机端收尾优化：分页 / 页脚 / 兑换卡密 间距
   ========================================================================== */
@media (max-width: 640px) {
  /* 主页容器底部留白从 80 收到 28 */
  .container#app,
  #app.container {
    padding-bottom: 28px;
  }

  #app > *:last-child {
    margin-bottom: 0 !important;
  }

  /* ---------- 分页：居中三行，别东一块西一块 ---------- */
  .pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 14px 0 4px;
    font-size: 12px;
    text-align: center;
  }

  /* 总数独占一行 */
  .pager .pager-total {
    flex: 1 1 100%;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.2;
    margin-bottom: 2px;
  }

  /* 跳转框独占一行 */
  .pager .page-jump {
    flex: 1 1 100%;
    justify-content: center;
    margin-top: 2px;
  }

  /* 页码行：允许换行，居中 */
  .pager .page-num,
  .pager .page-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 9px;
    font-size: 12px;
  }

  /* 当前页码要有明显高亮（粉色渐变 + 白字） */
  .pager .page-num.active {
    background: linear-gradient(120deg, var(--pink), var(--purple));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
  }

  .pager .page-num {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
  }

  .pager .page-gap {
    color: var(--muted);
    border: 0;
    background: transparent;
  }

  /* 「下一页 →」和跳转行居中 */
  .pager > a.btn,
  .pager .page-jump {
    justify-self: center;
  }

  .pager > a.btn {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 9px;
  }

  .pager .page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    margin-top: 2px;
  }

  .pager .page-jump input {
    width: 52px;
    height: 28px;
    font-size: 12px;
    border-radius: 8px;
    text-align: center;
    padding: 0 6px;
  }

  .pager .page-jump button {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  /* ---------- 页脚：贴近内容、左右居中、别一大片空白 ---------- */
  .site-footer {
    margin-top: 14px;
    padding: 12px 8px 18px;
  }

  .footer-inner {
    max-width: 30em;
    margin: 0 auto;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
  }

  /* ---------- 兑换卡密：上面收紧、下面留气 ---------- */
  .redeem-panel {
    padding: 12px 11px 13px;
  }

  .redeem-panel h2 {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .redeem-panel form {
    margin: 0;
  }

  /* 输入框下面那句说明：紧贴表单 */
  .redeem-panel .hint {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
  }

  /* 空白的错误提示块不占位（这也是上面那段空白的元凶） */
  .form-error:empty,
  .redeem-panel .form-error:empty {
    display: none;
  }

  /* 步骤块：和上面只留 10px，和下面留 10px */
  .redeem-steps {
    margin: 10px 0;
    padding: 9px 10px;
    gap: 4px;
  }

  .redeem-buy {
    margin: 0 0 6px;
  }

  .redeem-note {
    margin: 0;
    font-size: 9.5px;
    line-height: 1.55;
  }
}

/* 顶栏站名后缀（「社区」这种），只在手机端显示 */
.brand-suffix {
  display: none;
}

@media (max-width: 640px) {
  .topbar-inner .brand .brand-suffix {
    display: inline;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
  }
}
