.catch-hero { padding-block: clamp(2rem,5vw,4rem) 2rem; }.catch-hero h1 { font-size: clamp(2.7rem,5vw,4.5rem); }
.catch-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }.catch-heading h2 { font: clamp(1.8rem,3vw,2.5rem)/1.2 var(--serif); margin: .5rem 0; }.catch-heading > a { font-size: .8rem; text-underline-offset: 4px; }
.catch-play { max-width: 640px; margin-inline: auto; }.catch-view { position: relative; background: #e6edcc; }
.catch-play, .catch-play * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.catch-play button { touch-action: manipulation; }
.catch-play img { -webkit-user-drag: none; }
#catch-canvas { display: block; width: 100%; height: auto; max-height: 75svh; object-fit: contain; touch-action: none; background: #e8efdc; }
#catch-canvas:focus-visible { outline: 4px solid #bd8b35; outline-offset: -4px; }
.catch-stats { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; }.catch-stats > div { display: flex; flex-direction: column; text-align: center; min-width: 34px; }.catch-stats strong { color: #f6d68b; font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }.catch-stats span { color: #dce7d1; font-size: .6rem; }
.catch-characters { display: flex; justify-content: center; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .65rem; background: #f3efdf; border-bottom: 1px solid #d9ddca; }.catch-characters > span { font-size: .75rem; color: #6a775d; margin-right: .2rem; }
.catch-characters button { display: flex; align-items: center; gap: .45rem; border-radius: 9px; font-size: .8rem; padding: .25rem .65rem .25rem .3rem; background: #fffcf1; border-color: #c8d1bc; min-height: 44px; }.catch-characters button[aria-pressed=true] { background: #315743; color: #fff4d7; border-color: #315743; box-shadow: 0 2px 0 #203f31; }
.catch-portrait { display: block; width: 36px; height: 36px; border-radius: 50%; background-image: url('Book/Memory%20Match/storybook-cards.jpg'); background-size: 400% 300%; }.bailey-portrait { background-position: 0 0; }.moose-portrait { background-position: 33.3333% 0; }
.catch-overlay { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); width: min(86%,420px); padding: clamp(1rem,4vw,2rem); text-align: center; border: 2px solid #d5b365; border-radius: 18px; background: #fff9eaf5; box-shadow: 0 12px 50px #244b4040; }.catch-overlay[hidden] { display: none; }.catch-overlay .eyebrow { font-size: .62rem; }.catch-overlay h3 { font: clamp(1.8rem,5vw,2.5rem)/1.1 var(--serif); margin: .6rem 0; }.catch-overlay p { color: #6c745f; font-size: .9rem; line-height: 1.6; }
.catch-overlay-actions { display: flex; flex-direction: column; gap: .6rem; }.catch-overlay #start-game { background: #315743; color: #fff4d7; font-weight: 700; border-color: #315743; border-radius: 9px; min-height: 48px; }.catch-overlay #enter-score { background: #edcc7c; border-color: #d3b168; font-size: .85rem; border-radius: 9px; }
.catch-steering { display: flex; justify-content: center; align-items: center; gap: 1.3rem; margin-top: .8rem; }.catch-steering button { width: 80px; min-height: 48px; border-radius: 12px; background: #fff9e8; font-size: 1.5rem; touch-action: none; user-select: none; }.catch-steering span { color: #788366; font-size: .7rem; }.catch-save-note { margin: 1.3rem 0 2.5rem; color: #68745b; font-size: .8rem; }
.catch-page .leaderboard-table th { white-space: nowrap; overflow-wrap: normal; word-break: normal; }.catch-page .leaderboard-table th:first-child { width: 64px; }.catch-page .leaderboard-table th:nth-child(3), .catch-page .leaderboard-table th:last-child { width: 85px; }.catch-page .leaderboard-table td:nth-child(3), .catch-page .leaderboard-table th:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
#retry-score { margin: .75rem 1.25rem; font-size: .8rem; }#retry-score[hidden],#enter-score[hidden] { display: none; }
.catch-play.is-expanded { max-width: none; }.catch-play.is-expanded .catch-view { flex: 1; min-height: 0; }.catch-play.is-expanded #catch-canvas { width: 100%; height: 100%; max-height: none; object-fit: contain; }.catch-play.is-expanded .catch-steering { margin: .2rem 0; flex-shrink: 0; }.catch-play.is-expanded[data-phase=running] .catch-characters,.catch-play.is-expanded[data-phase=paused] .catch-characters { display: none; }
@media(max-width:650px) { .catch-studio { padding-inline: .75rem; }.catch-stats { gap: 1rem; }.catch-stats strong { font-size: 1.1rem; }.catch-characters > span { font-size: .65rem; }.catch-steering { gap: .8rem; }.catch-steering button { width: 68px; }.catch-page .leaderboard-table th,.catch-page .leaderboard-table td { padding-inline: .55rem; }.catch-page .leaderboard-table th:first-child { width: 50px; }.catch-page .leaderboard-table th:nth-child(3) { width: 60px; }.catch-page .leaderboard-table th:last-child { width: 65px; } }
@media(orientation:landscape) and (max-height:600px) { .catch-play.is-expanded { display: flex; }.catch-play.is-expanded .maze-gamebar { flex-wrap: nowrap; padding-block: .35rem; }.catch-play.is-expanded .catch-characters { padding: .3rem; }.catch-play.is-expanded .catch-characters button { min-height: 32px; }.catch-play.is-expanded .catch-portrait { width: 24px; height: 24px; }.catch-play.is-expanded .catch-steering button { min-height: 36px; font-size: 1rem; }.catch-play.is-expanded .catch-overlay { top: 50%; padding: .6rem 1rem; max-width: 480px; }.catch-play.is-expanded .catch-overlay .eyebrow { display: none; }.catch-play.is-expanded .catch-overlay h3 { font-size: 1.4rem; margin: .2rem 0; }.catch-play.is-expanded .catch-overlay p { font-size: .75rem; margin: .4rem 0; }.catch-play.is-expanded .catch-overlay-actions { flex-direction: row; justify-content: center; }.catch-play.is-expanded .catch-overlay button { min-height: 36px !important; padding: .4rem .8rem; } }

.catch-stats .catch-lives { display: flex; gap: .2rem; align-items: center; justify-content: center; min-height: 1.6rem; }
.catch-stats .catch-lives span { color: #ffb0a1; font-size: 1.35rem; line-height: 1.2; text-shadow: 0 2px 0 #572e2950; }
.catch-stats .catch-lives span.is-lost { color: #91a293; opacity: .35; text-shadow: none; animation: catch-life-lost .4s ease-out; }
#lives-count { white-space: nowrap; }
@keyframes catch-life-lost { from { color: #fff2d4; opacity: 1; transform: scale(1.25); } to { color: #91a293; opacity: .35; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .catch-stats .catch-lives span.is-lost { animation: none; } }

/* Reserve space for the HUD and controls on short phone screens. */
#catch-canvas { aspect-ratio: 3 / 4; }
.catch-play.is-expanded { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; }
.catch-play.is-expanded .maze-board { flex: 1 1 0; height: auto; min-height: 0; width: 100%; }
.catch-play.is-expanded .maze-gamebar, .catch-play.is-expanded .catch-characters { flex-shrink: 0; }
.catch-play.is-expanded .maze-gamebar { flex-wrap: wrap; gap: .4rem; }
.catch-play.is-expanded .catch-view { flex: 1 1 0; min-height: 0; overflow: hidden; }
.catch-play.is-expanded #catch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: fill; }
.catch-play.is-expanded #game-status { flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width:650px) {
  .catch-play .maze-gamebar { flex-direction: column; align-items: stretch; }
  .catch-play .maze-gamebar .maze-options { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .catch-play .maze-gamebar button { padding-inline: .2rem; font-size: .68rem; }
  .catch-play .catch-stats { margin: 0; justify-content: space-around; gap: .5rem; }
}
@media(orientation:landscape) and (max-height:600px) {
  .catch-play.is-expanded .maze-gamebar .maze-options { flex: 0 1 auto; }
  .catch-play.is-expanded .catch-stats { gap: .7rem; }
  .catch-play.is-expanded .catch-steering { gap: .6rem; }
}

/* Landscape arcade: one compact HUD, with thumb controls over the scenery. */
@media(orientation:landscape) and (max-height:600px) {
  .catch-play.is-expanded { gap: 0; }
  .catch-play.is-expanded .maze-gamebar { flex-direction: row; flex-wrap: nowrap; align-items: center; padding: .15rem .4rem; min-height: 44px; }
  .catch-play.is-expanded .maze-gamebar .maze-options { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: .2rem; }
  .catch-play.is-expanded .maze-gamebar button { width: 44px; min-height: 40px; padding: .2rem; font-size: 0; box-shadow: none; }
  .catch-play.is-expanded #sound::after { content: 'SFX'; font-size: .65rem; }
  .catch-play.is-expanded #music::after { content: '♫'; font-size: 1.2rem; }
  .catch-play.is-expanded #pause::after { content: 'Ⅱ / ▶'; font-size: .7rem; }
  .catch-play.is-expanded #fullscreen::after { content: '⤢'; font-size: 1.3rem; }
  .catch-play.is-expanded .maze-gamebar button[aria-pressed=false] { opacity: .6; }
  .catch-play.is-expanded .catch-stats { flex: 1; margin: 0; justify-content: space-around; gap: .3rem; }
  .catch-play.is-expanded .catch-stats strong { font-size: 1rem; }
  .catch-play.is-expanded .catch-stats .catch-lives { min-height: 1.2rem; }
  .catch-play.is-expanded .catch-stats .catch-lives span { font-size: 1.05rem; }
  .catch-play.is-expanded .catch-steering { position: absolute; z-index: 4; inset: auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); justify-content: space-between; margin: 0; pointer-events: none; }
  .catch-play.is-expanded .catch-steering button { pointer-events: auto; width: 60px; min-height: 52px; background: #fff9e8d9; border: 2px solid #31574388; font-size: 1.4rem; }
  .catch-play.is-expanded .catch-steering span { display: none; }
  .catch-play.is-expanded:not([data-phase=running]) .catch-steering { display: none; }
  .catch-play.is-expanded #game-status { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
}
