/* WhatsApp & Social Text Formatter - adapts via @container only (Rule 35). */
.stf-format-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.stf-format-bar[hidden],
.stf-a11y-note[hidden],
.stf-stage[hidden],
.stf-bio-list[hidden] {
  display: none;
}
.stf-fmt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.35rem 0.68rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.81rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.stf-fmt-btn:hover,
.stf-fmt-btn:focus-visible {
  border-color: var(--brand-ink);
  background: var(--brand-soft);
}
.stf-fmt-btn code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--brand-ink);
}
.stf-a11y-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(234, 109, 56, 0.32);
  background: var(--brand-soft);
  color: var(--text-primary);
  font-size: 0.81rem;
  line-height: 1.45;
}
.stf-stage {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}
.stf-bubble-shell {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #EFEAE2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
[data-theme="dark"] .stf-bubble-shell { background: #121B22; }
.stf-bubble {
  max-width: min(100%, 460px);
  width: fit-content;
  min-width: 120px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md) var(--radius-xs) var(--radius-md) var(--radius-md);
  background: #D9FDD3;
  color: #111B21;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .stf-bubble { background: #005C4B; color: #E9EDEF; }
.stf-bubble code, .stf-mono-block {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(17, 27, 33, 0.09);
  border-radius: var(--radius-xs);
  padding: 0.08rem 0.32rem;
}
[data-theme="dark"] .stf-bubble code, [data-theme="dark"] .stf-mono-block { background: rgba(0, 0, 0, 0.28); }
.stf-mono-block { display: block; margin: 0.3rem 0; padding: 0.5rem 0.65rem; white-space: pre-wrap; }
.stf-quote { margin: 0.2rem 0; padding-left: 0.65rem; border-left: 3px solid #1F7A4C; opacity: 0.92; }
[data-theme="dark"] .stf-quote { border-left-color: #53BDEB; }
.stf-li { padding-left: 0.25rem; }
.stf-bubble-meta { font-size: 0.73rem; color: #4A555B; }
[data-theme="dark"] .stf-bubble-meta { color: #99AAB5; }
.stf-code-head { display: flex; align-items: center; justify-content: space-between; }
.stf-code-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.stf-bio-list { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; }
.stf-bio-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
}
.stf-bio-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.stf-bio-name { font-size: 0.74rem; font-weight: 600; color: var(--text-secondary); }
.stf-bio-text { font-size: 1rem; color: var(--text-primary); overflow-wrap: anywhere; white-space: pre-wrap; }
.stf-bio-copy { min-height: 44px; flex-shrink: 0; }
@container (max-width: 520px) {
  .stf-bio-card { flex-direction: column; align-items: stretch; }
  .stf-bio-copy { width: 100%; justify-content: center; }
}
