/* Adventure run: the trail strip, the fork cards, and the four stop kinds.
   Same chunky outlined "sticker" language as style.css — every tap target is 56px or bigger. */

.run-screen { min-height: 100%; background-size: cover; background-position: center; display: flex; flex-direction: column; }
.run-wrap {
  flex: 1; min-height: 0; width: min(900px, calc(100% - 24px)); margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px; padding: 10px 0 18px;
}

/* ---------- the little path across the top ---------- */
.run-path {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  background: rgba(255, 250, 240, .92); border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink); padding: 8px 12px;
}
.run-stop { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 4px 2px; border-radius: 14px; }
.run-stop .stop-icon {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; gap: 1px;
  font-size: 27px; line-height: 1; background: var(--card); border: 3px solid var(--ink); border-radius: 50%;
}
.run-stop .stop-icon.pair { font-size: 17px; }
.run-stop .fork-icon { display: block; }
.run-stop .stop-label {
  font-size: 12px; font-weight: 600; color: var(--ink-soft); max-width: 84px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.run-stop.done .stop-icon { background: var(--good-bg); border-color: var(--good); }
.run-stop.done .stop-label { color: var(--good); }
.run-stop.now { background: #fff3b0; box-shadow: 0 0 0 3px var(--ink) inset; }
.run-stop.now .stop-icon { background: var(--sun); animation: runPulse 1.5s ease-in-out infinite; }
.run-stop.now .stop-label { color: var(--ink); }
.run-stop.later { opacity: .72; }
.run-link { flex: 1; max-width: 46px; height: 0; border-top: 5px dotted rgba(43, 33, 64, .45); }
.run-link.walked { border-top-color: var(--good); }
@keyframes runPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }

/* ---------- the card each stop lives in ---------- */
.run-body { flex: 1; min-height: 0; display: flex; }
.run-card {
  flex: 1; min-height: 0; overflow-y: auto; text-align: center;
  background: rgba(255, 250, 240, .96); border: 4px solid var(--ink); border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink); padding: 18px 20px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: runIn .25s ease-out;
}
@keyframes runIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.run-card h2 { font-size: clamp(22px, 2.4vw, 30px); }
/* short stops sit in the middle of the card; problem stops stay top-aligned so they can scroll */
.run-card.run-fork, .run-card.run-battle,
.run-card.run-mentor:not(.compact), .run-card.run-treasure:not(.compact) { justify-content: center; }
/* while a problem is on screen the stop's decoration gets out of the way */
.run-card.compact { gap: 6px; padding-top: 12px; }
.run-card.compact h2 { font-size: 20px; }
.run-card.compact .chest { font-size: 34px; }
.run-card.compact .lock { font-size: 18px; }
.run-card.compact .run-owl { width: 68px; height: 68px; }
.run-card.compact .run-say { font-size: 18px; padding: 10px 14px; }
.run-icon-big { font-size: 64px; line-height: 1; }
.node-slot { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.run-card .results-list { width: min(520px, 100%); flex: 0 0 auto; overflow: visible; }

/* ---------- the fork: two big choices ---------- */
.fork-q { margin-bottom: 2px; }
.fork-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.fork-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 190px; padding: 18px 14px; background: var(--card);
  border: 4px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s, background .15s;
}
.fork-card:hover { background: #fffbe8; }
.fork-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.fork-key {
  position: absolute; top: 8px; left: 10px; width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--soft); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.fork-big { font-size: 56px; line-height: 1; }
.fork-name { font-size: 22px; font-weight: 600; }
.fork-sub { font-size: 16px; color: var(--ink-soft); line-height: 1.3; }
.fork-card.wild { background: #ffe8e0; }
.fork-card.treasure { background: #fff3b0; }
.fork-card.mentor { background: #e7f0ff; }
.fork-card.camp { background: #ffe9d6; }
.fork-card.boon-card { background: #eafbe7; min-height: 170px; }

/* ---------- boons ---------- */
.boon-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.boon-chip { border: 3px solid var(--ink); background: #eafbe7; border-radius: 999px; padding: 5px 14px; font-size: 16px; font-weight: 600; }
.boon-active {
  font-size: 19px; font-weight: 600; background: #eafbe7; border: 3px solid var(--good);
  border-radius: 16px; padding: 10px 16px; animation: pop .3s;
}
.camp-pick-q { font-size: 20px; font-weight: 600; }

/* ---------- treasure ---------- */
.chest-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chest { font-size: 62px; line-height: 1; transition: transform .2s; }
.chest.wiggle { animation: chestWiggle .5s; }
.chest.open { animation: chestPop .5s; transform: scale(1.12); }
@keyframes chestWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes chestPop { 0% { transform: scale(1); } 60% { transform: scale(1.3) rotate(-4deg); } 100% { transform: scale(1.12); } }
.lock-row { display: flex; gap: 10px; }
.lock { font-size: 26px; filter: grayscale(.3); transition: transform .2s; }
.lock.open { filter: none; transform: scale(1.15) rotate(-12deg); }

/* ---------- mentor ---------- */
.run-mentor-head { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.run-owl { width: 104px; height: 104px; object-fit: contain; flex: 0 0 auto; }
.run-say { flex: 1; font-size: 21px; }
.mentor-choice { margin-top: 4px; }
.badge.tricky { background: #e7f0ff; }

/* ---------- campfire ---------- */
.camp-fire { font-size: 46px; line-height: 1; animation: runPulse 1.8s ease-in-out infinite; }
.camp-sleeper { position: relative; }
.camp-sleeper .creature { width: 150px; height: 150px; }
.camp-sleeper .zzz {
  position: absolute; right: -6px; top: 6px; font-size: 24px; font-weight: 700; color: var(--ink-soft);
  animation: zfloat 2.6s ease-in-out infinite;
}
.camp-sleeper .zzz.z2 { right: 12px; top: -12px; font-size: 20px; animation-delay: .6s; }
.camp-sleeper .zzz.z3 { right: 26px; top: -30px; font-size: 28px; animation-delay: 1.2s; }
@keyframes zfloat { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

/* ---------- one problem inside a stop ---------- */
.run-problem { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.run-problem .question { max-width: 760px; }
/* the number pad is sized like the battle panel (--icol) so "Go!" never falls off a laptop screen */
.run-input { width: min(var(--icol), 100%); }
.run-input.in-choice { width: min(680px, 100%); }
.run-input.in-point, .run-input.in-numberline { width: min(560px, 100%); }
.run-problem .feedback { width: min(680px, 100%); }
.run-problem .hints { width: min(680px, 100%); display: flex; flex-direction: column; gap: 10px; }
.run-tools { gap: 10px; }
.explain-card { display: block; text-align: left; }
.explain-card .steps { font-size: 19px; margin: 0; }
.run-next { min-width: 220px; }
.run-finish-row { margin-top: 6px; }

/* ---------- smaller laptops (1024x700 and down) ---------- */
@media (max-height: 760px) {
  .run-wrap { gap: 8px; padding: 8px 0 12px; }
  .run-card { padding: 14px 16px 18px; gap: 8px; }
  .run-icon-big { font-size: 48px; }
  .run-stop .stop-icon { width: 46px; height: 46px; font-size: 23px; }
  .run-stop { min-width: 66px; }
  .fork-card { min-height: 160px; padding: 14px 12px; }
  .fork-big { font-size: 44px; }
  .camp-sleeper .creature { width: 112px; height: 112px; }
  .run-owl { width: 84px; height: 84px; }
  .chest { font-size: 50px; }
}
@media (max-width: 860px) {
  .fork-cards { grid-template-columns: 1fr; }
  .run-stop .stop-label { display: none; }
}
