/* Galago — measurement input modes (ruler + tool-pick). World 5. */

.ruler-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(560px, 92vw);
}

.rl-track {
  position: relative;
  width: 100%;
  height: 78px;
  margin-top: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4e3c4 0%, #e7c896 100%);
  box-shadow: 0 6px 16px rgba(60, 30, 10, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.4);
  touch-action: none;
  cursor: pointer;
}
/* tick marks */
.rl-tick {
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 14px;
  background: #7a5a36;
  transform: translateX(-50%);
}
.rl-tick.rl-major { height: 26px; width: 3px; background: #5a3f22; }
.rl-num {
  position: absolute;
  bottom: 28px;
  transform: translateX(-50%);
  font: 800 13px "Nunito", system-ui;
  color: #5a3f22;
}
/* the item being measured (a vine/branch lying on the ruler) */
.rl-item {
  position: absolute;
  top: 8px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, #8fd06a, #4f9a3a);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
/* the draggable measuring marker */
.rl-marker {
  position: absolute;
  top: -6px;
  width: 18px;
  height: 56px;
  transform: translateX(-50%);
  border-radius: 9px;
  background: radial-gradient(circle at 40% 25%, #ffd089, #d9772e 75%);
  box-shadow: 0 3px 8px rgba(60, 30, 10, 0.4);
  border: 2px solid #fff6e9;
}
.rl-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #d9772e;
}

.rl-readout {
  font: 800 clamp(22px, 5vw, 30px) "Nunito", system-ui;
  color: #fff6e9;
  text-shadow: 0 2px 0 rgba(120, 60, 20, 0.45), 0 0 18px rgba(255, 200, 120, 0.35);
  background: rgba(60, 40, 20, 0.35);
  padding: 4px 18px;
  border-radius: 999px;
}

.rl-measure {
  font: 800 18px "Nunito", system-ui;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  background: radial-gradient(circle at 38% 30%, #8bd6a3, #4caf6e 72%);
  box-shadow: 0 6px 16px rgba(20, 90, 50, 0.32);
}
.rl-measure:active { transform: scale(0.97); }
.rl-measure:disabled { opacity: 0.5; }

/* tool-picker tiles */
.pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 520px;
}
.pick-tile {
  font: 800 17px "Nunito", system-ui;
  color: #3b2415;
  border: 2px solid #e3c49c;
  border-radius: 16px;
  padding: 14px 20px;
  cursor: pointer;
  background: #fff6e9;
  box-shadow: 0 5px 14px rgba(60, 30, 10, 0.2);
}
.pick-tile:active { transform: scale(0.96); }
.pick-tile.correct { background: radial-gradient(circle at 38% 30%, #8bd6a3, #4caf6e 70%); color: #fff; border-color: transparent; }
.pick-tile.wrong { background: radial-gradient(circle at 38% 30%, #f0a98b, #e2683f 70%); color: #fff; border-color: transparent; }
.pick-tile.dim { opacity: 0.4; }

@media (prefers-reduced-motion: reduce) {
  .rl-measure:active, .pick-tile:active { transform: none; }
}
