:root {
  --brand-orange: #ff8a1a;
  --brand-pink: #e91e63;
  --brand-magenta: #c2185b;
  --brand-grad: linear-gradient(135deg, #ff8a1a 0%, #e91e63 55%, #c2185b 100%);
  --bg: #f7f4f1;
  --bg-soft: #fff9f5;
  --surface: #ffffff;
  --text: #1f1a17;
  --text-muted: #6b5f57;
  --line: #eadfd6;
  --shadow: 0 10px 30px rgba(31, 26, 23, 0.08);
  --radius: 14px;
  --max: 1120px;
  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 138, 26, 0.16), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(233, 30, 99, 0.12), transparent 55%),
    var(--bg);
  line-height: 1.75;
}

/* Only this region scrolls — top bar is outside it, so it cannot move */
.page-scroll {
  position: fixed;
  top: var(--site-top-h, var(--header-h));
  left: 0;
  right: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-magenta);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Top bar stays outside the scroll container */
.site-header {
  position: relative;
  width: 100%;
  background: transparent;
  border-bottom: none;
}

.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff9f5;
  border-bottom: 1px solid rgba(234, 223, 214, 0.9);
}

.site-top .site-header {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand span {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  background: rgba(233, 30, 99, 0.08);
  color: var(--brand-magenta);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Ads sit inside .site-top; not independently sticky */
.ads-bar {
  position: relative;
  top: auto;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  padding: 8px 12px 10px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  background: transparent;
  margin: 0;
  max-width: var(--max);
  margin-inline: auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* Hero */
.hero {
  padding: 48px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.hero-copy .lead {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.28);
}

.btn-secondary {
  color: var(--brand-magenta);
  background: var(--surface);
  border-color: rgba(233, 30, 99, 0.25);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-tags span {
  background: rgba(255, 138, 26, 0.1);
  border: 1px solid rgba(255, 138, 26, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Sections */
.section {
  padding: 42px 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}

.prose h2,
.prose h3 {
  scroll-margin-top: 16px;
}

.prose h2 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  font-size: 1.45rem;
  border-left: 4px solid var(--brand-pink);
  padding-left: 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.3em;
  margin-bottom: 0.45em;
  font-size: 1.15rem;
}

.prose p {
  margin: 0 0 1em;
  color: #2c2622;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose strong {
  color: var(--text);
}

.toc {
  background: var(--bg-soft);
  border: 1px dashed rgba(233, 30, 99, 0.25);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc a {
  display: inline-block;
  margin: 4px 10px 4px 0;
}

/* Feature / category grids */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.media-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #111;
}

.media-item.landscape img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.media-item .cap {
  padding: 12px 14px 14px;
}

.media-item .cap h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.media-item .cap p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature-row.reverse {
  grid-template-columns: 1.1fr 1fr;
}

.feature-row.reverse .feature-text {
  order: 2;
}

.feature-row img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: top;
}

.feature-text {
  padding: 24px;
}

.feature-text h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.feature-text p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.feature-text a {
  font-weight: 600;
}

/* CTA band */
.cta-band {
  margin: 10px 0 30px;
  padding: 28px;
  border-radius: 18px;
  color: #fff;
  background: var(--brand-grad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cta-band h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.cta-band p {
  margin: 0;
  opacity: 0.95;
}

.cta-band .btn {
  background: #fff;
  color: var(--brand-magenta);
}

/* Breadcrumb / page hero */
.page-hero {
  padding: 28px 0 8px;
}

.page-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

/* Error pages */
.error-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
}

.error-wrap .code {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.error-wrap h1 {
  margin: 0 0 10px;
}

.error-wrap p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #1f1a17;
  color: #f5ebe4;
}

.footer-inner {
  padding: 36px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.site-footer a {
  color: #f8c9d8;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer li {
  color: rgba(245, 235, 228, 0.82);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0 22px;
  color: rgba(245, 235, 228, 0.6);
  font-size: 0.85rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    background: #fff9f5;
    border-bottom: 1px solid var(--line);
    z-index: 1001;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .hero-grid,
  .feature-row,
  .feature-row.reverse,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-text {
    order: 0;
  }

  .feature-row img {
    min-height: 220px;
    max-height: 420px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-top: 28px;
  }

  .prose {
    padding: 20px 16px;
  }
}

@media (max-width: 560px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .media-item img {
    aspect-ratio: 3 / 4;
  }

  .cta-band {
    padding: 22px 18px;
  }
}
