@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap");
@media (max-width: 720px) {
  .viewport .touch-controls {
    display: flex;
  }
  .viewport .fox-warning {
    bottom: 93px;
  }
}
.overlay:not([hidden]) ~ .touch-controls {
  display: none;
}
:root {
  --paper: #f4f3eb;
  --ink: #173e37;
  --muted: #6b7a6f;
  --line: #d6dbce;
  --orange: #edb075;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #cc7b42;
  outline-offset: 5px;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
a {
  color: inherit;
}
.masthead {
  height: 112px;
  max-width: 1440px;
  margin: auto;
  padding: 0 5.6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.6px;
}
.brand svg {
  width: 43px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linejoin: round;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  font-weight: 500;
  margin-top: 5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.edition,
.tiny,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}
.edition {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}
.edition i,
.live-dot {
  width: 5px;
  height: 5px;
  background: #72977d;
  display: inline-block;
  border-radius: 50%;
}
.text-button {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--ink);
  font-size: 12px;
}
.text-button span {
  margin-left: 9px;
}
.sound-button {
  width: 35px;
  height: 35px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.sound-button svg {
  width: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.layout {
  max-width: 1268px;
  margin: 0 auto;
  padding: 54px 32px 50px;
  display: grid;
  grid-template-columns: 1fr minmax(400px, 580px);
  gap: 7.4%;
  align-items: start;
}
.intro {
  padding: 26px 0 0 20px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 1.9px;
}
.line {
  height: 1px;
  width: 26px;
  background: var(--ink);
}
h1 {
  font-family: var(--serif);
  font-size: clamp(66px, 6.4vw, 91px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -4px;
  margin: 27px 0 26px;
  position: relative;
}
h1 em {
  font-weight: 500;
  color: #63816a;
}
.title-star {
  width: 28px;
  position: absolute;
  left: 290px;
  top: 14px;
  stroke: #9d6d4d;
  stroke-width: 1.3;
  transform: rotate(12deg);
}
.lede {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 14px;
  font-weight: 500;
}
.description {
  font-size: 13px;
  line-height: 1.9;
  max-width: 310px;
  color: var(--muted);
  margin: 0 0 29px;
}
.route-card {
  max-width: 355px;
  display: grid;
  grid-template-columns: 1fr 66px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 21px 0 17px;
  align-items: center;
}
.route-card .tiny {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1.6px;
}
.route-card h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin: 7px 0 0;
}
.route-card svg {
  width: 66px;
  fill: none;
  stroke: #71806a;
  stroke-width: 1;
}
.route-meta {
  grid-column: 1/-1;
  display: flex;
  gap: 17px;
  font-size: 9px;
  color: var(--muted);
  margin-top: 16px;
}
.route-meta span + span:before {
  content: "·";
  margin-right: 14px;
}
.how-to {
  margin-top: 27px;
}
.how-to > .tiny {
  font-size: 8px;
  letter-spacing: 1.4px;
  margin-bottom: 18px;
}
.instruction {
  display: flex;
  gap: 16px;
  margin-bottom: 17px;
}
.step {
  font-family: var(--serif);
  font-size: 16px;
  color: #98a18e;
  line-height: 1.5;
}
.instruction p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.instruction strong {
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}
.keyboard-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 26px;
  font-size: 9px;
  color: var(--muted);
}
kbd {
  font-family: var(--sans);
  border: 1px solid #cdd3c6;
  border-radius: 4px;
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  box-shadow: 0 2px 0 #e4e7dc;
}
.keyboard-hint > span {
  margin-left: 5px;
}
.key-separator {
  padding: 0 6px;
}
.game-shell {
  border: 1px solid #c4cdbd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px #173e370b;
  background: #e7ebdf;
}
.game-top,
.game-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 21px;
  height: 43px;
  font-size: 8px;
  letter-spacing: 1.3px;
  font-weight: 600;
}
.game-top > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-top > div {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 1px;
}
.game-top button {
  border: 0;
  border-left: 1px solid #ccd4c5;
  padding: 0 0 0 15px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.viewport {
  position: relative;
  aspect-ratio: 600/760;
  overflow: hidden;
  background: #a2c7c6;
  touch-action: none;
  isolation: isolate;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none !important;
}
.hud {
  position: absolute;
  inset: 23px 27px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  color: #244940;
}
.hud-label {
  font-size: 7px;
  letter-spacing: 1.7px;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}
.hud b {
  font-size: 29px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.unit {
  font-size: 11px;
  color: #40645b;
}
.hud-right {
  text-align: right;
}
.flower-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.flower-score > span {
  color: #fff5d6;
  font-size: 26px;
  text-shadow: 0 1px #798e78;
}
.flower-score b {
  font-size: 23px;
}
.trail-meter {
  position: absolute;
  right: 17px;
  top: 130px;
  bottom: 120px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  color: #345c50;
  font-size: 7px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0.75;
}
.trail-meter > div {
  width: 2px;
  flex: 1;
  background: #31584733;
  position: relative;
}
.trail-meter i {
  position: absolute;
  bottom: 0;
  width: 2px;
  background: #264e3f;
  height: 0;
}
.trail-meter i:after {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  top: 0;
  left: -2px;
  background: #244b3d;
  border: 1px solid #e0e8d0;
  border-radius: 50%;
}
.rescue-hud {
  position: absolute;
  left: 26px;
  top: 91px;
  font-size: 11px;
  letter-spacing: 4px;
  color: #446853;
  pointer-events: none;
}
.fox-warning {
  position: absolute;
  left: 50%;
  bottom: 23px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #193d35e8;
  border: 1px solid #c6d8be55;
  border-radius: 20px;
  padding: 9px 14px;
  color: #e8ecd8;
  font-size: 7px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
.fox-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e7a36c;
}
.fox-warning.danger {
  background: #863e30ed;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    #a7cfce08,
    #c4d1b31c 25%,
    #dae1c68a 65%,
    #b8c4a03b
  );
  padding: 28px 20px;
  transition: opacity 0.2s;
}
.overlay[hidden] {
  display: none;
}
.start-icon {
  font-family: var(--serif);
  font-size: 45px;
  color: #365d47;
  line-height: 1;
  margin: 0 0 17px;
}
.overlay .tiny {
  font-size: 8px;
  letter-spacing: 2px;
}
.overlay h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.06;
  font-size: 60px;
  letter-spacing: -2px;
  margin: 16px 0 15px;
  color: #193f34;
}
.overlay p {
  font-size: 12px;
  line-height: 1.9;
  max-width: 320px;
  color: #355c4a;
  margin: 0 0 26px;
}
.primary {
  background: var(--ink);
  color: #f5f1db;
  border: 1px solid #173e37;
  border-radius: 5px;
  min-width: 218px;
  padding: 16px 24px;
  font-size: 12px;
  text-align: left;
  box-shadow: 0 4px 12px #274b3c1f;
}
.primary:hover {
  background: #2b5546;
}
.primary span {
  float: right;
  margin-left: 25px;
}
.overlay-hint {
  font-size: 6px;
  letter-spacing: 1.4px;
  color: #355b4a;
  margin-top: 16px;
}
.game-bottom {
  height: 42px;
  font-size: 8px;
  letter-spacing: 0.2px;
}
.game-bottom > span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
}
.game-bottom svg {
  width: 13px;
  height: 13px;
  stroke: #778c6c;
  stroke-width: 1.1;
}
.game-bottom > span:last-child {
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
}
.game-bottom b {
  margin-left: 7px;
  color: var(--ink);
  font-weight: 600;
  font-size: 9px;
}
.touch-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 19px;
  display: none;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.touch-controls button {
  pointer-events: auto;
  border: 1px solid #f4efd9a1;
  background: #e8ecd8ba;
  color: #274c3a;
  border-radius: 50%;
  width: 59px;
  height: 59px;
  font-size: 25px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-controls button:active,
.touch-controls button.held {
  background: #244b3e;
  color: #fff;
}
.touch-controls > span {
  font-size: 7px;
  letter-spacing: 1px;
  color: #2f4f3f;
}
.toast {
  position: absolute;
  left: 50%;
  top: 125px;
  transform: translate(-50%, -10px);
  background: #f3f0dce8;
  color: #264c3c;
  padding: 11px 17px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
footer {
  max-width: 1280px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 21px 32px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 1.3px;
}
footer .text-button {
  font-size: 10px;
  letter-spacing: 0;
}
.footer-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0;
}
dialog {
  border: 1px solid #b4c1ac;
  border-radius: 10px;
  padding: 42px;
  max-width: 530px;
  width: calc(100% - 30px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 100px #173e3733;
}
dialog::backdrop {
  background: #123e3655;
  backdrop-filter: blur(6px);
}
dialog h2 {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 20px 0;
}
dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: #566e5f;
}
dialog a {
  font-size: 12px;
}
.privacy-note {
  font-size: 10px !important;
  margin-top: 25px;
}
.dialog-close {
  position: absolute;
  right: 17px;
  top: 13px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 25px;
}
@media (min-width: 1450px) {
  .layout {
    padding-top: 70px;
  }
}
@media (max-width: 1000px) {
  .layout {
    gap: 5%;
    padding: 36px 28px;
    grid-template-columns: 1fr minmax(350px, 52%);
  }
  .intro {
    padding-left: 0;
  }
  h1 {
    font-size: 72px;
  }
  .title-star {
    left: 230px;
  }
  .route-meta {
    gap: 9px;
    font-size: 8px;
  }
  .route-meta span + span:before {
    margin-right: 8px;
  }
  .description {
    max-width: 270px;
  }
  .nav {
    gap: 24px;
  }
  .edition {
    display: none;
  }
  .how-to {
    margin-top: 22px;
  }
  .instruction {
    margin-bottom: 14px;
  }
  .keyboard-hint {
    flex-wrap: wrap;
  }
  .game-top {
    padding: 0 15px;
    font-size: 7px;
  }
  .game-top > div {
    gap: 9px;
  }
  .game-bottom {
    padding: 0 14px;
  }
}
@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
  .fox-warning {
    bottom: 93px;
  }
  .overlay:not([hidden]) ~ .touch-controls {
    display: none;
  }
  .keyboard-hint {
    display: none;
  }
  .overlay-hint {
    font-size: 6px;
  }
}
@media (max-width: 720px) {
  .masthead {
    height: 77px;
    padding: 0 20px;
  }
  .brand {
    font-size: 13px;
    gap: 9px;
    letter-spacing: 1.3px;
  }
  .brand svg {
    width: 33px;
  }
  .brand-sub {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .nav {
    gap: 17px;
  }
  .nav > .text-button {
    font-size: 10px;
  }
  .sound-button {
    height: 30px;
    width: 30px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    padding: 23px 16px 24px;
    gap: 24px;
  }
  .intro {
    width: 100%;
    padding: 0 7px;
    position: relative;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .line {
    width: 19px;
  }
  h1 {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -2px;
    margin: 12px 0 8px;
  }
  h1 br {
    display: none;
  }
  .title-star {
    left: auto;
    right: 5px;
    top: 6px;
    width: 19px;
  }
  .lede {
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
  }
  .lede br {
    display: none;
  }
  .description,
  .route-card,
  .how-to,
  .keyboard-hint {
    display: none;
  }
  .game-shell {
    width: 100%;
    max-width: 540px;
    align-self: center;
    border-radius: 9px;
  }
  .viewport {
    max-height: calc(100svh - 145px);
    aspect-ratio: 600/760;
    min-height: 390px;
  }
  .game-top {
    height: 36px;
    font-size: 6px;
    letter-spacing: 1px;
  }
  .game-top > div {
    font-size: 6px;
  }
  .game-bottom {
    height: 35px;
    font-size: 7px;
  }
  .game-bottom > span:last-child {
    font-size: 6px;
  }
  .game-bottom b {
    font-size: 8px;
  }
  .hud {
    inset: 18px 22px auto;
  }
  .hud b {
    font-size: 25px;
  }
  .hud-label {
    font-size: 6px;
  }
  .unit {
    font-size: 9px;
  }
  .rescue-hud {
    left: 22px;
    top: 76px;
    font-size: 10px;
  }
  .trail-meter {
    top: 113px;
    right: 12px;
  }
  .overlay h2 {
    font-size: 49px;
  }
  .overlay p {
    font-size: 11px;
    margin-bottom: 22px;
  }
  .start-icon {
    font-size: 35px;
    margin-bottom: 12px;
  }
  .overlay .tiny {
    font-size: 7px;
  }
  .overlay-hint {
    font-size: 5px;
  }
  .overlay {
    padding-bottom: 32px;
  }
  .primary {
    font-size: 11px;
    min-width: 210px;
  }
  .fox-warning {
    font-size: 6px;
    padding: 8px 12px;
  }
  .touch-controls > span {
    display: none;
  }
  footer {
    margin: 0 23px;
    padding: 15px 0 22px;
    font-size: 6px;
    letter-spacing: 0.9px;
    gap: 14px;
  }
  footer > span:first-child {
    max-width: 105px;
    line-height: 1.8;
  }
  footer .text-button {
    font-size: 9px;
  }
  .footer-mark {
    display: none;
  }
  dialog {
    padding: 30px;
    max-height: 90svh;
  }
  dialog h2 {
    font-size: 32px;
  }
  dialog p {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
