/* ============================================================
 * pact-compose v1 — Canonical compose component chassis
 * ============================================================
 * Single source of truth for every compose / message / draft
 * modal in Dialed. Scoped under .pc-compose-root so it never
 * bleeds into other surfaces.
 *
 * Mock reference: public/pages/pact-compose-MOCK.html
 * Inventory:      GENESIS-EMAIL-COMPOSE-MASTER-INVENTORY.md
 * Brand contract: LAW 23 (v3 brand bylaws)
 * Mobile-first:   LAW 32 (designed at 375px, scaled up)
 * ============================================================ */

.pc-compose-root {
  /* Brand tokens — lifted from v3 brand bylaws */
  --pc-bg-cream: #FAF8F5;
  --pc-pearl-white: #FDFCFA;
  --pc-pearl-warm: #FBF5F0;
  --pc-border: #E8E2D8;
  --pc-border-soft: rgba(0, 0, 0, 0.06);
  --pc-text-primary: #2D2438;
  --pc-text-secondary: #4D4258;
  --pc-text-muted: #7A7085;
  --pc-text-light: #A8A0B0;
  --pc-iris: #8A7ABB;
  --pc-iris-deep: #7A6FA8;
  --pc-iris-12: rgba(138, 122, 187, 0.12);
  --pc-iris-20: rgba(138, 122, 187, 0.2);
  --pc-teal: #4A9999;
  --pc-teal-soft: #7DD3C0;
  --pc-pink-soft: #E8C4D0;
  --pc-lavender: #B8A9C9;
  --pc-success: #4A9B6E;
  --pc-danger: #C45454;
  --pc-warning: #C4950A;
  --pc-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --pc-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.14);
  --pc-shadow-modal: 0 24px 80px rgba(45, 36, 56, 0.18);
  --pc-r-sm: 8px;
  --pc-r-md: 12px;
  --pc-r-lg: 16px;
  --pc-r-xl: 20px;
  --pc-font-display: 'Satoshi', sans-serif;
  --pc-font-body: 'Inter', sans-serif;
}

/* === Overlay backdrop === */
.pc-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 56, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4vh 0.75rem 2rem;
  overflow-y: auto;
  /* LAW 42 — never chain scroll to (and stick) the page beneath */
  overscroll-behavior: contain;
}

.pc-overlay-bg[hidden] {
  display: none !important;
}

/* === Modal shell === */
.pc-modal {
  width: 100%;
  max-width: 920px;
  /* LAW 44 (Elle 2026-07-18: "modals need fitted FIXED sizes... the compose is
     jumpy"). Root cause of the jump: the modal had ONLY max-height, so it was
     CONTENT-SIZED and grew with every typed line (the body never scrolled —
     bodyScrollHeight == bodyClientHeight at every keystroke). A FIXED height
     makes the modal a stable box and the body the scroll region, so typing
     scrolls INSIDE the modal instead of resizing it. */
  /* Elle 2026-07-18 "when i click in to type the compose auto shifts in modal
     placement. WHYYYY?" — ROOT CAUSE (measured): the modal height was
     100dvh-6vh, but the overlay ALSO pads 4vh (top) + 2rem (bottom) around it.
     On any window short enough to hit that branch, modal + overlay padding
     EXCEEDED the viewport (e.g. 720px window: modal 677 + 29 + 32 = 738 > 720
     → overlay overflowed by 18px and became SCROLLABLE). Then clicking into a
     field let the browser's caret-scroll drag that 18px, shifting the modal.
     Fix: subtract the overlay's OWN padding (4vh + 2rem) plus a hair, so the
     modal + padding always fits and the overlay NEVER scrolls → no shift. */
  height: min(760px, calc(100vh - 4vh - 2rem - 6px));
  height: min(760px, calc(100dvh - 4vh - 2rem - 6px));
  max-height: calc(100vh - 4vh - 2rem - 6px);
  /* LAW 42 (Elle: Pearl draft modal stretched outside the viewport, close +
     save unreachable) — 100vh on iOS/landscape exceeds the VISUAL viewport,
     pushing the footer/close past the screen edge. dvh tracks the real
     visible height wherever supported; the vh line above is the fallback. */
  max-height: calc(100dvh - 4vh - 2rem - 6px);
  /* Wave 8.M.20 — darker iris orb behind header/toolbar so the field
     rows (From/To/Subject) have contrast and don't wash out. The body
     stays pearl-warm; the orb just sits up top. */
  background:
    radial-gradient(540px 200px at 50% -20px, rgba(138, 122, 187, 0.16), transparent 70%),
    radial-gradient(360px 160px at 0% 0%, rgba(106, 186, 186, 0.10), transparent 65%),
    linear-gradient(180deg, var(--pc-pearl-white) 0%, var(--pc-pearl-warm) 100%);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-xl);
  box-shadow: var(--pc-shadow-modal), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--pc-font-body);
  color: var(--pc-text-primary);
}

/* Body becomes the scrollable region so signature is reachable */
.pc-modal > .pc-body {
  flex: 1 1 auto;
  /* LAW 44 — min-height:0 lets the flex body SHRINK below its content and
     scroll inside the fixed-height modal. Without it, a flex item's default
     min-height:auto keeps it at content height, so it grows the modal (the
     jump) instead of scrolling. */
  min-height: 0;
  overflow-y: auto;
  /* LAW 42 — the ONE scroll region never chains to the page */
  overscroll-behavior: contain;
}

/* === Header === */
.pc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--pc-border-soft);
}

.pc-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.pc-eyebrow {
  font-family: var(--pc-font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pc-teal);
}

.pc-title {
  font-family: var(--pc-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pc-text-primary);
  word-break: break-word;
}

.pc-autosave {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--pc-text-muted);
  font-style: italic;
  margin-top: 0.15rem;
}

.pc-autosave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-success);
  box-shadow: 0 0 4px rgba(74, 155, 110, 0.5);
}

.pc-autosave-dot.offline {
  background: var(--pc-warning);
  box-shadow: 0 0 4px rgba(196, 149, 10, 0.5);
}

.pc-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.pc-close:hover {
  background: var(--pc-iris-20);
}

/* === Pearl context strip (mode=pearl-draft only) === */
.pc-context-strip {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.06) 0%, rgba(138, 122, 187, 0.06) 100%);
  border-bottom: 1px solid var(--pc-border-soft);
  font-size: 0.8rem;
  color: var(--pc-text-secondary);
}

.pc-modal[data-mode="pearl-draft"] .pc-context-strip {
  display: flex;
}

.pc-ctx-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #B8A9C9, #8A7ABB 60%, #7DD3C0);
  box-shadow: 0 0 6px rgba(138, 122, 187, 0.32);
  flex-shrink: 0;
  margin-top: 5px;
}

.pc-ctx-text {
  font-style: italic;
  color: var(--pc-text-secondary);
}

.pc-ctx-em {
  color: var(--pc-iris-deep);
  font-weight: 600;
  font-style: italic;
}

/* === Body === */
.pc-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 380px;
}

/* === Field rows === */
.pc-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  /* Wave 8.M.20 — Elle: "fields hard to see". Heavier divider so each
     row (From/To/Subject) has clear separation against the orb header. */
  border-bottom: 1px solid rgba(138, 122, 187, 0.18);
}

/* E3 (Elle 2026-07-10): Cc/Bcc rows collapse until the purple Cc/Bcc buttons
   on the To row reveal them. The reveal machinery always existed — this
   display:flex was overriding the UA [hidden] rule, so the rows rendered
   anyway on every surface. One line returns two rows of compose to the body. */
.pc-row[hidden] { display: none !important; }

.pc-row-label {
  font-family: var(--pc-font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* Wave 8.M.20 — darker label so it's legible on the iris orb */
  color: #6B5CA5;
  flex-shrink: 0;
  /* 2026-07-12 (Elle: "the subject part 'subject' is too close to the row
     title — give a little space to the right for each row") — "SUBJECT" at
     0.7rem/0.1em tracking nearly filled the old 54px box, leaving no gap
     before the field text. Wider box + a real gutter. */
  width: 58px;
  margin-right: 12px;
}

.pc-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

/* Cc / Bcc reveal toggle (sits at the right edge of the To row) */
.pc-ccbcc-toggle {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.pc-ccbcc-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--pc-font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8A7ABB;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.pc-ccbcc-btn:hover {
  color: #6B5CA5;
  background: rgba(138, 122, 187, 0.12);
}

.pc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem 0.3rem 0.75rem;
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
}

.pc-chip.invalid {
  background: rgba(196, 84, 84, 0.1);
  border: 1px solid rgba(196, 84, 84, 0.3);
  color: var(--pc-danger);
}

.pc-chip.duplicate {
  opacity: 0.5;
}

.pc-chip-x {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 122, 187, 0.18);
  color: var(--pc-iris-deep);
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
}

.pc-chip.invalid .pc-chip-x {
  background: rgba(196, 84, 84, 0.2);
  color: var(--pc-danger);
}

.pc-row-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--pc-font-body);
  font-size: 0.85rem;
  color: var(--pc-text-primary);
  padding: 0.3rem 0;
  min-width: 100px;
  caret-color: #7A6FA8; /* LAW 45 — explicit caret under the backdrop-filter modal */
}

.pc-row-input::placeholder {
  color: var(--pc-text-light);
}

.pc-row-toggle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--pc-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.pc-row-toggle:hover {
  color: var(--pc-iris-deep);
  background: var(--pc-iris-12);
}

.pc-from-select {
  background: transparent;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-r-sm);
  padding: 0.3rem 0.55rem;
  font-family: var(--pc-font-body);
  font-size: 0.78rem;
  color: var(--pc-text-secondary);
}

.pc-subject {
  font-family: var(--pc-font-display);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  background: transparent;
  outline: none;
  padding: 0.5rem 0;
  flex: 1;
  caret-color: #7A6FA8; /* LAW 45 — explicit caret under the backdrop-filter modal */
}

.pc-subject::placeholder {
  color: var(--pc-text-light);
  font-weight: 400;
}

/* === Toolbar === */
.pc-toolbar {
  display: flex;
  align-items: center;
  /* E4 (Elle: "height of the bar is crammed on desktop") — real breathing:
     34px controls, wider gaps, taller padding. One recipe, every viewport
     (mobile media only bumps the tap floor to 40px). */
  gap: 0.3rem;
  padding: 0.55rem 0.6rem;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

/* Wave 8.M.12 — single-row toolbar variant. Overflow lives in popover. */
.pc-toolbar.pc-toolbar-singlerow {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.pc-toolbar.pc-toolbar-singlerow::-webkit-scrollbar { height: 4px; }
.pc-toolbar.pc-toolbar-singlerow::-webkit-scrollbar-thumb { background: rgba(138,122,187,0.25); border-radius: 4px; }

.pc-tb-more {
  margin-left: auto !important;
  border: 1px solid rgba(138,122,187,0.18) !important;
  background: rgba(138,122,187,0.06) !important;
  color: #6B5B9A !important;
  font-size: 1rem !important;
  letter-spacing: 0;
}
.pc-tb-more:hover { background: rgba(138,122,187,0.15) !important; }

/* Overflow popover anchored to ⋯ */
.pc-overflow-pop {
  background: #FDFCFA;
  border: 1px solid rgba(138, 122, 187, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(45, 36, 56, 0.18), 0 2px 4px rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
  /* 2026-07-12 (Elle: "more formatting modal moves off screen"). min-width
     280 + a non-wrapping button row pushed it to ~392px and off the right of a
     390px phone. Cap to the viewport + let the buttons wrap. */
  min-width: 240px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}
.pc-overflow-grid { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.pc-overflow-head {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4A9999;
  font-weight: 700;
  padding: 0.25rem 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(138,122,187,0.08);
  margin-bottom: 0.5rem;
}
.pc-overflow-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.2rem;
  align-items: center;
}
.pc-overflow-grid .pc-tb-btn {
  width: 30px;
  height: 30px;
}

.pc-tb-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--pc-text-secondary);
  font-family: var(--pc-font-body);
  font-size: 0.85rem;
  transition: all 0.12s;
}

.pc-tb-btn:hover {
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
}

.pc-tb-btn.active {
  background: var(--pc-iris);
  color: var(--pc-pearl-white);
}

.pc-tb-btn b { font-weight: 700; }
.pc-tb-btn i { font-style: italic; font-family: Georgia, serif; }
.pc-tb-btn u { text-decoration: underline; }
.pc-tb-btn s { text-decoration: line-through; }
/* Wave 8.M.28 — SVG icons inherit currentColor + render at consistent
   size so link/image/attach/pearl read as one line-art family alongside
   the existing align-cycle SVG. Replaces the colored emoji glyphs that
   were making the image button look like a lime-green block. */
.pc-tb-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  color: currentColor;
}
/* Pearl-assist sparkles get a soft iris tint so the assist button reads
   as "AI" without being a colored emoji. */
.pc-tb-btn.pc-tb-pearl { color: var(--pc-iris-deep); }
.pc-tb-btn.pc-tb-pearl:hover { color: var(--pc-iris); }

.pc-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--pc-border);
  margin: 0 0.3rem;
}

/* 2026-07-10 — the font/size/paragraph <select> white pills are GONE (Elle).
   One "Aa" icon opens the typography popover below. */
.pc-tb-aa .pc-tb-aa-glyph {
  font-family: var(--pc-font-head, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pc-typo-pop,
.pc-link-pop {
  background: linear-gradient(180deg, var(--pc-pearl-white) 0%, var(--pc-pearl-warm) 100%);
  border: 1px solid rgba(138, 122, 187, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(45, 36, 56, 0.16);
  padding: 0.6rem;
  font-family: var(--pc-font-body);
}

.pc-typo-head {
  font-family: var(--pc-font-head, 'Satoshi', sans-serif);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4A9999;
  font-weight: 700;
  padding: 0.15rem 0.3rem 0.4rem;
}

.pc-typo-label {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-text-muted);
  font-weight: 600;
  padding: 0.45rem 0.3rem 0.2rem;
}

.pc-typo-fonts {
  max-height: 168px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pc-typo-fonts::-webkit-scrollbar { width: 4px; }
.pc-typo-fonts::-webkit-scrollbar-thumb { background: rgba(138, 122, 187, 0.25); border-radius: 4px; }

.pc-typo-font {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.34rem 0.55rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--pc-text-primary);
  cursor: pointer;
}

.pc-typo-sizes,
.pc-typo-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.pc-typo-size,
.pc-typo-block {
  padding: 0.28rem 0.6rem;
  background: transparent;
  border: 1px solid var(--pc-border-soft);
  border-radius: 100px;
  font-size: 0.74rem;
  font-family: var(--pc-font-body);
  color: var(--pc-text-primary);
  cursor: pointer;
}

.pc-typo-font:hover,
.pc-typo-size:hover,
.pc-typo-block:hover {
  background: rgba(138, 122, 187, 0.08);
}

.pc-typo-font.active,
.pc-typo-size.active {
  background: linear-gradient(135deg, rgba(138, 122, 187, 0.16), rgba(106, 186, 186, 0.10));
  font-weight: 600;
  border-color: var(--pc-iris);
}

.pc-link-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--pc-border-soft);
  border-radius: 8px;
  font-family: var(--pc-font-body);
  font-size: 0.8rem;
  color: var(--pc-text-primary);
  background: var(--pc-pearl-white);
  outline: none;
  margin: 0.15rem 0 0.5rem;
}

.pc-link-input:focus {
  border-color: var(--pc-iris);
  box-shadow: 0 0 0 2px rgba(138, 122, 187, 0.18);
}

.pc-link-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.pc-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.1rem 0.2rem 0.2rem;
}
.pc-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(45, 36, 56, 0.14);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.pc-color-swatch:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px rgba(138, 122, 187, 0.35);
}
.pc-color-swatch--none {
  color: #7A7085;
  font-size: 0.8rem;
  line-height: 1;
}
.pc-color-pop {
  background: linear-gradient(180deg, var(--pc-pearl-white) 0%, var(--pc-pearl-warm) 100%);
  border: 1px solid rgba(138, 122, 187, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(45, 36, 56, 0.16);
  padding: 0.6rem;
  font-family: var(--pc-font-body);
}

.pc-tb-brush.active {
  background: var(--pc-iris);
  color: var(--pc-pearl-white);
}

/* Wave 8.M — Pearl assist popover */
.pc-pearl-pop {
  width: 320px;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-border-soft);
  border-left: 3px solid var(--pc-iris);
  border-radius: var(--pc-r-md);
  box-shadow: var(--pc-shadow-lg);
  padding: 0.75rem 0.85rem;
  font-family: var(--pc-font-body);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pc-pearl-pop-head {
  font-family: var(--pc-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pc-iris-deep);
}

.pc-pearl-tones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pc-pearl-tone {
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--pc-border-soft);
  font-size: 0.72rem;
  color: var(--pc-text-secondary);
  cursor: pointer;
  font-family: var(--pc-font-body);
}

.pc-pearl-tone.active {
  background: var(--pc-iris-12);
  border-color: var(--pc-iris);
  color: var(--pc-iris-deep);
  font-weight: 600;
}

.pc-pearl-input {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  background: var(--pc-pearl-warm);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-r-sm);
  font-family: var(--pc-font-body);
  font-size: 0.82rem;
  resize: vertical;
  color: var(--pc-text-primary);
}

.pc-pearl-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Wave 8.M.3 — signature inline in body (selectable + deletable) */
.pc-editor .pc-sig-inline {
  margin-top: 16px;
  padding: 8px 0;
  border-top: 1px dashed transparent;
  position: relative;
}
.pc-editor .pc-sig-inline:hover {
  border-top: 1px dashed var(--pc-iris-20);
}
.pc-editor .pc-sig-inline:hover::before {
  content: "Signature — select to delete";
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 0.65rem;
  font-style: italic;
  color: var(--pc-text-muted);
  background: var(--pc-pearl-white);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--pc-border-soft);
  pointer-events: none;
}

/* 8.M.43 — ISOLATE the signature from ALL host-page CSS.
   The compose editor is a contenteditable inside whatever page mounts it
   (contacts, email, action-queue, etc.), so that page's element selectors
   (e.g. a page-level `td`/`a`/`img` border rule) leak into the editor and draw
   lines under the signature cells — that was the contacts-vs-email mismatch.
   The signature is fully inline-styled and self-contained, so reverting every
   author-origin declaration on its descendants neutralizes every host leak,
   while the signature's own inline styles (higher specificity than any selector)
   survive untouched. Result: the signature renders identically on every surface,
   and no page can ever leak in again. Scoped to descendants so the wrapper's own
   margin/hover-hint above is preserved. */
.pc-editor .pc-sig-inline * {
  all: revert;
}

/* Wave 8.M.6 — preview-pane continuous thread (newest first, collapsible) */
.pc-thread-msg.collapsed .pc-thread-msg-body { display: none; }
.pc-thread-msg-head:hover { background: rgba(138, 122, 187, 0.04); }
.pc-thread-msg-head { border-radius: 6px; }

/* Wave 8.M — quoted thread block inside editor body */
.pc-editor .pc-quoted-thread {
  margin-top: 24px;
  border-left: 3px solid var(--pc-iris);
  padding-left: 16px;
  color: var(--pc-text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* === Editor === */
.pc-editor {
  flex: 1;
  min-height: 200px;
  padding: 1rem 0.25rem;
  font-family: var(--pc-font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--pc-text-primary);
  outline: none;
  /* LAW 45 (Elle 2026-07-19: "the caret cursor is glitchy and i cannot see it.
     this must be a hard law"). The compose modal sits under a backdrop-filter
     ancestor (.pc-overlay-bg), a known browser bug that leaves the text caret
     UNPAINTED (invisible/glitchy) when it merely inherits the text color. An
     EXPLICIT caret-color forces the browser to paint it on its own layer. Never
     rely on the inherited caret under a filtered ancestor. */
  caret-color: #7A6FA8;
}

.pc-editor[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: var(--pc-text-light);
  font-style: italic;
  pointer-events: none;
}

.pc-editor h1,
.pc-editor h2,
.pc-editor h3 {
  font-family: var(--pc-font-display);
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.pc-editor h1 { font-size: 1.35rem; }
.pc-editor h2 { font-size: 1.15rem; }
.pc-editor h3 { font-size: 1.0rem; }

.pc-editor p {
  margin: 0 0 0.65rem;
}

.pc-editor strong {
  color: var(--pc-iris-deep);
  font-weight: 600;
}

.pc-editor ul,
.pc-editor ol {
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}

.pc-editor li {
  margin: 0.2rem 0;
}

.pc-editor img.pc-embedded {
  max-width: 100%;
  border-radius: var(--pc-r-md);
  box-shadow: var(--pc-shadow-md);
  margin: 0.5rem 0;
}

/* 2026-07-19 — hydrated DRAFT bodies are raw Outlook/Graph markup, not our
   own markup: clamp EVERY table and image (not just .pc-embedded) so quoted
   fixed-width email layouts can never drive the editor wider than the modal
   (the "not fitted / off screen" overflow). LAW 44 companion. */
.pc-editor table { max-width: 100% !important; }
.pc-editor img { max-width: 100%; height: auto; }

.pc-editor blockquote {
  border-left: 3px solid var(--pc-iris);
  background: var(--pc-iris-12);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  border-radius: 0 var(--pc-r-sm) var(--pc-r-sm) 0;
  color: var(--pc-text-secondary);
  font-style: italic;
}

.pc-editor mark {
  background: rgba(196, 149, 10, 0.18);
  padding: 0.05rem 0.2rem;
  border-radius: 3px;
}

.pc-editor a {
  color: var(--pc-iris-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* === Thread quote === */
.pc-thread {
  margin-top: 0.5rem;
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.82rem;
}

.pc-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--pc-text-muted);
}

.pc-thread-meta {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--pc-text-secondary);
}

.pc-thread-meta strong {
  font-weight: 600;
  color: var(--pc-text-primary);
}

.pc-thread-quote {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--pc-border-soft);
  color: var(--pc-text-secondary);
  border-left: 3px solid var(--pc-iris);
  background: rgba(138, 122, 187, 0.04);
  margin: 0 0.5rem 0.5rem;
  border-radius: 0 var(--pc-r-sm) var(--pc-r-sm) 0;
}

.pc-thread[data-collapsed="true"] .pc-thread-quote {
  display: none;
}

/* === Wave 8.A.1: scrollable multi-message thread chain === */
.pc-thread-list {
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--pc-border-soft);
  background: rgba(0, 0, 0, 0.015);
}

.pc-thread-list[hidden] { display: none; }

.pc-thread-message {
  border-bottom: 1px solid var(--pc-border-soft);
}

.pc-thread-message:last-child { border-bottom: none; }

.pc-thread-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: none;
  width: 100%;
  font-family: var(--pc-font-body);
  cursor: pointer;
  text-align: left;
}

.pc-thread-message-head:hover { background: rgba(138, 122, 187, 0.04); }

.pc-thread-from {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--pc-text-primary);
  flex-shrink: 0;
}

.pc-thread-date {
  font-size: 0.72rem;
  color: var(--pc-text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

.pc-thread-chev {
  color: var(--pc-iris-deep);
  font-size: 0.75rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.pc-thread-body {
  padding: 0 0.85rem 0.65rem 1.1rem;
  border-left: 3px solid var(--pc-iris);
  margin: 0 0.85rem 0.5rem;
  background: rgba(138, 122, 187, 0.04);
  border-radius: 0 var(--pc-r-sm) var(--pc-r-sm) 0;
  font-size: 0.84rem;
  color: var(--pc-text-secondary);
  line-height: 1.55;
  max-height: 220px;
  overflow-y: auto;
}

.pc-thread-message[data-collapsed="true"] .pc-thread-body {
  display: none;
}

.pc-thread-message[data-collapsed="true"] .pc-thread-message-head {
  background: rgba(0, 0, 0, 0.02);
}

.pc-thread-body img { max-width: 100%; height: auto; }

.pc-thread-meta-subj {
  color: var(--pc-text-muted);
  font-size: 0.75rem;
}

.pc-thread-toggle {
  background: transparent;
  border: none;
  color: var(--pc-iris-deep);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.pc-thread-toggle:hover { background: var(--pc-iris-12); }

/* === Signature === */
.pc-signature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--pc-border-soft);
  color: var(--pc-text-muted);
  font-size: 0.78rem;
}

.pc-sig-name {
  color: var(--pc-text-secondary);
  font-weight: 500;
}

.pc-sig-link {
  color: var(--pc-iris-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-size: 0.75rem;
}

/* === Footer === */
.pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid var(--pc-border-soft);
  flex-wrap: wrap;
}

/* 2026-07-19 (Elle) — attachment chips at the TOP of the message, flowing WITH
   the compose body (no separate thin scroll strip). Sits right under the
   subject; wraps naturally and scrolls only with the whole body. */
.pc-attach-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 1.25rem 12px;
  background: rgba(138, 122, 187, 0.05);
  border-bottom: 1px solid var(--pc-border-soft);
}
.pc-attach-label {
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8A7ABB;
  margin-bottom: 2px;
}
.pc-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  background: #FFFFFF;
  border: 1px solid rgba(138, 122, 187, 0.28);
  border-radius: 10px;
  font-size: 12.5px;
  color: #1C1C1E;
  max-width: 260px;
}
.pc-attach-clip { font-size: 12px; flex-shrink: 0; }
.pc-attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-attach-size { color: #9A93A3; font-size: 11px; flex-shrink: 0; }
.pc-attach-x {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: none; background: rgba(138, 122, 187, 0.1);
  border-radius: 6px; color: #6E6878; font-size: 15px; line-height: 1;
  cursor: pointer;
}
.pc-attach-x:hover { background: rgba(184, 80, 96, 0.14); color: #B85060; }

/* paperclip menu */
.pc-attach-menu {
  position: fixed;
  z-index: 100001;
  background: #FDFCFA;
  border: 1px solid rgba(184, 169, 201, 0.35);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 28, 30, 0.18);
  padding: 6px;
  min-width: 220px;
  font-family: 'Inter', sans-serif;
}
.pc-attach-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: transparent;
  border-radius: 8px; font-size: 13.5px; color: #1C1C1E; cursor: pointer;
}
.pc-attach-menu button:hover { background: rgba(138, 122, 187, 0.1); }
.pc-attach-menu button span { font-size: 15px; }

.pc-footer-left,
.pc-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pc-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--pc-r-sm);
  background: transparent;
  border: 1px solid var(--pc-border);
  cursor: pointer;
  color: var(--pc-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-icon-btn:hover {
  border-color: var(--pc-iris);
  color: var(--pc-iris-deep);
}

.pc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--pc-border);
  font-size: 0.72rem;
  color: var(--pc-text-muted);
  cursor: pointer;
}

.pc-toggle.on {
  background: var(--pc-iris-12);
  border-color: var(--pc-iris);
  color: var(--pc-iris-deep);
}

.pc-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc-text-light);
}

.pc-toggle.on .pc-toggle-dot {
  background: var(--pc-iris);
}

.pc-btn-ghost {
  background: transparent;
  border: 1px solid var(--pc-border);
  color: var(--pc-text-secondary);
  padding: 0.55rem 1rem;
  border-radius: var(--pc-r-sm);
  font-family: var(--pc-font-body);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
}

.pc-btn-ghost:hover {
  border-color: var(--pc-iris);
  color: var(--pc-iris-deep);
}

.pc-btn-primary {
  background: var(--pc-iris);
  color: var(--pc-pearl-white);
  border: 1px solid var(--pc-iris-deep);
  padding: 0.55rem 1.1rem;
  border-radius: var(--pc-r-sm);
  font-family: var(--pc-font-body);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(138, 122, 187, 0.28);
  transition: all 0.15s;
}

.pc-btn-primary:hover {
  background: var(--pc-iris-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 122, 187, 0.36);
}

.pc-btn-primary[disabled],
.pc-btn-primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* === Send state banners === */
.pc-state-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--pc-r-sm);
  font-size: 0.78rem;
  font-weight: 500;
}

.pc-state-banner.sending {
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
}

.pc-state-banner.success {
  background: rgba(74, 155, 110, 0.12);
  color: var(--pc-success);
  border: 1px solid rgba(74, 155, 110, 0.3);
}

.pc-state-banner.scheduled {
  background: rgba(196, 149, 10, 0.12);
  color: var(--pc-warning);
  border: 1px solid rgba(196, 149, 10, 0.3);
}

.pc-state-banner.failed {
  background: rgba(196, 84, 84, 0.12);
  color: var(--pc-danger);
  border: 1px solid rgba(196, 84, 84, 0.3);
}

.pc-state-spin {
  width: 12px;
  height: 12px;
  border: 2px solid var(--pc-iris-20);
  border-top-color: var(--pc-iris);
  border-radius: 50%;
  animation: pcSpin 0.7s linear infinite;
}

@keyframes pcSpin {
  to { transform: rotate(360deg); }
}

/* === Validation === */
.pc-warn-banner {
  background: rgba(196, 149, 10, 0.1);
  border: 1px solid rgba(196, 149, 10, 0.3);
  color: var(--pc-warning);
  border-radius: var(--pc-r-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
  margin-top: 0.4rem;
}

.pc-warn-banner.offline {
  background: rgba(196, 84, 84, 0.1);
  border-color: rgba(196, 84, 84, 0.3);
  color: var(--pc-danger);
}

/* === Mode-aware visibility === */
.pc-modal[data-mode="message"] .pc-row-subject,
.pc-modal[data-mode="activity"] .pc-row-subject,
.pc-modal[data-mode="support-ticket"] .pc-row-subject { display: none; }

.pc-modal[data-mode="note"] .pc-row-to,
.pc-modal[data-mode="note"] .pc-row-from,
.pc-modal[data-mode="activity"] .pc-row-to,
.pc-modal[data-mode="activity"] .pc-row-from { display: none; }

.pc-modal[data-mode="message"] .pc-tb-image,
.pc-modal[data-mode="message"] .pc-tb-link,
.pc-modal[data-mode="message"] .pc-tb-color,
.pc-modal[data-mode="activity"] .pc-tb-image,
.pc-modal[data-mode="activity"] .pc-tb-link,
.pc-modal[data-mode="activity"] .pc-tb-color { display: none; }
/* E4 2026-07-10 — same mode rules for the new single colors button */
.pc-modal[data-mode="message"] .pc-tb-colors,
.pc-modal[data-mode="activity"] .pc-tb-colors { display: none; }

.pc-modal[data-mode="message"] .pc-signature,
.pc-modal[data-mode="note"] .pc-signature,
.pc-modal[data-mode="activity"] .pc-signature,
.pc-modal[data-mode="support-ticket"] .pc-signature { display: none; }

.pc-modal[data-mode="message"] .pc-schedule,
.pc-modal[data-mode="note"] .pc-schedule,
.pc-modal[data-mode="activity"] .pc-schedule,
.pc-modal[data-mode="support-ticket"] .pc-schedule,
.pc-modal[data-mode="pearl-draft"] .pc-schedule { display: none; }

/* === Drafts tray (corner sticky) === */
.pc-draft-tray {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 8500;
  background: linear-gradient(180deg, var(--pc-pearl-white) 0%, var(--pc-pearl-warm) 100%);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  padding: 0.5rem;
  box-shadow: var(--pc-shadow-md);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  max-width: calc(100vw - 2rem);
  font-family: var(--pc-font-body);
}

.pc-draft-tray[hidden] { display: none !important; }

.pc-draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pc-pearl-warm);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-r-sm);
  padding: 0.35rem 0.55rem 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: var(--pc-text-secondary);
  max-width: 200px;
  cursor: pointer;
}

.pc-draft-chip:hover { border-color: var(--pc-iris); }

.pc-draft-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-iris);
  flex-shrink: 0;
}

.pc-draft-chip-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pc-text-primary);
  font-weight: 500;
}

.pc-draft-chip-meta {
  color: var(--pc-text-light);
  font-size: 0.65rem;
}

.pc-draft-chip-x {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--pc-text-muted);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === Mobile === */
@media (max-width: 640px) {
  /* 2026-07-20 REBUILD (Elle: "compose modal stays full screen when the
     keyboard opens"). LAW 46 keyboard contract: the sheet fills the frame
     via INSET (top/left/right/bottom 0 — the frame itself ends at the
     tab-bar top, so the sheet's bottom edge is flush on the Pearl nav) and
     NEVER resizes for the keyboard. The keyboard's overlap lands ONLY on
     the internal scroller as --pc-kb-inset bottom padding, so content and
     caret always scroll clear while the chrome stays put. */
  .pc-overlay-bg { padding: 0; align-items: stretch; }
  .pc-modal {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  /* ONE scroll region (LAW 44): body flexes to fill; --pc-kb-inset (set by
     _bindViewportResize while the keyboard is open) keeps the caret zone
     scrollable above the keyboard. scroll-padding keeps focused fields and
     the caret comfortably inside the visible band on iOS auto-scrolls. */
  .pc-modal > .pc-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding-bottom: calc(0.8rem + var(--pc-kb-inset, 0px));
    scroll-padding-top: 56px;
    scroll-padding-bottom: calc(24px + var(--pc-kb-inset, 0px));
  }
  .pc-footer { flex-shrink: 0; padding-bottom: 0.7rem; }
  .pc-row-label { width: 48px; margin-right: 8px; font-size: 0.62rem; } /* 2026-07-12 label↔field gutter */
  /* 2026-07-20 (Elle circled the empty band under the To chip) — with
     min-width:100px the input forced the Cc/Bcc toggle onto its own nearly
     empty second line. Let the input shrink so chip + input + Cc/Bcc pack
     one line (Apple-Mail pattern: Cc/Bcc rides the To line's right edge). */
  .pc-row-input { min-width: 48px; }
  .pc-body { padding: 0.8rem 0.85rem; }
  .pc-header, .pc-context-strip, .pc-footer {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .pc-toolbar { padding: 0.35rem; gap: 0.1rem; }
  .pc-tb-btn { width: 28px; height: 28px; font-size: 0.78rem; }
  .pc-footer { padding: 0.7rem 0.85rem; }
  .pc-btn-primary,
  .pc-btn-ghost { padding: 0.5rem 0.85rem; font-size: 0.78rem; }
  .pc-title { font-size: 0.95rem; }
  .pc-draft-tray { bottom: 0.5rem; right: 0.5rem; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .pc-state-spin,
  .pc-btn-primary { animation: none !important; transition: none !important; }
}

/* === Signature image block === */
.pc-signature-block {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.pc-sig-image-wrap {
  max-width: 100%;
  padding: 0.4rem 0;
}

.pc-sig-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--pc-r-sm);
}

.pc-sig-html {
  font-size: 0.85rem;
  color: var(--pc-text-secondary);
  line-height: 1.55;
}

.pc-sig-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--pc-text-muted);
}

/* === Recipient autocomplete dropdown === */
.pc-recipient-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  box-shadow: var(--pc-shadow-lg);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.25rem;
}

.pc-recipient-dropdown[hidden] { display: none; }

.pc-recipient-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.7rem;
  background: transparent;
  border: none;
  border-radius: var(--pc-r-sm);
  cursor: pointer;
  font-family: var(--pc-font-body);
  color: var(--pc-text-primary);
}

.pc-recipient-item:hover,
.pc-recipient-item.active {
  background: var(--pc-iris-12);
}

/* Wave 8.M.22 — keyboard-highlighted item is a stronger iris pill so the
   user can see what Enter will pick. */
.pc-recipient-item.active {
  background: linear-gradient(135deg, rgba(138, 122, 187, 0.18), rgba(106, 186, 186, 0.10));
  box-shadow: inset 2px 0 0 0 var(--pc-iris, #8A7ABB);
}

.pc-recipient-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--pc-text-primary);
}

.pc-recipient-item-meta {
  font-size: 0.72rem;
  color: var(--pc-text-muted);
  margin-top: 0.1rem;
}

/* === Recent emails panel (loaded on recipient select) === */
.pc-recent-emails {
  margin: 0.5rem 0;
  padding: 0.6rem 0.7rem;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.04) 0%, rgba(138, 122, 187, 0.04) 100%);
  border: 1px solid var(--pc-border-soft);
  border-left: 3px solid var(--pc-teal);
  border-radius: var(--pc-r-sm);
}

.pc-recent-emails-head {
  font-family: var(--pc-font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-teal);
  margin-bottom: 0.4rem;
}

.pc-recent-emails-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pc-recent-email {
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.35rem 0.4rem;
  border-radius: var(--pc-r-sm);
  cursor: pointer;
  font-family: var(--pc-font-body);
}

.pc-recent-email:hover { background: rgba(255, 255, 255, 0.5); }

.pc-recent-email-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.pc-recent-email-row strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pc-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-recent-email-when {
  font-size: 0.7rem;
  color: var(--pc-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-recent-email-snippet {
  font-size: 0.74rem;
  color: var(--pc-text-secondary);
  margin-top: 0.15rem;
  line-height: 1.45;
}

/* === Wave 7: Schedule-send popover === */
.pc-schedule-pop {
  width: 320px;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  box-shadow: var(--pc-shadow-lg);
  padding: 0.7rem 0.85rem;
  font-family: var(--pc-font-body);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pc-schedule-pop-head {
  font-family: var(--pc-font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-teal);
}

.pc-schedule-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pc-schedule-preset {
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--pc-border-soft);
  font-size: 0.72rem;
  color: var(--pc-text-secondary);
  cursor: pointer;
  font-family: var(--pc-font-body);
}

.pc-schedule-preset.active {
  background: var(--pc-iris-12);
  border-color: var(--pc-iris);
  color: var(--pc-iris-deep);
  font-weight: 600;
}

.pc-schedule-datetime {
  padding: 0.45rem 0.55rem;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-iris);
  border-radius: var(--pc-r-sm);
  font-family: var(--pc-font-body);
  font-size: 0.82rem;
  color: var(--pc-text-primary);
  width: 100%;
}

.pc-schedule-selected {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--pc-text-muted);
}

.pc-schedule-selected strong {
  color: var(--pc-iris-deep);
  font-weight: 600;
}

.pc-schedule-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--pc-border-soft);
}

.pc-schedule-foot .pc-btn-ghost,
.pc-schedule-foot .pc-btn-primary {
  font-size: 0.76rem;
  padding: 0.4rem 0.75rem;
}

/* === Wave 7: Send button busy + success states === */
.pc-btn-primary.pc-btn-busy {
  background: var(--pc-iris-deep);
  cursor: progress;
  pointer-events: none;
  position: relative;
}

.pc-btn-primary.pc-btn-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: pcBusyShimmer 1.3s linear infinite;
  pointer-events: none;
}

@keyframes pcBusyShimmer {
  to { background-position: -200% 0; }
}

.pc-btn-primary.pc-btn-success {
  background: var(--pc-success);
  border-color: #3D7F5C;
  pointer-events: none;
  animation: pcSuccessPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pcSuccessPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* === Wave 7: LAW 16 banned-phrase callout === */
.pc-warn-banner.pc-banned-phrase {
  background: rgba(196, 149, 10, 0.08);
  border: 1px solid rgba(196, 149, 10, 0.25);
  border-left: 3px solid var(--pc-warning);
  color: var(--pc-text-primary);
}

.pc-banned-msg {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pc-banned-msg > span:first-child {
  color: var(--pc-warning);
  font-size: 0.76rem;
  font-weight: 500;
}

.pc-banned-msg strong {
  color: var(--pc-warning);
  font-weight: 700;
}

.pc-banned-rewrite {
  font-size: 0.72rem;
  color: var(--pc-text-secondary);
  font-style: italic;
}

/* === Minimize button (header right cluster) === */
.pc-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* 2026-07-20 — Apple-Mail mobile compose (Elle: "just mimic the apple mail
   compose modal"): round Send ARROW pinned top-right (their blue circle, our
   iris), ✕ pinned top-left; there is NO footer on mobile — sending never
   depends on anything below the keyboard. Desktop keeps the footer (hidden
   here). */
.pc-send-mini { display: none; }
@media (max-width: 768px) {
  .pc-send-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FDFCFA;
    background: linear-gradient(135deg, #8A7ABB 0%, #7A6FA8 100%);
    box-shadow: 0 3px 10px rgba(138, 122, 187, 0.35);
    flex-shrink: 0;
  }
  .pc-send-mini:active { transform: scale(0.94); }
  .pc-send-mini.pc-btn-busy {
    opacity: 0.65;
    pointer-events: none;
    cursor: progress;
  }
  .pc-send-mini.pc-btn-success {
    background: var(--pc-success);
    pointer-events: none;
    animation: pcSuccessPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

.pc-min-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: var(--pc-text-muted);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  font-weight: 700;
  padding-bottom: 4px;
}

.pc-min-btn:hover {
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
}

/* === Drafts tray head === */
.pc-draft-tray-head {
  flex-basis: 100%;
  font-family: var(--pc-font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-teal);
  padding: 0 0.4rem 0.35rem;
  border-bottom: 1px solid var(--pc-border-soft);
  margin-bottom: 0.25rem;
}

/* Draft chip inner layout */
.pc-draft-chip-inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pc-draft-chip {
  position: relative;
}

/* === Image embed flyout === */
.pc-image-flyout {
  width: 320px;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-border-soft);
  border-radius: var(--pc-r-md);
  box-shadow: var(--pc-shadow-lg);
  padding: 0.6rem;
  font-family: var(--pc-font-body);
}

.pc-image-flyout-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--pc-r-sm);
  padding: 0.25rem;
  margin-bottom: 0.55rem;
}

.pc-image-flyout-tab {
  flex: 1;
  padding: 0.4rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: var(--pc-font-body);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--pc-text-muted);
  cursor: pointer;
}

.pc-image-flyout-tab.active {
  background: var(--pc-pearl-white);
  color: var(--pc-iris-deep);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pc-image-flyout-body {
  min-height: 130px;
}

.pc-image-drop {
  border: 1px solid var(--pc-iris-20);
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.06) 0%, rgba(138, 122, 187, 0.06) 100%);
  border-radius: var(--pc-r-md);
  padding: 1.2rem 0.8rem;
  text-align: center;
  color: var(--pc-text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.15s;
}

.pc-image-drop:hover,
.pc-image-drop.hover {
  border-color: var(--pc-iris);
  background: var(--pc-iris-12);
  color: var(--pc-iris-deep);
}

.pc-image-drop strong {
  display: block;
  color: var(--pc-iris-deep);
  font-weight: 600;
  font-family: var(--pc-font-display);
  font-size: 0.88rem;
}

/* Wave 8.Q — visual feedback when dragging onto the editor itself */
.pc-editor.pc-editor-dropping {
  outline: 2px dashed var(--pc-iris);
  outline-offset: -8px;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.04) 0%, rgba(138, 122, 187, 0.04) 100%);
}

.pc-image-url-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--pc-pearl-white);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-r-sm);
  font-family: var(--pc-font-body);
  font-size: 0.82rem;
  color: var(--pc-text-primary);
}

.pc-image-paste-note {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--pc-text-secondary);
  font-size: 0.78rem;
  border: 2px dashed var(--pc-border);
  border-radius: var(--pc-r-sm);
}

.pc-image-paste-note kbd {
  background: var(--pc-pearl-warm);
  border: 1px solid var(--pc-border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.74rem;
  font-family: var(--pc-font-body);
  color: var(--pc-text-primary);
}

.pc-image-preview {
  margin-top: 0.55rem;
  border-radius: var(--pc-r-sm);
  overflow: hidden;
  background: var(--pc-pearl-warm);
  border: 1px solid var(--pc-border-soft);
}

.pc-image-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 200px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.03);
}

.pc-image-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  color: var(--pc-text-muted);
  background: var(--pc-pearl-white);
  border-top: 1px solid var(--pc-border-soft);
}

.pc-image-meta strong { color: var(--pc-text-primary); font-weight: 600; }

.pc-image-download {
  color: var(--pc-iris-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.72rem;
}

.pc-image-flyout-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pc-border-soft);
}

.pc-image-flyout-foot .pc-btn-ghost,
.pc-image-flyout-foot .pc-btn-primary {
  font-size: 0.76rem;
  padding: 0.4rem 0.75rem;
}

/* ============================================================
   Wave 8.M.23 — Pearl-luxe discard-draft confirm
   Elle directive: native confirm() is unbranded; replace with a
   Dialed-styled modal. Iris primary, pearl surface, Satoshi title.
   ============================================================ */
.pc-discard-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, sans-serif;
  animation: pcDiscardFadeIn 0.18s ease;
}
@keyframes pcDiscardFadeIn { from { opacity: 0; } to { opacity: 1; } }
.pc-discard-confirm-bg {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 56, 0.55);
  backdrop-filter: blur(6px);
}
.pc-discard-confirm-card {
  position: relative;
  /* Wave 8.M.27 — Elle 2026-05-25 redesign. Wider so the three buttons
     fit on one row without crowding; tighter top padding. */
  width: min(94vw, 480px);
  padding: 26px 26px 22px;
  border-radius: 20px;
  background:
    radial-gradient(420px 320px at -10% -10%, rgba(229, 198, 160, 0.18), transparent 60%),
    radial-gradient(360px 300px at 110% 100%, rgba(138, 122, 187, 0.16), transparent 60%),
    linear-gradient(155deg, #FDFCFA 0%, #F8F5F0 100%);
  border: 1px solid rgba(138, 122, 187, 0.18);
  box-shadow:
    0 24px 60px rgba(45, 36, 56, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.50);
  text-align: left;
  animation: pcDiscardRise 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes pcDiscardRise {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.pc-discard-confirm-glyph {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(196, 84, 84, 0.14), rgba(232, 93, 93, 0.10));
  color: #C45454;
  border: 1px solid rgba(196, 84, 84, 0.20);
}
.pc-discard-confirm-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: #2D2438;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}
.pc-discard-confirm-msg {
  font-size: 14px;
  line-height: 1.5;
  color: #5A4D6A;
  margin: 0 0 22px;
}
.pc-discard-confirm-actions {
  display: flex;
  gap: 8px;
  /* Wave 8.M.27 — equal-width buttons make the row feel unified instead
     of three differently-sized chips crammed against the right edge. */
}
.pc-discard-btn-ghost,
.pc-discard-btn-primary,
.pc-discard-btn-danger {
  flex: 1;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 11px 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  text-align: center;
}
.pc-discard-btn-ghost {
  background: transparent;
  color: #2D2438;
  border-color: rgba(45, 36, 56, 0.18);
}
.pc-discard-btn-ghost:hover {
  background: rgba(138, 122, 187, 0.08);
  border-color: rgba(138, 122, 187, 0.30);
}
/* Wave 8.M.27 — toned visual weights so the row feels balanced.
   Primary (save) is the only filled button; danger is an outlined coral
   so it reads as the destructive choice without dominating. */
.pc-discard-btn-primary {
  background: linear-gradient(135deg, #8A7ABB 0%, #6ABABA 100%);
  color: #FFFFFF;
  border-color: rgba(122, 111, 168, 0.40);
  box-shadow: 0 3px 10px rgba(138, 122, 187, 0.28);
}
.pc-discard-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(138, 122, 187, 0.38);
}
.pc-discard-btn-danger {
  background: rgba(196, 84, 84, 0.05);
  color: #A53E3E;
  border-color: rgba(196, 84, 84, 0.42);
}
.pc-discard-btn-danger:hover {
  background: rgba(196, 84, 84, 0.10);
  border-color: rgba(165, 62, 62, 0.60);
  color: #8B3333;
}
.pc-discard-btn-danger:focus-visible,
.pc-discard-btn-primary:focus-visible,
.pc-discard-btn-ghost:focus-visible {
  outline: 2px solid var(--pc-iris, #8A7ABB);
  outline-offset: 2px;
}

/* Wave 8.M.25 — three buttons need a bit more breathing room. On narrow
   screens, stack vertically so labels don't truncate. */
@media (max-width: 480px) {
  .pc-discard-confirm-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .pc-discard-confirm-actions > button {
    width: 100%;
  }
}

/* 2026-07-10 — MOBILE: compose is a full-screen sheet (was a floating modal
   whose bottom — Send/Save/toolbar — the shell tab bar cut off; Elle). The
   bridge's modal-state signal hides the tab bar; dvh tracks browser chrome. */
@media (max-width: 768px) {
  /* 2026-07-19 (Elle: "i still CANNOT see the text cursor") — LAW 45: on iOS,
     backdrop-filter on an ancestor can leave the caret UNPAINTED even with an
     explicit caret-color (the desktop workaround). The sheet is FULL-SCREEN on
     mobile — there is nothing visible behind it to blur — so the filter is
     pure GPU cost plus the caret-paint bug. Remove it entirely. */
  .pc-overlay-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(45, 36, 56, 0.5);
  }
  .pc-modal {
    /* 2026-07-20 Apple-Mail sheet — full-frame by INSET with the Apple card
       shape: 8px backdrop peek at the top, rounded top corners, grabber.
       The frame tracks the visible area (shell fit-guard follows native
       keyboard resize; pan-mode keyboards inset the scroller instead via
       --pc-kb-inset), so these edges are ALWAYS the visible edges — nothing
       to go stale. env() is 0 inside the iframe; the shell absorbs insets. */
    position: fixed !important;
    top: 8px !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: auto !important; max-width: none !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 20px 20px 0 0 !important;
    display: flex; flex-direction: column;
    padding-bottom: 0;
    overflow: hidden; /* the radius clips the pinned header + scroller */
  }
  /* Apple grabber */
  .pc-modal::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    width: 36px; height: 5px;
    margin-left: -18px;
    border-radius: 3px;
    background: rgba(45, 36, 56, 0.16);
    z-index: 5;
    pointer-events: none;
  }
  .pc-overlay-bg { padding: 0 !important; }

  /* ── Apple-Mail chrome: slim pinned header — ✕ left, round Send right.
     The eyebrow/title stack dies; the SUBJECT is the hero title in the
     scroller below (it slides under this bar like Apple's). */
  .pc-header.pc-hdr-mobile {
    padding: 14px 12px 8px;
    background: transparent;
    border-bottom: none;
    align-items: center;
    gap: 0.5rem;
  }
  .pc-hdr-mobile .pc-eyebrow,
  .pc-hdr-mobile .pc-title { display: none; }
  .pc-hdr-mobile .pc-header-left { flex: 1; min-width: 0; }
  .pc-hdr-mobile .pc-autosave { margin: 0; opacity: 0.75; }
  .pc-hdr-mobile .pc-close {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(45, 36, 56, 0.06);
    font-size: 1.5rem;
    flex-shrink: 0;
  }
  .pc-hdr-mobile .pc-min-btn {
    width: 40px; height: 40px;
    background: rgba(45, 36, 56, 0.05);
  }

  /* Apple hero title: the subject, big + bold, first thing in the scroller */
  .pc-hero-title {
    font-family: var(--pc-font-display);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.15;
    color: #2D2438;
    padding: 2px 0 12px;
    word-break: break-word;
  }

  /* Apple field rows: quiet sentence-case labels, hairline separators */
  .pc-modal .pc-row-label {
    width: auto;
    min-width: 0;
    margin-right: 8px;
    font-family: var(--pc-font-body);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #8A8494;
  }
  .pc-modal .pc-row-label::after { content: ':'; }
  /* collapsed "Cc/Bcc, From:" row — tap to expand (Apple exact) */
  .pc-meta-collapsed {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(138, 122, 187, 0.18);
    padding: 0.8rem 0;
    font-family: var(--pc-font-body);
    font-size: 16px;
    color: #8A8494;
    cursor: pointer;
  }
  .pc-modal.pc-meta-open .pc-meta-collapsed { display: none; }
  /* From row + the To-row Cc/Bcc toggle hide behind the collapsed meta row */
  .pc-modal:not(.pc-meta-open) .pc-row-from { display: none; }
  .pc-modal .pc-ccbcc-toggle { display: none; }

  /* NO footer on mobile — ✕ owns save/discard (dirty → the three-option
     confirm), the header arrow owns Send. Nothing lives below the keyboard. */
  .pc-modal .pc-footer { display: none !important; }

  /* ONE scroll region: hero + fields + body all scroll under the pinned bar.
     Bottom padding clears the floating toolbar pill + any pan-mode keyboard
     inset. */
  .pc-modal > .pc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 0;
    padding-bottom: calc(76px + var(--pc-kb-inset, 0px));
    scroll-padding-top: 56px;
    scroll-padding-bottom: calc(76px + var(--pc-kb-inset, 0px));
  }

  /* Apple's floating format pill: the toolbar detaches from the flow and
     floats bottom-right above the keyboard (fixed tracks the resized
     viewport; --pc-kb-inset lifts it on pan-mode keyboards). */
  .pc-modal .pc-toolbar {
    position: fixed;
    left: auto;
    right: 10px;
    bottom: calc(12px + var(--pc-kb-inset, 0px));
    z-index: 30;
    max-width: calc(100% - 20px);
    border-radius: 24px;
    background: rgba(253, 252, 250, 0.97);
    border: 1px solid rgba(138, 122, 187, 0.18);
    box-shadow: 0 6px 24px rgba(45, 36, 56, 0.16);
    padding: 0.3rem 0.5rem;
  }
  .pc-modal .pc-body, .pc-modal [contenteditable] { min-height: 120px; }
  /* 2026-07-19 (Elle: "loose, zoomed in refresh after clicking into the text").
     ROOT CAUSE: iOS Safari AUTO-ZOOMS the whole page when you focus a text field
     whose font is < 16px — and the To/Subject/body were 13.6-15.2px. That zoom
     is the "loose/expanded/refresh" reflow, and it's what loses the cursor and
     breaks selection. 16px min on EVERY editable field kills the auto-zoom
     entirely (no user-scalable hacks needed). This is the actual fix. */
  .pc-editor,
  .pc-subject,
  .pc-row-input,
  .pc-modal input,
  .pc-modal textarea,
  .pc-modal [contenteditable] {
    font-size: 16px !important;
  }
  /* single scrollable row — wrap ate half the editor on small screens */
  .pc-toolbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pc-toolbar button { min-width: 40px; min-height: 40px; padding: 0 !important; flex-shrink: 0; }
}
