/* بازطراحی Yar هوش مصنوعی بیت‌یار (۲۶ آبان ۱۴۰۵) — ظاهر لایه‌ی yar.js و پرچم window.BF_YAR در terminal.js.
 * طرح: بوم «بازطراحی بیت‌یار» و دیزاین‌سیستم Yar. همه‌ی قاعده‌ها زیر html.yar هستند؛ بی آن کلاس صفحه همان قبلی است.
 * رنگ‌ها از متغیرهای خود terminal.css (--card، --line، --pri…) تا تم تیره هم درست بماند. */

/* ---------- نوار پرسش: بی حاشیه‌ی رنگین‌کمانی (طرح: «تنها جلوه‌ی مجاز، هاله‌ی فوکوس») ---------- */
html.yar .aibar { background: var(--card); border: 1px solid var(--line2); animation: none; box-shadow: none; border-radius: 999px }
html.yar .aibar:focus-within { border-color: var(--pri); box-shadow: var(--focus) }
html.yar .ai-go { background: var(--txt); color: var(--card) }
html.yar .ai-f small { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--sub); font-weight: 500; font-size: 12px }

/* ---------- قرص «روی چارت · چشم · پاک کن» (در #lstrip، terminal.js: yarStrip) ---------- */
html.yar .lstrip .yar-clear { pointer-events: auto; display: inline-flex; align-items: stretch; height: 32px; border-radius: 999px; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 2px 8px -2px rgba(16, 24, 40, .18); overflow: hidden; flex: none }
html.yar .lstrip .yar-clear button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 0 10px; font: 600 12px/1 inherit; font-family: inherit; color: var(--txt); cursor: pointer; white-space: nowrap; border: 0; box-shadow: none; background: transparent }
html.yar .lstrip .yar-clear button + button { border-inline-start: 1px solid var(--line) }
html.yar .lstrip .yar-clear button:hover { background: var(--card2) }
html.yar .lstrip .yar-clear button:focus-visible { outline: 2px solid var(--pri); outline-offset: -2px }
html.yar .lstrip .yar-clear .yc b { font-size: 13px; font-weight: 800 }
html.yar .lstrip .yar-clear .yc { font-weight: 500; color: var(--sub) }
html.yar .lstrip .yar-clear .yc b { color: var(--txt) }
html.yar .lstrip .yar-clear .ye { width: 36px; padding: 0 }
html.yar .lstrip .yar-clear .ye[aria-pressed="true"] { color: var(--pri-ink); background: var(--pri-bg) }
html.yar .lstrip .yar-clear svg { width: 16px; height: 16px; flex: none }
html.yar .lstrip .yar-clear .yx { color: var(--txt) }
/* چیپ‌ها فقط وقتی «N روی چارت» باز است؛ با «پنهان کردن همه» هیچ چیپی نیست */
html.yar .lstrip.yar-shut > button { display: none }
html.yar .lstrip { align-items: center; gap: 6px }
html.yar .lstrip > button { height: 26px; padding: 0 9px; font-size: 12px }

/* ---------- برگه‌ی «من» (گوشی) و منوی «بیشتر» (دسکتاپ) ---------- */
.yar-sheet[hidden], .yar-scrim[hidden] { display: none !important }
.yar-scrim { position: fixed; inset: 0; z-index: 71; background: rgba(16, 24, 40, .45) }
.yar-me { position: fixed; z-index: 72; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; text-align: start; background: var(--card); color: var(--txt); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 40px -10px rgba(16, 24, 40, .35); padding: 6px 12px calc(12px + env(safe-area-inset-bottom)); font-size: 14px }
.yar-me.is-pop { left: auto; right: auto; bottom: auto; width: 320px; max-height: calc(100vh - 90px); border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 18px 48px -12px rgba(16, 24, 40, .28), 0 4px 12px rgba(16, 24, 40, .06); padding: 8px }
.yar-me__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line2); margin: 4px auto 10px }
.yar-me.is-pop .yar-me__grab { display: none }
.yar-me__hd { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px }
.yar-me__hd b { display: block; font-size: 16px; font-weight: 600; line-height: 1.5 }
.yar-me__hd small { display: block; font-size: 12px; color: var(--sub); line-height: 1.5 }
.yar-me__av { width: 44px; height: 44px; border-radius: 50%; background: var(--card2); color: var(--sub); display: grid; place-items: center; flex: none }
.yar-me__av svg { width: 22px; height: 22px }
.yar-me__grp { border-top: 1px solid var(--line); padding: 4px 0 }
.yar-mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 4px; border: 0; background: none; border-radius: 10px; color: var(--txt); font: inherit; text-align: start; text-decoration: none; cursor: pointer }
.yar-mi:hover { background: var(--card2); color: var(--txt) }
.yar-mi:focus-visible { outline: 2px solid var(--pri); outline-offset: -2px }
.yar-mi__ic { width: 32px; height: 32px; border-radius: 8px; background: var(--card2); color: var(--txt); display: grid; place-items: center; flex: none }
.yar-mi__ic svg { width: 18px; height: 18px }
.yar-mi__tx { flex: 1; min-width: 0 }
.yar-mi__tx b { display: block; font-size: 14px; font-weight: 600; line-height: 1.5 }
.yar-mi__tx small { display: block; font-size: 12px; color: var(--sub); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.yar-mi__end { color: var(--sub); display: grid; place-items: center; flex: none }
.yar-mi__end svg { width: 16px; height: 16px }
.yar-mi__num { font-style: normal; font-weight: 800; color: var(--pri-ink); background: var(--pri-bg); border-radius: 999px; padding: 2px 10px; font-size: 13px }
.yar-sw { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line2); flex: none; transition: background .15s }
.yar-sw::before { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(16, 24, 40, .2) }
.yar-mi[aria-checked="true"] .yar-sw { background: var(--txt) }
.yar-mi[aria-checked="true"] .yar-sw::before { inset-inline-start: 18px }

/* ---------- دکمه‌های نوار بالا ---------- */
html.yar .yar-acts { display: flex; align-items: center; gap: 8px; flex: none }
html.yar .yar-more { display: none; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--txt); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer }
html.yar .yar-more svg { width: 18px; height: 18px }
html.yar .yar-more:hover, html.yar .yar-more[aria-expanded="true"] { background: var(--card2) }

/* ---------- جواب بیت‌یار: سه خط، بعد سکوت ---------- */
html.yar .by-ans.yar-long:not(.yar-open) { max-height: 230px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent) }
html.yar .yar-morebtn { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 2px; padding: 4px 12px; min-height: 32px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--pri-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer }
html.yar .yar-morebtn:hover { background: var(--card2) }

/* ---------- دسکتاپ ---------- */
@media (min-width: 981px) {
	/* نوار ابزار: «بیت‌یار» (نوار پرسش هست)، «ویدیوی آموزش» (در «بیشتر»)، «نمایش ابزارها» و «پاک کردن» (قرص روی چارت) از ردیف برداشته می‌شوند */
	html.yar #cmenu .cm.by, html.yar #cmenu .byv-chip, html.yar #cmenu .cm.eye, html.yar #cmenu .cm.clr, html.yar #cmenu .cm.hlp { display: none }
	html.yar .yar-more { display: inline-flex }
}

/* ---------- گوشی: یک نوار بالا، نوار پرسش همیشه‌پیدا، نوار پایین چهارتایی ---------- */
@media (max-width: 980px) {
	html.yar .tb { display: none }
	html.yar .tbar { display: none }
	html.yar .symbar { padding: 8px 10px; gap: 6px }
	html.yar .symbar .sym { flex: 1 1 auto; min-width: 0 }
	html.yar .symbar .sym .nm { min-width: 0; overflow: hidden }
	html.yar .symbar .sym .nm b, html.yar .symbar .sym .nm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
	html.yar .symbar .px { flex: none }
	html.yar .symbar .exb { padding: 0 6px; gap: 0 }
	html.yar .symbar .exb .cv { display: none }
	html.yar .symbar .sym { gap: 6px }
	html.yar .symbar .sym .chev { width: 22px; height: 22px; border: 0 }
	html.yar .symbar .tb-cr { height: 32px; padding: 0 10px; gap: 4px; margin-inline-start: 4px }
	html.yar .symbar .tb-cr small { display: none }
	html.yar .px { margin-left: 0 }
	html.yar .yar-acts { margin-inline-start: 0 }

	html.yar .aibar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 54; height: 52px; min-width: 0; max-width: none; margin: 0; padding: 0 6px 0 8px; gap: 6px; box-shadow: 0 0 0 10px var(--bg) }
	html.yar .aibar .ai-k, html.yar .aibar .ai-f small { display: none }
	html.yar .aibar .ai-lg { width: 36px; height: 36px }
	html.yar .aibar .ai-lg .bym { width: 34px; height: 34px }
	html.yar .aibar .ai-f input { font-size: 16px }
	html.yar .aibar .ai-sug { top: auto; bottom: calc(100% + 8px); max-height: 50dvh; overflow-y: auto }
	/* گفتگو باز است: ورودی خود گفتگو کافی است */
	html.yar.yar-chat .aibar { display: none }

	html.yar .chartbox { height: calc(100dvh - 198px - env(safe-area-inset-bottom)) }
	html.yar body { padding-bottom: calc(132px + env(safe-area-inset-bottom)) }
	html.yar .toast { bottom: calc(132px + env(safe-area-inset-bottom)) }

	html.yar .bnav { grid-template-columns: repeat(4, 1fr) }
	html.yar .bnav button { font-size: 12px; gap: 4px }
	html.yar .bnav button svg { width: 22px; height: 22px }

	/* برگه‌ها بالای نوار پایین می‌نشینند تا «چارت · بازار · ابزارها · من» همیشه دم دست بماند (طرح: z-nav بالای Sheet) */
	html.yar .cdrop, html.yar .exd, html.yar .picker, html.yar .tray, html.yar .icard { max-width: none !important; bottom: calc(60px + env(safe-area-inset-bottom)) !important; max-height: calc(100dvh - 140px - env(safe-area-inset-bottom)); padding-bottom: 8px }
	html.yar .dock { bottom: calc(60px + env(safe-area-inset-bottom)); height: min(calc(100dvh - 130px - env(safe-area-inset-bottom)), 720px); padding-bottom: 0 }
	html.yar .dock:not(.open) { transform: translateY(calc(100% + 90px)) }
	html.yar .tray-note { display: none }
	/* بازار: زبانه‌ی «بیت‌یار» لازم نیست (نوار پرسش همیشه هست)؛ در گفتگو ردیف زبانه‌ها هم نه */
	html.yar .dtabs [data-dtab="by"] { display: none }
	html.yar.yar-chat .dtabs { display: none }
	html.yar .yar-me { bottom: calc(60px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 140px); padding-bottom: 12px }
	html.yar .yar-scrim { z-index: 69 }
	/* برگه‌ی حساب (منوی خود صفحه) هم از پایین می‌آید */
	html.yar .acc-m { top: auto !important; left: 0 !important; right: 0 !important; bottom: calc(60px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: calc(100dvh - 140px); overflow-y: auto; border-radius: 18px 18px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9000 }

	/* مینی‌اپ تلگرام: چیدمان ستونی خودش؛ فقط جای نوار پرسش */
	html.yar.in-tg .chartbox { height: auto }
	html.yar.in-tg body { padding-bottom: calc(124px + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom))) }
	html.yar.in-tg .wrap { padding-bottom: 64px }
}

@media (prefers-reduced-motion: reduce) {
	.yar-sw, .yar-sw::before { transition: none }
}

/* ================= مرحله‌ی ۲ (html.yar2): یک نوار بالا، ستون کناری سه‌زبانه، گفتگو و بازار جمع‌وجور ================= */
.yar-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important }

/* کنترل زبانه‌ای Yar */
.yar-seg { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2) }
.yar-seg > button { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--sub); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer }
.yar-seg > button:hover { color: var(--txt) }
.yar-seg > button[aria-selected="true"], .yar-seg > button[aria-checked="true"] { background: var(--card); color: var(--txt); font-weight: 600; box-shadow: 0 0 0 1px var(--line2) }
.yar-me .yar-seg { margin-block: 0 8px; margin-inline: 48px 4px }
.yar-mi--set { cursor: default }
.yar-mi--set:hover { background: none }

/* نوار بالا: اعتبار و حساب کنار «بیشتر» */
html.yar2 .yar-acts .tb-cr { height: 34px; padding: 0 12px 0 10px; gap: 5px }
html.yar2 .yar-acts .tb-cr small { display: inline }
html.yar2 .yar-acts .tb-nm { margin: 0 }

/* ستون کناری */
.yar-rtabs { display: none }
html.yar2 .yar-rtabs { display: flex; flex: none; margin: 10px 10px 0 }
html.yar2 .dock { border-color: var(--line); border-radius: 14px }
/* زبانه‌های بازار: یک ردیف چیپ (فرصت‌ها · نقاط داغ · اسکنرها · نبض) */
html.yar2 #dtabs { gap: 5px; padding: 10px 10px 2px; background: none; border: 0; border-radius: 0; overflow: hidden; justify-content: flex-start }
html.yar2 #dtabs::-webkit-scrollbar { display: none }
html.yar2 #dtabs .dt-ind, html.yar2 #dtabs [data-dtab="by"], html.yar2 #dtabs .dt-min { display: none !important }
html.yar2 #dtabs > button { flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--txt); font-size: 13px; font-weight: 500; gap: 5px }
html.yar2 #dtabs > button:hover { background: var(--card2) }
html.yar2 #dtabs > button.on { background: var(--pri-bg); border-color: var(--pri); color: var(--pri-ink); font-weight: 600 }
html.yar2 #dtabs > button svg, html.yar2 #dtabs .yar-pulse svg { display: none }
html.yar2 #dtabs > button.on svg { color: var(--pri-ink) }
html.yar2 #dtabs .dt-n { background: none; color: inherit; min-width: 0; padding: 0; font-size: 12px }
html.yar2 .dsub { border-bottom: 0; padding: 8px 10px 6px }
html.yar2 .dbody { padding: 8px 10px 10px }
/* گفتگو باز است: ردیف چیپ بازار نه */
html.yar2.yar-railby #dtabs { display: none }

@media (min-width: 981px) {
	html.yar2 .tb, html.yar2 .tbar { display: none }
	html.yar2 .symbar { padding: 10px 20px; gap: 14px; border-bottom: 1px solid var(--line); background: var(--card) }
	html.yar2 .chartbox { height: calc(100vh - 104px); min-height: 520px }
	html.yar2 .dock { height: calc(100vh - 104px); min-height: 520px }
	html.yar2 .yar-more { display: inline-flex }
	/* زبانه‌ی «ابزارها»: همان پنل ابزارها داخل ستون */
	html.yar2 .dock.yar-tools > :not(.yar-rtabs):not(.tray) { display: none !important }
	html.yar2 .dock > .tray { position: static !important; top: auto; left: auto; width: auto !important; max-height: none; flex: 1 1 auto; min-height: 0; margin-top: 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; animation: none }
	html.yar2 .dock > .tray .tray-h .icon-btn { display: none }
	html.yar2 .dock > .tray .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px }
	/* ستون باریک: دسته‌ها چیپ (طرح ۵٫۳)، بی بریده شدن، تا فهرست خود ابزارها از اول دیده شود */
	html.yar2 .dock > .tray .cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px }
	html.yar2 .dock > .tray .cats::-webkit-scrollbar { display: none }
	html.yar2 .dock > .tray .cat { flex: none; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; box-shadow: none }
	html.yar2 .dock > .tray .cat.on { box-shadow: inset 0 0 0 1px var(--c) }
	html.yar2 .dock > .tray .cat .ci { width: 20px; height: 20px; border-radius: 6px; background: none }
	html.yar2 .dock > .tray .cat .ci svg { width: 16px; height: 16px }
	html.yar2 .dock > .tray .cat .cn b { font-size: 13px; line-height: 1.3; white-space: nowrap }
	html.yar2 .dock > .tray .cat .cn small { display: none }
	/* کل پنل یک‌جا اسکرول می‌شود؛ «ترکیب‌های آماده» پایین فهرست، نه چسبیده به ته ستون */
	html.yar2 .dock > .tray { overflow-y: auto; overscroll-behavior: contain }
	html.yar2 .dock > .tray .tray-b { flex: none; overflow: visible }
	html.yar2 .dock > .tray .tray-h { position: sticky; top: 0; z-index: 2; background: var(--card) }
	html.yar2 .dock > .tray .tray-note { display: none }
	html.yar2 .dock > .tray .cards { grid-template-columns: 1fr }
}

/* گوشی: زبانه‌های بازار همان چیپ‌ها؛ برگه‌ی بازار بی دستگیره‌ی دوم */
@media (max-width: 980px) {
	html.yar2 .yar-rtabs { display: none }
	html.yar2 #dtabs { padding-top: 16px }
	html.yar2 .yar-acts .tb-cr small { display: none }
	html.yar2 .yar-acts .tb-cr { height: 32px; padding: 0 10px }
}

/* ---------- گفتگو ---------- */
/* سربرگ گفتگو یک ردیف باریک (طرح ۵٫۶) */
html.yar2 .by-h { padding: 8px 12px; gap: 8px; background: var(--card) }
html.yar2 .by-h .by-stage { width: 36px; height: 36px; padding: 2px; border-radius: 50% }
html.yar2 .by-h .by-stage .bym { width: 32px; height: 32px }
html.yar2 .by-h .by-nm > b { font-size: 14px; font-weight: 700 }
html.yar2 .by-h .tx { gap: 2px }
html.yar2 .by-h .by-tools { border: 0; box-shadow: none; background: none; padding: 0 }
/* شروع گفتگو: ماسکوت کوچک، چهار کار اصلی، چند نمونه پرسش */
html.yar2 .by-hi { align-items: stretch; text-align: start; gap: 8px; margin: 0; padding: 8px 2px }
html.yar2 .by-hi-lg, html.yar2 .by-hi-lg .bym { width: 56px; height: 54px }
html.yar2 .by-hi-lg { align-self: flex-start }
html.yar2 .by-hi > b { font-size: 16px; line-height: 1.6 }
html.yar2 .by-hi > span { max-width: none; font-size: 13px }
.yar-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px }
.yar-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); color: var(--txt); font: inherit; text-align: start; cursor: pointer }
.yar-tile:hover { border-color: var(--pri); background: var(--pri-bg) }
.yar-tile svg { width: 20px; height: 20px; margin-bottom: 4px; color: #2F80ED }
.yar-tile--pri svg { color: var(--pri-ink) }
.yar-tile--pred svg { color: #8B5CF6 }
.yar-tile--mm svg { color: #0EA5E9 }
.yar-tile b { font-size: 14px; font-weight: 600; line-height: 1.5 }
.yar-tile small { font-size: 12px; color: var(--sub); line-height: 1.5 }
.yar-exh { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--sub) }
html.yar2 .by-hi .by-ex { margin-top: 0 }
html.yar2 .by-ex button, html.yar2 .by-chips button { min-height: 40px; background: var(--card) }
/* پیام‌ها */
html.yar2 .by-me { background: var(--card2); border: 1px solid var(--line) }
html.yar .by-ans > li.yar-hide { display: none }
/* «در حال فکر کردن»: یک خط، بی فهرست قدم‌ها (طرح ۲٫۲) */
html.yar2 .by-th:not(.done) ol { display: none }
/* کامپوزر */
html.yar2 .by-in { border-radius: 999px; background: var(--card) }
html.yar2 .by-go { background: var(--txt); color: var(--card) }

/* ---------- بازار ---------- */
html.yar2 .opp { border-radius: 14px }
html.yar2 .seg2 { border-radius: 10px }
html.yar2 .seg2 button { min-height: 32px; font-size: 13px }
.yar-pulse { flex: 1 1 auto; justify-content: center; min-width: 0; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--txt); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap }
.yar-pulse:hover { background: var(--card2) }
.yar-pulse svg { width: 15px; height: 15px; color: var(--pri-ink) }

/* دسکتاپ: اسکنر پیشرفته و نبض در قاب نمودار (yar.js: inPane) */
@media (min-width: 981px) {
	html.yar2 .scr.yar-inpane { position: fixed; inset: auto; padding: 0; background: none; place-items: stretch; z-index: 50 }
	html.yar2 .scr.yar-inpane .scr-in { width: 100%; height: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 12px 32px -18px rgba(16, 24, 40, .35) }
	html.yar2 .bp.yar-inpane { position: fixed; inset: auto; z-index: 50; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 32px -18px rgba(16, 24, 40, .45) }
}

/* ستون کناری جمع‌شدنی (کشویی): دستگیره‌ی لبه‌ی قاب نمودار؛ جمع که شد نمودار، نبض و اسکنر پیشرفته کل پهنا را می‌گیرند */
.yar-railx { display: none }
@media (min-width: 981px) {
	html.yar2 .stage { position: relative }
	html.yar2 .yar-railx { display: grid; place-items: center; position: absolute; z-index: 60; top: 50%; inset-inline-start: -16px; width: 22px; height: 64px; margin-top: -32px; padding: 0; border: 1px solid var(--line2); border-radius: 999px; background: var(--card); color: var(--sub); box-shadow: 0 4px 12px -4px rgba(16, 24, 40, .22); cursor: pointer }
	html.yar2 .yar-railx:hover { color: var(--txt); border-color: var(--edge, var(--line2)) }
	html.yar2 .yar-railx:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px }
	html.yar2 .yar-railx svg { width: 16px; height: 16px; transition: transform .15s }
	html.yar2.yar-railoff:not(.pfs) .wrap { display: block }
	html.yar2.yar-railoff:not(.pfs) .dock { display: none }
	html.yar2.yar-railoff .yar-railx { inset-inline-start: 4px }
	html.yar2.yar-railoff .yar-railx svg { transform: scaleX(-1) }
}
@media (min-width: 981px) {
	html[dir="ltr"].yar2 .yar-railx svg { transform: scaleX(-1) }
	html[dir="ltr"].yar2.yar-railoff .yar-railx svg { transform: none }
}

/* اسکنرها: «بیت‌یار بگرده · اسکنر پیشرفته · الگوهای داغ» در ستون باریک کامل خوانده شوند (دو ردیف به‌جای بریده شدن) */
html.yar2 .chips.one.scr-act.fit { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; row-gap: 6px }
html.yar2 .chips.one.scr-act.fit > button { flex: 1 1 auto; min-width: 0; max-width: none; white-space: nowrap }
@media (min-width: 981px) {
	html.yar2 .yar-railx { inset-inline-start: -17px }
}

/* ---------- گوشی: صفحه هرگز به چپ و راست کشیده نشود (کاربر با عکس آیفون، ۲۶ آبان) ----------
 * دو چیز از عرض صفحه بیرون می‌زد: دو قاب گوشی بخش «بیت‌یار در تلگرام» پایین صفحه (۶۲vw + ۳۶vw + فاصله و حاشیه)،
 * و روی آیفون نوار بالا با فونت پهن‌تر. clip اسکرول افقی را می‌بندد بی آن‌که sticky و fixed خراب شوند. */
html.yar, html.yar body { overflow-x: hidden }
@supports (overflow-x: clip) { html.yar, html.yar body { overflow-x: clip } }
@media (max-width: 980px) {
	html.yar .tgp { overflow: hidden }
	html.yar .tgp-ph { max-width: 100%; overflow: hidden }
	html.yar .tgp-fr.chat { width: min(54vw, 300px) }
	html.yar .tgp-fr.app { width: min(30vw, 190px) }
	/* نوار بالا در هر عرضی جا شود: نام نماد کوتاه می‌شود، قیمت و اعتبار کامل می‌مانند */
	html.yar .symbar { max-width: 100vw; min-width: 0 }
	html.yar .symbar > * { min-width: 0 }
	html.yar .symbar .px, html.yar .symbar .yar-acts, html.yar .symbar .exb { flex: none }
}
@media (max-width: 400px) {
	html.yar .symbar { gap: 5px; padding: 8px 8px }
	html.yar .symbar .exb { width: 38px; padding: 0; justify-content: center }
	html.yar .symbar .sym .logo { width: 32px; height: 32px }
	html.yar .symbar .sym .logo img { width: 26px; height: 26px }
	html.yar .symbar .sym .nm b { font-size: 14px }
	html.yar .symbar .px b { font-size: 15px }
	html.yar .symbar .px small { font-size: 11px }
	html.yar .symbar .tb-cr { padding: 0 8px }
}


/* ---------- حالت پیشرفته‌ی تمام‌صفحه (pro.css، html.pfs) با طرح Yar (کاربر با عکس، ۲۶ آبان: «روی فول اسکرین می‌زنم ببین چطوری می‌شود») ----------
 * چیدمان تمام‌صفحه شبکه‌ی سه‌ستونه‌ی خود pro.css است (ستون آیکن | پنل | نمودار). قاعده‌های دسکتاپ Yar (ارتفاع ثابت قاب‌ها،
 * ستون جمع‌شده با display:block و دستگیره‌ی لبه) آن شبکه را می‌شکستند و ستون آیکن تمام‌عرض بالای نمودار می‌افتاد.
 * این‌جا جمع و باز کردن پنل همان دکمه‌ی ستون آیکن pro است؛ «ابزارها» هم دکمه‌ای در همان ستون (yar.js: proTools). */
@media (min-width: 981px) {
	html.yar2.pfs .yar-railx, html.yar2.pfs .yar-rtabs { display: none !important }
	html.yar2.pfs .chartbox, html.yar2.pfs .dock { height: auto; min-height: 0 }
	html.yar2.pfs .symbar { padding: 6px 10px; gap: 14px }
	html.yar2.pfs .dock > .tray { margin-top: 0; border-top: 0 }
	/* «ابزارها» روشن است: زبانه‌ی بازار ستون دیگر روشن دیده نشود */
	html.yar2.pfs .prail.yar-pt-on button.on:not(.yar-pt):not(.tog) { background: none; color: var(--sub); font-weight: 400 }
	html.yar2.pfs .prail.yar-pt-on button.on:not(.yar-pt):not(.tog) svg.i { color: inherit }
}
