:root {
  color-scheme: light;
  --paper: #fcf6e9;
  --ink: #3e2b21;
  --muted: #6f594a;
  --orange: #a84423;
  --leaf: #334e38;
  --territory: min(1200px, calc(100% - 112px));
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); background: radial-gradient(ellipse at 70% 7%, #fffaf0 0, #fcf6e9 64%); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:where(a, button):focus-visible { outline: 3px solid #82351c; outline-offset: 5px; }
.shell { width: var(--territory); margin-inline: auto; }
.skip-link { z-index: 10; position: fixed; top: .75rem; left: .75rem; padding: .75rem 1rem; background: white; border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.header { display: flex; justify-content: space-between; align-items: center; min-height: 91px; gap: 18px; border-bottom: 1px solid #ebdfca; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 850; font-size: 1.06rem; letter-spacing: .02em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; padding-top: 1px; border-radius: 50% 45% 50% 49%; background: #f9e6bc; }
.brand-mark img { width: 31px; height: 31px; object-fit: contain; }
.brand-domain { display: block; font-family: Georgia, serif; font-size: .83rem; font-weight: 500; letter-spacing: .08em; line-height: 1.4; color: var(--muted); }
.navigation { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; column-gap: 32px; row-gap: 6px; font-weight: 650; font-size: .94rem; }
.navigation a { padding-block: .5rem; }
.navigation a:hover, .footer a:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 5px; }

.hero { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(28px,5vw,76px); align-items: center; padding: clamp(44px,6.2vw,86px) 0 clamp(36px,5.4vw,69px); scroll-margin-top: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: #825220; background: #f7e8ce; border-radius: 999px; padding: .45rem .87rem; font-size: .9rem; font-weight: 750; letter-spacing: .1em; }
.eyebrow span { color: #a64b29; font-size: 1.15rem; line-height: 1; }
h1 { margin: 1.13rem -.03em 1.2rem; font-size: clamp(2.75rem,5.3vw,5rem); font-weight: 900; line-height: 1.13; letter-spacing: -.075em; }
h1 em { font-style: normal; color: var(--orange); }
h1 em span { letter-spacing: -.27em; }
.intro p { color: var(--muted); max-width: 22em; margin: 0 0 1.8rem; font-size: clamp(1rem, 1.45vw, 1.18rem); line-height: 1.85; }
.button { min-height: 49px; border: 1px solid transparent; display: inline-flex; justify-content: center; gap: .55rem; align-items: center; border-radius: 999px; padding: .72rem 1.3rem; font-weight: 780; white-space: nowrap; transition: background .18s, transform .18s; }
.button:active { transform: none; }
.button-primary { color: #fffaf0; background: #a84423; box-shadow: 0 5px 0 #783218; }
.button-primary:hover { background: #94371e; }
.button-primary span { font-size: .9rem; color: #ffde8e; }

.play-card { min-width: 0; background: #fffaf1; border: 1px solid #ecdbbf; border-radius: 32px; padding: 11px; box-shadow: 0 12px 36px #6c4d2920, 0 2px 6px #6c4d290a; }
.scene { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; width: 100%; min-height: 300px; aspect-ratio: 1.49; border-radius: 22px; background: #f1ce7b url("./assets/meadow.jpg") center center / cover no-repeat; }
.scene-bubble { position: absolute; z-index: 3; top: 9%; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); text-align: center; background: #fffbef; border: 1px solid #e9c483; padding: .52rem 1.03rem; border-radius: 16px; color: #674527; font-weight: 750; font-size: .94rem; box-shadow: 0 3px 9px #80532b1c; }
.scene-bubble::after { content: ""; position: absolute; width: 10px; height: 10px; bottom: -6px; left: calc(50% - 5px); background: inherit; border-right: 1px solid #e9c483; border-bottom: 1px solid #e9c483; transform: rotate(45deg); }
.mascot { width: min(52%, 280px); aspect-ratio: 1; display: block; position: absolute; z-index: 2; left: 50%; bottom: 10.5%; transform: translateX(-50%); padding: 0; border: 0; background: transparent; border-radius: 45%; touch-action: manipulation; }
.mascot:focus-visible { outline-color: #77431b; }
.mascot-body { display: block; position: relative; width: 100%; transform-origin: 50% 92%; animation: breathe 3.2s ease-in-out infinite; will-change: transform; }
.mascot img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; filter: drop-shadow(0 4px 2px #70491c30); }
.ground-shadow { position: absolute; bottom: 10%; left: 50%; width: 34%; height: 6%; border-radius: 50%; background: #5c502455; filter: blur(7px); transform: translateX(-50%); }
.paw, .eye, .cake, .controller, .football { display: none; position: absolute; pointer-events: none; }
.paw { width: 18%; height: 25%; background: radial-gradient(ellipse at 44% 31%, #ffe1a7 24%, #f3ba69 48%, #dd913f 74%); border: 1px solid #b36c2f; border-radius: 50% 50% 48% 46%; box-shadow: inset -3px -2px 6px #9d542334; right: 0; top: 49%; transform-origin: 32% 85%; }
.paw::after { content: ""; position: absolute; width: 18%; height: 20%; top: 11%; left: 31%; border-left: 2px solid #bc7849; border-right: 2px solid #bc7849; border-radius: 25%; }
.eye { width: 9%; height: 8%; top: 25.8%; border-radius: 47%; background: radial-gradient(ellipse, #f7b54b 0 55%, #eea53a 69%, transparent 73%); }
.eye::after { content: ""; position: absolute; inset: 15% 14% 18%; border-radius: 50%; border-bottom: clamp(2px, .4vw, 5px) solid #622e16; }
.eye-left { left: 33.1%; }
.eye-right { left: 57.7%; }
.cake, .controller { left: 50%; top: 49%; font-size: clamp(1.8rem, 4.9vw, 3.7rem); line-height: 1; transform: translateX(-50%); filter: drop-shadow(0 2px 2px #60381344); }
.football { z-index: 2; left: 58%; bottom: 11%; font-size: clamp(1.6rem, 4.2vw, 3.3rem); line-height: 1; filter: drop-shadow(0 3px 2px #554a3f55); }
.scene[data-mood="wave"] .mascot-body { animation: greet 1.8s ease-in-out; }
.scene[data-mood="wave"] .paw { display: block; animation: wave .45s ease-in-out 4 alternate; }
.scene[data-mood="cake"] .mascot-body { animation: nibble .23s ease-in-out 10 alternate; }
.scene[data-mood="cake"] .cake { display: block; animation: cake 2.35s ease-out both; }
.scene[data-mood="party"] .mascot-body { animation: party 1.13s cubic-bezier(.36,.04,.55,1) 2 both; }
.scene[data-mood="party"] .controller { display: block; }
.scene[data-mood="party"] .ground-shadow { animation: little-shadow 1.13s ease 2 both; }
.scene[data-mood="football"] .mascot-body { animation: kick 1.9s ease-in-out both; }
.scene[data-mood="football"] .football { display: block; animation: roll 1.9s ease-out both; }
.scene[data-mood="nap"] .mascot-body { animation: snooze 2.15s ease-in-out infinite alternate; }
.scene[data-mood="nap"] .eye { display: block; }
.effects { position: absolute; inset: 0; z-index: 3; pointer-events: none; color: #8b391c; font-weight: 850; }
.effects span { position: absolute; left: 28%; top: 43%; font-size: clamp(1.3rem, 4vw, 2.6rem); text-shadow: 1px 1px #ffefb5; animation: float-up 1.13s ease-out both; }
.effects span:nth-child(2) { left: 69%; top: 34%; animation-delay: .17s; font-size: clamp(1rem, 3vw, 1.95rem); }
.effects span:nth-child(3) { left: 73%; top: 49%; animation-delay: .31s; font-size: clamp(.9rem,2.5vw,1.62rem); }
.effects:empty, .effects span:empty { display: none; }
.scene[data-mood="nap"] .effects span { color: #415734; animation-iteration-count: infinite; animation-duration: 2s; }
.sunbeams { position: absolute; inset: 0; pointer-events: none; }
.sunbeams i { position: absolute; top: 27%; left: 21%; width: 7px; height: 7px; background: #fff8d8; border-radius: 50%; box-shadow: 0 0 13px #fffadb; animation: twinkle 3.8s ease-in-out infinite; }
.sunbeams i:nth-child(2) { top: 44%; left: 76%; animation-delay: -.8s; width: 5px; height: 5px; }
.sunbeams i:nth-child(3) { top: 20%; left: 71%; animation-delay: -2s; }
.motion-control { width: 44px; height: 44px; border: 1px solid #e8ca91; border-radius: 50%; display: grid; place-items: center; z-index: 4; position: absolute; top: 10px; right: 10px; background: #fff9e8; color: #704a26; }
.motion-control:hover { background: #fff0c8; }
.motion-control span { width: 11px; height: 13px; border-inline: 3px solid currentColor; }
.motion-control[aria-pressed="true"] span { width: 0; height: 0; border: 7px solid transparent; border-left: 11px solid currentColor; transform: translateX(4px); }

.actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 10px; }
.action { flex: 1 1 17%; display: inline-flex; justify-content: center; align-items: center; gap: .4rem; min-height: 45px; padding: .42rem .3rem; border-radius: 14px; border: 1px solid transparent; color: #483126; font-size: .94rem; white-space: nowrap; font-weight: 720; transition: filter .16s, border-color .16s, transform .16s; }
.action span { font-size: 1.11rem; }
.action[data-current="true"] { border-color: #a47143; }
.action-wave { background: #fae8d9; }
.action-party { background: #e7ecf6; }
.action-cake { background: #f8ebc8; }
.action-football { background: #e8edda; }
.action-nap { background: #eee5f3; }

.practice { scroll-margin-top: 26px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; border: 1px solid #d9dfbf; padding: clamp(20px,3vw,36px); background: #eaf0da; border-radius: 24px; color: #30482e; }
.code-mark { border: 1px solid #d9e2c2; border-radius: 19px; display: grid; place-items: center; width: 70px; height: 70px; background: #f8faee; font: 800 1.7rem/1 ui-monospace, monospace; letter-spacing: -.16em; padding-right: .13em; transform: rotate(-5deg); }
.practice h2 { margin: 0 0 .38rem; font-size: clamp(1.4rem,2.5vw,2.05rem); line-height: 1.16; letter-spacing: -.03em; }
.practice p { margin: 0; font-size: 1rem; line-height: 1.65; color: #4d5d3e; }
.button-practice { color: #fffcef; background: #3b5538; }
.button-practice:hover { background: #293f28; }
.footer { display: flex; justify-content: space-between; gap: 10px; padding-block: 24px calc(32px + env(safe-area-inset-bottom, 0px)); font-size: .9rem; color: #6e5847; }
.footer a { font: 700 1rem/1.3 Georgia, serif; letter-spacing: .08em; }

@keyframes breathe { 50% { transform: scale(1.025,.974) rotate(-1deg); } }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.6); } }
@keyframes greet { 20%, 65% { transform: rotate(-8deg) scale(1.02); } 40%, 85% { transform: rotate(4deg); } }
@keyframes wave { from { transform: rotate(11deg) translateY(0); } to { transform: rotate(46deg) translateY(-28%); } }
@keyframes nibble { to { transform: scale(1.044,.975) translateY(2%); } }
@keyframes cake { 0% { transform: translate(15%,30%) rotate(14deg); opacity: 0; } 12%, 52% { opacity: 1; } 100% { transform: translate(-50%,-85%) scale(.18); opacity: 0; } }
@keyframes party { 14%, 58%, 95% { transform: scale(1.1,.88); } 34% { transform: translateY(-18%) rotate(-8deg) scale(.98,1.04); } 74% { transform: translateY(-14%) rotate(8deg) scale(.98,1.05); } }
@keyframes kick { 19% { transform: translateX(-5%) rotate(-12deg); } 35% { transform: translate(10%,-5%) rotate(13deg) scale(.99,1.07); } 66% { transform: rotate(-4deg); } }
@keyframes roll { 0%, 28% { left: 58%; transform: rotate(0); } 51% { left: 72%; transform: translateY(-55%) rotate(150deg); } 90%, 100% { left: 86%; transform: rotate(340deg); } }
@keyframes little-shadow { 36%, 74% { transform: translateX(-50%) scale(.62); opacity: .52; } }
@keyframes snooze { from { transform: rotate(8deg) scale(1.02,.9); } to { transform: rotate(10deg) scale(1.04,.94); } }
@keyframes float-up { from { transform: translateY(13px) rotate(-15deg) scale(.55); opacity: 0; } 33%, 60% { opacity: 1; } to { transform: translateY(-35px) rotate(14deg) scale(1.16); opacity: 0; } }
html[data-motion="paused"] .scene *, html[data-motion="paused"] .scene *::before, html[data-motion="paused"] .scene *::after { animation: none !important; }
html[data-motion="paused"] .effects span { opacity: 1; }
html[data-motion="paused"] { scroll-behavior: auto; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-2px); }
  .action:hover { transform: translateY(-2px); filter: saturate(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) { scroll-behavior: auto; }
  html:not([data-motion="on"]) .scene * { animation: none !important; }
  .button, .action { transition: none; }
}
@media (max-width: 900px) {
  :root { --territory: min(820px, calc(100% - 56px)); }
  .hero { gap: 25px; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); }
  .scene { min-height: 265px; }
  .mascot { width: min(56%, 218px); }
  .actions { gap: 5px; }
  .action { gap: .28rem; font-size: .88rem; }
  .motion-control { inset: auto auto 10px 10px; }
}
@media (max-width: 760px) {
  :root { --territory: min(520px, calc(100% - 32px)); }
  .header { min-height: 72px; flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
  .brand, .navigation a { min-height: 44px; }
  .navigation { column-gap: clamp(8px, 3vw, 15px); font-size: .875rem; }
  .navigation a { display: inline-flex; align-items: center; }
  .hero { grid-template-columns: 1fr; padding: 31px 0 28px; gap: 26px; }
  .intro { text-align: center; }
  .intro p { margin-inline: auto; margin-bottom: 1.25rem; }
  h1 { font-size: clamp(2.85rem,10vw,4rem); margin: .8rem 0 .9rem; }
  .play-card { padding: 8px; border-radius: 23px; }
  .scene { border-radius: 16px; min-height: 252px; }
  .mascot { width: min(51%, 198px); }
  .mascot, .ground-shadow { bottom: 8%; }
  .actions { gap: 6px; padding-top: 8px; }
  .action { flex-basis: 28%; flex-direction: column; min-height: 54px; gap: .18rem; font-size: .875rem; white-space: normal; }
  .action span { line-height: 1; }
  .practice { grid-template-columns: auto minmax(0, 1fr); gap: 14px 15px; }
  .code-mark { width: 50px; height: 50px; border-radius: 14px; font-size: 1.25rem; }
  .button-practice { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  :root { --territory: calc(100% - 24px); }
  .brand { gap: .4rem; }
}
