.robot { width: min(340px, 70vw); height: auto; display: block; margin: 0 auto; }
.robot.bob { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.rpart { transition: transform .2s ease, opacity .2s ease, filter .2s ease; }
.rpart.active {
  filter: drop-shadow(0 0 10px var(--accent));
  transform: scale(1.08); transform-box: fill-box; transform-origin: center;
}
.rpart.dim { opacity: .35; }
.rpart:hover { filter: drop-shadow(0 0 8px var(--accent)); }

/* Anatomy scene */
.anatomy-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: center;
  margin-top: 16px;
}
.part-panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; min-height: 260px; text-align: left;
}
.part-panel .part-emoji { font-size: 48px; }
.part-panel .movie-note { color: var(--brand-shadow); font-weight: 700; }
.part-hint { color: var(--muted); font-weight: 700; }
.part-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.chip {
  border: none; border-radius: 999px; padding: 10px 16px; font-weight: 800; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: 0 4px 0 #e2dccf; font-size: 16px;
}
.chip.active { background: var(--accent); box-shadow: 0 4px 0 #cf8f12; }
@media (max-width: 820px) { .anatomy-grid { grid-template-columns: 1fr; } }

/* The Loop scene */
.goal-banner {
  display: inline-block; background: var(--goal); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 8px 18px; margin: 6px 0 14px;
}
.loop-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.loop-log { text-align: left; max-height: 340px; overflow-y: auto; padding-right: 6px; }
.loop-step {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 16px;
  margin-bottom: 12px; animation: sceneIn .3s ease both;
}
.ls { margin: 3px 0; font-weight: 600; }
.ls.think { color: var(--brain); }
.ls.act   { color: #1f9e63; }
.ls.obs   { color: #2b6cff; }
.loop-controls { margin-top: 18px; display: flex; gap: 12px; justify-content: center; }
@media (max-width: 820px) { .loop-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .loop-log { max-height: 180px; } }
