/* message-v1 — self-contained per prototype principle. */

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; resize: none; }

/* ============ APP SHELL ============ */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 680px) 320px;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

/* ============ SIDEBAR ============ */
.sidebar { position: sticky; top: 24px; height: calc(100vh - 48px); display: flex; flex-direction: column; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 32px; font-weight: 800; margin-bottom: 36px; color: var(--text); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; }
.sidebar nav a {
  padding: 14px 18px; color: var(--text-soft); border-radius: 999px; font-weight: 600; font-size: 16px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.sidebar nav a.active, .sidebar nav a:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.new-post { border-radius: 999px; background: var(--cta-bg); color: var(--cta-text); font-weight: 700; padding: 14px 22px; font-size: 16px; }

/* ============ MAIN ============ */
.main { min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; min-height: 44px;
}
.topbar .back {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}
.topbar .back:hover { background: var(--surface-soft); color: var(--text); }
.topbar-peer { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.topbar-peer .who { flex: 1; min-width: 0; }
.topbar-peer .who b { display: block; font-weight: 800; font-size: 16px; }
.topbar-peer .who small { display: block; color: var(--text-soft); font-size: 12px; margin-top: 2px; }
.chat-more-wrap { position: relative; flex-shrink: 0; }
.chat-more {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}
.chat-more:hover { background: var(--surface-soft); color: var(--text); }
.chat-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 30;
}
.chat-menu[hidden] { display: none !important; }
.chat-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
}
.chat-menu button:hover { background: var(--surface-soft); }
.chat-menu button svg { flex-shrink: 0; color: var(--text-soft); }
.chat-menu button span { flex: 1; white-space: nowrap; }
.chat-menu button small {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  max-width: 110px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-menu.langs { max-height: 280px; overflow-y: auto; }
.chat-menu.langs button.on { color: var(--primary-dark); background: var(--primary-soft); }

.chat-report {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.35);
}
.chat-report[hidden] { display: none !important; }
.chat-report-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.chat-report-card b { display: block; font-size: 15px; font-weight: 800; }
.chat-report-card small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.chat-report-card textarea {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  resize: none;
  box-sizing: border-box;
}
.chat-report-card textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.chat-report-actions { display: flex; gap: 8px; margin-top: 12px; }
.chat-report-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
#chat-report-cancel { background: var(--surface-soft); color: var(--text-soft); }
#chat-report-send { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }

/* ============ 撳時間 — 時間詳情（同 onair-studio-v1 一套） ============ */
.bubble-meta span[data-t] { cursor: pointer; }
.ac-timeinfo {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.35);
}
.ac-timeinfo[hidden] { display: none !important; }
.ac-timeinfo-card {
  width: 100%;
  max-width: 340px;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.ac-timeinfo-card > b { display: block; font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.ti-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ti-row:last-of-type { border-bottom: 0; }
.ti-row span { color: var(--text-soft); flex-shrink: 0; }
.ti-row em {
  font-style: normal;
  font-weight: 700;
  text-align: right;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.ti-row em i {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.ac-timeinfo-card > small { display: block; margin-top: 8px; font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.ck-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.2s, transform 0.2s;
}
.ck-toast.show { opacity: 0.92; transform: translate(-50%, 0); }
.ck-toast[hidden] { display: none !important; }

/* topbar actions cluster (chip + buttons) */
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.wallet-chip:hover {
  background: var(--surface);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.wallet-chip .ic { display: inline-flex; align-items: center; line-height: 1; }
.wallet-chip .ic svg { display: block; }

/* Topbar brand swap for mobile */
.topbar-brand { display: none; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.topbar-brand img { width: 24px; height: 24px; object-fit: contain; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }

/* ============ PAID-MODE BANNER ============ */
.charge-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245,158,11,0.25);
  background: rgba(245,158,11,0.08);
  margin-bottom: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.charge-banner:hover { background: rgba(245,158,11,0.13); }
.charge-banner .ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--warning);
  color: white;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.charge-banner .txt { flex: 1; font-size: 13px; line-height: 1.5; }
.charge-banner b { font-weight: 800; color: #b45309; }
.charge-banner .chev { color: var(--text-soft); font-size: 14px; transition: transform 0.15s; }
.charge-banner.open .chev { transform: rotate(180deg); }
.charge-explain {
  margin: -10px 0 14px;
  padding: 14px 18px;
  border: 1px solid rgba(245,158,11,0.18);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(245,158,11,0.04);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  display: none;
}
.charge-explain.show { display: block; animation: fadeIn 0.18s; }
.charge-explain b { color: #b45309; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.free-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.18);
  margin-bottom: 14px;
  font-size: 13px;
  color: #047857;
}

/* ============ CHAT ============ */
.chat {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 0 46px;  /* bottom = gap between last bubble and composer (desktop) */
}
.bubble-row {
  display: flex; gap: 10px;
  max-width: 80%;
}
.bubble-row.sent {
  margin-left: auto;
  flex-direction: row-reverse;
}
.bubble {
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble-row.sent .bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.bubble-row.received .bubble { border-bottom-left-radius: 6px; }
.bubble-row.sent .bubble { border-bottom-right-radius: 6px; }
.bubble-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}
.bubble-row.sent .bubble-meta { justify-content: flex-end; }
.bubble-meta .seen { display: inline-flex; align-items: center; color: var(--success); }
.bubble-meta .paid {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
/* trans-icon: hidden by default, only shown when toggled to original mode */
.bubble-meta .trans-icon {
  display: none;
  align-items: center; gap: 3px;
  font-size: 11px;
  user-select: none;
}
.bubble-meta .trans-icon .lang {
  font-weight: 800;
  color: var(--primary);
  font-size: 10px;
  letter-spacing: 0.03em;
}

/* Bubble is tappable when message has translation (subtle desktop affordance) */
.bubble-row.has-trans .bubble { cursor: pointer; }
.bubble-row.has-trans:hover.received .bubble { filter: brightness(0.96); }
.bubble-row.has-trans:hover.sent .bubble { filter: brightness(0.94); }

/* Showing original — dashed border + reveal icon */
.bubble-row.show-original .trans-icon { display: inline-flex; }
.bubble-row.show-original.received .bubble {
  background: var(--surface);
  border: 1px dashed var(--primary);
}
.bubble-row.show-original.sent .bubble {
  background: linear-gradient(135deg, var(--primary-dark), #3730a3);
  outline: 1px dashed rgba(255,255,255,0.55);
  outline-offset: -3px;
}

.bubble-col { display: flex; flex-direction: column; }

.day-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 8px 0;
}
.day-divider::before,
.day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============ COMPOSER ============ */
.composer {
  position: sticky;
  bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  margin-top: 18px;
}
.composer textarea {
  width: 100%;
  min-height: 24px;
  max-height: 140px;
  font-size: 15px;
  line-height: 1.5;
  padding: 4px 0;
}
.composer-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.composer .hint {
  flex: 1;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.composer .hint b { color: var(--text); font-weight: 700; }
.composer .send {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  font-size: 13px;
  transition: opacity 0.15s;
}
.composer .send.free { background: var(--cta-bg); }
.composer .send:disabled { opacity: 0.5; cursor: default; }
.ac-phrase-btn {
  width: 26px; height: 38px;
  margin-right: -6px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-soft);
}
.ac-phrase-btn:hover { background: var(--surface-soft); color: var(--text); }

/* ============ AVATAR ============ */
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 800; flex-shrink: 0; user-select: none; }
.avatar.g1 { background: linear-gradient(135deg, var(--primary), var(--ai)); }
.avatar.g2 { background: linear-gradient(135deg, var(--ai), var(--info)); }
.avatar.g3 { background: linear-gradient(135deg, var(--success), var(--ai)); }
.avatar.g4 { background: linear-gradient(135deg, var(--accent), var(--accent-warm)); }
.avatar.g5 { background: linear-gradient(135deg, var(--primary), var(--accent)); }

/* ============ RIGHT PANEL ============ */
.right-panel { display: flex; flex-direction: column; gap: 18px; }
.right-panel .card { padding: 18px; }
.right-panel h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; }

/* Pay state card */
.state-card .state-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.state-card .state-row:last-of-type { border-bottom: 0; }
.state-card .k { color: var(--text-soft); }
.state-card .v { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.state-card .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
}
.state-card .dot.on { background: var(--success); }
.state-card .effective {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.55;
}
.state-card .effective.paid { background: rgba(245,158,11,0.1); color: #b45309; }
.state-card .effective.free { background: rgba(16,185,129,0.1); color: #047857; }
.state-card .effective b { font-weight: 800; }

/* Wallet snap */
.wallet-snap {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.wallet-snap h2 { color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.wallet-snap .bal { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.wallet-snap .bal small { font-size: 12px; font-weight: 700; opacity: 0.85; margin-left: 4px; }
.wallet-snap .usd { color: rgba(255,255,255,0.78); font-size: 12px; margin-top: 4px; }

/* Recent chats list */
.recent-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.recent-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.recent-list li:hover { background: var(--surface-soft); }
.recent-list .meta { flex: 1; min-width: 0; }
.recent-list .meta b { display: block; font-weight: 700; font-size: 13px; }
.recent-list .preview { color: var(--text-soft); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-list .right { text-align: right; flex-shrink: 0; }
.recent-list .right small { color: var(--text-muted); font-size: 11px; }
.recent-list .unread {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: 4px;
}

/* ============ MOBILE NAV ============ */
.mobile-nav { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
    padding-bottom: 96px;
    gap: 12px;
  }
  .sidebar, .right-panel { display: none; }

  .topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 4px; margin: 0 0 12px;
  }

  .composer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    margin-top: 0;
    z-index: 15;
    transition: bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  /* When mobile nav is hidden, composer drops into its slot */
  body.nav-hidden .composer {
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  /* extra room at chat bottom so last message isn't hidden behind the fixed composer (mobile) */
  .chat { padding-bottom: 160px; }

  .bubble-row { max-width: 86%; }

  .mobile-nav {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr);
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line); border-radius: 24px;
    box-shadow: var(--shadow-card); padding: 10px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    z-index: 20;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
  }
  .mobile-nav.nav-hidden {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }
  .mobile-nav a { text-align: center; font-size: 12px; color: var(--text-soft); padding: 8px 4px; }
  .mobile-nav a.active { color: var(--text); font-weight: 600; }
  .mobile-nav .compose-btn {
    width: 46px; height: 46px;
    margin: auto; padding: 0;
    border-radius: 50%;
    background: var(--cta-bg); color: var(--cta-text);
    display: grid; place-items: center; line-height: 1;
  }
}

/* ============ 長按自己訊息（fixed — body 層 overlay） ============ */
.bubble-row.sent .bubble { user-select: none; -webkit-user-select: none; }
.bubble.deleted {
  background: var(--surface-soft) !important;
  color: var(--text-muted) !important;
  font-style: italic;
}
.ac-msgact {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.35);
}
.ac-msgact[hidden] { display: none !important; }
.ac-msgact-card {
  width: 100%;
  max-width: 360px;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.ac-msgact-card b { display: block; font-size: 15px; font-weight: 800; }
.ac-msgact-card textarea {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  resize: none;
}
.ac-msgact-card textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.ac-msgact-add {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}
.ac-msgact-del { display: flex; gap: 8px; margin-top: 8px; }
.ac-msgact-del button {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}
#ac-msgact-delboth { color: var(--error); }
.ac-msgact-del button:hover { background: var(--line); }

/* ============ 常用句子庫（fixed — body 層 overlay） ============ */
.ac-phrases {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.35);
}
.ac-phrases[hidden] { display: none !important; }
.ac-phrases-card {
  width: 100%;
  max-width: 420px;
  /* min-width:0 — 冇佢 nowrap 長句會令 grid track 撐爆容器出界 */
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.ac-phrases-card header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ac-phrases-card header b { font-size: 15px; font-weight: 800; }
.ac-phrases-card header button {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-soft);
}
.ac-phrases-card header button:hover { background: var(--surface-soft); color: var(--text); }
.ac-phrases-card ul {
  list-style: none;
  margin: 0; padding: 0;
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ac-phrases-card li { display: flex; align-items: center; gap: 6px; }
.ac-phrase-use {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.5;
  /* 單行：過長自動隱藏，左右 drag 睇隱藏部份 */
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.ac-phrase-use::-webkit-scrollbar { display: none; }
.ac-phrase-use:hover { background: var(--primary-soft); color: var(--primary-dark); }
.ac-phrase-del {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted);
}
.ac-phrase-del:hover { background: var(--surface-soft); color: var(--error); }
.ac-phrases-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 14px 0; }
.ac-phrase-add {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.ac-phrase-add input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}
.ac-phrase-add input:focus { border-color: var(--primary); background: var(--surface); }
.ac-phrase-add button {
  padding: 9px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  font-size: 13px;
}
