/* Phase 123 (docs/design/LEAN.md §4.10, §5.10): the tools line and Tidy this chat in the ring's sheet,
   What she has, the tidy divider in the thread, and the two settings cards. Theme tokens only; 44 px targets. */
.ctx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ctx-acts button, .lean-what, .lean-pin { min-height: 44px; }
.ctx-acts button { flex: 1 1 8rem; }
.lean-what-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; max-height: 50vh; overflow: auto; }
.lean-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.lean-fam { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.lean-chip { font-size: 0.85em; padding: 1px 8px; border-radius: var(--r-control); background: var(--surface-2); color: var(--text-2); }
.lean-card { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-1); display: flex; flex-direction: column; gap: 8px; }
.lean-card h3 { margin: 0; display: flex; align-items: center; gap: 6px; }
.lean-card select { min-height: 44px; max-width: 100%; }

.fold-divider { margin: 12px 0; text-align: center; border-top: 1px dashed var(--line); padding-top: 8px; overflow-wrap: anywhere; }
.fold-divider .fold-line { margin: 0; font-weight: 600; color: var(--text-2); }
.fold-divider .fold-sub { margin: 2px 0 6px; }
.fold-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.fold-acts button { min-height: 44px; min-width: 44px; }
.fold-card { margin: 8px auto 0; max-width: 760px; text-align: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); color: var(--text-1); }
.fold-summary { white-space: pre-wrap; margin: 0 0 6px; }
.fold-muted .fold-line { font-weight: 400; }
.msg.folded { opacity: 0.7; }

@media (max-width: 480px) {
  /* The bottom sheet sits above the phone's bottom bar: its last lines stay reachable. */
  #ctx-sheet { max-height: 75vh; overflow-y: auto; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .fold-acts button { flex: 1 1 40%; }
  .fold-card { padding: 10px 16px; }
  .ctx-acts button { flex: 1 1 100%; }
}
