/* 小小游乐场首页：独立静态样式，不影响三个游戏各自的布局与逻辑。 */
:root {
  color-scheme: light;
  --paper: #faf9f5;
  --ink: #203d32;
  --muted: #61766e;
  --green: #397955;
  --line: #dce3da;
  font-family: ui-rounded, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: #c9ddb477; touch-action: manipulation; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 6px; }
svg { display: block; flex-shrink: 0; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.page-width { width: min(1376px, calc(100% - 120px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 14px 20px; border-radius: 12px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #cad5c9; padding-inline: clamp(0px, 6vw, 90px); }
.brand { display: inline-flex; align-items: center; gap: 14px; border-radius: 8px; }
.brand svg { width: 44px; height: 38px; stroke-width: 2.8; }
.brand span { font-size: 27px; font-weight: 850; letter-spacing: 1px; white-space: nowrap; }
.header-note { display: flex; align-items: center; gap: 18px; font-size: 15px; letter-spacing: 2px; }
.header-note svg { width: 42px; height: 42px; stroke-width: 2.7; color: #f4bb39; }
.hero { position: relative; text-align: center; padding: 39px 20px 26px; isolation: isolate; }
/* 点阵仅装饰欢迎区；渐隐遮罩避免与下方封面争夺视觉焦点。 */
.hero::before { content: ""; position: absolute; inset: 46px 12px 35px; z-index: -1; background-image: radial-gradient(#dce6d5 1.8px, transparent 1.8px); background-size: 26px 26px; mask-image: linear-gradient(90deg, #000, transparent 34%, transparent 68%, #000); }
h1 { margin: 0; font-size: clamp(40px, 5.3vw, 76px); line-height: 1.4; font-weight: 900; letter-spacing: -2px; text-wrap: balance; }
.headline-rest { white-space: nowrap; }
.highlight { position: relative; color: var(--green); }
.highlight svg { position: absolute; left: 4%; bottom: -7px; width: 92%; height: 15px; color: #f4c442; stroke-width: 7; }
.hero-description { margin: 22px 0 0; font-size: clamp(16px, 1.7vw, 23px); font-weight: 550; line-height: 1.7; }
.hero-note { margin: 11px 0 0; font-size: 15px; letter-spacing: 1px; color: #536e61; }
.hero-note span { margin-inline: 10px; }
.hero-spark { position: absolute; width: 52px; height: 66px; left: calc(50% - 390px); top: 58px; stroke-width: 4.5; color: #f2be43; transform: rotate(-9deg); }
.hero-squiggle { position: absolute; width: 80px; height: 52px; right: calc(50% - 430px); top: 143px; stroke-width: 5.5; color: #4b8662; }
.games { padding-top: 4px; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 12px 22px; }
.section-heading h2 { margin: 0; font-size: 32px; line-height: 1.5; font-weight: 850; letter-spacing: 1px; }
.section-heading > span { font: 500 13px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 3px; color: #647b71; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-card { --accent: #287147; --button: #cee2bb; --button-hover: #bfdaa6; display: flex; flex-direction: column; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 25px; background: #fff; box-shadow: 0 4px 10px #25452f08; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.game-card.puzzle { --accent: #966600; --button: #ffe08a; --button-hover: #ffd361; }
.game-card.stars { --accent: #6941ac; --button: #dccff8; --button-hover: #cbb8f1; }
.cover { aspect-ratio: 8 / 5; overflow: hidden; border-radius: 18px; background: #e4eee0; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.card-content { display: flex; flex-direction: column; flex: 1; padding: 19px 16px 9px; }
.category { margin: 0 0 8px; color: var(--accent); font-size: 15px; font-weight: 750; letter-spacing: 1px; }
.card-content h3 { margin: 0; font-size: clamp(25px, 2.35vw, 34px); font-weight: 850; line-height: 1.4; letter-spacing: .5px; }
.description { margin: 10px 0 0; font-size: clamp(14px, 1.23vw, 18px); line-height: 1.7; }
.controls { margin: 14px 0 18px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.play-action { display: flex; align-items: center; justify-content: center; gap: 15px; min-height: 57px; margin-top: auto; border-radius: 999px; background: var(--button); font-size: 19px; font-weight: 750; transition: background-color 180ms ease; }
.stars .play-action { color: #4b2f7d; }
.play-action svg { width: 24px; height: 24px; stroke-width: 2.2; transition: transform 180ms ease; }
.game-card:focus-visible { border-color: var(--accent); }
.game-card:active { transform: translateY(1px); }
@media (hover: hover) {
  .game-card:hover { transform: translateY(-5px); border-color: #b4c7b0; box-shadow: 0 12px 24px #25452f0e; }
  .game-card:hover .cover img { transform: scale(1.025); }
  .game-card:hover .play-action { background: var(--button-hover); }
  .game-card:hover .play-action svg { transform: translateX(4px); }
  .brand:hover { color: var(--green); }
}
.site-footer { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; padding: 19px 0 max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); }
.site-footer svg { width: 24px; height: 28px; stroke-width: 2.8; color: #eeb536; }
.site-footer p { margin: 0; font-size: 14px; letter-spacing: 1px; line-height: 1.7; }
@media (max-width: 1100px) {
  .page-width { width: calc(100% - 64px); }
  .site-header { padding-inline: 0; }
  .hero-spark { left: 9%; width: 36px; top: 55px; }
  .hero-squiggle { right: 6%; width: 55px; top: 130px; }
  .game-grid { gap: 16px; }
  .card-content { padding: 16px 12px 7px; }
  .description { min-height: 48px; }
  .play-action { font-size: 17px; }
}
@media (max-width: 760px) {
  .page-width { width: calc(100% - 40px); }
  .site-header { height: 72px; }
  .brand { gap: 10px; }
  .brand span { font-size: 22px; letter-spacing: .5px; }
  .brand svg { width: 35px; height: 32px; }
  .header-note { gap: 0; }
  .header-note span { display: none; }
  .header-note svg { width: 33px; height: 33px; }
  .hero { padding: 35px 0 34px; }
  h1 { font-size: clamp(35px, 7vw, 46px); letter-spacing: -1px; line-height: 1.5; }
  .headline-lead { display: block; }
  .hero::before { inset: 30px 0; background-size: 22px 22px; }
  .hero-description { margin-top: 20px; font-size: 14px; }
  .hero-note { margin-top: 10px; font-size: 12px; }
  .highlight svg { height: 11px; bottom: -6px; }
  .hero-spark { top: 46px; left: 10%; width: 28px; height: 36px; }
  .hero-squiggle { top: 58px; right: 7%; width: 40px; height: 30px; }
  .section-heading { margin: 0 4px 16px; }
  .section-heading h2 { font-size: 23px; letter-spacing: 0; }
  .section-heading > span { font-size: 10px; letter-spacing: 1.5px; }
  .game-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 480px; margin-inline: auto; }
  .game-card { border-radius: 23px; padding: 7px; }
  .cover { border-radius: 17px; }
  .card-content { padding: 18px 14px 9px; }
  .category { font-size: 13px; margin-bottom: 6px; }
  .card-content h3 { font-size: 28px; }
  .description { min-height: 0; font-size: 15px; margin-top: 8px; }
  .controls { margin: 12px 0 17px; font-size: 13px; }
  .play-action { min-height: 53px; font-size: 18px; }
  .site-footer { margin-top: 30px; padding-top: 20px; gap: 10px; }
  .site-footer p { font-size: 12px; }
}
@media (max-width: 359px) {
  .page-width { width: calc(100% - 32px); }
  .brand span { font-size: 20px; }
  .hero-description { font-size: 12px; }
  .hero-spark { left: 3%; }
  .hero-squiggle { right: 1%; }
  .section-heading h2 { font-size: 21px; }
  .description { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .cover img, .play-action, .play-action svg { transition: none; }
  .game-card:hover, .game-card:hover .cover img, .game-card:hover .play-action svg { transform: none; }
}
