:root {
  --bg: #f4f9f6;
  --bg-band: #e8f3ec;
  --bg-card: #ffffff;
  --ink: #1a2e24;
  --ink-soft: #4a6358;
  --accent: #059669;
  --accent-light: #6ee7b7;
  --border: #c8ddd2;
  --link: #047857;
  --shadow: 0 8px 28px rgba(26, 46, 36, 0.1);
  --radius: 14px;
  --max: 1140px;
  --header-h: 64px;
  --font: "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.85; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(244, 249, 246, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--ink); font-weight: 600; }
.brand b { color: var(--accent); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink-soft); font-size: 0.92rem; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); border-bottom-color: var(--accent-light); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ads-top-bar { padding: 0.6rem 0; background: #fff; border-bottom: 1px solid var(--border); }
#ads { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; background: transparent; margin: 10px 0; gap: 0.5rem; }
#ads > div, #ads .ads-item { display: flex; flex-direction: column; align-items: center; width: 70px; box-sizing: border-box; }
#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; }
.applist-title { text-align: center; font-size: 0.9rem; color: var(--ink-soft); }

.hero-band {
  background: linear-gradient(135deg, #064e3b 0%, #059669 55%, #6ee7b7 100%);
  color: #ecfdf5; padding: 3rem 0;
}
.hero-band h1 { font-size: clamp(1.6rem, 3.5vw, 2.15rem); margin: 0 0 1rem; line-height: 1.35; }
.hero-band p { opacity: 0.95; max-width: 58ch; margin: 0; }
.hero-band a { color: #a7f3d0; }

.strip-links { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1.25rem 0; }
.strip-links a { padding: 0.45rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; font-size: 0.88rem; color: var(--link); }
.strip-links a:hover { border-color: var(--accent); text-decoration: none; }

.band { padding: 2.5rem 0; }
.band.alt { background: var(--bg-band); }
.band h2 { font-size: 1.35rem; margin: 0 0 1rem; color: var(--accent); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }

.card-scroll { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-body { padding: 0.85rem 1rem; }
.card-body h3 { margin: 0 0 0.35rem; font-size: 1rem; }

.chip-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 2rem; }
.chip-nav a { padding: 0.35rem 0.85rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; }
.chip-nav a:hover { background: var(--accent); color: #fff; text-decoration: none; border-color: var(--accent); }

.page-head { padding: 2rem 0; background: var(--bg-band); border-bottom: 1px solid var(--border); }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.error-wrap { text-align: center; padding: 4rem 1rem; }
.error-wrap .code { font-size: 4rem; color: var(--accent); margin: 0; font-weight: 700; }

.site-footer { margin-top: 2rem; padding: 1.5rem 0; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--ink-soft); background: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 0.5rem; transform: translateY(-120%); opacity: 0; pointer-events: none; transition: 0.25s; z-index: 400; }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; }
  .ads-top-bar .container { width: 100%; padding-inline: 0.75rem; }
  #ads { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
  #ads::-webkit-scrollbar { display: none; }
  #ads > div, #ads .ads-item { width: 84px; flex-shrink: 0; scroll-snap-align: center; }
}
