@font-face {
  font-family: "Game Display";
  src: url("/_a/instrument-serif.5eb09b5ac0.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --bg: #eaf0f1;
  --ink: #22363b;
  --subtle: #435e65;
  --line: #bacbd0;
  --board: #1c3036;
  --board-ink: #edf6f5;
  --board-subtle: #bed2d5;
  --accent: #a43b25;
  --accent-ink: #ffffff;
  --accent-hover: #85311f;
}
* { box-sizing: border-box }
html { scroll-padding: 1.25rem }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}
::selection { color: var(--accent-ink); background: var(--accent) }
[hidden] { display: none !important }
a { color: inherit; text-underline-offset: .24em }
a:hover { text-decoration-thickness: .125em }
button { font: inherit }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px }
#content:focus { outline: none }
.skip { position: absolute; z-index: 30; inset: .5rem auto auto .5rem; padding: .75rem; background: var(--bg); translate: 0 -180% }
.skip:focus { translate: none }
.edge { width: min(1280px, calc(100% - 6rem)); margin-inline: auto }
.site-header { border-block-end: 1px solid var(--line) }
.navigation,.site-footer,.navigation nav,.site-footer nav { display: flex; align-items: center; gap: 1.25rem }
.navigation,.site-footer { justify-content: space-between }
.navigation { min-height: 64px }
.navigation a,.site-footer a { min-height: 44px; display: inline-flex; align-items: center }
.navigation nav a,.site-footer nav a { font-size: .875rem; color: var(--subtle); text-decoration: none }
.navigation nav a:hover,.site-footer nav a:hover { color: var(--ink); text-decoration: underline }
.wordmark { gap: .625rem; font-size: 1.0625rem; font-weight: 720; text-decoration: none }
.brand-mark { display: inline-block; inline-size: 22px; block-size: 18px; border: 2px solid var(--accent); border-radius: 48%; rotate: -22deg }
.sand .brand-mark { border-radius: 2px; inline-size: 17px; block-size: 17px; rotate: 45deg; border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg) }
.site-footer { border-top: 1px solid var(--line); flex-wrap: wrap; min-height: 80px; font-weight: 650 }
.hero {
  display: grid;
  grid-template-columns: minmax(248px,.86fr) minmax(0,1.8fr);
  align-items: center;
  gap: clamp(28px,5vw,80px);
  padding-block: clamp(36px,6vw,92px);
}
.hero[data-enter] { animation: arrive 220ms cubic-bezier(.2,.7,.4,1) both }
@keyframes arrive { from { transform: translateY(5px) } to { transform: none } }
.hero h1 {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(3.75rem,7vw,6rem)/.92 "Game Display", Georgia, serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.race .hero h1 { font-family: "Game Display", "Arial Narrow", sans-serif }
.hero-copy > p { max-width: 34ch; margin: 20px 0 24px; color: var(--subtle); font-size: clamp(.98rem,1.5vw,1.14rem); line-height: 1.55 }
.hero-action { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem }
.hero-action a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem }
.play {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 48px; padding: .65rem 1rem;
  border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
  font-weight: 730; cursor: pointer;
  transition: background-color 130ms ease, transform 130ms ease;
}
.play:hover { background: var(--accent-hover) }
.play:active { transform: scale(.98) }
.play-mark { inline-size: 0; block-size: 0; border-block: .32em solid transparent; border-inline-start: .47em solid currentColor }
.player {
  min-inline-size: 0; overflow: hidden;
  color: var(--board-ink); background: var(--board);
  border-radius: 12px;
}
.player-heading,.tools {
  min-height: 48px; padding-inline: 16px; display: flex; align-items: center; gap: 8px 14px;
  font-size: .8125rem;
}
.player-heading { justify-content: space-between; border-block-end: 1px solid rgb(255 255 255 / 11%); font-weight: 650 }
.player-heading span:last-child { color: var(--board-subtle); font-weight: 450 }
.stage { position: relative; min-width: 0; height: clamp(360px,36vw,495px); overflow: hidden; isolation: isolate }
.stage iframe,.cover img { display: block; inline-size: 100%; block-size: 100%; border: 0 }
.stage:fullscreen,.stage[data-expanded] { width: 100vw; height: 100dvh; background: var(--board) }
.stage[data-expanded] { position: fixed !important; inset: 0; z-index: 20 }
.stage[data-expanded] iframe { height: calc(100% - 52px) !important }
#close-expanded { position: fixed; inset: auto 8px 8px auto; z-index: 21; background: var(--bg); color: var(--ink); min-height: 44px; padding-inline: 12px; border-radius: 6px; cursor: pointer }
body:has(.stage[data-expanded]) { overflow: hidden }
.cover,.loading { position: absolute; inset: 0 }
.cover img { object-fit: contain }
.race .cover { background: #15282f }
.sand .cover { background: #15282f }
.loading { display: grid; place-content: center; justify-items: center; gap: .5rem; text-align: center }
.loading span { inline-size: 24px; block-size: 24px; border: 2px solid rgb(255 255 255 / 22%); border-top-color: currentColor; border-radius: 50%; animation: spin .9s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }
.tools { flex-wrap: wrap; padding-block: 2px; border-block-start: 1px solid rgb(255 255 255 / 11%) }
.tools button { background: none; border: 0; color: var(--board-ink); cursor: pointer; min-height: 44px; padding: 0 6px; font-weight: 550 }
.tools button:hover,.tools button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .25em }
.player :focus-visible { outline-color: var(--board-ink) }
#loading-message { margin: 0; padding: 0 16px 12px; color: var(--board-ink) }
.study { display: grid; grid-template-columns: minmax(148px,1fr) minmax(0,2fr); border-top: 1px solid var(--line); gap: clamp(24px,5vw,80px); padding-block: 36px 72px }
.study-links { align-self: start; }
.study-links h2 { font: 400 1.9rem/1 "Game Display", Georgia, serif; margin: .1rem 0 .75rem }
.study-links a { display: flex; align-items: center; min-height: 44px; width: fit-content; font-size: .9rem }
.prose { max-width: 68ch; min-inline-size: 0; overflow-wrap: break-word }
main > .prose { margin-block: 3rem 4rem }
.prose img { display: block; max-inline-size: 100%; block-size: auto }
.prose h1 { font: 400 clamp(2.75rem,6vw,5.6rem)/.98 "Game Display", Georgia, serif; margin: 0 0 1.5rem; letter-spacing: -.03em }
.prose h2 { margin: 1.65em 0 .35em; letter-spacing: -.02em; line-height: 1.2 }
.prose h2:first-child { margin-block-start: 0 }
.prose h3 { margin: 1.5em 0 .4em; line-height: 1.3 }
.prose p { margin: .35em 0 1em; color: var(--ink) }
.prose td,.prose th { padding: .625em; text-align: start; border-bottom: 1px solid var(--line) }
.race .hero-detail { margin-top: 24px; color: var(--subtle); font-size: .875rem }
.sand .hero {
  grid-template-columns: 1fr; gap: 24px;
  padding-block: clamp(24px,4vw,56px) 44px;
}
.sand .hero-copy { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,1fr); column-gap: clamp(24px,5vw,64px); align-items: start }
.sand .hero h1 { grid-row: span 2; align-self: center; }
.sand .hero-copy > p { margin: 0 0 12px; max-width: 42ch }
.sand .player { width: 100% }
.sand .stage { height: clamp(375px,33vw,480px) }
.sand .hero-detail { display: flex; flex-wrap: wrap; gap: 8px 16px; grid-column: 2; margin: 16px 0 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--subtle) }
.hero-detail li { display: inline-flex; align-items: center; gap: 6px }
.swatch { width: 9px; height: 9px; background: #f5b054 }
.swatch.water { background: #5daee6 }
.swatch.wall { background: #97654b }
body.embedded { background: var(--board); color: var(--board-ink) }
@media (max-width: 960px) {
  .edge { width: min(100% - 3rem,1280px) }
  .hero { gap: 24px; grid-template-columns: minmax(216px,1fr) minmax(0,1.6fr) }
  .hero h1 { font-size: clamp(3.25rem,7vw,5rem) }
}
@media (max-width: 700px) {
  .edge { width: calc(100% - 2rem) }
  .hero,.sand .hero,.sand .hero-copy { grid-template-columns: minmax(0,1fr) }
  .hero,.sand .hero { padding-block: 24px 32px; gap: 20px }
  .sand .hero h1 { grid-row: auto }
  .sand .hero-detail { grid-column: auto; margin-top: 10px }
  .hero-copy > p,.sand .hero-copy > p { margin: 10px 0 12px; max-width: 44ch }
  .race .hero-detail { margin-block-start: 12px }
  .stage,.sand .stage { height: 342px }
  .study { grid-template-columns: minmax(0,1fr); padding-block: 24px 44px }
  .study-links { padding-bottom: 20px; border-block-end: 1px solid var(--line) }
  .site-footer { gap: 0 12px; padding-block: 12px }
}
@media (max-width: 385px) {
  .navigation,.navigation nav { gap: .625rem }
  .navigation .nav-extra { display: none }
  .player-heading,.tools { padding-inline: 8px }
  .tools { gap: 1px 5px }
  .stage,.sand .stage { height: 330px }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important }
}


/* Player-first layout for original games. Heights include the iframe controls. */
.hero.player-first { grid-template-columns: minmax(0,1fr); gap: 14px; padding-block: 20px 26px }
.player-first .player-intro { display:flex; flex-wrap:wrap; align-items:baseline; gap:.45rem 1.5rem }
.player-first .player-intro h1 { grid-row:auto; font-size:clamp(2.85rem,5.2vw,4.7rem); line-height:1 }
.player-first .player-intro p { margin:0; color:var(--subtle); font-size:.95rem }
.sand .stage {
  height:clamp(430px,calc((100vw - 116px) * .528 + 150px),680px);
}
.race .player-first .stage {
  height:clamp(415px,calc((100vw - 116px) * .5556 + 115px),710px);
}
.player-first .stage:fullscreen,.sand .stage:fullscreen,
.player-first .stage[data-expanded],.sand .stage[data-expanded] { height:100dvh }
.player-first .cover img { object-fit:contain }
.stage-launch { position:absolute; z-index:1; inset:0; display:grid; place-items:center; pointer-events:none }
.stage-launch button { pointer-events:auto; border:1px solid var(--board-subtle) }
.stage:has(iframe) .stage-launch,.stage:has([data-gf-loading]:not([hidden])) .stage-launch { display:none }

.guide-ad:not([hidden]) { min-height:100px; margin-block:140px 24px }
@media (max-width:960px) {
  .sand .stage {height:calc((100vw - 72px) * .528 + 146px)}
  .race .player-first .stage {height:calc((100vw - 72px) * .5556 + 124px)}
}
@media (max-width:700px) {
  .hero.player-first { gap:10px; padding-block:12px 20px }
  .player-first .player-intro { display:block }
  .player-first .player-intro h1 { font-size:clamp(2.5rem,8vw,3.7rem) }
  .player-first .player-intro p { font-size:.86rem; margin-top:5px }
  .sand .stage {height:calc((100vw - 48px) * .528 + 205px)}
  .sand .stage[data-gf-src*="scene=daily"] {height:calc((100vw - 48px) * .528 + 250px)}
  .race .player-first .stage {height:calc((100vw - 48px) * .5556 + 160px)}
}
