/* Shared secretary component. State changes use a quiet crossfade, never jumping. */
.secretary-widget {
  position: fixed;
  z-index: 70;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.secretary-widget[hidden] { display: none; }
.secretary-character,
.secretary-bubble { pointer-events: auto; }
.secretary-character {
  width: 104px;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 10px 12px rgba(23,56,43,.17));
}
.secretary-character img {
  display: block;
  width: auto;
  max-width: 128px;
  height: 184px;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
  transition: opacity var(--dur-2) var(--ease-standard), transform var(--dur-2) var(--ease-standard);
}
.secretary-character:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.secretary-bubble {
  width: min(300px, calc(100vw - 142px));
  max-height: min(55dvh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: 34px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px 14px 4px 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.secretary-bubble[hidden] { display: none; }
.secretary-bubble b { display: block; font-size: 15px; }
.secretary-bubble p { margin: 6px 0 12px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.secretary-bubble__actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.secretary-bubble__actions button { min-height: 36px; color: var(--accent-strong); font-size: 14px; font-weight: 600; }
.secretary-coach { min-height: 0; }
.secretary-coach__copy { display: grid; gap: 2px; }
.secretary-coach__copy b { font-size: 14px; }
.secretary-coach__copy small { color: var(--text-muted); font-size: 14px; line-height: 1.4; }
.session-page[data-difficulty="hard"] .secretary-widget { display: none; }
@media (max-width: 700px) {
  .secretary-widget {
    right: max(6px, env(safe-area-inset-right, 0px));
    bottom: max(4px, env(safe-area-inset-bottom, 0px));
  }
  .secretary-character { width: 78px; height: 142px; }
  .secretary-character img { max-width: 94px; height: 138px; }
  .secretary-bubble { width: min(250px, calc(100vw - 98px)); margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .secretary-character img { transition: none; }
}
