/* Shared frame, with a different world and live walkthrough on each game page. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.game-page .eyebrow, .game-page .text-link { color: var(--game-accent); }
.world-navigation { border-bottom: 1px solid var(--line); }
.world-links { display: flex; align-items: center; justify-content: space-between; gap: 18px; overflow-x: auto; scrollbar-width: thin; }
.world-links a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 61px; flex-shrink: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 550; text-decoration: none; }
.world-links a > span { width: 6px; height: 6px; border-radius: 50%; background: var(--world-color); }
.world-links a[aria-current="page"] { border-color: var(--game-accent); color: var(--ink); font-weight: 700; }
.world-links a:hover { color: var(--game-accent); }
.world-links a:focus-visible { outline-offset: -4px; }
.game-page-hero { padding-block: 62px 78px; }
.game-intro-layout { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 77px; }
.game-intro-copy { padding-block: 10px; }
.game-intro-copy h1 { margin-top: 20px; font-size: clamp(54px, 5.5vw, 77px); line-height: 1.05; letter-spacing: -.06em; }
.game-page-tagline { max-width: 410px; margin-top: 24px; color: var(--game-accent); font-size: 23px; line-height: 1.4; letter-spacing: -.5px; font-weight: 600; }
.game-page-description { max-width: 430px; margin-top: 23px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.game-facts { display: flex; flex-wrap: wrap; gap: 7px; max-width: 440px; padding: 0; margin-block: 26px 29px; list-style: none; }
.game-facts li { padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--game-accent) 18%, white); border-radius: 99px; color: var(--game-accent); font-size: 10px; }
.game-button { color: #fff; background: var(--game-accent); }
.game-button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--game-accent) 15%, transparent); }
.game-intro-note { margin-top: 15px; color: #756a7b; font-size: 10px; }
.walkthrough { overflow: hidden; border: 1px solid color-mix(in srgb, var(--game-accent) 14%, white); border-radius: 34px; padding: 23px 26px 20px; background: var(--game-bg); scroll-margin-block: 24px; }
.walkthrough-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--game-accent); font-size: 8px; line-height: 1.5; }
.walkthrough-topline > span:first-child { letter-spacing: .09em; font-weight: 700; text-transform: uppercase; }
.demo-kind { display: flex; align-items: center; gap: 5px; font-size: 8px; }
.demo-kind > span { width: 4px; height: 4px; border-radius: 50%; background: var(--game-accent); }
.demo-board { display: grid; place-items: center; min-width: 0; padding-block: 8px 14px; }
.demo-svg { width: min(100%, 360px); height: auto; overflow: visible; font-family: inherit; }
.walkthrough-caption { display: flex; align-items: start; gap: 16px; min-height: 89px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--game-accent) 15%, transparent); }
.demo-position { padding-top: 2px; flex-shrink: 0; color: var(--game-accent); font-size: 10px; font-variant-numeric: tabular-nums; }
.demo-position > span { font-weight: 750; }
.walkthrough-caption strong { display: block; font-size: 14px; line-height: 1.4; letter-spacing: -.2px; }
.walkthrough-caption p { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.demo-controls { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.demo-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 15px; border: 1px solid color-mix(in srgb, var(--game-accent) 19%, white); border-radius: 99px; color: var(--game-accent); background: #fffdfb; font-size: 11px; line-height: 1.2; }
.demo-controls .demo-play { min-width: 92px; border-color: transparent; color: white; background: var(--game-accent); }
.demo-controls .demo-next { margin-left: auto; }
.demo-controls button:hover { filter: brightness(.96); }
.demo-controls svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.demo-play svg { fill: currentColor; stroke-width: 0; }
.demo-play .pause-icon { display: none; fill: none; stroke: currentColor; stroke-width: 2; }
.walkthrough[data-playing="true"] .demo-play .play-icon { display: none; }
.walkthrough[data-playing="true"] .demo-play .pause-icon { display: block; }
.motion-note { margin-top: 13px; padding: 10px 12px; border-radius: 12px; color: var(--muted); background: #ffffff80; font-size: 10px; }
.game-instructions { padding-block: 80px 90px; border-block: 1px solid var(--line); background: var(--paper); }
.instructions-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 100px; align-items: start; }
.instructions-intro h2 { margin-top: 16px; font-size: 43px; }
.instruction-overview { max-width: 370px; margin-top: 23px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.game-control-note { margin-top: 29px; padding-top: 23px; border-top: 1px solid var(--line); }
.game-control-note h3, .game-tip h3 { font-size: 14px; letter-spacing: -.2px; }
.game-control-note p, .game-tip p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.game-tip { display: flex; align-items: start; gap: 13px; margin-top: 25px; padding: 21px; border-radius: 21px; background: var(--game-bg); }
.game-tip > span { color: var(--game-accent); font-size: 22px; line-height: 1; }
.game-tip p { margin-top: 8px; font-size: 12px; }
.instruction-steps { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.instruction-step { display: flex; gap: 19px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 24px; text-decoration: none; transition: background .2s, border-color .2s; }
.instruction-step:hover { border-color: var(--game-accent); }
.instruction-step[aria-current="step"] { border-color: color-mix(in srgb, var(--game-accent) 55%, white); background: var(--game-bg); }
.instruction-number { display: grid; place-items: center; width: 33px; height: 33px; flex-shrink: 0; border: 1px solid color-mix(in srgb, var(--game-accent) 30%, white); border-radius: 50%; color: var(--game-accent); font-size: 10px; font-variant-numeric: tabular-nums; }
.instruction-step[aria-current="step"] .instruction-number { border-color: transparent; color: white; background: var(--game-accent); }
.instruction-title { margin-top: 3px; font-size: 17px; line-height: 1.4; letter-spacing: -.3px; }
.instruction-body { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.instruction-preview { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--game-accent); font-size: 10px; font-weight: 650; }
.instruction-preview > span { font-size: 16px; line-height: 1; }
.more-worlds { padding-block: 65px 75px; }
.more-worlds-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 29px; }
.more-worlds-heading h2 { margin-top: 12px; font-size: 35px; letter-spacing: -1.5px; }
.more-worlds-heading .text-link { font-size: 12px; }
.neighbor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.neighbor-game { display: flex; align-items: center; gap: 16px; padding: 21px 23px 21px 13px; border: 1px solid color-mix(in srgb, var(--neighbor-bg) 80%, #d6c5df); border-radius: 24px; background: var(--neighbor-bg); text-decoration: none; transition: transform .2s; }
.neighbor-game:hover { transform: translateY(-3px); }
.neighbor-game > img { width: 110px; height: 83px; object-fit: contain; flex-shrink: 0; }
.neighbor-game small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.neighbor-game strong { display: block; font-size: 20px; line-height: 1.2; letter-spacing: -.5px; }
.neighbor-game > span > span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.neighbor-arrow { margin-left: auto; color: var(--muted); font-size: 22px; }

/* Drawn in SVG units so the movements follow the board at every screen size. */
.scene-kicker, .scene-note, .scene-rule, .scene-stars { text-anchor: middle; fill: var(--game-accent); }
.scene-kicker { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.scene-note { font-size: 11px; }
.scene-rule { font-size: 12px; font-weight: 750; letter-spacing: 1px; }
.scene-stars { font-size: 23px; }
.scene-orbit { fill: none; stroke: var(--game-accent); stroke-width: 1; opacity: .12; }
.scene-pill { fill: white; fill-opacity: .75; }
.demo-draw { fill: none; stroke-dasharray: 10000; stroke-dashoffset: 10000; stroke-linecap: round; stroke-linejoin: round; }
.stroke-terrain, .stroke-line { fill: none; stroke: var(--game-accent); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.stroke-terrain { opacity: .17; }
.stroke-junction { fill: var(--game-accent); stroke: var(--game-bg); stroke-width: 4; }
.traveler-halo { fill: var(--rose); opacity: .15; }
.traveler-dot { fill: var(--rose); stroke: white; stroke-width: 3; }
.connection-line { stroke-width: 14; }
.memory-tile { fill: #e6d9ec; stroke: #d0bfe0; stroke-width: 1; }
.memory-tile.is-active { fill: #6941b5; stroke: #6941b5; }
.memory-check { fill: none; stroke: white; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.demo-tap { transform-box: fill-box; transform-origin: center; animation: touch-ripple 1.6s ease-out infinite; animation-play-state: paused; }
.demo-tap circle { fill: none; stroke: #6941b5; stroke-width: 2; }
.word-chip { fill: var(--game-accent); fill-opacity: .13; }
.word-target { font-weight: 750; }
.word-letter { text-anchor: middle; fill: var(--game-accent); font-size: 15px; font-weight: 650; }
.word-trail { stroke: var(--game-accent); stroke-width: 26; opacity: .22; }
.word-first { fill: none; stroke: var(--game-accent); stroke-width: 2; }
.definition-word { font-weight: 750; font-size: 10px; }
.definition-meaning { fill: var(--ink); font-size: 11px; }
.demo-answer { fill: white; stroke: #e7dfe6; stroke-width: 1; }
.demo-answer.is-active { fill: #e7f3e9; stroke: #176b35; stroke-width: 2; }
.answer-check { fill: none; stroke: #176b35; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.garden-trail { stroke: #f6d78b; stroke-width: 3; opacity: .55; }
.garden-gate { opacity: .45; }
.garden-gate.is-complete { opacity: 1; filter: drop-shadow(0 0 6px #f6d78b66); }
.demo-bug { animation: garden-patrol 2.8s linear infinite alternate; animation-play-state: paused; }
.walkthrough[data-playing="true"] .demo-bug, .walkthrough[data-playing="true"] .demo-tap { animation-play-state: running; }
@keyframes garden-patrol { from { transform: translateX(0); } to { transform: translateX(80px); } }
@keyframes touch-ripple { from { transform: scale(.8); opacity: .7; } to { transform: scale(1.32); opacity: 0; } }
@media (max-width: 1100px) {
  .world-links { gap: 24px; }
  .world-links a { font-size: 11px; }
  .game-intro-layout { gap: 45px; }
  .game-intro-copy h1 { font-size: 63px; }
  .game-page-tagline { font-size: 21px; }
  .walkthrough { padding-inline: 22px; }
  .walkthrough-topline { font-size: 7px; }
  .demo-kind { font-size: 7px; }
  .instructions-layout { gap: 60px; }
  .instruction-step { gap: 15px; padding: 20px; }
  .neighbor-game { gap: 10px; padding-right: 17px; }
  .neighbor-game > img { width: 90px; }
  .neighbor-game strong { font-size: 18px; }
}
@media (max-width: 820px) {
  .game-page-hero { padding-block: 48px 60px; }
  .game-intro-layout { gap: 35px; grid-template-columns: .92fr 1.08fr; }
  .game-intro-copy h1 { font-size: 52px; }
  .game-page-tagline { font-size: 20px; }
  .game-page-description { font-size: 14px; }
  .game-facts { gap: 6px; margin-block: 22px 25px; }
  .game-facts li { font-size: 9px; padding: 4px 8px; }
  .walkthrough { padding: 19px 17px 17px; border-radius: 28px; }
  .walkthrough-topline { flex-wrap: wrap; gap: 4px; }
  .demo-kind { margin-left: auto; }
  .demo-board { padding-bottom: 10px; }
  .walkthrough-caption { gap: 10px; min-height: 105px; }
  .walkthrough-caption strong { font-size: 12px; }
  .walkthrough-caption p { font-size: 10px; }
  .demo-position { font-size: 9px; }
  .demo-controls { gap: 5px; }
  .demo-controls button { gap: 4px; padding: 9px 10px; font-size: 10px; }
  .demo-controls .demo-play { min-width: 71px; }
  .demo-controls svg { width: 13px; height: 13px; }
  .game-instructions { padding-block: 65px; }
  .instructions-layout { gap: 40px; grid-template-columns: .85fr 1.15fr; }
  .instructions-intro h2 { font-size: 36px; }
  .instruction-overview { font-size: 14px; }
  .instruction-title { font-size: 15px; }
  .instruction-body { font-size: 12px; }
  .instruction-step { gap: 12px; padding: 18px; border-radius: 20px; }
  .instruction-number { width: 28px; height: 28px; font-size: 9px; }
  .game-control-note p { font-size: 12px; }
  .game-tip { padding: 17px; gap: 10px; }
  .game-tip p { font-size: 11px; }
  .more-worlds-heading h2 { font-size: 31px; }
  .neighbor-grid { gap: 15px; }
  .neighbor-game { flex-wrap: wrap; padding: 18px; gap: 7px; }
  .neighbor-game > img { width: 87px; height: 66px; }
  .neighbor-game > span:not(.neighbor-arrow) { width: calc(100% - 100px); }
  .neighbor-game > span > span { font-size: 10px; }
  .neighbor-arrow { display: none; }
  .neighbor-game strong { font-size: 17px; }
}
@media (max-width: 640px) {
  .world-links { gap: 24px; }
  .world-links a { min-height: 53px; font-size: 11px; }
  .game-page-hero { padding-block: 37px 53px; }
  .game-intro-layout { grid-template-columns: 1fr; gap: 32px; }
  .game-intro-copy { padding: 0; }
  .game-intro-copy .eyebrow { font-size: 9px; }
  .game-intro-copy h1 { max-width: 470px; margin-top: 16px; font-size: clamp(51px, 11.5vw, 65px); }
  .game-page-tagline { margin-top: 18px; font-size: 22px; }
  .game-page-description { max-width: 440px; margin-top: 18px; font-size: 15px; }
  .game-facts { max-width: 440px; margin-block: 22px 24px; }
  .game-facts li { font-size: 9px; padding: 5px 9px; }
  .game-button { min-height: 50px; padding: 13px 22px; font-size: 12px; }
  .game-intro-note { margin-top: 13px; font-size: 9px; }
  .walkthrough { width: 100%; max-width: 470px; justify-self: center; padding: 20px 19px; border-radius: 28px; }
  .walkthrough-topline { font-size: 7px; }
  .demo-kind { font-size: 7px; }
  .demo-board { padding-block: 6px 10px; }
  .demo-svg { max-width: 330px; }
  .walkthrough-caption { gap: 12px; min-height: 88px; padding-top: 16px; }
  .walkthrough-caption strong { font-size: 13px; }
  .walkthrough-caption p { font-size: 11px; }
  .demo-position { font-size: 9px; }
  .demo-controls { gap: 7px; margin-top: 13px; }
  .demo-controls button { gap: 6px; padding: 10px 12px; font-size: 10px; }
  .demo-controls .demo-play { min-width: 82px; }
  .demo-controls svg { width: 14px; height: 14px; }
  .motion-note { font-size: 9px; }
  .game-instructions { padding-block: 53px; }
  .instructions-layout { grid-template-columns: 1fr; gap: 29px; }
  .instructions-intro h2 { margin-top: 13px; font-size: 40px; }
  .instruction-overview { max-width: 440px; margin-top: 20px; font-size: 14px; }
  .game-control-note { margin-top: 24px; padding-top: 21px; }
  .game-control-note p { font-size: 13px; }
  .game-tip { margin-top: 22px; padding: 20px; }
  .game-tip p { font-size: 12px; }
  .instruction-step { gap: 14px; padding: 20px 18px; border-radius: 22px; }
  .instruction-number { width: 30px; height: 30px; }
  .instruction-title { font-size: 16px; }
  .instruction-body { font-size: 13px; }
  .instruction-preview { margin-top: 10px; font-size: 10px; }
  .more-worlds { padding-block: 48px 52px; }
  .more-worlds-heading { display: block; margin-bottom: 21px; }
  .more-worlds-heading h2 { font-size: 32px; }
  .more-worlds-heading .text-link { margin-top: 12px; }
  .neighbor-grid { grid-template-columns: 1fr; gap: 12px; }
  .neighbor-game { flex-wrap: nowrap; gap: 10px; padding: 17px 20px 17px 10px; border-radius: 22px; }
  .neighbor-game > img { width: 92px; height: 78px; }
  .neighbor-game > span:not(.neighbor-arrow) { width: auto; }
  .neighbor-game small { font-size: 9px; margin-bottom: 5px; }
  .neighbor-game strong { font-size: 19px; }
  .neighbor-game > span > span { font-size: 10px; }
  .neighbor-arrow { display: block; font-size: 19px; }
}
@media (max-width: 360px) {
  .walkthrough { padding-inline: 15px; }
  .walkthrough-topline { display: block; }
  .demo-kind { margin-top: 5px; }
  .demo-controls { gap: 5px; }
  .demo-controls button { padding-inline: 10px; font-size: 9px; }
  .demo-controls .demo-play { min-width: 72px; }
  .walkthrough-caption { min-height: 99px; }
  .instruction-step { gap: 11px; padding-inline: 15px; }
  .neighbor-game > img { width: 77px; }
  .neighbor-game strong { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-bug, .demo-tap { animation: none !important; }
  .game-button:hover, .neighbor-game:hover { transform: none; }
}
@media (forced-colors: active) {
  .walkthrough, .instruction-step, .demo-controls button { border: 1px solid ButtonText; }
  .instruction-step[aria-current="step"] { outline: 2px solid Highlight; }
}
