@font-face {
  font-family: "Field Mono";
  src: url("../assets/fonts/FiraCode-VF.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f1eddf;
  --ink: #263f37;
  --muted: #748075;
  --pink: #ba496b;
  --mono: "Field Mono", ui-monospace, monospace;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button { font: inherit; }
button:focus-visible { outline: 3px solid var(--pink); outline-offset: 5px; }
.experiment { width: min(960px, calc(100% - 64px)); margin: 40px auto 30px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 10px/1.4 var(--mono); letter-spacing: 1.4px; }
.club-mark { display: grid; place-items: center; width: 26px; height: 26px; background: var(--ink); color: var(--paper); font: italic bold 23px/1 Georgia, serif; letter-spacing: -2px; padding-right: 4px; }
.edition { margin-left: auto; color: var(--muted); font-size: 9px; }
h1 { margin: 23px 0 8px; font-size: clamp(36px, 5.7vw, 62px); font-weight: 400; line-height: 1.08; letter-spacing: -2.5px; }
h1 em { color: var(--pink); }
.intro > p { margin: 0 0 28px; color: #637569; font: 14px/1.6 var(--mono); letter-spacing: -.5px; }
.game { border: 2px solid var(--ink); background: #fbf8ed; box-shadow: 6px 6px 0 #d8d8c7; }
.game-bar { display: flex; align-items: center; min-height: 39px; padding: 0 16px; gap: 20px; border-bottom: 2px solid var(--ink); background: #e3e8d7; font: 500 9px/1.4 var(--mono); letter-spacing: .6px; }
.location { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.location-light { width: 6px; height: 6px; background: #8aa878; box-shadow: 2px 2px 0 #b8c7a4; }
.weather { margin-left: auto; color: #6b7b69; font-size: 9px; letter-spacing: 0; }
.sound-toggle { display: flex; align-items: center; gap: 7px; align-self: stretch; padding: 0 0 0 15px; border: 0; border-left: 1px solid #bdc9b5; color: var(--ink); background: none; font: inherit; cursor: pointer; white-space: nowrap; }
.sound-toggle:hover { color: var(--pink); }
.speaker { fill: currentColor; }
.sound-waves, .sound-slash { fill: none; stroke: currentColor; stroke-width: 1.4; }
.sound-waves { display: none; }
.sound-toggle[aria-pressed="true"] .sound-waves { display: block; }
.sound-toggle[aria-pressed="true"] .sound-slash { display: none; }
.scene { position: relative; aspect-ratio: 640 / 420; overflow: hidden; isolation: isolate; background: #25574c; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.bird-target { position: absolute; left: 40%; top: 35%; width: 34%; height: 45%; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.bird-target:focus-visible { outline: 2px dashed #fff1ac; outline-offset: -5px; }
.bird-target:disabled { cursor: default; }
.click-hint { position: absolute; left: 62%; top: 29%; pointer-events: none; color: #eff4cd; transform: rotate(-5deg); transition: opacity .15s; }
.click-hint span { padding: 5px 7px; background: #244d3ee6; font: 10px/1.4 var(--mono); box-shadow: 2px 2px 0 #153e3380; }
.click-hint svg { display: block; margin: 7px 0 0 16px; transform: scaleX(-1); fill: none; stroke: #f5edb3; stroke-width: 2; shape-rendering: crispEdges; }
.scene.is-playing .click-hint, .scene.has-played .click-hint { opacity: 0; }
.game-footer { display: flex; align-items: center; justify-content: space-between; min-height: 81px; padding: 15px 20px; gap: 18px; border-top: 2px solid var(--ink); }
.caption-wrap { display: flex; gap: 13px; align-items: center; }
.caption-star { color: #bd685b; font-size: 31px; }
.caption { margin: 0 0 6px; font-size: 17px; line-height: 1.3; }
.instruction { margin: 0; color: var(--muted); font: 8px/1.5 var(--mono); letter-spacing: 1px; }
.play-button { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 25px; min-width: 122px; padding: 11px 14px; border: 1px solid var(--ink); color: #f6f5dc; background: var(--ink); box-shadow: 2px 2px 0 #b4bda8; font: 11px/1.4 var(--mono); cursor: pointer; }
.play-button:hover:not(:disabled) { background: #3e5a45; transform: translateY(-1px); }
.play-button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.play-button:disabled { color: #7d8c75; background: #e4e7d7; border-color: #c7cdbb; box-shadow: none; cursor: default; }
.play-arrow { font: 20px/12px Georgia, serif; }
.timeline { height: 3px; background: #dde1cf; }
.timeline span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: #d5808a; }
.field-notes { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-top: 23px; font-size: 12px; color: #637567; }
.field-notes p { margin: 0; }
.note-label, .pixel-note { font: 8px/1.6 var(--mono); letter-spacing: .7px; }
.note-label { margin-right: 13px; color: var(--muted); }
.field-notes i { margin-left: 7px; color: #829080; }
.pixel-note { white-space: nowrap; color: var(--muted); }
.no-script { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; margin: 0; background: var(--paper); text-align: center; }

@media (max-width: 650px) {
  .experiment { width: calc(100% - 28px); margin-top: 23px; }
  .eyebrow { font-size: 8px; letter-spacing: .6px; gap: 7px; }
  .edition { font-size: 7px; }
  h1 { margin-top: 21px; letter-spacing: -1.6px; }
  .intro > p { font-size: 10px; margin-bottom: 21px; }
  .game-bar { padding: 0 10px; min-height: 34px; font-size: 8px; gap: 10px; }
  .weather { display: none; }
  .sound-toggle { margin-left: auto; padding-left: 10px; font-size: 7px; }
  .game-footer { padding: 12px 10px; min-height: 77px; gap: 8px; }
  .caption-wrap { gap: 8px; }
  .caption-star { font-size: 22px; }
  .caption { font-size: 13px; max-width: 230px; }
  .instruction { font-size: 6px; letter-spacing: .35px; }
  .play-button { min-width: 90px; gap: 10px; padding: 10px; font-size: 9px; }
  .click-hint { top: 26%; left: 59%; }
  .click-hint span { font-size: 7px; padding: 3px 5px; }
  .click-hint svg { width: 22px; height: 16px; margin-top: 4px; }
  .field-notes { display: block; margin-top: 18px; font-size: 11px; }
  .note-label { display: block; margin-bottom: 5px; font-size: 7px; }
  .pixel-note { display: block; margin-top: 12px; font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .play-button:hover:not(:disabled) { transform: none; }
}

.sound-toggle,
.play-button { min-height: 44px; }

html.embedded body { display: flex; min-height: 100svh; padding: 8px 0; }
html.embedded .experiment {
  width: min(calc(100% - 24px), 800px, calc((100svh - 164px) * 1.5238));
  margin: auto;
}
html.embedded .intro,
html.embedded .field-notes { display: none; }
html.embedded .game-bar { min-height: 44px; }
