/* ═══════════════════════════════════════════════════════════════
   Genesis Modes — صفحه‌ی تعیین هویت، چهار حالت
   با همان توکن‌های طراحی style.css (سرمه‌ای/طلایی/وزیرمتن)

   ⚠️ قاعده‌ی طراحی: در هیچ‌جای این صفحه شمار مفاهیم یا نام و
      تعداد لایه‌ها به کاربر نشان داده نمی‌شود. پیشرفتِ ساختِ ذهن
      فقط به‌صورت شماتیک (شبکه‌ی گره‌های روشن‌شونده) دیده می‌شود.
   ═══════════════════════════════════════════════════════════════ */

.gm {
  width: 100%;
  margin: 0 auto;
  padding: 4px 0 24px;
  text-align: initial;
}

/* ═══════════════════════════════════════════════════════════════
   صفحه‌ی تولد در اپ اصلی fixed و بدون اسکرول است؛ وقتی حالت‌های
   چهارگانه فعال‌اند باید قابل اسکرول شود، وگرنه دکمه‌ی «بعدی» زیر
   لبه‌ی صفحه گیر می‌کند.
   ═══════════════════════════════════════════════════════════════ */
.genesis.gm-active {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
  justify-content: center;
}
.genesis.gm-active .genesis-bg { position: fixed; }
.genesis.gm-active .genesis-content {
  max-width: 780px;
  padding: 22px 16px 48px;
  justify-content: flex-start;
}
/* نشان بزرگ‌تر: در صفحه‌ی انتخابِ حالت، لوگو باید مرکز ثقل باشد،
   نه یک نشانِ کوچک بالای کارت‌ها. */
.genesis.gm-active .genesis-mark { width: 104px !important; height: 104px !important; margin-bottom: 14px; }
.genesis.gm-active .genesis-title { font-size: 28px; }
.genesis.gm-active .genesis-subtitle { margin-bottom: 18px; }
.genesis.gm-active .genesis-footer { margin-top: 26px; }

/* داخل فلوی یک حالت، سرصفحه بیشتر جمع می‌شود و پاورقی کنار می‌رود */
/* و محتوا به‌جای چسبیدن به بالای صفحه، عمودی وسط می‌نشیند؛ min-height
   باعث می‌شود صفحه‌های بلندتر از پنجره همچنان اسکرول شوند. */
.genesis.gm-flow .genesis-content {
  min-height: calc(100vh - 44px);
  justify-content: center;
}
.genesis.gm-flow .genesis-mark { width: 46px !important; height: 46px !important; margin-bottom: 6px; }
.genesis.gm-flow .genesis-title { font-size: 22px; }
.genesis.gm-flow .genesis-subtitle { display: none; }
.genesis.gm-flow .genesis-footer { display: none; }
.genesis.gm-flow .selfa-wordmark { display: none; }

/* نمایشگرهای کوتاه: سرصفحه و فاصله‌ها جمع می‌شوند تا دکمه‌ی ادامه
   بدون اسکرول در دسترس بماند */
@media (max-height: 860px) {
  .genesis.gm-active .genesis-mark { width: 76px !important; height: 76px !important; }
  .genesis.gm-active .genesis-title { font-size: 22px; }
  .genesis.gm-active .genesis-content { padding-top: 14px; padding-bottom: 32px; }
  /* !important لازم است چون selfa-wordmark.css با !important
     روی .brain-with-wordmark می‌نشیند */
  .genesis.gm-flow .genesis-mark { display: none !important; }
  .genesis.gm-flow .genesis-title { display: none !important; }
  .genesis.gm-flow .gm-flowbar { margin-bottom: 14px; }
  .genesis.gm-flow .gm-panel { padding: 18px 18px; }
  .genesis.gm-flow .gm-map { margin: 0 0 12px; }
  .genesis.gm-flow .gm-map svg { max-width: 240px; }
  .genesis.gm-flow .gm-map-cap { margin-top: 6px; }
  .genesis.gm-flow .gm-q { font-size: 15px; line-height: 1.85; margin-bottom: 12px; }
  .genesis.gm-flow .gm-textarea { min-height: 92px; }
  .genesis.gm-flow .gm-cta { margin-top: 16px; padding: 10px 24px; }
  .genesis.gm-flow .gm-ghost { margin-top: 16px; padding: 9px 18px; }
  .genesis.gm-flow .gm-note { margin-top: 14px; }
}

.gm-hidden { display: none !important; }

.gm-prompt {
  font-size: 19px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 6px;
  color: var(--ink-primary, rgba(244, 232, 200, 0.95));
}
.gm-sub {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  text-align: center;
  max-width: 430px;
  margin: 0 auto 22px;
}

/* ─── کارت‌های انتخاب حالت ─── */
/* جمع‌تر از قبل: کارت‌ها نباید با لوگو رقابت کنند. ستون باریک‌تر،
   پس کارت‌ها کوچک‌تر و کل صفحه متمرکزتر می‌شود. */
.gm-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  max-width: 600px;
  margin-inline: auto;
}
@media (max-width: 640px) {
  .gm-cards { grid-template-columns: 1fr; max-width: 340px; }
}

.gm-card {
  position: relative;
  background: var(--bg-elevated, #14151c);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 12px;
  padding: 15px 15px 13px;
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  color: inherit;
  text-align: start;
  width: 100%;
  display: block;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.gm-card::before {
  content: '';
  position: absolute;
  top: 12px; bottom: 12px;
  width: 2.5px;
  border-radius: 2px;
  background: var(--gm-accent, var(--gold, #c9a961));
}
html[dir="rtl"] .gm-card::before { right: 0; }
html[dir="ltr"] .gm-card::before { left: 0; }

.gm-card:hover,
.gm-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong, rgba(201, 169, 97, 0.14));
  background: var(--bg-hover, #1a1c25);
  outline: none;
}

.gm-card-ic {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gm-accent-bg, rgba(201, 169, 97, 0.08));
  margin-bottom: 10px;
}
html[dir="rtl"] .gm-card-ic { margin-left: auto; }
html[dir="ltr"] .gm-card-ic { margin-right: auto; }

.gm-card-ic svg {
  width: 16px; height: 16px;
  stroke: var(--gm-accent, var(--gold, #c9a961));
  fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.gm-card h3 { font-size: 13.5px; font-weight: 700; margin: 0 0 5px; }
.gm-card p {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  margin: 0;
  min-height: 38px;
}
.gm-card .gm-chip {
  display: inline-block;
  margin-top: 9px;
  font-size: 10px;
  color: var(--gm-accent, var(--gold, #c9a961));
  background: var(--gm-accent-bg, rgba(201, 169, 97, 0.08));
  padding: 3px 10px;
  border-radius: 999px;
}

.gm-c1 { --gm-accent: #9b8dd6; --gm-accent-bg: rgba(155, 141, 214, 0.08); }
.gm-c2 { --gm-accent: #6ab39a; --gm-accent-bg: rgba(106, 179, 154, 0.08); }
.gm-c3 { --gm-accent: #7a9dc7; --gm-accent-bg: rgba(122, 157, 199, 0.08); }
.gm-c4 { --gm-accent: #c9a961; --gm-accent-bg: rgba(201, 169, 97, 0.08); }

/* ─── سرصفحه‌ی فلو ─── */
.gm-flowbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.gm-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-family: inherit;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  background: none;
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.gm-back:hover { color: var(--gold, #c9a961); border-color: var(--line-strong, rgba(201, 169, 97, 0.14)); }
.gm-flowtitle { font-size: 15px; font-weight: 700; line-height: 1.4; }
.gm-flowtitle small {
  display: block;
  font-size: 11px; font-weight: 400;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  margin-top: 3px;
}

/* ─── پنل ─── */
.gm-panel {
  background: var(--bg-elevated, #14151c);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 14px;
  padding: 24px 22px;
}
.gm-panel.gm-center { text-align: center; }

.gm-label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  margin: 16px 0 8px;
}
.gm-label:first-child { margin-top: 0; }

.gm-input, .gm-textarea {
  width: 100%;
  background: var(--bg-deep, #08090d);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 10px;
  color: var(--ink-primary, rgba(244, 232, 200, 0.95));
  font-family: inherit;
  font-size: 14px;
  line-height: 1.9;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s;
}
.gm-input:focus, .gm-textarea:focus { border-color: var(--gold-soft, rgba(201, 169, 97, 0.45)); }
.gm-textarea { resize: vertical; min-height: 120px; display: block; }
.gm-input-sm { max-width: 340px; }

.gm-hint {
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  margin-top: 8px;
}

.gm-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  background: linear-gradient(135deg, var(--gold, #c9a961) 0%, var(--gold-deep, #8b7038) 130%);
  color: #14120a;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(201, 169, 97, 0.22);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.gm-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201, 169, 97, 0.32); }
.gm-cta:disabled {
  background: var(--bg-hover, #1a1c25);
  color: var(--ink-quaternary, rgba(244, 232, 200, 0.22));
  box-shadow: none; cursor: not-allowed; transform: none;
}
.gm-ghost {
  background: none;
  border: 1px solid var(--line-strong, rgba(201, 169, 97, 0.14));
  color: var(--gold, #c9a961);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  margin-top: 22px;
}
html[dir="rtl"] .gm-ghost { margin-right: 10px; }
html[dir="ltr"] .gm-ghost { margin-left: 10px; }
.gm-ghost:hover { color: var(--gold-bright, #e8c878); }

.gm-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--gold-faint, rgba(201, 169, 97, 0.08));
  border: 1px solid var(--line, rgba(201, 169, 97, 0.06));
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  margin-top: 18px;
}
.gm-note b { color: var(--gold-bright, #e8c878); font-weight: 600; }
.gm-note-ic { flex: 0 0 auto; }

/* ─── 🆕 سند اختیاری (هر چهار حالت) ─── */
.gm-doc { margin-top: 4px; }
.gm-doc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gm-doc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-deep, #08090d);
  border: 1px dashed var(--line-strong, rgba(201, 169, 97, 0.18));
  border-radius: 10px;
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  font-size: 12.5px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.gm-doc-btn:hover { border-color: var(--gold-soft, rgba(201, 169, 97, 0.45)); color: var(--gold-bright, #e8c878); }
.gm-doc-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gm-doc.has-doc .gm-doc-btn { border-style: solid; border-color: var(--gold-soft, rgba(201, 169, 97, 0.35)); }
.gm-doc-file {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-faint, rgba(201, 169, 97, 0.08));
  border: 1px solid var(--line, rgba(201, 169, 97, 0.10));
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  font-size: 12px;
  color: var(--gold-bright, #e8c878);
  max-width: 100%;
}
html[dir="rtl"] .gm-doc-file { padding: 5px 12px 5px 6px; }
.gm-doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; direction: ltr; }
.gm-doc-x {
  background: none; border: none; cursor: pointer;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 999px;
}
.gm-doc-x:hover { color: var(--ink-primary, rgba(244, 232, 200, 0.95)); background: var(--bg-hover, #1a1c25); }


/* ─── نماد شکل‌گیری ذهن: چهار حلقه‌ی هم‌مرکز ───
   درونی‌ترین حلقه اول روشن می‌شود و لایه‌به‌لایه به بیرون می‌رود.
   وقتی هر چهار حلقه کامل شد، هسته می‌تپد = ذهن ساخته شده. */
.gm-rings { display: block; margin: 0 auto; }
.gm-ring {
  fill: none;
  stroke: var(--ink-quaternary, rgba(244, 232, 200, 0.22));
  stroke-width: 1.5;
  opacity: .3;
  stroke-dasharray: 3 5;
  transition: opacity .7s ease, stroke-width .7s ease, stroke-dasharray .7s ease;
}
.gm-ring.on {
  stroke: var(--gm-rc, var(--gold, #c9a961));
  stroke-dasharray: none;
  stroke-width: 2;
  opacity: .95;
  filter: drop-shadow(0 0 4px var(--gm-rc, var(--gold, #c9a961)));
}
.gm-ring.busy { animation: gmRingSpin 1.6s linear infinite; transform-origin: center; opacity: .6; }
@keyframes gmRingSpin { to { stroke-dashoffset: -32; } }

.gm-core {
  fill: var(--ink-quaternary, rgba(244, 232, 200, 0.22));
  opacity: .35;
  transition: fill .7s ease, opacity .7s ease;
}
.gm-core.on {
  fill: var(--gold-bright, #e8c878);
  opacity: 1;
  filter: drop-shadow(0 0 7px var(--gold, #c9a961));
  animation: gmCorePulse 3.4s ease-in-out infinite;
}
@keyframes gmCorePulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

.gm-rings-wrap { display: flex; align-items: center; gap: 10px; }
.gm-rings-cap { font-size: 10.5px; color: var(--ink-tertiary, rgba(244, 232, 200, 0.42)); }

/* ─── صفت هویت در هدر — کشویی زیر نام هویت ───
   قبلاً درون سطر هدر می‌نشست و با بلندشدنش آیکون‌های صدا/ویرایش/حذف
   به سطر بعد می‌افتادند. حالا در یک پنل شناور زیر هویت باز می‌شود و
   هیچ فضایی از هدر نمی‌گیرد. */
.identity-display { position: relative; }

.identity-epithet-toggle {
  display: none;                 /* تا وقتی صفتی نساخته نشده، اصلاً نیست */
  align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0;
  margin-inline-start: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--gold, #c9a961);
  opacity: .75;
  cursor: pointer;
  transition: opacity .2s ease, transform .25s ease, background .2s ease;
}
.identity-display.has-epithet .identity-epithet-toggle { display: inline-flex; }
.identity-epithet-toggle:hover { opacity: 1; background: rgba(201, 169, 97, .1); }
.identity-epithet-toggle svg { width: 13px; height: 13px; }
.identity-display.epithet-open .identity-epithet-toggle { transform: rotate(180deg); opacity: 1; }

.identity-epithet-pop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 120;
  min-width: 180px;
  max-width: 300px;
  padding: 9px 14px;
  background: var(--bg-elevated, #14151c);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.09));
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  text-align: center;
  animation: gmEpithetIn .3s ease;
}
.identity-display.epithet-open .identity-epithet-pop { display: block; }

/* ‎.identity-display در هدر transform دارد (وسط‌چین مطلق) و همین یک
   بستر انباشت می‌سازد؛ پس z-index پنل درونش محبوس می‌شود. تا وقتی
   پنل باز است، خودِ این بستر را بالا می‌آوریم. */
.header > .identity-bar .identity-display.epithet-open,
.header > #identityBar .identity-display.epithet-open,
.identity-display.epithet-open { z-index: 1200; }

/* ═══════════════════════════════════════════════════════════════
   کارت هویت هرگز وسط‌چینِ مطلق نمی‌شود.
   با position:absolute از جریان بیرون می‌رفت و هر وقت نام هویت
   بلند بود، روی همسایه‌هایش می‌افتاد: نشان پروژه، دکمه‌ی صدای
   سلفا، و انتخاب جنسیت صدا. در پنجره‌ی باریک هم همین بلا سر
   آیکون‌ها می‌آمد. حالا در صف flex جای خودش را می‌گیرد و هیچ‌وقت
   روی چیزی نمی‌افتد.
   ═══════════════════════════════════════════════════════════════ */
.header > .identity-bar .identity-display,
.header > #identityBar .identity-display {
  position: relative !important;   /* relative لازم است تا پنل صفت به آن بچسبد */
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin-inline-end: 10px !important;
  flex-shrink: 1;
  min-width: 0;
}

/* نام هویتِ بلند نباید هدر را بترکاند — با «…» کوتاه می‌شود
   و متن کامل در tooltip می‌ماند */
.header .identity-display-value {
  display: inline-block;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  /* سند LTR است؛ بدون این، «…» سرِ نام فارسی را می‌بُرید نه تهش را.
     plaintext جهت را از اولین حرفِ خودِ نام می‌گیرد — فارسی یا انگلیسی. */
  unicode-bidi: plaintext;
  text-align: start;
}
@media (max-width: 1560px) { .header .identity-display-value { max-width: 220px; } }

/* در پنجره‌ی متوسط، اول چیزهای کم‌ارزش‌تر جا باز می‌کنند تا نامِ
   هویت خوانا بماند: برچسب «هویت»، سپس متنِ دکمه‌های مود. */
@media (max-width: 1400px) {
  .header .identity-display-label { display: none; }
}
@media (max-width: 1340px) {
  .header .mode-btn-label { display: none; }
  .header .mode-btn { padding: 6px 9px; }
}
@media (max-width: 1000px) {
  .header .identity-display-value { max-width: 150px; }
}

/* گروه صدا و آیکون‌های کنش هرگز له نمی‌شوند */
.header .tts-group,
.header .header-actions { flex-shrink: 0; }

/* ‎.identity-bar در هدر overflow:hidden دارد (برای کوتاه‌کردن نام بلند)
   و پنل شناور را می‌بُرد؛ فقط تا وقتی پنل باز است بازش می‌کنیم. */
header.header .identity-bar.epithet-open,
.header .identity-bar.epithet-open,
#identityBar.epithet-open { overflow: visible !important; }

.identity-epithet {
  font-size: 12.5px;
  line-height: 2;
  color: var(--gold, #c9a961);
  opacity: .95;
  white-space: normal;           /* اجازه‌ی شکستن سطر داخل پنل */
}
.identity-epithet .gm-new { animation: gmEpithetIn .8s ease; }
@keyframes gmEpithetIn { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }

/* ─── پنل تأیید صفت (پس از تشکیل ذهن) ─── */
.gm-confirm {
  width: min(680px, calc(100% - 24px));
  margin: 0 auto 10px;
  background: var(--bg-elevated, #14151c);
  border: 1px solid var(--line-strong, rgba(201, 169, 97, 0.14));
  border-radius: 14px;
  padding: 18px 20px;
  animation: gmRise .45s ease;
}
.gm-confirm-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.gm-confirm-title { font-size: 13px; font-weight: 700; color: var(--ink-primary, rgba(244,232,200,.95)); }
.gm-confirm-step { font-size: 10.5px; color: var(--ink-tertiary, rgba(244,232,200,.42)); white-space: nowrap; }
.gm-confirm-word {
  font-size: 30px; font-weight: 700; text-align: center;
  color: var(--gold-bright, #e8c878);
  margin: 14px 0 6px; letter-spacing: .5px;
  animation: gmEpithetIn .6s ease;
}
.gm-confirm-sub {
  font-size: 11.5px; line-height: 1.9; text-align: center;
  color: var(--ink-secondary, rgba(244,232,200,.65));
  margin-bottom: 16px;
}
.gm-confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gm-confirm-actions .gm-cta,
.gm-confirm-actions .gm-ghost { margin: 0; }
.gm-confirm-fix { display: none; margin-top: 14px; }
.gm-confirm-fix.on { display: block; animation: gmRise .3s ease; }
.gm-confirm-fix .gm-input { max-width: 260px; margin: 0 auto 10px; display: block; text-align: center; }
.gm-confirm-busy {
  text-align: center; font-size: 12px;
  color: var(--ink-secondary, rgba(244,232,200,.65)); padding: 10px 0;
}
.gm-confirm-done { text-align: center; }
.gm-confirm-final {
  font-size: 22px; font-weight: 700; color: var(--gold-bright, #e8c878);
  margin: 10px 0 14px; line-height: 1.8;
}

/* ─── نقشه‌ی مفاهیم فقط برای حساب ادمین ─── */
body.gm-no-map #mapSection,
body.gm-no-map #detailsPanel { display: none !important; }

/* ─── شماتیک شکل‌گیری ذهن ─── */
.gm-map { margin: 2px 0 18px; }
.gm-map svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}
.gm-e {
  stroke: var(--ink-quaternary, rgba(244, 232, 200, 0.22));
  stroke-width: .8;
  opacity: .22;
  transition: stroke .6s ease, opacity .6s ease;
}
.gm-e.on { stroke: var(--gold-soft, rgba(201, 169, 97, 0.45)); opacity: .55; }
.gm-n {
  fill: var(--ink-quaternary, rgba(244, 232, 200, 0.22));
  opacity: .28;
  transition: fill .6s ease, opacity .6s ease;
}
.gm-n.on {
  fill: var(--gm-c, var(--gold, #c9a961));
  opacity: 1;
  filter: drop-shadow(0 0 5px var(--gm-c, var(--gold, #c9a961)));
}
.gm-map-cap {
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  margin-top: 9px;
}

/* ─── مصاحبه ─── */
.gm-qmeta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gm-qcount { font-size: 11px; color: var(--ink-tertiary, rgba(244, 232, 200, 0.42)); }
.gm-q { font-size: 16px; font-weight: 600; line-height: 2; margin: 0 0 14px; }

.gm-fu {
  margin-top: 15px;
  background: var(--gold-faint, rgba(201, 169, 97, 0.08));
  border: 1px solid var(--line-strong, rgba(201, 169, 97, 0.14));
  border-radius: 12px;
  padding: 14px 15px;
  animation: gmRise .3s ease;
}
.gm-fu-tag {
  font-size: 10px;
  color: var(--gold-bright, #e8c878);
  letter-spacing: .4px;
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 6px;
}
.gm-fu-q { font-size: 13.5px; line-height: 1.9; margin-bottom: 10px; }
.gm-fu-loading { font-size: 11.5px; color: var(--ink-tertiary, rgba(244, 232, 200, 0.42)); }

.gm-toggle {
  display: flex;
  background: var(--bg-deep, #08090d);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 20px;
}
.gm-toggle button {
  border: none; background: none;
  color: var(--ink-tertiary, rgba(244, 232, 200, 0.42));
  font-family: inherit; font-size: 12px;
  padding: 7px 20px;
  border-radius: 999px;
  cursor: pointer;
}
.gm-toggle button.sel { background: var(--gold-faint, rgba(201, 169, 97, 0.08)); color: var(--gold-bright, #e8c878); }

/* ─── چیپ‌های شخصیت مشهور ─── */
.gm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gm-chips button {
  background: var(--bg-deep, #08090d);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  color: var(--ink-secondary, rgba(244, 232, 200, 0.65));
  font-family: inherit; font-size: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.gm-chips button:hover { border-color: var(--gold-soft, rgba(201, 169, 97, 0.45)); color: var(--gold-bright, #e8c878); }

/* ─── نشان پایان ─── */
.gm-done-mark {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(106, 179, 154, 0.08);
  border: 1px solid rgba(106, 179, 154, .3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.gm-done-mark svg { width: 25px; height: 25px; stroke: #6ab39a; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── نوار جوانه در صفحه‌ی گفتگو ─── */
.gm-sprout-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-elevated, #14151c);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.05));
  border-radius: 999px;
  padding: 7px 16px;
  margin: 0 auto 10px;
  /* کارت باید فقط به اندازه‌ی محتوایش باشد، نه کشیده در تمام عرض */
  width: fit-content;
  max-width: calc(100% - 24px);
  transition: opacity .6s ease, transform .6s ease;
}
/* پس از کامل‌شدن ذهن، نوار آرام محو می‌شود و حذف می‌گردد */
.gm-sprout-bar.gm-fading { opacity: 0; transform: translateY(-6px); }
.gm-sprout-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #7a9dc7; white-space: nowrap; }
.gm-sprout-dot { width: 7px; height: 7px; border-radius: 50%; background: #7a9dc7; animation: gmPulse 2.2s ease-in-out infinite; }
.gm-sprout-map { flex: 1; min-width: 90px; }
.gm-sprout-map svg { max-width: 100%; }
.gm-sprout-map .gm-map-cap { display: none; }
.gm-sprout-bar .gm-cta { margin-top: 0; padding: 8px 18px; font-size: 12.5px; }

@keyframes gmPulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes gmRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.gm-screen { animation: gmRise .35s ease; }

/* ─── قاعده‌ی سراسری: شمار مفاهیم هرگز به کاربر نشان داده نمی‌شود ───
   راهنمای نقشه‌ی ذهن، تعداد هر لایه را می‌نوشت (۵ / ۱۰ / ۲۰ / ۳۰).
   نام لایه‌ها برای فیلتر کردن نقشه لازم است، ولی عددها می‌روند. */
.legend-num { display: none !important; }

/* ─── خطا ─── */
.gm-error {
  color: #d97757;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 12px;
  min-height: 18px;
}
