/* Doodle Buddy Run: drawing pad, photo cut-out and the running stage. */
.tabs { display: flex; gap: 8px; justify-content: center; margin: 0 0 14px; }
.tabs .btn { flex: 1; font-size: 18px; min-height: 52px; }
.tabs .btn.selected { background: var(--accent); color: #fff; box-shadow: 0 4px 0 #d9682a; }

.pad-wrap { position: relative; width: 100%; max-width: 380px; margin: 0 auto; }
.paper {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 3px dashed var(--line);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.checker {
  background-color: #fff;
  background-image: conic-gradient(#f3eee6 25%, #fff 0 50%, #f3eee6 0 75%, #fff 0);
  background-size: 24px 24px;
}

.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 8px; }
.swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
.swatch.selected { box-shadow: 0 0 0 4px var(--ink); }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.tools .btn { font-size: 16px; min-height: 44px; padding: 8px 12px; }
.tools .btn.selected { background: var(--accent); color: #fff; box-shadow: 0 4px 0 #d9682a; }

.photo-pick { display: block; margin: 0 auto 12px; }
.photo-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-pick .btn { display: inline-block; }
.slider-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 16px; }
.slider-row input { flex: 1; accent-color: var(--accent); }
.note { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.note.warn { color: var(--bad); font-weight: 700; }
.safe { font-size: 15px; background: #eefaf3; color: #1d6b45; border-radius: 12px; padding: 8px 12px; margin: 12px 0 0; }

.buddy-show { display: flex; justify-content: center; align-items: flex-end; height: 170px; margin: 4px 0 8px; }
.buddy-show img { max-width: 160px; max-height: 160px; animation: buddy-bounce 1s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes buddy-bounce {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  45% { transform: translateY(-18px) scale(0.96, 1.05); }
  90% { transform: translateY(0) scale(1.06, 0.92); }
}
.row-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.row-btns .btn { font-size: 16px; min-height: 44px; padding: 8px 14px; }

#prompt { min-height: 78px; display: flex; flex-direction: column; justify-content: center; }
#prompt .question { margin: 0; font-size: 34px; }
#prompt .count-row { font-size: 30px; line-height: 1.25; letter-spacing: 2px; }
#prompt .q-small { font-size: 20px; font-weight: 700; }
.stage {
  display: block;
  width: 100%;
  border-radius: 16px;
  margin: 8px 0 0;
  touch-action: manipulation;
  cursor: pointer;
}
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.lanes .btn { font-size: 22px; padding: 10px 4px; min-height: 56px; color: #fff; }
.lanes .btn.lane-0 { background: #7a5cff; box-shadow: 0 4px 0 #5a3fd6; }
.lanes .btn.lane-1 { background: #3d9bff; box-shadow: 0 4px 0 #2a76cc; }
.lanes .btn.lane-2 { background: #ff8a3d; box-shadow: 0 4px 0 #d9682a; }
.lanes .btn.selected { outline: 4px solid var(--ink); outline-offset: 2px; }
.lanes .btn small { display: block; font-size: 13px; opacity: 0.9; }
#result-buddy { max-width: 120px; max-height: 120px; margin: 6px auto 0; display: block; }

@media (prefers-reduced-motion: reduce) {
  .buddy-show img { animation: none; }
}
