:root {
  --bg: #f5faf7;
  --card: #ffffff;
  --ink: #1c2a24;
  --muted: #5d7268;
  --line: #dceae2;
  --blue: #1db88a;
  --blue-soft: #e7f8f1;
  --navy: #0f6b52;
  --shadow: 0 10px 28px rgba(28, 90, 68, 0.08);
  --sticky-top: 0px;
  --sticky-bottom: 0px;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.ad-host { min-height: 0; }
.ad-host:empty { display: none; }
.ad-unit {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 12px;
}
.ad-unit iframe,
.ad-unit img,
.ad-unit video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  display: block;
}
.ad-invite {
  position: absolute;
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  background: #fff;
  border: 1px solid #b7e7d4;
  border-radius: 999px;
  padding: 4px 10px;
}
.ad-invite.internal { top: 8px; right: 10px; z-index: 99999; }
.ad-invite.external { position: static; display: inline-block; margin: 8px 0 0; }

.sticky-header, .sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 80;
  background: #fff;
  box-shadow: var(--shadow);
  max-height: 28vh;
  overflow: auto;
}
.sticky-header {
  top: 0;
  padding-top: env(safe-area-inset-top);
}
.sticky-footer {
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-left, .sticky-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  width: 140px;
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  box-shadow: var(--shadow);
}
.sticky-left { left: max(8px, env(safe-area-inset-left)); }
.sticky-right { right: max(8px, env(safe-area-inset-right)); }

body.has-sticky-header { padding-top: calc(96px + env(safe-area-inset-top)); }
body.has-sticky-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  background:
    radial-gradient(720px 380px at 90% -20%, rgba(29, 184, 138, 0.18), transparent 58%),
    radial-gradient(520px 280px at 8% 110%, rgba(92, 196, 232, 0.16), transparent 50%),
    linear-gradient(180deg, #f7fffb 0%, #eef8f3 100%);
  color: var(--ink);
  padding: 72px 0 56px;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--navy);
  color: #fff;
}
.logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--blue); display: grid; place-items: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.hero h1 { font-size: clamp(26px, 6vw, 42px); margin: 28px 0 12px; line-height: 1.25; }
.hero p { max-width: 680px; color: var(--muted); font-size: 17px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pill {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }
.card p + p { margin-top: 10px; }

.section { padding: 28px 0 8px; }
.section h2 { margin: 0 0 8px; font-size: clamp(22px, 5vw, 26px); }
.lead { color: var(--muted); margin: 0 0 18px; }

.slot {
  margin: 20px 0;
  min-height: 24px;
}

.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding-bottom: 48px;
}
.stat {
  background: var(--blue-soft);
  border-radius: 16px;
  padding: 24px;
}
.stat b { display: block; font-size: 26px; color: var(--navy); }

footer.site {
  color: #7a8f85;
  text-align: center;
  padding: 28px 0 calc(40px + env(safe-area-inset-bottom));
  font-size: 13px;
}

@media (max-width: 900px) {
  .wrap { width: min(1080px, calc(100% - 24px)); }
  .grid, .about { grid-template-columns: 1fr; }
  .sticky-left, .sticky-right { display: none; }
  .hero { padding: 40px 0 32px; }
  .hero p { font-size: 15px; }
  .card, .stat { padding: 18px; }
  .section { padding: 18px 0 4px; }
  .about { padding-bottom: 28px; }
  body.has-sticky-header { padding-top: calc(72px + env(safe-area-inset-top)); }
  body.has-sticky-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sticky-header, .sticky-footer { max-height: 22vh; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 20px); }
  .brand { font-size: 14px; letter-spacing: 0.04em; }
  .pills { gap: 8px; }
  .pill { font-size: 12px; padding: 5px 10px; }
  .grid { gap: 12px; margin: 16px 0; }
  .ad-invite.internal { top: 6px; right: 6px; font-size: 11px; }
}
