:root {
  --forest-900: #10160f;
  --forest-800: #1c2814;
  --forest-700: #2a3b1b;
  --forest-600: #34491f;
  --forest-500: #46602c;
  --moss: #6f9a45;
  --moss-light: #9ed276;
  --sun: #ffc85a;
  --sun-deep: #f29a3a;
  --amanita: #c2521f;
  --cream: #fff8de;
  --paper: #fffaf0;
  --bark: #4a3424;
  --ink: #23301a;
  --muted: #5d6b52;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 22, 15, 0.12);
  --max: 1080px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--forest-500); text-underline-offset: 3px; }
a:hover { color: var(--amanita); }
h1, h2, h3 { line-height: 1.2; color: var(--forest-700); font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 2px; border-radius: 6px; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--cream); padding: .5rem 1rem; z-index: 100; }

/* Header */
.site-header { background: var(--forest-700); color: var(--cream); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--cream); text-decoration: none; font-weight: 700; font-size: 1.25rem; font-family: Georgia, serif; letter-spacing: .02em; }
.brand:hover { color: var(--sun); }
.brand img { width: 38px; height: 38px; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--cream); text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: var(--forest-600); color: var(--sun); }
.site-nav a[aria-current="page"] { background: var(--sun); color: var(--forest-700); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sun); color: var(--forest-700); }
.btn-primary:hover { background: var(--sun-deep); color: var(--forest-900); }
.btn-ghost { border-color: var(--cream); color: var(--cream); }
.btn-ghost:hover { background: var(--cream); color: var(--forest-700); }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Hero */
.hero { position: relative; color: var(--cream); background: var(--forest-800) url("assets/hero.jpg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,22,15,.88) 0%, rgba(16,22,15,.6) 55%, rgba(16,22,15,.15) 100%); }
.hero .container { position: relative; padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero h1 { color: var(--cream); font-size: clamp(2.3rem, 6vw, 3.8rem); margin: 0 0 1rem; max-width: 14ch; }
.hero h1 span { color: var(--sun); }
.hero p { font-size: 1.15rem; max-width: 46ch; margin: 0 0 1.6rem; color: #f3ecd0; }
.eyebrow { display: inline-block; background: rgba(255, 200, 90, .18); color: var(--sun); border: 1px solid rgba(255, 200, 90, .45); padding: .25rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.store-buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.store-buttons .btn.is-recommended { box-shadow: 0 0 0 4px rgba(255, 200, 90, .45); }

/* Sections */
section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section-title { text-align: center; margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.section-lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 1.75rem; }

.features { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border-top: 5px solid var(--moss); }
.feature:nth-child(2) { border-top-color: var(--sun-deep); }
.feature:nth-child(3) { border-top-color: var(--amanita); }
.feature:nth-child(4) { border-top-color: var(--forest-500); }
.feature h3 { margin: .4rem 0 .4rem; font-size: 1.25rem; }
.feature p { margin: 0; color: var(--muted); }
.feature .icon { width: 56px; height: 56px; border-radius: 15px; box-shadow: 0 4px 12px rgba(16, 22, 15, .18); }
.feature h3 { margin-top: .9rem; }

.biomes { background: var(--forest-700); color: var(--cream); }
.biomes h2 { color: var(--cream); }
.biomes .section-lead { color: #d9e3c8; }
.biome-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.biome { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--forest-800); }
.biome img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.biome figcaption { padding: .8rem 1rem; font-weight: 700; display: flex; justify-content: space-between; }
.biome figcaption small { color: var(--sun); font-weight: 600; }

.notice-section { padding-bottom: 0; }
.notice-section + .cta { padding-top: clamp(2rem, 5vw, 3rem); }
.notice { background: var(--cream); border: 2px dashed var(--amanita); border-radius: var(--radius); padding: 1.1rem 1.4rem; display: flex; gap: 1rem; align-items: center; }
.notice-icon { width: 48px; height: 48px; flex: none; border-radius: 13px; }
.notice strong { color: var(--amanita); }
.notice p { margin: 0; }

.cta { text-align: center; }
.cta .store-buttons { justify-content: center; }
.cta .btn-ghost { border-color: var(--forest-700); color: var(--forest-700); }
.cta .btn-ghost:hover { background: var(--forest-700); color: var(--cream); }

/* Page header */
.page-header { background: linear-gradient(135deg, var(--forest-700), var(--forest-500)); color: var(--cream); padding-block: 3rem 2.5rem; }
.page-header h1 { color: var(--cream); margin: 0 0 .4rem; font-size: clamp(2rem, 5vw, 2.8rem); }
.page-header p { margin: 0; color: #e6edd6; }

/* Privacy */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.6rem; font-size: 1.6rem; padding-bottom: .3rem; border-bottom: 3px solid var(--sun); display: inline-block; }
.prose h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.prose th, .prose td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid #ecebd8; vertical-align: top; }
.prose th { background: var(--forest-700); color: var(--cream); }
.summary-box { background: var(--cream); border-left: 6px solid var(--moss); border-radius: 12px; padding: 1.2rem 1.5rem; margin: 1.5rem 0; }
.summary-box ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.toc { background: #fff; border-radius: 12px; padding: 1rem 1.5rem; box-shadow: var(--shadow); }
.toc ol { margin: .5rem 0 0; padding-left: 1.3rem; columns: 2 220px; }

/* Footer */
.site-footer { background: var(--forest-900); color: #cfd8bf; padding-block: 2rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--sun); }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.socials { display: flex; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--forest-700); color: var(--cream); transition: background .15s ease; }
.socials a:hover { background: var(--sun); color: var(--forest-900); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.copyright { width: 100%; font-size: .85rem; color: #93a084; margin: 0; }

/* Mobile app banner */
.app-banner { position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 50; background: var(--forest-700); color: var(--cream); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); padding: .9rem 1rem; display: flex; align-items: center; gap: .8rem; border: 2px solid var(--sun); animation: slide-up .35s ease-out; }
.app-banner[hidden] { display: none; }
body.has-app-banner { padding-bottom: 110px; }
.app-banner img { width: 52px; height: 52px; flex: none; }
.app-banner .text { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.35; }
.app-banner .text strong { display: block; font-size: 1rem; color: var(--sun); }
.app-banner .btn { padding: .55rem 1rem; font-size: .92rem; }
.app-banner .close { background: none; border: 0; color: var(--cream); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .25rem .4rem; align-self: flex-start; }
@keyframes slide-up { from { transform: translateY(120%); } to { transform: none; } }

@media (max-width: 600px) {
  .site-header .container { flex-direction: column; gap: .4rem; }
  .site-nav a { padding: .4rem .7rem; }
  .hero::before { background: linear-gradient(180deg, rgba(16,22,15,.55) 0%, rgba(16,22,15,.88) 100%); }
  .store-buttons .btn { flex: 1 1 100%; justify-content: center; }
  .feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 1rem; align-items: start; padding: 1.1rem 1.2rem; }
  .feature .icon { width: 48px; height: 48px; border-radius: 13px; grid-row: span 2; }
  .feature h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
  .biome-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .biome figcaption { flex-direction: column; padding: .6rem .75rem; font-size: .95rem; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
