/* Reuse app surfaces while overriding generic panel gutters and width. */
.modal.th-panel { box-sizing: border-box; width: min(720px, 100%); min-width: 0; max-width: 720px; overflow-x: hidden; }
.th-panel .panel-head { gap: 12px; flex-wrap: wrap; }
.th-panel .panel-head .ghost { font-size: 13px; }
.th-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.th-head-actions > button { flex: none; white-space: nowrap; }
.th-panel h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.th-reminder-actions, .th-attachments { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.th-follow-select { width: auto; max-width: 220px; font-size: 13px; }
.th-panel .thread-messages { min-height: 120px; flex: 1; overflow-y: auto; overflow-anchor: none; margin: 0; padding: 12px 16px; }
.th-panel textarea.thread-input { min-width: 0; height: 40px; min-height: 40px; resize: none; }
.th-panel .thread-composer { margin-top: 8px; padding: 8px 12px 12px; }
.th-panel > .ft-status:not(:empty), .th-panel > .th-attachments { margin: 0; padding: 8px 12px; }
.th-panel [hidden], .notif-menu [hidden] { display: none !important; }
.th-panel .ft-status:empty, .th-history-status:empty, .th-attachments:empty { display: none; }
.th-attachments { max-height: 100px; overflow-y: auto; margin-top: 8px; }
.th-attachment { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow-wrap: anywhere; background: var(--bg-3); padding: 4px 8px; border-radius: 8px; }
.th-attachment button { padding: 2px 6px; }
.th-mute-deadline { padding: 8px 12px 0; max-width: 290px; font-size: 12px; color: var(--muted); }
.th-followed { margin-bottom: 24px; }
.th-followed h2 { font-size: 16px; }
.th-followed-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 4px; border: 0; background: transparent; border-radius: 8px; }
.th-followed-row > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.th-followed-row small { display: block; color: var(--muted); margin-top: 3px; }
.th-followed-row time { color: var(--muted); font-size: 12px; }
.th-reminder-actions { flex-basis: 100%; }
.th-reminder-actions select { width: auto; max-width: 180px; }
.th-panel button, .th-panel select, .th-reminder-actions button { border-radius: 8px; }
.th-panel :focus-visible, .th-followed :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 800px) {
  .modal.th-panel { max-height: 94dvh; padding: 0; }
  .th-panel .panel-head { padding: 12px; }
  .th-panel .thread-input { font-size: 16px; }
  .th-head-actions { width: 100%; gap: 6px; }
  .th-follow-select { flex: 1; min-width: 0; }
  .th-panel button, .th-panel select, .th-reminder-actions button, .th-reminder-actions select { min-height: 44px; }
  .th-panel .thread-messages { min-height: 80px; }
  .th-followed-row { flex-wrap: wrap; min-height: 44px; }
  .th-followed-row time { flex-basis: 100%; }
}
