:root {
  --ink: #171B35;
  --blue: #4E5BEE;
  --mint: #C3F06B;
  --pink: #FFA2CF;
  --cream: #F6F5EF;
  --heading: "Bungee", Impact, sans-serif;
  --body: "Rubik", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 14px/1.6 var(--body); }
body.game-open { overflow: hidden; }
body, button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
::selection { background: var(--pink); color: var(--ink); }
.container { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.eyebrow { font-size: 9px; line-height: 1.5; font-weight: 600; letter-spacing: .055em; }
.skip-link { position: fixed; z-index: 25; top: 10px; left: 10px; padding: 11px 17px; border: 2px solid var(--ink); border-radius: 8px; background: var(--mint); color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header { position: relative; z-index: 10; min-height: 84px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px 27px; }
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 218px; height: auto; }
.site-header nav { width: 100%; padding: 12px; margin-bottom: 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); box-shadow: 5px 5px 0 var(--ink); }
.js .site-header nav { position: absolute; top: calc(100% - 4px); right: 0; width: 320px; max-width: 100%; max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; margin: 0; }
.menu-heading { padding: 6px 10px 11px; font-size: 9px; font-weight: 600; letter-spacing: .09em; color: var(--blue); }
.menu-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; font: 500 13px/1.4 var(--body); }
.menu-item > i:first-child { font-size: 18px; color: var(--blue); text-align: center; }
.menu-item > i:last-child { font-size: 11px; text-align: center; }
.menu-item small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; color: rgb(23 27 53 / .7); }
.menu-item:hover, .menu-item:focus-visible, .saved-toggle[aria-pressed="true"] { background: var(--mint); }
.menu-item:focus-visible { outline-offset: -2px; }
.menu-divider { height: 1px; margin: 8px 10px; background: rgb(23 27 53 / .18); }
.saved-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 4px; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 10px; font-weight: 600; }
.menu-toggle { display: none; }
.js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 15px; border: 2px solid var(--ink); border-radius: 8px; background: var(--mint); color: var(--ink); font-size: 12px; font-weight: 500; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--pink); }
.menu-toggle > i { font-size: 11px; transition: transform .15s; }
.menu-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.hero { display: grid; grid-template-columns: 1.17fr 1fr; align-items: center; gap: 27px; min-height: 322px; padding: 29px 39px; overflow: hidden; border: 2px solid var(--ink); border-radius: 16px; background: var(--blue); color: var(--cream); box-shadow: 5px 5px 0 var(--ink); }
.hero-copy > .eyebrow { display: flex; align-items: center; gap: 8px; font-size: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
h1 { margin-top: 15px; font-size: clamp(35px, 3.4vw, 50px); line-height: 1.08; letter-spacing: -.035em; }
h1 > span { color: var(--mint); }
.hero-copy > p:not(.eyebrow) { margin-top: 18px; font-size: 11px; line-height: 1.75; color: rgb(246 245 239 / .88); }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 43px; padding: 10px 19px; border: 2px solid var(--ink); border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.5; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button > i { font-size: 11px; }
.button-mint { background: var(--mint); color: var(--ink); }
.surprise-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 0; border: 0; background: transparent; color: var(--cream); font-size: 11px; font-weight: 500; }
.surprise-button:hover { color: var(--mint); }
.hero a:focus-visible, .hero button:focus-visible { outline-color: var(--mint); }
.hero-art { position: relative; min-width: 0; align-self: center; }
.hero-art > img { width: 100%; max-height: 268px; object-fit: contain; }
.hero-sticker { position: absolute; bottom: 2px; right: 11px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 2px solid var(--ink); border-radius: 5px; background: var(--pink); color: var(--ink); font-size: 9px; font-weight: 700; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); }
.hero-sticker > i { font-size: 12px; }
.game-library { padding-block: 37px 61px; }
.library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.library-heading .eyebrow { font-size: 8px; color: var(--blue); margin-bottom: 8px; }
h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.03em; }
.library-total { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 4px; font-size: 11px; font-weight: 500; }
.library-total > i { font-size: 16px; color: var(--blue); }
.browse-controls { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 23px; }
.category-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.category-filters > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.5; transition: background .15s; }
.category-filters > button > i { font-size: 11px; }
.category-filters > button:hover { background: var(--pink); }
.category-filters > button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.game-search { display: flex; align-items: center; gap: 10px; width: 258px; min-height: 40px; flex-shrink: 0; padding-inline: 13px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--cream); }
.game-search > i { font-size: 12px; }
.game-search input { min-width: 0; width: 100%; height: 37px; padding-block: 9px; border: 0; background: transparent; color: var(--ink); font-size: 11px; line-height: 1.5; }
.game-search input::placeholder { color: rgb(23 27 53 / .7); opacity: 1; }
.results-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 15px; margin-top: 17px; margin-bottom: 16px; }
.results-count { font-size: 10px; color: rgb(23 27 53 / .75); }
.clear-filters { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 500; }
.clear-filters:hover { text-decoration: underline; text-underline-offset: 3px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 24px; }
.game-card { min-width: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); box-shadow: 4px 5px 0 var(--ink); }
.game-cover { display: block; width: 100%; position: relative; padding: 0; border: 0; border-bottom: 2px solid var(--ink); background: var(--blue); color: var(--ink); overflow: hidden; }
.game-cover > img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; transition: transform .2s; }
.game-cover:hover:not(:disabled) > img { transform: scale(1.035); }
.game-cover:focus-visible { outline-offset: -6px; outline-color: var(--cream); }
.cover-label { position: absolute; top: 12px; left: 12px; right: 12px; width: fit-content; max-width: calc(100% - 24px); padding: 4px 7px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--cream); color: var(--ink); font-size: 7px; font-weight: 600; line-height: 1.5; letter-spacing: .025em; }
.play-overlay { position: absolute; bottom: 13px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding-left: 2px; border: 2px solid var(--ink); border-radius: 50%; background: var(--mint); color: var(--ink); font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.game-cover:hover:not(:disabled) .play-overlay { background: var(--pink); }
.card-content { padding: 17px 20px 14px; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-meta > span:last-child { font-size: 8px; line-height: 1.5; color: rgb(23 27 53 / .75); }
.category-tag { display: inline-flex; align-items: center; min-height: 19px; padding: 3px 6px; border-radius: 4px; background: var(--mint); color: var(--ink); font-size: 7px; font-weight: 600; line-height: 1.4; }
.category-tag.tag-pink { background: var(--pink); }
.category-tag.tag-blue { background: var(--blue); color: var(--cream); }
.game-card h3 { margin-top: 12px; font-size: 19px; line-height: 1.3; letter-spacing: -.035em; }
.game-card p { margin-top: 6px; font-size: 11px; line-height: 1.6; color: rgb(23 27 53 / .75); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; }
.play-link { display: inline-flex; align-items: center; gap: 17px; min-height: 31px; padding: 6px 0; border: 0; background: transparent; color: var(--ink); font-size: 11px; font-weight: 600; }
.play-link > i { font-size: 10px; }
.play-link:hover:not(:disabled) { color: var(--blue); }
.play-link:disabled { opacity: .55; }
.save-game { display: grid; place-items: center; width: 31px; height: 31px; border: 1.5px solid var(--ink); border-radius: 7px; background: var(--cream); color: var(--ink); font-size: 12px; }
.save-game:hover, .save-game[aria-pressed="true"] { background: var(--pink); }
.empty-state { padding: 53px 26px; border: 2px dashed var(--ink); border-radius: 12px; text-align: center; background: rgb(195 240 107 / .2); }
.empty-state > i { font-size: 37px; color: var(--blue); }
.empty-state h3 { margin-top: 18px; font-size: 24px; }
.empty-state p { margin-top: 12px; font-size: 13px; }
.empty-state > .button { margin-top: 23px; }
.noscript-note { margin-bottom: 20px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 8px; background: var(--pink); font-size: 13px; }
.how-to { position: relative; display: grid; grid-template-columns: .95fr 1.4fr; gap: 66px; padding: 38px 40px; margin-bottom: 64px; border: 2px solid var(--ink); border-radius: 13px; background: var(--mint); box-shadow: 5px 5px 0 var(--ink); overflow: hidden; }
.how-to .eyebrow { font-size: 8px; margin-bottom: 11px; }
.how-to h2 { font-size: 28px; }
.how-to > div > p:not(.eyebrow) { margin-top: 15px; font-size: 12px; }
.how-to ol { position: relative; z-index: 1; display: grid; gap: 19px; margin: 0; padding: 0; list-style: none; }
.how-to li { display: flex; align-items: flex-start; gap: 15px; }
.how-to li > span { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 9px; background: var(--cream); font-family: var(--heading); font-size: 13px; }
.how-to h3 { font-family: var(--body); font-size: 15px; font-weight: 600; line-height: 1.4; }
.how-to li p { margin-top: 5px; font-size: 11px; color: rgb(23 27 53 / .8); }
.how-decoration { position: absolute; right: -14px; bottom: -28px; color: rgb(23 27 53 / .1); font-size: 148px; line-height: 1; transform: rotate(-18deg); }
.site-footer { background: var(--ink); color: var(--cream); padding-block: 37px 25px; }
.site-footer a:focus-visible { outline-color: var(--mint); }
.footer-main { display: grid; grid-template-columns: 1.05fr 1fr 1fr; align-items: center; gap: 40px; padding-bottom: 30px; }
.footer-brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.footer-brand > img { width: 44px; height: 44px; }
.footer-brand > span { font: 400 24px/1.25 var(--heading); letter-spacing: -.025em; }
.footer-brand small { display: block; margin-top: 6px; font: 400 6px/1.5 var(--body); letter-spacing: .09em; }
.footer-main > p { font-size: 11px; color: rgb(246 245 239 / .72); }
.footer-main nav { display: flex; flex-wrap: wrap; gap: 13px 21px; justify-content: flex-end; font-size: 10px; }
.footer-main nav a > i { margin-left: 5px; font-size: 9px; }
.footer-main nav a:hover { color: var(--mint); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 21px; border-top: 1px solid rgb(246 245 239 / .23); }
.footer-bottom > p { font-size: 9px; color: rgb(246 245 239 / .72); }
.powered-by-credit { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid rgba(17,17,17,.12); border-radius:999px; background:rgba(255,255,255,.94); color:#222; font:600 12px/1.2 Arial,sans-serif; text-decoration:none; box-shadow:0 6px 18px rgba(0,0,0,.08); }
.powered-by-credit:hover { border-color:#ff6a00; color:#ff6a00; }
.powered-by-icon { width:16px; height:16px; border-radius:4px; }
/* Every game runs inside the same accessible native dialog. */
#game-dialog { width: min(760px, calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 27px; overflow-y: auto; overscroll-behavior: contain; border: 3px solid var(--ink); border-radius: 16px; background: var(--cream); color: var(--ink); box-shadow: 7px 7px 0 var(--ink); }
#game-dialog::backdrop { background: rgb(23 27 53 / .76); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.dialog-heading .eyebrow { color: var(--blue); font-size: 8px; margin-bottom: 7px; }
.dialog-heading h2 { font-size: 25px; line-height: 1.3; }
.dialog-close { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 9px; background: var(--pink); color: var(--ink); font-size: 18px; box-shadow: 2px 2px 0 var(--ink); }
.dialog-close:hover { background: var(--mint); }
#game-instructions { max-width: 640px; margin-top: 18px; padding-bottom: 19px; border-bottom: 1px solid rgb(23 27 53 / .25); font-size: 13px; line-height: 1.7; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-top: 19px; margin-bottom: 24px; }
.game-feedback { font-size: 12px; font-weight: 500; }
.game-action { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 9px 15px; border: 2px solid var(--ink); border-radius: 7px; background: var(--mint); color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.4; box-shadow: 2px 2px 0 var(--ink); }
.game-action:hover:not(:disabled) { background: var(--pink); }
.game-action:disabled { opacity: .5; box-shadow: none; }
.game-board { display: grid; gap: 10px; width: min(100%, 408px); margin-inline: auto; }
.memory-board { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 370px; }
.lights-board { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 400px; }
.tic-board, .slide-board { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 340px; }
.simon-board { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 370px; gap: 13px; }
.game-cell { min-width: 0; aspect-ratio: 1; display: grid; place-items: center; padding: 5px; border: 2px solid var(--ink); border-radius: 9px; background: var(--blue); color: var(--cream); font: 400 29px/1 var(--heading); box-shadow: 3px 3px 0 var(--ink); transition: background .13s, color .13s, transform .13s, box-shadow .13s; }
.game-cell:hover:not(:disabled) { transform: translateY(-2px); }
.game-cell:disabled { opacity: .65; box-shadow: none; }
.game-cell.is-revealed { background: var(--pink); color: var(--ink); }
.game-cell.is-matched { background: var(--mint); color: var(--ink); border-style: dashed; opacity: 1; box-shadow: none; }
.lights-board .game-cell { background: var(--ink); color: var(--cream); font-family: var(--body); font-size: 25px; box-shadow: 2px 2px 0 rgb(23 27 53 / .3); }
.lights-board .game-cell.is-lit { background: var(--mint); color: var(--ink); }
.tic-board .game-cell { font-size: 43px; }
.tic-board .game-cell:disabled { opacity: 1; background: rgb(78 91 238 / .14); color: var(--ink); }
.slide-board .game-cell { font-size: 33px; }
.slide-board .game-cell:disabled { opacity: 1; background: rgb(78 91 238 / .18); color: var(--ink); box-shadow: none; }
.slide-board .game-cell.is-empty { border: 2px dashed rgb(23 27 53 / .32); background: transparent; box-shadow: none; }
.simon-pad { min-height: 125px; aspect-ratio: 1.2; font-family: var(--body); font-size: 17px; font-weight: 600; text-align: center; }
.simon-pad.pad-0 { background: var(--mint); color: var(--ink); }
.simon-pad.pad-1 { background: var(--pink); color: var(--ink); }
.simon-pad.pad-2 { background: var(--blue); color: var(--cream); }
.simon-pad.pad-3 { background: var(--cream); color: var(--ink); }
.simon-pad:disabled { opacity: .6; }
.simon-pad.is-active, .simon-pad.is-active:disabled { opacity: 1; transform: translate(3px, 3px) scale(.94); border-width: 5px; outline: 3px solid var(--blue); outline-offset: 3px; box-shadow: 0 0 0 5px var(--cream); }
.game-content { padding-block: 6px 5px; text-align: center; }
.game-prompt { margin-bottom: 24px; font-family: var(--heading); font-size: clamp(25px, 4.5vw, 42px); line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.game-choices { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 13px; margin-block: 17px; }
.game-choice { min-width: 83px; min-height: 58px; padding: 13px 19px; border: 2px solid var(--ink); border-radius: 9px; background: var(--blue); color: var(--cream); font-size: 18px; font-weight: 500; line-height: 1.4; box-shadow: 3px 3px 0 var(--ink); }
.game-choice:hover:not(:disabled) { background: var(--pink); color: var(--ink); }
.game-choice:disabled { opacity: .55; box-shadow: none; }
.game-cell.is-correct, .tic-board .game-cell.is-correct:disabled, .game-choice.is-correct { opacity: 1; background: var(--mint); color: var(--ink); border: 3px solid var(--ink); }
.game-choice.is-wrong { opacity: 1; background: var(--pink); color: var(--ink); border: 3px dashed var(--ink); }
.game-form { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; width: min(100%, 415px); margin: 19px auto; }
.game-form label { flex-basis: 100%; font-size: 12px; font-weight: 500; }
.game-input { min-width: 0; width: 195px; min-height: 45px; padding: 10px 13px; border: 2px solid var(--ink); border-radius: 7px; background: var(--cream); color: var(--ink); text-align: center; font-size: 18px; font-weight: 500; line-height: 1.3; }
.game-input:disabled { background: rgb(23 27 53 / .07); }
.game-hint { font-size: 12px; line-height: 1.65; }
.game-content > .game-action { margin-top: 6px; }
#game-status { min-height: 45px; margin-top: 26px; padding: 13px 15px; border: 1.5px solid rgb(23 27 53 / .25); border-radius: 8px; background: rgb(195 240 107 / .24); font-size: 12px; line-height: 1.6; }
@media (max-width: 1120px) {
  .container { width: calc(100% - 56px); }
  .hero { grid-template-columns: 1.15fr 1fr; gap: 18px; padding-inline: 30px; }
  h1 { font-size: 40px; }
  .hero-art > img { max-height: 250px; }
  .hero-sticker { font-size: 8px; padding-inline: 11px; right: 2px; }
  .game-search { width: 235px; }
  .category-filters { gap: 7px; }
  .category-filters > button { padding-inline: 12px; font-size: 10px; }
  .game-grid { gap: 21px; }
  .card-content { padding: 17px 17px 14px; }
  .game-card h3 { font-size: 17px; }
  .game-meta > span:last-child { font-size: 7px; }
  .game-card p { font-size: 10px; }
  .how-to { gap: 45px; padding-inline: 32px; }
  .footer-main { gap: 30px; }
  .footer-main nav { gap: 12px 17px; }
}
@media (max-width: 850px) {
  .container { width: calc(100% - 44px); }
  .site-header { min-height: 77px; padding-block: 15px; gap: 15px; }
  .brand img { width: 200px; }
  .hero { min-height: 297px; padding: 25px 27px; grid-template-columns: 1.23fr 1fr; gap: 8px; }
  h1 { font-size: 35px; }
  .hero-copy > .eyebrow { font-size: 6px; gap: 6px; }
  .status-dot { width: 6px; height: 6px; }
  .hero-copy > p:not(.eyebrow) { font-size: 10px; }
  .hero-copy > p > br { display: none; }
  .hero-actions { gap: 17px; margin-top: 19px; }
  .hero-actions .button { padding-inline: 15px; font-size: 11px; gap: 16px; }
  .surprise-button { font-size: 10px; gap: 7px; }
  .hero-art > img { max-height: 240px; }
  .hero-sticker { padding: 7px 9px; font-size: 6px; bottom: -5px; right: 3px; gap: 6px; }
  .hero-sticker > i { font-size: 9px; }
  .library-heading { gap: 22px; }
  h2 { font-size: 24px; }
  .library-heading .eyebrow { font-size: 7px; }
  .library-total { max-width: 173px; font-size: 10px; }
  .library-total > i { font-size: 14px; }
  .browse-controls { flex-direction: column; align-items: flex-start; gap: 15px; margin-top: 23px; }
  .category-filters > button { font-size: 11px; padding-inline: 14px; }
  .game-search { width: 100%; max-width: 380px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
  .card-content { padding: 18px 20px 14px; }
  .game-meta > span:last-child { font-size: 8px; }
  .game-card h3 { font-size: 19px; }
  .game-card p { font-size: 11px; }
  .how-to { gap: 37px; padding: 31px; grid-template-columns: .9fr 1.3fr; }
  .how-to h2 { font-size: 25px; }
  .how-to > div > p:not(.eyebrow) { font-size: 11px; }
  .how-to > div > p > br { display: none; }
  .how-to h3 { font-size: 14px; }
  .how-to li { gap: 12px; }
  .how-to li p { font-size: 10px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 23px 30px; }
  .footer-main > p { grid-row: 2; }
  .footer-main nav { grid-column: 2; grid-row: span 2; }
}
@media (max-width: 650px) {
  .hero { grid-template-columns: 1fr; gap: 21px; padding: 30px; }
  .hero-copy > .eyebrow { font-size: 7px; }
  h1 { font-size: 41px; }
  .hero-copy > p:not(.eyebrow) { max-width: 390px; font-size: 11px; }
  .hero-actions { gap: 25px; }
  .hero-actions .button { font-size: 12px; gap: 22px; padding-inline: 19px; }
  .surprise-button { font-size: 11px; }
  .hero-art { width: min(90%, 350px); justify-self: center; }
  .hero-art > img { max-height: 210px; }
  .hero-sticker { bottom: 1px; font-size: 8px; right: -1px; }
  .hero-sticker > i { font-size: 10px; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .library-total { max-width: none; padding-bottom: 0; }
  .card-content { padding-inline: 16px; }
  .game-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .game-card h3 { font-size: 16px; }
  .game-card p { font-size: 10px; }
  .cover-label { top: 10px; left: 10px; font-size: 5px; padding: 4px 5px; }
  .play-overlay { width: 34px; height: 34px; right: 10px; bottom: 10px; font-size: 12px; }
  .how-to { grid-template-columns: 1fr; gap: 30px; padding: 30px; }
  .how-to h2 { font-size: 27px; }
  .how-to h3 { font-size: 15px; }
  .how-to li p { font-size: 11px; }
  .how-decoration { font-size: 140px; }
  .footer-main { display: flex; flex-wrap: wrap; gap: 25px 37px; }
  .footer-main nav { width: 100%; justify-content: flex-start; gap: 16px 28px; }
  #game-dialog { width: calc(100% - 32px); padding: 23px; max-height: calc(100dvh - 32px); }
  .dialog-heading h2 { font-size: 23px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 34px); }
  .site-header { min-height: 74px; padding-block: 14px; }
  .brand img { width: 185px; }
  .hero { padding: 27px 24px 24px; border-radius: 13px; box-shadow: 4px 4px 0 var(--ink); }
  .hero-copy > .eyebrow { font-size: 6px; letter-spacing: .025em; }
  h1 { font-size: clamp(27px, 7.7vw, 39px); line-height: 1.15; margin-top: 17px; }
  .hero-copy > p:not(.eyebrow) { margin-top: 17px; font-size: 10px; line-height: 1.8; }
  .hero-actions { gap: 20px; margin-top: 21px; }
  .hero-actions .button { min-height: 42px; padding-inline: 14px; font-size: 11px; gap: 15px; }
  .surprise-button { font-size: 10px; gap: 7px; }
  .hero-art { width: min(100%, 315px); }
  .hero-art > img { max-height: 190px; }
  .hero-sticker { font-size: 7px; padding-inline: 9px; }
  .game-library { padding-block: 32px 45px; }
  h2 { font-size: 23px; }
  .library-heading .eyebrow { font-size: 6px; }
  .category-filters { gap: 8px; }
  .category-filters > button { min-height: 36px; padding: 8px 12px; font-size: 10px; }
  .category-filters > button > i { font-size: 10px; }
  .game-search { max-width: none; }
  .game-grid { grid-template-columns: 1fr; gap: 26px; }
  .card-content { padding: 20px 22px 16px; }
  .game-meta { flex-direction: row; align-items: center; gap: 10px; }
  .category-tag { font-size: 8px; }
  .game-meta > span:last-child { font-size: 8px; }
  .game-card h3 { font-size: 21px; margin-top: 14px; }
  .game-card p { font-size: 12px; margin-top: 8px; }
  .card-bottom { margin-top: 16px; }
  .play-link { min-height: 34px; font-size: 12px; }
  .save-game { width: 34px; height: 34px; font-size: 13px; }
  .cover-label { top: 13px; left: 13px; font-size: 7px; padding: 4px 7px; }
  .play-overlay { right: 15px; bottom: 15px; width: 42px; height: 42px; font-size: 15px; }
  .empty-state { padding: 36px 22px; }
  .empty-state h3 { font-size: 21px; }
  .empty-state p { font-size: 12px; }
  .how-to { margin-bottom: 47px; padding: 27px 24px; gap: 27px; }
  .how-to h2 { font-size: 25px; }
  .how-to li { gap: 13px; }
  .how-to li p { font-size: 10px; }
  .site-footer { padding-top: 32px; }
  .footer-main { align-items: flex-start; flex-direction: column; gap: 23px; }
  .footer-main nav { gap: 15px 25px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 17px; }
  .powered-by-credit { white-space: nowrap; }
  #game-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 19px; border-radius: 13px; box-shadow: 4px 4px 0 var(--ink); }
  .dialog-heading { gap: 15px; }
  .dialog-heading h2 { font-size: 20px; }
  .dialog-heading .eyebrow { font-size: 7px; }
  .dialog-close { width: 34px; height: 34px; font-size: 16px; }
  #game-instructions { font-size: 12px; margin-top: 16px; padding-bottom: 16px; }
  .game-toolbar { gap: 11px; margin-top: 17px; margin-bottom: 20px; }
  .game-feedback { font-size: 10px; }
  .game-action { min-height: 37px; padding-inline: 12px; font-size: 11px; }
  .game-board { gap: 8px; }
  .game-cell { border-radius: 7px; font-size: 24px; box-shadow: 2px 2px 0 var(--ink); }
  .lights-board .game-cell { font-size: 21px; }
  .tic-board .game-cell { font-size: 38px; }
  .slide-board .game-cell { font-size: 28px; }
  .simon-board { gap: 11px; }
  .simon-pad { min-height: 109px; font-size: 14px; }
  .game-choices { gap: 10px; }
  .game-choice { min-width: 65px; min-height: 49px; padding: 10px 14px; font-size: 15px; }
  .game-input { width: 161px; font-size: 17px; }
  .game-prompt { font-size: 29px; }
  #game-status { margin-top: 23px; font-size: 11px; padding: 12px; }
}
@media (max-width: 360px) {
  .container { width: calc(100% - 30px); }
  .brand img { width: 174px; }
  .js .menu-toggle { padding-inline: 9px; font-size: 10px; gap: 7px; }
  .hero { padding-inline: 20px; }
  h1 { font-size: 25px; }
  .hero-copy > .eyebrow { font-size: 5px; }
  .hero-actions { gap: 15px; }
  .hero-actions .button { padding-inline: 12px; gap: 12px; font-size: 10px; }
  .surprise-button { font-size: 9px; gap: 6px; }
  .hero-sticker { font-size: 6px; }
  h2 { font-size: 21px; }
  .library-heading .eyebrow { font-size: 5.5px; }
  .category-filters > button { font-size: 9px; padding-inline: 10px; }
  .card-content { padding-inline: 19px; }
  .game-card h3 { font-size: 19px; }
  .game-meta > span:last-child { font-size: 7px; }
  .game-card p { font-size: 11px; }
  .how-to { padding-inline: 22px; }
  .how-to h3 { font-size: 14px; }
  #game-dialog { padding: 16px; }
  .dialog-heading h2 { font-size: 18px; }
  .game-board { gap: 7px; }
  .game-cell { font-size: 22px; }
  .lights-board .game-cell { font-size: 19px; }
  .simon-pad { min-height: 97px; font-size: 12px; }
  .game-choice { min-width: 62px; font-size: 13px; padding-inline: 11px; }
  .game-input { width: 141px; font-size: 16px; }
  .game-prompt { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
