/* Lab Buddy dock: fixed to the bottom-right corner, shown when instructions are loaded. */
.buddy {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  width: min(360px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 8px;
}
.buddy[hidden] { display: none; }
.buddy-head { display: flex; align-items: center; gap: 8px; }
.buddy-head strong { color: var(--accent); }
.buddy-title { flex: 1; font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buddy-head button { background: none; border: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 0 4px; }
.buddy-text { margin: 0; min-height: 3.2em; line-height: 1.45; }
.buddy-foot { display: grid; gap: 6px; }
.buddy-foot .note { margin: 0; }
.buddy-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.buddy-controls button,
.buddy-controls select {
  font-size: 0.8rem;
  padding: 5px 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.buddy-controls button:disabled { opacity: 0.5; }

/* Lab Buddy minimised: only the header shows, so it stays out of the way on every page. */
.buddy.minimized { width: auto; min-width: 180px; right: 16px; bottom: 16px; padding: 8px 10px; }
.buddy.minimized .buddy-text,
.buddy.minimized .buddy-foot,
.buddy.minimized .buddy-title { display: none; }
.buddy-controls button,
.buddy-controls select { color: var(--text); }

/* Lab Buddy card: robot on the left, status and controls on the right. */
.buddy { width: min(440px, calc(100vw - 32px)); grid-template-columns: 1fr; }
.buddy-head { gap: 12px; }
.buddy-avatar { width: 56px; height: 56px; flex: 0 0 auto; }
.buddy-id { display: grid; gap: 2px; flex: 0 0 auto; }
.buddy-id strong { color: #ffffff; font-size: 1rem; }
.buddy-status { font-size: 0.8rem; color: var(--muted); }
.buddy-head .buddy-title { flex: 1; }
.buddy.minimized .buddy-avatar { width: 32px; height: 32px; }
.buddy.minimized .buddy-id .buddy-status { display: none; }
.buddy-text { color: #ffffff; }

