/* ==========================================================================
   Nexos — Caixa de entrada (.ibx-*)  ·  js/views/inbox.js
   Lista com sugestões embutidas (cartões-fantasma) e faixa de espaços para
   soltar; Triagem em pilha de cartas (arrastar → aceita, ← arquiva).
   ========================================================================== */

/* ---------- Cabeçalho ---------- */
.ibx-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 16px; margin-bottom: 18px;
}
.ibx-head-icon {
  width: 58px; height: 58px; border-radius: 19px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, var(--surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow-sm);
}
.ibx-head-icon svg.lucide { width: 26px; height: 26px; }
.ibx-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
}
.ibx-count {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 10px;
  border-radius: var(--r-full); background: var(--accent); color: var(--on-accent);
  font-family: var(--font-ui); font-size: 14px; font-weight: 750; letter-spacing: 0;
  box-shadow: 0 4px 12px var(--accent-ring);
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.ibx-count.is-zero { background: var(--surface-3); color: var(--text-3); box-shadow: none; }
.ibx-sub { margin-top: 7px; max-width: 580px; font-size: 14.5px; color: var(--text-2); }
.ibx-head-actions { display: flex; gap: 8px; }
.ibx-ask { height: 40px; border-radius: 12px; padding: 0 15px; }
.ibx-ask svg.lucide { color: var(--accent); }
.ibx-short { display: none; }

/* ---------- Jogar algo aqui ---------- */
.ibx-add {
  display: flex; align-items: center; gap: 6px;
  height: 54px; padding: 0 8px 0 12px; margin-bottom: 16px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.ibx-add:hover { border-color: var(--border-2); }
.ibx-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.ibx-add-ic {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.ibx-add-ic svg.lucide { stroke-width: 2.3; }
.ibx-add-input {
  flex: 1; min-width: 0; height: 100%; padding: 0 4px;
  border: 0; outline: none; background: transparent; font-size: 15px; color: var(--text);
}
.ibx-add-input::placeholder { color: var(--text-3); }
.ibx-add-input:focus-visible { outline: none; }
.ibx-add-kbd { opacity: 0; transition: opacity var(--dur); }
.ibx-add:focus-within .ibx-add-kbd { opacity: 1; }
.ibx-add-btn { color: var(--text-3); }
.ibx-add-btn:hover { color: var(--text); }

.ibx-body:focus { outline: none; }

/* Seletor Lista | Triagem na barra superior */
.ibx-seg button { height: 28px; }

/* ---------- Faixa de espaços (alvos de soltar) ---------- */
.ibx-drops {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 -32px 14px; padding: 10px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.3);
}
.ibx-drops-label {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 38px;
  font-size: 12.5px; font-weight: 620; color: var(--text-3); white-space: nowrap;
  transition: color var(--dur);
}
.ibx-drops-label svg.lucide { width: 14px; height: 14px; }
.ibx-dl-drag { display: none; }
.is-dragging-card .ibx-drops-label { color: var(--accent-ink); }
.is-dragging-card .ibx-dl-idle { display: none; }
.is-dragging-card .ibx-dl-drag { display: inline; }
.ibx-drops-row { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.ibx-drop {
  position: relative; display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 38px; padding: 0 8px 0 11px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--c-bg) 78%, var(--surface)); color: var(--c-ink);
  border: 1.5px solid transparent; box-shadow: var(--shadow-sm);
  font-size: 13px; font-weight: 620; white-space: nowrap; user-select: none;
  transition: transform .2s var(--spring), background var(--dur), border-color var(--dur), box-shadow var(--dur);
}
.ibx-drop:hover { border-color: color-mix(in srgb, var(--c-s) 45%, transparent); }
.ibx-drop-emoji { font-size: 16px; line-height: 1; }
.ibx-drop-shared { display: inline-flex; opacity: .65; }
.ibx-drop-shared svg.lucide { width: 12px; height: 12px; }
.ibx-drop-n {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-full); font-size: 11.5px; font-weight: 720;
  background: color-mix(in srgb, var(--surface) 72%, transparent); color: var(--c-ink);
}
.is-dragging-card .ibx-drop { border-style: dashed; border-color: color-mix(in srgb, var(--c-s) 65%, transparent); }
.ibx-drop.is-over {
  background: var(--c-bg); border-style: solid; border-color: var(--c-s);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c-s) 32%, transparent);
}
.ibx-drop.is-bump { animation: ibxBump .55s var(--spring); }
.ibx-drop-trash {
  display: none; color: var(--danger); padding: 0 13px 0 11px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
}
.ibx-drop-trash svg.lucide { width: 15px; height: 15px; }
.is-dragging-card .ibx-drop-trash { display: inline-flex; border-color: color-mix(in srgb, var(--danger) 55%, transparent); animation: pop .2s var(--spring); }
.ibx-drop-trash.is-over { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); border-color: var(--danger); box-shadow: 0 10px 24px color-mix(in srgb, var(--danger) 28%, transparent); }
/* espaços do menu lateral também recebem cartões */
.ibx-nav-drop { outline: 1.5px dashed var(--border-2); outline-offset: -3px; }

/* ---------- Barra "Aplicar todas" ---------- */
.ibx-sugbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 10px 12px 10px 12px; border-radius: var(--r-lg);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  animation: ibxIn .35s var(--ease);
}
.ibx-sugbar-ic {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.ibx-sugbar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ibx-sugbar-text b { font-size: 13.8px; font-weight: 680; color: var(--text); }
.ibx-sugbar-text span { font-size: 12.5px; color: var(--text-2); }

/* ---------- Cartões ---------- */
.ibx-list {
  display: grid; gap: var(--gap); align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.ibx-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 11px 14px 8px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, opacity .2s;
}
.ibx-card:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.ibx-card.is-enter { animation: ibxIn .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.ibx-card.is-new { animation: ibxNew .55s var(--spring) both; }
.ibx-card.is-lifted {
  opacity: .42; transform: scale(.97); box-shadow: none;
  border-style: dashed; border-color: var(--accent);
}
.ibx-card.is-leaving { animation: ibxOut .2s ease forwards; pointer-events: none; }

.ibx-card-top { display: flex; align-items: center; gap: 7px; min-height: 30px; font-size: 12px; color: var(--text-3); }
.ibx-grip {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 30px; margin: 0 -6px 0 -8px; border-radius: 8px;
  color: var(--text-3); opacity: 0; cursor: grab; touch-action: none;
  transition: opacity .15s, background .15s, color .15s;
}
.ibx-card:hover .ibx-grip { opacity: 1; }
.ibx-grip:hover { background: var(--hover); color: var(--text); }
.ibx-type { height: 22px; }
.ibx-when { white-space: nowrap; }
.ibx-by { display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; color: var(--text-2); font-weight: 560; }
.ibx-by .avatar { box-shadow: none; }
.ibx-by > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ibx-by.is-sent { font-weight: 500; color: var(--text-3); }
.ibx-by.is-sent b { color: var(--text); font-weight: 650; }

/* veio por "Enviar para…": recado de quem mandou */
.ibx-recado {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px 8px 10px;
  border-radius: 4px var(--r) var(--r) var(--r); background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; line-height: 1.45;
}
.ibx-recado > svg.lucide { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.ibx-recado p { margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.ibx-recado-by { margin-left: 6px; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.ibx-tcard .ibx-recado { margin-top: 2px; }
.ibx-card.is-sent { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
/* mudou agora há pouco por outra pessoa (tempo real) */
.ibx-card.is-remote { animation: ibxRemote 1.6s var(--ease); }
@keyframes ibxRemote {
  0%, 30% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--info) 50%, transparent), var(--shadow); }
  100% { box-shadow: var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) { .ibx-card.is-remote { animation: none; } }
.ibx-more { margin-left: auto; margin-right: -6px; color: var(--text-3); }
.ibx-more:hover { color: var(--text); }

.ibx-card-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; border-radius: var(--r-sm); }
.ibx-card-title { display: flex; align-items: flex-start; gap: 9px; font-size: 15.5px; font-weight: 650; line-height: 1.38; color: var(--text); word-break: break-word; }
.ibx-card-title .check { margin-top: 1px; }
.ibx-card-main:hover .ibx-card-title > span { text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px; }
.ibx-emoji { margin-right: 5px; }
.ibx-card-body {
  font-size: 13px; line-height: 1.5; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ibx-thumb { height: 120px; margin-bottom: 4px; border-radius: var(--r); background: var(--surface-3) center / cover no-repeat; }
.ibx-link {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  margin-top: -3px; padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--surface-3); font-size: 12.5px; color: var(--text-2);
  transition: background var(--dur), color var(--dur);
}
.ibx-link .truncate { flex: 1; }
.ibx-link svg.lucide { width: 13px; height: 13px; color: var(--text-3); }
.ibx-link:hover { background: var(--active); color: var(--text); }

/* Sugestão embutida (cartão-fantasma) */
.ibx-sug { display: flex; flex-direction: column; gap: 5px; }
.ibx-sug-row { display: flex; align-items: center; gap: 4px; }
.ibx-ghost {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 5px 0 12px; border-radius: var(--r-full); text-align: left;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--accent-ink); font-size: 13.2px; font-weight: 620;
  transition: background var(--dur), border-color var(--dur), transform .1s;
}
.ibx-ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }
.ibx-ghost:active { transform: scale(.98); }
.ibx-ghost-star { color: var(--accent); font-size: 13px; line-height: 1; }
.ibx-ghost-emoji { font-size: 15px; line-height: 1; }
.ibx-ghost-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibx-ghost-ok {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  height: 28px; padding: 0 11px 0 9px; border-radius: var(--r-full);
  background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700;
  transition: transform .2s var(--spring), box-shadow var(--dur);
}
.ibx-ghost-ok svg.lucide { width: 13px; height: 13px; stroke-width: 2.6; }
.ibx-ghost:hover .ibx-ghost-ok { transform: scale(1.05); box-shadow: 0 4px 12px var(--accent-ring); }
.ibx-sug-x {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center; color: var(--text-3);
  transition: background var(--dur), color var(--dur);
}
.ibx-sug-x:hover { background: var(--hover); color: var(--text); }
.ibx-sug-x svg.lucide { width: 14px; height: 14px; }
.ibx-sug-why { display: flex; align-items: baseline; gap: 6px; padding: 0 4px; font-size: 12px; line-height: 1.4; color: var(--text-3); }
.ibx-who-claude { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; color: var(--accent-ink); font-weight: 680; }
.ibx-who-claude svg.lucide { width: 12px; height: 12px; align-self: center; }
.ibx-who-guess { flex-shrink: 0; color: var(--text-2); font-weight: 650; }
.ibx-nosug { display: flex; align-items: center; gap: 6px; padding: 0 2px; font-size: 12.5px; color: var(--text-3); }
.ibx-nosug svg.lucide { width: 13px; height: 13px; flex-shrink: 0; }

/* Conexão sugerida */
.ibx-conn {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 4px 4px 4px 10px; border-radius: var(--r-full);
  border: 1.5px dashed color-mix(in srgb, var(--c-lilac-s) 55%, transparent);
  background: color-mix(in srgb, var(--c-lilac) 45%, var(--surface));
  font-size: 12.5px; color: var(--text-2);
}
.ibx-conn > svg.lucide { width: 13px; height: 13px; color: var(--c-lilac-s); }
.ibx-conn-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibx-conn-t b { color: var(--text); font-weight: 620; }
.ibx-conn-ok {
  flex-shrink: 0; height: 28px; padding: 0 11px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 680; color: var(--text);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.ibx-conn-ok:hover { border-color: var(--c-lilac-s); box-shadow: var(--shadow-sm); }

/* Ações rápidas */
.ibx-acts { display: flex; align-items: center; gap: 2px; margin: 0 -6px; padding-top: 6px; border-top: 1px solid var(--border); }
.ibx-acts .btn-ghost { color: var(--text-2); }
.ibx-acts .btn-ghost:hover { color: var(--text); }
svg.lucide.ibx-caret { width: 13px; height: 13px; opacity: .5; margin-left: -2px; }
.ibx-del:hover { color: var(--danger) !important; background: color-mix(in srgb, var(--danger) 11%, transparent); }

.ibx-foot-tip { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; font-size: 13px; color: var(--text-3); text-align: center; }
.ibx-foot-tip svg.lucide { width: 15px; height: 15px; flex-shrink: 0; }
.ibx-linkbtn { color: var(--accent-ink); font-weight: 650; text-underline-offset: 3px; }
.ibx-linkbtn:hover { text-decoration: underline; }

/* ---------- Caixa zerada ---------- */
.ibx-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 20px 40px; text-align: center; animation: ibxIn .4s var(--ease); }
.ibx-empty-art { position: relative; width: 120px; height: 112px; display: grid; place-items: center; margin-bottom: 6px; }
.ibx-empty-tray {
  width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-soft), color-mix(in srgb, var(--accent) 20%, var(--surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 14px 32px var(--accent-ring);
  animation: ibxFloat 3.4s ease-in-out infinite;
}
.ibx-empty-tray svg.lucide { width: 38px; height: 38px; }
.ibx-empty-spark { position: absolute; font-size: 16px; line-height: 1; animation: ibxTwinkle 2.4s ease-in-out infinite; }
.ibx-empty-spark.s1 { top: 2px; right: 6px; color: var(--c-yellow-s); }
.ibx-empty-spark.s2 { bottom: 12px; left: 2px; font-size: 12px; color: var(--c-pink-s); animation-delay: .6s; }
.ibx-empty-spark.s3 { top: 26px; left: 8px; font-size: 10px; color: var(--c-sky-s); animation-delay: 1.2s; }
.ibx-empty-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.015em; }
.ibx-empty-text { max-width: 410px; font-size: 14.5px; color: var(--text-2); }
.ibx-empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.ibx-empty-acts .btn { height: 42px; border-radius: 12px; padding: 0 16px; }

/* ---------- Fantasmas de arrastar / voar ---------- */
.ibx-fly { position: fixed; z-index: var(--z-drag); margin: 0; pointer-events: none; box-shadow: var(--shadow-lg); transform-origin: center; }
.ibx-dghost {
  position: fixed; left: 0; top: 0; z-index: var(--z-drag); pointer-events: none;
  display: inline-flex; align-items: center; gap: 9px; max-width: min(340px, calc(100vw - 32px));
  height: 46px; padding: 0 14px 0 7px; border-radius: var(--r-full);
  background: var(--surface); color: var(--text); border: 1.5px solid var(--accent);
  box-shadow: var(--shadow-lg), 0 10px 26px var(--accent-ring);
  font-size: 13.5px; font-weight: 640; white-space: nowrap; will-change: transform;
  animation: ibxGhostIn .18s var(--spring);
  transition: border-color .15s, background .15s;
}
.ibx-dghost-ic { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--c-bg); color: var(--c-ink); }
.ibx-dghost-ic svg.lucide { width: 15px; height: 15px; }
.ibx-dghost-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ibx-dghost-to { display: none; align-items: center; gap: 4px; flex-shrink: 0; padding-left: 9px; border-left: 1px solid var(--border); font-size: 12.5px; font-weight: 720; color: var(--accent-ink); }
.ibx-dghost-to svg.lucide { width: 13px; height: 13px; }
.ibx-dghost.is-target { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.ibx-dghost.is-target .ibx-dghost-to { display: inline-flex; }
.ibx-dghost.is-trash { border-color: var(--danger); box-shadow: var(--shadow-lg), 0 10px 26px color-mix(in srgb, var(--danger) 25%, transparent); }
.ibx-dghost.is-trash .ibx-dghost-to { color: var(--danger); }
.ibx-dghost.is-dropping { transition: transform .25s cubic-bezier(.5, 0, .75, 0), opacity .25s ease; }
.ibx-dghost.is-returning { transition: transform .22s var(--ease), opacity .22s ease; }

/* ==========================================================================
   Triagem
   ========================================================================== */
.ibx-tri { max-width: 600px; margin: 2px auto 0; display: flex; flex-direction: column; gap: 16px; }
.ibx-tri-top { display: flex; align-items: center; gap: 14px; }
.ibx-tri-count { font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.ibx-tri-count b { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); margin-right: 2px; }
.ibx-tri-bar { flex: 1; height: 8px; }
.ibx-tri-skip { color: var(--text-2); }

.ibx-stack { position: relative; height: 340px; margin-bottom: 26px; }
/* Triagem é modo foco: o campo de jogar algo fica na Lista */
.ibx[data-mode="triagem"] .ibx-add { display: none; }
.ibx[data-mode="triagem"] .ibx-head { margin-bottom: 20px; }
.ibx-tcard {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  padding: 22px 24px 20px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transform-origin: 50% 100%;
}
.ibx-tcard-back { pointer-events: none; transition: transform .35s var(--ease), opacity .35s; background: var(--surface-2); }
.ibx-tcard-back > * { opacity: .45; }
.ibx-tcard-back[data-depth="1"] { z-index: 2; transform: translateY(14px) scale(.955); }
.ibx-tcard-back[data-depth="2"] { z-index: 1; transform: translateY(28px) scale(.91); opacity: .7; box-shadow: var(--shadow-sm); }
.ibx-tcard.is-top {
  z-index: 3; cursor: grab; touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: var(--shadow-lg);
}
.ibx-tcard.is-top.is-enter { animation: ibxRise .42s var(--spring); }
.ibx-tcard.is-swiping { cursor: grabbing; box-shadow: var(--shadow-window); }
.ibx-tcard.is-flying { pointer-events: none; }
.ibx-tcard.is-skipping { transition: transform .24s ease-in, opacity .24s ease-in; transform: translateY(46px) scale(.9); opacity: 0; }

.ibx-tint { position: absolute; inset: 0; pointer-events: none; z-index: 0; transition: opacity .12s; }
.ibx-tint-ok { opacity: var(--ok, 0); background: linear-gradient(120deg, transparent 20%, color-mix(in srgb, var(--success) 20%, transparent)); }
.ibx-tint-arc { opacity: var(--arc, 0); background: linear-gradient(240deg, transparent 20%, color-mix(in srgb, var(--c-sand-s) 26%, transparent)); }
.ibx-stamp {
  position: absolute; top: 18px; z-index: 4; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 10px; border: 2.5px solid currentColor;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.ibx-stamp svg.lucide { width: 16px; height: 16px; stroke-width: 2.6; }
.ibx-stamp-ok { right: 18px; color: var(--success); transform: rotate(8deg); opacity: var(--ok, 0); }
.ibx-stamp-arc { left: 18px; color: var(--c-sand-ink); transform: rotate(-8deg); opacity: var(--arc, 0); }

.ibx-tcard-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.ibx-tcard-main { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 9px; overflow: hidden; cursor: pointer; }
.ibx-tcard-title {
  font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2;
  color: var(--text); word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ibx-tcard-back .ibx-tcard-title { margin-top: 14px; font-size: 22px; -webkit-line-clamp: 2; }
.ibx-tcard-body {
  font-size: 14.5px; line-height: 1.55; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.ibx-tcard-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-full); background: var(--surface-3); font-size: 13px; color: var(--text-2);
}
.ibx-tcard-link svg.lucide { width: 13px; height: 13px; }
.ibx-thumb-lg { height: 130px; flex-shrink: 0; }

.ibx-tsug {
  position: relative; z-index: 1; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 12px 14px; border-radius: var(--r-lg);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.ibx-tsug-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.ibx-tsug-label svg.lucide { width: 13px; height: 13px; color: var(--accent); }
.ibx-tsug-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  height: 36px; padding: 0 15px 0 12px; border-radius: var(--r-full);
  background: var(--c-bg); color: var(--c-ink); border: 1px solid color-mix(in srgb, var(--c-s) 35%, transparent);
  font-size: 15px; font-weight: 680; white-space: nowrap;
}
.ibx-tsug-type { font-weight: 550; opacity: .8; }
.ibx-tsug-why { font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.ibx-tsug-none { flex-direction: row; align-items: center; gap: 8px; border-color: var(--border-2); background: transparent; font-size: 13px; color: var(--text-3); }
.ibx-tsug-none svg.lucide { width: 14px; height: 14px; flex-shrink: 0; }

.ibx-tri-acts { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; }
.ibx-tri-btn { height: 50px; border-radius: 14px; font-size: 14.5px; padding: 0 12px; }
.ibx-tri-btn .kbd { margin-left: 2px; }
.ibx-tri-btn.btn-primary .kbd { background: color-mix(in srgb, var(--on-accent) 18%, transparent); color: var(--on-accent); border-color: color-mix(in srgb, var(--on-accent) 30%, transparent); }
.ibx-tri-btn:disabled { opacity: .42; }
.ibx-tri-arc:hover { border-color: var(--c-sand-s); }

.ibx-tri-spaces { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.ibx-tri-or { flex-basis: 100%; text-align: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 2px; }
.ibx-to {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px 0 10px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--c-bg) 72%, var(--surface)); color: var(--c-ink);
  border: 1.5px solid transparent; font-size: 13px; font-weight: 610; white-space: nowrap;
  transition: border-color var(--dur), transform .15s var(--spring), box-shadow var(--dur);
}
.ibx-to:hover { border-color: color-mix(in srgb, var(--c-s) 55%, transparent); box-shadow: var(--shadow-sm); }
.ibx-to:active { transform: scale(.96); }
.ibx-to.is-sug { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.ibx-to.is-sug::after { content: "✦"; margin-left: 2px; font-size: 11px; color: var(--accent); }
.ibx-to.is-bump { animation: ibxBump .55s var(--spring); }
.ibx-tri-help { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.ibx-tri-help svg.lucide { width: 14px; height: 14px; }
.ibx-tri-help b { color: var(--text-2); }

/* ---------- Animações ---------- */
@keyframes ibxIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ibxNew {
  0% { opacity: 0; transform: translateY(-10px) scale(.94); box-shadow: 0 0 0 0 var(--accent-ring); }
  60% { opacity: 1; transform: scale(1.015); box-shadow: 0 0 0 6px var(--accent-ring); }
  100% { transform: none; box-shadow: var(--shadow-sm); }
}
@keyframes ibxOut { to { opacity: 0; transform: scale(.94); } }
@keyframes ibxBump { 0% { transform: scale(1); } 35% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes ibxRise { from { transform: translateY(14px) scale(.955); } to { transform: none; } }
@keyframes ibxFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes ibxTwinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes ibxGhostIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toque: alça sempre visível ---------- */
@media (hover: none) {
  .ibx-grip { opacity: .55; }
}

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .ibx-head { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; margin-bottom: 14px; }
  .ibx-head-icon { width: 48px; height: 48px; border-radius: 16px; }
  .ibx-head-icon svg.lucide { width: 22px; height: 22px; }
  .ibx-title { font-size: 26px; gap: 4px 10px; }
  .ibx-count { min-width: 26px; height: 24px; font-size: 13px; padding: 0 8px; }
  .ibx-sub { font-size: 13.5px; margin-top: 4px; }
  .ibx-head-actions { grid-column: 1 / -1; }
  .ibx-ask { flex: 1; height: 44px; }
  .ibx-long { display: none; }
  .ibx-short { display: inline; }

  .ibx-add { height: 52px; margin-bottom: 12px; padding: 0 4px 0 10px; }
  .ibx-add-input { font-size: 16px; }
  .ibx-add-kbd { display: none; }
  .ibx-add-btn { width: 40px; height: 40px; }

  .ibx-drops { flex-direction: column; align-items: stretch; gap: 6px; margin: 0 -16px 12px; padding: 8px 0; }
  .ibx-drops-label { padding: 0 16px; height: auto; }
  .ibx-drops-row { flex-wrap: nowrap; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .ibx-drops-row::-webkit-scrollbar { display: none; }
  .ibx-drop { height: 40px; }

  .ibx-sugbar { flex-wrap: wrap; }
  .ibx-sugbar .btn { width: 100%; height: 40px; }

  .ibx-card { padding: 10px 12px 6px; }
  .ibx-more { width: 40px; height: 40px; }
  .ibx-grip { width: 32px; height: 40px; }
  .ibx-ghost { height: 42px; }
  .ibx-ghost-ok { height: 32px; }
  .ibx-sug-x { width: 40px; height: 40px; }
  .ibx-conn-ok { height: 34px; }
  .ibx-acts .btn { height: 40px; }
  .ibx-acts .btn-icon { width: 40px; }
  .ibx-foot-tip { margin-top: 20px; }

  .ibx-tri { gap: 14px; }
  .ibx-stack { height: 330px; margin-bottom: 24px; }
  .ibx-tcard { padding: 18px 18px 16px; gap: 12px; }
  .ibx-tcard-title { font-size: 23px; }
  .ibx-tcard-body { font-size: 14px; -webkit-line-clamp: 3; }
  .ibx-tri-acts { grid-template-columns: 1fr 1fr 1.25fr; gap: 6px; }
  .ibx-tri-btn { height: 52px; font-size: 14px; padding: 0 8px; gap: 6px; }
  .ibx-tri-btn .kbd { display: none; }
  .ibx-tri-skip { height: 40px; }
  .ibx-to { height: 40px; }
  .ibx-empty { padding-top: 36px; }
}

@media (max-width: 340px) {
  .ibx-tri-btn svg.lucide { display: none; }
}
