* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; color: var(--text); background: var(--canvas); font: 1rem/1.6 var(--font-body); }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
button, a { transition: background-color var(--duration), color var(--duration); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
button:active { transform: translateY(1px); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: var(--title-section); }
p + p { margin-top: 1rem; }
[hidden] { display: none !important; }
.skip { position: fixed; top: 1rem; left: 1rem; transform: translateY(-200%); z-index: 5; padding: .75rem 1rem; background: var(--action); color: var(--ink); }
.skip:focus { transform: translateY(0); }
.masthead { max-width: 1440px; margin: auto; min-height: 120px; padding: 1.5rem var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.brand { display: flex; align-items: center; gap: .65rem; min-height: 44px; text-decoration: none; font: 700 1.85rem/1.2 var(--font-title); letter-spacing: -.045em; }
.masthead nav a { display: inline-flex; align-items: center; gap: 1.5rem; min-height: 44px; font-size: 1rem; text-decoration: none; }
.masthead nav span { color: var(--action); font-size: 1.4rem; }
.nav-end { justify-self: end; }
main { max-width: var(--page-width); margin-inline: auto; padding-inline: var(--gutter); }
.playfield { display: grid; grid-template-columns: 1.08fr 1fr; grid-template-rows: auto 1fr auto; gap: 1.5rem 2.5rem; padding: 1.5rem; border-radius: var(--radius-field); background: var(--surface); }
.welcome { grid-column: 2; grid-row: 1; padding: .5rem .5rem .5rem 1rem; }
.welcome .product { color: var(--action); font-weight: 700; margin-bottom: .5rem; }
.welcome h1 { font-size: var(--title-large); margin-bottom: .75rem; }
.welcome > p:last-child { color: var(--text-muted); }
.temple { grid-column: 1; grid-row: 1 / 3; align-self: end; min-width: 0; }
.temple-art { border-radius: 7rem .5rem .5rem .5rem; overflow: hidden; }
.temple-art img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.temple-caption { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: 1.25rem .25rem .25rem; }
.temple-caption h2 { font-size: var(--title-game); }
.temple-caption p { font-size: .9375rem; color: var(--text-muted); margin-top: .4rem; }
.play-main { flex-shrink: 0; background: var(--play-background); color: var(--play-text); border: 0; border-radius: .25rem; min-height: 52px; padding: .7rem 1.4rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.play-main:hover, .play-attached:hover { background: var(--action-hover); }
.play-main span, .play-attached span, .play-strip span { font-size: .8rem; }
.pocket-pair { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1.25rem; }
.pocket { display: grid; grid-template-columns: 1fr auto; column-gap: .5rem; min-width: 0; }
.pocket img { grid-column: 1 / -1; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-art); margin-bottom: .65rem; }
.pocket h2 { font-size: 1.125rem; align-self: center; }
.play-small { display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem; border: 0; background: transparent; color: var(--action); min-height: 44px; padding: .35rem 0 .35rem .25rem; font-weight: 700; }
.play-small:hover { color: var(--white); }
.field-note { grid-column: 1 / -1; color: var(--text-muted); font-size: .9375rem; display: flex; align-items: baseline; gap: .75rem; padding: 0 .25rem; }
.field-note span { color: var(--action); font-size: 1.4rem; }
.word-connection { margin: 0 1.5rem 3.5rem; display: grid; grid-template-columns: .85fr 1.15fr; gap: 4rem; padding-top: 2rem; }
.start-note { padding: 1.5rem 0 0 1rem; }
.step-mark { color: var(--action); font-size: 1.25rem; margin-bottom: .75rem; }
.start-note h2 { margin-bottom: 1rem; }
.start-note p { color: var(--text-muted); max-width: 44ch; }
.start-note a { display: inline-flex; align-items: center; min-height: 44px; gap: 1rem; margin-top: 1rem; }
.word { background: var(--action); color: var(--ink); border-radius: 0 0 var(--radius-field) var(--radius-field); padding: 1.5rem; margin-top: -2rem; }
.word-art { width: 80%; margin: 0 auto; }
.word-art img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0 0 3rem .5rem; }
.word-caption { display: grid; gap: 1.25rem; padding: 1.25rem 0 0; }
.word-caption h2 { font-size: var(--title-game); }
.word-caption p { margin-top: .4rem; }
.play-attached { display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid currentColor; color: var(--ink); background: var(--action); padding: .85rem 0 0; font-weight: 700; min-height: 48px; }
.word button:focus-visible, .memory button:focus-visible, .memory a:focus-visible { outline-color: var(--ink); }
.match-and-memory { display: grid; grid-template-columns: 1.65fr 1fr; gap: 2rem; align-items: start; }
.match-field { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1.5rem; padding-top: 2rem; }
.match-heading { grid-column: 1 / -1; padding-left: 1rem; }
.match-heading p { color: var(--text-muted); margin-top: .5rem; }
.match { min-width: 0; }
.match img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.classic { background: var(--surface-raised); padding: 1rem; border-radius: .5rem; }
.classic h3 { font-size: 1.25rem; margin-bottom: .9rem; }
.classic img { border-radius: .25rem; }
.play-strip { border: 0; display: flex; align-items: center; justify-content: space-between; width: 100%; background: transparent; color: var(--white); padding: 1rem 0 .15rem; font-weight: 700; min-height: 44px; text-align: left; gap: .75rem; }
.play-strip:hover { color: var(--action); }
.jelly { padding-top: 4rem; }
.jelly img { border-radius: 4rem .5rem .5rem .5rem; }
.jelly-caption { padding-top: 1rem; }
.jelly h3 { font-size: 1.25rem; }
.jelly .play-small { width: 100%; }
.match-note { grid-column: 1 / -1; color: var(--text-muted); font-size: .9375rem; padding: 0 1rem; }
.memory { background: var(--surface-quiet); color: var(--text-on-light); padding: 2rem; border-radius: var(--radius-field) var(--radius-field) .5rem .5rem; }
.memory-symbol { display: block; font: 2.5rem/1 var(--font-title); margin-bottom: .75rem; }
.memory h2 { margin-bottom: 1.25rem; }
.memory p { font-size: .9375rem; }
.preference-choices { display: grid; gap: .65rem; margin-block: 1.5rem 1rem; }
.preference-choices button { text-align: left; min-height: 62px; padding: .65rem .8rem .65rem 2.5rem; border: 1px solid var(--pine-700); border-radius: .25rem; background: transparent; color: var(--ink); font-weight: 700; position: relative; }
.preference-choices button::before { position: absolute; content: ''; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 50%; left: 1rem; top: 1rem; }
.preference-choices button[aria-pressed=true] { background: var(--pine-950); color: var(--white); }
.preference-choices button[aria-pressed=true]::before { background: var(--action); border-color: var(--action); box-shadow: inset 0 0 0 3px var(--pine-950); }
.preference-choices button:hover { border-width: 2px; padding: calc(.65rem - 1px) calc(.8rem - 1px) calc(.65rem - 1px) calc(2.5rem - 1px); }
.preference-choices button span { display: block; font-weight: 400; font-size: .875rem; margin-top: .15rem; }
.memory .storage-status { font-weight: 700; }
.memory .storage-detail { margin-top: 1rem; }
.recent { border-left: 4px solid var(--action); padding: 1.5rem 0 0 1rem; margin-top: 1rem; }
.recent h2 { font-size: 1.375rem; }
.recent-heading p { margin-top: .5rem; font-size: .875rem; color: var(--text-muted); }
.recent ol { list-style: none; padding: 0; margin: .75rem 0 0; }
.recent li + li { margin-top: .5rem; }
.recent button { display: grid; grid-template-columns: 64px 1fr; gap: 0 .75rem; align-items: center; border: 0; width: 100%; padding: .65rem; text-align: left; color: var(--white); background: var(--surface); border-radius: .25rem; }
.recent button:hover { background: var(--surface-raised); }
.recent img { grid-row: span 2; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; }
.recent button > span { font-size: .9375rem; line-height: 1.3; }
.recent .replay-cue { font-size: .8125rem; color: var(--action); padding-top: .3rem; }
.flight-field { margin-top: 3.5rem; }
.flight { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface-raised); border-radius: var(--radius-field) .5rem .5rem .5rem; overflow: hidden; }
.flight-art img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.flight-caption { padding: 2rem 2.5rem; display: flex; flex-direction: column; align-items: start; justify-content: center; }
.flight-caption > p { color: var(--text-muted); margin-bottom: .75rem; }
.flight-caption h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); margin-bottom: 1.5rem; }
.exit-note { display: flex; gap: 1.25rem; padding: 1.5rem 2rem; margin-left: 20%; background: var(--surface); border-radius: 0 0 1rem 1rem; }
.close-example { color: var(--action); font-size: 2.5rem; line-height: 1; }
.exit-note h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.exit-note p { color: var(--text-muted); font-size: .9375rem; }
.provider { display: grid; grid-template-columns: 1fr 1.9fr; gap: 3rem; padding: 3rem 1rem; }
.provider-title { display: flex; gap: 1rem; align-items: start; }
.connection-symbol { font-size: 2rem; color: var(--action); line-height: 1; }
.provider h2 { font-size: 1.5rem; }
.provider p { color: var(--text-muted); font-size: .9375rem; }
.provider a { color: var(--white); }
.no-script { padding: 2rem; background: var(--surface); }
.footer { max-width: 1440px; margin: 0 auto; padding: 2rem var(--gutter); display: grid; grid-template-columns: 1fr auto; column-gap: 2rem; background: var(--surface); border-radius: 2rem 2rem 0 0; }
.footer-brand { display: inline-flex; align-items: center; min-height: 44px; font: 700 1.35rem var(--font-title); text-decoration: none; }
.footer p, .footer small { color: var(--text-muted); font-size: .875rem; }
.footer p { margin-top: .5rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; align-items: center; }
.footer nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .875rem; }
.footer small { grid-column: 1 / -1; margin-top: 1rem; }
.playing { overflow: hidden; }
.player { width: min(1160px, calc(100% - 40px)); max-width: none; height: min(880px, calc(100dvh - 48px)); max-height: none; padding: 0; border: 0; border-radius: .75rem; color: var(--white); background: var(--canvas); overflow: hidden; }
.player[open] { display: flex; flex-direction: column; }
.player::backdrop { background: rgb(0 20 17 / .85); }
.player-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; flex-shrink: 0; }
.player-toolbar h2 { font-size: 1.25rem; }
.player-toolbar button { background: var(--action); color: var(--ink); min-height: 44px; border: 0; border-radius: .25rem; padding: .5rem 1rem; flex-shrink: 0; font-weight: 700; }
.player-toolbar button span { margin-left: .75rem; font-size: 1.3rem; }
.player iframe { width: 100%; border: 0; flex: 1; min-height: 0; background: var(--white); }
.player-help { flex-shrink: 0; display: flex; justify-content: space-between; gap: .5rem 1rem; align-items: center; padding: .5rem 1rem; font-size: .875rem; }
.player-help p { color: var(--text-muted); }
.player-help a { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.legal-main { max-width: 920px; padding-top: 2rem; padding-bottom: 4rem; }
.legal-heading { background: var(--surface-raised); padding: 2rem; border-radius: 1.5rem; margin-bottom: 2rem; }
.legal-heading h1 { font-size: clamp(2rem, 4vw, 3rem); }
.legal-heading > p { color: var(--text-muted); margin-top: 1rem; }
.legal-back { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 1rem; color: var(--action); }
.legal-copy { max-width: 70ch; margin: auto; }
.legal-copy section { margin-top: 2rem; }
.legal-copy h2 { font-size: 1.5rem; margin-bottom: .8rem; }
.legal-copy p, .legal-copy li { color: var(--text-muted); }
.legal-copy li + li { margin-top: .6rem; }
.legal-copy a { color: var(--white); }
.legal-copy code { overflow-wrap: anywhere; color: var(--white); font-size: .9375rem; }
.legal-copy .memory { margin-block: 2rem; }
.legal-copy .memory p { color: var(--ink); }
@media (min-width: 1600px) { .masthead { min-height: 144px; } main { padding-inline: 2rem; } }
@media (max-width: 1100px) {
  .playfield { gap: 1.5rem; }
  .pocket { grid-template-columns: 1fr; }
  .pocket .play-small { justify-content: space-between; }
  .temple-caption { flex-wrap: wrap; }
  .temple-caption .play-main { width: 100%; }
  .welcome { padding-left: 0; }
  .word-connection { gap: 2rem; }
  .match-and-memory { grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }
  .match-field { gap: 1rem; }
  .memory { padding: 1.5rem; }
  .footer { grid-template-columns: 1fr; }
  .footer nav { margin-top: 1rem; }
}
@media (max-width: 850px) {
  .masthead { min-height: 130px; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; padding-block: 1rem; }
  .brand { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .nav-start { grid-column: 1; grid-row: 2; }
  .nav-end { grid-column: 2; grid-row: 2; }
  .playfield { grid-template-columns: 1.15fr 1fr; }
  .welcome h1 { font-size: 2rem; }
  .welcome > p:last-child br { display: none; }
  .temple { grid-row: 1; align-self: center; }
  .temple-art { border-top-left-radius: 3rem; }
  .pocket-pair { grid-column: 1 / -1; grid-row: 2; gap: 1.5rem; }
  .pocket { grid-template-columns: 1fr auto; }
  .pocket img { grid-column: 1; grid-row: 1 / 3; width: 42%; margin: 0 1rem 0 0; }
  .pocket { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
  .pocket h2 { width: calc(58% - 1rem); }
  .pocket .play-small { width: 100%; padding: .5rem 0 0; }
  .field-note { font-size: .875rem; }
  .word-connection { margin-inline: 1rem; grid-template-columns: 1fr 1.15fr; gap: 1.5rem; }
  .start-note { padding-left: 0; }
  .word { padding: 1.25rem; }
  .word-art { width: 100%; }
  .match-and-memory { grid-template-columns: 1fr; }
  .match-field { gap: 1.5rem; padding-top: 0; }
  .jelly { padding-top: 3rem; }
  .memory-column { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; }
  .memory-column:not(:has(.recent:not([hidden]))) { grid-template-columns: 1fr; }
  .memory-column:not(:has(.recent:not([hidden]))) .memory { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
  .memory-column:not(:has(.recent:not([hidden]))) .memory-symbol { display: none; }
  .memory-column:not(:has(.recent:not([hidden]))) .memory h2 { grid-row: 1; margin-bottom: 0; }
  .memory-column:not(:has(.recent:not([hidden]))) .memory > p:first-of-type { grid-column: 1; grid-row: 2 / 4; }
  .memory-column:not(:has(.recent:not([hidden]))) .memory > p:nth-of-type(2) { grid-column: 1; }
  .memory-column:not(:has(.recent:not([hidden]))) .preference-choices { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: start; }
  .recent { margin-top: 0; }
  .flight-caption { padding: 1.5rem; }
  .flight-art img { min-height: 280px; }
  .exit-note { margin-left: 10%; padding: 1.5rem; }
  .provider { grid-template-columns: 1fr 1.5fr; gap: 1.5rem; }
}
@media (max-width: 600px) {
  .masthead { min-height: 130px; }
  .brand { font-size: 1.7rem; }
  .brand img { width: 36px; height: 36px; }
  .masthead nav a { gap: .75rem; font-size: .875rem; }
  main { padding-inline: 1rem; }
  .playfield { padding: 1rem; grid-template-columns: 1fr; gap: 1.5rem; }
  .welcome { grid-column: 1; grid-row: 1; padding: .25rem 0 0; }
  .welcome .product { font-size: .9375rem; margin-bottom: .35rem; }
  .welcome h1 { font-size: 1.875rem; margin-bottom: .5rem; }
  .welcome h1 br { display: none; }
  .welcome > p:last-child { font-size: .9375rem; }
  .temple { grid-row: 2; }
  .temple-caption { flex-wrap: nowrap; gap: .75rem; padding-top: 1rem; }
  .temple-caption h2 { font-size: 1.25rem; }
  .temple-caption p { display: none; }
  .temple-caption .play-main { width: auto; min-height: 48px; gap: .75rem; padding-inline: .8rem; }
  .pocket-pair { grid-row: 3; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pocket { display: block; }
  .pocket img { width: 100%; margin: 0 0 .75rem; }
  .pocket h2 { width: 100%; font-size: 1rem; min-height: 2.3em; }
  .pocket .play-small { padding: .5rem 0 0; font-size: .9375rem; }
  .field-note { gap: .5rem; }
  .word-connection { margin: 0 0 2.5rem; display: flex; flex-direction: column; gap: 0; padding-top: 0; }
  .start-note { padding: 1.5rem 1rem; }
  .start-note h2 { font-size: 1.5rem; }
  .start-note h2 br { display: none; }
  .step-mark { float: right; margin-left: 1rem; }
  .start-note p { font-size: .9375rem; }
  .word { margin-top: 0; display: grid; grid-template-columns: .85fr 1fr; gap: 1rem; border-radius: .5rem 2.5rem .5rem .5rem; padding: 1rem; align-items: center; }
  .word-art img { border-radius: .25rem; }
  .word-caption { padding-top: 0; gap: .5rem; }
  .word-caption h2 { font-size: 1.25rem; }
  .word-caption p { font-size: .875rem; }
  .play-attached { font-size: .875rem; gap: .5rem; padding-top: .5rem; }
  .match-field { gap: 1rem; }
  .match-heading { padding-left: 0; }
  .match-heading h2 { font-size: 1.5rem; }
  .match-heading p { font-size: .9375rem; }
  .classic { padding: .65rem; }
  .classic h3, .jelly h3 { font-size: 1.125rem; }
  .play-strip { font-size: .875rem; flex-wrap: wrap; }
  .jelly { padding-top: 2rem; }
  .jelly img { border-top-left-radius: 2rem; }
  .match-note { padding-inline: 0; }
  .memory-column, .memory-column:not(:has(.recent:not([hidden]))) { display: flex; flex-direction: column; gap: 1.25rem; }
  .memory, .memory-column:not(:has(.recent:not([hidden]))) .memory { display: block; padding: 1.5rem; width: 100%; }
  .memory h2, .memory-column:not(:has(.recent:not([hidden]))) .memory h2 { margin-bottom: 1rem; }
  .memory h2 br { display: none; }
  .memory-symbol { display: none; }
  .memory-column:not(:has(.recent:not([hidden]))) .preference-choices { margin-block: 1.5rem 1rem; }
  .recent { width: 100%; border-left: 0; border-top: 4px solid var(--action); padding: 1rem 0 0; }
  .recent ol { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .recent li + li { margin: 0; }
  .recent button { grid-template-columns: 1fr; height: 100%; align-content: start; }
  .recent img { display: none; }
  .recent .replay-cue { padding-top: .5rem; }
  .flight-field { margin-top: 2.5rem; }
  .flight { display: flex; flex-direction: column; }
  .flight-art img { min-height: 0; aspect-ratio: 4/3; height: auto; }
  .flight-caption { padding: 1.5rem; }
  .flight-caption h2 { font-size: 1.75rem; margin-bottom: 1rem; }
  .flight-caption .play-main { width: 100%; }
  .exit-note { margin-left: 1rem; padding: 1.25rem; gap: .75rem; }
  .provider { grid-template-columns: 1fr; padding: 2.5rem 0; gap: 1.25rem; }
  .provider-title { gap: .75rem; }
  .provider h2 br { display: none; }
  .footer { padding: 1.75rem 1.5rem; border-radius: 1.5rem 1.5rem 0 0; }
  .footer nav { gap: .25rem 1.25rem; }
  .player { width: calc(100% - 16px); height: calc(100dvh - 24px); border-radius: .5rem; }
  .player-toolbar { gap: .5rem; padding: .65rem; }
  .player-toolbar h2 { font-size: 1rem; overflow-wrap: anywhere; }
  .player-toolbar button { font-size: .875rem; padding-inline: .6rem; }
  .player-toolbar button span { margin-left: .25rem; }
  .player-help { display: block; padding: .65rem; }
  .player-help p { font-size: .8125rem; }
  .legal-main { padding-top: 1rem; }
  .legal-heading { padding: 1.5rem; }
  .legal-copy { padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
