:root {
  color-scheme: light;
  --paper: #faf6e9;
  --ink: #352d24;
  --quiet: #645c4f;
  --accent: #ad4329;
  --line: #d8d1bd;
  --surface: #fffbed;
  --scene-filter: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button { touch-action: manipulation; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 5; padding: 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 12px; }
.masthead { height: 88px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; width: 109px; height: 48px; flex: 0 0 auto; }
.brand-crop { display: block; width: 109px; height: 48px; overflow: hidden; position: relative; }
.brand img { width: 136px; height: 136px; position: absolute; left: -13px; top: -88px; max-width: none; }
.header-note { font-size: 12px; color: var(--quiet); margin-left: 30px; }
nav { display: flex; align-items: center; gap: 30px; }
.text-button { padding: 9px 0; background: none; border: 0; font-size: 13px; }
.text-button span { display: inline-block; margin-left: 7px; transition: transform .2s; }
.text-button:hover span { transform: translate(2px, -2px); }
.theme-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: none; display: grid; place-items: center; }
.sun { width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: 0 -8px 0 -5px currentColor, 0 8px 0 -5px currentColor, 8px 0 0 -5px currentColor, -8px 0 0 -5px currentColor; }
main { padding: 0 18px; }
.park { position: relative; isolation: isolate; height: calc(100svh - 142px); min-height: 700px; max-height: 1100px; border: 1px solid #77754e80; border-radius: 16px; overflow: hidden; background: #f9f4e0; }
.scenery, .evening-wash { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.scenery { background: url("assets/park.avif") center 55% / cover no-repeat; filter: var(--scene-filter); }
.evening-wash { z-index: -1; opacity: 0; background: #252d51; mix-blend-mode: multiply; }
.intro { text-align: center; position: relative; padding: 42px 20px 0; pointer-events: none; }
.eyebrow { margin: 0 0 18px; font-size: 9px; letter-spacing: .2em; font-weight: 600; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(68px, 6.7vw, 110px); line-height: .96; letter-spacing: -.065em; font-weight: 400; margin: 0; }
h1 em { color: var(--accent); font-weight: 400; letter-spacing: -.075em; }
.intro-copy { margin: 21px 0 22px; font-size: 13px; line-height: 1.6; color: var(--quiet); }
.mobile-break { display: none; }
.throw-button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; white-space: nowrap; color: #fff9e9; background: var(--accent); border: 1px solid #743322; border-radius: 7px; box-shadow: 0 3px 0 #743322; padding: 13px 18px; min-height: 46px; font-size: 12px; font-weight: 500; pointer-events: auto; transition: transform .18s, box-shadow .18s, background .18s; }
.throw-button:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #743322; background: #983a23; }
.throw-button:active { transform: translateY(2px); box-shadow: 0 1px 0 #743322; }
.throw-button:disabled { cursor: wait; }
.throw-button:disabled:hover { transform: none; box-shadow: 0 3px 0 #743322; background: var(--accent); }
.button-arrow { margin-left: 12px; font-size: 17px; line-height: 1; }
.tiny-ball { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%; background: repeating-linear-gradient(60deg, #f7a340 0 5px, #295974 5px 9px); box-shadow: inset -2px -2px 0 #46331c30; transform: rotate(-16deg); }
.score { position: absolute; right: 26px; top: 26px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #9c987863; border-radius: 6px; background: var(--surface); transform: rotate(3deg); }
.score-copy { font-size: 8px; letter-spacing: .12em; display: flex; align-items: center; gap: 12px; }
.score output { font-family: Georgia, serif; font-size: 24px; letter-spacing: -.04em; min-width: 26px; }
.play-field { position: absolute; top: 51%; right: 0; bottom: 50px; left: 0; touch-action: manipulation; }
.peanut { position: absolute; left: 50%; top: 58%; width: clamp(160px, 16vw, 240px); aspect-ratio: 1; transform: translate(-50%, -70%); pointer-events: none; }
.peanut img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; transform: scaleX(var(--facing, 1)); }
.dog-shadow { position: absolute; bottom: 10%; left: 24%; width: 54%; height: 8%; background: #29250c45; border-radius: 50%; filter: blur(5px); }
.speech { position: absolute; top: 5%; left: calc(50% + 68px); background: var(--surface); font-size: 12px; padding: 12px 15px; border: 1px solid #8c7f69; border-radius: 12px 12px 12px 0; box-shadow: 2px 3px 0 #392c1b13; transform: rotate(5deg); pointer-events: none; }
.peanut-label { position: absolute; left: calc(50% - 228px); top: 52%; display: flex; align-items: center; gap: 8px; color: #302d1c; transform: rotate(-9deg); pointer-events: none; font-family: Georgia, serif; font-size: 18px; font-style: italic; }
.drawn-arrow { display: inline-block; font-size: 37px; transform: rotate(30deg); }
.flying-ball { position: absolute; width: 23px; height: 23px; left: 57%; top: 71%; pointer-events: none; }
.flying-ball span { display: block; width: 100%; height: 100%; border-radius: 50%; background: repeating-linear-gradient(55deg, #f59421 0 8px, #246c97 8px 13px); border: 1px solid #a75f29; box-shadow: inset -3px -3px 0 #713f2633, 2px 4px 1px #35230b20; }
.landing-ring { position: absolute; width: 42px; height: 14px; border: 2px dashed #f9f4d7; border-radius: 50%; opacity: 0; pointer-events: none; }
.park-bottom { position: absolute; inset: auto 28px 21px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; pointer-events: none; }
.park-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 11px; border: 1px solid #b3ab8599; background: #fff9e9ed; border-radius: 5px; font-size: 10px; color: #403b2e; }
.keyboard-key { padding: 2px 6px; border: 1px solid #b2a894; border-bottom-width: 2px; border-radius: 3px; font-size: 9px; font-family: monospace; }
.good-dog-stamp { display: flex; align-items: center; flex-direction: column; color: #fdf4d9; background: #344e35; border: 1px solid #f9f2dc; outline: 3px solid #344e35; border-radius: 50%; width: 110px; height: 110px; justify-content: center; gap: 8px; transform: rotate(-12deg); }
.good-dog-stamp span { font-size: 6px; letter-spacing: .12em; }
.good-dog-stamp strong { font: italic 23px Georgia, serif; letter-spacing: -.06em; }
footer { min-height: 54px; padding: 16px 36px; display: flex; justify-content: space-between; gap: 20px; color: var(--quiet); font-size: 10px; }
.footer-domain { color: var(--ink); }
.footer-domain span { margin-left: 5px; }
dialog { color: var(--ink); background: var(--paper); width: min(440px, calc(100% - 36px)); padding: 32px 32px 40px; border: 1px solid var(--line); border-radius: 14px; text-align: center; box-shadow: 8px 12px 0 #231f1720; }
dialog::backdrop { background: #25251a66; backdrop-filter: blur(5px); }
dialog > img { width: 190px; height: 190px; display: block; margin: 0 auto 12px; }
dialog .eyebrow { margin-bottom: 12px; }
dialog h2 { font: 42px/.95 Georgia, serif; letter-spacing: -.055em; margin: 0 0 20px; }
dialog p:not(.eyebrow) { font-size: 13px; color: var(--quiet); line-height: 1.7; margin-bottom: 25px; }
.dialog-close { background: none; border: 0; font-size: 28px; width: 40px; height: 40px; position: absolute; top: 8px; right: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Theme is one state for the complete page. The illustration becomes moonlit. */
html[data-theme="dark"] { color-scheme: dark; --paper: #252b2b; --ink: #faf1d8; --quiet: #d5cdb9; --accent: #a34029; --line: #727767; --surface: #303a36; --scene-filter: brightness(.47) saturate(.65); }
html[data-theme="dark"] .brand { filter: invert(.88) sepia(.15); }
html[data-theme="dark"] .evening-wash { opacity: .4; }
html[data-theme="dark"] h1 em { color: #f2ae77; }
html[data-theme="dark"] .peanut-label { color: #fff1d0; }
html[data-theme="dark"] .park { border-color: #6d7869; }
html[data-theme="dark"] .peanut img { filter: brightness(.8); }
html[data-theme="dark"] .sun { border: none; box-shadow: inset -4px -2px 0 0 currentColor; }

@media (prefers-reduced-motion: no-preference) {
  .intro { animation: arrive .7s both; }
  .peanut { animation: arrive-dog .8s .15s both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes arrive-dog { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 1500px) { .intro { padding-top: 56px; } .intro-copy { font-size: 15px; } .throw-button { font-size: 14px; } }
@media (max-width: 900px) {
  .masthead { padding: 0 28px; }
  .header-note { display: none; }
  .score { right: 18px; top: 19px; padding: 8px 10px; }
  .score-copy { font-size: 7px; gap: 8px; }
  .score output { font-size: 20px; }
  .good-dog-stamp { width: 88px; height: 88px; gap: 6px; }
  .good-dog-stamp strong { font-size: 20px; }
  .good-dog-stamp span { font-size: 5px; }
  .peanut-label { left: calc(50% - 198px); font-size: 16px; }
}
@media (max-width: 600px) {
  .masthead { height: 76px; padding: 0 22px; gap: 12px; }
  .brand { transform: scale(.88); transform-origin: left; width: 96px; }
  nav { gap: 18px; }
  .text-button { font-size: 12px; }
  .theme-button { width: 32px; height: 32px; }
  main { padding: 0 10px; }
  .park { height: calc(100svh - 126px); min-height: 650px; max-height: 1000px; border-radius: 11px; }
  .scenery { background-size: auto 100%; background-position: 49% center; }
  .intro { padding: 64px 14px 0; }
  .eyebrow { font-size: 8px; letter-spacing: .17em; margin-bottom: 19px; }
  h1 { font-size: clamp(58px, 14.8vw, 86px); line-height: .99; }
  .intro-copy { font-size: 11px; line-height: 1.65; margin: 20px 0; }
  .mobile-break { display: block; }
  .throw-button { padding: 12px 16px; font-size: 12px; }
  .score { top: 14px; right: 14px; }
  .score-copy { font-size: 6px; }
  .score output { font-size: 18px; min-width: 21px; }
  .score .tiny-ball { width: 13px; height: 13px; }
  .play-field { top: 55%; bottom: 64px; }
  .peanut { width: 182px; top: 56%; }
  .speech { top: 0; left: calc(50% + 48px); font-size: 10px; padding: 10px 12px; }
  .peanut-label { left: calc(50% - 152px); top: 77%; font-size: 14px; gap: 3px; }
  .drawn-arrow { font-size: 29px; transform: rotate(-10deg); }
  .flying-ball { left: 67%; top: 73%; width: 20px; height: 20px; }
  .park-bottom { left: 13px; right: 16px; bottom: 17px; }
  .park-note { font-size: 8px; padding: 8px; max-width: 205px; line-height: 1.4; }
  .keyboard-key { display: none; }
  .park-note span:last-child { font-size: 0; }
  .park-note span:last-child::after { content: "Tap the grass to play fetch"; font-size: 9px; }
  .good-dog-stamp { width: 75px; height: 75px; gap: 5px; }
  .good-dog-stamp strong { font-size: 18px; }
  .good-dog-stamp span { font-size: 4.5px; }
  footer { padding: 16px 20px; min-height: 50px; font-size: 8px; }
  footer > span:nth-child(2) { display: none; }
}
