/* Let the sidebar scroll as one column at short heights. With extra space the
   card sits between the nav and footer, slightly below their midpoint. */
#lady-root {
  flex: none;
  margin-block: auto;
  margin-inline: 4px;
  padding-block: clamp(12px, calc((100dvh - 760px) / 6), 45px) 12px;
}

.lady {
  display: grid;
  grid-template-rows: auto minmax(126px, 1fr) auto auto;
  gap: 4px;
  min-block-size: 248px;
  padding: 15px;
  border: 1px solid var(--lady-line);
  border-radius: 17px;
  background: var(--lady-bg);
  color: var(--lady-ink);
  font-size: 14px;
  line-height: 1.25;
}

.lady-name { font-size: 18px; }
.lady-plasma { display: grid; place-items: center; }
.lady-plasma svg { display: block; inline-size: min(100%, 164px); block-size: 126px; overflow: visible; }
.lady-plasma__sheet { transform-origin: 97px 107px; }
.lady-plasma__sheet path[stroke] { fill: none; stroke-width: .85; }
.lady[data-state='idle'] .lady-plasma { opacity: .79; }
.lady[data-state='muted'] .lady-plasma { opacity: .7; }
.lady:is([data-state='listening'], [data-state='speaking']) .lady-plasma__sheet {
  animation: lady-ribbon-drift var(--lady-drift-time, 3s) ease-in-out infinite alternate;
  animation-delay: var(--lady-drift-delay, -.6s);
}
.lady[data-state='speaking'] .lady-plasma__sheet { --lady-drift-time: 1.85s; }
.lady-plasma__sheet--cool { --lady-tilt: -5deg; --lady-lift: 3px; }
.lady-plasma__sheet--pink { --lady-tilt: 4deg; --lady-lift: 2px; --lady-drift-delay: -1.6s; }
.lady-plasma__sheet--violet { --lady-tilt: -3deg; --lady-lift: -2px; --lady-drift-delay: -.2s; }
@keyframes lady-ribbon-drift {
  from { transform: scaleY(.93); }
  to { transform: translateY(var(--lady-lift)) rotate(var(--lady-tilt)) scaleY(1.09); }
}

.lady-status {
  min-block-size: 16px;
  color: var(--lady-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.lady[data-state='muted'] .lady-status { color: var(--lady-accent); }

.lady-actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-block-start: 4px; }
.lady button {
  display: inline-flex;
  min-block-size: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--lady-line);
  border-radius: 999px;
  background: var(--lady-surface);
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.lady button:hover { background: var(--lady-mic-hover); }
.lady button:focus-visible { outline: 2px solid var(--focus-invert); outline-offset: 2px; }
.lady button svg { inline-size: 19px; block-size: 19px; flex: none; }
.lady-start { padding: 5px 16px; }
.lady .lady-mute, .lady .lady-end { inline-size: 59px; padding: 0; }
.lady .lady-mute[aria-pressed='true'] {
  border-color: var(--lady-mute-line);
  background: var(--lady-mute-bg);
  color: var(--lady-ink);
}
.lady .lady-mute[aria-pressed='true']:hover { background: var(--lady-mute-hover); }
.lady-mute[aria-pressed='false'] svg:nth-child(2),
.lady-mute[aria-pressed='true'] svg:first-child { display: none; }
.lady .lady-end { background: var(--lady-end-bg); color: var(--lady-end-ink); }
.lady .lady-end:hover { background: var(--lady-end-hover); }

@media (max-width: 760px) {
  .lady button { min-block-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .lady[data-state] .lady-plasma__sheet { animation: none; }
}
