.wanmai-topics { flex: 0 0 auto; margin: 8px 0; }
.wanmai-topics-toggle {
  display: block; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid #cbd7c7; border-radius: 12px; background: #f4f7ed;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 700;
  text-align: left; cursor: pointer; touch-action: manipulation;
}
.wanmai-topics-toggle:focus-visible { outline: 3px solid #4f8d71; outline-offset: 2px; }
.wanmai-prompts[hidden] { display: none !important; }
.wanmai-topics .wanmai-prompts { max-height: 160px; overflow-y: auto; overscroll-behavior: contain; }
.wanmai-panel-body { overflow-y: auto; }
.wanmai-panel .wanmai-log { min-height: 96px; scroll-behavior: auto; }
.wanmai-log .wanmai-message, .wanmai-log .wanmai-typing { flex-shrink: 0; }
.wanmai-panel .wanmai-form textarea { min-height: 48px; max-height: 96px; resize: none; }
.wanmai-status:empty { display: none; }
@media (max-width: 760px) {
  .wanmai-panel {
    bottom: calc(88px + env(safe-area-inset-bottom));
    height: min(680px, calc(100dvh - 112px - env(safe-area-inset-bottom)));
    max-height: calc(100dvh - 112px - env(safe-area-inset-bottom));
    min-height: 0;
  }
  .wanmai-topics .wanmai-prompts { max-height: 140px; }
  .wanmai-panel .wanmai-form { gap: 6px; }
  .wanmai-panel .wanmai-form label { font-size: 14px; }
}
@media (max-height: 600px) {
  .wanmai-panel .wanmai-note { display: none; }
  .wanmai-topics .wanmai-prompts { max-height: 100px; }
}
