/* Raad het getal — bovenop klastools.css. */
.app.rg { gap: 12px; }
.setup { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.small-go { font-size: 20px; padding: 9px 22px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 4px 0 #b88900; }

.scores { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill { display: flex; align-items: baseline; gap: 8px; padding: 5px 14px; border-radius: 14px; background: rgba(0,0,0,.25); font-weight: 700; font-size: 15px; color: var(--muted); }
.pill b { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.pill.rec b { color: var(--gold); }

/* robot en invoer naast elkaar; smal onder elkaar */
.rg-stage { flex: 1 0 auto; min-height: 0; gap: 28px; flex-wrap: wrap; align-items: center; }
.robot-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 380px); }
.bubble {
  position: relative; order: -1; min-height: 78px; width: 100%; display: grid; place-items: center; text-align: center; padding: 12px 18px;
  background: #fff; color: #1a1640; border-radius: 22px; font-weight: 700; font-size: 19px; line-height: 1.3; box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -14px; margin-left: -14px; border: 14px solid transparent; border-bottom: 0; border-top-color: #fff; }
.bubble b { color: #5b4bd6; }
.bubble .big { display: block; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: #e8590c; }
.bubble small { display: block; margin-top: 4px; font-size: 15px; color: #6d68a0; }
.bubble.pop { animation: popin .35s cubic-bezier(.3,1.5,.5,1); }

.robot { width: min(220px, 52vw); height: auto; overflow: visible; filter: drop-shadow(0 14px 24px rgba(0,0,0,.4)); }
.robot .lamp { fill: #ffd43b; }
.robot .eye { fill: #4dabf7; transition: transform .3s; transform-box: fill-box; transform-origin: center; }
.robot .chest { font-family: var(--font-display); font-weight: 800; font-size: 28px; fill: #ffd43b; }
.robot .arm { transition: transform .35s cubic-bezier(.3,1.4,.5,1); transform-box: fill-box; }
.robot .arm-l { transform-origin: 100% 50%; }
.robot .arm-r { transform-origin: 0% 50%; }
.robot.think .lamp { animation: blink 1.4s ease-in-out infinite; }
.robot.think .eyes { animation: look 3s ease-in-out infinite; }
.robot.up .arm { transform: rotate(var(--a, 0deg)); }
.robot.up .arm-l { --a: 60deg; } .robot.up .arm-r { --a: -60deg; }
.robot.up .eye, .robot.down .eye { transform: scaleY(.75); }
.robot.down .arm-l { transform: rotate(-50deg); } .robot.down .arm-r { transform: rotate(50deg); }
.robot.up .eyes { transform: translateY(-5px); } .robot.down .eyes { transform: translateY(5px); }
.robot .eyes { transition: transform .3s; }
.robot.happy .lamp { fill: #69db7c; animation: blink .4s linear 4; }
.robot.happy .eye { fill: #69db7c; transform: scale(1.15); }
.robot.happy { animation: hop .5s ease 2; }
.robot.oops .lamp { fill: #ff6b6b; }
.robot.oops { animation: shake .4s ease; }
@keyframes blink { 50% { opacity: .35; } }
@keyframes look { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-6px); } 70% { transform: translateX(6px); } }
@keyframes hop { 50% { transform: translateY(-14px); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.play { display: grid; gap: 12px; width: min(100%, 340px); }
.entry { display: flex; gap: 10px; flex: none; }
.entry .go { flex: none; }
.display {
  flex: 1; min-width: 0; height: 68px; display: grid; place-items: center; border-radius: 18px; background: #fff; color: #1a1640;
  font-family: var(--font-display); font-weight: 800; font-size: 44px; font-variant-numeric: tabular-nums; box-shadow: inset 0 -5px 0 rgba(0,0,0,.12);
}
.display.leeg::before { content: "?"; color: #c7c4e6; }
.entry .go { padding: 0 22px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button {
  height: 60px; border: 0; border-radius: 16px; background: var(--panel-hi); font-family: var(--font-display); font-weight: 800; font-size: 28px;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.25);
}
.pad button:hover { background: #3a3290; }
.pad button:active { transform: translateY(2px); }
.pad button.ok { background: #69db7c; color: #08311a; }

/* getallenlijn met wat nog kan */
.range { width: min(100%, 900px); margin: 0 auto; display: grid; gap: 6px; }
.range-line { position: relative; height: 22px; border-radius: 99px; background: rgba(0,0,0,.35); overflow: visible; }
.range-open { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #ffd43b, #ffa94d); transition: left .5s cubic-bezier(.3,1.2,.5,1), width .5s cubic-bezier(.3,1.2,.5,1); }
.range-line .mark { position: absolute; top: -5px; width: 4px; height: 32px; margin-left: -2px; border-radius: 2px; background: #fff; }
.range-line .mark.up { background: #4dabf7; } .range-line .mark.down { background: #ff6b6b; } .range-line .mark.hit { background: #69db7c; width: 8px; margin-left: -4px; }
.range-labels { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-weight: 700; font-size: 15px; }
#rangeText { text-align: center; color: var(--ink); font-size: 17px; }
#rangeText b { color: var(--gold); }
.guesses { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.guesses li { display: flex; align-items: baseline; gap: 6px; padding: 3px 12px; border-radius: 12px; background: rgba(255,255,255,.08); font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.guesses li span { font-family: var(--font-body); font-size: 13px; font-weight: 800; }
.guesses li.up span { color: #74c0fc; } .guesses li.down span { color: #ff8787; } .guesses li.hit { background: #69db7c; color: #08311a; }

@media (max-width: 560px) {
  .rg-stage { gap: 14px; }
  .robot-wrap { flex-direction: row; align-items: center; gap: 10px; }
  .robot { width: 96px; flex: none; }
  .bubble { order: 0; font-size: 16px; min-height: 64px; padding: 10px 12px; }
  .bubble::after { left: -12px; top: 50%; bottom: auto; margin: -12px 0 0; border: 12px solid transparent; border-left: 0; border-right-color: #fff; }
  .bubble .big { font-size: 30px; }
  .pad button { height: 52px; font-size: 24px; }
  .display { height: 58px; font-size: 36px; }
  .pill b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .robot *, .robot, .bubble.pop, .range-open { animation: none !important; transition: none !important; } }
