/**
 * استودیوی استراتژی بیتفا — ویرایشگر بلوکی تمام‌صفحه.
 *
 * رنگ فقط برای معنا: زمینه‌ها تیره و آرام‌اند و هر دسته یک رنگ تأکیدی دارد که
 * فقط روی آیکون کوچک و لبه‌ی بلوک می‌نشیند. خروجی‌ها: سبز «بله»، قرمز «خیر»،
 * طلایی «ادامه». چیدمان چپ‌به‌راست است (نوار بلوک‌ها سمت چپ) و متن راست‌چین.
 * فونت DanaFaNum سایت است و رقم‌ها را فارسی نشان می‌دهد.
 */
.bitfa-stu-page { background: #0a0e17; overflow: hidden; }
.bitfa-stu-page .floating-cta { display: none !important; }
/* نوار مدیریت وردپرس (برای ادمین‌ها) نباید نوار ابزار استودیو را بپوشاند. */
.admin-bar .stu { top: 32px; }
@media (max-width: 782px) { .admin-bar .stu { top: 46px; } }

.stu {
	--bg: #0a0e17;
	--bar: #0d1320;
	--panel: #111a2b;
	--panel2: #162238;
	--card: #131c2e;
	--line: #1c273b;
	--line2: #2a3a55;
	--ink: #e8ecf4;
	--dim: #a3adc2;
	--faint: #6b7690;
	--gold: #f7a01d;
	--yes: #2fd792;
	--no: #ff6472;
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font-family: DanaFaNum, dana, Tahoma, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	direction: ltr;
}
.stu *, .stu *::before, .stu *::after { box-sizing: border-box; }
.stu .rtl { direction: rtl; }
.stu button, .stu input, .stu select, .stu textarea { font: inherit; color: inherit; }
.stu button:focus-visible, .stu input:focus-visible, .stu select:focus-visible, .stu textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.stu svg { flex: none; }
.stu .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- نوار بالا */
.stu-top {
	flex: none;
	height: 54px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	background: var(--bar);
	border-bottom: 1px solid var(--line);
}
.stu-logo { flex: none; }
.stu-logo img { height: 19px; width: auto; display: block; }
.stu-brand { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 4px; margin-right: 2px; border-left: 1px solid var(--line2); height: 30px; }
.stu-brand svg { width: 18px; height: 18px; fill: var(--gold); }
.stu-brand b { display: block; font-size: 15px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.stu-brand small { display: block; font-size: 10.5px; line-height: 1.2; color: var(--faint); }
.stu-name {
	flex: 0 1 220px;
	min-width: 70px;
	height: 34px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 9px;
	padding: 0 10px;
	font-weight: 700;
	font-size: 15px;
}
.stu-name:hover, .stu-name:focus { border-color: var(--line2); background: var(--panel); }
.stu-plat { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.stu-plat select, .stu-f select, .stu-f input, .stu-f textarea {
	height: 36px;
	background: var(--bg);
	border: 1px solid var(--line2);
	border-radius: 9px;
	padding: 0 10px;
	color: var(--ink);
}
.stu-sp { flex: 1; }
.stu-tb {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 34px;
	padding: 0 12px;
	background: transparent;
	border: 1px solid var(--line2);
	border-radius: 9px;
	font-size: 13px;
	color: var(--dim);
	cursor: pointer;
	white-space: nowrap;
}
.stu-tb:hover { color: var(--ink); background: var(--panel); }
.stu-tb.ic { width: 34px; padding: 0; justify-content: center; }
.stu-tb svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stu-tb.gold { background: var(--gold); border-color: var(--gold); color: #1a1100; font-weight: 700; }
.stu-tb.gold svg { fill: #1a1100; stroke: none; width: 15px; height: 15px; }
.stu-tb.gold:hover { background: #ffb23d; }
.stu-tb[disabled] { opacity: .35; cursor: default; }
.stu-tb .sm, .only-m { display: none; }
.stu-menu {
	position: absolute;
	top: 58px;
	left: 8px;
	z-index: 60;
	min-width: 210px;
	background: var(--panel);
	border: 1px solid var(--line2);
	border-radius: 12px;
	padding: 6px;
	box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
}
.stu-menu button { display: block; width: 100%; text-align: right; background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; font-size: 14px; cursor: pointer; }
.stu-menu button:hover { background: var(--panel2); }
.stu-menu__row { display: flex; gap: 4px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.stu-menu__row button { text-align: center; }

/* ---------------- بدنه */
.stu-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 276px minmax(0, 1fr); }
.stu-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stu-scrim { display: none; }

/* ---------------- نوار بلوک‌ها */
.stu-side { background: var(--bar); border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: #2a3a55 transparent; }
.pal-top { padding: 12px 12px 8px; }
.pal-top b { display: block; font-size: 14px; }
.pal-top small { display: block; font-size: 12px; color: var(--faint); line-height: 1.6; }
.pal-search { position: relative; padding: 0 12px 10px; }
.pal-search input {
	width: 100%;
	height: 36px;
	background: var(--bg);
	border: 1px solid var(--line2);
	border-radius: 10px;
	padding: 0 34px 0 10px;
	font-size: 13.5px;
}
.pal-search svg { position: absolute; right: 22px; top: 10px; width: 16px; height: 16px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 1.8; }
.pal-group { font-size: 11.5px; color: var(--faint); padding: 10px 14px 4px; letter-spacing: 0; }
.pal-row {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 12px;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 600;
	text-align: right;
	cursor: pointer;
}
.pal-row:hover { background: #101827; }
.pal-row[aria-expanded="true"] { background: #0f1726; }
.pal-chip {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	color: var(--c);
	background: rgba(255, 255, 255, .05);
	background: color-mix(in srgb, var(--c) 16%, transparent);
}
.pal-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pal-row .n { margin-right: auto; font-size: 11px; font-weight: 700; color: var(--faint); background: var(--panel); border-radius: 999px; padding: 0 8px; }
.pal-row .chev { width: 14px; height: 14px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.pal-row[aria-expanded="true"] .chev { transform: rotate(180deg); }
.pal-items { padding: 2px 12px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pal-it {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	width: 100%;
	text-align: right;
	background: var(--card);
	border: 1px solid #22304a;
	border-radius: 10px;
	padding: 8px 10px;
	cursor: grab;
	user-select: none;
}
.pal-it:hover { border-color: var(--c); background: #152036; }
.pal-it:active { cursor: grabbing; }
.pal-it .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-top: 8px; flex: none; }
.pal-it .tx { min-width: 0; }
.pal-it b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.pal-it small { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.55; }
.pal-it.unsup { opacity: .45; }
.pal-list { padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pal-list .m { font-size: 11.5px; color: var(--faint); line-height: 1.6; }
.pal-kv { display: grid; grid-template-columns: minmax(0, 1fr) 72px 30px; gap: 4px; align-items: center; }
.pal-kv input { height: 30px; min-width: 0; background: var(--bg); border: 1px solid var(--line2); border-radius: 7px; padding: 0 8px; font-size: 12.5px; }
.pal-kv button, .pal-add { height: 30px; border: 1px solid var(--line2); background: transparent; border-radius: 7px; cursor: pointer; color: var(--dim); }
.pal-add { width: 100%; font-size: 12.5px; }
.pal-none { padding: 12px 14px; font-size: 13px; color: var(--faint); }
.pal-ghost {
	position: fixed;
	z-index: 200;
	pointer-events: none;
	padding: 8px 14px;
	border-radius: 10px;
	background: #131c2e;
	border: 1px solid var(--c);
	border-right: 3px solid var(--c);
	color: #e8ecf4;
	font-family: DanaFaNum, dana, Tahoma, sans-serif;
	font-weight: 700;
	font-size: 13px;
	direction: rtl;
	transform: translate(-50%, -50%);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}

/* جعبه‌ابزار: نماها، برچسب‌ها و ترکیب‌های آماده */
.pal-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 12px 10px; padding: 4px; background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; }
.pal-seg button { display: flex; align-items: center; justify-content: center; gap: 5px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pal-seg button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pal-seg button[aria-selected="true"] { background: var(--panel2); color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--gold); }
.pal-chip.sm { width: 24px; height: 24px; border-radius: 7px; margin-top: 1px; }
.pal-chip.sm svg { width: 13px; height: 13px; }
.pal-it .grip { width: 14px; height: 14px; margin-right: auto; margin-top: 5px; color: var(--faint); fill: currentColor; stroke: none; opacity: 0; transition: opacity .15s; }
.pal-it:hover .grip { opacity: .8; }
.tg { display: inline-block; font-style: normal; font-size: 10px; font-weight: 700; line-height: 1.7; padding: 0 6px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.tg.pop { color: #9fd9ff; background: rgba(56, 189, 248, .12); }
.tg.bf { color: var(--gold); background: rgba(247, 160, 29, .14); }
.pal-rc {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 10px;
	margin: 0 12px 8px;
	padding: 10px 12px;
	background: var(--card);
	border: 1px solid #22304a;
	border-radius: 12px;
	cursor: grab;
	user-select: none;
}
.pal-rc:hover { border-color: rgba(247, 160, 29, .55); background: #152036; }
.pal-rc.unsup { opacity: .55; }
.rc-prev { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.rc-prev span { width: 14px; height: 9px; border-radius: 4px; background: var(--c); }
.rc-prev i { width: 2px; height: 7px; background: #3a4a66; }
.rc-tx b { display: block; font-size: 13.5px; }
.rc-tx small { display: block; font-size: 12px; color: var(--dim); line-height: 1.7; margin-top: 2px; }
.rc-m { display: block; font-size: 11px; color: var(--faint); margin-top: 4px; }
.rc-add { grid-column: 2; justify-self: start; height: 30px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(247, 160, 29, .5); background: rgba(247, 160, 29, .08); color: var(--gold); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rc-add:hover { background: rgba(247, 160, 29, .16); }

/* ---------------- تب رویدادها */
.stu-tabs { flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 0 10px; background: var(--bar); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stu-tabs::-webkit-scrollbar { display: none; }
.stu-tab {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 12px 9px;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--dim);
	font-size: 13.5px;
	cursor: pointer;
	white-space: nowrap;
}
.stu-tab:hover { color: var(--ink); }
.stu-tab.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); }
.stu-tab svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stu-tab .c { font-size: 11px; font-weight: 700; color: var(--faint); background: var(--panel); border-radius: 999px; padding: 0 7px; }
.stu-tab.on .c { color: var(--gold); background: rgba(247, 160, 29, .12); }
.stu-tab .main { font-size: 10.5px; font-weight: 700; color: var(--gold); border: 1px solid rgba(247, 160, 29, .45); border-radius: 999px; padding: 0 6px; line-height: 1.6; }
.stu-tabinfo {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	background: #0b111c;
	border-bottom: 1px solid var(--line);
	font-size: 12.5px;
	color: var(--dim);
	line-height: 1.7;
}
.stu-tabinfo svg { width: 15px; height: 15px; color: var(--gold); fill: none; stroke: currentColor; stroke-width: 1.8; }
.stu-tabinfo b { color: var(--ink); font-weight: 700; margin-left: 4px; }

/* ---------------- بوم */
.stu-canvas {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow: hidden;
	background-color: #0b111d;
	background-image: radial-gradient(rgba(148, 163, 200, .16) 1px, transparent 1.5px);
	background-size: 22px 22px;
	cursor: grab;
	touch-action: none;
}
.stu-canvas.panning { cursor: grabbing; }
.stu-canvas.linking { cursor: crosshair; }
.stu-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.stu-links { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.lk { fill: none; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; opacity: .9; }
.lk.sel { stroke-width: 3.6; opacity: 1; }
.lk-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; pointer-events: stroke; }
.lk-tmp { fill: none; stroke-width: 2.2; stroke-dasharray: 6 5; pointer-events: none; }
.lk-del {
	position: absolute;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border-radius: 50%;
	border: 2px solid #0b111d;
	background: var(--no);
	color: #fff;
	font-size: 15px;
	line-height: 20px;
	cursor: pointer;
	padding: 0;
}

.node {
	position: absolute;
	min-width: 170px;
	max-width: 272px;
	padding: 9px 12px 21px;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid #26344d;
	border-right: 3px solid var(--c);
	color: var(--ink);
	cursor: move;
	user-select: none;
	direction: rtl;
	box-shadow: 0 8px 18px rgba(0, 0, 0, .32);
	touch-action: none;
}
.node .hd { display: flex; align-items: center; gap: 8px; }
.node .ic {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--c);
	background: rgba(255, 255, 255, .05);
	background: color-mix(in srgb, var(--c) 16%, transparent);
}
.node .ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.node .nt { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.node .nb { margin-right: auto; padding-right: 10px; font-size: 11px; color: var(--faint); }
.node .ns { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; margin-top: 4px; }
.node .pl { position: absolute; bottom: 3px; font-size: 10.5px; font-weight: 700; transform: translateX(-50%); line-height: 1; pointer-events: none; }
.node .pl.yes { left: 38%; color: var(--yes); }
.node .pl.no { left: 62%; color: var(--no); }
.node.sel { border-color: var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 10px 22px rgba(0, 0, 0, .4); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 32%, transparent), 0 10px 22px rgba(0, 0, 0, .4); }
.node.unsup { border-style: dashed; border-color: var(--no); }
.node.pend { box-shadow: 0 0 0 3px rgba(247, 160, 29, .45); }
.node.pop { animation: stu-pop .3s ease-out; }
@keyframes stu-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.port { position: absolute; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.port::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--pc); border: 2px solid #0b111d; box-sizing: content-box; }
.port.in { top: -9px; left: calc(50% - 9px); --pc: #7d8aa6; }
.port.out { bottom: -9px; cursor: crosshair; }
.port.out:hover::after, .port.out.on::after { transform: scale(1.3); }
.port.yes { left: calc(38% - 9px); --pc: var(--yes); }
.port.no { left: calc(62% - 9px); --pc: var(--no); }
.port.next { left: calc(50% - 9px); --pc: var(--gold); }
@media (pointer: coarse) {
	.port { width: 30px; height: 30px; }
	.port.in { top: -15px; left: calc(50% - 15px); }
	.port.out { bottom: -15px; }
	.port.yes { left: calc(38% - 15px); }
	.port.no { left: calc(62% - 15px); }
	.port.next { left: calc(50% - 15px); }
}
@media (prefers-reduced-motion: reduce) { .node.pop { animation: none; } }

.stu-empty {
	position: absolute;
	left: 50%;
	top: 44%;
	transform: translate(-50%, -50%);
	width: min(380px, calc(100% - 40px));
	text-align: center;
	color: var(--dim);
	font-size: 13.5px;
	pointer-events: none;
}
.stu-empty b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.stu-empty ol { text-align: right; margin: 10px 0 0; padding: 0 20px 0 0; line-height: 2; }
.stu-pend {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	max-width: calc(100% - 24px);
	background: #2a1c06;
	border: 1px solid rgba(247, 160, 29, .5);
	color: #ffd38a;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	z-index: 15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.stu-zoom { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.stu-zoom button {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--panel);
	border: 1px solid var(--line2);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--dim);
}
.stu-zoom button:hover { color: var(--ink); }
.stu-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.stu-orb {
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	background: #120d06;
	border: 2px solid var(--gold);
	color: var(--gold);
	font-weight: 700;
	font-size: 12px;
	cursor: pointer;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	padding: 0;
	box-shadow: 0 0 0 6px rgba(247, 160, 29, .08), 0 10px 24px rgba(0, 0, 0, .45);
}
.stu-orb svg { width: 20px; height: 20px; fill: var(--gold); }
.dr-crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.dr-crew span { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; }
.dr-crew svg { width: 28px; height: 28px; }
.dr-crew b { font-size: 12.5px; }
.dr-crew small { font-size: 10.5px; color: var(--faint); line-height: 1.5; }
@media (prefers-reduced-motion: no-preference) {
	.stu-orb { animation: stu-orb 2.8s ease-in-out infinite; }
}
@keyframes stu-orb { 50% { box-shadow: 0 0 0 11px rgba(247, 160, 29, .03), 0 10px 24px rgba(0, 0, 0, .45); } }

/* ---------------- کشو (هوش مصنوعی، الگوها، بک‌تست، خروجی) */
.stu-drawer {
	position: absolute;
	top: 12px;
	right: 12px;
	bottom: 92px;
	width: min(390px, calc(100% - 24px));
	background: rgba(17, 26, 43, .98);
	border: 1px solid var(--line2);
	border-radius: 16px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
	overflow-y: auto;
	padding: 14px 16px;
	z-index: 20;
	cursor: default;
}
.dr-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dr-h b { font-size: 16px; }
.dr-x { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; cursor: pointer; font-size: 16px; color: var(--dim); }
.dr-p { color: var(--dim); font-size: 13px; margin: 0 0 10px; }
.dr-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.dr-card b { display: block; font-size: 14px; }
.dr-card .m { font-size: 12.5px; color: var(--dim); line-height: 1.8; }
.dr-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.dr-btn { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-size: 13px; }
.dr-btn.gold { background: var(--gold); border-color: var(--gold); color: #1a1100; font-weight: 700; }
.dr-btn.danger { border-color: var(--no); color: var(--no); background: transparent; }
.dr-btn[disabled] { opacity: .45; cursor: default; }
.dr-ta { width: 100%; min-height: 110px; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; font-size: 14px; resize: vertical; line-height: 1.85; }
.dr-err { color: var(--no); font-size: 12.5px; margin-top: 4px; }
.dr-cost { font-size: 12.5px; color: var(--dim); }
.dr-tag { display: inline-block; font-size: 11px; padding: 0 8px; border-radius: 999px; background: rgba(247, 160, 29, .14); color: var(--gold); }
.dr-tag.ok { background: rgba(47, 215, 146, .12); color: var(--yes); }
.dr-uni { display: block; width: 100%; height: auto; margin: 6px 0; }
.dr-log { font-size: 12.5px; line-height: 1.9; min-height: 40px; }
.dr-log .w { color: var(--gold); font-weight: 700; }
.dr-log .t { color: var(--dim); }
.ag circle { transition: stroke .25s; }
@media (prefers-reduced-motion: no-preference) {
	.ag.w circle { animation: stu-pulse .9s ease-in-out infinite; }
	.bm.w { animation: stu-dash .8s linear infinite; }
}
@keyframes stu-pulse { 50% { opacity: .35; } }
@keyframes stu-dash { to { stroke-dashoffset: -14; } }

/* ---------------- پنجره‌ی تنظیمات بلوک: فقط با دوبار کلیک، کنار همان بلوک روی بوم */
.stu-props {
	position: absolute;
	z-index: 30;
	top: 60px;
	left: 300px;
	width: 352px;
	max-height: calc(100% - 56px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #0f1727;
	border: 1px solid var(--line2);
	border-radius: 14px;
	box-shadow: 0 22px 54px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .02);
	padding: 0 14px;
	scrollbar-width: thin;
	scrollbar-color: #2a3a55 transparent;
}
.stu-props[hidden] { display: none !important; }
.pp-h {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 -14px 12px;
	padding: 10px 14px;
	background: #0f1727;
	border-top: 3px solid var(--c, var(--gold));
	border-bottom: 1px solid var(--line);
	border-radius: 13px 13px 0 0;
	cursor: move;
	user-select: none;
}
.pp-h b { font-size: 15px; }
.pp-h small { display: block; font-size: 11.5px; color: var(--faint); }
.pp-close { display: inline-flex; align-items: center; justify-content: center; flex: none; margin-right: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; color: var(--dim); cursor: pointer; font-size: 18px; }
.pp-close:hover { color: var(--ink); border-color: var(--dim); }
.pp-help { font-size: 12.5px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; line-height: 1.85; }
.pp-outs { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.pp-outs span { font-size: 12px; border-radius: 999px; padding: 1px 10px; background: var(--panel); color: var(--dim); }
.pp-outs i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.stu-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12.5px; color: var(--dim); }
.stu-f input, .stu-f select, .stu-f textarea { width: 100%; font-size: 14px; color: var(--ink); }
.stu-f textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.pp-acts { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 6px; margin: 12px -14px 0; padding: 10px 14px 12px; background: #0f1727; border-top: 1px solid var(--line); }
.pp-acts button { flex: 1; height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-size: 13px; }
.pp-acts .ok { background: var(--gold); border-color: var(--gold); color: #1a1100; font-weight: 700; }
.pp-acts .del { border-color: rgba(255, 100, 114, .45); color: var(--no); background: transparent; }
.pp-sec { font-weight: 700; font-size: 13.5px; margin: 16px 0 6px; color: var(--ink); }
.pp-tips { margin: 0; padding: 0 18px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.95; }
.pp-port { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin: 0 2px; }
.pp-warn { font-size: 12.5px; color: #ffb3ba; background: rgba(255, 100, 114, .1); border-radius: 9px; padding: 7px 10px; margin-bottom: 10px; }
.pp-ev { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pp-ev div { font-size: 12.5px; color: var(--dim); background: var(--panel); border-radius: 9px; padding: 7px 10px; line-height: 1.8; }
.pp-ev b { color: var(--ink); }

/* ---------------- نوار وضعیت */
.stu-status {
	flex: none;
	display: flex;
	align-items: center;
	gap: 14px;
	height: 34px;
	padding: 0 12px;
	background: var(--bar);
	border-top: 1px solid var(--line);
	font-size: 12.5px;
	color: var(--faint);
	overflow: hidden;
	white-space: nowrap;
}
.stu-status .v { background: transparent; border: 0; padding: 0; cursor: pointer; color: #ffc46b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.stu-status .v.bad { color: #ff9aa3; }
.stu-status .ok { color: var(--yes); }
.stu-status .sv { margin-right: auto; }
.stu-nojs { padding: 40px; text-align: center; direction: rtl; }

/* ---------------- تبلت و موبایل */
@media (max-width: 1180px) {
	.stu-body { grid-template-columns: 250px minmax(0, 1fr); }
	.stu-tb.dsk span { display: none; }
	.stu-tb.dsk { width: 34px; padding: 0; justify-content: center; }
}
@media (max-width: 980px) {
	.only-m { display: inline-flex; }
	.dsk { display: none !important; }
	.stu-tb .lg { display: none; }
	.stu-tb .sm { display: inline; }
	.stu-top { gap: 5px; padding: 0 8px; }
	.stu-name { flex: 1 1 auto; font-size: 14px; }
	.stu-brand b { font-size: 14px; }
	.stu-body { grid-template-columns: minmax(0, 1fr); }
	.stu-side {
		position: absolute;
		z-index: 40;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(300px, 86vw);
		transform: translateX(-105%);
		transition: transform .22s ease;
		box-shadow: 12px 0 30px rgba(0, 0, 0, .45);
	}
	.stu-side.open { transform: none; }
	.stu-props {
		z-index: 40;
		left: 0 !important;
		right: 0;
		top: auto !important;
		bottom: 0;
		width: auto;
		max-height: 74%;
		border: 0;
		border-top: 1px solid var(--line2);
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -12px 30px rgba(0, 0, 0, .45);
	}
	.pp-h { cursor: default; border-radius: 17px 17px 0 0; }
	.stu-scrim { display: block; position: absolute; inset: 0; z-index: 35; background: rgba(4, 7, 13, .55); }
	.stu-scrim[hidden] { display: none; }
	.stu-tabinfo { font-size: 12px; padding: 6px 12px; }
	.stu-orb { width: 56px; height: 56px; right: 12px; bottom: 12px; font-size: 11px; }
	.stu-orb svg { width: 17px; height: 17px; }
	.stu-zoom { left: 10px; bottom: 10px; }
	.stu-drawer { top: 8px; right: 8px; bottom: 72px; width: calc(100% - 16px); }
	.stu-status { font-size: 12px; gap: 10px; }
	.stu-status .v { max-width: 62%; }
	.stu-status .sv { display: none; }
}
@media (max-width: 600px) {
	.hide-xs { display: none !important; }
	.stu-brand small { display: none; }
	.stu-brand { padding: 0 6px 0 2px; }
	.stu-logo img { height: 16px; }
	.stu-tb.only-m span { display: none; }
	#stu-side-btn { width: 34px; padding: 0; justify-content: center; }
}
@media (max-width: 420px) {
	.stu-logo { display: none; }
	.stu-brand { border-left: 0; padding-right: 0; }
	.stu-tb.gold { width: 34px; padding: 0; justify-content: center; }
	.stu-tb.gold .sm { display: none; }
}
@media (pointer: coarse) {
	.stu input, .stu select, .stu textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.stu-side, .stu-props { transition: none; }
}

/* ---------------- بلوک: دکمه‌ی حذف و حالت خاموش */
.node .nx {
	position: absolute;
	top: -11px;
	left: -11px;
	z-index: 2;
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid #0b111d;
	background: var(--no);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.node.sel .nx, .node:hover .nx { display: flex; }
.node.off { opacity: .45; filter: grayscale(.7); border-style: dashed; }
.node.off.sel { opacity: .75; }
@media (pointer: coarse) {
	.node .nx { width: 30px; height: 30px; top: -15px; left: -15px; font-size: 17px; }
	.node:hover .nx { display: none; }
	.node.sel .nx { display: flex; }
}
.stu-canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ---------------- منوی راست‌کلیک */
.stu-ctx {
	position: absolute;
	z-index: 30;
	min-width: 236px;
	padding: 6px;
	background: #131c2e;
	border: 1px solid var(--line2);
	border-radius: 12px;
	box-shadow: 0 16px 36px rgba(0, 0, 0, .55);
	cursor: default;
}
.stu-ctx button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ink);
	font-size: 13.5px;
	text-align: right;
	cursor: pointer;
}
.stu-ctx button:hover, .stu-ctx button:focus-visible { background: var(--panel2); outline: none; }
.stu-ctx svg { width: 16px; height: 16px; flex: none; color: var(--dim); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stu-ctx svg path[fill="currentColor"] { fill: var(--gold); }
.stu-ctx kbd { margin-right: auto; font-family: inherit; font-size: 11px; color: var(--faint); direction: ltr; }
.stu-ctx .danger, .stu-ctx .danger svg { color: var(--no); }
.stu-ctx [aria-disabled="true"] { opacity: .4; cursor: default; }
.stu-ctx [aria-disabled="true"]:hover { background: transparent; }
.stu-ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
@media (pointer: coarse) { .stu-ctx button { padding: 11px 12px; font-size: 14.5px; } }

/* ---------------- بیت‌یار: هوش مصنوعی ترید بیتفا */
.stu-drawer[hidden] { display: none !important; }
.stu-drawer.by-mode { top: 12px; bottom: 12px; width: min(500px, calc(100% - 24px)); padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #0e1524; }
.by { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.by-h { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.by-h b { display: block; font-size: 16px; font-weight: 800; }
.by-h small { display: block; font-size: 12px; color: var(--gold); }
.by-h .dr-x { margin-right: auto; }
.by-logo { width: 38px; height: 38px; border-radius: 12px; background: rgba(247, 160, 29, .12); display: flex; align-items: center; justify-content: center; flex: none; }
.by-logo .by-av { width: 21px; height: 21px; }
.by-av { width: 22px; height: 22px; flex: none; }
.by-av.soh { color: var(--gold); }
.by-av.soh path { fill: currentColor; }
.by-crew { flex: none; display: flex; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.by-crew::-webkit-scrollbar { display: none; }
.by-crew span { flex: 1 0 50px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 3px; border-radius: 10px; transition: background .2s; }
.by-crew i { font-style: normal; font-size: 10.5px; color: var(--faint); }
.by-crew span.on { background: rgba(247, 160, 29, .1); }
.by-crew span.on i { color: var(--gold); }
.by-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: #2a3a55 transparent; }
.by-hello b { display: block; font-size: 15px; margin-bottom: 4px; }
.by-hello > span { display: block; font-size: 13px; color: var(--dim); line-height: 1.95; }
.by-ex { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.by-ex button { text-align: right; background: var(--card); border: 1px solid #22304a; border-radius: 10px; padding: 8px 11px; font-size: 12.5px; color: var(--dim); cursor: pointer; line-height: 1.8; }
.by-ex button:hover { border-color: rgba(247, 160, 29, .5); color: var(--ink); }
.by-me { align-self: flex-start; max-width: 90%; background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px 4px 14px 14px; padding: 9px 12px; font-size: 13.5px; line-height: 1.95; white-space: pre-wrap; }
.by-think { border: 1px solid var(--line); border-radius: 12px; background: #0b111c; }
.by-th-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; background: transparent; border: 0; cursor: pointer; color: var(--dim); font-size: 13px; text-align: right; }
.by-th-h .chev { width: 14px; height: 14px; margin-right: auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.by-think.shut .chev { transform: rotate(90deg); }
.by-think.shut .by-steps { display: none; }
.by-steps { list-style: none; margin: 0; padding: 2px 12px 10px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.by-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--dim); line-height: 1.85; padding-top: 6px; }
.by-steps li b { color: var(--ink); font-weight: 700; margin-left: 4px; }
.by-steps .by-av { width: 20px; height: 20px; margin-top: 2px; }
@media (prefers-reduced-motion: no-preference) {
	.by-steps li { animation: stu-in .25s ease-out; }
	.by-think:not(.done) .by-th-h .by-av { animation: stu-spin 1.8s linear infinite; }
	.by-crew span.on .by-av { animation: stu-pulse .8s ease-in-out infinite; }
}
@keyframes stu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes stu-spin { to { transform: rotate(360deg); } }
.by-ans { font-size: 14px; line-height: 2.05; color: var(--ink); }
.by-ans b { color: var(--gold); font-weight: 700; }
.by-pz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.pz {
	--pb: #22304a;
	position: relative;
	margin-top: 6px;
	padding: 9px 10px 10px;
	background: var(--card);
	border: 1px solid var(--pb);
	border-right: 3px solid var(--c);
	border-radius: 12px;
}
/* زبانه‌ی پازل روی لبه‌ی بالا */
.pz::before { content: ""; position: absolute; top: -8px; right: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 1px solid var(--pb); }
.pz::after { content: ""; position: absolute; top: 0; right: 21px; width: 18px; height: 9px; background: var(--card); }
.pz > * { position: relative; z-index: 1; }
.pz.s-assumed { --pb: rgba(247, 160, 29, .4); }
.pz.s-suggest { --pb: rgba(56, 189, 248, .35); }
.pz.s-missing { --pb: rgba(255, 100, 114, .6); border-style: dashed; border-right-style: solid; }
.pz-h { display: flex; align-items: center; gap: 7px; }
.pz-h b { font-size: 13px; }
.pz-h em { margin-right: auto; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 7px; border-radius: 999px; white-space: nowrap; }
.s-found .pz-h em { color: var(--yes); background: rgba(47, 215, 146, .12); }
.s-assumed .pz-h em { color: var(--gold); background: rgba(247, 160, 29, .12); }
.s-missing .pz-h em { color: var(--no); background: rgba(255, 100, 114, .12); }
.s-suggest .pz-h em { color: #7dd3fc; background: rgba(56, 189, 248, .12); }
.pz-v { font-size: 12.5px; color: var(--ink); margin-top: 5px; line-height: 1.8; }
.pz-q { font-size: 11.5px; color: var(--faint); margin-top: 2px; line-height: 1.7; }
.pz-a { font-size: 12px; color: var(--dim); margin-top: 6px; line-height: 1.8; }
.pz-ch { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pz-ch button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg); font-size: 12px; color: var(--ink); cursor: pointer; }
.pz-ch button:hover { border-color: var(--c); }
.pz.flash { animation: stu-flash 1.1s ease; }
@keyframes stu-flash { 30% { box-shadow: 0 0 0 3px rgba(255, 100, 114, .5); } }
.by-go { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 4px; }
.by-compose { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #0d1320; }
.by-compose textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 160px; resize: none; background: var(--bg); border: 1px solid var(--line2); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.8; color: var(--ink); }
.by-compose textarea:focus { border-color: rgba(247, 160, 29, .6); outline: none; }
.by-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--gold); color: #1a1100; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.by-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
#by-err { padding: 0 14px 10px; margin: 0; }
@media (max-width: 980px) {
	.stu-drawer.by-mode { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; border: 0; }
}
@media (max-width: 480px) {
	.by-pz { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- زمان: نوار ۲۴ ساعته، روزها و انتخاب‌گرهای بومی تیره */
.stu input[type="time"], .stu select { color-scheme: dark; }
.tb { direction: ltr; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 2px 0 12px; }
.tb-h { direction: rtl; font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.tb-h b { color: var(--gold); font-weight: 700; }
.tb-track { position: relative; height: 14px; background: #0b111d; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; }
.tb-track i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.tb-track i.on { background: rgba(247, 160, 29, .78); }
.tb-track .now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--no); }
.tb-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.tb-sub { direction: rtl; font-size: 11.5px; color: var(--faint); margin: 10px 0 4px; }
.tb-lane { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 8px; align-items: center; margin-top: 5px; }
.tb-lane span { direction: rtl; text-align: right; font-size: 11px; color: var(--dim); }
.tb-track.sm { height: 8px; border-radius: 4px; }
.tb-track i.ln { background: rgba(96, 165, 250, .6); border-radius: 3px; }
.tb-note { direction: rtl; font-size: 11.5px; color: #ffc46b; margin-top: 8px; line-height: 1.8; }
.pp-days { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-days button { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg); color: var(--dim); font-size: 12.5px; cursor: pointer; }
.pp-days button[aria-pressed="true"] { border-color: rgba(111, 207, 151, .7); color: var(--ink); background: rgba(111, 207, 151, .12); }
.pp-days-q { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 7px; }
.pp-days-q button { padding: 0; border: 0; background: transparent; color: var(--gold); font-size: 12px; cursor: pointer; }

/* ---------------- عملوندها، تنظیمات بیشتر، اندیکاتورهای من */
.pp-opd { min-width: 0; border: 1px solid var(--line2); border-radius: 12px; padding: 6px 10px 2px; margin: 0 0 12px; background: rgba(255, 255, 255, .015); }
.pp-opd legend { max-width: 100%; padding: 0 6px; font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-opd legend em { font-style: normal; font-weight: 400; color: var(--gold); margin-right: 4px; }
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
.pp-grid .stu-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sub { font-size: 12px; color: var(--faint); margin: 2px 0 6px; }
.pp-q { margin: -2px 0 10px; }
.pp-more { border-top: 1px dashed var(--line2); margin: 2px 0 10px; padding-top: 4px; }
.pp-more > summary { cursor: pointer; font-size: 12.5px; color: #8fb8ff; padding: 6px 0 8px; list-style: none; }
.pp-more > summary::-webkit-details-marker { display: none; }
.pp-more > summary::before { content: "+ "; }
.pp-more[open] > summary::before { content: "− "; }
.pp-link { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pp-none { font-size: 12.5px; color: var(--faint); margin: 0 0 4px; }
.pp-on { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; color: var(--dim); cursor: pointer; white-space: nowrap; margin-left: 2px; }
.pp-on input { width: 16px; height: 16px; margin: 0; accent-color: var(--yes); }
.pp-mons button { min-width: 0; padding: 0 9px; }
.stu-f input[type="date"] { color-scheme: dark; }
.stu-tab.na { opacity: .5; }
.tg.my { color: #f5b8fb; background: rgba(232, 121, 249, .14); }
.dr-form .stu-f { margin-bottom: 9px; }
.dr-help { margin-top: 10px; }
.dr-help > summary { cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 0; color: var(--ink); }
.dr-help .pp-tips, .dr-help .pp-ev { margin-top: 6px; }
.my-pick { display: inline-flex; align-items: center; cursor: pointer; }
.my-ta { display: block; width: 100%; min-height: 120px; margin: 10px 0 8px; padding: 8px 10px; resize: vertical; font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace !important; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 9px; }
.my-sec { font-weight: 700; font-size: 13px; margin: 14px 0 6px; color: var(--ink); }
.my-head, .my-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 104px 30px; gap: 4px; align-items: center; }
.my-head.in, .my-row.in { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) 72px 30px; }
.my-head { font-size: 11px; color: var(--faint); margin-bottom: 3px; }
.my-row { margin-bottom: 4px; }
.my-row input, .my-row select { width: 100%; min-width: 0; height: 32px; padding: 0 7px; font-size: 12.5px; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 7px; }
.my-row button { height: 32px; border: 1px solid var(--line2); background: transparent; border-radius: 7px; color: var(--dim); cursor: pointer; }
.my-note { margin-top: 8px; font-size: 12px; }
.my-warn { color: #ffc46b; }
.my-card .dr-row { flex-wrap: wrap; }

/* ---------------- ربات آماده: هزینه، کیف پول، ساخت و نصب */
.bx-main { border-color: rgba(247, 160, 29, .45); }
.bx-q { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; font-size: 13px; color: var(--dim); }
.bx-q span { margin-left: auto; }
.bx-price { font-size: 22px; color: var(--gold); direction: ltr; }
.bx-q small, .bx-bal small { color: var(--faint); font-size: 12px; }
.bx-wait { color: var(--faint); font-size: 12.5px; }
.bx-low { color: #ffc46b; }
.bx-note { font-size: 13px; color: var(--yes); background: rgba(47, 215, 146, .1); border: 1px solid rgba(47, 215, 146, .35); border-radius: 10px; padding: 8px 11px; margin-bottom: 10px; }
.bx-bal { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--dim); }
.bx-bal b { font-size: 20px; color: var(--ink); direction: ltr; margin-right: auto; }
.bx-amts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.bx-amts button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--dim); cursor: pointer; direction: ltr; }
.bx-amts button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); background: rgba(247, 160, 29, .14); }
.bx-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.bx-custom input { width: 72px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); }
.bx-job { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bx-job span { flex: 1; min-width: 0; }
.bx-job b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-job small { color: var(--faint); font-size: 11.5px; }
.bx-job .dr-btn { height: 32px; padding: 0 10px; font-size: 12px; }
.bx-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 10px 0; font-size: 12.5px; }
.bx-kv span { color: var(--faint); }
.bx-kv b { font-weight: 600; }
.bx-run { text-align: center; padding: 6px 0 10px; }
.bx-run > b { display: block; font-size: 14.5px; margin: 6px 0 12px; }
.bx-sky .by-av { width: 54px; height: 54px; }
.bx-steps { list-style: none; margin: 0 0 12px; padding: 0; text-align: right; }
.bx-steps li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--faint); }
.bx-steps li .by-av { width: 24px; height: 24px; flex: none; }
.bx-steps li.ok { color: var(--dim); }
.bx-steps li.ok span::after { content: " ✓"; color: var(--yes); }
.bx-steps li.now { color: var(--ink); background: rgba(247, 160, 29, .1); }
.bx-done { border-color: rgba(47, 215, 146, .45); }
.bx-warn { border-color: rgba(255, 196, 107, .45); }
.bx-ul { margin: 6px 0 0; padding: 0 18px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.9; }
.bx-guide { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.bx-guide ol { margin: 8px 0 6px; padding: 0 18px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.95; }
.bx-guide ol b { color: var(--ink); }
.bx-tip { font-size: 12px; color: #ffc46b; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
	.bx-steps li.now .by-av { animation: stu-pulse 1.2s ease-in-out infinite; }
}

/* ---------------- ربات روی حساب صرافی کاربر */
.bt-wrap { border-color: rgba(47, 215, 146, .35); }
.bt-bot.live { border-color: rgba(47, 215, 146, .55); }
.bt-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bt-h b { font-size: 14px; }
.dr-tag.live { background: rgba(47, 215, 146, .14); color: var(--yes); }
.bt-st { margin-right: auto; font-size: 12px; color: var(--faint); }
.bt-st.running::before { content: "● "; color: var(--yes); }
.bt-st.error { color: var(--no); }
.bx-kv b.up, .m b.up { color: var(--yes); }
.bx-kv b.dn, .m b.dn { color: var(--no); }
.bt-log { list-style: none; margin: 6px 0 4px; padding: 0; font-size: 12px; color: var(--dim); line-height: 1.8; }
.bt-log li { border-right: 2px solid var(--line2); padding-right: 8px; margin-bottom: 2px; }
.bt-log li.order, .bt-log li.fill { border-color: var(--gold); }
.bt-log li.close { border-color: var(--yes); }
.bt-log li.error, .bt-log li.stop { border-color: var(--no); color: #ffb3ba; }
.bt-log.full li small { color: var(--faint); margin-left: 4px; }
.bt-acts { flex-wrap: wrap; }
.bt-acts .dr-btn { height: 32px; padding: 0 10px; font-size: 12px; }
.bt-live { margin-top: 8px; padding: 10px; border-radius: 10px; background: rgba(247, 160, 29, .08); border: 1px solid rgba(247, 160, 29, .4); }
.bt-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink); margin: 8px 0; cursor: pointer; }
.bt-ok input { margin-top: 3px; accent-color: var(--gold); }
.bt-bad { padding: 8px 10px; border: 1px solid rgba(255, 196, 107, .45); border-radius: 10px; margin: 8px 0; }
.bt-steps { margin: 8px 0; padding: 0 18px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.95; }
.bt-steps code { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.bt-steps a { color: var(--gold); }

/* ---------------- انتخاب چندتایی: کادر، نوار بالای بوم */
.stu-box { position: absolute; z-index: 12; border: 1px solid var(--gold); background: rgba(247, 160, 29, .08); border-radius: 4px; pointer-events: none; }
.stu-canvas.grab, .stu-canvas.grab .node { cursor: grab; }
.stu-canvas.many .node.sel .nx { display: none; }
.stu-msel {
	position: absolute;
	z-index: 15;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
	max-width: calc(100% - 24px);
	padding: 6px 8px 6px 10px;
	background: rgba(17, 26, 43, .97);
	border: 1px solid rgba(247, 160, 29, .55);
	border-radius: 12px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
	font-size: 12.5px;
}
.stu-msel[hidden] { display: none; }
.stu-msel b { color: var(--gold); font-weight: 700; margin-left: 4px; white-space: nowrap; }
.stu-msel button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 12.5px; }
.stu-msel button.danger { border-color: rgba(255, 100, 114, .5); color: var(--no); background: transparent; }

/* ---------------- پنجره‌ی پهن «شرط»: مقدار اول | مقایسه | مقدار دوم */
.stu-props.wide { width: min(800px, calc(100% - 24px)); }
.pp-cmp { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 10px; align-items: start; }
.pp-cmp-op { padding-top: 14px; }
.pp-cmp-op .stu-f select { font-size: 15px; text-align: center; }
.pp-cmp .pp-opd { margin-bottom: 4px; }
@media (max-width: 980px) {
	.stu-props.wide { width: auto; }
	.pp-cmp { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.pp-cmp-op { padding-top: 0; }
	.stu-msel { top: 6px; font-size: 12px; }
}

/* ---------------- پنجره‌ی تنظیمات بلوک روی صفحه‌های کوچک‌تر (فقط دسکتاپ؛ گوشی برگه‌ی پایین است) */
@media (min-width: 981px) {
	.stu-props { width: min(352px, var(--cw, 352px)); }
	.stu-props.wide { width: min(800px, var(--cw, calc(100% - 24px))); }
	.stu-props.stack .pp-cmp { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.stu-props.stack .pp-cmp-op { padding-top: 0; }
}
@media (min-width: 981px) and (max-height: 720px) {
	.pp-h { padding: 7px 14px; margin-bottom: 8px; }
	.pp-h .pal-chip { width: 28px; height: 28px; }
	.pp-close { width: 28px; height: 28px; }
	.pp-acts { padding: 7px 14px 8px; margin-top: 8px; }
	.pp-acts button { height: 32px; }
	.stu-f { margin-bottom: 7px; }
	.stu-f input, .stu-f select { height: 32px; }
	.pp-help { padding: 6px 10px; margin-bottom: 8px; line-height: 1.7; }
	.pp-outs { margin-bottom: 8px; }
	.pp-opd { padding: 4px 8px 0; margin-bottom: 8px; }
}
.pp-hd > summary { cursor: pointer; color: var(--dim); list-style: none; }
.pp-hd > summary::-webkit-details-marker { display: none; }
.pp-hd > summary::before { content: "؟ "; color: var(--gold); font-weight: 700; }
.pp-hd[open] > summary { margin-bottom: 6px; }

/* ---------------- یادداشت بلوک، از متن یا صدا */
.node .nm { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; padding: 3px 6px; border-radius: 6px; background: rgba(247, 160, 29, .1); color: #f6cf8a; font-size: 11px; line-height: 1.5; max-width: 220px; }
.node .nm svg { width: 12px; height: 12px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.node .nm span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pp-memo span { display: inline-flex; align-items: center; gap: 4px; }
.pp-memo span svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pp-memo textarea { min-height: 52px; }
.pal-txt { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 0 12px 10px; padding: 10px 12px; text-align: right; border-radius: 12px; border: 1px dashed rgba(247, 160, 29, .55); background: rgba(247, 160, 29, .07); color: var(--ink); cursor: pointer; }
.pal-txt:hover { background: rgba(247, 160, 29, .13); }
.pal-txt svg { width: 18px; height: 18px; flex: none; color: var(--gold); fill: none; stroke: currentColor; stroke-width: 1.8; }
.pal-txt span { flex: 1; min-width: 0; }
.pal-txt b { display: block; font-size: 13px; }
.pal-txt small { display: block; font-size: 11.5px; color: var(--dim); }
.emp-txt { display: inline-flex; align-items: center; gap: 6px; margin: 12px auto 4px; padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(247, 160, 29, .5); background: rgba(247, 160, 29, .1); color: var(--ink); font-size: 13px; cursor: pointer; pointer-events: auto; }
.emp-txt svg { width: 16px; height: 16px; color: var(--gold); }
.by-mic { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.by-mic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.by-mic.on { color: #fff; background: var(--no); border-color: var(--no); }
@media (prefers-reduced-motion: no-preference) { .by-mic.on { animation: stu-pulse 1.2s ease-in-out infinite; } }

/* ---- ساخت دقیق از متن یا صدا (پولی) */
.by-pro { margin-top: 4px; border: 1px solid rgba(247, 160, 29, .38); border-radius: 14px; background: linear-gradient(180deg, rgba(247, 160, 29, .07), rgba(247, 160, 29, .02)); padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; }
.by-pro-h { display: flex; align-items: center; gap: 8px; }
.by-pro-h b { font-size: 14.5px; font-weight: 800; }
.by-pro-h > svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.by-pro p { margin: 0; font-size: 13px; line-height: 1.95; color: var(--dim); }
.by-pro .m { font-size: 12px; color: var(--faint); line-height: 1.8; }
.by-pro .m a, .by-lnk { color: var(--gold); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.by-pro .dr-row { margin: 0; }
.by-pro-l b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 2px; }
.by-pro-l ul { margin: 0; padding: 0 18px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.9; }
.by-pro-l.ask b { color: var(--gold); }
.by-pro.done { border-color: rgba(47, 215, 146, .45); background: linear-gradient(180deg, rgba(47, 215, 146, .07), rgba(47, 215, 146, .02)); }
.by-pro.run .bx-steps { margin: 0; }

/* ---- نوار بالا: ساده‌تر (پلتفرم به شکل یک برچسب کوچک، بقیه در منوی «پروژه») */
.stu-plat select { height: 30px; padding: 0 8px; font-size: 12.5px; border-radius: 999px; background: var(--panel); color: var(--dim); }
.stu-menu .m-only { display: none; }
.stu-tabinfo { white-space: nowrap; overflow: hidden; }
.stu-tabinfo span { overflow: hidden; text-overflow: ellipsis; }
.stu-tabinfo[hidden] { display: none; }
@media (max-width: 980px) {
	.stu-menu .m-only { display: block; }
	.stu-menu .stu-menu__row.m-only { display: flex; }
	#stu-more-btn span { display: none; }
	#stu-more-btn { width: 34px; padding: 0; justify-content: center; }
}

/* ---- تحلیل رایگان: اول سؤال‌ها، بعد فهمیدم و فرض کردم، پیشنهادها جمع‌شده */
.by-grp { display: flex; flex-direction: column; gap: 4px; }
.by-gh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.by-gh b { font-size: 13px; color: var(--ink); }
.by-gh span { font-size: 12px; color: var(--faint); }
.by-asks .by-gh b { color: var(--gold); }
.by-opt summary { cursor: pointer; list-style: none; padding: 6px 0; }
.by-opt summary::-webkit-details-marker { display: none; }
.by-opt summary b::before { content: "+ "; color: var(--faint); }
.by-opt[open] summary b::before { content: "− "; }
.pz.s-ask { --pb: rgba(247, 160, 29, .55); }
.s-ask .pz-h em { color: var(--gold); background: rgba(247, 160, 29, .14); }
.pz-ask { font-size: 13px; color: var(--ink); margin-top: 6px; line-height: 1.85; font-weight: 600; }
.pz-def { font-size: 11px; color: var(--faint); margin-top: 6px; }
.by-new { margin-right: auto; font-size: 12px; }

/* ---- سه‌گانه‌ی بالای جعبه‌ابزار: هر دکمه به اندازه‌ی متنش، هیچ متنی بیرون نمی‌زند */
.stu-side { container-type: inline-size; }
.pal-seg { display: flex; }
.pal-seg button { flex: 1 1 auto; min-width: 0; padding: 0 6px; gap: 4px; overflow: hidden; }
.pal-seg button svg { flex: none; }
.pal-seg button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 236px) {
	.pal-seg button svg { display: none; }
}

/* ---- «برگرد به بلوک‌ها» وقتی همه‌ی بلوک‌ها بیرون از دید هستند */
.stu-back { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(247, 160, 29, .55); background: rgba(17, 26, 43, .96); color: var(--dim); font-size: 13px; direction: rtl; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); white-space: nowrap; }
.stu-back b { color: var(--gold); }
.stu-back span { overflow: hidden; text-overflow: ellipsis; }
.stu-back .ar { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.stu-back:hover { background: var(--panel2); }
.stu-back[hidden] { display: none; }
.st-fit { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.st-fit:hover { color: var(--ink); }

/* درباره‌ی استودیو (از منوی «پروژه») */
.stu-menu a[role="menuitem"] { display: block; padding: 9px 14px; color: var(--gold); text-decoration: none; font-size: 13.5px; }
.stu-menu a[role="menuitem"]:hover { background: var(--panel2); }
.stu-about { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 14, .72); }
.stu-about[hidden] { display: none; }
.stu-about-in { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 24px 18px; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); color: var(--ink); }
.stu-about h1 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.stu-about h2 { margin: 18px 0 6px; font-size: 15px; font-weight: 700; color: var(--gold); }
.stu-about p, .stu-about li { font-size: 13.5px; line-height: 1.95; color: var(--dim); }
.stu-about .lead { color: var(--ink); }
.stu-about ol { margin: 0; padding-inline-start: 20px; }
.stu-about a { color: var(--gold); }
.stu-about .note { margin-top: 14px; font-size: 12px; color: var(--faint); }
.stu-about-x { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.stu-about-x:hover { color: var(--ink); background: var(--panel2); }

/* مسیر صفحه در سربرگ: لوگو ‹ بیت‌یار ‹ استودیو */
.stu-crumb { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line2); white-space: nowrap; }
.stu-crumb a { text-decoration: none; }
.stu-cs { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stu-cb { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--dim); font-size: 14px; font-weight: 700; }
.stu-cb svg { width: 15px; height: 15px; fill: var(--gold); }
.stu-cb:hover, .stu-cb:focus-visible { color: var(--ink); background: var(--panel2); }
.stu-logo { display: inline-flex; align-items: center; height: 30px; padding: 0 4px; border-radius: 8px; }
.stu-logo:hover, .stu-logo:focus-visible { background: var(--panel2); }
.stu-cc { font-size: 14px; font-weight: 800; color: var(--ink); }
.stu-cc .sm { display: none; }
@media (max-width: 1180px) { .stu-cc .lg { display: none; } .stu-cc .sm { display: inline; } }
@media (max-width: 600px) { .stu-crumb { gap: 3px; padding-left: 6px; margin-left: 0; } .stu-cb { padding: 0 5px; font-size: 13px; } .stu-cc { font-size: 13px; } .stu-cs { width: 12px; height: 12px; } }
@media (max-width: 420px) { .stu-crumb .stu-cs:first-of-type { display: none; } .stu-cb svg { display: none; } }
