@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Baloo+2:wght@600;700;800&display=swap');

:root {
  color-scheme: light;
  --forest: #075b45;
  --canopy: #168b62;
  --water: #19bfc4;
  --gold: #f7b733;
  --orange: #f06a3d;
  --berry: #d64550;
  --ink: #173a34;
  --cream: #f4f4de;
  --wood: #5b321d;
  --wood-dark: #2d180f;
  --panel: rgba(244, 244, 222, 0.95);
  --shadow: 0 18px 45px rgba(4, 42, 32, 0.28);
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--forest) url('assets/rainforest-background.png') center / cover fixed;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--water);
}
button:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .48; }
.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;
}
.screen { min-height: 100dvh; position: relative; }
.screen[hidden] { display: none !important; }
.screen.is-active { animation: screen-in .4s ease-out both; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Baloo 2', system-ui, sans-serif; line-height: 1; }
.eyebrow {
  display: block; color: var(--canopy); font-size: .72rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
}
.button, .icon-button, .hud-button, .text-button {
  border: 0; cursor: pointer; font-weight: 800; transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.button:hover, .icon-button:hover, .hud-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button:active, .icon-button:active, .hud-button:active { transform: translateY(1px) scale(.98); }
.button {
  min-height: 48px; padding: .72rem 1.25rem; border-radius: 999px;
  border: 2px solid rgba(45,24,15,.28); box-shadow: 0 5px 0 rgba(45,24,15,.32);
}
.button-primary { color: #17330d; background: linear-gradient(#ffe570, var(--gold)); }
.button-quiet { color: var(--cream); background: linear-gradient(#168b62, #086149); }
.button-large { min-width: 210px; min-height: 58px; font-size: 1.15rem; }
.button-small { min-height: 40px; padding: .45rem 1rem; }
.icon-button {
  width: 48px; height: 48px; border-radius: 50%; color: var(--cream);
  background: rgba(7,91,69,.92); box-shadow: 0 4px 0 rgba(2,48,36,.6); font-size: 1.35rem;
}
.text-button { background: none; color: var(--forest); text-decoration: underline; padding: .8rem; }
.danger-button { color: #a32631; }

/* Title: the logo is the opening thesis; the console stays intentionally compact. */
.title-screen { display: grid; place-items: center; padding: 2rem; isolation: isolate; overflow: hidden; }
.title-screen::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(3,48,36,.78), transparent 35% 65%, rgba(3,48,36,.65));
}
.prongo-link {
  position: absolute; z-index: 5; top: max(1rem, env(safe-area-inset-top)); left: max(1rem, env(safe-area-inset-left));
  color: #fff; font-weight: 800; text-decoration: none; padding: .65rem .9rem;
  border-radius: 999px; background: rgba(3,48,36,.72); backdrop-filter: blur(8px);
}
.title-card {
  position: relative;
  width: min(620px, 94vw); padding: 1.1rem 2rem 1.5rem; text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(255,255,255,.98), var(--panel));
  border: 5px solid #8b572b; border-radius: 34px; box-shadow: 0 0 0 4px #d99b44, var(--shadow);
}
.game-logo { display: block; width: min(500px, 100%); height: auto; margin: -1.3rem auto -1.25rem; filter: drop-shadow(0 10px 8px rgba(45,24,15,.2)); }
.tagline { margin: 0 0 1rem; font-family: 'Baloo 2', sans-serif; color: var(--forest); font-size: clamp(1.05rem, 2.8vw, 1.45rem); font-weight: 800; }
.title-actions { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.play-hint { margin: 1rem 0 0; color: #44635d; font-size: .92rem; }
.researcher {
  background-image: url('assets/04-field-researcher-poses.png'); background-size: 400% 200%; background-repeat: no-repeat;
}
.researcher-ready {
  position: absolute; z-index: 3; left: clamp(-5rem, 2vw, 2rem); bottom: -3vh;
  width: min(29vw, 370px); aspect-ratio: .75; background-position: 0 0;
  pointer-events: none; filter: drop-shadow(0 14px 12px rgba(3,48,36,.35));
}

/* Chapter map */
.map-screen { padding: 1.25rem clamp(1rem, 4vw, 3rem) 2rem; background: linear-gradient(rgba(3,56,42,.52), rgba(3,56,42,.78)); }
.screen-header, .game-hud {
  display: flex; align-items: center; gap: 1rem; width: min(1120px, 100%); margin: 0 auto;
}
.screen-header > div { flex: 1; }
.screen-header h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: .1rem 0 0; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.screen-header .eyebrow { color: #b9f4cf; }
.map-card {
  position: relative; width: min(980px, 100%); min-height: min(68vh, 650px); margin: 1rem auto;
  overflow: hidden; border: 7px solid #6e4225; border-radius: 34px; box-shadow: 0 0 0 4px #c9903a, var(--shadow);
  background: linear-gradient(rgba(239,238,184,.32), rgba(13,112,74,.16)), url('assets/rainforest-background.png') center / cover;
}
.map-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(3,48,36,.45); }
.map-river {
  position: absolute; inset: 5% 8% 13%; opacity: .6; filter: drop-shadow(0 3px 0 #e7d67a);
  background: url('assets/05-rewards-and-interface-icons.png') 0 100% / 400% 200% no-repeat;
}
.level-map { position: relative; z-index: 1; height: 560px; margin: 0; padding: 0; list-style: none; }
.level-node { position: absolute; transform: translate(-50%, -50%); }
.level-node button {
  position: relative; display: grid; place-items: center; width: 64px; height: 64px; padding: 0;
  border: 5px solid #fff1a8; border-radius: 50%; color: #153b2f; font-family: 'Baloo 2'; font-size: 1.3rem; font-weight: 800;
  background: linear-gradient(#fff38c, #eeb334); box-shadow: 0 6px 0 #75461e, 0 10px 18px rgba(0,0,0,.25); cursor: pointer;
}
.level-node button:hover:not(:disabled) { transform: scale(1.08) rotate(-3deg); }
.level-node button:disabled { color: #d0cfb7; background: #55665e; border-color: #89958f; }
.level-node .node-badges { position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); white-space: nowrap; color: #ffe56d; text-shadow: 0 2px 0 #3e2817; font-size: .8rem; }
.level-node.current button { animation: node-pulse 1.8s ease-in-out infinite; }
.map-restoration {
  position: absolute; z-index: 2; left: 4%; right: 4%; bottom: 1rem; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: .8rem; padding: .65rem 1rem; border-radius: 999px; color: #fff; font-size: .78rem; font-weight: 800;
  background: rgba(3,48,36,.8); backdrop-filter: blur(8px);
}
.restoration-track { height: 10px; overflow: hidden; border-radius: 99px; background: #6d4b31; }
.restoration-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #78d160, #e6f54f); transition: width .5s ease; }
.map-footer { width: min(980px, 100%); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.map-footer p { margin: 0; }

/* Puzzle */
.game-screen { min-height: 100dvh; padding: .65rem 1rem .8rem; background: linear-gradient(rgba(3,44,33,.28), rgba(3,44,33,.58)); }
.game-hud {
  display: grid; grid-template-columns: auto auto minmax(150px, 1fr) minmax(190px, auto) auto auto;
  gap: .55rem; max-width: 1180px;
  padding: .55rem .7rem; border: 3px solid #b27a35; border-radius: 18px; color: var(--cream);
  background: linear-gradient(180deg, rgba(5,90,67,.96), rgba(3,63,47,.96)); box-shadow: 0 6px 0 #3a2418, var(--shadow);
}
.hud-button {
  min-width: 52px; min-height: 48px; padding: .45rem .7rem; color: #fff; border: 2px solid rgba(255,255,255,.22);
  border-radius: 12px; background: rgba(0,0,0,.15);
}
.hud-button span { display: block; font-size: .65rem; }
.move-counter { display: grid; place-items: center; min-width: 66px; padding: .3rem .55rem; border-radius: 13px; color: #213b1a; background: var(--gold); box-shadow: inset 0 -4px 0 rgba(121,67,16,.22); }
.move-counter span { font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.move-counter strong { font-family: 'Baloo 2'; font-size: 1.55rem; line-height: 1; }
.level-heading { align-self: center; min-width: 0; }
.level-heading .eyebrow { color: #aef1ca; }
.level-heading h2 { margin: .1rem 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(1.1rem, 2.5vw, 1.55rem); }
.objectives { display: flex; align-items: center; justify-content: flex-end; gap: .42rem; }
.objective-chip {
  display: flex; align-items: center; gap: .35rem; min-height: 44px; padding: .25rem .55rem; border-radius: 12px;
  color: var(--ink); background: var(--cream); box-shadow: inset 0 -3px 0 rgba(23,58,52,.13); font-size: .76rem; font-weight: 800;
}
.objective-chip.complete { background: #dff7bd; }
.objective-icon { width: 34px; height: 34px; flex: 0 0 auto; background-repeat: no-repeat; }
.objective-icon.animal { background-image: url('assets/01-rainforest-animal-match-tiles.png'); background-size: 400% 200%; }
.objective-icon.crate, .objective-icon.vine, .objective-icon.mud { background-image: url('assets/03-rainforest-obstacles-and-collectibles.png'); background-size: 400% 200%; }
.objective-icon.crate { background-position: 0 100%; }
.objective-icon.vine { background-position: 0 0; }
.objective-icon.mud { background-position: 66.667% 0; }
.objective-icon.health { border-radius: 50%; background: radial-gradient(circle, #b9f074, #168b62 67%, #075b45 69%); }

.game-stage {
  display: grid; grid-template-columns: 82px minmax(310px, 640px) minmax(160px, 230px); justify-content: center; align-items: center;
  gap: clamp(.7rem, 2vw, 1.25rem); margin: .9rem auto .6rem;
}
.health-panel {
  align-self: stretch; min-height: 320px; display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .65rem .55rem; color: #fff; border: 3px solid #b27a35; border-radius: 18px;
  background: rgba(3,63,47,.9); box-shadow: 0 6px 0 #3a2418;
}
.health-label { font-size: .72rem; font-weight: 800; text-align: center; }
.health-track { position: relative; flex: 1; width: 42px; overflow: hidden; border: 4px solid #e2c072; border-radius: 999px; background: linear-gradient(#796049, #4a3228); }
.health-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(#bbeb57, #1cac63); transition: height .45s cubic-bezier(.2,.9,.3,1); }
.health-track span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; text-shadow: 0 1px 3px #173a34; }
.board-shell { position: relative; }
.game-board {
  --gap: clamp(3px, .55vw, 7px);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--gap); width: min(70vh, 64vw, 620px); aspect-ratio: 1;
  padding: clamp(8px, 1.1vw, 14px); border: clamp(7px, 1vw, 12px) solid #5b321d; border-radius: 26px;
  background: linear-gradient(135deg, #143e34, #082a23); box-shadow: 0 0 0 4px #bd853b, inset 0 0 30px #041b16, var(--shadow);
}
.tile {
  position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: 19%; cursor: pointer;
  background: linear-gradient(145deg, rgba(42,132,93,.8), rgba(7,72,55,.9)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.13), 0 3px 0 rgba(0,0,0,.28);
  transition: transform .13s ease, filter .13s ease, opacity .16s ease;
}
.tile:hover:not(:disabled), .tile.preview { z-index: 2; transform: scale(1.08); filter: brightness(1.13) drop-shadow(0 0 5px #fff28a); }
.tile:active:not(:disabled) { transform: scale(.94); }
.tile.removing { animation: tile-clear .23s ease-in both; }
.tile.falling { animation: tile-drop .26s cubic-bezier(.2,.9,.3,1) both; }
.tile.invalid { animation: tile-shake .24s ease; }
.tile-art { position: absolute; inset: 0; background-image: url('assets/01-rainforest-animal-match-tiles.png'); background-size: 400% 200%; background-repeat: no-repeat; }
.animal-jaguar { background-position: 0 0; }
.animal-macaw { background-position: 33.333% 0; }
.animal-frog { background-position: 66.667% 0; }
.animal-sloth { background-position: 100% 0; }
.animal-toucan { background-position: 0 100%; }
.animal-capybara { background-position: 33.333% 100%; }
.animal-tapir { background-position: 66.667% 100%; }
.animal-monkey { background-position: 100% 100%; }
.tile-symbol {
  position: absolute; z-index: 4; right: 3px; bottom: 2px; display: none; place-items: center; width: 22px; height: 22px;
  border: 2px solid #fff; border-radius: 50%; color: #fff; background: rgba(3,48,36,.88); font-size: .72rem; font-weight: 800;
}
.show-symbols .tile-symbol { display: grid; }
.booster-art { position: absolute; z-index: 3; inset: 0; background: url('assets/02-rainforest-boosters.png') 0 0 / 400% 200% no-repeat; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.booster-feather { background-position: 0 100%; }
.booster-splash { background-position: 66.667% 0; }
.booster-pounce { background-position: 100% 0; }
.booster-sunstone { background-position: 100% 100%; }
.blocker { position: absolute; z-index: 5; inset: -3%; pointer-events: none; background: url('assets/03-rainforest-obstacles-and-collectibles.png') 0 0 / 400% 200% no-repeat; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.blocker-crate { background-position: 0 100%; inset: 0; }
.blocker-vine { background-position: 0 0; opacity: .94; }
.blocker-web { background-position: 100% 0; }
.blocker-mud { z-index: 0; background-position: 66.667% 0; opacity: .9; }
.tile.has-mud .tile-art { z-index: 1; transform: scale(.88); }
.durability {
  position: absolute; z-index: 6; right: 2px; top: 2px; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; color: #fff; background: var(--berry); font-size: .68rem; font-weight: 800;
}
.combo-preview {
  position: absolute; z-index: 10; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8); pointer-events: none;
  padding: .55rem .85rem; border-radius: 999px; color: #2e210a; background: #fff1a8; font-family: 'Baloo 2'; font-size: 1.05rem; font-weight: 800;
  opacity: 0; box-shadow: 0 5px 0 #9d6626; transition: opacity .15s, transform .15s;
}
.combo-preview.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.guide-card {
  padding: .9rem; border: 3px solid #b27a35; border-radius: 20px; background: var(--panel); box-shadow: 0 6px 0 #3a2418, var(--shadow);
}
.guide-card p { margin: .3rem 0 0; line-height: 1.35; }
.guide-card .researcher { width: 100%; aspect-ratio: .9; margin: -1.3rem auto -.6rem; }
.researcher-point { background-position: 33.333% 0; transform: scaleX(-1); }
.game-footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; width: min(930px, 100%); margin: 0 auto;
  padding: .55rem .8rem; border-radius: 15px; color: #fff; background: rgba(3,63,47,.9); box-shadow: 0 4px 0 #3a2418;
}
.game-footer > div:first-child { display: flex; gap: .5rem; align-items: baseline; }
.game-footer strong { font-family: 'Baloo 2'; font-size: 1.25rem; }
.booster-legend { display: flex; justify-content: center; gap: 1rem; font-size: .72rem; }
.booster-legend b { color: #ffdb55; }

/* Dialogs */
.panel-dialog {
  width: min(560px, calc(100vw - 2rem)); max-height: min(88dvh, 760px); padding: 0; overflow: auto;
  border: 5px solid #74431f; border-radius: 26px; color: var(--ink); background: var(--cream); box-shadow: 0 0 0 4px #d29a44, 0 30px 90px #001e16;
}
.panel-dialog::backdrop { background: rgba(1,34,25,.78); backdrop-filter: blur(4px); }
.panel-dialog form, .panel-dialog .result-content, .compact-dialog { padding: 1.25rem; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-heading h2 { margin: .1rem 0 0; font-size: 2rem; }
.setting-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 66px; padding: .75rem 0; border-top: 1px solid rgba(23,58,52,.18); cursor: pointer;
}
.setting-row span { display: grid; }
.setting-row small { color: #58706b; }
.setting-row input { width: 25px; height: 25px; accent-color: var(--canopy); }
.journal-intro { color: #58706b; }
.journal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.journal-entry { min-height: 155px; padding: 1rem; border: 2px solid #c9b480; border-radius: 16px; background: #fffef0; }
.journal-entry.locked { display: grid; place-items: center; color: #6d7672; background: #dbdccd; text-align: center; }
.journal-entry h3 { margin: .3rem 0 .55rem; color: var(--forest); }
.journal-entry p { margin: 0; line-height: 1.35; }
.compact-dialog { text-align: center; }
.compact-dialog .button { display: block; width: 100%; margin-top: .8rem; }
.result-dialog { width: min(650px, calc(100vw - 2rem)); text-align: center; overflow: hidden; }
.result-art { height: 120px; margin-bottom: -80px; background: url('assets/rainforest-background.png') center 58% / cover; }
.result-content { position: relative; }
.result-content h2 { margin: .3rem 0 .7rem; font-size: clamp(2rem, 7vw, 3.2rem); color: var(--forest); }
.result-badges { display: flex; justify-content: center; gap: .35rem; min-height: 66px; }
.leaf-badge { width: 64px; height: 64px; background: url('assets/05-rewards-and-interface-icons.png') 0 0 / 400% 200% no-repeat; filter: drop-shadow(0 4px 3px rgba(0,0,0,.24)); }
.leaf-badge.bronze { background-position: 0 0; }
.leaf-badge.silver { background-position: 33.333% 0; }
.leaf-badge.gold { background-position: 66.667% 0; }
.leaf-badge.empty { filter: grayscale(1); opacity: .25; }
.fact-card { padding: .9rem 1rem; margin: 1rem 0; border-left: 5px solid var(--water); border-radius: 12px; background: #fffef2; text-align: left; }
.fact-card h3 { margin: .3rem 0; color: var(--forest); }
.fact-card p { margin: 0; line-height: 1.4; }
.result-actions { display: flex; justify-content: center; gap: .65rem; flex-wrap: wrap; }

.score-pop { position: fixed; z-index: 30; pointer-events: none; color: #fff89a; font-family: 'Baloo 2'; font-size: 1.4rem; font-weight: 800; text-shadow: 0 3px 0 #173a34; animation: score-float .7s ease-out both; }

@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tile-clear { to { opacity: 0; transform: scale(.2) rotate(8deg); } }
@keyframes tile-drop { from { opacity: .25; transform: translateY(-45%); } }
@keyframes tile-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes score-float { to { opacity: 0; transform: translateY(-55px) scale(1.15); } }
@keyframes node-pulse { 50% { box-shadow: 0 6px 0 #75461e, 0 0 0 9px rgba(255,237,103,.35); } }

@media (max-width: 920px) {
  .game-hud { grid-template-columns: auto auto 1fr auto auto; }
  .objectives { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .game-stage { grid-template-columns: 64px minmax(280px, 600px); }
  .guide-card { grid-column: 1 / -1; display: flex; align-items: center; max-width: 620px; padding: .45rem .9rem; }
  .guide-card .researcher { display: none; }
  .health-panel { min-height: 280px; }
  .game-board { width: min(66vh, 80vw, 600px); }
}

@media (max-width: 620px) {
  .title-screen { padding: 4rem 1rem 1rem; align-items: center; }
  .title-card { padding: .75rem 1rem 1.2rem; border-width: 4px; }
  .game-logo { margin-bottom: -.7rem; }
  .researcher-ready { display: none; }
  .title-actions { gap: .55rem; }
  .button-large { min-width: 70%; }
  .map-screen { padding: .8rem; }
  .map-card { min-height: 620px; }
  .level-map { height: 560px; }
  .level-node button { width: 56px; height: 56px; }
  .map-restoration { grid-template-columns: 1fr; text-align: center; gap: .3rem; border-radius: 16px; }
  .map-footer { gap: 1rem; font-size: .8rem; }
  .game-screen { padding: .35rem; }
  .game-hud { grid-template-columns: auto auto 1fr auto; border-radius: 13px; padding: .38rem; gap: .3rem; }
  .game-hud .hud-button span, #sound-button { display: none; }
  .level-heading h2 { font-size: 1.05rem; }
  .level-heading .eyebrow { font-size: .58rem; }
  .objectives { overflow-x: auto; justify-content: flex-start; padding: .1rem; }
  .objective-chip { flex: 0 0 auto; min-height: 38px; padding: .16rem .4rem; }
  .objective-icon { width: 29px; height: 29px; }
  .move-counter { min-width: 52px; }
  .game-stage { grid-template-columns: 1fr; gap: .45rem; margin: .5rem auto; }
  .health-panel { order: 2; min-height: 48px; flex-direction: row; padding: .35rem .55rem; }
  .health-label { width: 70px; }
  .health-track { width: auto; height: 29px; flex: 1; }
  .health-fill { top: 0; right: auto; width: 0; height: 100% !important; transition: width .4s ease; }
  .health-track span { writing-mode: initial; transform: none; }
  .game-board { width: min(calc(100vw - .7rem), 66vh, 570px); padding: 6px; border-width: 7px; border-radius: 18px; }
  .guide-card { order: 3; padding: .4rem .65rem; font-size: .85rem; }
  .guide-card .eyebrow { display: none; }
  .guide-card p { margin: 0; }
  .game-footer { grid-template-columns: auto 1fr; padding: .35rem .6rem; }
  .booster-legend { justify-content: flex-end; gap: .42rem; font-size: .6rem; }
  .booster-legend span { font-size: 0; }
  .booster-legend b { font-size: .68rem; }
  #fullscreen-button { display: none; }
  .journal-grid { grid-template-columns: 1fr; }
}

@media (max-height: 600px) and (orientation: landscape) {
  .game-hud { grid-template-columns: auto auto 1fr minmax(190px, auto) auto auto; }
  .objectives { grid-column: auto; grid-row: auto; }
  .game-stage { grid-template-columns: 60px minmax(280px, 485px) minmax(145px, 190px); margin: .55rem auto; }
  .game-board { width: min(70vh, 56vw, 485px); }
  .health-panel { min-height: 250px; }
  .guide-card { display: block; grid-column: auto; padding: .6rem; }
  .guide-card .researcher { display: none; }
  .game-footer { padding: .35rem .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
