:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-soft: #f4efe6;
  --border: #e6ddd0;
  --text: #1f1c18;
  --muted: #6f6860;
  --brand: #a91b1f;
  --brand-dark: #861418;
  --accent: #1e5d57;
  --accent-dark: #174a45;
  --gold: #d8a242;
  --shadow: 0 12px 30px rgba(28, 28, 28, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.naming-page--boy {
  --page-accent: #2f766a;
  --page-accent-soft: rgba(47, 118, 106, 0.12);
}

.naming-page--girl {
  --page-accent: #c35b76;
  --page-accent-soft: rgba(195, 91, 118, 0.12);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-ribbon {
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  border: 1px solid var(--gold);
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 3px;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-btn,
.pill-btn,
.filter-btn,
.tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  transition: 0.2s ease;
}

.nav-btn:hover,
.pill-btn:hover,
.filter-btn:hover,
.tab-btn:hover {
  background: rgba(233, 225, 210, 0.55);
  color: var(--text);
}

.nav-btn.active,
.pill-btn.active,
.filter-btn.active,
.tab-btn.active {
  background: rgba(233, 225, 210, 0.9);
  border-color: var(--border);
  color: var(--brand);
  font-weight: 700;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.favorite-chip,
.mobile-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--text);
}

.mobile-toggle {
  display: none;
}

.mobile-panel {
  display: none;
  padding-bottom: 14px;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.page-main {
  flex: 1;
  padding: 28px 0 48px;
}

.hero-card,
.section-card,
.panel,
.name-card,
.detail-card,
.article-card,
.timeline-card,
.person-card,
.footer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-cover {
  max-width: 920px;
  margin: 0 auto 24px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(67, 38, 27, 0.14);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center 44%;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(169, 27, 31, 0.35);
}

.hero-card::before {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
}

.hero-card::after {
  right: 14px;
  bottom: 14px;
  border-left: none;
  border-top: none;
}

.seal {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--brand);
  border: 2px solid var(--gold);
  color: #fff;
  font-size: 46px;
  font-weight: 700;
  transform: rotate(3deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-title {
  margin: 16px 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
}

.hero-quote {
  margin: 0 auto;
  max-width: 700px;
  color: var(--muted);
  font-size: 17px;
}

.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.tiny-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  transition: 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #3f7a6e);
  color: #fff;
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent-dark), #2f645b);
}

.secondary-btn {
  background: linear-gradient(135deg, var(--brand), #c23932);
  color: #fff;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--brand-dark), #a92c27);
}

.ghost-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.ghost-btn:hover,
.tiny-btn:hover {
  background: var(--surface-soft);
}

.tiny-btn {
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.stack {
  display: grid;
  gap: 22px;
}

.grid-3,
.grid-2,
.grid-sidebar,
.results-grid,
.favorites-grid,
.articles-layout,
.celeb-layout {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-sidebar {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.results-grid,
.favorites-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.articles-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.celeb-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.section-card,
.panel,
.detail-card {
  padding: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-card h3,
.card-title,
.panel-title,
.section-title {
  margin: 0 0 8px;
}

.section-title {
  font-size: 28px;
}

.muted {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field-title {
  font-size: 14px;
  font-weight: 700;
  color: #4e4842;
}

.option-row,
.segment-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.select,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.helper {
  font-size: 13px;
  color: var(--muted);
}

.empty-box,
.notice-box {
  padding: 34px 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.notice-box.error {
  border-style: solid;
  border-color: #f0c5c5;
  background: #fff0f0;
  color: #962c2c;
}

.name-card {
  padding: 22px;
  cursor: pointer;
  transition: 0.2s ease;
}

.name-card--static {
  cursor: default;
}

.name-card:hover {
  transform: translateY(-2px);
}

.name-card--static:hover {
  transform: none;
}

.name-card.active {
  border-color: rgba(169, 27, 31, 0.45);
  background: #fff8f8;
}

.name-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.name-title {
  margin: 0;
  font-size: 32px;
  letter-spacing: 1px;
}

.score {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.pinyin {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
}

.name-card-summary {
  margin: 14px 0 0;
}

.tag-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.element-badge,
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.tag,
.meta-badge {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}

.element-badge {
  background: #edf7f4;
  border: 1px solid #d3e7e1;
  color: var(--accent);
}

.detail-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 242, 0.98));
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.seal-small {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand);
  border: 1px solid var(--gold);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.meta-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.meta-card strong {
  display: block;
  margin-top: 6px;
}

.quote-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.favorite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.favorite-actions--compact {
  margin-top: 16px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-card {
  padding: 20px;
}

.person-list,
.article-list {
  display: grid;
  gap: 12px;
}

.person-card,
.article-card {
  padding: 18px;
  cursor: pointer;
  transition: 0.2s ease;
}

.person-card.active,
.article-card.active {
  border-color: rgba(169, 27, 31, 0.45);
  background: #fff8f8;
}

.person-card:hover,
.article-card:hover {
  transform: translateY(-1px);
}

.footer {
  background: #1f1c18;
  color: rgba(250, 247, 242, 0.85);
  border-top: 1px solid var(--brand);
}

.footer-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 28px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.footer small,
.footer p {
  color: rgba(250, 247, 242, 0.7);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 18px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
}

.footer-beian {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(250, 247, 242, 0.78);
  text-decoration: none;
}

.footer-beian-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-image: url("https://beian.mps.gov.cn/img/logo01.dd7ff50e.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.footer-beian:hover {
  color: #fff;
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .grid-3,
  .grid-2,
  .grid-sidebar,
  .results-grid,
  .favorites-grid,
  .articles-layout,
  .celeb-layout,
  .footer-grid,
  .meta-grid,
  .knowledge-stats,
  .split-section,
  .mini-grid,
  .page-hero-layout,
  .stat-grid,
  .stat-grid--hero,
  .insight-grid,
  .knowledge-search-row,
  .knowledge-news-card {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
  }

  .header-tools {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1160px);
  }

  .hero-card,
  .section-card,
  .panel,
  .detail-card {
    padding: 18px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    letter-spacing: 1px;
  }

  .name-title {
    font-size: 28px;
  }

  .detail-header {
    flex-direction: column;
  }

  .favorite-chip span:last-child {
    display: none;
  }

  .celebrity-card-head {
    gap: 14px;
  }

  .celebrity-avatar {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    border-radius: 16px;
  }

  .knowledge-list {
    gap: 0;
  }

  .knowledge-news-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px 0;
  }

  .knowledge-news-card__thumb {
    min-height: 0;
    height: 36px;
    border-radius: 8px;
  }

  .knowledge-news-card__badge,
  .knowledge-news-card__excerpt {
    display: none;
  }

  .knowledge-news-card__body {
    gap: 8px;
  }

  .knowledge-news-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.45;
  }

  .knowledge-news-card__meta {
    gap: 8px;
    font-size: 13px;
  }

  .knowledge-pagination {
    gap: 8px;
  }

  .knowledge-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
  }
}

.brand-mark,
.nav-btn,
.favorite-chip {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-hero {
  padding: 32px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 239, 230, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero--boy {
  background: linear-gradient(180deg, rgba(238, 245, 244, 0.98), rgba(255, 255, 255, 0.98));
}

.page-hero--girl {
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.page-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
}

.page-hero-copy {
  display: grid;
  gap: 18px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(233, 225, 210, 0.7);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.page-hero h1,
.page-hero h2,
.page-hero h3 {
  margin: 14px 0 10px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 860px;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(28, 28, 28, 0.05);
}

.naming-page--boy .hero-chip {
  color: #21584f;
}

.naming-page--girl .hero-chip {
  color: #a14662;
}

.hero-figure {
  margin: 0;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 42px rgba(28, 28, 28, 0.08);
}

.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.hero-figure--boy {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(235, 246, 242, 0.96));
}

.hero-figure--girl {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 241, 244, 0.98));
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-grid--hero {
  margin-top: 26px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.stat-grid--hero {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 4px 0 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.naming-page .stat-card {
  backdrop-filter: blur(4px);
}

.naming-page--boy .stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 245, 0.94));
}

.naming-page--girl .stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 246, 0.94));
}

.stat-value {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  color: var(--brand);
}

.naming-page--boy .stat-value {
  color: #21584f;
}

.naming-page--girl .stat-value {
  color: #b44e69;
}

.stat-label {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.mini-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.mini-grid--entry {
  align-items: stretch;
}

.home-knowledge-board {
  padding: 18px 20px 20px;
}

.home-knowledge-board__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.home-knowledge-board__header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.home-knowledge-board__more {
  color: var(--text);
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
}

.home-knowledge-board__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-knowledge-column {
  display: grid;
  gap: 18px;
}

.home-knowledge-feature {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.home-knowledge-feature__thumb {
  display: block;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  background: #f1ece4;
}

.home-knowledge-feature__thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.home-knowledge-feature__body {
  min-width: 0;
}

.home-knowledge-feature__title {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
}

.home-knowledge-feature__title:hover,
.home-knowledge-board__more:hover,
.home-knowledge-compact:hover .home-knowledge-compact__title {
  color: var(--brand);
}

.home-knowledge-feature__excerpt {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.home-knowledge-feature__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.home-knowledge-feature__date {
  color: var(--muted);
  font-size: 13px;
}

.home-knowledge-feature__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #0f9d58;
  color: #0f9d58;
  text-decoration: none;
  font-size: 14px;
  background: #fff;
}

.home-knowledge-compact-list {
  display: grid;
  gap: 14px;
}

.home-knowledge-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.home-knowledge-compact__title {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-knowledge-compact__date {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.mini-card--entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 235, 0.82));
  box-shadow: 0 8px 20px rgba(28, 28, 28, 0.05);
}

.mini-card--entry .muted {
  margin: 0;
}

.mini-card--entry .ghost-btn {
  margin-top: auto;
  align-self: flex-start;
}

.entry-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.entry-dot {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-block;
}

.mini-card h3,
.mini-card h4 {
  margin: 0 0 8px;
}

.link-list,
.text-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.link-list li,
.text-list li {
  margin: 8px 0;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.content-card--tinted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 235, 0.92));
}

.content-card--soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 242, 0.96));
}

.content-card h2,
.content-card h3 {
  margin-top: 0;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-note {
  font-size: 13px;
  color: var(--muted);
}

.panel-aside-card {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.panel-aside-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.panel-aside-card p {
  margin: 0;
}

.knowledge-hero {
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(255, 255, 255, 0.98));
}

.knowledge-intro-card {
  align-self: stretch;
}

.knowledge-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.knowledge-stat {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.knowledge-stat strong {
  display: block;
  font-size: 24px;
  color: var(--brand);
}

.knowledge-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-card-title {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.knowledge-summary {
  margin-top: 10px;
}

.knowledge-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.knowledge-panel {
  gap: 18px;
}

.knowledge-toolbar {
  justify-content: flex-start;
}

.knowledge-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.knowledge-page-tip {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.knowledge-list {
  display: grid;
  gap: 20px;
}

.knowledge-news-card {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 18px;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--border);
}

.knowledge-news-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.knowledge-news-card__thumb {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  background: #f2ede4;
  min-height: 160px;
}

.knowledge-news-card__thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.knowledge-news-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(32, 36, 29, 0.78);
  color: #fff;
  font-size: 12px;
}

.knowledge-news-card__body {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.knowledge-news-card__title {
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
}

.knowledge-news-card__title:hover {
  color: var(--brand);
}

.knowledge-news-card__excerpt {
  margin: 0;
  color: #4f4a43;
  font-size: 16px;
  line-height: 1.8;
}

.knowledge-news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.knowledge-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-top: 8px;
}

.knowledge-page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.knowledge-page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.article-page-main {
  padding: 30px 0 48px;
}

.article-page-shell {
  display: grid;
  gap: 24px;
}

.article-breadcrumb {
  color: var(--muted);
  font-size: 14px;
}

.article-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: var(--brand);
}

.article-hero-card {
  padding: 28px;
}

.article-meta-row {
  display: none;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.article-content-card {
  padding: 28px;
}

.article-content-inner {
  max-width: 860px;
  margin: 0 auto;
}

.article-inline-figure {
  margin: 0 0 28px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 239, 230, 0.92));
  box-shadow: 0 16px 34px rgba(28, 28, 28, 0.08);
}

.article-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.article-inline-figure figcaption {
  padding: 12px 16px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.article-content-inner h1:first-child {
  display: none;
}

.article-bottom-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.step-list {
  display: grid;
  gap: 14px;
}

.step-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
}

.step-item h3,
.trend-card h3 {
  margin: 0 0 6px;
}

.step-item p,
.trend-card p {
  margin: 0;
  color: var(--muted);
}

.step-index {
  min-width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--gold));
}

.naming-page--boy .step-index {
  background: linear-gradient(135deg, #2f766a, #57a295);
}

.naming-page--girl .step-index {
  background: linear-gradient(135deg, #c35b76, #de8ca1);
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.trend-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
}

.article-block {
  display: grid;
  gap: 16px;
}

.article-block--celebrity {
  gap: 14px;
}

.article-block + .article-block {
  margin-top: 20px;
}

.article-block p {
  margin: 0;
  color: var(--muted);
}

.celebrity-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.celebrity-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(244, 239, 230, 0.9), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px rgba(28, 28, 28, 0.08);
}

.celebrity-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.celebrity-card-copy {
  min-width: 0;
}

.celebrity-card-copy h2 {
  margin-bottom: 8px;
}

.story-figure {
  margin: 0;
  overflow: hidden;
}

.story-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
  border-radius: 16px;
}

.story-figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  color: var(--muted);
}

.demo-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.demo-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 230, 0.72));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}

.demo-panel--boy {
  background: linear-gradient(180deg, rgba(237, 247, 244, 0.96), rgba(255, 255, 255, 0.98));
}

.demo-panel--girl {
  background: linear-gradient(180deg, rgba(255, 244, 246, 0.96), rgba(255, 255, 255, 0.98));
}

.demo-panel__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.demo-panel__title h3 {
  margin: 0;
}

.demo-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.demo-name-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(169, 27, 31, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.demo-name-card__meta {
  min-width: 32px;
  padding-top: 2px;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  color: var(--brand);
}

.demo-name-card__name {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.demo-name-card__note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.name-stack {
  display: grid;
  gap: 18px;
}

.name-source {
  font-size: 13px;
  color: var(--muted);
}

.muted-strong {
  color: #4e4842;
  font-weight: 700;
}

.dashi-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashi-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dashi-media-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.dashi-media-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
}

.dashi-media-card figcaption {
  padding: 12px 14px 14px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .page-hero-layout,
  .mini-grid,
  .home-knowledge-board__body,
  .demo-columns,
  .demo-name-grid,
  .split-section,
  .stat-grid,
  .dashi-testimonial-grid,
  .dashi-gallery,
  .insight-grid,
  .trend-grid {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    margin-bottom: 18px;
    border-radius: 18px;
  }

  .stat-grid--hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-knowledge-feature {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .home-knowledge-board {
    padding: 18px;
  }

  .home-knowledge-feature {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-knowledge-feature__footer {
    flex-wrap: wrap;
  }

  .stat-grid--hero {
    grid-template-columns: 1fr;
  }

  .step-item {
    grid-template-columns: 1fr;
  }

  .step-index {
    min-width: 42px;
    width: 42px;
    height: 42px;
  }

  .article-inline-figure {
    margin-bottom: 22px;
    border-radius: 16px;
  }

  .article-inline-figure figcaption {
    padding: 10px 14px 12px;
  }
}

@media (max-width: 960px) {
  .knowledge-list {
    gap: 0;
  }

  .knowledge-news-card {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 0;
  }

  .knowledge-news-card__thumb {
    min-height: 0;
    height: 83px;
    border-radius: 8px;
  }

  .knowledge-news-card__badge,
  .knowledge-news-card__excerpt {
    display: none;
  }

  .knowledge-news-card__body {
    gap: 8px;
  }

  .knowledge-news-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.45;
  }

  .knowledge-news-card__meta {
    gap: 8px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .knowledge-news-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .knowledge-news-card__thumb {
    height: 83px;
  }
}
