:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --text: #1f2a1c;
  --muted: #5c6b54;
  --accent: #3f8f4f;
  --accent-strong: #2f6e3c;
  --border: #e0e6db;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141812;
    --surface: #1d231a;
    --text: #eef2ea;
    --muted: #a7b39d;
    --accent: #7cc98a;
    --accent-strong: #a5dcae;
    --border: #2c3426;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  /* Full-height flex column so a short page still pushes the footer to the bottom of the screen. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

/* Grow to fill the line and right-align the contents, so the switcher hugs the right edge even when the
   header wraps the nav onto its own line. */
nav.site {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  column-gap: 0.9rem;
  row-gap: 0.4rem;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav.site a:hover, nav.site a.active { color: var(--accent-strong); }

/*
 * Language switcher: a no-JavaScript <details> dropdown. It stays a single compact control in the header
 * however many languages exist, expanding into a menu of the full language names.
 */
.langs {
  position: relative;
  display: inline-block;
  font-size: 0.95rem;
}
.langs > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--accent);
  list-style: none;
}
/* Hide the native disclosure triangle; no custom caret either. */
.langs > summary::-webkit-details-marker { display: none; }

.lang-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin: 0.4rem 0 0;
  padding: 0.35rem;
  list-style: none;
  /* Size to the widest language name — no fixed width, so there is no empty gutter on the right. */
  width: max-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
  z-index: 10;
}
.lang-menu .lang {
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a.lang:hover { background: var(--bg); color: var(--accent-strong); }
.lang-menu .lang.active {
  font-weight: 700;
  color: var(--accent-strong);
}

/* Grow to fill the leftover height so the footer is pinned to the bottom on short pages. */
main { padding-top: 1.5rem; flex: 1; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

.tagline { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.5rem; }

a { color: var(--accent-strong); }

.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}
.hero .mascot-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
  outline: none;
}
.hero .mascot {
  display: block;
  width: 8rem;
  height: auto;
}

/* Speech bubble revealed when the mascot is hovered or keyboard-focused. */
.hero .bubble {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 0.4rem);
  background: var(--accent-strong);
  color: var(--surface);
  padding: 0.3rem 0.7rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.hero .bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.4rem solid transparent;
  border-top-color: var(--accent-strong);
}
.hero .mascot-wrap:hover .bubble,
.hero .mascot-wrap:focus-visible .bubble {
  opacity: 1;
  transform: translate(-50%, -0.2rem);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0 0.75rem;
}
.store-badge {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.store-badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.note { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

footer.site {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
footer.site a { color: var(--muted); }