:root {
  color-scheme: light;
  --ink: #173743;
  --ink-soft: #5f7479;
  --cream: #fffaf0;
  --paper: #ffffff;
  --teal-950: #073a44;
  --teal-800: #086675;
  --teal-600: #0d9c98;
  --teal-400: #45cdb5;
  --mint: #dff8e8;
  --yellow: #ffd84b;
  --yellow-deep: #f0b71d;
  --coral: #ff735f;
  --pink: #ff8daf;
  --shadow-lg: 0 26px 70px rgba(18, 72, 76, 0.18);
  --shadow-md: 0 14px 36px rgba(18, 72, 76, 0.14);
  --radius-lg: 34px;
  --radius-md: 22px;
  --header-height: 84px;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(69, 205, 181, 0.12), transparent 26rem),
    radial-gradient(circle at 92% 24%, rgba(255, 216, 75, 0.16), transparent 24rem),
    var(--cream);
  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 rgba(255, 115, 95, 0.42);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 40;
  width: min(1240px, calc(100% - 40px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 9px rgba(7, 58, 68, 0.16));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.42rem;
  letter-spacing: -0.055em;
  text-transform: lowercase;
}

.brand-copy strong span {
  color: var(--teal-600);
}

.brand-copy small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.header-actions,
.game-toolbar-actions,
.hero-actions,
.panel-actions,
.victory-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.pill-button,
.primary-button,
.secondary-button,
.mini-button,
.back-button,
.jump-button,
.level-card,
.dialog-close {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 45px;
  height: 45px;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 6px 18px rgba(18, 72, 76, 0.11);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.05rem;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover,
.pill-button:hover,
.secondary-button:hover,
.mini-button:hover,
.back-button:hover {
  transform: translateY(-2px);
  background: #fff;
}

.pill-button {
  min-height: 45px;
  padding: 0 18px;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 6px 18px rgba(18, 72, 76, 0.1);
  font-size: 0.85rem;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.pill-button span {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.74rem;
}

.screen {
  position: relative;
}

.home-screen {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  z-index: 2;
  min-height: min(760px, calc(100vh - var(--header-height)));
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(460px, 1.12fr);
  align-items: center;
  gap: clamp(38px, 6vw, 96px);
  padding: 42px 0 78px;
}

.hero-copy,
.hero-visual,
.hero-actions {
  min-width: 0;
}

.hero-copy {
  padding-left: clamp(0px, 2vw, 24px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--teal-800);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 30px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--coral), var(--yellow));
}

.hero h1 {
  margin: 0;
  color: var(--teal-950);
  font-size: clamp(5rem, 9.2vw, 8.6rem);
  line-height: 0.72;
  letter-spacing: -0.085em;
  text-wrap: balance;
}

.hero h1 em {
  display: inline-block;
  margin-left: 0.12em;
  color: var(--coral);
  font-style: normal;
  transform: rotate(-3deg);
  text-shadow: 5px 5px 0 rgba(255, 216, 75, 0.72);
}

.hero-lead {
  max-width: 540px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 34px;
  align-items: stretch;
  flex-direction: column;
  max-width: 430px;
}

.primary-button,
.secondary-button {
  min-height: 60px;
  border-radius: 19px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 900;
  transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  box-shadow: 0 13px 26px rgba(8, 113, 130, 0.24), inset 0 1px rgba(255, 255, 255, 0.3);
}

.primary-button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 34px rgba(8, 113, 130, 0.3), inset 0 1px rgba(255, 255, 255, 0.3);
}

.secondary-button {
  min-height: 51px;
  color: var(--teal-800);
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(8, 102, 117, 0.13);
}

.camera-icon {
  width: 24px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 6px;
  position: relative;
}

.camera-icon::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  left: 7px;
  top: 4px;
}

.camera-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 6px;
  border-radius: 3px 3px 0 0;
  border: 2px solid currentColor;
  border-bottom: 0;
  left: 6px;
  top: -7px;
}

.button-arrow {
  margin-left: auto;
  font-size: 1.35rem;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 430px;
  margin: 18px 0 0;
  color: #728489;
  font-size: 0.76rem;
  line-height: 1.45;
}

.privacy-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 5px rgba(69, 205, 181, 0.15);
}

.hero-visual {
  position: relative;
  min-height: 600px;
  display: grid;
  place-items: center;
}

.hero-card {
  position: relative;
  width: min(100%, 600px);
  aspect-ratio: 0.98;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.86);
  border-radius: 44% 56% 46% 54% / 45% 41% 59% 55%;
  background:
    linear-gradient(180deg, rgba(35, 169, 184, 0.08), rgba(7, 58, 68, 0.25)),
    url("./assets/generated/level-1-jungle.jpg") center / cover;
  box-shadow: var(--shadow-lg), inset 0 -80px 100px rgba(7, 58, 68, 0.16);
  transform: rotate(1.2deg);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 25%;
  background: linear-gradient(0deg, rgba(7, 58, 68, 0.3), transparent);
  pointer-events: none;
}

.hero-monkey {
  position: absolute;
  z-index: 4;
  left: 20%;
  bottom: 5%;
  width: 55%;
  aspect-ratio: 0.75;
  background-image: url("./assets/generated/monkey-sprite-sheet.png");
  background-size: 400% 200%;
  background-position: 66.666% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 18px 13px rgba(22, 47, 34, 0.28));
  animation: hero-float 3.6s ease-in-out infinite;
}

.hero-shadow {
  position: absolute;
  z-index: 3;
  left: 31%;
  bottom: 11%;
  width: 35%;
  height: 5%;
  border-radius: 50%;
  background: rgba(10, 45, 38, 0.28);
  filter: blur(8px);
  animation: shadow-pulse 3.6s ease-in-out infinite;
}

.hero-banana {
  position: absolute;
  z-index: 5;
  width: 16%;
  aspect-ratio: 1;
  background: url("./assets/generated/banana.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 10px rgba(91, 66, 9, 0.2));
}

.hero-banana--one {
  left: 11%;
  top: 24%;
  transform: rotate(-18deg);
  animation: banana-drift 3s ease-in-out infinite;
}

.hero-banana--two {
  right: 10%;
  top: 18%;
  transform: rotate(22deg) scale(0.76);
  animation: banana-drift 3.4s 0.7s ease-in-out infinite reverse;
}

.hero-leaf {
  position: absolute;
  z-index: 2;
  width: 50px;
  height: 24px;
  border-radius: 100% 0 100% 0;
  background: var(--teal-400);
  opacity: 0.75;
}

.hero-leaf--one {
  left: 12%;
  bottom: 20%;
  transform: rotate(32deg);
  animation: leaf-wind 4s linear infinite;
}

.hero-leaf--two {
  right: 16%;
  top: 39%;
  width: 35px;
  height: 17px;
  background: var(--yellow);
  animation: leaf-wind 4.6s 1s linear infinite reverse;
}

.sun-orbit {
  position: absolute;
  z-index: -1;
  width: 76%;
  aspect-ratio: 1;
  border: 2px dashed rgba(8, 156, 152, 0.17);
  border-radius: 50%;
  animation: slow-spin 35s linear infinite;
}

.sun-orbit::before,
.sun-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.sun-orbit::before {
  width: 48px;
  height: 48px;
  right: 7%;
  top: 9%;
  background: var(--yellow);
  box-shadow: 0 0 0 18px rgba(255, 216, 75, 0.18);
}

.sun-orbit::after {
  width: 18px;
  height: 18px;
  left: 1%;
  bottom: 20%;
  background: var(--coral);
}

.hero-sticker {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid rgba(7, 58, 68, 0.08);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.hero-sticker--camera {
  left: -2%;
  top: 18%;
  padding: 13px 17px;
  transform: rotate(-4deg);
}

.hero-sticker--camera span {
  color: var(--coral);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.hero-sticker--levels {
  right: -2%;
  bottom: 15%;
  padding: 11px 17px 11px 12px;
  max-width: 160px;
  transform: rotate(3deg);
}

.hero-sticker--levels strong {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  color: var(--teal-950);
  background: var(--yellow);
  font-size: 1.35rem;
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient--one {
  left: -280px;
  top: 260px;
  background: rgba(69, 205, 181, 0.1);
}

.ambient--two {
  right: -330px;
  top: 760px;
  background: rgba(255, 115, 95, 0.08);
}

.journey {
  position: relative;
  z-index: 2;
  padding: 86px 0 64px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 30px;
}

.section-heading h2 {
  max-width: 650px;
  margin: 0;
  color: var(--teal-950);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.section-heading > p {
  max-width: 370px;
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.level-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.level-card {
  position: relative;
  min-height: 218px;
  padding: 0;
  overflow: hidden;
  border-radius: 25px;
  color: #fff;
  background: var(--bg) center / cover;
  box-shadow: var(--shadow-md);
  text-align: left;
  isolation: isolate;
  transition: transform 190ms ease, box-shadow 190ms ease, filter 190ms ease;
}

.level-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 25, 34, 0.02) 15%, rgba(5, 29, 38, 0.87) 100%);
}

.level-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: inherit;
  pointer-events: none;
}

.level-card:not(:disabled):hover {
  transform: translateY(-7px) rotate(-0.4deg);
  box-shadow: 0 23px 44px rgba(18, 72, 76, 0.22);
}

.level-card:disabled {
  cursor: not-allowed;
  filter: saturate(0.35) brightness(0.76);
}

.level-card__number,
.level-card__state {
  position: absolute;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 99px;
  background: rgba(7, 38, 48, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.level-card__number {
  left: 16px;
  min-width: 32px;
}

.level-card__state {
  right: 16px;
  padding: 0 12px;
}

.level-card__copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
}

.level-card__copy small {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.level-card__copy strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
}

.how-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 30px 0 100px;
  overflow: hidden;
  border: 1px solid rgba(8, 102, 117, 0.1);
  border-radius: 28px;
  background: rgba(8, 102, 117, 0.1);
  box-shadow: 0 18px 54px rgba(18, 72, 76, 0.08);
}

.how-strip article {
  min-height: 166px;
  padding: 30px;
  display: flex;
  gap: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.step-number {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.how-strip strong {
  display: block;
  margin-bottom: 9px;
  color: var(--teal-950);
  font-size: 1.02rem;
}

.how-strip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.site-footer {
  min-height: 100px;
  padding: 25px max(20px, calc((100% - 1240px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.7);
  background: var(--teal-950);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.app[data-screen="game"] {
  min-height: 100vh;
  background: #0b2630;
}

.app[data-screen="game"] .site-header,
.app[data-screen="game"] .site-footer {
  display: none;
}

.game-screen {
  min-height: 100vh;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 85% 0%, rgba(69, 205, 181, 0.13), transparent 30rem),
    radial-gradient(circle at 5% 100%, rgba(255, 216, 75, 0.09), transparent 24rem),
    #0b2630;
  color: #fff;
}

.game-toolbar {
  width: min(1540px, 100%);
  min-height: 63px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.game-level-copy {
  display: flex;
  align-items: center;
  gap: 13px;
}

.back-button {
  width: 45px;
  height: 45px;
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.2rem;
  transition: transform 160ms ease, background 160ms ease;
}

.game-level-copy div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-level-copy small {
  color: var(--teal-400);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.game-level-copy strong {
  font-size: 1.08rem;
}

.game-screen .icon-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.camera-pill {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-pill i,
.camera-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aaeb5;
}

.camera-pill[data-state="on"] {
  color: #dbfff5;
  background: rgba(69, 205, 181, 0.15);
}

.camera-pill[data-state="on"] i {
  background: #45e9bd;
  box-shadow: 0 0 0 5px rgba(69, 233, 189, 0.12);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.camera-pill[data-state="waiting"] i {
  background: var(--yellow);
  animation: live-pulse 0.8s ease-in-out infinite;
}

.game-layout {
  width: min(1540px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: stretch;
}

.game-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.11);
  border-radius: 29px;
  background: #d9f4ea;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.34);
}

#gameCanvas {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 165px);
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  background: #bce6da;
  touch-action: manipulation;
}

.camera-mini {
  position: absolute;
  z-index: 9;
  right: 18px;
  bottom: 18px;
  width: clamp(140px, 17vw, 220px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 19px;
  background: #12323b;
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.3);
}

.camera-mini video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-grid {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  border-radius: 13px;
}

.camera-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 14%;
  width: 25%;
  aspect-ratio: 0.5;
  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 50% 50% 37% 37%;
  transform: translateX(-50%);
}

.camera-live {
  position: absolute;
  top: 9px;
  left: 9px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: rgba(5, 26, 31, 0.65);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-live i {
  width: 6px;
  height: 6px;
  background: #ff6767;
  animation: live-pulse 1s ease-in-out infinite;
}

.jump-meter {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 9px;
  height: 55%;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(4, 25, 30, 0.54);
  transform: rotate(180deg);
}

.jump-meter span {
  display: block;
  width: 100%;
  height: 4%;
  border-radius: inherit;
  background: linear-gradient(var(--yellow), var(--coral));
  transition: height 80ms linear;
}

.control-panel {
  min-height: 100%;
  padding: 23px 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.control-panel__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-orb {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
}

.control-orb i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #82979d;
}

.control-panel[data-state="ready"] .control-orb {
  background: rgba(69, 233, 189, 0.13);
}

.control-panel[data-state="ready"] .control-orb i {
  background: #45e9bd;
  box-shadow: 0 0 0 8px rgba(69, 233, 189, 0.1);
}

.control-panel[data-state="waiting"] .control-orb i {
  background: var(--yellow);
  animation: live-pulse 0.8s ease-in-out infinite;
}

.control-panel__top div {
  min-width: 0;
}

.control-panel__top small {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-400);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.control-panel__top strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.25;
}

.control-panel > p {
  margin: 21px 0;
  color: rgba(255, 255, 255, 0.61);
  font-size: 0.76rem;
  line-height: 1.5;
}

.sensitivity {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sensitivity label {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 800;
}

.sensitivity > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.sensitivity span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.56rem;
}

.sensitivity input {
  width: 100%;
  accent-color: var(--yellow);
}

.panel-actions {
  margin-top: 17px;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 39px;
  padding: 0 13px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  font-size: 0.68rem;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.countdown {
  position: absolute;
  z-index: 20;
  inset: 0;
  place-items: center;
  color: #fff;
  background: rgba(5, 34, 42, 0.56);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 900;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.countdown:not([hidden]) {
  display: grid !important;
}

.game-toast {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 16%;
  max-width: min(560px, calc(100% - 36px));
  padding: 14px 20px;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 15px 45px rgba(6, 36, 42, 0.23);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.game-bottom-bar {
  width: min(1540px, 100%);
  min-height: 62px;
  margin: 8px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.game-bottom-bar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
}

kbd {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 3px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.09);
  font: 700 0.62rem system-ui, sans-serif;
}

.jump-button {
  min-width: 150px;
  min-height: 52px;
  border-radius: 17px;
  color: var(--teal-950);
  background: linear-gradient(135deg, var(--yellow), #ffbf35);
  box-shadow: 0 10px 25px rgba(255, 191, 53, 0.19), inset 0 1px rgba(255, 255, 255, 0.5);
  font-weight: 900;
  letter-spacing: 0.05em;
  transition: transform 90ms ease, filter 90ms ease;
  touch-action: manipulation;
}

.jump-button span {
  margin-right: 8px;
  font-size: 1.1rem;
}

.jump-button:active,
.jump-button.is-active {
  transform: translateY(3px) scale(0.97);
  filter: brightness(0.96);
}

.game-dialog {
  width: min(590px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(7, 38, 48, 0.35);
}

.game-dialog::backdrop {
  background: rgba(7, 35, 43, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.game-dialog form {
  position: relative;
  padding: clamp(28px, 6vw, 52px);
}

.game-dialog h2 {
  max-width: 470px;
  margin: 0 0 18px;
  color: var(--teal-950);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.game-dialog ol {
  margin: 25px 0;
  padding-left: 22px;
  color: var(--ink-soft);
}

.game-dialog li {
  padding: 5px 0 5px 7px;
  line-height: 1.5;
}

.game-dialog li b {
  color: var(--ink);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  right: 19px;
  top: 19px;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--ink);
  background: #edf5f2;
  font-size: 1.4rem;
}

.safety-card {
  margin: 23px 0;
  padding: 17px 19px;
  border-radius: 18px;
  background: #fff4d5;
}

.safety-card strong {
  color: #81580a;
}

.safety-card p {
  margin: 5px 0 0;
  color: #856f43;
  font-size: 0.83rem;
  line-height: 1.45;
}

.dialog-action {
  width: 100%;
}

.victory-dialog {
  text-align: center;
}

.victory-dialog .eyebrow {
  justify-content: center;
}

.victory-dialog h2 {
  margin-left: auto;
  margin-right: auto;
}

.victory-dialog p:not(.eyebrow) {
  color: var(--ink-soft);
  line-height: 1.55;
}

.victory-stars {
  margin-bottom: 18px;
  color: var(--yellow-deep);
  font-size: 2.2rem;
  letter-spacing: 0.2em;
}

.victory-actions {
  margin-top: 26px;
  flex-direction: column;
}

.victory-actions button {
  width: 100%;
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes shadow-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(0.76);
    opacity: 0.45;
  }
}

@keyframes banana-drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -15px;
  }
}

@keyframes leaf-wind {
  0% {
    translate: -15px 7px;
    rotate: -12deg;
  }
  50% {
    translate: 18px -11px;
    rotate: 45deg;
  }
  100% {
    translate: -15px 7px;
    rotate: 100deg;
  }
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
    gap: 35px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .level-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .control-panel {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 15px 17px;
  }

  .control-panel > p {
    margin: 0;
  }

  .sensitivity {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 11px;
  }

  .panel-actions {
    margin-top: 0;
  }

  #gameCanvas {
    max-height: calc(100vh - 260px);
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 72px;
  }

  .site-header,
  .home-screen {
    width: min(100% - 24px, 1240px);
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-copy strong {
    font-size: 1.16rem;
  }

  .brand-copy small {
    display: none;
  }

  .pill-button {
    width: 45px;
    padding: 0;
    font-size: 0;
  }

  .pill-button span {
    margin: 0;
    font-size: 0.74rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 46px 0 50px;
  }

  .hero-copy {
    padding: 0 8px;
  }

  .hero-actions,
  .primary-button,
  .secondary-button {
    width: 100%;
    max-width: 100%;
  }

  .eyebrow {
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: clamp(4.8rem, 24vw, 7.3rem);
  }

  .hero-lead {
    margin-top: 27px;
  }

  .hero-visual {
    min-height: auto;
    padding: 20px 9px 46px;
  }

  .hero-card {
    width: min(100%, 535px);
  }

  .hero-sticker--camera {
    left: 1%;
    top: 14%;
  }

  .hero-sticker--levels {
    right: 0;
    bottom: 6%;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }

  .level-map {
    grid-template-columns: 1fr;
  }

  .level-card {
    min-height: 210px;
  }

  .how-strip {
    grid-template-columns: 1fr;
  }

  .how-strip article {
    min-height: 130px;
  }

  .site-footer {
    text-align: center;
    flex-direction: column;
    justify-content: center;
  }

  .game-screen {
    padding-left: 8px;
    padding-right: 8px;
  }

  .game-toolbar {
    min-height: 52px;
    margin-bottom: 7px;
  }

  .game-level-copy strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .camera-pill,
  #fullscreenButton {
    display: none;
  }

  .game-frame {
    border-width: 2px;
    border-radius: 20px;
  }

  #gameCanvas {
    max-height: none;
  }

  .camera-mini {
    right: 8px;
    bottom: 8px;
    width: 110px;
    border-radius: 13px;
    border-width: 2px;
  }

  .control-panel {
    grid-template-columns: 1fr auto;
    padding: 13px;
    border-radius: 18px;
  }

  .control-panel > p {
    grid-column: 1 / -1;
    order: 3;
  }

  .panel-actions {
    justify-content: end;
  }

  .sensitivity {
    order: 4;
  }

  .game-bottom-bar {
    min-height: 65px;
    justify-content: center;
  }

  .game-bottom-bar p {
    display: none;
  }

  .jump-button {
    width: min(100%, 340px);
    min-height: 58px;
  }
}

@media (max-width: 450px) {
  .site-header {
    gap: 10px;
  }

  .header-actions {
    gap: 6px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 1.02rem;
  }

  .hero-sticker {
    font-size: 0.64rem;
  }

  .hero-sticker--camera {
    padding: 9px 11px;
  }

  .hero-sticker--levels {
    max-width: 130px;
    padding: 8px 10px;
  }

  .hero-sticker--levels strong {
    width: 37px;
    height: 37px;
  }

  .journey {
    padding-top: 58px;
  }

  .control-panel__top strong {
    font-size: 0.75rem;
  }
}

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