/* Ezra v10 interaction layer (Agent C): rolling numbers, ticker hovercards,
 * ticker autocomplete, command palette, shortcuts sheet, message actions,
 * card share tools, the compact plan timeline, the streaming caret, the
 * playbook badges / "/" menu and "Save as playbook" (star, card toast, chip).
 * Tokens only (ezra-tokens.css); dark and light; reduced motion respected. */

/* ── rolling numbers (.ez-num itself lives in ezra.css) ──────────────── */
.ezra-root .ez-num[data-tone="up"], .ez-hcard [data-tone="up"] { color: var(--bull-text); }
.ezra-root .ez-num[data-tone="down"], .ez-hcard [data-tone="down"] { color: var(--bear-text); }
.ezra-root .ez-num[data-tone="flat"] { color: var(--muted); }
.ezra-root number-flow { font-variant-numeric: tabular-nums; --number-flow-char-height: 1.1em; }

/* ── ticker mentions in prose ────────────────────────────────────────── */
.ez-prose .ez-tk {
  display: inline; padding: 0 2px; margin: 0 -1px; border: 0; border-radius: var(--r-xs); background: transparent;
  font: inherit; font-family: var(--mono); font-size: .92em; font-weight: 600; color: var(--p-text);
  text-decoration: underline dotted var(--p3); text-underline-offset: 3px; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ez-prose .ez-tk:hover, .ez-prose .ez-tk[aria-expanded="true"] { background: var(--p1); color: var(--bright); text-decoration-color: var(--p); }

/* ── hovercard ───────────────────────────────────────────────────────── */
.ez-hcard {
  z-index: var(--z-menu); width: 260px; max-width: calc(100vw - 16px); padding: 12px 12px 10px;
  background: var(--card-2); border: 1px solid var(--border2); border-radius: var(--r); box-shadow: var(--shadow-pop);
  color: var(--text); font-size: var(--fs-label); animation: ez-pop var(--dur-fast) var(--ease);
}
.ez-hcard-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ez-hcard-sym { font: 700 var(--fs-title) var(--mono); color: var(--bright); }
.ez-hcard-name { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-hcard-session { flex-shrink: 0; font-size: var(--fs-caption); color: var(--faint); }
.ez-hcard-session[data-session="open"], .ez-hcard-session[data-session="regular"] { color: var(--bull-text); }
.ez-hcard-body { margin-top: 8px; min-height: 64px; }
.ez-hcard-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ez-hcard-price { font-size: var(--fs-metric); font-weight: 700; color: var(--bright); }
.ez-hcard-chg, .ez-hcard-chg-abs { font: 600 var(--fs-label) var(--mono); font-variant-numeric: tabular-nums; }
.ez-hcard-chg-abs { opacity: .8; }
.ez-hcard-spark { height: 40px; margin-top: 6px; }
.ez-hcard-spark svg { display: block; width: 100%; height: 40px; }
.ez-hcard-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; }
.ez-hcard-dl dt { color: var(--faint); }
.ez-hcard-dl dd { margin: 0; text-align: right; }
.ez-hcard-empty { padding: var(--sp-3) var(--sp-2); }   /* .ez-empty-state, sized for the 260px card */
.ez-hcard-actions { display: flex; gap: 6px; margin-top: 10px; }
.ez-hcard-actions > .ez-btn { flex: 1; }

/* ── ticker autocomplete (composer): the list is .ez-menu.ez-tkac-menu > .ez-mi (ezra.css); these two
 *    spans are still emitted by lib/ticker-autocomplete.js and styled only here ── */
.ez-tkac-sym { min-width: 52px; font: 700 var(--fs-label) var(--mono); color: var(--bright); }
.ez-tkac-name { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── command palette ─────────────────────────────────────────────────── */
.ez-palette {
  width: min(620px, calc(100vw - 24px)); max-height: min(70vh, 560px); margin: 12vh auto auto; padding: 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card-2); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r); box-shadow: var(--shadow-pop);
}
.ez-palette:not([open]) { display: none; }
.ez-palette[open] { animation: ez-pal-in var(--dur) var(--ease); }
.ez-palette::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
@keyframes ez-pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.ez-pal-bar { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.ez-pal-bar:focus-within { box-shadow: inset 0 -2px 0 var(--ring); }   /* the field's own outline is off: this rule shows focus */
.ez-pal-icon { display: grid; color: var(--p-text); }
.ez-pal-chip {
  flex-shrink: 0; padding: 2px 8px; border-radius: var(--r-full); background: var(--p2); color: var(--p-text);
  font: 700 var(--fs-label) var(--mono);
}
.ez-pal-input {
  flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: var(--bright);
  font: 400 var(--fs-body) var(--sans);
}
.ez-pal-input::placeholder { color: var(--faint); }
.ezra-root .ez-pal-input:focus-visible { outline: 0; }
.ez-pal-list { flex: 1; min-height: 0; margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
.ez-pal-group { padding: 8px 10px 4px; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ez-pal-opt {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-14);
}
.ez-pal-list .ez-pal-opt[aria-selected="true"] { background: var(--p1); box-shadow: inset 2px 0 0 var(--p); }
.ez-pal-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-xs); background: var(--bg3); color: var(--muted); }
.ez-pal-sym, .ez-pal-code { font: 700 var(--fs-label) var(--mono); color: var(--bright); }
.ez-pal-code { justify-self: start; padding: 2px 6px; border-radius: var(--r-xs); background: var(--bg4); color: var(--p-text); }
.ez-pal-label { min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-pal-hint { color: var(--faint); font-size: var(--fs-label); white-space: nowrap; }
.ez-pal-empty { padding: 18px 12px; }   /* .ez-empty-state */
.ez-pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--fs-caption); color: var(--faint); }
.ez-pal-foot-tip { margin-left: auto; }

/* ── shortcuts sheet ─────────────────────────────────────────────────── */
.ez-keys {
  width: min(420px, calc(100vw - 24px)); padding: 16px 18px; margin: 14vh auto auto;
  background: var(--card-2); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r); box-shadow: var(--shadow-pop);
}
.ez-keys::backdrop { background: var(--overlay); }
.ez-keys-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ez-keys-head h2 { margin: 0; font-size: var(--fs-title); font-weight: 600; --ez-h: var(--bright); }
.ez-keys-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; align-items: center; }
.ez-keys-list dt { white-space: nowrap; }
.ez-keys-list dd { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.ez-keys-foot { margin: 14px 0 0; font-size: var(--fs-label); color: var(--faint); }

/* ── message actions: hover toolbar, always on for touch / last turn ─── */
@media (hover: hover) and (pointer: fine) {
  .ez-turn .ez-actions { opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
  .ez-turn:hover .ez-actions, .ez-turn:focus-within .ez-actions, .ez-turn:last-child .ez-actions,
  .ez-actions:has(.ez-menu[role="menu"]), .ez-actions:has([aria-pressed="true"]) { opacity: 1; }
  /* per button, so a saved star can stay visible while Edit / Copy wait for hover */
  .ez-user-actions > * { opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
  .ez-user:hover .ez-user-actions > *, .ez-user:focus-within .ez-user-actions > *,
  .ez-user-actions > .ez-star:not([data-state="idle"]) { opacity: 1; }
}
.ez-user.has-actions { align-items: center; gap: 4px; }
.ez-user-actions { order: -1; display: flex; gap: 2px; }

/* ── plan: live timeline, folds to a summary chip ────────────────────── */
.ez-plan { transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.ez-plan-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-plan-meta { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ez-plan-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: var(--r-full); background: var(--p); box-shadow: 0 0 0 3px var(--p2); animation: ez-plan-pulse 1.4s var(--ease) infinite; }
.ez-plan[data-complete="true"] .ez-plan-dot { background: var(--p); box-shadow: none; animation: none; }   /* purple = Ezra; green/red mean market direction only */
.ez-plan[data-complete="true"][data-errors="true"] .ez-plan-dot { background: var(--amber); }
@keyframes ez-plan-pulse { 50% { box-shadow: 0 0 0 5px var(--p1); } }
/* folded + complete = a compact chip */
.ez-plan[data-complete="true"][data-open="false"] { display: inline-flex; max-width: 100%; border-radius: var(--r-full); background: var(--bg2); }
.ez-plan[data-complete="true"][data-open="false"] .ez-plan-head { width: auto; padding: 4px 12px 4px 10px; gap: 8px; font-size: var(--fs-label); }
.ez-plan[data-complete="true"][data-open="false"] .ez-plan-meta { font-size: var(--fs-caption); }
.ez-plan[data-complete="true"][data-open="false"] .ez-chev svg { width: 12px; height: 12px; }
.ez-plan[data-complete="true"][data-open="false"]:hover { border-color: var(--border2); }
/* compact timeline rows */
.ez-timeline { position: relative; gap: 0; margin-top: 8px; }
.ez-timeline:not(:first-child) { border-top: 1px dashed var(--border); padding-top: 6px; }
.ez-tool.is-compact {
  position: relative; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; padding: 4px 2px;
  background: transparent; border: 0; border-radius: 0;
}
ezra-tool-card:not(:last-child) .ez-tool.is-compact::before {
  content: ''; position: absolute; left: 9.5px; top: 22px; bottom: -6px; width: 1px; background: var(--border2);
}
.ez-tool.is-compact .ez-tool-text { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.ez-tool.is-compact .ez-tool-label { flex-shrink: 0; max-width: 55%; }
.ez-tool.is-compact .ez-tool-sum { display: inline; min-width: 0; }
.ez-tool.is-compact[data-state="error"] { background: var(--bear-wash); border-radius: var(--r-xs); padding-inline: 6px; }
.ez-tool.is-compact .ez-tool-meta { font-variant-numeric: tabular-nums; }
.ez-tool.is-compact[data-state="loading"] .ez-tool-meta { color: var(--p-text); }
@media (max-width: 720px) {
  .ez-tool.is-compact .ez-tool-text { display: block; }
  .ez-tool.is-compact .ez-tool-label { max-width: none; display: block; }
  .ez-tool.is-compact .ez-tool-sum { display: block; }
  .ez-pal-hint { display: none; }
  .ez-pal-foot-tip { display: none; }
  .ez-pal-input { font-size: 16px; }   /* iOS Safari zooms into smaller inputs */
}

/* ── playbooks: mode badge, answer badge, related chip, "/" menu ─────── */
.ez-pb-mode {
  justify-self: end; display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: var(--r-full);
  font: 600 var(--fs-caption) var(--sans); letter-spacing: .02em; white-space: nowrap;
  background: var(--bg3); color: var(--muted);
}
.ez-pb-mode[data-mode="day"] { background: var(--amber-wash); color: var(--amber-text); }
.ez-pb-mode[data-mode="swing"] { background: var(--p1); color: var(--p-text); }
.ez-pb-mode[data-mode="invest"] { background: var(--bull-wash); color: var(--bull-text); }
.ez-pb-ico { display: inline-grid; place-items: center; flex-shrink: 0; color: var(--p-text); }
.ez-pb-ico svg { width: 14px; height: 14px; }
.ez-pb-badge-row { margin: 6px 0 2px; }
.ez-pb-badge {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 24px; padding: 2px 6px 2px 8px;
  border-radius: var(--r-full); border: 1px solid var(--p3); background: var(--p1); color: var(--p-text); font-size: var(--fs-12);
}
.ez-pb-badge > span:not(.ez-pb-ico):not(.ez-pb-mode) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-pb-badge strong { font-weight: 600; color: var(--bright); }
.ez-follow .ez-follow-pb { border-style: dashed; border-color: var(--p3); }
.ez-follow .ez-follow-pb:hover { border-style: solid; }
.ez-follow-pb .ez-pb-ico svg { color: var(--p-text); }
.ez-follow-pb-k { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--p-text); }
.ez-attach-pb + .ez-attach-sel, .ez-attach-card + .ez-attach-sel { margin-left: 4px; }

.ez-composer { position: relative; }
.ez-pbmenu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: var(--z-shell); max-height: min(340px, 50vh); overflow-y: auto;
  padding: 4px; background: var(--card-2); border: 1px solid var(--border2); border-radius: var(--r); box-shadow: var(--shadow-pop);
  animation: ez-pop var(--dur-fast) var(--ease);
}
.ez-pbmenu-group { padding: 8px 10px 4px; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ez-pbmenu-opt {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.ez-pbmenu-opt[aria-selected="true"] { background: var(--p1); box-shadow: inset 2px 0 0 var(--p); }
.ez-pbmenu-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-xs); background: var(--bg3); color: var(--p-text); }
.ez-pbmenu-ico svg { width: 15px; height: 15px; }
.ez-pbmenu-text { min-width: 0; display: flex; flex-direction: column; }
.ez-pbmenu-title { font-size: var(--fs-14); font-weight: 600; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-pbmenu-sub { font-size: var(--fs-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-pbmenu-empty { padding: 14px 12px; }   /* .ez-empty-state */
@media (max-width: 720px) {
  .ez-pbmenu { max-height: 42vh; }
  .ez-pbmenu-opt { padding: 8px 8px; }     /* larger touch rows */
  .ez-pbmenu-sub { display: none; }
}

/* ── save as playbook: star, card toast, "you ask this often" chip ───── */
.ez-star { position: relative; }
.ez-star svg { transition: transform var(--dur-fast) var(--ease); }
.ez-star svg path { transition: fill var(--dur-fast) var(--ease); }
.ezra-root .ez-star[data-state="saved"], .ezra-root .ez-star[data-state="saving"] { color: var(--p-text); }
.ez-star[data-state="saved"] svg path { fill: currentColor; }
.ez-star[data-state="saving"] { cursor: progress; }
.ez-star[data-state="saving"] svg, .ez-often-btn[data-state="saving"] .ez-often-ico svg { animation: ez-star-pulse .9s var(--ease) infinite; }
@keyframes ez-star-pulse { 50% { opacity: .35; transform: scale(.86); } }
/* success: the star pops and six dots burst out (240ms) */
.ez-star::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
  border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 -11px 0 var(--p-text), 9.5px -5.5px 0 var(--amber), 9.5px 5.5px 0 var(--p-text),
              0 11px 0 var(--amber), -9.5px 5.5px 0 var(--p-text), -9.5px -5.5px 0 var(--amber);
}
.ez-star[data-pop] svg { animation: ez-star-pop var(--dur-slow) var(--ease); }
.ez-star[data-pop]::after { animation: ez-star-burst var(--dur-slow) var(--ease-out); }
@keyframes ez-star-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes ez-star-burst { 0% { opacity: 1; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.3); } }

/* "You ask this often" chip */
.ez-often { display: flex; }
/* .ez-btn.is-dashed.is-tinted.is-wrap: it grows and wraps with its sentence, which reads as text, not a label */
.ezra-root .ez-often-btn { gap: var(--sp-2); max-width: 100%; color: var(--text); font-weight: 400; animation: ez-rise var(--dur-slow) var(--ease); }
/* the glow: a still ring that fades in and out three times */
.ezra-root .ez-often-btn::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 5px var(--p1); opacity: 0; pointer-events: none;
  animation: ez-often-glow 2.4s var(--ease) .5s 3;
}
.ezra-root .ez-often-btn:hover:not(:disabled) { border-style: solid; color: var(--bright); }
.ezra-root .ez-often-btn:disabled { opacity: 1; cursor: default; }   /* saving / done: a status, not an unavailable action */
.ez-often-btn[data-state="done"] { border-style: solid; color: var(--bright); animation: none; }
.ezra-root .ez-often-btn[data-state="done"]::before { animation: none; }
.ez-often-ico { display: grid; flex-shrink: 0; color: var(--p-text); }
.ez-often-btn[data-state="done"] .ez-often-ico { color: var(--bull-text); }
@keyframes ez-often-glow { 50% { opacity: 1; } }

/* the card toast: bottom-right, a bottom sheet on phones. Same motion as .ez-toast (css/ezra-ui.css):
 * 16px rise + fade over --dur; it is a card (--card-2, --r, --shadow-pop) because it holds actions. */
.ez-savetoast {
  position: fixed; right: 20px; bottom: 20px; z-index: var(--z-sheet-toast); width: min(360px, calc(100vw - 32px));
  visibility: hidden; opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity var(--dur), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.ez-savetoast.is-on {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity var(--dur), transform var(--dur) var(--ease), visibility 0s;
}
.ez-st-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px;
  padding: 14px 12px 12px 14px; background: var(--card-2); color: var(--text);
  border: 1px solid var(--border2); border-radius: var(--r); box-shadow: var(--shadow-pop);
}
.ez-st-ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--p1); border: 1px solid var(--p3); color: var(--p-text);
}
.ez-st-card[data-kind="removed"] .ez-st-ico { background: var(--bg3); border-color: var(--border); color: var(--muted); }
.ez-st-card[data-kind="error"] .ez-st-ico { background: var(--bear-wash); border-color: transparent; color: var(--bear-text); }
.ez-st-body { min-width: 0; }
.ez-st-kicker { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.ez-st-ok { display: grid; color: var(--bull-text); }
.ez-st-ok svg { width: 12px; height: 12px; }
.ez-st-titlerow { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 28px; }
.ez-st-title { min-width: 0; font-size: var(--fs-14); font-weight: 600; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-st-card[data-kind="removed"] .ez-st-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.ez-st-text { margin: 0; font-size: var(--fs-13); line-height: var(--lh-snug); color: var(--text); }
.ezra-root .ez-st-link { padding: 4px 8px; font-size: var(--fs-label); }   /* .ez-btn.is-link */
.ez-st-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ez-st-meta:empty { display: none; }
/* look: .ez-chip.is-ticker (the {ticker} pill), .ez-iconbtn.is-sm (dismiss), .ez-btn.is-sm (actions) in css/ezra-ui.css */
.ez-st-pill code { font: inherit; color: var(--p-text); }
.ez-st-pill strong { margin-left: 4px; font-weight: 700; }
.ez-st-err { margin-top: 6px; }
.ez-st-x { align-self: start; margin: -4px -2px 0 0; }
.ez-st-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 6px; }
/* auto-dismiss countdown (the .ez-toast-count bar and its ez-count keyframe); pauses while held */
.ez-st-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--p); opacity: .5; transform-origin: left;
  animation: ez-count var(--st-ms, var(--ez-count-ms, 6s)) linear forwards;
}
.ez-savetoast.is-held .ez-st-bar { animation-play-state: paused; }
@media (max-width: 720px) {
  .ez-savetoast { left: 0; right: 0; bottom: 0; width: auto; transform: translateY(100%); }
  .ez-savetoast.is-on { transform: none; }
  .ez-st-card {
    padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .ez-st-card::before {          /* grab handle */
    content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border2);
  }
  .ez-st-actions { grid-column: 1 / -1; }
  .ez-st-actions > .ez-btn { flex: 1; height: 40px; }
  .ez-st-card .ez-st-x { width: 36px; height: 36px; }
  .ezra-root .ez-st-link { padding: 6px 8px; }
  .ez-st-bar { bottom: auto; top: 0; }
}

/* ── reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ez-plan-dot, .ez-hcard, .ez-palette[open], .ez-pbmenu { animation: none !important; }
  .ez-turn .ez-actions, .ez-user-actions > *, .ez-prose .ez-tk, .ez-plan { transition: none !important; }
  .ez-star svg, .ez-star::after, .ez-often-btn, .ezra-root .ez-often-btn::before, .ez-often-ico svg { animation: none !important; }
  .ez-savetoast, .ez-savetoast.is-on { transform: none !important; transition: none !important; }
  .ez-st-bar { display: none; }
}

/* ── tooltips (lib/tooltip.js: any [title] inside .ezra-root) ──────────── */
.ez-tip {
  position: fixed; left: 0; top: 0; z-index: calc(var(--z-menu, 2100) + 1);
  max-width: 260px; width: max-content; padding: 6px 8px;
  background: var(--card-2); color: var(--text); border: 1px solid var(--border2);
  border-radius: var(--r-sm); box-shadow: var(--shadow-pop);
  font: 500 var(--fs-12, 12px)/1.35 var(--sans); letter-spacing: 0; text-align: left;
  white-space: normal; overflow-wrap: anywhere; pointer-events: none;
  animation: ez-tip-in var(--dur-fast) var(--ease);
}
.ez-tip-arrow {
  position: absolute; width: 8px; height: 8px; background: var(--card-2);
  border: 1px solid var(--border2); transform: rotate(45deg);
}
.ez-tip[data-placement="top"] .ez-tip-arrow { bottom: -5px; border-top: 0; border-left: 0; }
.ez-tip[data-placement="bottom"] .ez-tip-arrow { top: -5px; border-bottom: 0; border-right: 0; }
.ez-tip[data-placement="left"] .ez-tip-arrow { right: -5px; border-bottom: 0; border-left: 0; }
.ez-tip[data-placement="right"] .ez-tip-arrow { left: -5px; border-top: 0; border-right: 0; }
@keyframes ez-tip-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ez-tip { animation: none; }
}

/* ── Touch targets (phones and touch screens) ─────────────────────────────
 * Small controls keep their look but get a 32px hit box (primary and large buttons: 44px, css/ezra-ui.css). */
@media (max-width: 720px), (pointer: coarse) {
  .ez-btn, .ez-iconbtn, .ez-toggle, .ez-seg button, .ez-chip:is(button, a), .ez-mi,
  .ez-chat-rename, .ez-undo-btn {
    min-height: 32px; min-width: 32px;
  }
  /* Send keeps its 34px look; an invisible ring takes its hit area to 44px */
  .ez-send { position: relative; }
  .ez-send::before { content: ''; position: absolute; inset: -5px; }
}
