/* 小M老師免費遊戲 — mobile-first */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: #1a1613;
  background:
    radial-gradient(900px 420px at -10% 100%, rgba(14, 107, 92, 0.08), transparent 60%),
    radial-gradient(700px 380px at 110% -5%, rgba(184, 134, 11, 0.10), transparent 55%),
    #f3eee4;
  font-family: "PingFang TC", "Noto Sans TC", "Heiti TC", "Microsoft JhengHei",
    "Noto Sans CJK TC", sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #0e6b5c;
}

a:hover {
  color: #0a564a;
}

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 36px;
}

.hero {
  text-align: center;
  padding: 12px 0 8px;
}

.logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(14, 107, 92, 0.22);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.tagline {
  margin: 0 0 14px;
  color: #0e6b5c;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.lead {
  margin: 0 auto;
  max-width: 36em;
  text-wrap: pretty;
  color: #5c564e;
  font-size: 0.98rem;
  line-height: 1.7;
}

.games {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 22px 18px 20px;
  background: #fffcf8;
  border: 1px solid rgba(26, 22, 19, 0.08);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(26, 22, 19, 0.06);
}

.icon {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  background: #efe8dc;
  box-shadow: 0 6px 16px rgba(26, 22, 19, 0.12);
}

.card h2 {
  margin: 14px 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.card p {
  margin: 0 0 18px;
  color: #4a453f;
  font-size: 0.95rem;
  line-height: 1.7;
  text-wrap: pretty;
  flex: 1 1 auto;
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #0e6b5c;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(14, 107, 92, 0.28);
}

.play:hover,
.play:focus-visible {
  background: #0a564a;
  color: #fff;
}

.play:focus-visible {
  outline: 3px solid #b8860b;
  outline-offset: 3px;
}

footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 22, 19, 0.1);
  text-align: center;
  color: #5c564e;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .page {
    padding: 48px 32px 56px;
  }

  .logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .tagline {
    font-size: 1.15rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .games {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
  }

  .card {
    padding: 28px 26px 24px;
  }

  .icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
  }

  .card h2 {
    font-size: 1.3rem;
    margin-top: 18px;
  }
}

@media (min-width: 1200px) {
  .page {
    padding-top: 64px;
  }
}
