/* ============================================
   RICCIO AUTONOMY LAB v004 — STYLE
   Emozioni & LED Ring Eyes
   ============================================ */

:root {
  --bg: #0a0e17;
  --panel-bg: rgba(16, 22, 36, 0.85);
  --panel-border: rgba(255,255,255,0.06);
  --accent: #d9a441;
  --accent-glow: rgba(217,164,65,0.4);
  --accent2: #8ecae6;
  --text: #f4eee4;
  --muted: #7a8599;
  --danger: #e76f51;
  --green: #8ac926;
  --pink: #ec4899;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 20% 60%, rgba(217,164,65,0.08), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(142,202,230,0.08), transparent 30%);
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

/* ============ DASHBOARD ============ */
#dashboard {
  width: 380px;
  height: 100vh;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 10;
  box-shadow: 8px 0 30px rgba(0,0,0,0.5);
  overflow-y: auto;
}

header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #f0d78c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
header .version {
  font-size: 0.7rem;
  background: rgba(217,164,65,0.15);
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  font-weight: 600;
}
.subtitle { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.hw-info { font-size: 0.58rem; color: #2d3748; margin-top: 4px; line-height: 1.4; }

/* VITALITY */
.vitality-wrap { margin-top: 12px; }
.vitality-header { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 4px; }
.vitality-header span:first-child { color: var(--muted); }
.vitality-value { font-weight: bold; color: var(--pink); }
.vitality-track { background: rgba(0,0,0,0.4); border-radius: 6px; height: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.vitality-fill { height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #ef4444, var(--pink)); transition: width 1s ease; box-shadow: 0 0 10px rgba(236,72,153,0.4); }
.vitality-hint { font-size: 0.65rem; color: #4a5568; margin-top: 4px; text-align: center; }

/* PET NAME */
.pet-name-row { margin-top: 10px; }
.pet-name-row span { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; cursor: pointer; color: var(--text); letter-spacing: 1px; }

/* CONTROL GROUPS */
.control-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1rem;
  transition: transform 0.3s, background 0.3s;
}
.control-group:hover { background: rgba(255,255,255,0.035); transform: translateY(-1px); }
.control-group h2 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* EMOTION DISPLAY */
.emotion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.emotion-icon { font-size: 2rem; min-width: 42px; text-align: center; }
.emotion-label { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.emotion-sublabel { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* EMOTION BARS */
.emotion-bars { display: flex; flex-direction: column; gap: 6px; }
.emo-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--muted); }
.emo-bar-row span:first-child { width: 56px; text-align: right; }
.emo-bar-row span:last-child { width: 24px; font-weight: 600; color: var(--text); }
.emo-track { flex: 1; height: 6px; background: rgba(0,0,0,0.35); border-radius: 3px; overflow: hidden; }
.emo-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.fill-joy { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.fill-fear { background: linear-gradient(90deg, #6366f1, #4338ca); }
.fill-trust { background: linear-gradient(90deg, var(--pink), #f43f5e); }
.fill-curiosity { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.fill-energy { background: linear-gradient(90deg, var(--green), #65a30d); }

/* COMMAND GRID */
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* BUTTONS */
.btn {
  width: 100%;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn:last-child { margin-bottom: 0; }
.btn:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.btn-cmd { font-size: 0.75rem; padding: 8px 6px; }
.btn-cmd:hover { border-color: var(--accent); color: #f0d78c; }
.btn-praise:hover { border-color: var(--pink); color: #fbcfe8; }
.btn-scare:hover { border-color: #3b82f6; color: #bfdbfe; }
.btn-morning:hover { border-color: #fbbf24; color: #fef3c7; }
.btn-tired:hover { border-color: #8b5cf6; color: #ddd6fe; }
.btn-cold:hover { border-color: #38bdf8; color: #bae6fd; }
.btn-hungry:hover { border-color: #f59e0b; color: #fde68a; }

/* EVOLUTION */
.evo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evo-stat { background: rgba(0,0,0,0.3); padding: 8px; border-radius: 10px; text-align: center; }
.evo-stat small { color: var(--muted); font-size: 0.65rem; display: block; margin-bottom: 3px; }
.evo-stat strong { font-size: 1rem; font-family: var(--font-display); }
.evo-timeline { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.evo-node { padding: 8px 10px; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; background: rgba(0,0,0,0.15); font-size: 0.72rem; }
.evo-node.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
.evo-node.done { border-color: rgba(138,201,38,0.5); }
.evo-node .node-title { font-weight: 700; margin-bottom: 2px; }
.evo-node .node-info { color: var(--muted); }

/* DIARY */
.diary-box { max-height: 180px; overflow-y: auto; }
.diary-entry { border-left: 3px solid var(--accent); padding: 6px 10px; margin-bottom: 8px; font-size: 0.75rem; color: #d4c8b0; line-height: 1.45; background: rgba(0,0,0,0.15); border-radius: 0 8px 8px 0; }

/* CONSOLE */
#status-console {
  margin-top: auto;
  background: rgba(0,0,0,0.4);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: #d9a441aa;
  line-height: 1.5;
  min-height: 80px;
  max-height: 110px;
  overflow-y: auto;
}

/* NAME MODAL */
#name-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 800; align-items: center; justify-content: center; }
#name-modal.active { display: flex; }
.name-modal-box { background: #131929; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 28px; width: 280px; text-align: center; }
.name-modal-box h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 6px; }
.name-modal-box p { color: #4a5568; font-size: 0.8rem; margin-bottom: 14px; line-height: 1.5; }
.name-input { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: var(--text); font-family: var(--font-display); font-size: 1.2rem; text-align: center; outline: none; letter-spacing: 2px; transition: border-color 0.3s; }
.name-input:focus { border-color: var(--accent); }
.name-save-btn { margin-top: 12px; width: 100%; padding: 10px; background: linear-gradient(135deg, var(--accent), #c4872e); border: none; border-radius: 10px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; cursor: pointer; }

/* ============ MAIN STAGE ============ */
#desk-container {
  flex: 1;
  position: relative;
  background: radial-gradient(ellipse at center 60%, #1a2332 0%, #0d1117 100%);
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.03);
}

/* DOCK */
#dock-station {
  position: absolute;
  width: 110px; height: 60px;
  background: rgba(217,164,65,0.04);
  border: 2px dashed rgba(217,164,65,0.2);
  border-radius: 16px;
  bottom: 40px; right: 60px;
  display: flex; align-items: center; justify-content: center;
}
.dock-label { color: rgba(217,164,65,0.35); font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; }

/* EMOTION BUBBLE */
.emotion-bubble {
  position: absolute;
  pointer-events: none;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
  z-index: 20;
  white-space: nowrap;
}
.emotion-bubble.visible { opacity: 1; transform: translateY(0); }

/* ============ RICCIO CHARACTER ============ */
.riccio {
  position: absolute;
  width: 140px;
  height: 120px;
  transform: translate(-50%, -50%);
  transition: left 0.8s ease, top 0.8s ease;
  z-index: 10;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
  cursor: pointer;
}

/* BODY */
.riccio-body {
  position: absolute;
  width: 120px;
  height: 80px;
  left: 0; top: 10px;
}
.body-shell {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 60% 40%, #8B6B4A, #5C3D2E);
  border-radius: 55% 50% 45% 50%;
  border: 2px solid #3a2518;
  box-shadow: inset 0 -8px 20px rgba(0,0,0,0.4), inset 0 4px 10px rgba(255,255,255,0.08);
  z-index: 2;
}

/* SPINES */
.spine-layer {
  position: absolute;
  width: 110px; height: 70px;
  left: 0; top: -18px;
  z-index: 1;
}
.spine {
  position: absolute;
  width: 6px;
  background: linear-gradient(to top, #5C3D2E, #D4A56A);
  border-radius: 1px 1px 0 0;
  transform-origin: bottom center;
  animation: spine-sway 3s ease-in-out infinite alternate;
}
.s1  { left: 8px;  height: 22px; top: 18px; transform: rotate(-25deg); animation-delay: 0s; }
.s2  { left: 16px; height: 28px; top: 10px; transform: rotate(-18deg); animation-delay: 0.2s; }
.s3  { left: 24px; height: 32px; top: 6px;  transform: rotate(-12deg); animation-delay: 0.1s; }
.s4  { left: 32px; height: 35px; top: 3px;  transform: rotate(-6deg);  animation-delay: 0.3s; }
.s5  { left: 40px; height: 38px; top: 0;    transform: rotate(-2deg);  animation-delay: 0.15s; }
.s6  { left: 48px; height: 40px; top: -2px; transform: rotate(0deg);   animation-delay: 0.25s; }
.s7  { left: 56px; height: 38px; top: 0;    transform: rotate(2deg);   animation-delay: 0.35s; }
.s8  { left: 64px; height: 35px; top: 3px;  transform: rotate(6deg);   animation-delay: 0.05s; }
.s9  { left: 72px; height: 32px; top: 6px;  transform: rotate(12deg);  animation-delay: 0.2s; }
.s10 { left: 80px; height: 28px; top: 10px; transform: rotate(18deg);  animation-delay: 0.3s; }
.s11 { left: 88px; height: 22px; top: 18px; transform: rotate(25deg);  animation-delay: 0.1s; }
.s12 { left: 20px; height: 24px; top: 14px; transform: rotate(-15deg); animation-delay: 0.4s; }
.s13 { left: 44px; height: 30px; top: 4px;  transform: rotate(-1deg);  animation-delay: 0.22s; }
.s14 { left: 60px; height: 30px; top: 4px;  transform: rotate(4deg);   animation-delay: 0.18s; }
.s15 { left: 76px; height: 24px; top: 14px; transform: rotate(15deg);  animation-delay: 0.28s; }

@keyframes spine-sway {
  0% { transform: rotate(var(--base-rot, 0deg)); }
  100% { transform: rotate(calc(var(--base-rot, 0deg) + 4deg)); }
}

/* FACE */
.riccio-face {
  position: absolute;
  width: 60px; height: 55px;
  right: -8px; top: 22px;
  background: radial-gradient(ellipse at 50% 40%, #C4976A, #9B7350);
  border-radius: 50% 55% 50% 45%;
  border: 2px solid #3a2518;
  z-index: 3;
  box-shadow: inset 0 -5px 12px rgba(0,0,0,0.3), inset 0 3px 6px rgba(255,255,255,0.1);
}

/* EYE SOCKETS */
.eye-socket {
  position: absolute;
  width: 44px; height: 44px;
  top: 4px;
}
.eye-left { left: -4px; }
.eye-right { left: 22px; }

.led-ring { display: block; }

/* NOSE */
.riccio-nose {
  position: absolute;
  width: 10px; height: 8px;
  background: radial-gradient(ellipse, #1a1a1a, #333);
  border-radius: 50%;
  right: 2px; top: 24px;
  z-index: 4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* MOUTH */
.riccio-mouth {
  position: absolute;
  width: 12px; height: 4px;
  border-bottom: 2px solid #5C3D2E;
  border-radius: 0 0 50% 50%;
  right: 4px; top: 34px;
  z-index: 4;
  transition: all 0.4s;
}
.riccio-mouth.happy { width: 16px; height: 6px; border-color: #ec4899; }
.riccio-mouth.sad { border-radius: 50% 50% 0 0; border-bottom: none; border-top: 2px solid #6366f1; }
.riccio-mouth.scared { width: 8px; height: 8px; border: 2px solid #6366f1; border-radius: 50%; }

/* PAWS */
.paw {
  position: absolute;
  width: 14px; height: 10px;
  background: #7a5a3e;
  border-radius: 50% 50% 40% 40%;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.paw-fl { left: 18px; bottom: -2px; }
.paw-fr { left: 50px; bottom: -2px; }
.paw-bl { left: 70px; bottom: -2px; }
.paw-br { left: 96px; bottom: -2px; }

/* PAWS WALKING ANIMATION */
.riccio.walking .paw-fl { animation: paw-walk 0.4s ease-in-out infinite alternate; }
.riccio.walking .paw-fr { animation: paw-walk 0.4s ease-in-out infinite alternate-reverse; }
.riccio.walking .paw-bl { animation: paw-walk 0.4s ease-in-out infinite alternate-reverse; }
.riccio.walking .paw-br { animation: paw-walk 0.4s ease-in-out infinite alternate; }

@keyframes paw-walk {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* SCARED BODY SHAKE */
.riccio.scared { animation: body-shake 0.15s linear infinite; }
@keyframes body-shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(-2deg) translateX(-2px); }
  75% { transform: translate(-50%, -50%) rotate(2deg) translateX(2px); }
}

/* SLEEPING BREATHING */
.riccio.sleeping { animation: breathing 3s ease-in-out infinite; }
@keyframes breathing {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.03); }
}

/* HAPPY BOUNCE */
.riccio.happy { animation: happy-bounce 0.5s ease-in-out infinite; }
@keyframes happy-bounce {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}

/* CURLED UP (defensive) */
.riccio.curled .riccio-face { opacity: 0.3; transform: scale(0.7) translateX(10px); transition: all 0.5s; }
.riccio.curled .paw { opacity: 0; transition: opacity 0.3s; }
.riccio.curled .body-shell { border-radius: 50%; transition: border-radius 0.5s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  body { flex-direction: column; }
  #dashboard { width: 100%; height: auto; max-height: 50vh; }
  #desk-container { height: 50vh; }
}

/* ============================================
   RICCIO AUTONOMY LAB v005 — HUMAN + TIME
   ============================================ */

#desk-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 55%, rgba(217,164,65,0.08), transparent 38%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  pointer-events: none;
  opacity: 0.7;
}

.time-accelerator {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.06);
}

.time-accelerator h3 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.time-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-time {
  padding: 7px 4px;
  font-size: 0.68rem;
  margin: 0;
}

.btn-time.active {
  background: rgba(217,164,65,0.18);
  border-color: var(--accent);
  color: #f0d78c;
}

.sim-clock {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--muted);
}

.sim-clock strong {
  color: var(--text);
  font-family: var(--font-display);
}

.human-sim {
  position: absolute;
  width: 92px;
  height: 150px;
  left: 72%;
  top: 30%;
  transform: translate(-50%, -50%);
  z-index: 7;
  transition: left 1.1s ease, top 1.1s ease, transform 0.4s ease, opacity 0.5s ease;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,0.45));
}

.human-shadow {
  position: absolute;
  width: 92px;
  height: 22px;
  left: 0;
  bottom: -8px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.45), transparent 70%);
  border-radius: 50%;
}

.human-body {
  position: absolute;
  inset: 0;
}

.human-head {
  position: absolute;
  width: 54px;
  height: 54px;
  left: 19px;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e2b58e, #9f6d4f);
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 -8px 14px rgba(0,0,0,0.25);
}

.human-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.human-eye {
  position: absolute;
  width: 5px;
  height: 5px;
  top: 23px;
  background: #151515;
  border-radius: 50%;
}

.human-eye.left { left: 18px; }
.human-eye.right { right: 18px; }

.human-mouth {
  position: absolute;
  width: 14px;
  height: 6px;
  left: 20px;
  top: 34px;
  border-bottom: 2px solid rgba(30,20,15,0.8);
  border-radius: 0 0 50% 50%;
}

.human-torso {
  position: absolute;
  width: 70px;
  height: 78px;
  left: 11px;
  top: 58px;
  border-radius: 24px 24px 18px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent),
    linear-gradient(180deg, #334155, #111827);
  border: 1px solid rgba(255,255,255,0.08);
}

.human-arm {
  position: absolute;
  width: 15px;
  height: 62px;
  top: 66px;
  background: linear-gradient(180deg, #9f6d4f, #724832);
  border-radius: 12px;
  transform-origin: top center;
  transition: transform 0.5s ease;
}

.arm-left { left: 2px; transform: rotate(16deg); }
.arm-right { right: 2px; transform: rotate(-16deg); }

.human-label {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f4eee4;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.9;
}

.human-idle .human-torso {
  animation: human-breath 3.5s ease-in-out infinite;
}

@keyframes human-breath {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.025); }
}

.human-looking { transform: translate(-50%, -50%) scale(1.03); }

.human-reaching .arm-left {
  transform: rotate(68deg) translateY(4px);
}

.human-petting .arm-left {
  animation: petting-motion 0.7s ease-in-out infinite alternate;
}

@keyframes petting-motion {
  from { transform: rotate(58deg) translateY(2px); }
  to { transform: rotate(78deg) translateY(9px); }
}

.human-away { opacity: 0.45; }

.interaction-beam {
  position: absolute;
  height: 2px;
  width: 0;
  left: 50%;
  top: 50%;
  background: linear-gradient(90deg, transparent, rgba(217,164,65,0.8), transparent);
  box-shadow: 0 0 14px rgba(217,164,65,0.45);
  transform-origin: left center;
  opacity: 0;
  z-index: 6;
  transition: opacity 0.3s ease, width 0.5s ease;
}

.interaction-beam.active {
  opacity: 1;
  width: 210px;
}

.human-actions {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 30;
  padding: 8px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 999px;
}

.human-actions button {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.human-actions button:hover {
  border-color: var(--accent);
  color: #f0d78c;
  background: rgba(217,164,65,0.12);
  transform: translateY(-1px);
}

.riccio.social-glow {
  filter:
    drop-shadow(0 15px 25px rgba(0,0,0,0.5))
    drop-shadow(0 0 18px rgba(217,164,65,0.32));
}

@media (max-width: 900px) {
  .human-actions {
    left: 10px;
    right: 10px;
    transform: none;
    overflow-x: auto;
    border-radius: 16px;
  }

  .human-actions button {
    white-space: nowrap;
  }

  .human-sim {
    width: 70px;
    height: 120px;
  }
}


/* ============================================
   RICCIO AUTONOMY LAB v006 — FIXED HUMAN PRESENCE
   L'umano è seduto davanti al PC: non cammina sulla scrivania.
   ============================================ */

.human-sim {
  left: 50% !important;
  top: 10% !important;
  width: 132px;
  height: 118px;
  opacity: 0.9;
  z-index: 5;
  filter: drop-shadow(0 20px 26px rgba(0,0,0,0.55));
}

.human-sim::before {
  content: "PC";
  position: absolute;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  width: 164px;
  height: 56px;
  border-radius: 12px 12px 5px 5px;
  background:
    linear-gradient(180deg, rgba(142,202,230,0.11), rgba(15,23,42,0.92)),
    linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
  border: 1px solid rgba(142,202,230,0.18);
  color: rgba(142,202,230,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  box-shadow: 0 16px 34px rgba(0,0,0,0.38);
}

.human-sim::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 140px;
  transform: translateX(-50%);
  width: 220px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.42), transparent 72%);
  pointer-events: none;
}

.human-shadow {
  display: none;
}

.human-head {
  left: 39px;
  top: 0;
}

.human-torso {
  width: 92px;
  height: 54px;
  left: 20px;
  top: 56px;
  border-radius: 28px 28px 14px 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent),
    linear-gradient(180deg, #1e293b, #0f172a);
}

.human-arm {
  top: 68px;
  height: 48px;
  background: linear-gradient(180deg, #9f6d4f, #724832);
}

.arm-left {
  left: 15px;
  transform: rotate(48deg);
}

.arm-right {
  right: 15px;
  transform: rotate(-48deg);
}

.human-label {
  top: -30px;
  background: rgba(0,0,0,0.62);
  border-color: rgba(142,202,230,0.16);
  color: #dbeafe;
}

.human-looking {
  transform: translate(-50%, -50%) scale(1.02);
}

.human-looking .human-head {
  box-shadow:
    inset 0 -8px 14px rgba(0,0,0,0.25),
    0 0 24px rgba(217,164,65,0.18);
}

.human-reaching .arm-left {
  transform: rotate(96deg) translateY(9px) translateX(-16px);
}

.human-petting .arm-left {
  animation: fixed-petting-motion 0.7s ease-in-out infinite alternate;
}

@keyframes fixed-petting-motion {
  from { transform: rotate(92deg) translateY(8px) translateX(-18px); }
  to { transform: rotate(108deg) translateY(16px) translateX(-26px); }
}

.human-away {
  opacity: 0.62;
}

.human-away .human-head {
  transform: rotate(-8deg);
}

.interaction-beam {
  left: 50%;
  top: 23%;
  transform: rotate(90deg);
}

.interaction-beam.active {
  width: 250px;
  opacity: 0.75;
}

.human-actions {
  top: 142px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgba(0,0,0,0.42);
}

/* la scrivania è il territorio di Riccio: l'utente resta fuori dal piano */
#desk-container::after {
  content: "SCRIVANIA DI RICCIO";
  position: absolute;
  left: 50%;
  top: 210px;
  transform: translateX(-50%);
  color: rgba(244,238,228,0.12);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  pointer-events: none;
}


/* ============================================
   RICCIO AUTONOMY LAB v007 — WARMER RICCIO
   Migliora immagine riccio + curva fiducia più calda
   ============================================ */

.warmth-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(217,164,65,0.06);
  border: 1px solid rgba(217,164,65,0.13);
}

.warmth-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 7px;
  color: var(--muted);
}

.warmth-row strong {
  color: #f0d78c;
  font-family: var(--font-display);
}

.warmth-track {
  height: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.warmth-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c4a23, #d9a441, #f0d78c);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(217,164,65,0.28);
  transition: width 0.8s ease;
}

#trust-hint-v007 {
  margin-top: 7px;
  font-size: 0.64rem;
  line-height: 1.4;
  color: rgba(244,238,228,0.54);
}

/* Miglioramento generale del riccio: più animaletto, meno icona piatta */
.riccio {
  width: 158px;
  height: 132px;
  filter:
    drop-shadow(0 20px 24px rgba(0,0,0,0.52))
    drop-shadow(0 0 12px rgba(217,164,65,0.08));
}

.riccio-body {
  width: 136px;
  height: 92px;
  left: -4px;
  top: 16px;
}

.body-shell {
  background:
    radial-gradient(ellipse at 42% 35%, rgba(255,220,165,0.28), transparent 22%),
    radial-gradient(ellipse at 62% 45%, #9a724f, #5C3D2E 74%);
  border-radius: 58% 50% 45% 52%;
  border: 2px solid rgba(58,37,24,0.95);
  box-shadow:
    inset 0 -10px 22px rgba(0,0,0,0.42),
    inset 0 5px 12px rgba(255,255,255,0.10),
    0 4px 0 rgba(0,0,0,0.12);
}

.spine-layer {
  width: 132px;
  height: 82px;
  left: -6px;
  top: -21px;
}

.spine {
  width: 7px;
  border-radius: 50% 50% 0 0;
  background:
    linear-gradient(to top, #3b2416 0%, #6c4a2d 45%, #d9aa6b 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.s1  { left: 6px;  height: 24px; top: 23px; transform: rotate(-32deg); }
.s2  { left: 14px; height: 31px; top: 15px; transform: rotate(-24deg); }
.s3  { left: 22px; height: 37px; top: 10px; transform: rotate(-17deg); }
.s4  { left: 31px; height: 42px; top: 6px;  transform: rotate(-11deg); }
.s5  { left: 40px; height: 46px; top: 2px;  transform: rotate(-5deg); }
.s6  { left: 50px; height: 49px; top: 0;   transform: rotate(0deg); }
.s7  { left: 60px; height: 48px; top: 1px;  transform: rotate(4deg); }
.s8  { left: 70px; height: 45px; top: 4px;  transform: rotate(9deg); }
.s9  { left: 80px; height: 40px; top: 8px;  transform: rotate(15deg); }
.s10 { left: 90px; height: 34px; top: 14px; transform: rotate(22deg); }
.s11 { left: 100px;height: 27px; top: 21px; transform: rotate(30deg); }
.s12 { left: 25px; height: 29px; top: 18px; transform: rotate(-21deg); }
.s13 { left: 45px; height: 36px; top: 10px; transform: rotate(-7deg); }
.s14 { left: 66px; height: 37px; top: 9px;  transform: rotate(8deg); }
.s15 { left: 86px; height: 31px; top: 16px; transform: rotate(20deg); }

.riccio-face {
  width: 70px;
  height: 62px;
  right: -12px;
  top: 28px;
  background:
    radial-gradient(circle at 42% 28%, rgba(255,230,190,0.42), transparent 26%),
    radial-gradient(ellipse at 52% 46%, #d2a172, #9B7350 70%);
  border-radius: 54% 58% 50% 45%;
  box-shadow:
    inset 0 -6px 13px rgba(0,0,0,0.30),
    inset 0 4px 8px rgba(255,255,255,0.12),
    0 2px 0 rgba(0,0,0,0.18);
}

.eye-socket {
  transform: scale(0.82);
  filter: drop-shadow(0 0 4px rgba(142,202,230,0.16));
}

.eye-left { left: -1px; top: 4px; }
.eye-right { left: 26px; top: 4px; }

.riccio-nose {
  width: 12px;
  height: 9px;
  right: -1px;
  top: 29px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 22%),
    radial-gradient(ellipse, #101010, #2a1d18);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.48),
    0 0 8px rgba(0,0,0,0.28);
}

.riccio-mouth {
  right: 6px;
  top: 41px;
  width: 14px;
  border-bottom-color: rgba(75,45,30,0.88);
}

.riccio-face::before,
.riccio-face::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1px;
  right: -6px;
  background: rgba(70,45,28,0.72);
  transform-origin: right center;
  z-index: 4;
}

.riccio-face::before {
  top: 35px;
  transform: rotate(12deg);
}

.riccio-face::after {
  top: 40px;
  transform: rotate(-10deg);
}

.paw {
  width: 16px;
  height: 11px;
  background:
    radial-gradient(ellipse at 45% 25%, rgba(255,220,180,0.18), transparent 35%),
    #7a5a3e;
}

.paw-fl { left: 18px; bottom: -3px; }
.paw-fr { left: 54px; bottom: -4px; }
.paw-bl { left: 84px; bottom: -3px; }
.paw-br { left: 111px; bottom: -4px; }

.riccio.approaching {
  animation: warm-approach 1.2s ease-in-out 1;
}

@keyframes warm-approach {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, -50%) scale(1.04) rotate(-1deg); }
  70% { transform: translate(-50%, -50%) scale(1.02) rotate(1deg); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.riccio.trust-pulse {
  filter:
    drop-shadow(0 20px 24px rgba(0,0,0,0.52))
    drop-shadow(0 0 22px rgba(217,164,65,0.32));
}

/* N0.5 visual cue */
.evo-node.soft-unlocked {
  border-color: rgba(217,164,65,0.55);
  background: rgba(217,164,65,0.055);
}


/* ============================================
   RICCIO AUTONOMY LAB v008 — HUMAN AUTOPILOT
   ============================================ */

.autopilot-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(142,202,230,0.055);
  border: 1px solid rgba(142,202,230,0.14);
}

.autopilot-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.autopilot-header strong {
  color: #93c5fd;
  font-family: var(--font-display);
}

.autopilot-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.btn-auto {
  padding: 7px 3px;
  font-size: 0.61rem;
  margin: 0;
}

.btn-auto.active {
  background: rgba(142,202,230,0.16);
  border-color: #8ecae6;
  color: #dbeafe;
}

.autopilot-stats {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.4fr;
  gap: 6px;
  margin-top: 8px;
}

.autopilot-stats div {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.045);
  border-radius: 9px;
  padding: 7px 5px;
  text-align: center;
  min-width: 0;
}

.autopilot-stats small {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  margin-bottom: 3px;
}

.autopilot-stats strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-analysis {
  margin-top: 8px;
  border-color: rgba(142,202,230,0.22);
}

.btn-analysis:hover {
  color: #dbeafe;
  border-color: #8ecae6;
}

.analysis-modal-v008 {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.analysis-modal-v008.active {
  display: flex;
}

.analysis-box-v008 {
  position: relative;
  width: min(720px, 96vw);
  max-height: 86vh;
  overflow-y: auto;
  background: #101827;
  border: 1px solid rgba(142,202,230,0.16);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.56);
  padding: 24px;
}

.analysis-box-v008 h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 5px;
  color: #f4eee4;
}

.analysis-subtitle-v008 {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.analysis-close-v008 {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.analysis-grid-v008 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.analysis-card-v008 {
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 13px;
  padding: 10px;
}

.analysis-card-v008 small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-bottom: 5px;
}

.analysis-card-v008 strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.analysis-section-v008 {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 14px;
}

.analysis-section-v008 h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: #f0d78c;
}

.analysis-section-v008 p,
.analysis-section-v008 li {
  color: #d4c8b0;
  font-size: 0.78rem;
  line-height: 1.5;
}

.analysis-section-v008 ul {
  padding-left: 18px;
}

.autopilot-pulse {
  animation: autopilot-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes autopilot-pulse {
  from { box-shadow: 0 0 0 rgba(142,202,230,0); }
  to { box-shadow: 0 0 20px rgba(142,202,230,0.18); }
}


/* ============================================
   RICCIO AUTONOMY LAB v009 — SOCIAL BASELINE
   Riccio meno schivo: avvicinamento visibile e ricerca presenza
   ============================================ */

.social-tuning-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(236,72,153,0.055);
  border: 1px solid rgba(236,72,153,0.15);
}

.social-tuning-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.social-tuning-header strong {
  color: #fbcfe8;
  font-family: var(--font-display);
}

.social-tuning-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.btn-social {
  padding: 8px 5px;
  font-size: 0.68rem;
  margin: 0;
  border-color: rgba(236,72,153,0.18);
}

.btn-social:hover {
  border-color: #ec4899;
  color: #fbcfe8;
}

#social-rule-hint {
  margin-top: 8px;
  font-size: 0.64rem;
  color: rgba(244,238,228,0.58);
  line-height: 1.35;
}

.riccio.seeking-human {
  animation: seeking-human-v009 2.2s ease-in-out infinite;
}

@keyframes seeking-human-v009 {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  25% { transform: translate(-50%, -50%) rotate(-2deg) scale(1.025); }
  50% { transform: translate(-50%, -50%) rotate(1deg) scale(1.035); }
  75% { transform: translate(-50%, -50%) rotate(2deg) scale(1.02); }
}

.riccio.friendly-arrival {
  filter:
    drop-shadow(0 20px 24px rgba(0,0,0,0.52))
    drop-shadow(0 0 28px rgba(236,72,153,0.28))
    drop-shadow(0 0 18px rgba(217,164,65,0.26));
}

/* zona sociale: non è invasione, è bordo umano della scrivania */
#desk-container .social-zone-v009 {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 210px;
  height: 95px;
  transform: translateX(-50%);
  border: 1px dashed rgba(236,72,153,0.18);
  background: radial-gradient(ellipse, rgba(236,72,153,0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.78;
  z-index: 1;
}

.social-zone-v009::after {
  content: "zona presenza";
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  color: rgba(236,72,153,0.34);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}


/* ============================================
   RICCIO AUTONOMY LAB v010 — ORIGINAL RICCIO LOOK
   Più simile al riccio originale: mascotte empatica, corpo tondo,
   aculei morbidi, muso chiaro, occhi LED integrati.
   ============================================ */

.visual-note-v010 {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(217,164,65,0.055);
  border: 1px solid rgba(217,164,65,0.12);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.visual-note-v010 strong {
  color: #f0d78c;
  font-family: var(--font-display);
  font-size: 0.75rem;
}

.visual-note-v010 span {
  color: rgba(244,238,228,0.58);
  font-size: 0.65rem;
  line-height: 1.35;
}

/* silhouette generale: più compatta e tenera */
.riccio {
  width: 188px;
  height: 144px;
  transform-origin: center center;
  filter:
    drop-shadow(0 24px 28px rgba(0,0,0,0.56))
    drop-shadow(0 0 16px rgba(217,164,65,0.10));
}

/* corpo più rotondo, meno lungo */
.riccio-body {
  width: 148px;
  height: 104px;
  left: -8px;
  top: 20px;
}

/* corpo con texture aculei integrata, più simile a un animaletto */
.body-shell {
  width: 100%;
  height: 100%;
  border-radius: 58% 48% 46% 54%;
  border: 2px solid rgba(51,31,19,0.96);
  background:
    radial-gradient(circle at 26% 28%, rgba(255,230,180,0.18), transparent 20%),
    radial-gradient(circle at 52% 34%, rgba(255,210,140,0.13), transparent 24%),
    repeating-radial-gradient(ellipse at 45% 48%,
      rgba(42,27,18,0.95) 0 3px,
      rgba(114,75,45,0.95) 3px 7px,
      rgba(194,139,79,0.88) 7px 10px),
    radial-gradient(ellipse at 62% 54%, #7d5638 0%, #4b3021 74%);
  box-shadow:
    inset -12px -12px 28px rgba(0,0,0,0.38),
    inset 8px 8px 18px rgba(255,225,185,0.09),
    0 6px 0 rgba(0,0,0,0.12);
}

/* maschera morbida chiara sul ventre/muso laterale */
.body-shell::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 34px;
  width: 74px;
  height: 56px;
  border-radius: 54% 48% 42% 52%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,235,205,0.35), transparent 30%),
    radial-gradient(ellipse at center, #c99462 0%, #9c6842 70%);
  opacity: 0.72;
  z-index: 1;
}

/* corona aculei meno aggressiva, più morbida e riconoscibile */
.spine-layer {
  width: 154px;
  height: 92px;
  left: -11px;
  top: -24px;
  z-index: 1;
  transform: rotate(-2deg);
}

/* ogni aculeo sembra una piccola goccia/ciuffo, non uno spuntone */
.spine {
  width: 10px;
  border-radius: 80% 80% 18% 18%;
  background:
    linear-gradient(to top,
      #2c1a11 0%,
      #5b3924 44%,
      #b9824d 78%,
      #e2b26f 100%);
  box-shadow:
    inset 1px 0 0 rgba(255,255,255,0.08),
    0 2px 2px rgba(0,0,0,0.20);
  opacity: 0.96;
}

.s1  { left: 2px;   height: 24px; top: 35px; transform: rotate(-46deg); }
.s2  { left: 12px;  height: 34px; top: 24px; transform: rotate(-36deg); }
.s3  { left: 24px;  height: 44px; top: 15px; transform: rotate(-27deg); }
.s4  { left: 38px;  height: 53px; top: 9px;  transform: rotate(-18deg); }
.s5  { left: 53px;  height: 60px; top: 4px;  transform: rotate(-9deg); }
.s6  { left: 69px;  height: 64px; top: 1px;  transform: rotate(-1deg); }
.s7  { left: 85px;  height: 61px; top: 3px;  transform: rotate(8deg); }
.s8  { left: 101px; height: 55px; top: 8px;  transform: rotate(18deg); }
.s9  { left: 115px; height: 45px; top: 16px; transform: rotate(29deg); }
.s10 { left: 126px; height: 34px; top: 26px; transform: rotate(39deg); }
.s11 { left: 136px; height: 24px; top: 37px; transform: rotate(48deg); }
.s12 { left: 31px;  height: 34px; top: 25px; transform: rotate(-30deg); opacity: 0.82; }
.s13 { left: 61px;  height: 45px; top: 16px; transform: rotate(-8deg);  opacity: 0.85; }
.s14 { left: 92px;  height: 44px; top: 16px; transform: rotate(12deg);  opacity: 0.85; }
.s15 { left: 119px; height: 33px; top: 27px; transform: rotate(32deg);  opacity: 0.82; }

/* muso più grande, chiaro e rotondo */
.riccio-face {
  width: 84px;
  height: 72px;
  right: -18px;
  top: 35px;
  border-radius: 58% 60% 52% 48%;
  border: 2px solid rgba(65,40,25,0.96);
  background:
    radial-gradient(circle at 34% 28%, rgba(255,244,220,0.44), transparent 27%),
    radial-gradient(circle at 62% 68%, rgba(115,70,43,0.14), transparent 31%),
    linear-gradient(145deg, #dfb27f 0%, #c79261 45%, #95613f 100%);
  box-shadow:
    inset -6px -9px 16px rgba(0,0,0,0.24),
    inset 8px 6px 10px rgba(255,238,210,0.12),
    0 4px 0 rgba(0,0,0,0.14);
}

/* guancia chiara */
.riccio-face::marker { display: none; }

.riccio-face .eye-socket {
  transform: scale(0.78);
}

/* occhi LED più piccoli e meno alieni, incassati nel muso */
.eye-socket {
  width: 38px;
  height: 38px;
  top: 8px;
  background: radial-gradient(circle, rgba(255,255,255,0.10), rgba(0,0,0,0.10) 70%);
  border-radius: 50%;
  filter:
    drop-shadow(0 0 5px rgba(142,202,230,0.18))
    drop-shadow(0 2px 2px rgba(0,0,0,0.18));
}

.eye-left { left: 3px; top: 8px; }
.eye-right { left: 34px; top: 8px; }

.led-ring {
  transform: scale(0.86);
  transform-origin: center center;
}

#pupil-left,
#pupil-right {
  r: 4;
}

/* nasino più riconoscibile da riccio */
.riccio-nose {
  width: 15px;
  height: 11px;
  right: -2px;
  top: 36px;
  border-radius: 58% 50% 48% 52%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.38), transparent 23%),
    radial-gradient(ellipse, #090909 0%, #251916 72%);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.55),
    0 0 7px rgba(0,0,0,0.28);
}

/* bocca più dolce */
.riccio-mouth {
  width: 16px;
  height: 6px;
  right: 9px;
  top: 51px;
  border-bottom: 2px solid rgba(82,49,31,0.86);
  border-radius: 0 0 60% 60%;
}

.riccio-mouth.happy {
  width: 20px;
  height: 8px;
  border-bottom-width: 2px;
}

/* baffetti più sottili, visibili ma non cartooneschi */
.riccio-face::before,
.riccio-face::after {
  width: 24px;
  height: 1px;
  right: -10px;
  background: linear-gradient(90deg, rgba(70,45,28,0.15), rgba(70,45,28,0.76));
  z-index: 6;
}

.riccio-face::before {
  top: 45px;
  transform: rotate(10deg);
}

.riccio-face::after {
  top: 52px;
  transform: rotate(-11deg);
}

/* aggiunge una terza linea baffo tramite naso */
.riccio-nose::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(70,45,28,0.10), rgba(70,45,28,0.68));
  transform: rotate(-1deg);
}

/* zampette più integrate e tenere */
.paw {
  width: 18px;
  height: 12px;
  background:
    radial-gradient(ellipse at 42% 25%, rgba(255,232,200,0.24), transparent 32%),
    linear-gradient(180deg, #9b6d49, #6e472e);
  border: 1px solid rgba(50,30,20,0.45);
}

.paw-fl { left: 19px; bottom: -5px; }
.paw-fr { left: 58px; bottom: -6px; }
.paw-bl { left: 96px; bottom: -5px; }
.paw-br { left: 126px; bottom: -6px; }

/* orecchio piccolo: lo aggiungiamo come pseudo-elemento del corpo */
.riccio-body::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 21px;
  height: 21px;
  border-radius: 60% 40% 50% 50%;
  background:
    radial-gradient(circle at 45% 45%, #d9a474 0 38%, #8b5b3a 42% 100%);
  border: 2px solid rgba(58,37,24,0.86);
  transform: rotate(18deg);
  z-index: 2;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.22);
}

/* ombra più morbida sotto il riccio */
.riccio::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 142px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.36), transparent 72%);
  z-index: -1;
}

/* negli stati sociali il nuovo riccio sembra più affettuoso */
.riccio.friendly-arrival,
.riccio.social-glow,
.riccio.trust-pulse {
  filter:
    drop-shadow(0 24px 28px rgba(0,0,0,0.56))
    drop-shadow(0 0 24px rgba(217,164,65,0.30))
    drop-shadow(0 0 18px rgba(236,72,153,0.18));
}

/* animazione più naturale: piccolo passo, non salto */
.riccio.walking {
  transition: left 1.15s cubic-bezier(.2,.8,.2,1), top 1.15s cubic-bezier(.2,.8,.2,1);
}

.riccio.walking .body-shell {
  animation: body-step-v010 0.55s ease-in-out infinite alternate;
}

@keyframes body-step-v010 {
  from { transform: translateY(0) rotate(-0.5deg); }
  to { transform: translateY(-3px) rotate(0.8deg); }
}

.riccio.happy {
  animation: happy-bounce-v010 0.75s ease-in-out infinite;
}

@keyframes happy-bounce-v010 {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
  50% { transform: translate(-50%, -50%) translateY(-5px) rotate(-1deg); }
}

/* riduce l'effetto robotico delle pupille: più animaletto */
#pupil-left,
#pupil-right {
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}
