/* ============================================================
   الباحث عن الحديث — claude.ai-inspired, warm, RTL Arabic
   ============================================================ */

:root {
  /* surfaces */
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #efece3;
  --surface-3: #e9e5da;

  /* ink */
  --ink: #211f1b;
  --ink-2: #4a463e;
  --ink-3: #8a8478;

  /* clay accent (Claude) */
  --clay: #c2603f;
  --clay-strong: #ab502f;
  --clay-soft: #f3e6df;

  /* lines & shadow */
  --line: #e4dfd3;
  --line-2: #d8d2c4;
  --shadow-sm: 0 1px 2px rgba(40, 32, 20, .05);
  --shadow-md: 0 6px 24px rgba(50, 40, 24, .08);
  --shadow-lg: 0 16px 48px rgba(50, 40, 24, .12);

  /* shape & type */
  --r: 18px;
  --r-sm: 12px;
  --font-ui: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-scripture: 'Amiri', 'IBM Plex Sans Arabic', serif;

  --maxw: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, #faf7f0 0%, rgba(250, 247, 240, 0) 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--clay-soft); }

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 242, 236, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand__mark {
  color: var(--clay);
  font-size: 22px;
  line-height: 1;
}
.brand__name { font-size: 16.5px; letter-spacing: -.2px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ghost-btn:hover { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }

/* header actions group (channel link + new chat) */
.topbar__actions { display: flex; align-items: center; gap: 9px; }

/* Telegram channel link */
.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  background: var(--clay-soft);
  color: var(--clay-strong);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.channel-link:hover {
  background: #eed9d0;
  border-color: var(--clay);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.channel-link__icon { flex: 0 0 auto; }

/* ── Conversation column ──────────────────────────────────── */
.conversation {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 230px;
  min-height: calc(100vh - 56px);
}

/* ── Hero / empty state ───────────────────────────────────── */
.hero {
  text-align: center;
  padding: 9vh 8px 0;
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.hero__mark {
  font-size: 46px;
  color: var(--clay);
  margin-bottom: 14px;
  opacity: .9;
}
.hero__title {
  font-family: var(--font-scripture);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -.3px;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero__sub {
  max-width: 540px;
  margin: 0 auto 30px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-scripture);
  font-size: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chip:hover {
  transform: translateY(-1px);
  border-color: var(--clay);
  color: var(--clay-strong);
  box-shadow: var(--shadow-md);
}

/* ── Thread / messages ────────────────────────────────────── */
.thread { display: flex; flex-direction: column; gap: 26px; }

.msg { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }

.msg--user { display: flex; justify-content: flex-start; }
.msg--user .bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r) var(--r) var(--r) 6px;
  padding: 11px 16px;
  max-width: 80%;
  box-shadow: var(--shadow-sm);
  font-size: 15.5px;
  color: var(--ink);
}

.msg--bot { display: flex; gap: 13px; align-items: flex-start; }
.avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(160deg, var(--clay), var(--clay-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  margin-top: 2px;
  box-shadow: var(--shadow-sm);
}
.bot-body { flex: 1 1 auto; min-width: 0; }

/* note line + confidence */
.note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-2);
  font-size: 15.5px;
  margin: 2px 0 14px;
  line-height: 1.8;
}
.dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 8px;
}
.dot--high { background: #5b9d6b; }
.dot--medium { background: #d9a441; }
.dot--low { background: #cf7a4a; }

/* ── Results stack (one best hadith per book) ─────────────── */
.results { display: flex; flex-direction: column; gap: 16px; }

/* ── Hadith card ──────────────────────────────────────────── */
.hadith {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hadith::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: linear-gradient(var(--clay), var(--clay-strong));
}
.hadith__match {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 14px;
  padding: 7px 11px;
  background: var(--clay-soft);
  border-radius: 9px;
  color: var(--clay-strong);
  font-size: 13px;
  line-height: 1.6;
}
.hadith__match svg { flex: 0 0 auto; opacity: .8; }
.hadith__match-text {
  font-family: var(--font-scripture);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hadith__ar {
  font-family: var(--font-scripture);
  font-size: 1.5rem;
  line-height: 2.7rem;
  color: var(--ink);
  margin: 0 0 18px;
  text-align: justify;
}

.hadith__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pill {
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.pill--ref { background: var(--clay-soft); color: var(--clay-strong); font-weight: 600; }

.hadith__actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.act:hover { background: var(--surface-2); color: var(--ink); }
.act--copied { color: #5b9d6b; }

.hadith__trans {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
  animation: rise .25s ease both;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* `display:flex` above overrides the UA `[hidden]{display:none}`, so the panel
   would render open. Restore the hidden state explicitly (higher specificity). */
.hadith__trans[hidden] { display: none; }
.hadith__trans-body { margin: 0; text-align: left; }
.hadith__narr { color: var(--clay-strong); font-weight: 600; }
.hadith__en { color: var(--ink-2); }
.act--copy-en {
  align-self: flex-start;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.act--copy-en:hover { background: var(--surface-3); color: var(--ink); }

/* ── Disclosure groups (related / alternatives) ───────────── */
.group { margin-top: 18px; }
.group__label {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.group__label b { color: var(--ink-2); font-weight: 600; }

details.disclose {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  margin-bottom: 8px;
  overflow: hidden;
}
details.disclose > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 15px;
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s ease;
}
details.disclose > summary:hover { background: var(--surface-2); }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary .caret {
  margin-inline-start: auto;
  transition: transform .2s ease;
  color: var(--ink-3);
}
details.disclose[open] > summary .caret { transform: rotate(180deg); }
details.disclose .disclose__body { padding: 0 14px 14px; }

/* ── Typing indicator ─────────────────────────────────────── */
.typing { display: inline-flex; gap: 5px; padding: 8px 2px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay);
  opacity: .5;
  animation: blink 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

/* ── Error banner ─────────────────────────────────────────── */
.error {
  background: #fbeae5;
  border: 1px solid #f0c8ba;
  color: #9c3d24;
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.75;
}

/* ── Composer ─────────────────────────────────────────────── */
.composer {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  padding: 18px 20px 18px;
  background: linear-gradient(to top, var(--bg) 58%, rgba(244, 242, 236, 0));
  z-index: 15;
}
.composer__box {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  padding: 8px 8px 8px 8px;
  box-shadow: var(--shadow-lg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer__box:focus-within {
  border-color: var(--clay);
  box-shadow: 0 0 0 4px var(--clay-soft), var(--shadow-lg);
}
.composer__input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  padding: 8px 12px;
  max-height: 180px;
}
.composer__input::placeholder { color: var(--ink-3); }

.send-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, opacity .15s ease;
}
.send-btn:hover:not(:disabled) { background: var(--clay-strong); }
.send-btn:active:not(:disabled) { transform: scale(.93); }
.send-btn:disabled { opacity: .4; cursor: default; }
.send-btn svg { transform: rotate(0); }

.composer__hint {
  max-width: var(--maxw);
  margin: 9px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* source filter — pill trigger + popover */
.composer__tools {
  max-width: var(--maxw);
  margin: 0 auto 10px;
  display: flex;
  justify-content: flex-start;
}
.filter { position: relative; }
.filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.filter__btn:hover { border-color: var(--ink-3); color: var(--ink); }
.filter__btn svg:first-child { color: var(--clay); }
.filter__caret { transition: transform .2s ease; color: var(--ink-3); }
.filter.open .filter__caret { transform: rotate(180deg); }

.filter__menu {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 30;
  animation: pop .16s cubic-bezier(.2, .7, .2, 1) both;
}
.filter__head {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 8px 10px 6px;
  letter-spacing: .2px;
}
.filter__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--ink);
  transition: background .12s ease;
}
.filter__opt:hover { background: var(--surface-2); }
.filter__opt input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  border: 1.6px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.filter__opt input:checked { background: var(--clay); border-color: var(--clay); }
.filter__opt-name { flex: 1 1 auto; }
.filter__opt-tick {
  flex: 0 0 auto;
  color: var(--clay);
  opacity: 0;
  transition: opacity .12s ease;
}
.filter__opt:has(input:checked) .filter__opt-tick { opacity: 1; }
.filter__opt:has(input:checked) .filter__opt-name { font-weight: 600; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* dua line */
.dua {
  max-width: var(--maxw);
  margin: 7px auto 0;
  text-align: center;
  font-family: var(--font-scripture);
  font-size: 14px;
  color: var(--clay-strong);
  opacity: .9;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-3px); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .conversation { padding: 20px 14px 170px; }
  .hadith__ar { font-size: 1.32rem; line-height: 2.4rem; }
  .hero { padding-top: 6vh; }
  /* keep the header from crowding: new-chat becomes icon-only,
     the channel name stays visible */
  .topbar__inner { padding: 12px 14px; }
  .ghost-btn__label { display: none; }
  .ghost-btn { padding: 7px 9px; }
  .channel-link { padding: 7px 11px; font-size: 13px; }
}

/* ══ Manual keyword tagger (/tag) ═══════════════════════════ */
.tagger { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 80px; }
.tag-stats { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tag-input {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 13px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tag-input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-soft); }
.tag-input--num { width: 92px; }

.tag-auth {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px; color: var(--ink-3);
}
.tag-auth .tag-input { flex: 1 1 200px; }
.tag-auth__state { font-size: 12.5px; color: var(--ink-3); }
.tag-auth__state.ok { color: #5b9d6b; }

.tag-nav { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.tag-find { display: flex; gap: 8px; }
.tag-find .tag-input { flex: 1 1 auto; }
.tag-jump { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ghost-btn--accent { border-color: var(--clay); color: var(--clay-strong); background: var(--clay-soft); }
.ghost-btn--accent:hover { background: #eed9d0; border-color: var(--clay); color: var(--clay-strong); }

.tag-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.tag-result {
  display: flex; align-items: center; gap: 12px; text-align: right;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 14px; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tag-result:hover { border-color: var(--clay); box-shadow: var(--shadow-sm); }
.tag-result__ar {
  font-family: var(--font-scripture); color: var(--ink-2); font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto;
}

.tag-card { margin-bottom: 20px; }
.pill--id { background: var(--surface-3); color: var(--ink-3); font-variant-numeric: tabular-nums; }

.tag-kw { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.tag-kw__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 30px; }
.tag-kw__empty { color: var(--ink-3); font-size: 13.5px; align-self: center; }
.kw-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--clay-soft); color: var(--clay-strong);
  border-radius: 999px; padding: 5px 6px 5px 13px; font-size: 14px; font-weight: 500;
}
.kw-chip__x {
  border: none; background: rgba(171, 80, 47, .14); color: var(--clay-strong);
  width: 19px; height: 19px; border-radius: 50%; cursor: pointer;
  font-size: 11px; line-height: 1; display: grid; place-items: center;
  transition: background .15s ease, color .15s ease;
}
.kw-chip__x:hover { background: var(--clay); color: #fff; }

.tag-kw__add { display: flex; gap: 8px; align-items: stretch; }
.tag-kw__add .tag-input { flex: 1 1 auto; }
.tag-add-btn {
  flex: 0 0 auto; width: 42px; border: none; border-radius: 10px;
  background: var(--clay); color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.tag-add-btn:hover { background: var(--clay-strong); }
.tag-add-btn:active { transform: scale(.94); }

.tag-hint { text-align: center; color: var(--ink-3); font-size: 14px; margin-top: 30px; }

.tag-flash {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity .2s ease, transform .2s ease;
}
.tag-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── tagger browse: book tabs + chapter + list + nav ── */
.tag-browse { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.tag-books {
  display: inline-flex; gap: 4px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px;
}
.tag-book {
  border: none; background: transparent; color: var(--ink-2);
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tag-book:hover { color: var(--ink); }
.tag-book.active { background: var(--clay); color: #fff; box-shadow: var(--shadow-sm); }

.tag-chapter { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 260px; }
.tag-chapter__label { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.tag-select {
  flex: 1 1 auto; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; font-family: inherit; font-size: 14px; color: var(--ink);
  cursor: pointer; outline: none;
}
.tag-select:focus { border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-soft); }

.tag-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.tag-jump__label { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }

.tag-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 320px; overflow-y: auto; margin-bottom: 18px; padding-left: 4px;
}
.tag-row {
  display: flex; align-items: center; gap: 12px; text-align: right; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 14px; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.tag-row:hover { border-color: var(--clay); }
.tag-row.active { border-color: var(--clay); background: var(--clay-soft); }
.tag-row__num {
  flex: 0 0 auto; min-width: 34px; text-align: center;
  font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px;
  color: var(--clay-strong); background: var(--clay-soft); border-radius: 7px; padding: 3px 8px;
}
.tag-row.active .tag-row__num { background: #fff; }
.tag-row__ar {
  flex: 1 1 auto; min-width: 0; font-family: var(--font-scripture); color: var(--ink-2);
  font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-row__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #5b9d6b; }

.tag-card__nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.tag-card__pos { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.nav-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }
.nav-btn:disabled { opacity: .4; cursor: default; }
