body.adventures-page {
  margin: 0 !important;
  padding-top: 92px !important;
  min-height: 100vh;
  background:
    linear-gradient(rgba(5, 7, 10, .58), rgba(5, 7, 10, .88)),
    url('/images/radiolab.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #f5f5f5;
}

.adventure-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 10px;
  min-height: calc(100vh - 92px);
}

.adventures-page .site-nav {
  z-index: 5000 !important;
}

.adventures-page .adventure-shell section {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.adventures-page .adventure-shell > section {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.adventure-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(420px, 1fr) minmax(300px, 430px);
  gap: 12px;
  align-items: start;
  margin-top: 12px !important;
  padding: 0 !important;
}

.adventure-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  gap: 12px;
  padding: 0 !important;
}

.adventure-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.adventure-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px !important;
  padding: 0 !important;
}

.flow-monkey {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.flow-monkey img {
  width: 72px;
  filter: drop-shadow(0 0 12px rgba(255,208,0,.28));
}

.adventure-hero,
.adventure-mascot,
.adventure-panel,
.adventure-map-panel {
  background: rgba(0, 0, 0, .64);
  border: 1px solid rgba(255, 208, 0, .30);
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(120, 255, 0, .08);
  backdrop-filter: blur(6px);
}

.adventure-hero {
  min-height: 210px;
  padding: 24px !important;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .90), rgba(0, 0, 0, .55), rgba(0, 0, 0, .78)),
    url('/images/background.webp');
  background-size: cover;
  background-position: center;
}

.adventure-mascot {
  min-height: 210px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px !important;
}

.adventure-mascot h2 {
  color: #ffd000;
  margin: 0 0 8px;
}

.adventure-mascot p {
  margin: 0;
  color: rgba(255,255,255,.86);
}

.hero-monkey {
  width: 118px;
  align-self: end;
  justify-self: center;
  filter: drop-shadow(0 0 18px rgba(255, 208, 0, .34));
}

.eyebrow {
  margin: 0 0 8px;
  color: #9cff00;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.adventure-hero h1 {
  margin: 0;
  color: #ffd000;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 10px #000;
}

.hero-copy {
  max-width: 680px;
  margin: 12px 0 0;
  font-size: 1.05rem;
  color: #fff;
}

.hero-actions,
.form-actions,
.panel-head,
.code-form {
  display: flex;
  gap: 10px;
}

.hero-actions {
  flex-direction: column;
}

.control-stack {
  display: grid;
  gap: 10px;
}

.adventure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.adventure-panel,
.adventure-map-panel {
  padding: 16px !important;
  margin-top: 0 !important;
}

.adventure-panel h2,
.adventure-panel h3,
.adventure-map-panel h2,
.adventure-map-panel h3 {
  margin: 0 0 10px;
  color: #ffd000;
}

.adventure-panel p,
.adventure-map-panel p {
  color: rgba(255, 255, 255, .86);
  margin: 0 0 14px;
}

.panel-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.adventures-page main button {
  min-height: 42px;
  background: #ffd000;
  color: #111 !important;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.adventures-page main button.secondary,
.adventures-page main button.ghost {
  background: rgba(255, 208, 0, .12);
  color: #ffd000 !important;
  border: 1px solid rgba(255, 208, 0, .36);
}

.adventures-page main button.ghost {
  min-height: 36px;
  padding: 8px 12px;
}

.adventures-page main button:hover {
  filter: brightness(1.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.adventures-page main label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, .78);
  font-weight: 900;
  font-size: .86rem;
}

.adventures-page main input,
.adventures-page main select,
.adventures-page main textarea {
  width: 100%;
  background: #0c1118;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 1rem;
}

.adventures-page main textarea {
  min-height: 110px;
}

.adventure-map-panel .panel-head {
  gap: 16px;
}

.adventure-map-panel .panel-head p {
  margin-bottom: 0;
  max-width: 850px;
}

.adventure-map-panel .panel-head img {
  width: 76px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 12px rgba(156, 255, 0, .22));
}

.adventure-map {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 0, .25);
  border-radius: 8px;
  background: #07100c;
  z-index: 0;
}

.adventure-right .adventure-panel {
  max-height: 760px;
  overflow-y: auto;
}

.adventure-right .result-box,
.adventure-right .team-area,
.adventure-right .dashboard-area {
  max-height: 660px;
  overflow-y: auto;
}

.adventure-map .leaflet-pane,
.adventure-map .leaflet-top,
.adventure-map .leaflet-bottom {
  z-index: 1 !important;
}

.adventure-map .leaflet-control-container {
  position: relative;
  z-index: 2;
}

.banana-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  border: 2px solid rgba(255, 208, 0, .95);
  border-radius: 50% 50% 50% 12px;
  background: rgba(0, 0, 0, .82);
  color: #ffd000;
  font-size: 20px;
  transform: rotate(-45deg);
  box-shadow: 0 0 16px rgba(0, 0, 0, .70);
}

.banana-marker span {
  transform: rotate(45deg);
}

.banana-marker.is-active {
  border-color: #9cff00;
  box-shadow: 0 0 18px rgba(156, 255, 0, .65);
}

.banana-marker.is-complete {
  background: #ffd000;
  color: #111;
}

.checkpoint-editor {
  border: 1px solid rgba(255, 208, 0, .18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .04);
}

.checkpoint-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.checkpoint-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: end;
  border: 1px solid rgba(255, 208, 0, .16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, .32);
}

.checkpoint-row .checkpoint-task,
.checkpoint-row .checkpoint-answer,
.checkpoint-row .checkpoint-hint,
.checkpoint-row .checkpoint-coords {
  grid-column: 1 / -1;
}

.checkpoint-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffd000;
  color: #111;
  font-weight: 900;
}

.checkpoint-coords {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, .66);
  font-size: .78rem;
  font-family: Consolas, monospace;
}

.leaflet-popup-content {
  color: #111;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adventures-page main .check input {
  width: auto;
}

.code-form {
  align-items: end;
  max-width: 620px;
}

.code-form label {
  flex: 1;
}

.result-box,
.status-note {
  margin-top: 12px;
  border-left: 4px solid #9cff00;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  padding: 12px;
}

.preview-note {
  margin: 12px 0 0;
}

.team-code-grid,
.team-stats,
.dashboard-grid,
.ranking-grid {
  display: grid;
  gap: 10px;
}

.team-code-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}

.code-card,
.post-card,
.team-row,
.log-row,
.award-card {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 208, 0, .18);
  border-radius: 8px;
  padding: 12px;
}

.code-card small {
  display: block;
  color: rgba(255,255,255,.72);
  line-height: 1.35;
}

.code-big {
  display: inline-block;
  margin: 6px 0;
  color: #ffd000;
  font-family: Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.team-area,
.dashboard-area {
  margin-top: 14px;
}

.team-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.stat {
  border-left: 4px solid #9cff00;
  background: rgba(0, 0, 0, .38);
  border-radius: 8px;
  padding: 10px;
}

.stat small {
  display: block;
  color: rgba(255, 255, 255, .68);
}

.stat strong {
  color: #ffd000;
  font-size: 1.15rem;
}

.answer-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.feedback.ok {
  color: #9cff00;
}

.feedback.bad {
  color: #ff7777;
}

.dashboard-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.team-row {
  display: grid;
  grid-template-columns: 38px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.team-row span,
.log-row {
  font-size: .88rem;
}

.pill {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: #111;
  background: #ffd000;
  font-weight: 900;
}

.pill.active {
  background: #9cff00;
}

.pill.completed {
  background: #6aa8ff;
}

.log-row {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .84);
}

.log-row b {
  color: #ffd000;
}

.danger {
  margin-top: 12px;
  background: #401515;
  color: #fff !important;
  border: 1px solid rgba(255, 120, 120, .5);
}

.award-card {
  text-align: center;
  background:
    linear-gradient(rgba(0, 0, 0, .70), rgba(0, 0, 0, .82)),
    url('/images/award-bg.webp');
  background-size: cover;
  background-position: center;
}

.award-card h2 {
  font-size: clamp(1.8rem, 8vw, 3.2rem);
}

.hidden {
  display: none !important;
}

@media print {
  body * {
    visibility: hidden;
  }
  .award-card,
  .award-card * {
    visibility: visible;
  }
  .award-card {
    position: absolute;
    inset: 0;
    color: #111;
    background: #fff !important;
    border: 4px solid #111;
  }
  .award-card button {
    display: none;
  }
}

@media (max-width: 900px) {
  body.adventures-page {
    padding-top: 150px !important;
    background-attachment: scroll;
  }

  .adventure-shell {
    padding: 8px 8px 28px;
  }

  .adventure-hero,
  .adventure-top,
  .adventure-flow,
  .adventure-grid,
  .adventure-workspace,
  .form-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .adventure-hero {
    min-height: 360px;
    padding: 16px;
  }

  .hero-monkey {
    width: 96px;
    justify-self: start;
  }

  .adventure-map {
    min-height: 360px;
  }

  .code-form,
  .panel-head {
    display: grid;
  }

  .team-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* DX Jungle Adventures fullscreen game intro */
.adventure-intro {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 35%, rgba(156, 255, 0, .16), transparent 34%),
    radial-gradient(circle at 18% 78%, rgba(255, 208, 0, .12), transparent 28%),
    linear-gradient(135deg, rgba(0, 0, 0, .98), rgba(5, 13, 6, .96) 54%, rgba(0, 0, 0, .98));
  opacity: 0;
  animation: adventureIntroFadeIn .28s ease-out forwards;
}

.adventure-intro.is-ending {
  pointer-events: none;
  animation: adventureIntroFadeOut .42s ease-in forwards;
}

.adventure-intro__scan,
.adventure-intro__radar {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.adventure-intro__scan {
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156,255,0,.04) 1px, transparent 1px);
  background-size: 100% 7px, 42px 100%;
  mix-blend-mode: screen;
  opacity: .42;
  animation: adventureScan 1.2s linear infinite;
}

.adventure-intro__radar::before,
.adventure-intro__radar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vmin, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(156, 255, 0, .20);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 36px rgba(156, 255, 0, .08);
}

.adventure-intro__radar::after {
  background: conic-gradient(from 0deg, rgba(156,255,0,.32), rgba(156,255,0,.05) 18%, transparent 30%);
  border: 0;
  animation: adventureRadar 1.5s linear infinite;
  opacity: .55;
}

.adventure-intro__particles span {
  position: absolute;
  left: var(--x, 50%);
  bottom: -48px;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  opacity: .72;
  filter: drop-shadow(0 0 10px rgba(255, 208, 0, .34));
  animation: adventureParticle 2.6s linear infinite;
  animation-delay: var(--d, 0s);
}

.adventure-intro__particles span:nth-child(1) { --x: 9%; --d: -.3s; }
.adventure-intro__particles span:nth-child(2) { --x: 22%; --d: -1.1s; }
.adventure-intro__particles span:nth-child(3) { --x: 36%; --d: -.7s; }
.adventure-intro__particles span:nth-child(4) { --x: 51%; --d: -1.8s; }
.adventure-intro__particles span:nth-child(5) { --x: 64%; --d: -.2s; }
.adventure-intro__particles span:nth-child(6) { --x: 76%; --d: -1.4s; }
.adventure-intro__particles span:nth-child(7) { --x: 86%; --d: -.9s; }
.adventure-intro__particles span:nth-child(8) { --x: 94%; --d: -2.0s; }

.adventure-intro__panel {
  position: relative;
  width: min(100%, 760px);
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  border: 1px solid rgba(255, 208, 0, .38);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(7, 13, 8, .82), rgba(0, 0, 0, .72));
  box-shadow:
    0 0 0 1px rgba(156, 255, 0, .12),
    0 0 55px rgba(156, 255, 0, .13),
    0 28px 90px rgba(0, 0, 0, .62),
    inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
  transform: translateY(12px) scale(.98);
  animation: adventurePanelIn .42s cubic-bezier(.2, .9, .25, 1.1) forwards;
}

.adventure-intro__kicker,
.adventure-intro__subtitle,
.adventure-intro__classified {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 900;
}

.adventure-intro__kicker {
  color: #9cff00;
  font-size: .76rem;
}

.adventure-intro h2 {
  margin: 8px 0 0;
  color: #ffd000;
  font-size: clamp(2.1rem, 8vw, 5.4rem);
  line-height: .92;
  text-shadow:
    0 0 16px rgba(255, 208, 0, .36),
    0 5px 0 rgba(0, 0, 0, .72);
  animation: adventureTitleGlow .85s ease-in-out infinite alternate;
}

.adventure-intro__subtitle {
  margin-top: 12px;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(.82rem, 2.4vw, 1.05rem);
}

.adventure-intro__count {
  display: grid;
  place-items: center;
  width: clamp(96px, 24vw, 150px);
  aspect-ratio: 1;
  margin: 22px auto 12px;
  color: #111;
  font-size: clamp(3.2rem, 16vw, 7rem);
  font-weight: 1000;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6a8 0, #ffd000 55%, #bb8500 100%);
  box-shadow:
    0 0 28px rgba(255, 208, 0, .55),
    0 0 0 10px rgba(255, 208, 0, .08);
  transform-origin: center;
  animation: adventureCountPulse .45s ease-out infinite alternate;
}

.adventure-intro__status {
  min-height: 1.8em;
  margin: 0 auto 16px;
  color: #eaffd5;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(156, 255, 0, .25);
}

.adventure-intro__progress {
  width: min(100%, 520px);
  height: 12px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 0, .34);
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .75);
}

.adventure-intro__progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #9cff00, #ffd000 68%, #fff3a0);
  box-shadow: 0 0 18px rgba(255, 208, 0, .55);
}

.adventure-intro__classified {
  min-height: 2.4em;
  color: rgba(255, 208, 0, .84);
  font-size: clamp(.68rem, 2vw, .82rem);
}

.adventure-intro__enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 320px);
  min-height: 58px !important;
  margin-top: 18px;
  padding: 0 30px !important;
  color: #111 !important;
  border: 1px solid rgba(255, 248, 170, .9) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #fff08a, #ffd000 52%, #ffae00) !important;
  box-shadow:
    0 6px 0 #7a5200,
    0 0 24px rgba(255, 208, 0, .42),
    0 0 44px rgba(156, 255, 0, .16) !important;
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 1000;
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s ease, filter .18s ease;
}

.adventure-intro__enter.is-ready {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: adventureEnterPulse 1.1s ease-in-out infinite alternate;
}

.adventure-intro__enter:hover {
  filter: brightness(1.08);
}

.adventure-intro__skip {
  position: absolute;
  right: 18px;
  bottom: 16px;
  min-height: 34px !important;
  padding: 7px 11px !important;
  color: #ffd000 !important;
  border: 1px solid rgba(255, 208, 0, .34) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, .38) !important;
  font-size: .82rem;
}

@keyframes adventureIntroFadeIn {
  to { opacity: 1; }
}

@keyframes adventureIntroFadeOut {
  to { opacity: 0; transform: scale(1.02); }
}

@keyframes adventurePanelIn {
  to { transform: translateY(0) scale(1); }
}

@keyframes adventureScan {
  to { background-position: 0 28px, 42px 0; }
}

@keyframes adventureRadar {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes adventureParticle {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: .72; }
  100% { transform: translateY(-112vh) rotate(260deg); opacity: 0; }
}

@keyframes adventureTitleGlow {
  from { filter: drop-shadow(0 0 2px rgba(255, 208, 0, .24)); }
  to { filter: drop-shadow(0 0 16px rgba(156, 255, 0, .24)); }
}

@keyframes adventureCountPulse {
  from { transform: scale(.96); }
  to { transform: scale(1.04); }
}

@keyframes adventureEnterPulse {
  from { box-shadow: 0 6px 0 #7a5200, 0 0 20px rgba(255, 208, 0, .38), 0 0 36px rgba(156, 255, 0, .12); }
  to { box-shadow: 0 6px 0 #7a5200, 0 0 32px rgba(255, 208, 0, .66), 0 0 58px rgba(156, 255, 0, .28); }
}

@media (max-width: 620px) {
  .adventure-intro {
    padding: 12px;
  }

  .adventure-intro__panel {
    padding: 24px 16px 78px;
    border-radius: 22px;
  }

  .adventure-intro__skip {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

