:root {
  --plum: #2d1b3d;
  --plum-soft: #4a2d5e;
  --coral: #ff6b6b;
  --coral-deep: #e8456a;
  --peach: #ffb4a2;
  --amber: #ffc857;
  --lilac: #c77dff;
  --cream: #fff8f3;
  --paper: #ffffff;
  --ink: #1a1224;
  --muted: #6b5b7a;
  --line: rgba(45, 27, 61, 0.1);
  --glow: 0 12px 40px rgba(232, 69, 106, 0.18);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 58px;
  --sticky-ads-h: 0px;
  --max-w: 960px;
  --display: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.9;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255, 180, 162, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 5%, rgba(199, 125, 255, 0.22), transparent 50%),
    linear-gradient(180deg, #fff5ee 0%, var(--cream) 35%, #fef0f5 100%);
}

a { color: var(--coral-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--lilac); }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(100% - 24px, var(--max-w)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 400;
  background: rgba(255, 248, 243, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--plum);
  flex-shrink: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: var(--glow);
  border: 2px solid rgba(255, 107, 107, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.05rem; letter-spacing: 0.04em; }
.brand-text span { font-size: 0.68rem; color: var(--muted); }

.main-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 12px 32px rgba(45, 27, 61, 0.08);
}

.main-nav.open { display: flex; }

.main-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--plum);
  font-size: 0.92rem;
}

.main-nav a:hover,
.main-nav a.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(199, 125, 255, 0.1));
  color: var(--coral-deep);
}

.nav-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 1.2rem;
  color: var(--plum);
  cursor: pointer;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--glow);
  border: none;
  cursor: pointer;
}

.btn-dl:hover { filter: brightness(1.06); color: #fff !important; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--coral);
  color: var(--coral-deep) !important;
  box-shadow: none;
}

.btn-outline:hover { background: rgba(255, 107, 107, 0.08); }

.nav-btn-dl { display: none; }

/* Ads */
.ads-block {
  padding: 14px 0 8px;
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.6), transparent);
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  background: transparent;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(45, 27, 61, 0.12);
  transition: transform 0.18s ease;
}

#ads a { border-radius: 15px; }

#ads img:hover { transform: translateY(-3px) scale(1.04); }

#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.sticky-ads-wrap {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 350;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  box-shadow: 0 8px 24px rgba(45, 27, 61, 0.06);
}

.sticky-ads-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#sticky-ads {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

#sticky-ads > div { width: calc(25% - 6px); max-width: 72px; }

#sticky-ads img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
}

#sticky-ads .caption { display: none; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    gap: 2px;
  }
  .main-nav a { padding: 8px 12px; }
  .nav-btn-dl { display: inline-flex; }
  #sticky-ads > div { width: calc(12.5% - 6px); max-width: 68px; }
}

/* Hero */
.rest-hero {
  padding: 36px 0 28px;
  text-align: center;
}

.rest-label {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(199, 125, 255, 0.12));
  color: var(--coral-deep);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.rest-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  color: var(--plum);
  line-height: 1.35;
  margin-bottom: 18px;
}

.rest-lead {
  text-align: left;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.rest-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
}

/* Sections */
.rest-section {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.section-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--lilac);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.rest-section h2 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  color: var(--plum);
  margin-bottom: 16px;
  line-height: 1.4;
}

.rest-section h3 {
  font-size: 1.05rem;
  color: var(--plum-soft);
  margin: 18px 0 10px;
}

.module-text p { margin-bottom: 14px; color: #3d3048; font-size: 0.94rem; }

/* Cards */
.card-grid {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.info-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 16px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(45, 27, 61, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.info-card .card-tag {
  font-size: 0.68rem;
  color: var(--coral);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.info-card strong {
  display: block;
  color: var(--plum);
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.info-card span { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* Media */
.media-split {
  display: grid;
  gap: 22px;
  margin: 20px 0;
}

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  background: var(--paper);
}

.media-frame img { width: 100%; }

.media-cap {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 248, 243, 0.8);
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .media-split { grid-template-columns: 1fr 1fr; align-items: start; }
  .media-split.reverse .module-text { order: 2; }
  .media-split.reverse .media-frame { order: 1; }
}

/* Tags */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-cloud span {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(199, 125, 255, 0.1);
  color: var(--plum-soft);
  border: 1px solid rgba(199, 125, 255, 0.2);
}

/* FAQ */
.faq-block {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  border-left: 4px solid var(--coral);
  box-shadow: 0 2px 12px rgba(45, 27, 61, 0.04);
}

.faq-block strong { display: block; color: var(--plum); margin-bottom: 8px; }
.faq-block p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Breadcrumb */
.breadcrumb {
  padding: 14px 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--coral-deep); }
.breadcrumb span { margin: 0 6px; opacity: 0.5; }

/* Legal pages */
.legal-page { padding: 24px 0 48px; }
.legal-page h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  color: var(--plum);
  margin-bottom: 20px;
}
.legal-page h2 {
  font-size: 1.15rem;
  color: var(--plum-soft);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.legal-page p, .legal-page li { font-size: 0.92rem; color: #3d3048; margin-bottom: 12px; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin-bottom: 16px; }

/* Error pages */
.error-page {
  text-align: center;
  padding: 60px 0 80px;
  min-height: 50vh;
}

.error-page h1 {
  font-family: var(--display);
  font-size: 4rem;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page p { color: var(--muted); margin-bottom: 24px; }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 32px 0 24px;
  background: linear-gradient(180deg, transparent, rgba(45, 27, 61, 0.04));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-brand strong { color: var(--plum); display: block; margin-bottom: 8px; }
.footer-brand p { font-size: 0.85rem; color: var(--muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a { font-size: 0.85rem; }

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: 1fr; }
}
