:root {
  --bg: #f5f7ef;
  --ink: #172018;
  --muted: #61705f;
  --panel: rgba(255, 255, 247, 0.92);
  --line: rgba(23, 32, 24, 0.14);
  --accent: #2e7d49;
  --accent-2: #f0c84b;
  --deep: #102116;
  --shadow: 0 18px 46px rgba(16, 33, 22, 0.18);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(245,247,239,0.98) 72%),
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--accent-2), transparent 62%), transparent 34rem),
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--accent), transparent 72%), transparent 30rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.25rem);
  background: rgba(245, 247, 239, 0.86);
  border-bottom: 1px solid rgba(255,255,255,0.52);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--deep);
  color: white;
  font-size: 1.25rem;
}

.brand-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
}

.nav a {
  min-height: 2.4rem;
  padding: 0.62rem 0.88rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.88rem;
}

.nav a[aria-current="page"] {
  color: #fff;
  background: var(--deep);
}

.lang {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
}

.lang button {
  min-width: 3rem;
  min-height: 2.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.lang button.active {
  background: var(--deep);
  color: #fff;
}

.hero {
  position: relative;
  min-height: clamp(33rem, 86vh, 50rem);
  display: flex;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7,15,9,0.08) 0%, rgba(7,15,9,0.35) 42%, rgba(7,15,9,0.82) 100%),
    linear-gradient(90deg, rgba(7,15,9,0.62), transparent 70%);
}

.hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 6.2rem clamp(1rem, 4vw, 2.25rem) 2rem;
  color: white;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  font-weight: 850;
  font-size: 0.86rem;
}

h1 {
  max-width: 12ch;
  margin: 0.95rem 0 0;
  font-size: clamp(3rem, 13vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.zh-name {
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(2rem, 8vw, 4.2rem);
}

.slogan {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: rgba(255,255,255,0.88);
  font-size: clamp(1.08rem, 3vw, 1.45rem);
  font-weight: 720;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.action {
  min-height: 4.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.91);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.action span:first-child {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.action-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent), white 82%);
}

.action.active {
  background: var(--accent);
  color: white;
}

.action.active .action-icon {
  background: rgba(255,255,255,0.2);
}

.content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2.25rem) 3rem;
}

.panel {
  margin-top: -0.75rem;
  padding: clamp(1rem, 4vw, 1.45rem);
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel h2,
.more h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  letter-spacing: 0;
}

.facts {
  display: grid;
  gap: 0.75rem;
}

.fact {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.64);
}

.fact strong {
  display: block;
  margin-bottom: 0.25rem;
  color: color-mix(in srgb, var(--accent), black 20%);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.story-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
}

.story-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.future-slot {
  display: grid;
  gap: 0.45rem;
  min-height: 9rem;
  align-content: center;
  padding: 1.15rem;
  border: 1px dashed color-mix(in srgb, var(--accent), transparent 45%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 84%), rgba(255,255,255,0.84));
}

.future-slot strong {
  color: color-mix(in srgb, var(--accent), black 18%);
  font-size: 1.05rem;
}

.future-slot span {
  color: var(--muted);
  font-weight: 720;
}

.panel-link {
  width: max-content;
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.3rem;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 900;
}

.video-slots {
  display: grid;
  gap: 0.85rem;
}

.help-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.help-list li {
  padding: 0.9rem 0.95rem;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
  font-weight: 760;
}

.game {
  display: grid;
  gap: 1rem;
}

.game-stage {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent), white 70%), rgba(255,255,255,0.88)),
    repeating-linear-gradient(90deg, transparent 0 3.5rem, rgba(255,255,255,0.25) 3.5rem 3.7rem);
}

.target,
.player,
.hazard {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  user-select: none;
}

.kicker {
  margin-bottom: 20px;
}

.target {
  background: #fff6c8;
  border: 2px solid rgba(0,0,0,0.09);
}

.player {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 22px rgba(0,0,0,0.18);
  transition: left 160ms ease, top 160ms ease;
}

.hazard {
  background: rgba(255,255,255,0.78);
  border: 2px dashed rgba(0,0,0,0.15);
}

.game-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  font-weight: 850;
}

.game-controls {
  display: grid;
  grid-template-columns: repeat(3, 3.8rem);
  justify-content: center;
  gap: 0.42rem;
}

.game-controls button,
.reset-game {
  min-height: 3.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.game-controls .blank {
  visibility: hidden;
}

.reset-game {
  width: 100%;
  font-size: 1rem;
  background: var(--deep);
  color: white;
}

.more {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.25rem) 3rem;
}

.animal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.animal-card {
  min-height: 9rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 0.85rem;
  border-radius: 8px;
  color: white;
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 24px rgba(16,33,22,0.14);
}

.animal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.72));
}

.animal-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
}

.home-hero {
  width: min(1120px, 100%);
  min-height: calc(100vh - 4.1rem);
  display: grid;
  align-content: center;
  gap: 1.1rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.25rem) 3rem;
}

.home-hero h1 {
  max-width: 10ch;
  color: var(--deep);
}

.home-hero p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 700;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.home-tile {
  min-height: 13rem;
}

@media (min-width: 720px) {
  .nav {
    display: flex;
  }

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

  .action {
    min-height: 5.2rem;
    align-items: start;
    flex-direction: column;
  }

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

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

  .game-bar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .reset-game {
    width: 10rem;
  }

  .animal-grid,
  .home-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-tile {
    min-height: 18rem;
  }
}

@media (max-width: 420px) {
  .brand-title {
    max-width: 10.5rem;
  }

  .lang button {
    min-width: 2.65rem;
  }

  .animal-grid {
    grid-template-columns: 1fr;
  }
}
