:root {
  --primary: #1677ff;
  --primary-dark: #0f5fd1;
  --accent: #24b47e;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-muted: #f0f5ff;
  --text: #1f2a37;
  --text-soft: #526075;
  --border: #dbe6f3;
  --shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
  --radius: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef5ff 0%, #f7fbff 240px, var(--bg) 240px, var(--bg) 100%);
}

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

img {
  max-width: 100%;
  display: block;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(219, 230, 243, 0.8);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-soft);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
}

.nav a:hover,
.nav a.is-active {
  color: var(--primary-dark);
  background: var(--surface-muted);
}

.hero {
  padding: 52px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.hero-panel,
.hero-side,
.section-card,
.tool-card,
.article-card,
.product-card,
.policy-card,
.stat-card,
.schedule-card,
.copy-card,
.checkin-card,
.school-result,
.ad-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 34px;
}

.hero-side {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eaf3ff;
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 48px);
}

.hero p,
.section-intro,
.muted,
.policy-card p,
.article-card p,
.tool-card p,
.product-card p,
.copy-card p,
.schedule-card p,
.school-result p,
.hero-side p {
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-actions,
.inline-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn {
  color: #fff;
  background: var(--primary);
}

.btn:hover {
  background: var(--primary-dark);
}

.ghost-btn {
  color: var(--primary-dark);
  background: #fff;
  border-color: var(--border);
}

.ghost-btn:hover {
  background: var(--surface-muted);
}

.hero-stats,
.stats-grid,
.link-grid,
.tool-grid,
.article-grid,
.product-grid,
.policy-grid,
.templates-grid,
.footer-links,
.meta-grid,
.countdown-grid,
.feature-list {
  display: grid;
  gap: 16px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.hero-stats,
.stats-grid,
.countdown-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.link-grid,
.tool-grid,
.article-grid,
.product-grid,
.policy-grid,
.templates-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.tool-card,
.article-card,
.product-card,
.policy-card,
.copy-card,
.schedule-card,
.checkin-card,
.ad-slot {
  padding: 22px;
}

.stat-card strong,
.countdown-item strong {
  display: block;
  font-size: 28px;
  color: var(--primary-dark);
}

.stat-card span,
.countdown-item span {
  color: var(--text-soft);
  font-size: 13px;
}

.page-section {
  padding: 18px 0 34px;
}

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

.section-head h2 {
  font-size: 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: #edf7f2;
  color: #1b7f59;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tool-card h3,
.article-card h3,
.product-card h3,
.policy-card h3,
.copy-card h3,
.schedule-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.kpis span {
  padding: 8px 10px;
  background: #f3f7fd;
  color: var(--text-soft);
  border-radius: 10px;
  font-size: 13px;
}

.tool-list,
.article-list,
.policy-list,
.template-list,
.mini-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.8;
}

.highlight-box {
  padding: 18px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid #d4e6ff;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.9;
}

.faq-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.faq-item h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.contact-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
}

.contact-qr {
  width: 100%;
  max-width: 220px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #d8e7fb;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(22, 119, 255, 0.12);
}

.contact-qr.friend-qr {
  height: 320px;
  object-fit: cover;
  object-position: center 36%;
}

.contact-lines {
  display: grid;
  gap: 10px;
}

.contact-lines strong {
  font-size: 18px;
}

.qr-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
}

.modal.is-open {
  display: flex;
}

.modal-dialog {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}

.modal-head,
.modal-body,
.modal-foot {
  padding: 22px;
}

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

.modal-head {
  border-bottom: 1px solid var(--border);
}

.modal-foot {
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 22px;
}

.detail-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.9;
}

.pay-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.pay-card img {
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #d8e7fb;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(22, 119, 255, 0.12);
}

.unlock-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #eefaf4;
  border: 1px solid #ccecd9;
}

.tool-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.tool-panel,
.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.tool-panel h3,
.info-panel h3 {
  margin-bottom: 14px;
}

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

.form-grid.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 126px;
  resize: vertical;
}

.result-box,
.schedule-list,
.plan-output,
.school-result,
.copy-output,
.checkin-history {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid #d8e9ff;
}

.suggest-panel {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.suggest-empty {
  padding: 14px 16px;
  color: var(--text-soft);
}

.suggest-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef3f8;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover {
  background: #f5f9ff;
}

.suggest-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.countdown-item {
  padding: 18px;
  text-align: center;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #dce8f8;
}

.plan-output ul,
.schedule-list ul,
.checkin-history ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
  color: var(--text-soft);
}

.school-result dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 10px;
  margin: 0;
}

.school-result dt {
  color: var(--text-soft);
}

.school-result dd {
  margin: 0;
  font-weight: 600;
}

.copy-output {
  white-space: pre-wrap;
  line-height: 1.8;
}

.pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0;
}

.pricing strong {
  font-size: 28px;
  color: #e05757;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  background: #fff4e8;
  color: #b76a12;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ad-slot {
  border-style: dashed;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ad-slot strong {
  display: block;
  margin-bottom: 8px;
}

.site-footer {
  margin-top: 24px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}

.footer-links a {
  padding: 10px 12px;
  background: #f6f9fc;
  border-radius: 12px;
  color: var(--text-soft);
}

.small {
  font-size: 13px;
  color: var(--text-soft);
}

.notice {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fffbe8;
  color: #8d6f1b;
  border: 1px solid #f1e1a6;
}

@media (max-width: 960px) {
  .hero-grid,
  .tool-shell,
  .footer-grid,
  .link-grid,
  .tool-grid,
  .article-grid,
  .product-grid,
  .policy-grid,
  .templates-grid,
  .hero-stats,
  .stats-grid,
  .countdown-grid,
  .feature-list,
  .meta-grid,
  .contact-card,
  .modal-grid,
  .form-grid,
  .form-grid.form-grid-3 {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

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

  .nav a {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 24px));
  }

  .hero-panel,
  .hero-side,
  .tool-panel,
  .info-panel,
  .stat-card,
  .tool-card,
  .article-card,
  .product-card,
  .policy-card,
  .copy-card,
  .schedule-card,
  .checkin-card,
  .ad-slot {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

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

  .brand-subtitle {
    line-height: 1.5;
  }

  .hero-actions,
  .form-actions,
  .product-actions,
  .modal-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .ghost-btn,
  .form-actions .btn,
  .form-actions .ghost-btn,
  .product-actions .btn,
  .product-actions .ghost-btn,
  .modal-foot .btn,
  .modal-foot .ghost-btn,
  .modal-foot .close-btn {
    width: 100%;
  }

  .contact-qr,
  .pay-card img {
    max-width: 100%;
    margin: 0 auto;
  }

  .contact-lines {
    text-align: left;
  }

  .school-result dl {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .school-result dt {
    margin-top: 8px;
    font-size: 13px;
  }

  .school-result dd {
    word-break: break-word;
  }

  .suggest-panel {
    max-height: 220px;
  }

  .suggest-item {
    padding: 12px;
  }

  .pricing strong {
    font-size: 24px;
  }

  .modal {
    padding: 12px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding: 16px;
  }

  .modal-head {
    align-items: flex-start;
  }

  .close-btn {
    width: 44px;
    min-width: 44px;
  }
}
