@media (max-width: 600px) {
  .site-header, .site-footer {
    padding-left: 0;
    padding-right: 0;
  }
  .container {
    width: 100%;
    padding: 0 4px;
    margin: 0;
  }
  .main-nav {
    gap: 6px;
    padding: 4px 4px;
    font-size: 0.95rem;
  }
  .nav-link {
    font-size: 0.95rem;
    padding: 4px 6px;
  }
  .footer-grid {
    flex-direction: column;
    gap: 10px;
  }
}
:root {
  --bg: #08131f;
  --bg-soft: #102338;
  --surface: rgba(13, 28, 45, 0.88);
  --surface-strong: #162e47;
  --text: #f6f1e7;
  --text-muted: #b2c2d6;
  --line: rgba(196, 215, 238, 0.15);
  --accent: #f7b267;
  --accent-strong: #ef8354;
  --mint: #78c6a3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

html[data-theme="light"] {
  --bg: #f4ecdf;
  --bg-soft: #fff8ee;
  --surface: rgba(255, 251, 244, 0.94);
  --surface-strong: #fff6e8;
  --text: #1f2933;
  --text-muted: #5f6e7c;
  --line: rgba(31, 41, 51, 0.11);
  --accent: #c96b36;
  --accent-strong: #a54f21;
  --mint: #39897d;
  --shadow: 0 18px 40px rgba(96, 76, 44, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Outfit", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0 0, rgba(247, 178, 103, 0.18), transparent 28%),
    radial-gradient(circle at 100% 15%, rgba(120, 198, 163, 0.16), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #07111b 100%);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 0 0, rgba(201, 107, 54, 0.12), transparent 24%),
    radial-gradient(circle at 100% 15%, rgba(57, 137, 125, 0.1), transparent 18%),
    linear-gradient(180deg, #f7efe4 0%, #f0e6d6 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(6, 15, 24, 0.78);
  border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .site-header { background: rgba(247, 239, 228, 0.78); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 10px;
  flex-wrap: nowrap;
}

.logo, h1, h2, h3 { font-family: "Noto Serif SC", serif; }
.logo { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.04em; }

.main-nav, .hero-actions, .tag-list, .post-meta, .footer-grid, .wechat-box, .wechat-inline, .auth-switch, .nav-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.main-nav {
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active { color: var(--text); }

.nav-tools {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
  flex-wrap: nowrap;
}

.mobile-nav-actions,
.mobile-drawer-actions,
.mobile-drawer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav-actions,
.mobile-drawer-panel {
  display: none;
}

.mobile-drawer-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  right: 16px;
  z-index: 25;
}

.mobile-drawer-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(10, 23, 36, 0.96);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .mobile-drawer-card {
  background: rgba(255, 249, 239, 0.98);
}

.mobile-drawer-links {
  flex-direction: column;
  align-items: stretch;
}

.mobile-drawer-links .nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.mobile-stat-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-stat-card small {
  display: block;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mobile-stat-card strong {
  display: block;
  color: var(--text);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-search input {
  width: min(180px, 16vw);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  min-width: 0;
}

.member-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.member-bar.compact {
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  font-size: 0.84rem;
}

.member-pill strong {
  color: var(--text);
}

.member-pill span {
  color: var(--text-muted);
}
.tag, .mini-badge, .level-chip {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--line);
}

.icon-button, .auth-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  padding: 0 14px;
}

.auth-button { min-width: 74px; }
.section { padding: 44px 0 78px; }
.hero { padding: 36px 0 8px; }

.hero-grid, .content-grid, .post-layout, .about-split {
  display: grid;
  gap: 24px;
}

.hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); align-items: stretch; }
.content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.about-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(2.8rem, 4vw, 4.8rem); max-width: 12ch; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }

.hero-copy, .section-note, .footer-copy, .panel p, .markdown-body, .status-text, .comment-meta, .card-copy, .unlock-hint {
  color: var(--text-muted);
  line-height: 1.8;
}

.hero-copy { max-width: 58ch; margin: 18px 0 28px; font-size: 1.06rem; }

.intro-card {
  padding: 34px 36px;
  background:
    radial-gradient(circle at top right, rgba(247, 178, 103, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
}

.cover-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(247, 178, 103, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(120, 198, 163, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    url("../assets/brand-orbit.svg") right -60px top -10px / min(46vw, 560px) auto no-repeat,
    linear-gradient(135deg, rgba(247, 178, 103, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(120, 198, 163, 0.08), transparent 34%);
  opacity: 0.92;
}

.cover-panel::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    rgba(8, 19, 31, 0.45);
  border: 1px solid rgba(247, 178, 103, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-image: url("../assets/brand-badge.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58px 58px;
  opacity: 0.95;
}

.cover-panel > * {
  position: relative;
  z-index: 1;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.intro-main h1 {
  display: grid;
  gap: 8px;
  max-width: none;
}

.intro-main h1 span:first-child {
  font-size: clamp(2.4rem, 3.8vw, 4rem);
}

.intro-main h1 span:last-child {
  font-size: clamp(3rem, 4.6vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.intro-side {
  display: grid;
  gap: 16px;
}

.intro-note {
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.persona-panel {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.persona-panel::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,178,103,0.18), transparent 68%);
}

.persona-avatar {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.persona-copy {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 26px;
  padding: 0 4px;
}

.panel, .hero-card, .content-card, .auth-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero-card { display: grid; gap: 18px; }
.hero-card-title, .footer-title, .content-title, .coin-balance { font-weight: 700; }

.persona-card, .level-card, .comment-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.accent-card, .accent-panel {
  background: linear-gradient(180deg, rgba(247, 178, 103, 0.12), rgba(20, 45, 71, 0.78));
}

.primary-button, .secondary-button, .unlock-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1f1408;
  font-weight: 700;
}

.secondary-button, .unlock-button {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.full-width { width: 100%; }

.user-summary, .level-guide, .badge-gallery, .comment-list, .related-posts {
  display: grid;
  gap: 14px;
}

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

.stat-box {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.reward-rules {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.reward-rules p { margin: 0; }

.badge-item {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.badge-item.unlocked { border-color: rgba(120, 198, 163, 0.35); }
.badge-item-main {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.badge-icon {
  width: 56px;
  height: 56px;
  padding: 7px;
  border-radius: 50%;
  border: 1px solid rgba(247, 178, 103, 0.24);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 19, 31, 0.2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.badge-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.badge-title-row,
.profile-badge-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.badge-title-row {
  justify-content: space-between;
}

.profile-badge-head {
  align-items: start;
}

.profile-badge-head > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-badge-head .mini-badge,
.badge-title-row .mini-badge {
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.profile-badge-head strong,
.badge-title-row strong {
  font-size: 1rem;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.badge-progress-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.badge-progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.badge-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.badge-tier-locked .mini-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.badge-tier-iron {
  border-color: rgba(176, 126, 92, 0.35);
  background: linear-gradient(180deg, rgba(176, 126, 92, 0.12), rgba(255, 255, 255, 0.02));
}

.badge-tier-silver {
  border-color: rgba(177, 195, 211, 0.4);
  background: linear-gradient(180deg, rgba(177, 195, 211, 0.12), rgba(255, 255, 255, 0.02));
}

.badge-tier-gold {
  border-color: rgba(247, 178, 103, 0.45);
  background: linear-gradient(180deg, rgba(247, 178, 103, 0.16), rgba(255, 255, 255, 0.02));
}

.badge-tier-iron .badge-progress i {
  background: linear-gradient(90deg, #8f6247, #c08457);
}

.badge-tier-silver .badge-progress i {
  background: linear-gradient(90deg, #8ea0b2, #d8e1ea);
}

.badge-tier-gold .badge-progress i {
  background: linear-gradient(90deg, #d8903b, #f7c776);
}

.mini-badge { color: var(--text); background: rgba(120, 198, 163, 0.12); }

.content-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.content-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 178, 103, 0.28);
}

.content-meta, .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  background: rgba(98, 142, 180, 0.16);
  font-size: 0.82rem;
}

.card-copy { margin: 0; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.locked-detail {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(8, 19, 31, 0.55);
  border: 1px dashed var(--line);
}

.unlocked-detail { padding-top: 6px; }

.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  background: rgba(7, 16, 25, 0.45);
}

.footer-grid { justify-content: space-between; }

.wechat-box img, .wechat-inline img, .wechat-cta img {
  width: 112px;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 10, 16, 0.72);
}

.modal[hidden] {
  display: none;
}

.coin-effects {
  position: fixed;
  top: 90px;
  right: 22px;
  z-index: 60;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.coin-effect {
  min-width: 136px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(9, 21, 33, 0.92);
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 220ms ease, transform 220ms ease;
}

.coin-effect.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.coin-effect strong {
  font-size: 1.15rem;
}

.coin-effect.earn strong {
  color: var(--mint);
}

.coin-effect.spend strong {
  color: var(--accent);
}

.coin-effect span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-panel { width: min(460px, 100%); }

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
}

.auth-tab.active {
  background: rgba(247, 178, 103, 0.16);
  border-color: rgba(247, 178, 103, 0.35);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.auth-form label { display: grid; gap: 8px; }

.auth-form input, .comment-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
}

.post-page, .item-page { padding-top: 54px; }
.post-header, .markdown-body, .post-pager { max-width: 950px; margin: 0 auto; }
.post-header {
  margin-bottom: 28px;
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.post-header h1 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  max-width: 18ch;
  line-height: 1.25;
  margin-top: 12px;
}
.post-header .section-note {
  margin: 14px 0 0;
}

.post-meta .tag {
  background: rgba(247, 178, 103, 0.12);
  border-color: rgba(247, 178, 103, 0.18);
}
.markdown-body h2, .markdown-body h3 { margin: 38px 0 14px; }
.markdown-body p, .markdown-body ul, .markdown-body blockquote { margin: 0 0 18px; }
.markdown-body ul { padding-left: 22px; }
.markdown-body blockquote { padding-left: 16px; border-left: 4px solid var(--accent); color: var(--text); }
.markdown-body code { padding: 2px 6px; border-radius: 8px; background: rgba(98, 142, 180, 0.16); }

.post-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.pager-link, .related-link {
  display: block;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.post-sidebar {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 18px;
}

.item-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.item-main h1 {
  max-width: 14ch;
  margin-top: 18px;
  font-size: clamp(2rem, 3vw, 3.4rem);
}

.item-main {
  padding: 28px 30px;
}

.item-main::before,
.post-header::before,
.profile-hero::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(120,198,163,0.14), transparent 68%);
  pointer-events: none;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 8px;
}

.action-row,
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.share-panel {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.share-block {
  margin-top: 24px;
}

.share-label {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.item-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.item-fact-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.item-fact-card small {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.item-fact-card strong {
  display: block;
}

.item-detail-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.course-overview-grid,
.course-section-list,
.course-outline,
.course-viewer-layout {
  display: grid;
  gap: 16px;
}

.course-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.course-overview-card,
.course-module-card,
.course-section-card,
.course-outline-section {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.course-overview-card small,
.asset-entry small,
.course-outline-section p {
  color: var(--text-muted);
}

.course-module-card {
  display: grid;
  gap: 16px;
}

.course-module-card[id] {
  scroll-margin-top: 96px;
}

.course-module-head {
  display: grid;
  gap: 8px;
}

.course-section-card {
  display: grid;
  gap: 14px;
}

.course-section-copy p,
.course-outline-section p {
  margin: 6px 0 0;
}

.asset-entry-list,
.course-outline-assets,
.asset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-entry,
.asset-tab {
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.asset-entry strong,
.course-outline-section strong,
.course-module-head h3 {
  color: var(--text);
}

.asset-tab.active,
.course-outline-assets .mini-badge.active {
  border-color: rgba(247, 178, 103, 0.45);
  background: rgba(247, 178, 103, 0.12);
  color: var(--text);
}

.course-viewer-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.course-viewer-main {
  padding: 28px 30px;
}

.course-viewer-main h1 {
  max-width: 15ch;
  margin-top: 18px;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
}

.course-viewer-sidebar {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 18px;
}

.course-frame-wrap {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(4, 10, 16, 0.8);
  min-height: 720px;
}

.course-frame {
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #fff;
}

/* 课程阅读页：仅站点导航 + 路径栏 + 全幅内容区 */
html:has(body.course-viewer-page) {
  height: 100%;
}

body.course-viewer-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.course-viewer-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.course-viewer-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.course-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  font-size: 0.88rem;
  line-height: 1.55;
  width: 100%;
  max-width: 100%;
}

.course-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.course-breadcrumb a:hover {
  text-decoration: underline;
}

.course-breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
  margin: 0 4px;
}

.course-breadcrumb-text {
  color: var(--text-muted);
}

.course-breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

.course-viewer-gate:not([hidden]) {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.course-viewer-gate-inner p {
  margin: 0 0 8px;
}

.course-viewer-gate-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 12px 0 20px;
}

.course-viewer-frame-root:not([hidden]) {
  flex: 1;
  min-height: 0;
  position: relative;
  background: rgba(4, 10, 16, 0.85);
}

.course-viewer-page .course-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  background: #fff;
}

@media (max-width: 720px) {
  .course-viewer-toolbar {
    padding: 8px 0;
  }
}

.item-breadcrumb-nav {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.item-breadcrumb-nav[hidden] {
  display: none !important;
}

.item-engagement {
  margin-top: 8px;
}

.engagement-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.engagement-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.like-button.is-active {
  border-color: rgba(247, 178, 103, 0.45);
  background: rgba(247, 178, 103, 0.12);
}

.course-viewer-engagement {
  flex-shrink: 0;
  padding: 24px 0 48px;
}

.course-viewer-engagement[hidden] {
  display: none !important;
}

.item-detail-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 198, 163, 0.26);
  background: rgba(120, 198, 163, 0.08);
}

.item-detail-note strong {
  display: block;
}

.item-detail-note span {
  color: var(--text-muted);
}

.item-main .hero-copy,
.profile-hero .hero-copy,
.post-header .section-note {
  max-width: 56ch;
}

.item-sidebar {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 18px;
}

.comment-section {
  max-width: 950px;
  margin: 36px auto 0;
}

.comment-form { display: grid; gap: 12px; }
.comment-item p { margin: 0; }
.comment-meta { margin-bottom: 10px; font-size: 0.92rem; }
.single-column { display: grid; gap: 24px; }

.feature-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.9;
}

.ranking-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.content-ranking-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.ranking-hero-panel {
  background:
    radial-gradient(circle at top right, rgba(247, 178, 103, 0.14), transparent 26%),
    radial-gradient(circle at bottom left, rgba(120, 198, 163, 0.12), transparent 24%),
    var(--surface);
}

.ranking-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  max-width: none;
}

.subrank-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.ranking-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.ranking-card,
.leaderboard-row {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-stat-card {
  background: linear-gradient(180deg, rgba(247, 178, 103, 0.12), rgba(255, 255, 255, 0.03));
}

.ranking-card strong,
.leaderboard-row strong {
  display: block;
  margin-bottom: 8px;
}

.ranking-card p {
  margin: 0;
  color: var(--text-muted);
}

.leaderboard-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.leaderboard-groups {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 92px 1fr 140px 140px;
  gap: 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.leaderboard-row span {
  color: var(--text-muted);
}

.content-row {
  grid-template-columns: 92px 1fr 120px;
}

.top-three {
  border-color: rgba(247, 178, 103, 0.3);
  background: linear-gradient(90deg, rgba(247, 178, 103, 0.09), rgba(255, 255, 255, 0.03));
}

.content-rank-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 160ms ease, border-color 160ms ease;
}

.content-rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 178, 103, 0.28);
}

.content-rank-head,
.content-rank-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-rank-count {
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 40px;
  margin-bottom: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.rank-name {
  color: var(--text);
}

.content-rank-main {
  display: grid;
  gap: 10px;
}

.rank-meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.rank-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--mint));
}

@media (max-width: 980px) {
    .hero-grid, .content-grid, .post-layout, .about-split, .intro-grid, .ranking-grid, .content-ranking-grid, .item-layout, .profile-hero-grid, .item-facts, .course-viewer-layout, .course-overview-grid { grid-template-columns: 1fr; }
    .post-sidebar { position: static; }
    .item-sidebar { position: static; }
    .course-viewer-sidebar { position: static; }
    .nav-wrap { flex-wrap: nowrap; }
    .main-nav { max-width: 100%; }
    .nav-tools { min-width: 0; }
    .profile-badge-strip { grid-template-columns: 1fr; }
  }
  
@media (max-width: 720px) {
    .nav-wrap {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      padding: 10px 0;
    }
    .section-head, .footer-grid { flex-direction: column; align-items: start; }
    .main-nav { display: none; }
    .nav-tools {
      justify-content: flex-end;
      width: 100%;
      overflow: hidden;
    }
    .mobile-nav-actions {
      display: flex;
      flex: 0 0 auto;
    }
    .mobile-drawer-panel {
      display: block;
    }
    .mobile-toggle {
      min-width: 50px;
      padding: 0 12px;
      font-size: 0.8rem;
    }
    .header-search {
      flex: 1 1 auto;
      max-width: 116px;
    }
    .header-search input { width: 100%; }
    .member-bar.compact { display: none; }
    .icon-button {
      min-width: 38px;
      height: 38px;
      padding: 0 10px;
    }
    .auth-button { min-width: 58px; }
    .mobile-drawer-actions {
      flex-wrap: wrap;
      margin-top: 10px;
    }
    .share-actions,
    .action-row {
      display: grid;
      grid-template-columns: 1fr;
    }
    .profile-badge-head,
    .badge-title-row,
    .badge-progress-meta {
      display: grid;
      justify-content: start;
    }
    .profile-badge-head > div {
      gap: 6px;
    }
    .badge-item-main {
      grid-template-columns: 1fr;
    }
    .badge-icon {
      width: 52px;
      height: 52px;
    }
    .asset-entry,
    .asset-tab {
      min-width: 0;
    }
    .course-frame-wrap,
    .course-frame {
      min-height: 560px;
    }
    .persona-panel { grid-template-columns: 1fr; }
    .profile-identity { grid-template-columns: 1fr; }
    .intro-card { padding: 26px 22px; }
  .cover-panel::after { width: 68px; height: 68px; background-size: 48px 48px; }
  .cover-panel::before { background-size: min(70vw, 420px) auto, auto, auto; background-position: right -90px top 10px, 0 0, 0 0; }
  .post-header,
  .item-main,
  .profile-hero { padding: 24px 22px; }
  h1 { max-width: none; }
  .post-pager, .stats-grid { grid-template-columns: 1fr; }
  .post-header h1 { max-width: none; font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .section-head .section-note { text-align: left; }
  .coin-effects { top: auto; right: 16px; left: 16px; bottom: 18px; }
  .ranking-cards { grid-template-columns: 1fr; }
  .leaderboard-row,
  .content-row { grid-template-columns: 1fr; }
  .content-rank-head,
  .content-rank-title-row { align-items: start; flex-direction: column; }
}
.card-head,
.post-actions,
.comment-actions,
.profile-stats,
.profile-grid,
.history-list,
.favorite-grid,
.settings-form {
  display: grid;
  gap: 12px;
}

.card-head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-button:hover,
.reward-button:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 178, 103, 0.34);
}

.button-flash {
  animation: buttonPulse 680ms ease;
}

.post-actions {
  margin-top: 18px;
}

.comment-actions {
  margin-top: 12px;
}

.comment-like-button {
  justify-self: start;
}

.focus-target {
  border-color: rgba(247, 178, 103, 0.55);
  box-shadow: 0 0 0 1px rgba(247, 178, 103, 0.25), var(--shadow);
}

.profile-hero h1 {
  max-width: none;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.profile-hero {
  padding: 28px 30px;
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.profile-identity {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
}

.profile-avatar-orb {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(247, 178, 103, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(247, 178, 103, 0.18), rgba(120, 198, 163, 0.16)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(247, 178, 103, 0.28);
  box-shadow: var(--shadow);
  position: relative;
}

.profile-avatar-orb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px solid rgba(246, 241, 231, 0.18);
}

.profile-avatar-orb span {
  font-family: "Noto Serif SC", serif;
  font-size: 2.6rem;
  color: var(--text);
}

.profile-level-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.profile-progress-text {
  color: var(--text-muted);
}

.profile-progress {
  width: min(420px, 100%);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 14px;
}

.profile-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--mint));
}

.profile-badge-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-badge-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(247, 178, 103, 0.24);
  background: linear-gradient(180deg, rgba(247, 178, 103, 0.08), rgba(255, 255, 255, 0.03));
  position: relative;
  overflow: hidden;
}

.profile-badge-card::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 52px;
  height: 52px;
  background: url("../assets/brand-badge.svg") center/contain no-repeat;
  opacity: 0.2;
}

.profile-badge-card strong {
  display: block;
}

.profile-badge-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.profile-badge-meta {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.section-head h2,
.item-main h1,
.post-header h1,
.profile-hero h1 {
  text-wrap: balance;
}

.section-head .section-note {
  max-width: 36ch;
  text-align: right;
}

.profile-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.history-list,
.favorite-grid {
  grid-template-columns: 1fr;
}

.history-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 160ms ease, border-color 160ms ease;
}

.history-item:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 178, 103, 0.28);
}

.history-item span {
  color: var(--text-muted);
  line-height: 1.7;
}

.settings-form label {
  display: grid;
  gap: 8px;
}

.settings-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
}

@media (max-width: 980px) {
  .profile-grid,
  .profile-stats,
  .card-head {
    grid-template-columns: 1fr;
  }
}

@keyframes buttonPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* 作者署名样式 */
.author {
  color: var(--muted);
  font-size: 0.875rem;
}
.author::before {
  content: "·";
  margin-right: 0.5em;
}
.post-meta .author {
  color: var(--muted);
  font-style: italic;
}

