/* GENERATED by Build/build-css.py from Build/app.src.css. Edit the source, then rebuild. */
/*
 * Eclipse Chat app styles (source).
 * Build/build-css.py turns this into Resources/Public/Css/eclipse-chat.css:
 *   - token names (var(--ec-bg)) become the shared --ec-* tokens from tokens.css
 *   - every selector is scoped under .ec so nothing leaks into the site
 * Layout: rail | conversation | side-chat drawer; collapses by container width, not viewport.
 * Motif: a dashed red border always means "sealed, only some people can read this".
 */

.ec {
  position: relative;
  display: flex;
  height: var(--ec-h, 780px);
  min-height: 420px;
  font: 15px/1.45 var(--ec-font-ui);
  color: var(--ec-fg);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.ec *, .ec *::before, .ec *::after { box-sizing: border-box; }
.ec button { font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; }
.ec h2, .ec h3, .ec p, .ec ol, .ec dl, .ec dd, .ec fieldset { margin: 0; }
.ec :focus-visible { outline: 2px solid var(--ec-accent); outline-offset: 2px; }
.ec [hidden] { display: none !important; }
.ec .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ec .i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.ec .i.s { width: 16px; height: 16px; }
.ec .i.xs { width: 14px; height: 14px; }

/* ---------- content element wrapper (outside the app root) ---------- */
.ec-ce { display: grid; gap: 14px; }
.ec-ce-intro { max-width: 68ch; }
.ec-ce-notice { display: flex; gap: 8px; align-items: flex-start; margin: 0; font: 400 12.5px/1.5 var(--ec-font-ui); color: var(--ec-muted); }
.ec-ce-notice::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; border: 1.5px dashed var(--ec-accent); }
.ec-noscript { margin: auto; max-width: 360px; padding: 24px; text-align: center; font: 15px/1.5 var(--ec-font-ui); color: var(--ec-muted); }

/* ---------- app card ---------- */
/* The size container is an inner frame so fixed overlays (menu, dialog, toasts) are never clipped by containment. */
.ec .ec-frame { flex: 1; min-width: 0; display: flex; container: ec / inline-size; }
.ec .ec-app { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); background: var(--ec-surface); border: 1px solid var(--ec-line); border-radius: 22px; overflow: hidden; box-shadow: var(--ec-shadow); }
@container ec (min-width: 1180px) {
  .ec .ec-app[data-drawer="side"], .ec .ec-app[data-drawer="security"] { grid-template-columns: 300px minmax(0, 1fr) 392px; }
}

/* ---------- avatars ---------- */
.ec .av { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: calc(var(--size) * .36); letter-spacing: .01em; flex: none; background: hsl(var(--h, 4) var(--ec-av-s) var(--ec-av-l)); color: hsl(var(--h, 4) 52% var(--ec-av-fg-l)); user-select: none; line-height: 1; }
.ec .av.group { border-radius: 13px; }
.ec .av.md { --size: 36px; }
.ec .av.sm { --size: 30px; }
.ec .av.xs { --size: 22px; font-size: 9.5px; }
.ec .stack { display: inline-flex; }
.ec .stack .av { box-shadow: 0 0 0 2px var(--ec-surface); }
.ec .stack .av + .av { margin-left: -7px; }
.ec .av.h4 { --h: 4; }
.ec .av.h338 { --h: 338; }
.ec .av.h24 { --h: 24; }
.ec .av.h188 { --h: 188; }
.ec .av.h150 { --h: 150; }
.ec .av.h282 { --h: 282; }
.ec .av.h44 { --h: 44; }
.ec .av.h6 { --h: 6; }
.ec .av.h18 { --h: 18; }
.ec .av.h346 { --h: 346; }
.ec .av.h28 { --h: 28; }
.ec .av.h356 { --h: 356; }
.ec .av.h12 { --h: 12; }
.ec .av.h334 { --h: 334; }

/* ---------- buttons ---------- */
.ec .icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 11px; border: 1px solid transparent; background: none; color: var(--ec-muted); display: grid; place-items: center; cursor: pointer; flex: none; transition: background-color .15s, color .15s, transform .1s; }
.ec .icon-btn:hover { background: var(--ec-hover); color: var(--ec-fg); }
.ec .icon-btn:active { transform: scale(.94); }
.ec .icon-btn[aria-pressed="true"] { background: var(--ec-accent-soft); color: var(--ec-accent-ink); border-color: var(--ec-accent-line); }
.ec .icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.ec .btn { height: 36px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--ec-line-strong); background: var(--ec-surface); color: var(--ec-fg); font-weight: 600; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s; }
.ec .btn:hover { background: var(--ec-hover); }
.ec .btn:active { transform: scale(.97); }
.ec .btn:disabled { opacity: .6; cursor: default; transform: none; }
.ec .btn.primary { background: var(--ec-accent); border-color: var(--ec-accent); color: var(--ec-on-accent); }
.ec .btn.primary:hover { background: var(--ec-accent-hover); border-color: var(--ec-accent-hover); }
.ec .btn.ghost { border-color: var(--ec-accent-line); border-style: dashed; color: var(--ec-accent-ink); background: transparent; }
.ec .btn.ghost:hover { background: var(--ec-accent-soft); }
.ec .btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 13px; }
.ec .link { background: none; border: 0; padding: 0; color: var(--ec-accent-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- rail ---------- */
.ec .rail { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--ec-rail); border-right: 1px solid var(--ec-line); }
.ec .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.ec .eclipse { width: 30px; height: 30px; flex: none; display: block; }
.ec .eclipse .sun { fill: var(--ec-accent); }
.ec .eclipse .corona { fill: none; stroke: var(--ec-accent); stroke-opacity: .28; stroke-width: 1; }
.ec .eclipse.big { width: 92px; height: 92px; }
.ec .eclipse .moon { animation: ec-moon 2.6s cubic-bezier(.6, 0, .3, 1) infinite alternate; }
.ec .wordmark { font-family: var(--ec-font-display); font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1; font-variation-settings: "opsz" 40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ec .wordmark em { font-style: italic; font-weight: 400; color: var(--ec-accent-ink); }
.ec .e2ee { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ec-success); background: var(--ec-success-soft); padding: 4px 8px 4px 6px; border-radius: 999px; flex: none; }
.ec .search { position: relative; margin: 0 14px 6px; }
.ec .search input { width: 100%; height: 40px; margin: 0; border-radius: 12px; border: 1px solid var(--ec-line); background: var(--ec-surface); padding: 0 50px 0 38px; font: inherit; font-size: 14.5px; color: var(--ec-fg); box-shadow: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.ec .search input::placeholder { color: var(--ec-faint); }
.ec .search input:focus { outline: 0; border-color: var(--ec-accent); box-shadow: 0 0 0 3px var(--ec-accent-ring); }
.ec .search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ec-faint); }
.ec .search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 11px var(--ec-font-mono); color: var(--ec-faint); border: 1px solid var(--ec-line); border-radius: 6px; padding: 2px 6px; background: var(--ec-surface-2); }
.ec .rail-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 12px; scrollbar-width: thin; scrollbar-color: var(--ec-line-strong) transparent; }
.ec .rail-sec { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ec-faint); padding: 14px 12px 6px; }
.ec .conv { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 11px; row-gap: 1px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 13px; border: 1px solid transparent; background: none; text-align: left; cursor: pointer; transition: background-color .15s; }
.ec .conv:hover { background: var(--ec-hover); }
.ec .conv[aria-current="true"] { background: var(--ec-surface); border-color: var(--ec-line); box-shadow: var(--ec-shadow-sm); }
.ec .conv > .av { grid-row: 1 / 3; }
.ec .conv-name { font-weight: 640; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ec .conv-time { font-size: 11.5px; color: var(--ec-faint); font-variant-numeric: tabular-nums; justify-self: end; }
.ec .conv-prev { font-size: 13.5px; color: var(--ec-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ec .conv-prev.is-typing { color: var(--ec-accent-ink); font-style: italic; }
.ec .conv-flags { display: flex; align-items: center; gap: 5px; justify-self: end; }
.ec .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ec-accent); color: var(--ec-on-accent); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.ec .side-flag { width: 22px; height: 20px; border-radius: 999px; border: 1px dashed var(--ec-accent); color: var(--ec-accent-ink); display: grid; place-items: center; }
.ec .side-flag .i { width: 12px; height: 12px; }
.ec .tflag { color: var(--ec-warn); display: grid; }
.ec .tflag .i { width: 14px; height: 14px; }
.ec .rail-empty { display: grid; gap: 4px; padding: 28px 14px; text-align: center; color: var(--ec-muted); font-size: 13.5px; }
.ec .rail-empty b { color: var(--ec-fg); font-weight: 640; }
.ec .rail-foot { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-top: 1px solid var(--ec-line); }
.ec .me-info { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.ec .me-info b { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .me-info span { font-size: 12px; color: var(--ec-muted); display: flex; align-items: center; gap: 6px; }
.ec .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ec-success); animation: ec-breathe 2.8s ease-out infinite; }

/* ---------- conversation ---------- */
.ec .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ec-bg-chat); }
.ec .chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; min-height: 68px; border-bottom: 1px solid var(--ec-line); background: var(--ec-surface); }
.ec .chat-head .back { display: none; margin-left: -8px; }
.ec .head-title { flex: 1; min-width: 0; }
.ec .head-title h2 { font-family: var(--ec-font-ui); font-size: 16.5px; font-weight: 680; line-height: 1.3; letter-spacing: -.005em; color: var(--ec-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .head-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ec-muted); white-space: nowrap; overflow: hidden; min-width: 0; }
.ec .head-sub .ok { color: var(--ec-success); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ec .head-sub .tm { color: var(--ec-warn); display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.ec .head-sub .sep { color: var(--ec-faint); }
.ec .head-actions { display: flex; align-items: center; gap: 4px; }
.ec .head-actions .btn { margin-right: 6px; }

.ec .strip { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--ec-line); background: var(--ec-surface-2); overflow-x: auto; scrollbar-width: none; }
.ec .strip::-webkit-scrollbar { display: none; }
.ec .strip-label { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ec-accent-ink); margin-right: 4px; }
.ec .strip-label .i { width: 15px; height: 15px; }
.ec .chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 5px; border-radius: 999px; border: 1px dashed var(--ec-accent-line); background: var(--ec-surface); font-size: 13.5px; font-weight: 550; cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s; }
.ec .chip:hover { border-color: var(--ec-accent); }
.ec .chip:active { transform: scale(.97); }
.ec .chip[aria-current="true"] { border-style: solid; border-color: var(--ec-accent); background: var(--ec-accent-soft); color: var(--ec-accent-ink); }
.ec .chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ec-accent); }
.ec .chip.add { padding: 0 12px 0 9px; color: var(--ec-accent-ink); border-color: transparent; background: transparent; }
.ec .chip.add:hover { background: var(--ec-accent-soft); }
.ec .chip.add .i { width: 16px; height: 16px; }

.ec .timeline { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 10px; display: flex; flex-direction: column; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ec-line-strong) transparent; }
.ec .notice { align-self: center; max-width: 460px; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ec-muted); background: var(--ec-surface); border: 1px solid var(--ec-line); border-radius: 14px; padding: 10px 14px; margin: 2px 0 8px; }
.ec .notice .i { color: var(--ec-success); margin-top: 1px; }
.ec .cipher-banner { align-self: stretch; display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ec-accent-ink); background: var(--ec-accent-soft); border: 1px dashed var(--ec-accent-line); border-radius: 12px; padding: 9px 12px; margin: 6px 0; }
.ec .day { align-self: center; margin: 14px 0 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; color: var(--ec-faint); }
.ec .sys { align-self: center; display: flex; align-items: center; gap: 7px; max-width: 100%; font-size: 12.5px; color: var(--ec-muted); margin: 10px 0 4px; padding: 5px 12px; border-radius: 999px; background: var(--ec-surface-2); border: 1px solid var(--ec-line); text-align: center; }
.ec .sys .i { width: 14px; height: 14px; color: var(--ec-accent-ink); }
.ec .sys time { color: var(--ec-faint); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.ec .sys span { min-width: 0; }

.ec .msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; margin-top: 14px; }
.ec .msg.grouped { margin-top: 3px; }
.ec .msg.mine { grid-template-columns: minmax(0, 1fr); }
.ec .av-sp { width: 36px; }
.ec .msg-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.ec .msg.mine .msg-body { align-items: flex-end; }
.ec .msg-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin: 0 3px 3px; }
.ec .msg-meta .name { font-weight: 650; }
.ec .msg-meta time { color: var(--ec-faint); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.ec .bubble-row { position: relative; display: flex; max-width: min(640px, 86%); min-width: 0; }
.ec .bubble { min-width: 0; padding: 9px 13px; border-radius: 18px; background: var(--ec-theirs-bg); border: 1px solid var(--ec-line); font-size: 15px; line-height: 1.47; overflow-wrap: anywhere; }
.ec .msg:not(.mine):not(.grouped) .bubble { border-top-left-radius: 6px; }
.ec .msg.mine .bubble { background: var(--ec-mine-bg); color: var(--ec-mine-fg); border-color: transparent; }
.ec .msg.mine:not(.grouped) .bubble { border-top-right-radius: 6px; }
.ec .bubble.cipher { background: var(--ec-surface-2); color: var(--ec-fg); border: 1px dashed var(--ec-line-strong); }
.ec .msg.new .bubble { animation: ec-rise .32s cubic-bezier(.2, .8, .2, 1); }
.ec .msg.flash .bubble { animation: ec-flash 1.6s ease-out; }
.ec .fail { display: inline-flex; gap: 6px; align-items: center; color: var(--ec-danger); font-size: 13.5px; }
.ec .quote { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--ec-accent); border-radius: 5px; background: var(--ec-quote-bg); padding: 5px 9px; margin: 1px 0 7px; font-size: 13px; line-height: 1.4; color: var(--ec-muted); cursor: pointer; }
.ec .quote b { display: block; color: var(--ec-accent-ink); font-weight: 650; font-size: 12px; }
.ec .msg.mine .quote { color: inherit; opacity: .85; }
.ec .ct-meta { display: block; font: 500 10.5px/1.4 var(--ec-font-mono); color: var(--ec-accent-ink); margin-bottom: 5px; letter-spacing: .01em; overflow-wrap: anywhere; }
.ec .ct { display: block; font: 400 11.5px/1.55 var(--ec-font-mono); word-break: break-all; color: var(--ec-fg); background: none; padding: 0; }
.ec .ct-more { margin-top: 5px; border: 0; background: none; padding: 0; font: 500 11px var(--ec-font-mono); color: var(--ec-accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.ec .tools { position: absolute; z-index: 2; bottom: calc(100% - 6px); right: -10px; display: flex; gap: 1px; padding: 2px; border-radius: 11px; background: var(--ec-surface); border: 1px solid var(--ec-line); box-shadow: var(--ec-shadow-sm); opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .14s, transform .14s; }
.ec .msg.mine .tools { right: auto; left: -10px; }
.ec .msg:hover .tools, .ec .msg:focus-within .tools, .ec .msg.show-tools .tools { opacity: 1; pointer-events: auto; transform: none; }
.ec .tool { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 8px; border: 0; background: none; color: var(--ec-muted); display: grid; place-items: center; cursor: pointer; transition: background-color .12s, color .12s, transform .1s; }
.ec .tool:hover { background: var(--ec-hover); color: var(--ec-fg); }
.ec .tool:active { transform: scale(.9); }
.ec .tool.side { color: var(--ec-accent-ink); }
.ec .tool.side:hover { background: var(--ec-accent-soft); }
.ec .tool .i { width: 17px; height: 17px; }
.ec .tool.sep { margin-left: 3px; }
.ec .tool.sep::before { content: ""; position: absolute; left: -2px; top: 7px; bottom: 7px; width: 1px; background: var(--ec-line); }
@media (hover: none) {
  .ec .msg .tools { display: none; }
  .ec .msg.show-tools .tools { display: flex; }
}

.ec .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.ec .msg.mine .foot { justify-content: flex-end; }
.ec .react { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--ec-line); background: var(--ec-surface); font-size: 12px; font-weight: 650; color: var(--ec-muted); cursor: pointer; font-variant-numeric: tabular-nums; transition: transform .1s; }
.ec .react:active { transform: scale(.92); }
.ec .react .i { width: 13px; height: 13px; }
.ec .react.on { background: var(--ec-accent-soft); border-color: var(--ec-accent-line); color: var(--ec-accent-ink); }
.ec .react.on .i-heart { fill: currentColor; }
.ec .status { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ec-faint); }
.ec .status .i { width: 15px; height: 15px; }
.ec .status.read { color: var(--ec-accent-ink); }
.ec .exp { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--ec-warn); font-variant-numeric: tabular-nums; }
.ec .exp .i { width: 13px; height: 13px; }
.ec .anchor { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px dashed var(--ec-accent-line); background: var(--ec-surface-2); font-size: 12.5px; color: var(--ec-accent-ink); cursor: pointer; text-align: left; transition: border-color .15s, background-color .15s; }
.ec .anchor:hover { border-color: var(--ec-accent); background: var(--ec-accent-soft); }
.ec .anchor .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ec .anchor b { font-weight: 650; }
.ec .anchor .new { flex: none; background: var(--ec-accent); color: var(--ec-on-accent); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.ec .typing { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ec-muted); margin: 12px 0 2px; }
.ec .dots { display: inline-flex; gap: 3px; padding: 9px 11px; background: var(--ec-theirs-bg); border: 1px solid var(--ec-line); border-radius: 14px; }
.ec .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ec-faint); animation: ec-blink 1.2s infinite ease-in-out; }
.ec .dots i:nth-child(2) { animation-delay: .15s; }
.ec .dots i:nth-child(3) { animation-delay: .3s; }
.ec .empty { margin: auto; max-width: 300px; text-align: center; display: grid; gap: 6px; justify-items: center; color: var(--ec-muted); font-size: 13.5px; padding: 24px 0; }
.ec .empty .ring { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed var(--ec-accent-line); display: grid; place-items: center; color: var(--ec-accent-ink); margin-bottom: 4px; }
.ec .empty b { color: var(--ec-fg); font-weight: 650; font-size: 14.5px; }

/* ---------- composer ---------- */
.ec .composer { padding: 8px 20px 16px; background: var(--ec-bg-chat); }
.ec .reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--ec-surface); border: 1px solid var(--ec-line); border-left: 3px solid var(--ec-accent); font-size: 13px; animation: ec-rise .2s ease-out; }
.ec .reply-bar > .i { color: var(--ec-accent-ink); }
.ec .reply-bar div { flex: 1; min-width: 0; display: grid; }
.ec .reply-bar b { font-weight: 650; font-size: 12.5px; color: var(--ec-accent-ink); }
.ec .reply-bar span { color: var(--ec-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .compose-box { display: flex; align-items: flex-end; gap: 4px; background: var(--ec-surface); border: 1px solid var(--ec-line-strong); border-radius: 18px; padding: 5px 5px 5px 6px; transition: border-color .15s, box-shadow .15s; }
.ec .compose-box:focus-within { border-color: var(--ec-accent); box-shadow: 0 0 0 3px var(--ec-accent-ring); }
.ec .compose-box textarea { flex: 1; min-width: 0; margin: 0; border: 0; outline: 0; resize: none; background: none; box-shadow: none; font: inherit; font-size: 15px; line-height: 1.45; color: var(--ec-fg); padding: 8px 4px; max-height: 168px; }
.ec .compose-box textarea::placeholder { color: var(--ec-faint); }
.ec .send { width: 40px; height: 40px; padding: 0; border-radius: 13px; border: 0; background: var(--ec-accent); color: var(--ec-on-accent); display: grid; place-items: center; cursor: pointer; flex: none; transition: background-color .15s, transform .1s; }
.ec .send:hover { background: var(--ec-accent-hover); }
.ec .send:active { transform: scale(.92); }
.ec .send:disabled { background: var(--ec-hover); color: var(--ec-faint); cursor: default; transform: none; }
.ec .enc-hint { display: flex; align-items: center; gap: 6px; margin: 8px 6px 0; font: 400 11px/1.4 var(--ec-font-mono); color: var(--ec-faint); min-width: 0; }
.ec .enc-hint span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ec .enc-hint .i { width: 13px; height: 13px; color: var(--ec-success); }

/* ---------- drawer ---------- */
.ec .drawer { --ec-theirs-bg: var(--ec-surface); display: none; flex-direction: column; min-width: 0; min-height: 0; background: var(--ec-side-bg); border-left: 1px solid var(--ec-line); }
.ec .ec-app[data-drawer="side"] .drawer, .ec .ec-app[data-drawer="security"] .drawer { display: flex; animation: ec-drawer .3s cubic-bezier(.2, .8, .2, 1); }
.ec .side-head { padding: 14px 16px 14px 18px; border-bottom: 1px dashed var(--ec-accent-line); background: repeating-linear-gradient(135deg, var(--ec-side-hatch) 0 1px, transparent 1px 9px), var(--ec-side-bg); }
.ec .ec-app[data-drawer="security"] .side-head { border-bottom-style: solid; border-color: var(--ec-line); background: var(--ec-side-bg); }
.ec .side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-right: -6px; }
.ec .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ec-accent-ink); min-width: 0; }
.ec .eyebrow .i { width: 14px; height: 14px; }
.ec .eyebrow.green { color: var(--ec-success); }
.ec .side-title { margin: 4px 0 8px; font-family: var(--ec-font-display); font-size: 24px; font-weight: 560; letter-spacing: -.015em; line-height: 1.15; color: var(--ec-fg); font-variation-settings: "opsz" 48; text-wrap: balance; overflow-wrap: anywhere; }
.ec .side-people { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; }
.ec .hidden-from { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ec-muted); }
.ec .hidden-from .i { width: 15px; height: 15px; margin-top: 1px; color: var(--ec-accent-ink); }
.ec .anchor-quote { display: block; margin: 12px 16px 0 18px; padding: 8px 12px; text-align: left; border-radius: 12px; border: 1px solid var(--ec-line); border-left: 3px solid var(--ec-accent); background: var(--ec-surface); font-size: 13px; line-height: 1.4; color: var(--ec-muted); cursor: pointer; }
.ec .anchor-quote small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ec-faint); margin-bottom: 2px; }
.ec .anchor-quote b { color: var(--ec-fg); font-weight: 650; }
.ec .drawer .timeline { padding: 12px 16px 10px 18px; }
.ec .drawer .msg { grid-template-columns: 30px minmax(0, 1fr); }
.ec .drawer .msg.mine { grid-template-columns: minmax(0, 1fr); }
.ec .drawer .av-sp { width: 30px; }
.ec .drawer .bubble-row { max-width: 92%; }
.ec .drawer .msg.mine .bubble { background: var(--ec-accent); color: var(--ec-on-accent); }
.ec .drawer .msg.mine .quote { background: color-mix(in srgb, var(--ec-on-accent) 16%, transparent); border-left-color: var(--ec-on-accent); }
.ec .drawer .msg.mine .quote b { color: inherit; }
.ec .drawer .msg:not(.mine) .bubble { border-style: dashed; border-color: var(--ec-accent-line); }
.ec .drawer .bubble.cipher { background: var(--ec-surface); color: var(--ec-fg); }
.ec .drawer .composer { background: var(--ec-side-bg); padding: 8px 16px 16px 18px; }
.ec .drawer .compose-box { border-style: dashed; border-color: var(--ec-accent-line); }
.ec .drawer .compose-box:focus-within { border-style: solid; border-color: var(--ec-accent); }

/* security panel */
.ec .sec { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ec-line-strong) transparent; }
.ec .sec-block { padding: 16px 18px; border-bottom: 1px solid var(--ec-line); display: grid; gap: 10px; }
.ec .sec-block h3 { font-family: var(--ec-font-ui); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ec-faint); }
.ec .kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; font-size: 13px; }
.ec .kv dt { color: var(--ec-muted); }
.ec .kv dd { text-align: right; font-family: var(--ec-font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ec .help { font-size: 12.5px; line-height: 1.5; color: var(--ec-muted); }
.ec .wraps summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ec-accent-ink); }
.ec .wraps-table { margin-top: 8px; overflow-x: auto; border: 1px solid var(--ec-line); border-radius: 10px; background: var(--ec-surface); }
.ec .wraps table { width: 100%; margin: 0; border-collapse: collapse; font: 400 11.5px/1.4 var(--ec-font-mono); }
.ec .wraps td { padding: 7px 10px; border: 0; border-top: 1px solid var(--ec-line); white-space: nowrap; background: none; }
.ec .wraps tr:first-child td { border-top: 0; }
.ec .wraps td:first-child { font-family: var(--ec-font-ui); font-weight: 600; font-size: 12.5px; }
.ec .wraps td:last-child { color: var(--ec-muted); }
.ec .member { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ec .member .av { --size: 32px; }
.ec .member-name { font-weight: 640; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .sn-toggle { border: 0; background: none; padding: 0; font: 400 11.5px var(--ec-font-mono); color: var(--ec-muted); cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.ec .sn-toggle:hover { color: var(--ec-accent-ink); }
.ec .verify { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--ec-line-strong); background: var(--ec-surface); font-size: 12.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; transition: transform .1s; }
.ec .verify:active { transform: scale(.95); }
.ec .verify .i { width: 14px; height: 14px; }
.ec .verify.on { background: var(--ec-success-soft); border-color: transparent; color: var(--ec-success); }
.ec .safety { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; font: 500 13.5px var(--ec-font-mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; background: var(--ec-surface); border: 1px solid var(--ec-line); border-radius: 12px; padding: 12px 14px; text-align: center; }
.ec .side-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 11px; border: 1px dashed var(--ec-accent-line); border-radius: 12px; background: var(--ec-surface); cursor: pointer; text-align: left; width: 100%; }
.ec .side-row:hover { border-color: var(--ec-accent); }
.ec .side-row b { display: block; font-weight: 640; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .side-row small { color: var(--ec-muted); font-size: 12px; }
.ec .side-row code { font: 400 11px var(--ec-font-mono); color: var(--ec-accent-ink); background: none; padding: 0; }
.ec .steps { padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.ec .steps li { counter-increment: s; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--ec-muted); }
.ec .steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--ec-accent-soft); color: var(--ec-accent-ink); font: 600 11px/22px var(--ec-font-mono); text-align: center; }
.ec .steps b { color: var(--ec-fg); font-weight: 640; }
.ec .proto-note { padding: 10px 12px; border-radius: 12px; background: var(--ec-surface); border: 1px solid var(--ec-line); font-size: 12.5px; line-height: 1.5; color: var(--ec-muted); }

/* ---------- popover / modal / toast / lock / boot ---------- */
.ec .pop { position: fixed; z-index: 1040; width: 270px; background: var(--ec-surface); color: var(--ec-fg); border: 1px solid var(--ec-line); border-radius: 16px; box-shadow: var(--ec-shadow-lg); padding: 8px; animation: ec-pop .18s cubic-bezier(.2, .8, .2, 1); }
.ec .pop-title { font-weight: 680; font-size: 14px; padding: 6px 8px 2px; }
.ec .pop-help { padding: 0 8px 8px; font-size: 12.5px; line-height: 1.45; color: var(--ec-muted); }
.ec .pop-item { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font-size: 14px; cursor: pointer; text-align: left; }
.ec .pop-item:hover, .ec .pop-item:focus-visible { background: var(--ec-hover); }
.ec .pop-item[aria-checked="true"] { color: var(--ec-accent-ink); font-weight: 650; }
.ec .pop-item .i { width: 17px; height: 17px; visibility: hidden; }
.ec .pop-item[aria-checked="true"] .i { visibility: visible; }

.ec .backdrop { position: fixed; inset: 0; z-index: 1050; display: grid; place-items: center; padding: 16px; background: var(--ec-scrim); animation: ec-fade .18s ease-out; }
.ec .modal { width: min(470px, 100%); max-height: 100%; overflow-y: auto; background: var(--ec-surface); color: var(--ec-fg); border: 1px solid var(--ec-line); border-radius: 22px; box-shadow: var(--ec-shadow-lg); padding: 22px 22px 18px; animation: ec-pop .22s cubic-bezier(.2, .8, .2, 1); font: 15px/1.45 var(--ec-font-ui); }
.ec .modal h2 { margin: 6px 0 6px; font-family: var(--ec-font-display); font-size: 27px; font-weight: 560; letter-spacing: -.015em; line-height: 1.15; color: var(--ec-fg); font-variation-settings: "opsz" 60; }
.ec .modal-lead { margin: 0 0 16px; color: var(--ec-muted); font-size: 14px; line-height: 1.5; }
.ec .field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.ec .field label, .ec .field legend, .ec .flabel { display: block; padding: 0; font-size: 13px; font-weight: 650; margin-bottom: 7px; color: var(--ec-fg); }
.ec .opt { font-weight: 500; color: var(--ec-faint); margin-left: 4px; }
.ec .field input[type="text"] { width: 100%; height: 42px; margin: 0; border-radius: 12px; border: 1px solid var(--ec-line-strong); background: var(--ec-surface); padding: 0 12px; font: inherit; color: var(--ec-fg); box-shadow: none; }
.ec .field input[type="text"]:focus { outline: 0; border-color: var(--ec-accent); box-shadow: 0 0 0 3px var(--ec-accent-ring); }
.ec .mquote { padding: 8px 12px; border-radius: 12px; border-left: 3px solid var(--ec-accent); background: var(--ec-quote-bg); font-size: 13.5px; line-height: 1.45; color: var(--ec-muted); }
.ec .mquote b { color: var(--ec-fg); font-weight: 650; }
.ec .picks { display: grid; gap: 6px; }
.ec .pick { display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; gap: 10px; align-items: center; padding: 8px 12px 8px 9px; margin: 0; border-radius: 13px; border: 1px solid var(--ec-line); cursor: pointer; font-weight: 400; transition: border-color .15s, background-color .15s; }
.ec .pick:hover { border-color: var(--ec-line-strong); }
.ec .pick:has(input:checked) { border-color: var(--ec-accent); border-style: dashed; background: var(--ec-accent-soft); }
.ec .pick b { display: block; font-weight: 640; font-size: 14px; }
.ec .pick small { color: var(--ec-muted); font-size: 12px; }
.ec .pick input { width: 18px; height: 18px; accent-color: var(--ec-accent); margin: 0; }
.ec .err { margin: 8px 0 0; color: var(--ec-danger); font-size: 13px; font-weight: 550; }
.ec .modal-key { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--ec-muted); padding: 10px 12px; border-radius: 12px; background: var(--ec-surface-2); margin-bottom: 16px; }
.ec .modal-key .i { width: 16px; height: 16px; color: var(--ec-accent-ink); margin-top: 1px; }
.ec .modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.ec .toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1060; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.ec .toast { background: var(--ec-fg); color: var(--ec-bg); padding: 10px 16px; border-radius: 13px; font: 550 13.5px/1.4 var(--ec-font-ui); box-shadow: var(--ec-shadow-lg); animation: ec-toast .26s cubic-bezier(.2, .8, .2, 1); transition: opacity .25s, transform .25s; }
.ec .toast.out { opacity: 0; transform: translateY(6px); }

.ec .lock { position: absolute; inset: 0; z-index: 35; display: grid; place-items: center; padding: 24px; background: var(--ec-lock-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: ec-fade .25s ease-out; }
.ec .lock-card, .ec .boot-card { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 360px; }
.ec .lock h2, .ec .boot h2 { margin: 8px 0 0; font-family: var(--ec-font-display); font-size: 30px; font-weight: 560; letter-spacing: -.02em; line-height: 1.15; color: var(--ec-fg); font-variation-settings: "opsz" 72; text-wrap: balance; }
.ec .lock p, .ec .boot p { margin: 0 0 6px; color: var(--ec-muted); line-height: 1.5; }
.ec .boot { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: var(--ec-surface); }
.ec .boot-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 9px; text-align: left; font-size: 14px; color: var(--ec-faint); }
.ec .boot-steps li { display: flex; align-items: center; gap: 10px; margin: 0; }
.ec .boot-steps li::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--ec-line-strong); flex: none; }
.ec .boot-steps li.active { color: var(--ec-fg); }
.ec .boot-steps li.active::before { border-color: var(--ec-accent); border-right-color: transparent; animation: ec-spin .8s linear infinite; }
.ec .boot-steps li.done { color: var(--ec-muted); }
.ec .boot-steps li.done::before { border-color: var(--ec-success); background: var(--ec-success); }
.ec .boot-error { font: 12px var(--ec-font-mono); color: var(--ec-faint); }
.ec .spin { animation: ec-spin .9s linear infinite; }

/* ---------- live client: sign-in, rail actions, banners ---------- */
.ec .rail-actions { display: flex; align-items: center; gap: 6px; margin: 0 10px 6px 14px; }
.ec .rail-actions .search { flex: 1; margin: 0; min-width: 0; }
.ec .new-chat { background: var(--ec-accent); color: var(--ec-on-accent); border-radius: 12px; }
.ec .new-chat:hover { background: var(--ec-accent-hover); color: var(--ec-on-accent); }
.ec .rail-empty .btn { justify-self: center; margin-top: 10px; }
.ec .conn-banner { display: flex; align-items: center; gap: 8px; padding: 8px 20px; font-size: 12.5px; color: var(--ec-warn); background: var(--ec-surface-2); border-bottom: 1px solid var(--ec-line); }
.ec .conn-banner .i { width: 15px; height: 15px; }
.ec .signin { display: grid; justify-items: stretch; gap: 12px; width: min(360px, 100%); text-align: left; }
.ec .signin .eclipse.big { justify-self: center; width: 72px; height: 72px; }
.ec .signin h2 { text-align: center; }
.ec .signin-lead { margin: -4px 0 6px; text-align: center; font-size: 14px; color: var(--ec-muted); }
.ec .signin-note { margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--ec-accent-soft); color: var(--ec-accent-ink); font-size: 13px; }
.ec .signin .field { margin: 0; }
.ec .signin .field input, .ec .field input[type="search"], .ec .field.inline input { width: 100%; height: 44px; margin: 0; border-radius: 12px; border: 1px solid var(--ec-line-strong); background: var(--ec-surface); padding: 0 12px; font: inherit; color: var(--ec-fg); box-shadow: none; -webkit-appearance: none; appearance: none; }
.ec .signin .field input:focus, .ec .field input[type="search"]:focus, .ec .field.inline input:focus { outline: 0; border-color: var(--ec-accent); box-shadow: 0 0 0 3px var(--ec-accent-ring); }
.ec .signin .btn { width: 100%; }
.ec .load-more { align-self: center; margin: 4px 0 8px; height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ec-line); background: var(--ec-surface); font-size: 12.5px; font-weight: 600; color: var(--ec-muted); cursor: pointer; }
.ec .load-more:hover { color: var(--ec-fg); border-color: var(--ec-line-strong); }
.ec .skeleton { display: grid; gap: 10px; padding: 16px 0; }
.ec .skeleton span { display: block; height: 38px; border-radius: 16px; background: linear-gradient(90deg, var(--ec-surface-2), var(--ec-hover), var(--ec-surface-2)); background-size: 200% 100%; animation: ec-shimmer 1.4s linear infinite; }
.ec .skeleton span:nth-child(1) { width: 62%; }
.ec .skeleton span:nth-child(2) { width: 44%; justify-self: end; }
.ec .skeleton span:nth-child(3) { width: 54%; }
.ec .muted-body { display: inline-flex; gap: 6px; align-items: center; color: var(--ec-muted); font-style: italic; font-size: 14px; }
.ec .muted-body .i { width: 15px; height: 15px; }
.ec .msg.pending .bubble { opacity: .72; }
.ec .status.failed { color: var(--ec-danger); }
.ec .status.failed .link { color: inherit; font-size: inherit; }
.ec .head-sub .warn { color: var(--ec-warn); font-weight: 600; }
.ec .side-leave { margin-left: auto; font-size: 12.5px; }
.ec .welcome { gap: 10px; }
.ec .welcome .eclipse.big { width: 72px; height: 72px; margin-bottom: 4px; }
.ec .welcome .btn { margin-top: 8px; }

/* dialogs */
.ec .modal.wide { width: min(560px, 100%); }
.ec .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 16px; border-radius: 13px; background: var(--ec-surface-2); border: 1px solid var(--ec-line); }
.ec .seg-btn { height: 36px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: 14px; color: var(--ec-muted); cursor: pointer; }
.ec .seg-btn[aria-selected="true"] { background: var(--ec-surface); color: var(--ec-fg); box-shadow: var(--ec-shadow-sm); }
.ec .picks.scroll { max-height: 260px; overflow-y: auto; padding-right: 2px; }
.ec .pick.as-btn { width: 100%; background: var(--ec-surface); text-align: left; font: inherit; color: var(--ec-fg); }
.ec .pick.as-btn .i { color: var(--ec-accent-ink); }
.ec .picked { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.ec .picked-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border-radius: 999px; border: 1px dashed var(--ec-accent); background: var(--ec-accent-soft); color: var(--ec-accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.ec .picked-chip .i { width: 12px; height: 12px; }
.ec .field.inline .row { display: flex; gap: 8px; }
.ec .field.inline .row .btn { height: 44px; }
.ec h4.sub { margin: 18px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ec-faint); }
.ec .member-list { display: grid; gap: 2px; margin-bottom: 12px; }
.ec .member-line { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--ec-line); }
.ec .member-line > .i { color: var(--ec-muted); justify-self: center; }
.ec .member-line b { display: block; font-weight: 640; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec .member-line small { color: var(--ec-muted); font-size: 12px; }
.ec .member-actions { display: flex; gap: 12px; }
.ec .link.danger { color: var(--ec-danger); }
.ec .btn.danger-ghost { color: var(--ec-danger); border-color: transparent; background: transparent; margin-right: auto; }
.ec .btn.danger-ghost:hover { background: var(--ec-hover); }
.ec .device-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.ec .device-row b { display: block; font-weight: 640; }
.ec .device-row small { color: var(--ec-muted); }
.ec .device-row code { font: 400 11px var(--ec-font-mono); color: var(--ec-faint); background: none; padding: 0; }
.ec .verify.changed { background: var(--ec-accent-soft); border-color: var(--ec-accent-line); color: var(--ec-warn); }
.ec .help.warn { color: var(--ec-warn); }

/* ---------- responsive: by app width ---------- */
@container ec (max-width: 1179px) {
  .ec .drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); z-index: 20; box-shadow: var(--ec-shadow-lg); }
}
@container ec (max-width: 1000px) {
  .ec .ec-app { grid-template-columns: 268px minmax(0, 1fr); }
  .ec .head-actions .btn .lbl { display: none; }
  .ec .head-actions .btn { width: 38px; padding: 0; }
}
@container ec (max-width: 760px) {
  .ec .ec-app { grid-template-columns: minmax(0, 1fr); border-radius: 18px; }
  .ec .rail, .ec .main { grid-column: 1; grid-row: 1; }
  .ec .ec-app[data-view="chat"] .rail { display: none; }
  .ec .ec-app[data-view="list"] .main { display: none; }
  .ec .chat-head { padding: 10px 8px 10px 14px; gap: 9px; min-height: 60px; }
  .ec .chat-head .back { display: grid; }
  .ec .head-actions .btn { display: none; }
  .ec .head-actions .icon-btn { width: 36px; height: 36px; }
  .ec .chat-head > .av { --size: 34px; }
  .ec .strip { padding: 9px 14px; }
  .ec .timeline { padding: 14px 14px 8px; }
  .ec .bubble-row { max-width: 92%; }
  .ec .composer { padding: 6px 12px 12px; }
  .ec .drawer { width: 100%; border-left: 0; }
  .ec .drawer .timeline { padding: 12px 14px 8px; }
  .ec .drawer .composer { padding: 6px 12px 12px; }
  .ec .side-head { padding: 12px 12px 12px 14px; }
  .ec .anchor-quote { margin: 10px 12px 0 14px; }
}
@media (max-width: 760px) {
  .ec { height: min(var(--ec-h, 780px), calc(100dvh - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ec *, .ec *::before, .ec *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@keyframes ec-moon { 0% { transform: translate(15px, -11px); } 100% { transform: translate(-3px, 2px); } }
@keyframes ec-breathe { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ec-success) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes ec-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes ec-flash { 0%, 30% { box-shadow: 0 0 0 4px var(--ec-accent-ring), 0 0 0 1px var(--ec-accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes ec-blink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes ec-drawer { from { opacity: 0; transform: translateX(18px); } }
@keyframes ec-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes ec-fade { from { opacity: 0; } }
@keyframes ec-toast { from { opacity: 0; transform: translateY(10px); } }
@keyframes ec-spin { to { transform: rotate(360deg); } }
@keyframes ec-shimmer { to { background-position: -200% 0; } }
