:root {
  --ink: #fff8d9;
  --ink-dim: #d9e7c4;
  --deep: #08180d;
  --panel: rgba(23, 42, 20, .93);
  --panel-light: rgba(45, 68, 32, .94);
  --lime: #c8ef31;
  --yellow: #ffd84a;
  --orange: #ff8a2b;
  --red: #ed4b3e;
  --blue: #29aee5;
  --green: #65c74c;
  --purple: #a75de4;
  --wood: #6f351b;
  --wood-dark: #32180f;
  --shadow: 0 20px 55px rgba(0, 0, 0, .42);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
  color: var(--ink);
  background: var(--deep);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }

body {
  min-width: 320px;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  background: #10220f url("jungle-stage.png") center / cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 32%, transparent 0 25%, rgba(5, 16, 8, .25) 58%, rgba(2, 10, 5, .74) 100%),
    linear-gradient(to bottom, rgba(3, 13, 7, .06), rgba(3, 13, 7, .45));
}

.monkey-sprite {
  display: inline-block;
  flex: 0 0 auto;
  background-image: url("monkey-crew-v2.png");
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position-y: center;
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .45));
}
.monkey-1 { background-position-x: 0; }
.monkey-2 { background-position-x: 33.333%; }
.monkey-3 { background-position-x: 66.667%; }
.monkey-4 { background-position-x: 100%; }
.tapir-cutout { display: inline-block; background: url("tapir-host-v2.png") center / contain no-repeat; filter: drop-shadow(0 7px 5px rgba(0, 0, 0, .48)); }

button, input { font: inherit; touch-action: manipulation; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
button { min-width: 0; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
input { font-size: max(16px, 1em); }
.minigame-arena, .action-pad { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

.scene { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sun-glow { position: absolute; top: -15%; left: 28%; width: 45vw; height: 45vw; border-radius: 50%; background: rgba(255, 242, 148, .12); filter: blur(65px); }
.mist { position: absolute; width: 55vw; height: 12vh; border-radius: 50%; background: rgba(219, 255, 226, .12); filter: blur(30px); animation: drift 13s ease-in-out infinite alternate; }
.mist-a { left: -15vw; top: 45%; }
.mist-b { right: -20vw; top: 25%; animation-delay: -6s; }
.firefly { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #efff72; box-shadow: 0 0 10px 3px #dcff5c; animation: float 5s ease-in-out infinite; opacity: .8; }
.f1 { left: 10%; top: 25%; }.f2 { left: 18%; top: 63%; animation-delay: -2s; }.f3 { right: 12%; top: 35%; animation-delay: -4s; }
.f4 { right: 24%; top: 70%; animation-delay: -1s; }.f5 { left: 37%; top: 13%; animation-delay: -3s; }.f6 { right: 36%; top: 57%; animation-delay: -5s; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { height: 76px; padding: 10px clamp(16px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 20; }
.mini-logo { border: 0; background: none; cursor: pointer; filter: drop-shadow(0 4px 2px rgba(0,0,0,.55)); transform: rotate(-2deg); line-height: .8; text-align: center; }
.mini-logo span { display: block; color: #f8e856; font-size: 10px; letter-spacing: .2em; font-weight: 900; }
.mini-logo strong { display: block; color: #ff7136; font-size: 25px; -webkit-text-stroke: 1px #4b1e0f; text-shadow: 2px 2px #251008; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.active-room-badge { padding: 8px 12px; border: 1px solid #a8d653; border-radius: 999px; color: #dcf69b; background: rgba(8,25,12,.8); font-size: 10px; font-weight: 900; letter-spacing: .09em; box-shadow: 0 4px 13px #0005; }.active-room-badge strong { color: #fff082; letter-spacing: .15em; }
.icon-button { min-height: 42px; border-radius: 22px; border: 1px solid rgba(255,255,255,.22); background: rgba(8, 25, 12, .72); backdrop-filter: blur(8px); padding: 7px 14px; display: flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 800; font-size: 13px; box-shadow: 0 5px 15px rgba(0,0,0,.25); }
.icon-button:hover { background: rgba(47, 78, 30, .9); transform: translateY(-1px); }

main { flex: 1; position: relative; min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px); }
.screen { display: none; min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px); padding: 18px clamp(16px, 4vw, 64px) 36px; align-items: center; justify-content: center; animation: screenIn .45s cubic-bezier(.2,.8,.2,1); }
.screen.is-active { display: flex; }

.bark-card { position: relative; background: linear-gradient(160deg, rgba(56, 74, 35, .97), rgba(20, 42, 22, .98)); border: 5px solid #9c6133; box-shadow: inset 0 0 0 3px #452312, var(--shadow); border-radius: 25px; }
.bark-card::before, .bark-card::after { content: ""; position: absolute; z-index: -1; width: 34px; height: 74%; top: 13%; border-radius: 50%; background: #663317; border: 3px solid #2c160d; }
.bark-card::before { left: -22px; transform: rotate(-3deg); }.bark-card::after { right: -22px; transform: rotate(3deg); }

.screen-home { align-items: center; }
.home-layout { width: min(1180px, 100%); display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.title-cluster { text-align: center; }
.vine-badge { display: inline-block; margin-bottom: -4px; padding: 8px 18px; border-radius: 50%; background: #325e26; border: 3px solid #a6cc3b; color: #f1ffbd; font-size: 12px; font-weight: 900; letter-spacing: .22em; transform: rotate(-2deg); box-shadow: 0 5px 0 #173912; }
.game-logo { display: inline-flex; flex-direction: column; margin: 0; transform: rotate(-2deg); filter: drop-shadow(0 14px 2px rgba(0, 0, 0, .4)); line-height: .75; }
.logo-top { z-index: 1; color: #fff277; font-size: clamp(34px, 5.5vw, 78px); letter-spacing: .12em; font-weight: 1000; -webkit-text-stroke: clamp(1px, .3vw, 4px) #4c2912; text-shadow: 4px 6px #286720, 7px 9px #163b12; }
.logo-main { color: #ff6734; font-size: clamp(72px, 10vw, 144px); font-weight: 1000; letter-spacing: -.09em; -webkit-text-stroke: clamp(2px, .45vw, 7px) #541d13; text-shadow: 5px 7px #f4bc29, 10px 13px #57280f; }
.logo-ribbon { align-self: center; min-width: 70%; margin-top: 20px; padding: 8px 22px 10px; color: #f8f4d6; background: #2f7a3a; border: 3px solid #17401f; border-radius: 10px 10px 40% 40%; box-shadow: 0 6px #153017; font-size: clamp(14px, 2vw, 25px); letter-spacing: .19em; font-weight: 1000; line-height: 1; }
.hero-cast { height: 148px; margin: -2px auto -12px; display: flex; align-items: flex-end; justify-content: center; gap: clamp(0px, .7vw, 8px); pointer-events: none; }
.hero-monkey { width: 68px; height: 136px; animation: characterBob 2.5s ease-in-out infinite; }
.hero-monkey--1 { animation-delay: -.3s; }.hero-monkey--2 { animation-delay: -1.1s; }.hero-monkey--3 { animation-delay: -.7s; }.hero-monkey--4 { animation-delay: -1.8s; }
.hero-tapir { width: 132px; height: 139px; margin: 0 -2px -2px; animation: tapirGroove 2.2s ease-in-out infinite; }
.tagline { margin: 14px auto 20px; color: #fffbdc; font-size: clamp(16px, 2vw, 24px); font-weight: 800; text-shadow: 0 3px 8px #000; }
.home-actions { width: min(460px, 100%); margin: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.game-button { min-height: 52px; padding: 12px 24px; border: 3px solid #173614; border-radius: 18px; background: linear-gradient(#608a3a, #355d2a); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 6px 0 #173714, 0 10px 16px rgba(0,0,0,.3); font-size: 17px; font-weight: 1000; letter-spacing: .02em; cursor: pointer; transition: transform .12s, filter .12s, box-shadow .12s; }
.game-button:hover { filter: brightness(1.12); transform: translateY(-2px); }
.game-button:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 2px 0 #173714; }
.game-button:disabled { cursor: not-allowed; filter: grayscale(.55); opacity: .55; transform: none; box-shadow: inset 0 2px rgba(255,255,255,.12), 0 3px #173714; }
.game-button--primary { border-color: #68220c; background: linear-gradient(#ffb12f, #f06122); color: #30170d; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 6px 0 #7f2f12, 0 10px 16px rgba(0,0,0,.3); text-shadow: 0 1px rgba(255,255,255,.35); }
.game-button--online { border-color: #174966; background: linear-gradient(#49c9ee, #2580c3); color: #061e2d; box-shadow: inset 0 2px rgba(255,255,255,.45), 0 6px #154a70, 0 10px 16px rgba(0,0,0,.3); }
.game-button--small { min-height: 46px; font-size: 14px; }
.button-icon { margin-right: 5px; }

.leaderboard-card { padding: 26px; transform: rotate(1deg); }
.card-title-row { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.trophy { font-size: 40px; filter: drop-shadow(0 4px 2px rgba(0,0,0,.4)); }
.eyebrow { display: block; color: #cce67a; font-size: 11px; font-weight: 1000; letter-spacing: .18em; }
.card-title-row h2, .section-heading h2 { margin: 2px 0 0; font-size: 27px; }
.leaderboard-list { min-height: 220px; margin: 14px 0; padding: 0; list-style: none; counter-reset: score; }
.leaderboard-list li:not(.empty-row) { counter-increment: score; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; min-height: 41px; padding: 7px 2px; border-bottom: 1px dashed rgba(255,255,255,.12); font-weight: 800; }
.leaderboard-list li:not(.empty-row)::before { content: counter(score); width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #334010; background: #d9ee72; font-size: 12px; }
.leaderboard-list li:nth-child(1)::before { background: #ffd94e; }.leaderboard-list li:nth-child(2)::before { background: #dce5e6; }.leaderboard-list li:nth-child(3)::before { background: #d89555; }
.leaderboard-list span b, .leaderboard-list span small { display: block; }
.leaderboard-list strong { color: #fff095; }
.leaderboard-list small { margin-top: 2px; color: var(--ink-dim); font-size: 9px; text-transform: uppercase; }
.empty-row { color: var(--ink-dim); text-align: center; padding: 70px 5px; line-height: 1.5; }
.storage-status { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--ink-dim); font-size: 11px; }
.storage-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

.setup-panel { width: min(940px, 100%); padding: clamp(22px, 4vw, 42px); }
.section-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(28px, 4vw, 42px); }
.round-back { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #9fb37d; color: #f5ffd5; background: #294c28; font-size: 35px; line-height: 1; cursor: pointer; }
.setup-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; }
.solo-setup-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 28px; align-items: stretch; }
.setup-block h3 { margin: 0 0 12px; color: #f3f7d1; font-size: 15px; letter-spacing: .05em; }
.monkey-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.monkey-choice { --player-color: #ef4b42; min-height: 182px; padding: 8px 5px 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; border: 3px solid color-mix(in srgb, var(--player-color), black 30%); border-radius: 20px; color: #fff; background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--player-color), white 13%), rgba(5,20,8,.92) 68%); box-shadow: inset 0 2px rgba(255,255,255,.18), 0 6px #07170a; cursor: pointer; transition: transform .16s, filter .16s, outline .16s; }
.monkey-choice .monkey-sprite { width: 61px; height: 122px; animation: characterBob 2.6s ease-in-out infinite; }
.monkey-choice strong { font-size: 12px; }.monkey-choice:hover { transform: translateY(-4px); filter: brightness(1.12); }.monkey-choice.is-selected { outline: 5px solid #fff27a; outline-offset: 2px; transform: translateY(-5px) scale(1.02); }
.solo-name-block { min-width: 0; }.solo-name-card { min-height: 182px; padding: 13px; display: grid; grid-template-columns: 105px 1fr; align-items: center; gap: 8px; border: 2px solid #799b49; border-radius: 20px; background: rgba(5,19,8,.46); }
.solo-name-tapir { width: 105px; height: 125px; animation: tapirGroove 2.2s ease-in-out infinite; }.solo-name-card strong { display: block; margin-bottom: 9px; color: #eaff9d; font-size: 12px; }.solo-name-card input { width: 100%; min-width: 0; padding: 13px 12px; border: 2px solid #9eb975; border-radius: 12px; color: #fff; background: rgba(0,0,0,.42); font-weight: 900; }.solo-name-block > p { margin: 10px 5px 0; color: var(--ink-dim); font-size: 11px; line-height: 1.45; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 6px; background: rgba(3,14,6,.4); border-radius: 18px; }
.segmented button { height: 53px; border: 0; border-radius: 13px; background: rgba(255,255,255,.08); cursor: pointer; font-weight: 1000; font-size: 20px; }
.segmented button.is-selected { color: #23320e; background: var(--lime); box-shadow: inset 0 2px rgba(255,255,255,.45), 0 3px #698415; }
.mode-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mode-card { position: relative; min-height: 78px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; text-align: left; border: 2px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(4,17,7,.3); cursor: pointer; }
.mode-card .mode-icon { font-size: 27px; }.mode-card strong, .mode-card small { display: block; }.mode-card small { margin-top: 3px; color: var(--ink-dim); font-size: 11px; }
.mode-card i { display: none; position: absolute; right: 8px; top: 8px; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #243507; background: var(--lime); font-style: normal; font-size: 12px; }
.mode-card.is-selected { border-color: var(--lime); background: rgba(101, 144, 39, .27); }.mode-card.is-selected i { display: grid; }
.players-block { margin-top: 30px; }
.player-setup-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.player-setup { --player-color: #ed4b3e; min-height: 76px; display: grid; grid-template-columns: 47px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border: 2px solid color-mix(in srgb, var(--player-color), white 15%); border-radius: 16px; background: color-mix(in srgb, var(--player-color) 17%, rgba(6,17,7,.9)); }
.player-avatar { width: 45px; height: 63px; display: grid; place-items: center; border-radius: 40% 40% 48% 48%; background: radial-gradient(circle at 50% 65%, color-mix(in srgb, var(--player-color), white 18%), transparent 68%); }
.monkey-avatar { width: 36px; height: 72px; animation: characterBob 2.8s ease-in-out infinite; }
.player-setup input { width: 100%; min-width: 0; padding: 9px 10px; color: #fff; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; font-weight: 800; }
.player-keys { display: flex; gap: 3px; }
kbd { min-width: 25px; padding: 4px 6px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; color: #25310f; background: #f0f4d0; box-shadow: 0 2px #9aa17b; font: 800 11px/1 system-ui; }
.player-keys kbd:nth-child(1) { border-bottom: 4px solid var(--red); }.player-keys kbd:nth-child(2) { border-bottom: 4px solid var(--blue); }.player-keys kbd:nth-child(3) { border-bottom: 4px solid var(--orange); }.player-keys kbd:nth-child(4) { border-bottom: 4px solid var(--green); }
.setup-footer { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.key-hint { display: flex; align-items: center; gap: 10px; color: var(--ink-dim); font-size: 12px; }
.control-side-setting { min-width: 0; margin: 14px 0 0; padding: 10px; border: 2px solid rgba(190,222,118,.28); border-radius: 15px; background: rgba(3,14,6,.36); }.control-side-setting legend { padding: 0 6px; color: #e6f6a9; font-size: 11px; font-weight: 1000; letter-spacing: .05em; }.control-side-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }.control-side-option { min-width: 0; min-height: 48px; padding: 6px 8px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 2px solid rgba(255,255,255,.14); border-radius: 11px; color: #edf5d7; background: rgba(255,255,255,.06); cursor: pointer; }.control-side-option strong { font-size: 10px; }.control-side-option.is-selected { border-color: #dafa55; color: #26350f; background: #cbe94c; box-shadow: inset 0 2px rgba(255,255,255,.45), 0 3px #607711; }.control-side-preview { position: relative; width: 42px; height: 25px; flex: 0 0 42px; border: 2px solid currentColor; border-radius: 7px 7px 10px 10px; opacity: .88; }.control-side-preview::before, .control-side-preview::after { content: ""; position: absolute; top: 50%; transform: translateY(-50%); border-radius: 50%; }.control-side-preview::before { left: 4px; width: 13px; height: 13px; background: currentColor; box-shadow: inset 0 0 0 3px rgba(0,0,0,.24); }.control-side-preview::after { right: 6px; width: 5px; height: 5px; background: currentColor; box-shadow: 7px -5px 0 -1px currentColor; }.control-side-option[data-control-side="right"] .control-side-preview { transform: scaleX(-1); }.control-side-setting > small { display: block; margin: 7px 2px 0; color: var(--ink-dim); font-size: 9px; line-height: 1.35; }

.online-setup-panel { width: min(1120px, 100%); padding: clamp(22px, 3.7vw, 42px); }
.online-setup-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; align-items: stretch; }
.online-profile-block { min-width: 0; padding: 18px; border: 2px solid rgba(204,230,122,.28); border-radius: 21px; background: rgba(4,17,7,.32); }
.online-profile-block .monkey-choice { min-height: 150px; }.online-profile-block .monkey-choice .monkey-sprite { width: 51px; height: 102px; }
.online-name-field { margin-top: 18px; display: block; }.online-name-field > span, .room-code-input > span { display: block; margin: 0 0 6px; color: #dff09d; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.online-name-field input, .room-code-input input { width: 100%; padding: 13px 14px; border: 2px solid #89a966; border-radius: 12px; color: #fff; background: rgba(0,0,0,.42); font-weight: 900; }
.online-connect-block { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.online-choice-card { min-width: 0; padding: 17px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; border: 2px solid rgba(255,255,255,.16); border-radius: 19px; background: rgba(4,17,7,.4); box-shadow: inset 0 1px rgba(255,255,255,.08); }.online-choice-card--host { border-color: rgba(255,205,73,.45); background: rgba(94,57,16,.26); }
.online-choice-icon { font-size: 39px; filter: drop-shadow(0 4px 2px #0006); }.online-choice-card h3 { margin: 3px 0 6px; font-size: 21px; }.online-choice-card p { margin: 0; color: var(--ink-dim); font-size: 12px; line-height: 1.45; }.online-choice-card .game-button { margin-top: auto; padding-left: 12px; padding-right: 12px; font-size: 14px; }
.room-code-input input { text-transform: uppercase; text-align: center; font-size: 22px; letter-spacing: .18em; }
.online-network-note { margin: 20px 0 0; padding: 10px 14px; border-radius: 12px; color: #eaf6bf; background: rgba(8,24,10,.42); text-align: center; font-size: 11px; line-height: 1.45; }

.online-lobby-panel { width: min(760px, 96%); padding: clamp(28px, 5vw, 52px); text-align: center; }.online-lobby-back { position: absolute; left: 17px; top: 17px; }.online-lobby-panel h2 { margin: 5px 0 19px; font-size: clamp(31px, 5vw, 48px); color: #fff399; }
.room-code-display { width: min(470px, 100%); margin: 0 auto 16px; padding: 13px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 3px solid #c0e94b; border-radius: 18px; background: rgba(3,18,7,.62); box-shadow: 0 0 25px rgba(189,234,67,.15); }.room-code-display > span { color: #cce67a; font-size: 10px; font-weight: 1000; letter-spacing: .13em; }.room-code-display strong { color: #fff08a; font-size: clamp(28px, 6vw, 42px); letter-spacing: .2em; text-shadow: 0 3px #4e2b10; }.room-code-display button { padding: 8px 10px; border: 1px solid #98b877; border-radius: 9px; background: #355b2e; font-size: 11px; font-weight: 900; cursor: pointer; }
.online-lobby-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-dim); font-size: 13px; }.online-lobby-status span { width: 10px; height: 10px; border-radius: 50%; background: #ffd84a; box-shadow: 0 0 10px #ffd84a; animation: lobbyPulse .8s ease-in-out infinite alternate; }.online-lobby-status.is-ready span { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.online-lobby-players { margin: 23px auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }.online-player-card { --player-color:#ef4b42; min-height: 142px; padding: 12px; display: grid; grid-template-columns: 75px 1fr; align-items: center; gap: 10px; border: 3px solid color-mix(in srgb,var(--player-color),white 18%); border-radius: 18px; background: color-mix(in srgb,var(--player-color) 18%,rgba(3,16,6,.92)); text-align: left; }.online-player-card.is-empty { display: flex; justify-content: center; border-style: dashed; border-color: rgba(255,255,255,.2); color: var(--ink-dim); background: rgba(0,0,0,.18); text-align: center; }.online-lobby-monkey { width: 64px; height: 128px; }.online-player-card strong, .online-player-card small { display: block; }.online-player-card strong { font-size: 18px; }.online-player-card small { margin-top: 5px; color: var(--ink-dim); font-size: 10px; text-transform: uppercase; }.online-player-card .connection-live { color: #dffc7c; }
.online-lobby-hint, .round-online-status { color: var(--ink-dim); font-size: 12px; }.round-online-status { margin: 12px auto 0 !important; }

.round-intro-card { width: min(650px, 94%); padding: clamp(30px, 5vw, 55px); text-align: center; }
.round-number { display: inline-block; padding: 7px 15px; border-radius: 999px; color: #26350c; background: var(--lime); font-size: 12px; font-weight: 1000; letter-spacing: .12em; }
.round-character-stage { position: relative; width: 250px; height: 115px; margin: 12px auto 0; display: grid; place-items: center; }
.round-icon { z-index: 2; margin: 0 0 2px -42px; font-size: clamp(62px, 10vw, 91px); filter: drop-shadow(0 8px 3px rgba(0,0,0,.35)); animation: iconBounce 1.5s ease-in-out infinite; }
.round-tapir { position: absolute; z-index: 3; right: 8px; bottom: -8px; width: 105px; height: 105px; animation: tapirGroove 2.2s ease-in-out infinite; }
.round-intro-card h2 { margin: 4px 0 10px; font-size: clamp(35px, 6vw, 58px); color: #fff398; text-shadow: 0 4px #3b210e; }
.round-intro-card > p { max-width: 500px; margin: 0 auto 16px; color: var(--ink-dim); font-size: 17px; }
.rule-pill { display: inline-block; padding: 10px 18px; border: 1px solid #719d4b; border-radius: 12px; background: rgba(7,23,10,.5); color: #eafaaf; font-size: 13px; font-weight: 800; }
.mini-standings { margin: 24px auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.mini-standing { --player-color: #fff; min-height: 40px; padding: 3px 10px 3px 5px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: rgba(0,0,0,.27); border-left: 5px solid var(--player-color); font-size: 12px; font-weight: 800; }
.mini-monkey { width: 18px; height: 36px; }
.mini-standing strong { color: #fff09b; margin-left: 6px; }
.online-rival-actor { --rival-color:#3aa8ec; position: absolute; z-index: 11; left: 68%; top: 72%; width: 58px; height: 116px; transform: translate(-50%,-50%) scale(.88); transform-origin: 50% 100%; pointer-events: none; transition: left .2s linear, top .2s linear; filter: drop-shadow(0 0 8px color-mix(in srgb,var(--rival-color),transparent 30%)); }.online-rival-monkey { width: 58px; height: 116px; animation: rivalSwim .8s ease-in-out infinite alternate; }.online-rival-actor small { position: absolute; left: 50%; bottom: -12px; min-width: max-content; padding: 3px 7px; transform: translateX(-50%); border: 2px solid var(--rival-color); border-radius: 999px; color: #fff; background: rgba(4,16,7,.82); font-size: 8px; font-weight: 1000; text-shadow: 0 1px #000; }.online-rival-actor.pose-action { animation: rivalAction .28s ease; }.online-rival-actor.pose-jump { transform: translate(-50%,-75%) scale(.88) rotate(-4deg); }.online-rival-actor.pose-duck { transform: translate(-50%,-35%) scale(.88,.58); }.online-rival-actor.pose-success { animation: rivalCelebrate .55s ease; }.online-rival-actor.pose-miss { animation: rivalMiss .38s ease; }

.screen-question { padding-top: 4px; flex-direction: column; justify-content: flex-start; }
.hud-row { width: min(1420px, 100%); min-height: 64px; display: grid; grid-template-columns: 210px 1fr 64px; align-items: center; gap: 24px; }
.hud-badge span, .hud-badge strong { display: block; }.hud-badge span { color: #e2ef92; font-size: 10px; letter-spacing: .13em; }.hud-badge strong { font-size: 16px; }
.question-progress { height: 10px; border: 2px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(0,0,0,.35); overflow: hidden; }
.question-progress div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6fca38, #e5ef3c); transition: width .4s ease; }
.timer { position: relative; width: 54px; height: 54px; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }.timer circle { fill: none; stroke-width: 4; }.timer-bg { stroke: rgba(0,0,0,.4); }.timer-ring { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 0; transition: stroke .2s; }
.timer strong { z-index: 1; font-size: 17px; text-shadow: 0 2px 4px #000; }.timer.is-urgent { animation: urgent .55s ease-in-out infinite alternate; }.timer.is-urgent .timer-ring { stroke: #ff6251; }

.question-board { width: min(980px, 100%); min-height: 150px; margin: 7px auto 13px; padding: 27px clamp(20px, 4vw, 55px) 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: linear-gradient(165deg, rgba(26,47,24,.96), rgba(8,25,12,.97)); border: 4px solid #8a5a30; border-radius: 24px; box-shadow: inset 0 0 25px rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.3); }
.minigame-board { position: relative; width: min(1420px, 100%); min-height: clamp(440px, 52vh, 610px); margin: 7px auto 12px; padding: 28px clamp(18px, 2.5vw, 42px) 22px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; background: linear-gradient(165deg, rgba(26,47,24,.97), rgba(8,25,12,.98)); border: 5px solid #8a5a30; border-radius: 27px; box-shadow: inset 0 0 30px rgba(0,0,0,.4), 0 15px 38px rgba(0,0,0,.38); }
.minigame-board > h2 { z-index: 2; margin: 0; font-size: clamp(29px, 3vw, 45px); color: #fff499; text-shadow: 0 3px #351c0d; }
.minigame-board > p { z-index: 2; min-height: 21px; margin: 4px 0 10px; color: var(--ink-dim); font-size: clamp(13px, 1.2vw, 16px); }
.minigame-board .category-chip { z-index: 3; margin-top: -39px; }
.minigame-arena { position: relative; isolation: isolate; width: 100%; flex: 1; min-height: clamp(350px, 42vh, 500px); border: 4px solid #ae7a3d; border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 50% 25%, rgba(139,180,74,.18), rgba(0,0,0,.25)); box-shadow: inset 0 0 42px rgba(0,0,0,.58), 0 8px 19px rgba(0,0,0,.32); }
.game-countdown { position: absolute; z-index: 15; inset: 0; display: grid; place-items: center; color: #fff06c; background: rgba(5,18,8,.72); backdrop-filter: blur(3px); font-size: clamp(72px, 14vw, 145px); font-weight: 1000; white-space: pre-line; text-align: center; line-height: .9; -webkit-text-stroke: 4px #4e210f; text-shadow: 0 8px #8c3516, 0 14px 25px #000; animation: countdownPop .75s ease-in-out infinite; }
.game-countdown[hidden] { display: none; }.game-countdown.is-go { color: #dfff45; transform: rotate(-3deg); }
.action-pad { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.action-pad--two { width: min(720px, 100%); grid-template-columns: repeat(2, 1fr); }
.action-pad--dpad { position: relative; isolation: isolate; width: min(390px, 100%); height: 184px; display: block; padding: 0; border: 4px solid #18221d; border-radius: 48px 48px 62px 62px; background: radial-gradient(circle at 50% 44%, #4d5752 0 86px, transparent 87px), linear-gradient(155deg, #68746e, #33413a 48%, #17211c); box-shadow: inset 0 3px rgba(255,255,255,.18), inset 0 -8px rgba(0,0,0,.35), 0 8px 0 #0d1511, 0 14px 25px #0008; }
.action-pad--dpad::before, .action-pad--dpad::after { content: ""; position: absolute; left: 50%; top: 50%; pointer-events: none; }
.action-pad--dpad::before { z-index: 0; width: 174px; height: 174px; transform: translate(-50%,-50%); border: 2px solid #202a25; border-radius: 50%; background: radial-gradient(circle at 42% 34%, #515c56, #252e29 68%, #121814); box-shadow: inset 0 4px 8px #ffffff18, inset 0 -7px 10px #0009, 0 3px 7px #0009; }
.action-pad--dpad::after { z-index: 3; width: 27px; height: 27px; transform: translate(-50%,-50%) rotate(45deg); border: 2px solid #101713; border-radius: 7px; background: linear-gradient(145deg, #434d48, #1a211e); box-shadow: inset 2px 2px 3px #ffffff17, 2px 2px 4px #000a; }
.action-pad--dpad .action-button { position: absolute; z-index: 2; min-height: 0; margin: 0; padding: 0; border: 3px solid #0e1511; border-radius: 13px; background: linear-gradient(145deg, #4a534f 5%, #242a27 62%, #161b18); box-shadow: inset 3px 3px 4px #ffffff1c, inset -3px -4px 5px #0007, 0 3px 4px #000a; touch-action: none; }
.action-pad--dpad [data-game-button="0"] { left: calc(50% - 88px); top: calc(50% - 30px); width: 76px; height: 60px; clip-path: polygon(0 23%, 18% 2%, 100% 25%, 100% 75%, 18% 98%, 0 77%); }
.action-pad--dpad [data-game-button="1"] { left: calc(50% - 34px); top: calc(50% - 82px); width: 68px; height: 72px; clip-path: polygon(22% 0, 78% 0, 98% 18%, 75% 100%, 25% 100%, 2% 18%); }
.action-pad--dpad [data-game-button="2"] { left: calc(50% - 34px); top: calc(50% + 10px); width: 68px; height: 72px; clip-path: polygon(25% 0, 75% 0, 98% 82%, 78% 100%, 22% 100%, 2% 82%); }
.action-pad--dpad [data-game-button="3"] { left: calc(50% + 12px); top: calc(50% - 30px); width: 76px; height: 60px; clip-path: polygon(0 25%, 82% 2%, 100% 23%, 100% 77%, 82% 98%, 0 75%); }
.action-pad--dpad .action-button:hover { filter: brightness(1.22); }.action-pad--dpad .action-button:active, .action-pad--dpad .action-button.is-pulsing { transform: scale(.94); filter: brightness(1.35); box-shadow: inset 3px 4px 7px #000b; }.action-pad--dpad .action-button span { font-size: 24px; line-height: 1; color: #9aa39f; text-shadow: 0 2px 2px #000; }.action-pad--dpad .action-button small { display: none; }
.action-pad--dpad .action-button.is-disabled { opacity: .24; filter: saturate(0) brightness(.62); pointer-events: none; box-shadow: inset 2px 3px 6px #000b; }
.action-button { --answer-color: #ed4b3e; min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 3px solid color-mix(in srgb, var(--answer-color), black 35%); border-radius: 18px; color: #fff; background: linear-gradient(color-mix(in srgb, var(--answer-color), white 13%), color-mix(in srgb, var(--answer-color), black 18%)); box-shadow: inset 0 2px rgba(255,255,255,.3), 0 6px color-mix(in srgb, var(--answer-color), black 48%); cursor: pointer; text-shadow: 0 2px 3px #0007; }
.action-button[hidden] { display: none; }
.action-button:hover { transform: translateY(-2px); filter: brightness(1.12); }.action-button:active, .action-button.is-pulsing { transform: translateY(3px); box-shadow: inset 0 2px rgba(255,255,255,.2), 0 2px color-mix(in srgb, var(--answer-color), black 48%); }
.action-button span { font-size: 29px; font-weight: 1000; }.action-button small { font-size: 11px; font-weight: 1000; letter-spacing: .1em; }
.color-arena { display: grid; place-items: center; background: radial-gradient(circle at 50% 52%, rgba(212,255,87,.15), rgba(0,22,7,.48)), url("arena-clearing-v1.png") center 57% / cover no-repeat; }
.color-fruit { --cue-color: #fff; z-index: 6; width: clamp(148px, 13vw, 190px); height: clamp(148px, 13vw, 190px); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 28%, white, var(--cue-color) 25%, color-mix(in srgb, var(--cue-color), black 35%) 72%); box-shadow: 0 0 0 11px rgba(255,255,255,.12), 0 0 52px 15px var(--cue-color), 0 19px 25px #0008; font-size: clamp(76px, 7vw, 98px); }
.color-fruit.cue-pop { animation: cuePop .28s cubic-bezier(.2,1.5,.4,1); }
.cue-counter { position: absolute; z-index: 12; right: 12px; bottom: 10px; padding: 6px 12px; border-radius: 999px; color: #e8f9b7; background: rgba(0,0,0,.58); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.race-arena { padding: 16px; background: linear-gradient(90deg, rgba(4,34,9,.58), rgba(32,83,22,.25)), url("arena-clearing-v1.png") center 54% / cover no-repeat; }
.race-lanes, .sneak-lanes { position: relative; z-index: 4; height: 100%; display: flex; flex-direction: column; justify-content: space-around; gap: 9px; }.race-arena .race-lanes { padding-right: 122px; }
.race-lane { display: grid; grid-template-columns: 54px 1fr 48px; align-items: center; gap: 10px; }.race-name { height: 72px; display: grid; place-items: center; }.lane-monkey { width: 36px; height: 72px; }.race-track { position: relative; height: 43px; border-radius: 22px; background: rgba(8,25,8,.63); border: 3px solid rgba(255,255,255,.3); box-shadow: inset 0 2px 8px #0008; }.race-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--player-color), color-mix(in srgb, var(--player-color), white 35%)); transition: width .12s; }.race-track b { position: absolute; top: 50%; left: 0; width: 43px; height: 86px; transform: translate(-50%,-50%); transition: left .12s; }.monkey-racer { width: 43px; height: 86px; animation: runnerBounce .45s ease-in-out infinite alternate; }.race-lane em { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff9; background: rgba(13,55,12,.65); font-style: normal; font-weight: 1000; }.race-lane.is-finished .race-track { box-shadow: 0 0 18px #fff97a; }
.echo-arena { display: grid; place-items: center; background: radial-gradient(circle at 50% 52%, rgba(245,174,60,.1), rgba(0,0,0,.55)), url("arena-temple-v1.png") center 55% / cover no-repeat; }.echo-pads { position: relative; z-index: 7; display: grid; grid-template-columns: repeat(2, 105px); gap: 16px; padding: 19px; border: 5px solid #7b471f; border-radius: 45px; background: rgba(54,27,12,.68); box-shadow: 0 15px 30px #0009; }.echo-pads span { width: 105px; height: 105px; display: grid; place-items: center; border-radius: 50%; border: 8px solid color-mix(in srgb, var(--pad-color), #5a2d16 48%); color: #fff; background: radial-gradient(circle, color-mix(in srgb, var(--pad-color), white 25%), color-mix(in srgb, var(--pad-color), black 28%) 66%); box-shadow: inset 0 0 0 5px rgba(255,255,255,.16), 0 8px #3b1e12; font-size: 33px; font-weight: 1000; transition: .12s; }.echo-pads span.is-lit { filter: brightness(1.8); transform: scale(1.18); box-shadow: 0 0 35px 8px var(--pad-color); }
.sneak-arena { display: grid; grid-template-columns: 205px 1fr; align-items: stretch; gap: 24px; padding: 16px; background: linear-gradient(90deg, rgba(22,8,3,.67), rgba(19,31,5,.36)), url("arena-temple-v1.png") center 58% / cover no-repeat; }.temple-guard { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 13px; border: 4px solid #c68536; border-radius: 18px; background: rgba(117,39,26,.82); box-shadow: inset 0 0 24px #0007; }.tapir-guard { width: 175px; height: 195px; transition: transform .25s; }.temple-guard strong { z-index: 2; margin-top: -6px; padding: 6px 11px; border-radius: 9px; background: rgba(0,0,0,.62); font-size: 14px; }.guard-sleep { position: absolute; z-index: 4; right: 13px; top: 13px; color: #dfffa7; font-size: 25px; font-weight: 1000; opacity: 0; transform: rotate(-10deg); }.temple-guard.is-sleeping { background: rgba(34,119,53,.8); box-shadow: 0 0 30px #6cff6c66; }.temple-guard.is-sleeping .guard-sleep { opacity: 1; animation: sleepFloat 1.1s ease-in-out infinite; }.tapir-guard.is-dozing { transform: rotate(-7deg) translateY(8px); }.sneak-lane { position: relative; min-height: 72px; border-bottom: 4px dashed rgba(255,255,255,.35); }.sneak-lane b { position: absolute; z-index: 2; left: 0; bottom: -5px; width: 42px; height: 84px; transform: translateX(-50%); transition: left .1s; }.monkey-runner { width: 42px; height: 84px; }.sneak-lane i { position: absolute; left: 0; bottom: -4px; width: 0; height: 4px; background: var(--player-color); box-shadow: 0 0 9px var(--player-color); }.sneak-lane em { position: absolute; right: 0; bottom: 7px; font-size: 25px; font-style: normal; }
.drop-arena { background: linear-gradient(rgba(22,70,104,.1), rgba(1,27,19,.28)), url("arena-waterfall-v1.png") center 48% / cover no-repeat; }.drop-lanes { position: absolute; z-index: 5; inset: 0 13% 0 5%; display: grid; grid-template-columns: repeat(4, 1fr); }.drop-lane { position: relative; border-left: 2px dashed rgba(255,255,255,.48); }.drop-lane:last-child { border-right: 2px dashed rgba(255,255,255,.48); }.drop-lane b { position: absolute; z-index: 2; top: 0; left: 50%; width: 50px; height: 100px; transform: translate(-50%,-50%); filter: drop-shadow(0 4px 3px #0008); }.monkey-faller { width: 50px; height: 100px; }.drop-lane i { position: absolute; top: -18px; left: calc(50% + 21px); font-size: 25px; font-style: normal; }.drop-lane.is-deployed b { transition: top .25s ease-out; }.drop-zone { position: absolute; z-index: 4; top: 68%; left: 0; right: 0; height: 19%; display: grid; place-items: center; color: rgba(255,255,255,.92); background: rgba(62,207,63,.3); border-top: 4px dashed #eaff9c; border-bottom: 4px dashed #eaff9c; text-shadow: 0 2px 4px #06320c; font-size: 13px; font-weight: 1000; letter-spacing: .2em; }
.target-arena { background: radial-gradient(ellipse at 50% 78%, rgba(255,117,24,.08), rgba(15,3,0,.48)), url("arena-volcano-v1.png") center 61% / cover no-repeat; }.lava-target { --target-color: #fff; position: absolute; z-index: 8; width: 86px; height: 86px; display: grid; place-items: center; border: 5px solid white; border-radius: 50%; color: #fff; background: var(--target-color); box-shadow: 0 0 34px 13px var(--target-color); font-size: 32px; font-weight: 1000; pointer-events: none; }.lava-target.target-pop { animation: targetPop .75s ease-out both; }

.runner-arena { background: linear-gradient(rgba(12,45,8,.12), rgba(4,24,7,.48)), url("arena-clearing-v1.png") center 61% / cover no-repeat; }
.runner-sunbeams { position: absolute; inset: 0; background: linear-gradient(108deg, transparent 14%, rgba(255,244,150,.12) 31%, transparent 43%); animation: riverShimmer 4s ease-in-out infinite alternate; }
.runner-ground { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 25%; border-top: 5px solid #a96a32; background: linear-gradient(rgba(93,54,24,.22), rgba(45,24,9,.78)), repeating-linear-gradient(91deg, #8e5a2b 0 9%, #613619 9% 10%); box-shadow: 0 -12px 24px rgba(0,0,0,.24); }
.runner-player { --runner-y: 0px; position: absolute; z-index: 9; left: 18%; bottom: 43px; width: 65px; height: 130px; transform: translate(-50%, calc(0px - var(--runner-y))); transform-origin: 50% 100%; }
.monkey-arcade-runner { width: 65px; height: 130px; animation: runnerStride .34s ease-in-out infinite alternate; transform-origin: 50% 100%; }.runner-player.is-ducking .monkey-arcade-runner { animation: runnerDuck .72s ease both; }.runner-player.is-jumping .monkey-arcade-runner { animation: runnerJumpPose .42s ease-in-out infinite alternate; }
.runner-objects { position: absolute; z-index: 8; inset: 0; overflow: hidden; }.runner-obstacle { position: absolute; left: 0; bottom: 42px; width: 76px; height: 70px; display: grid; place-items: end center; font-size: 62px; filter: drop-shadow(0 6px 4px #0008); will-change: transform; }.runner-obstacle--leaf { width: 68px; height: 57px; font-size: 52px; }.runner-obstacle--toucan { bottom: 162px; width: 88px; height: 72px; place-items: center; }.runner-obstacle--toucan i { grid-area: 1 / 1; font-style: normal; font-size: 66px; animation: toucanHover .46s ease-in-out infinite alternate; }.runner-obstacle--toucan small { grid-area: 1 / 1; align-self: end; z-index: 2; margin-bottom: -5px; padding: 3px 7px; border: 2px solid #ffe56b; border-radius: 999px; color: #fff7b1; background: #7c281de8; font-size: 10px; font-weight: 1000; letter-spacing: .08em; text-shadow: 0 1px #000; }.runner-obstacle.is-hit { animation: objectHit .38s ease both; }
.arena-cast--runner { z-index: 4; }.arena-cast--runner .arena-monkey { width: 39px; height: 78px; opacity: .78; }.arena-cast--runner .tapir-stage-actor { width: 112px; height: 120px; }

.swim-arena { background: linear-gradient(rgba(12,107,142,.28), rgba(2,47,68,.52)), url("arena-waterfall-v1.png") center 54% / cover no-repeat; }
.river-current { position: absolute; inset: 0; opacity: .48; background: repeating-linear-gradient(172deg, transparent 0 48px, rgba(173,241,255,.2) 50px 54px, transparent 56px 92px); animation: riverCurrent 3.2s linear infinite; }.river-current::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 45% 75%, transparent 0 45%, rgba(0,45,55,.35)); }
.swim-objects { position: absolute; z-index: 8; inset: 0; overflow: hidden; }.swim-player { position: absolute; z-index: 10; left: 34%; top: 50%; width: 70px; height: 112px; transform: translate(-50%,-50%); transition: left .055s linear, top .055s linear; }.swim-player.is-invulnerable { animation: swimmerGrace .16s steps(2, end) 4; }.monkey-swimmer { position: relative; z-index: 2; width: 58px; height: 116px; animation: swimStroke .7s ease-in-out infinite alternate; }.swim-player i { position: absolute; z-index: 1; left: -14px; right: -14px; bottom: 8px; height: 26px; border: 5px solid rgba(194,251,255,.82); border-radius: 50%; box-shadow: 0 0 18px #b7f6ff; animation: swimRipple 1s ease-out infinite; }
.river-object { position: absolute; left: 0; top: 0; width: 70px; height: 70px; display: grid; place-items: center; font-size: 56px; filter: drop-shadow(0 7px 5px #002b3d); will-change: transform; }.river-object--banana { font-size: 47px; filter: drop-shadow(0 0 12px #fff071); }.river-object.is-collected, .temple-object.is-collected > i { animation: collectPop .3s ease both; }.river-object.is-hit, .temple-object.is-hit > i { animation: objectHit .38s ease both; }
.arena-cast--swim { z-index: 4; }.arena-cast--swim .arena-monkey { bottom: -9%; width: 42px; height: 84px; opacity: .75; }.arena-cast--swim .tapir-stage-actor { bottom: -7%; width: 118px; height: 126px; }

.temple-run-arena { background: linear-gradient(rgba(37,14,5,.34), rgba(8,8,2,.52)), url("arena-temple-v1.png") center 58% / cover no-repeat; }
.temple-perspective { position: absolute; z-index: 3; inset: 0 14%; clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%); background: linear-gradient(rgba(104,67,34,.2), rgba(42,24,12,.72)), repeating-linear-gradient(0deg, transparent 0 61px, rgba(223,175,100,.2) 63px 66px); border-bottom: 7px solid #b2753b; }.temple-perspective i { position: absolute; top: 0; bottom: 0; width: 4px; background: rgba(238,197,115,.55); box-shadow: 0 0 8px #2b1007; transform-origin: top; }.temple-perspective i:nth-child(1) { left: 30%; transform: rotate(7deg); }.temple-perspective i:nth-child(2) { left: 50%; }.temple-perspective i:nth-child(3) { right: 30%; transform: rotate(-7deg); }
.temple-objects { position: absolute; z-index: 8; inset: 0; overflow: hidden; }.temple-player { position: absolute; z-index: 10; left: 50%; bottom: 21px; width: 62px; height: 124px; transform: translateX(-50%); transition: left .11s cubic-bezier(.2,.9,.35,1.15); }.monkey-temple-runner { width: 62px; height: 124px; animation: runnerStride .35s ease-in-out infinite alternate; }.temple-object { position: absolute; left: 50%; top: 0; width: 70px; height: 70px; display: grid; place-items: center; font-size: 57px; filter: drop-shadow(0 8px 5px #0009); will-change: transform; }.temple-object > i { width: 100%; height: 100%; display: grid; place-items: center; font-style: normal; transform-origin: center; }.temple-object--banana { font-size: 46px; filter: drop-shadow(0 0 12px #fff071); }.temple-object--boulder > i { animation: boulderSpin 1.65s linear infinite; }
.arena-cast--temple { z-index: 4; }.arena-cast--temple .arena-monkey { width: 40px; height: 80px; opacity: .72; }.arena-cast--temple .tapir-stage-actor { width: 114px; height: 122px; }
.minigame-arena.arena-hit { animation: arenaHit .18s ease; }

.arena-cast { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.arena-monkey { position: absolute; bottom: -2%; width: 58px; height: 116px; animation: arenaMonkeyIdle 2.4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.arena-monkey--1 { left: 2.5%; animation-delay: -.2s; }.arena-monkey--2 { left: 11%; animation-delay: -1.1s; }.arena-monkey--3 { right: 18%; animation-delay: -.7s; }.arena-monkey--4 { right: 9.5%; animation-delay: -1.6s; }
.tapir-stage-actor { position: absolute; z-index: 4; right: 1.5%; bottom: -4%; width: 148px; height: 155px; animation: tapirGroove 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
.arena-cast--vine .tapir-stage-actor { right: .5%; bottom: -5%; width: 128px; height: 138px; }
.arena-cast--drop .tapir-stage-actor { right: .5%; bottom: -6%; width: 145px; height: 152px; }
.arena-cast--echo .tapir-stage-actor { bottom: -5%; }
.monkey-sprite.is-performing { animation: monkeyPerform .48s cubic-bezier(.2,.9,.3,1) both; }
.monkey-sprite.is-celebrating { animation: monkeyCelebrate .7s cubic-bezier(.2,1.4,.3,1) both; }
.monkey-sprite.is-stumbling { animation: monkeyStumble .58s ease both; }
.tapir-stage-actor.is-rattling, .tapir-guard.is-rattling { animation: tapirRattle .62s ease-in-out both; }
.tapir-stage-actor.is-shaking-head, .tapir-guard.is-shaking-head { animation: tapirHeadShake .55s ease-in-out both; }
.category-chip { align-self: center; margin-top: -43px; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; color: #2a310c; background: var(--yellow); font-size: 10px; font-weight: 1000; letter-spacing: .16em; box-shadow: 0 3px #aa6e19; }
.question-board h2 { max-width: 850px; margin: 0; font-size: clamp(23px, 3.2vw, 38px); line-height: 1.18; text-wrap: balance; }
.answer-grid { width: min(980px, 100%); display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.answer-button { --answer-color: #ed4b3e; min-height: 84px; display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 10px; padding: 11px 18px; border: 3px solid color-mix(in srgb, var(--answer-color), black 34%); border-radius: 18px; color: white; background: linear-gradient(135deg, color-mix(in srgb, var(--answer-color), white 12%), color-mix(in srgb, var(--answer-color), black 22%)); box-shadow: inset 0 2px rgba(255,255,255,.28), 0 6px color-mix(in srgb, var(--answer-color), black 48%), 0 9px 16px rgba(0,0,0,.25); cursor: pointer; text-align: left; transition: transform .12s, filter .12s, opacity .2s; }
.answer-button:hover { transform: translateY(-2px); filter: brightness(1.1); }.answer-button:active { transform: translateY(4px); box-shadow: inset 0 2px rgba(255,255,255,.2), 0 2px color-mix(in srgb, var(--answer-color), black 48%); }
.answer-button .answer-symbol { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(0,0,0,.13); font-size: 20px; font-weight: 1000; }
.answer-button .answer-text { font-size: clamp(16px, 2vw, 22px); font-weight: 1000; text-shadow: 0 2px 3px rgba(0,0,0,.45); }
.answer-button.is-muted { filter: grayscale(.6) brightness(.6); }.answer-button.is-correct { transform: scale(1.025); outline: 5px solid white; filter: brightness(1.15); }.answer-button.is-wrong { filter: grayscale(.75) brightness(.62); }
.player-dock { width: min(1420px, 100%); margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.player-dock--solo { width: min(1050px, 100%); }
.player-chip { --player-color: #ed4b3e; min-width: 0; min-height: 59px; padding: 5px 9px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 7px; border: 2px solid color-mix(in srgb, var(--player-color), white 15%); border-radius: 13px; background: rgba(7,20,9,.88); cursor: pointer; transition: .16s; }
.player-chip.is-online-rival { cursor: default; background: rgba(9,25,18,.9); }
.player-chip::before { content: ""; width: 7px; height: 38px; border-radius: 8px; background: var(--player-color); box-shadow: 0 0 8px var(--player-color); }.player-chip-copy { min-width: 0; display: flex; align-items: center; gap: 5px; }.player-chip-copy > span:last-child { min-width: 0; }.monkey-chip { width: 22px; height: 44px; }.player-chip strong, .player-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.player-chip strong { font-size: 12px; }.player-chip small { margin-top: 2px; color: var(--ink-dim); font-size: 9px; }.player-chip > b { color: #fff096; font-size: 12px; }.player-chip.is-active { outline: 3px solid white; transform: translateY(-3px); }.player-chip.has-answered { opacity: .63; }.player-chip.has-answered small { color: #cbef7b; }
.touch-hint { margin: 8px 0 0; color: rgba(255,255,255,.65); font-size: 10px; text-align: center; }

.reveal-card { width: min(800px, 96%); padding: clamp(25px, 4vw, 42px); text-align: center; }
.reveal-stamp { display: inline-block; padding: 7px 16px; border-radius: 999px; color: #27300d; background: var(--lime); font-size: 11px; font-weight: 1000; letter-spacing: .15em; }
.reveal-card h2 { margin: 13px 0 8px; color: #fff18b; font-size: clamp(34px, 6vw, 58px); }
.reveal-fact { max-width: 630px; margin: 0 auto 20px; color: var(--ink-dim); font-size: 14px; }
.answer-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.answer-result { --player-color: #fff; padding: 10px 13px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; text-align: left; border-radius: 13px; background: rgba(0,0,0,.28); border-left: 7px solid var(--player-color); }
.answer-result span { font-size: 20px; }.answer-result strong { font-size: 13px; }.answer-result small { display: block; color: var(--ink-dim); font-size: 10px; }.answer-result b { color: #fff087; font-size: 16px; }.answer-result.is-wrong b { color: #ff8d80; }
.auto-next { margin-top: 18px; color: var(--ink-dim); font-size: 11px; }.auto-next strong { display: inline-grid; width: 25px; height: 25px; margin-left: 4px; place-items: center; border-radius: 50%; color: #26320e; background: #dcec72; }

.result-panel, .winner-panel { width: min(700px, 96%); padding: clamp(28px, 5vw, 48px); text-align: center; }
.result-panel h2, .winner-panel h2 { margin: 7px 0; font-size: clamp(32px, 5vw, 49px); color: #fff29a; }.result-panel > p { color: var(--ink-dim); margin: 0 0 19px; }
.scoreboard { margin: 18px 0 28px; display: flex; flex-direction: column; gap: 8px; }
.score-row { --player-color: #fff; display: grid; grid-template-columns: 35px 34px 1fr auto; align-items: center; gap: 9px; min-height: 64px; padding: 5px 13px; border-radius: 14px; background: rgba(4,15,6,.45); border-left: 7px solid var(--player-color); text-align: left; }
.score-row .position { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #29340d; background: #e6edb7; font-size: 12px; }.score-row:nth-child(1) .position { background: #ffda45; transform: scale(1.1); }.score-row .animal { height: 56px; display: grid; place-items: center; }.score-monkey { width: 28px; height: 56px; }.score-row strong { font-size: 15px; }.score-row small { display: block; color: var(--ink-dim); font-size: 10px; }.score-row > b { color: #fff08a; font-size: 19px; }
.score-row.is-leader { background: rgba(113,128,31,.34); }

.screen-game-over { position: relative; overflow: hidden; }
#confettiCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.winner-panel { z-index: 2; }
.winner-crown { margin: 6px 0 -4px; font-size: 67px; animation: crown 1.3s ease-in-out infinite alternate; filter: drop-shadow(0 7px 2px rgba(0,0,0,.35)); }
.winner-monkey { width: 62px; height: 124px; margin: -26px auto -20px; display: block; animation: winnerBounce 1s ease-in-out infinite alternate; }
.winner-panel h2 { margin-bottom: 0; font-size: clamp(25px, 4vw, 38px); }
.winner-name { color: #ffda45; font-size: clamp(45px, 8vw, 78px); font-weight: 1000; line-height: 1; text-shadow: 0 5px #8c3611; overflow-wrap: anywhere; }.winner-score { margin: 8px 0 4px; color: #e8f9a5; font-size: 18px; font-weight: 900; }
.scoreboard--final { max-height: 230px; overflow-y: auto; }.winner-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.rules-dialog { width: min(670px, calc(100% - 25px)); padding: 0; border: 0; color: var(--ink); background: transparent; overflow: visible; }
.rules-dialog::backdrop { background: rgba(3,11,5,.8); backdrop-filter: blur(6px); }.rules-dialog form { padding: clamp(25px, 5vw, 45px); }.rules-dialog h2 { margin: 5px 0 21px; font-size: 38px; }.dialog-close { position: absolute; right: 13px; top: 11px; width: 38px; height: 38px; border-radius: 50%; border: 0; color: #fff; background: rgba(0,0,0,.35); cursor: pointer; font-size: 27px; }
.rules-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }.rules-list > div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }.rules-list b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #28320c; background: var(--lime); }.rules-list p, .rules-list strong, .rules-list span { display: block; margin: 0; }.rules-list strong { margin-bottom: 3px; }.rules-list span { color: var(--ink-dim); font-size: 12px; line-height: 1.45; }.shortcut-row { padding: 12px; margin: 16px 0; border-radius: 12px; background: rgba(0,0,0,.27); color: var(--ink-dim); font-size: 11px; word-spacing: 5px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; max-width: calc(100% - 30px); padding: 10px 18px; transform: translate(-50%, 30px); opacity: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(8,22,11,.94); box-shadow: 0 8px 25px #0008; font-size: 12px; font-weight: 800; pointer-events: none; transition: .25s; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes screenIn { from { opacity: 0; transform: scale(.97) translateY(10px); } }
@keyframes float { 50% { transform: translate(12px, -16px); opacity: .35; } }
@keyframes drift { to { transform: translateX(24vw) scale(1.15); } }
@keyframes iconBounce { 50% { transform: translateY(-7px) rotate(3deg); } }
@keyframes urgent { to { transform: scale(1.08); } }
@keyframes crown { to { transform: translateY(-7px) rotate(4deg); } }
@keyframes countdownPop { 50% { transform: scale(1.08); } }
@keyframes cuePop { from { transform: scale(.3) rotate(-20deg); opacity: .2; } to { transform: scale(1); opacity: 1; } }
@keyframes targetPop { 0% { transform: scale(.3); opacity: 0; } 20% { transform: scale(1.15); opacity: 1; } 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(.2); opacity: .2; } }
@keyframes characterBob { 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes tapirGroove { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes runnerBounce { to { transform: translateY(-4px) rotate(2deg); } }
@keyframes sleepFloat { 50% { transform: translate(4px, -7px) rotate(-5deg); opacity: .58; } }
@keyframes winnerBounce { to { transform: translateY(-9px) rotate(3deg); } }
@keyframes arenaMonkeyIdle { to { transform: translateY(-8px) rotate(2deg); } }
@keyframes monkeyPerform { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-20px) rotate(-7deg) scale(1.08); } 72% { transform: translateY(-7px) rotate(6deg); } 100% { transform: translateY(0) rotate(0); } }
@keyframes monkeyCelebrate { 0% { transform: translateY(0) rotate(0) scale(1); } 35% { transform: translateY(-31px) rotate(-10deg) scale(1.13); } 60% { transform: translateY(-18px) rotate(11deg) scale(1.1); } 100% { transform: translateY(0) rotate(0) scale(1); } }
@keyframes monkeyStumble { 0% { transform: translateX(0) rotate(0); } 28% { transform: translateX(-12px) rotate(-13deg); } 55% { transform: translateX(8px) rotate(9deg) scaleY(.9); } 100% { transform: translateX(0) rotate(0); } }
@keyframes tapirRattle { 0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-5px) rotate(-5deg); } 40% { transform: translateY(-9px) rotate(5deg); } 60% { transform: translateY(-5px) rotate(-4deg); } 80% { transform: translateY(-8px) rotate(4deg); } }
@keyframes tapirHeadShake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-8px) rotate(-5deg); } 50% { transform: translateX(8px) rotate(5deg); } 75% { transform: translateX(-5px) rotate(-3deg); } }
@keyframes runnerStride { to { transform: translateY(-7px) rotate(3deg); } }
@keyframes runnerDuck { 35%, 80% { transform: scaleY(.58) translateY(27px) rotate(-5deg); } }
@keyframes runnerJumpPose { to { transform: rotate(9deg) scaleX(.95); } }
@keyframes toucanHover { to { transform: translateY(-7px) rotate(-5deg); } }
@keyframes riverCurrent { to { background-position: -220px 80px; } }
@keyframes riverShimmer { to { transform: translateX(14%); opacity: .45; } }
@keyframes swimStroke { to { transform: rotate(8deg) translateY(-7px); } }
@keyframes swimRipple { from { transform: scale(.55); opacity: .85; } to { transform: scale(1.35); opacity: 0; } }
@keyframes swimmerGrace { 50% { opacity: .35; filter: brightness(1.65); } }
@keyframes collectPop { 45% { scale: 1.55; rotate: -12deg; filter: brightness(1.8); } to { scale: .25; opacity: 0; } }
@keyframes objectHit { 35% { scale: 1.25; rotate: 14deg; filter: brightness(1.7); } to { scale: .65; opacity: .2; } }
@keyframes boulderSpin { to { transform: rotate(360deg); } }
@keyframes arenaHit { 45% { filter: saturate(1.8) brightness(1.25); box-shadow: inset 0 0 75px #ff423a; } }
@keyframes lobbyPulse { to { opacity: .45; transform: scale(.72); } }
@keyframes rivalSwim { to { transform: translateY(-5px) rotate(4deg); } }
@keyframes rivalAction { 45% { scale: 1.15; rotate: -5deg; } }
@keyframes rivalCelebrate { 45% { scale: 1.25; translate: 0 -12px; } }
@keyframes rivalMiss { 30% { translate: -7px 0; rotate: -8deg; } 65% { translate: 7px 0; rotate: 8deg; } }

@media (max-width: 820px) {
  body { background-attachment: scroll; }
  .home-layout { grid-template-columns: 1fr; }.leaderboard-card { width: min(480px, 100%); margin: 0 auto; }
  .screen-home { padding-top: 5px; }.leaderboard-list { min-height: 120px; }.empty-row { padding: 30px 4px; }
  .setup-grid, .solo-setup-grid { grid-template-columns: 1fr; gap: 22px; }.player-setup-list { grid-template-columns: 1fr; }
  .online-setup-grid { grid-template-columns: 1fr; }.online-setup-panel { margin: 8px auto; }.online-connect-block { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .setup-footer { flex-direction: column; }.key-hint { display: none; }
  .player-dock { grid-template-columns: repeat(2, 1fr); }.screen-question { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .action-pad--dpad[data-control-side="left"] { align-self: flex-start; }
  .action-pad--dpad[data-control-side="right"] { align-self: flex-end; }
}

@media (max-width: 560px) {
  .topbar { height: calc(62px + env(safe-area-inset-top)); padding: calc(7px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); }.control-label { display: none; }.icon-button { min-width: 46px; min-height: 46px; justify-content: center; padding: 7px; }.active-room-badge { padding: 7px 8px; font-size: 8px; }
  main, .screen { min-height: calc(100vh - 62px - env(safe-area-inset-top)); min-height: calc(100dvh - 62px - env(safe-area-inset-top)); }.screen { padding: 10px max(10px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .logo-main { font-size: 72px; }.logo-ribbon { margin-top: 16px; }.hero-cast { height: 104px; margin-bottom: -7px; }.hero-monkey { width: 44px; height: 88px; }.hero-tapir { width: 89px; height: 94px; }.leaderboard-card { padding: 20px; }
  .mode-picker { grid-template-columns: 1fr; }.monkey-picker { grid-template-columns: repeat(2, 1fr); }.monkey-choice { min-height: 138px; }.monkey-choice .monkey-sprite { width: 45px; height: 90px; }.solo-name-card { min-height: 135px; grid-template-columns: 82px 1fr; }.solo-name-tapir { width: 82px; height: 100px; }.player-setup { grid-template-columns: 47px minmax(0, 1fr); }.player-keys { grid-column: 2; }
  .online-setup-panel { padding: 19px 13px; }.online-setup-panel .section-heading { margin-bottom: 18px; }.online-profile-block { padding: 12px; }.online-connect-block { grid-template-columns: 1fr; }.online-choice-card { display: grid; grid-template-columns: 48px 1fr; }.online-choice-card .game-button, .online-choice-card .room-code-input { grid-column: 1 / -1; }.online-choice-icon { font-size: 34px; }.online-network-note { margin-top: 13px; }.online-lobby-panel { padding: 65px 16px 27px; }.room-code-display { grid-template-columns: 1fr auto; }.room-code-display > span { grid-column: 1 / -1; }.room-code-display strong { text-align: left; }.online-lobby-players { gap: 7px; }.online-player-card { min-height: 116px; padding: 8px; grid-template-columns: 47px 1fr; }.online-lobby-monkey { width: 43px; height: 86px; }.online-player-card strong { font-size: 13px; }
  .hud-row { grid-template-columns: 105px 1fr 48px; gap: 7px; }.hud-badge strong { font-size: 11px; }.timer { width: 46px; height: 46px; }
  .question-board { min-height: 125px; margin-top: 5px; padding: 23px 13px 15px; }.question-board h2 { font-size: 21px; }.category-chip { margin-top: -35px; margin-bottom: 10px; }
  .control-side-setting { padding: 8px; }.control-side-option { min-height: 45px; padding: 5px; }.control-side-preview { width: 37px; height: 23px; flex-basis: 37px; }.control-side-option strong { font-size: 9px; }
  .action-pad--dpad { width: min(276px, 100%); height: 150px; border-width: 3px; border-radius: 36px 36px 48px 48px; box-shadow: inset 0 3px rgba(255,255,255,.16), inset 0 -6px rgba(0,0,0,.34), 0 6px 0 #0d1511, 0 10px 18px #0007; }.action-pad--dpad::before { width: 140px; height: 140px; }.action-pad--dpad::after { width: 22px; height: 22px; border-radius: 5px; }.action-pad--dpad [data-game-button="0"] { left: calc(50% - 71px); top: calc(50% - 24px); width: 61px; height: 48px; }.action-pad--dpad [data-game-button="1"] { left: calc(50% - 27px); top: calc(50% - 66px); width: 54px; height: 58px; }.action-pad--dpad [data-game-button="2"] { left: calc(50% - 27px); top: calc(50% + 8px); width: 54px; height: 58px; }.action-pad--dpad [data-game-button="3"] { left: calc(50% + 10px); top: calc(50% - 24px); width: 61px; height: 48px; }.action-pad--dpad .action-button { border-width: 2px; border-radius: 10px; }.action-pad--dpad .action-button span { font-size: 19px; }
  .minigame-board { min-height: 390px; padding: 21px 8px 11px; }.minigame-board > h2 { font-size: 26px; }.minigame-board .category-chip { margin-top: -34px; }.minigame-arena { min-height: 285px; }.action-pad { gap: 5px; }.action-button { min-height: 53px; padding: 5px; flex-direction: column; gap: 1px; }.action-button span { font-size: 18px; }.action-button small { font-size: 8px; }.color-fruit { width: 112px; height: 112px; font-size: 57px; }.echo-pads { grid-template-columns: repeat(2, 62px); padding: 10px; }.echo-pads span { width: 62px; height: 62px; }.race-arena { padding: 7px; }.race-arena .race-lanes { padding-right: 58px; }.race-lane { grid-template-columns: 28px 1fr 30px; gap: 4px; }.race-name { height: 48px; }.lane-monkey { width: 22px; height: 44px; }.race-track { height: 29px; }.race-track b, .monkey-racer { width: 28px; height: 56px; }.race-lane em { width: 28px; height: 28px; font-size: 11px; }.sneak-arena { grid-template-columns: 78px 1fr; gap: 7px; padding: 7px; }.tapir-guard { width: 72px; height: 86px; }.temple-guard strong { font-size: 8px; }.guard-sleep { font-size: 12px; }.sneak-lane { min-height: 44px; }.sneak-lane b, .monkey-runner { width: 21px; height: 42px; }.drop-lanes { right: 18%; }.drop-lane b, .monkey-faller { width: 32px; height: 64px; }.drop-lane i { left: calc(50% + 12px); font-size: 17px; }.lava-target { width: 60px; height: 60px; font-size: 22px; }.runner-player { left: 20%; bottom: 30px; width: 42px; height: 84px; }.monkey-arcade-runner { width: 42px; height: 84px; }.runner-obstacle { bottom: 29px; width: 53px; height: 50px; font-size: 45px; }.runner-obstacle--leaf { width: 47px; height: 41px; font-size: 39px; }.runner-obstacle--toucan { bottom: 122px; width: 62px; height: 52px; }.runner-obstacle--toucan i { font-size: 48px; }.runner-obstacle--toucan small { margin-bottom: -3px; padding: 2px 5px; font-size: 7px; }.swim-player { width: 48px; height: 80px; }.monkey-swimmer { width: 42px; height: 84px; }.river-object { width: 51px; height: 51px; font-size: 42px; }.temple-player { bottom: 14px; width: 43px; height: 86px; }.monkey-temple-runner { width: 43px; height: 86px; }.temple-object { width: 54px; height: 54px; font-size: 45px; }.arena-monkey { width: 28px; height: 56px; }.arena-monkey--3 { right: 26%; }.arena-monkey--4 { right: 18%; }.tapir-stage-actor, .arena-cast--vine .tapir-stage-actor, .arena-cast--drop .tapir-stage-actor { width: 78px; height: 84px; right: 1%; }
  .online-rival-actor { width: 43px; height: 86px; }.online-rival-monkey { width: 43px; height: 86px; }
  .answer-grid { gap: 8px; }.answer-button { min-height: 76px; grid-template-columns: 34px 1fr; padding: 8px; border-width: 2px; border-radius: 14px; }.answer-button .answer-symbol { width: 31px; height: 31px; font-size: 14px; }.answer-button .answer-text { font-size: 14px; }
  .player-dock { margin-top: 13px; gap: 5px; }.player-chip { grid-template-columns: 6px minmax(0,1fr); padding: 4px 6px; }.player-chip::before { width: 5px; height: 34px; }.monkey-chip { width: 18px; height: 36px; }.player-chip > b { grid-column: 2; font-size: 10px; }.touch-hint { margin-top: 5px; }
  .answer-results { grid-template-columns: 1fr; }.reveal-card { padding: 23px 16px; }
  .bark-card::before, .bark-card::after { display: none; }.score-row { grid-template-columns: 28px 28px 1fr auto; padding: 5px 7px; }.score-monkey { width: 24px; height: 48px; }.score-row > b { font-size: 14px; }
  .toast { bottom: max(15px, calc(env(safe-area-inset-bottom) + 8px)); }
}

@media (max-height: 700px) and (min-width: 700px) {
  .topbar { height: 58px; padding-top: 5px; padding-bottom: 5px; }.screen, main { min-height: calc(100vh - 58px); }.screen { padding-top: 2px; padding-bottom: 12px; }
  .question-board { min-height: 118px; padding-top: 23px; padding-bottom: 14px; }.answer-button { min-height: 67px; }.player-dock { margin-top: 12px; }.touch-hint { margin: 5px 0 0; }
  .minigame-board { min-height: 380px; padding-top: 21px; }.minigame-arena { min-height: 270px; }.action-button { min-height: 54px; }.player-dock { margin-top: 8px; }.arena-monkey { width: 38px; height: 76px; }.tapir-stage-actor, .arena-cast--vine .tapir-stage-actor, .arena-cast--drop .tapir-stage-actor { width: 94px; height: 100px; }.race-arena .race-lanes { padding-right: 85px; }.race-lane { grid-template-columns: 38px 1fr 36px; }.race-name { height: 52px; }.lane-monkey { width: 25px; height: 50px; }.race-track { height: 31px; }.race-track b, .monkey-racer { width: 30px; height: 60px; }.race-lane em { width: 31px; height: 31px; }.echo-pads { grid-template-columns: repeat(2, 72px); padding: 11px; }.echo-pads span { width: 72px; height: 72px; }.sneak-arena { grid-template-columns: 118px 1fr; }.tapir-guard { width: 105px; height: 120px; }.sneak-lane { min-height: 45px; }.sneak-lane b, .monkey-runner { width: 25px; height: 50px; }.drop-lane b, .monkey-faller { width: 34px; height: 68px; }.lava-target { width: 62px; height: 62px; font-size: 23px; }
  .round-intro-card { padding: 25px 45px; }.round-character-stage { height: 92px; }.round-icon { font-size: 62px; }.round-tapir { width: 83px; height: 83px; }.mini-standings { margin: 14px auto; }
}

@media (max-width: 560px) and (max-height: 760px) {
  .topbar { height: calc(54px + env(safe-area-inset-top)); padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .mini-logo strong { font-size: 21px; }.mini-logo span { font-size: 8px; }.icon-button { min-width: 44px; min-height: 44px; }
  main, .screen { min-height: calc(100dvh - 54px - env(safe-area-inset-top)); }.screen-question { padding-top: 3px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .hud-row { min-height: 48px; }.timer { width: 42px; height: 42px; }.timer strong { font-size: 14px; }
  .minigame-board { min-height: 340px; margin-top: 2px; margin-bottom: 7px; padding-top: 18px; }.minigame-board > h2 { font-size: 22px; }.minigame-board > p { min-height: 15px; margin: 2px 0 5px; font-size: 11px; }.minigame-arena { min-height: 245px; }
  .action-button { min-height: 50px; }.player-dock { margin-top: 8px; }.player-chip { min-height: 51px; }.touch-hint { display: none; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .topbar { height: calc(50px + env(safe-area-inset-top)); padding-top: calc(3px + env(safe-area-inset-top)); padding-bottom: 3px; }
  main, .screen { min-height: calc(100dvh - 50px - env(safe-area-inset-top)); }.screen-question { padding: 2px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .hud-row { min-height: 42px; grid-template-columns: 130px 1fr 44px; gap: 9px; }.hud-badge span { font-size: 8px; }.hud-badge strong { font-size: 11px; }.timer { width: 40px; height: 40px; }
  .minigame-board { min-height: 270px; margin: 1px auto 6px; padding: 17px 10px 8px; border-width: 3px; }.minigame-board .category-chip { margin-top: -29px; margin-bottom: 5px; padding: 5px 11px; }.minigame-board > h2 { font-size: 21px; }.minigame-board > p { min-height: 14px; margin: 1px 0 4px; font-size: 10px; }.minigame-arena { min-height: 190px; border-width: 3px; }
  .action-pad { gap: 6px; }.action-button { min-height: 46px; padding: 4px; }.action-button span { font-size: 17px; }.action-button small { font-size: 8px; }.player-dock { margin-top: 6px; }.player-chip { min-height: 45px; }.monkey-chip { width: 17px; height: 34px; }.touch-hint { display: none; }
  .action-pad--dpad { width: min(272px, 100%); height: 116px; border-radius: 29px 29px 38px 38px; }.action-pad--dpad::before { width: 108px; height: 108px; }.action-pad--dpad::after { width: 17px; height: 17px; }.action-pad--dpad [data-game-button="0"] { left: calc(50% - 55px); top: calc(50% - 19px); width: 47px; height: 38px; }.action-pad--dpad [data-game-button="1"] { left: calc(50% - 21px); top: calc(50% - 51px); width: 42px; height: 45px; }.action-pad--dpad [data-game-button="2"] { left: calc(50% - 21px); top: calc(50% + 6px); width: 42px; height: 45px; }.action-pad--dpad [data-game-button="3"] { left: calc(50% + 8px); top: calc(50% - 19px); width: 47px; height: 38px; }.action-pad--dpad .action-button span { font-size: 16px; }
  .runner-player { bottom: 23px; width: 42px; height: 84px; }.monkey-arcade-runner { width: 42px; height: 84px; }.runner-obstacle { bottom: 22px; width: 50px; height: 48px; font-size: 43px; }.runner-obstacle--leaf { width: 44px; height: 39px; font-size: 37px; }.runner-obstacle--toucan { bottom: 111px; width: 58px; height: 48px; }.runner-obstacle--toucan i { font-size: 44px; }.runner-obstacle--toucan small { margin-bottom: -2px; padding: 1px 4px; font-size: 6px; }.swim-player { width: 47px; height: 76px; }.monkey-swimmer { width: 40px; height: 80px; }.river-object { width: 48px; height: 48px; font-size: 40px; }.temple-player { bottom: 10px; width: 41px; height: 82px; }.monkey-temple-runner { width: 41px; height: 82px; }.temple-object { width: 50px; height: 50px; font-size: 42px; }
}

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