#bobby-assistant #bobby-panel {
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 155px));
  max-height: 760px;
  overflow: hidden;
  background: #fff;
}

#bobby-assistant #bobby-panel[hidden] { display: none; }

#bobby-assistant #bobby-messages {
  flex: 1 1 auto;
  min-height: 100px;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

#bobby-assistant .bobby-message { overflow-wrap: anywhere; }
#bobby-assistant .bobby-message.system { margin: 4px auto 10px; padding: 4px 9px; color: #475569; background: transparent; font-size: 12px; text-align: center; }
#bobby-assistant .bobby-action { display: block; min-height: 44px; margin-top: 10px; padding: 11px 14px; border-radius: 9px; color: #fff; background: var(--bobby-action); text-align: center; text-decoration: none; font-weight: 700; }
#bobby-assistant .bobby-action:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }

#bobby-assistant #bobby-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 12px;
  background: #f4fafb;
  border-top: 1px solid #dbe7ea;
}
#bobby-assistant #bobby-options[hidden], #bobby-assistant #bobby-nav[hidden] { display: none; }

#bobby-assistant .bobby-choice {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #8dd8df;
  border-radius: 10px;
  color: #0f4c5c;
  background: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#bobby-assistant .bobby-choice:hover { background: #e6fbfd; border-color: #0e7490; }
#bobby-assistant .bobby-choice.bobby-own { color: #fff; background: var(--bobby-primary); border-color: var(--bobby-primary); }

#bobby-assistant #bobby-nav { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 12px; background: #fff; border-top: 1px solid #e2e8f0; }
#bobby-assistant .bobby-nav-button { min-height: 36px; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 8px; color: #164e63; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
#bobby-assistant .bobby-nav-button.bobby-restart { color: #9a3412; }

#bobby-assistant .bobby-compose { position: relative; flex: 0 0 auto; background: #fff; }
#bobby-assistant #bobby-own-hint { margin: 0; padding: 8px 14px 0; color: #475569; font-size: 12px; }
#bobby-assistant #bobby-questions { display: block; max-height: none; overflow: visible; padding: 7px 12px; border: 0; background: #fff; }
#bobby-assistant #bobby-questions[hidden] { display: none; }
#bobby-assistant .bobby-suggestion-button,
#bobby-assistant .bobby-more { display: block; width: 100%; min-height: 44px; margin: 3px 0; padding: 8px 10px; border: 1px solid #b7dfe3; border-radius: 8px; color: #0f4c5c; background: #f0fafa; font: inherit; text-align: left; cursor: pointer; }
#bobby-assistant .bobby-more { color: #fff; background: #0e7490; text-align: center; }
#bobby-assistant #bobby-form { min-height: 56px; align-items: center; }
#bobby-assistant #bobby-input { min-height: 44px; font-size: 16px; }
#bobby-assistant #bobby-form button { min-width: 44px; min-height: 44px; }

#bobby-assistant button:focus-visible,
#bobby-assistant input:focus-visible,
#bobby-assistant a:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

@media (max-width: 600px) {
  #bobby-assistant #bobby-panel { position: fixed; inset: 8px; width: auto; height: auto; max-height: none; border-radius: 14px; }
  #bobby-assistant #bobby-options { gap: 5px; padding: 7px; }
  #bobby-assistant .bobby-choice { padding: 7px; font-size: 13px; }
  #bobby-assistant #bobby-nav { padding: 6px 8px; }
  #bobby-assistant .bobby-nav-button { min-height: 44px; flex: 1 1 42%; }
}

@media (max-width: 360px) {
  #bobby-assistant #bobby-options { grid-template-columns: 1fr; }
  #bobby-assistant .bobby-choice { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  #bobby-assistant .bobby-character,
  #bobby-assistant .bobby-arm,
  #bobby-assistant .eye { animation: none !important; }
  #bobby-assistant #bobby-messages { scroll-behavior: auto; }
}
