/* AMIR STUDIO — پایه‌ی رابط چت. رنگ‌ها و حال‌وهوا در themes/*.css تعریف می‌شود. */

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

/* فونت‌های فارسی B (برای پیش‌نمایش و Word) */
@font-face{font-family:"B Zar";src:url("../fonts/BZar.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"B Zar";src:url("../fonts/BZar-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"B Nazanin";src:url("../fonts/BNazanin.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"B Mitra";src:url("../fonts/BMitra.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"B Mitra";src:url("../fonts/BMitra-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"B Yekan";src:url("../fonts/BYekan.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"B Titr";src:url("../fonts/BTitr-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"B Nasim";src:url("../fonts/BNasim-Bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:"B Tir";src:url("../fonts/BTir.ttf") format("truetype");font-weight:400;font-display:swap}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	font-family: var(--font-body, "Vazirmatn"), system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
	background: var(--bg);
	color: var(--text);
	font-size: 15.5px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow: hidden;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- چیدمان ---------- */

.app { display: flex; height: 100dvh; width: 100%; }

.sidebar {
	width: 286px;
	flex: none;
	background: var(--bg-side);
	border-inline-end: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	padding: 14px 12px 12px;
	gap: 10px;
	transition: transform .28s cubic-bezier(.2,.8,.2,1), margin .28s cubic-bezier(.2,.8,.2,1);
	z-index: 40;
}

.app.side-collapsed .sidebar { margin-inline-start: -286px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

.scrim { display: none; }

/* ---------- نوار کناری ---------- */

.side-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 6px; }
.brand-mark {
	width: 38px; height: 38px; border-radius: 12px; flex: none;
	display: grid; place-items: center;
	background: var(--accent-soft); color: var(--accent);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { min-width: 0; flex: 1; line-height: 1.25; }
.brand-title { font-weight: 800; letter-spacing: .02em; font-size: 15px; direction: ltr; text-align: start; }
.brand-sub { font-size: 11.5px; color: var(--muted); direction: ltr; text-align: start; }

.icon-btn {
	width: 38px; height: 38px; border-radius: 10px; flex: none;
	display: grid; place-items: center; color: var(--muted);
	transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.new-chat {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px; border-radius: 12px;
	font-weight: 600; color: var(--text);
	border: 1px solid var(--border);
	background: var(--bg-elev);
	transition: background .15s, border-color .15s, transform .1s;
}
.new-chat:hover { background: var(--hover); }
.new-chat:active { transform: scale(.985); }
.new-chat svg { width: 18px; height: 18px; color: var(--accent); }

.search {
	width: 100%; padding: 9px 12px; border-radius: 10px;
	border: 1px solid transparent; background: var(--hover);
	font-size: 13.5px;
}
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--accent); background: var(--bg-elev); }

.conv-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 2px 4px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.conv-group { font-size: 11.5px; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }

.conv {
	position: relative; display: flex; align-items: center; gap: 4px;
	border-radius: 10px; padding-inline-end: 4px;
}
.conv:hover, .conv.active { background: var(--hover); }
.conv.active { background: var(--active); }
.conv-title {
	flex: 1; min-width: 0; text-align: start; padding: 8px 10px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px;
}
.conv-actions { display: none; gap: 0; }
.conv:hover .conv-actions, .conv:focus-within .conv-actions { display: flex; }
.conv-actions button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.conv-actions button:hover { background: var(--border); color: var(--text); }
.conv-actions svg { width: 15px; height: 15px; }
.conv-empty { padding: 18px 10px; color: var(--muted); font-size: 13px; text-align: center; }

.side-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

.meter { padding: 4px 6px; font-size: 12px; color: var(--muted); }
.meter-bar { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 6px; }
.meter-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

.other-ws { display: flex; flex-direction: column; gap: 2px; }
.other-ws a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 13.5px;
}
.other-ws a:hover { background: var(--hover); }
.other-ws a span:first-child { direction: ltr; font-weight: 600; }
.other-ws a span:last-child { color: var(--muted); font-size: 12px; }

.user-row { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; }
.avatar {
	width: 34px; height: 34px; border-radius: 50%; flex: none;
	display: grid; place-items: center; font-weight: 700; font-size: 13px;
	background: var(--accent); color: var(--accent-contrast);
}
.user-name { flex: 1; min-width: 0; font-size: 13.5px; direction: ltr; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.disclaimer { font-size: 11px; color: var(--muted); line-height: 1.7; padding: 2px 6px; }

/* ---------- نوار بالا ---------- */

.topbar {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 14px; min-height: 58px;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	position: relative; z-index: 20;
}
.top-spacer { flex: 1; }

.model-picker { position: relative; }
.model-btn {
	display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
	font-weight: 700; font-size: 15.5px; direction: ltr;
	transition: background .15s;
}
.model-btn:hover, .model-btn[aria-expanded="true"] { background: var(--hover); }
.model-btn svg { width: 16px; height: 16px; color: var(--muted); }

.menu {
	position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 250px; z-index: 50;
	background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
	box-shadow: var(--shadow-lg); padding: 6px;
	animation: pop .14s ease-out;
}
.menu button {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
	padding: 10px 12px; border-radius: 10px; direction: ltr; text-align: start; font-weight: 600;
}
.menu button:hover { background: var(--hover); }
.menu button svg { width: 17px; height: 17px; color: var(--accent); }
.menu button.locked { opacity: .62; }
.menu button.locked svg { color: var(--muted); }
.menu .menu-id { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: 14px;
	background: var(--accent); color: var(--accent-contrast);
	transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.danger { background: #d92d20; color: #fff; }

/* ---------- گفتگو ---------- */

.thread { flex: 1; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.thread-inner { max-width: 780px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 26px; }

.msg { display: flex; gap: 14px; animation: rise .28s ease-out both; }
.msg.user { justify-content: flex-start; }
.msg .bubble {
	max-width: 85%; padding: 10px 16px; border-radius: 20px;
	background: var(--user-bubble); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.msg.assistant { align-items: flex-start; }
.msg .ava {
	width: 32px; height: 32px; border-radius: 50%; flex: none; margin-top: 2px;
	display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.msg .ava svg { width: 18px; height: 18px; }
.msg .body { flex: 1; min-width: 0; }
.msg .actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.msg:hover .actions, .msg:focus-within .actions { opacity: 1; }
.msg .actions button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.msg .actions button:hover { background: var(--hover); color: var(--text); }
.msg .actions svg { width: 16px; height: 16px; }
@media (hover: none) { .msg .actions { opacity: 1; } }

.msg.error .body { color: #c0392b; }
.errbox {
	border: 1px solid color-mix(in srgb, #d92d20 40%, var(--border));
	background: color-mix(in srgb, #d92d20 7%, transparent);
	color: var(--text); padding: 10px 14px; border-radius: 14px; font-size: 14px;
}

/* متن مارک‌داون */
.md { word-break: break-word; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .85em; }
.md h1, .md h2, .md h3, .md h4 { line-height: 1.5; margin: 1.3em 0 .5em; font-weight: 800; }
.md h1 { font-size: 1.4em; } .md h2 { font-size: 1.22em; } .md h3 { font-size: 1.08em; } .md h4 { font-size: 1em; }
.md ul, .md ol { margin: 0 0 .85em; padding-inline-start: 1.5em; }
.md li { margin: .22em 0; }
.md li > ul, .md li > ol { margin: .2em 0 .2em; }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.md blockquote { margin: 0 0 .85em; padding: 2px 14px; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.2em 0; }
.md strong { font-weight: 800; }
.md code:not(pre code) {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; direction: ltr; unicode-bidi: isolate;
	background: var(--hover); padding: .12em .42em; border-radius: 6px;
}
.md .tbl { overflow-x: auto; margin: 0 0 .9em; border: 1px solid var(--border); border-radius: 12px; }
.md table { border-collapse: collapse; width: 100%; font-size: .93em; }
.md th, .md td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: start; }
.md th { background: var(--hover); font-weight: 700; }
.md tr:last-child td { border-bottom: 0; }

.codebox { margin: 0 0 .95em; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--code-bg); direction: ltr; }
.codebox-head {
	display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px;
	background: var(--code-head); color: var(--code-muted); font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.codebox-head button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; color: var(--code-muted); font-size: 12px; font-family: inherit; }
.codebox-head button:hover { background: rgba(127,127,127,.18); color: var(--code-text); }
.codebox-head svg { width: 14px; height: 14px; }
.codebox pre { margin: 0; padding: 12px 14px; overflow-x: auto; color: var(--code-text); font-size: 13.5px; line-height: 1.65; }
.codebox code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.caret { display: inline-block; width: 9px; height: 1.05em; vertical-align: -.18em; background: var(--accent); border-radius: 2px; margin-inline-start: 3px; animation: blink 1s steps(2) infinite; }
.typing { display: inline-flex; gap: 5px; padding: 8px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }

/* ---------- حالت خالی ---------- */

.empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 20px 40px; gap: 6px; }
.empty-logo {
	width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 14px;
	background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 7%, transparent);
}
.empty-logo svg { width: 34px; height: 34px; }
.empty h1 { font-size: clamp(24px, 4.2vw, 34px); margin: 0; font-weight: 800; line-height: 1.5; font-family: "Vazirmatn", system-ui, sans-serif; }
.empty p { margin: 0; color: var(--muted); }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 640px; margin-top: 26px; }
.chip {
	text-align: start; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev);
	font-size: 14px; line-height: 1.7; color: var(--text);
	transition: background .15s, border-color .15s, transform .12s;
}
.chip:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }

/* ---------- ورودی پیام ---------- */

.composer-wrap { padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
.composer {
	max-width: 780px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px;
	background: var(--composer-bg); border: 1px solid var(--composer-border); border-radius: var(--composer-radius, 26px);
	padding: 8px 8px 8px 10px; box-shadow: var(--shadow);
	transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--composer-border)); box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.composer textarea {
	flex: 1; resize: none; border: 0; outline: none; background: transparent; padding: 9px 10px; max-height: 220px; min-height: 26px; line-height: 1.7; font-size: 15.5px;
}
.composer textarea::placeholder { color: var(--muted); }
.send-btn {
	width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
	background: var(--send-bg); color: var(--send-fg); transition: transform .12s, opacity .15s, filter .15s;
}
.send-btn:hover { filter: brightness(1.12); }
.send-btn:active { transform: scale(.94); }
.send-btn[disabled] { opacity: .3; cursor: not-allowed; }
.send-btn svg { width: 19px; height: 19px; }
.composer-note { max-width: 780px; margin: 8px auto 0; text-align: center; font-size: 11.5px; color: var(--muted); }

.to-bottom {
	position: absolute; inset-inline: 0; margin: 0 auto; bottom: 118px; width: 38px; height: 38px; border-radius: 50%;
	display: none; place-items: center; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 10;
}
.to-bottom.show { display: grid; }
.to-bottom svg { width: 18px; height: 18px; }

/* ---------- مودال و اعلان ---------- */

.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 12, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .16s ease-out; }
.modal {
	width: 100%; max-width: 410px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 24px; padding: 28px 26px 24px;
	box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2,.9,.3,1.1); text-align: center;
}
.modal .m-logo { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 17px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.modal .m-logo svg { width: 29px; height: 29px; }
.modal h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.field {
	width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); text-align: center;
	font-size: 18px; letter-spacing: .08em; direction: ltr;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.field.code { font-size: 26px; letter-spacing: .5em; padding-inline-start: calc(16px + .5em); }
.modal .btn { width: 100%; margin-top: 14px; padding: 13px; }
.modal .row { display: flex; gap: 10px; margin-top: 10px; }
.modal .row .btn { margin-top: 4px; }
.m-error { min-height: 22px; margin-top: 10px; color: #d92d20; font-size: 13px; }
.m-hint { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.m-link { color: var(--accent); font-weight: 700; font-size: 13px; margin-top: 10px; }
.m-testcode { margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; direction: ltr; }

.toast { position: fixed; inset-inline: 0; bottom: 96px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 13.5px; z-index: 120; animation: rise .22s ease-out; box-shadow: var(--shadow-lg); }

/* ---------- واکنش‌گرا ---------- */

@media (max-width: 860px) {
	.sidebar {
		position: fixed; inset-block: 0; inset-inline-start: 0; width: min(88vw, 320px); margin-inline-start: 0 !important;
		transform: translateX(100%); box-shadow: none; border-inline-end: 0; visibility: hidden;
		transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s .28s;
	}
	.app.side-open .sidebar { transform: none; box-shadow: var(--shadow-lg); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
	.app.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10,10,12,.45); z-index: 30; animation: fade .18s; }
	.chips { grid-template-columns: 1fr; }
	.thread-inner { padding: 14px 14px 22px; }
	.msg .bubble { max-width: 92%; }
	.to-bottom { bottom: 112px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ---------- پیوست فایل ---------- */

.composer { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 8px 8px 10px; }
.composer-row { display: flex; align-items: flex-end; gap: 6px; }
.attach-btn { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.attach-btn:hover { background: var(--hover); color: var(--text); }
.attach-btn svg { width: 21px; height: 21px; }

.attach-row { display: none; flex-wrap: wrap; gap: 8px; padding: 4px 4px 10px; }
.att-chip { position: relative; display: flex; align-items: center; gap: 10px; max-width: 260px; padding: 6px 8px 6px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.att-chip.err { border-color: #d92d20; }
.att-chip.err .att-sub { color: #d92d20; }
.chip-thumb { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.chip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chip-ico svg { width: 22px; height: 22px; }
.att-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.att-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; direction: ltr; text-align: start; }
.att-sub { font-size: 11.5px; color: var(--muted); }
.chip-x { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--muted); background: var(--hover); }
.chip-x:hover { color: var(--text); background: var(--border); }
.chip-x svg { width: 12px; height: 12px; }
.chip-bar { position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; background: var(--accent); transition: width .15s; }

.msg.user .user-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 85%; min-width: 0; }
.msg.user .user-col .bubble { max-width: 100%; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.att-imglink { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--hover); }
.att-img { display: block; max-width: min(320px, 70vw); max-height: 260px; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); text-decoration: none; max-width: 280px; }
.att-file:hover { background: var(--hover); }
.att-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.att-ico svg { width: 20px; height: 20px; }

.drop-hint { position: absolute; inset: 10px; z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--accent); border-radius: 24px; background: color-mix(in srgb, var(--bg) 88%, var(--accent)); color: var(--text); pointer-events: none; }
.drop-hint svg { width: 34px; height: 34px; color: var(--accent); }
.drop-hint span { color: var(--muted); font-size: 13px; }
.main.dragging .drop-hint { display: flex; }

.cb-actions { display: inline-flex; gap: 2px; }


/* ---------- کشوی تعویض محیط ---------- */

.ws-switch {
	position: relative; display: flex; direction: ltr; gap: 2px; padding: 3px; flex: none;
	border-radius: 99px; background: var(--hover); border: 1px solid var(--border);
}
.ws-thumb {
	position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 99px; z-index: 0;
	background: var(--bg-elev); box-shadow: 0 1px 5px rgba(0, 0, 0, .16), 0 0 0 1px var(--border);
	transition: transform .34s cubic-bezier(.3, .9, .3, 1), width .34s cubic-bezier(.3, .9, .3, 1);
}
.ws-switch button {
	position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px;
	font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted); line-height: 1.6; transition: color .2s;
}
.ws-switch button:hover { color: var(--text); }
.ws-switch button.on { color: var(--text); }
.ws-switch .ws-ico svg { width: 17px; height: 17px; }
.ws-switch button.on .ws-ico { color: var(--accent); }

@media (min-width: 1280px) {
	.ws-switch { position: absolute; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 1100px) {
	.ws-switch button { padding: 6px 10px; }
	.ws-switch button:not(.on) .ws-label { display: none; }
}

.model-btn .mb-logo svg { width: 18px; height: 18px; color: var(--accent); }
.menu { max-height: min(72vh, 520px); overflow-y: auto; }
.menu-group {
	display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; direction: ltr;
	font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted);
}
.menu-group:not(:first-child) { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.menu-group .mg-ico svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------- کاشی‌های Hub ---------- */

.fam-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 640px; margin-top: 22px; }
.fam-tile {
	display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico name" "ico model";
	column-gap: 12px; align-items: center; text-align: start; padding: 12px 14px; border-radius: 16px;
	border: 1px solid var(--border); background: var(--bg-elev);
	transition: border-color .15s, box-shadow .15s, transform .12s;
}
.fam-tile:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.fam-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.fam-tile .ft-ico { grid-area: ico; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.fam-tile .ft-ico svg { width: 21px; height: 21px; }
.fam-tile .ft-name { grid-area: name; font-weight: 800; font-size: 13px; letter-spacing: .06em; direction: ltr; text-align: start; }
.fam-tile .ft-model { grid-area: model; font-size: 12px; color: var(--muted); direction: ltr; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 640px) {
	.topbar { flex-wrap: wrap; padding: 8px 10px; row-gap: 2px; }
	.topbar > .icon-btn { order: 1; }
	.topbar > .ws-switch { order: 2; margin-inline: auto; }
	.topbar > .top-spacer { display: none; }
	.topbar > .top-right { order: 3; }
	.topbar > .model-picker { order: 4; flex-basis: 100%; }
	.fam-tiles { gap: 8px; margin-top: 18px; }
	.fam-tile { grid-template-columns: 1fr; grid-template-areas: "ico" "name" "model"; justify-items: center; text-align: center; row-gap: 2px; padding: 10px 6px; }
	.fam-tile .ft-name, .fam-tile .ft-model { text-align: center; max-width: 100%; }
	.fam-tile .ft-ico { margin-bottom: 4px; }
}


/* ---------- ساخت فایل و تصویر ---------- */

.msg .actions button.lbl { width: auto; padding: 0 9px 0 8px; gap: 5px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; direction: ltr; }
.msg .actions button.lbl svg { width: 15px; height: 15px; }

.img-btn.on { color: var(--accent); background: var(--accent-soft); }
.composer.img-mode { border-color: color-mix(in srgb, var(--accent) 55%, var(--composer-border)); }

.img-skel {
	width: min(340px, 80vw); aspect-ratio: 1 / 1; border-radius: 18px; display: grid; place-items: center; text-align: center; padding: 18px;
	font-size: 13px; color: var(--muted); line-height: 1.8;
	background: linear-gradient(110deg, var(--hover) 30%, color-mix(in srgb, var(--accent) 12%, var(--hover)) 50%, var(--hover) 70%);
	background-size: 220% 100%; animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.att-list.gen { margin-top: 10px; }
.gen-img { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.gen-img .att-img { max-width: min(420px, 82vw); max-height: 440px; }
.img-dl {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
	border: 1px solid var(--border); color: var(--text); text-decoration: none; background: var(--bg-elev);
}
.img-dl:hover { background: var(--hover); }
.img-dl svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- کارت فایل‌های Office ---------- */
.filecard { margin: 12px 0; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); overflow: hidden; max-width: 100%; }
.filecard .fc-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.filecard.building, .filecard.failed { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.filecard.failed { border-color: #c0392b66; }
.fc-ico { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font: 800 11px/1 system-ui, sans-serif; letter-spacing: .04em; color: #fff; }
.fc-ico.k-pptx { background: #d24726; }
.fc-ico.k-xlsx { background: #1d6f42; }
.fc-ico.k-docx { background: #2b579a; }
.fc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fc-meta b { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta > span { font-size: 12px; color: var(--muted); }
.fc-bar { display: block; height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--border), var(--accent), var(--border)); background-size: 200% 100%; animation: fcshimmer 1.3s linear infinite; max-width: 220px; }
@keyframes fcshimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fc-btns { display: flex; gap: 6px; flex: none; }
.fc-dl { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-contrast); font: 700 12.5px/1 inherit; cursor: pointer; }
.fc-dl svg { width: 15px; height: 15px; }
.fc-dl.alt { background: var(--hover); color: var(--text); }
.fc-dl:hover { filter: brightness(1.08); }
.fc-preview { border-top: 1px solid var(--border); padding: 12px 14px; background: var(--bg-side); }
.fc-slides { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; direction: ltr; }
.fc-slide { flex: none; width: 168px; aspect-ratio: 16 / 9; border-radius: 8px; padding: 10px 11px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); overflow: hidden; text-align: start; direction: rtl; }
.fc-slide b { font-size: 10.5px; line-height: 1.35; font-weight: 800; }
.fc-slide span { font-size: 8px; opacity: .85; }
.fc-slide i { display: block; height: 4px; border-radius: 3px; opacity: .55; width: 88%; }
.fc-slide i:nth-child(3) { width: 70%; } .fc-slide i:nth-child(4) { width: 80%; }
.fc-slide u { display: block; height: 30px; border: 1.5px solid; border-radius: 3px; opacity: .6; }
.fc-slide em { font-style: normal; font-weight: 800; font-size: 20px; }
.fc-more { flex: none; align-self: center; font-size: 12px; color: var(--muted); padding: 0 8px; }
.fc-sheet { overflow-x: auto; }
.fc-sheet table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.fc-sheet th, .fc-sheet td { border: 1px solid var(--border); padding: 5px 9px; text-align: start; white-space: nowrap; }
.fc-sheet th { background: #1d6f42; color: #fff; }
.fc-tabs { display: flex; gap: 6px; margin-top: 8px; }
.fc-tabs span { font-size: 11.5px; padding: 3px 10px; border-radius: 7px 7px 0 0; background: var(--hover); color: var(--muted); }
.fc-doc { max-height: 150px; overflow: hidden; font-size: 13px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.fc-doc h1, .fc-doc h2, .fc-doc h3 { font-size: 15px; margin: 4px 0; }
@media (max-width: 560px) { .filecard .fc-top { flex-wrap: wrap; } .fc-btns { width: 100%; } .fc-dl { flex: 1; justify-content: center; } }
.fc-mchart { width: 100%; height: 62px; }
.fc-mchart svg { width: 100%; height: 100%; display: block; }
.fc-mchart.big { width: 150px; height: 80px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.fc-xcharts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fc-mimg { flex: 1; min-height: 28px; border-radius: 5px; opacity: .85; }
.fc-msteps { display: flex; gap: 4px; align-items: center; }
.fc-msteps span { width: 12px; height: 12px; border-radius: 50%; opacity: .8; }
.fc-badges { display: flex; gap: 6px; margin-top: 8px; }
.fc-badge { font-size: 11.5px; padding: 3px 10px; border-radius: 99px; background: var(--hover); color: var(--muted); }
.fc-dl:disabled { opacity: .7; cursor: progress; }

/* ---------- استودیوی Gamma ---------- */
.studio-mode .composer-wrap, .studio-mode .model-picker, .studio-mode .new-chat, .studio-mode .search, .studio-mode .conv-list { display: none; }
.studio-mode .sidebar { justify-content: space-between; }
.gm-wrap { max-width: 760px; margin-inline: auto; padding-bottom: 48px; }
.gm-card { width: 100%; text-align: start; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.gm-topic { width: 100%; resize: vertical; min-height: 110px; max-height: 360px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.8; padding: 4px; }
.gm-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.gm-seg button { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 99px; padding: 8px 16px; cursor: pointer; font: inherit; font-size: 14px; }
.gm-seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.gm-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gm-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.gm-field select { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); padding: 9px 10px; font: inherit; font-size: 14px; }
.gm-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gm-quota { font-size: 13px; color: var(--muted); }
.gm-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 99px; padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent-soft); color: var(--accent); }
.gm-btn svg { width: 18px; height: 18px; }
.gm-btn.primary { background: var(--grad, var(--accent)); color: #fff; }
.gm-btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.gm-btn:disabled { opacity: .6; cursor: default; }
.gm-err { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: color-mix(in srgb, #e5484d 12%, transparent); color: var(--text); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.gm-list { width: 100%; text-align: start; margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.gm-h { font-size: 15px; margin: 0 0 4px; color: var(--muted); font-weight: 600; }
.gm-item { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; background: var(--bg-elev); display: flex; flex-direction: column; gap: 10px; }
.gm-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.gm-item-top strong { font-size: 15px; line-height: 1.6; }
.gm-tag { font-size: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.gm-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gm-sub { font-size: 13px; color: var(--muted); }
.gm-sub.bad { color: #e5484d; }
.gm-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: gmspin .9s linear infinite; }
@keyframes gmspin { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .gm-row { grid-template-columns: 1fr; } .gm-card { padding: 12px; } }

/* ---------- پیام ویژه‌ی کاربران پریمیوم ---------- */
.gm-card.locked { opacity: .55; pointer-events: none; filter: saturate(.7); }
.gm-lock { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: var(--grad, var(--accent)); border-radius: 99px; padding: 10px 18px; box-shadow: 0 8px 24px rgba(109, 61, 245, .28); }
.gm-lock svg { width: 17px; height: 17px; }
.pm-box { position: relative; width: min(420px, 100%); border-radius: 28px; overflow: hidden; background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-lg); animation: pmin .28s cubic-bezier(.2, .9, .3, 1.2); text-align: center; }
@keyframes pmin { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.pm-hero { position: relative; height: 150px; display: grid; place-items: center; background: linear-gradient(135deg, #6d3df5 0%, #c13bd6 55%, #ff6b8b 100%); overflow: hidden; }
.pm-orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.pm-orb.a { width: 190px; height: 190px; top: -70px; inset-inline-start: -50px; }
.pm-orb.b { width: 120px; height: 120px; bottom: -50px; inset-inline-end: -20px; background: rgba(255, 255, 255, .12); }
.pm-crown { position: relative; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(60, 10, 120, .35); }
.pm-crown svg { width: 40px; height: 40px; }
.pm-badge { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .22em; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .22); border-radius: 99px; padding: 3px 12px; }
.pm-body { padding: 24px 24px 22px; }
.pm-body h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; line-height: 1.6; }
.pm-body p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.pm-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: start; }
.pm-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.7; }
.pm-list svg { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; color: #fff; background: var(--grad, var(--accent)); margin-top: 2px; }
.pm-actions { display: flex; flex-direction: column; gap: 10px; }
.pm-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; border: 1px solid transparent; border-radius: 16px; padding: 13px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.pm-btn svg { width: 18px; height: 18px; }
.pm-btn.primary { color: #fff; background: linear-gradient(135deg, #6d3df5, #c13bd6 60%, #ff6b8b); box-shadow: 0 10px 26px rgba(109, 61, 245, .35); }
.pm-btn.primary:hover { filter: brightness(1.06); }
.pm-btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.pm-btn.ghost:hover { background: var(--hover); }
.pm-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .22); }
.pm-x svg { width: 16px; height: 16px; }

/* ---------- حالت خودکار ---------- */
.auto-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 8px; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.auto-tag b { font-weight: 700; }
.auto-tag span::after { content: " ←"; }

/* ---------- مقایسه‌ی مدل‌ها ---------- */
.cmp-box { width: min(1180px, 100%); max-height: min(92vh, 900px); display: flex; flex-direction: column; background: var(--bg); color: var(--text); border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pmin .25s ease-out; }
.cmp-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cmp-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.cmp-title svg { width: 22px; height: 22px; color: var(--accent); }
.cmp-scroll { overflow: auto; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 99px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.cmp-chip .cc-ico svg { width: 16px; height: 16px; display: block; }
.cmp-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.cmp-chip:disabled { opacity: .6; cursor: default; }
.cmp-q { width: 100%; resize: vertical; min-height: 78px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); color: var(--text); font: inherit; font-size: 15px; line-height: 1.8; padding: 12px 14px; outline: 0; }
.cmp-q:focus { border-color: var(--accent); }
.cmp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-note { font-size: 12px; color: var(--muted); }
.cmp-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cmp-grid.n2 { grid-template-columns: repeat(2, 1fr); } .cmp-grid.n3 { grid-template-columns: repeat(3, 1fr); } }
.cmp-col { border: 1px solid var(--border); border-radius: 18px; background: var(--bg-elev); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.cmp-col.win { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.cmp-col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.cmp-status { font-size: 12px; color: var(--muted); }
.cmp-status.ok { color: #1a9a52; } .cmp-status.bad { color: #e5484d; }
.cmp-body { padding: 12px 14px; font-size: 14px; max-height: 46vh; overflow: auto; }
.cmp-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.cmp-actions .gm-btn { padding: 7px 12px; font-size: 13px; }
.cmp-judge { border: 1px solid var(--accent); border-radius: 18px; background: var(--accent-soft); padding: 12px 16px; }
.cmp-judge-h { font-weight: 800; font-size: 14px; margin-bottom: 6px; color: var(--accent); }
.attach-btn.cmp-open svg { width: 20px; height: 20px; }

/* ---------- پروژه‌ها ---------- */
.proj-box { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.amirai-theme-flow .proj-box { display: none; }
.gm-proj { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--accent-soft); color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.gm-proj svg { width: 16px; height: 16px; }
.fl-lib { display: flex; flex-direction: column; gap: 1px; padding-inline-start: 8px; }
.fl-lib button { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #cfcfcf; font: 500 13px/1.2 inherit; font-family: inherit; text-align: start; cursor: pointer; }
.fl-lib button svg { width: 16px; height: 16px; flex: none; }
.fl-lib button:hover { background: #141414; }
.fl-lib .fl-empty-lib { padding: 6px 12px; color: #777; font-size: 12px; }
.proj-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.proj-head button { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.proj-head button:hover { background: var(--hover); color: var(--text); }
.proj-head svg { width: 15px; height: 15px; }
.proj-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: start; padding: 8px 10px; border-radius: 10px; color: var(--text); font-size: 14px; }
.proj-item:hover { background: var(--hover); }
.proj-item .pi-ico svg { width: 17px; height: 17px; color: var(--accent); display: block; }
.proj-item .pi-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-empty { padding: 6px 10px 8px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.proj-cur { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; background: var(--hover); }
.proj-cur button { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--accent); flex: none; }
.proj-cur button:hover { background: var(--border); }
.proj-cur svg { width: 17px; height: 17px; }
.proj-cur-name { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; }
.proj-cur-name span { display: flex; }
.proj-cur-name svg { color: var(--accent); }
.proj-cur-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-sub { padding: 4px 12px 2px; font-size: 12px; color: var(--muted); }
.pj-modal { max-height: 90vh; overflow: auto; text-align: start; }
.pj-l { display: block; margin: 12px 0 5px; font-size: 13px; font-weight: 600; }
.pj-ins { width: 100%; resize: vertical; min-height: 110px; line-height: 1.8; direction: rtl; font-size: 14px; letter-spacing: 0; }
.pj-files { display: flex; flex-direction: column; gap: 6px; }
.pj-file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 7px 10px; font-size: 13px; }
.pj-file svg { width: 16px; height: 16px; flex: none; color: var(--muted); display: block; }
.pj-fn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-file button { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.pj-file button:hover { background: var(--hover); color: var(--text); }
.pj-none { font-size: 12.5px; color: var(--muted); }
.pj-busy { font-size: 12.5px; color: var(--accent); margin-top: 6px; }
.modal .btn.danger { background: transparent; color: #e5484d; border: 1px solid rgba(229,72,77,.4); }
.pj-modal .field { text-align: start; }

.bot-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; font-size: 13px; color: var(--muted); }
.bot-btn:hover { background: var(--hover); color: var(--text); }
.bot-btn svg { width: 16px; height: 16px; flex: none; }
.bot-row { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.bot-name { display: flex; justify-content: space-between; align-items: center; }
.bot-st { font-size: 12px; color: var(--muted); }
.bot-st.on { color: #15803d; font-weight: 600; }
.bot-act { display: flex; flex-direction: column; gap: 8px; }
.bot-act .btn { text-align: center; text-decoration: none; }
.bot-code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; padding: 9px 12px; border-radius: 10px; background: var(--hover); text-align: center; user-select: all; }

/* ---------- پیشرفت ساخت فایل و بازی مارپله ---------- */
.fc-slot { display: block; }
.filecard.building { flex-wrap: wrap; }
.filecard.building .fc-meta { flex: 1; min-width: 180px; }
.fc-prog { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.fc-track { position: relative; flex: 1; max-width: 260px; height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.fc-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); transition: width .7s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.fc-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: fcsweep 1.4s ease-in-out infinite; }
@keyframes fcsweep { to { transform: translateX(100%); } }
.fc-pct { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; min-width: 38px; color: var(--accent); direction: ltr; }
.fc-stage { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.fc-play { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.fc-play:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.img-skel .fc-play { margin-inline-start: 10px; }

.gdock { position: fixed; z-index: 90; inset-inline-end: 18px; bottom: 96px; width: 360px; max-width: calc(100vw - 24px); display: none; flex-direction: column; gap: 8px; padding: 12px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .2s ease-out; direction: rtl; }
.gdock.show { display: flex; }
.g-head { display: flex; align-items: center; gap: 10px; }
.g-head b { font-size: 15px; }
.g-prog { flex: 1; display: flex; align-items: center; gap: 8px; }
.g-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; display: block; }
.g-bar u { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .5s; text-decoration: none; }
.g-pct { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); min-width: 34px; direction: ltr; text-align: end; }
.g-x { width: 28px; height: 28px; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--muted); }
.g-x:hover { background: var(--hover); color: var(--text); }
.g-task { font-size: 12.5px; color: var(--muted); }
.g-task.ok { color: #15803d; font-weight: 600; }
.g-board { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; direction: ltr; background: var(--bg); }
.g-board .sq.a { fill: color-mix(in srgb, var(--accent) 10%, var(--bg-elev)); }
.g-board .sq.b { fill: color-mix(in srgb, var(--accent) 3%, var(--bg-elev)); }
.g-board .num { font-size: 9px; fill: var(--muted); font-family: "Vazirmatn", system-ui, sans-serif; }
.g-board .rail { stroke: #b98b4a; stroke-width: 3; stroke-linecap: round; }
.g-board .rung { stroke: #d4a862; stroke-width: 2.4; stroke-linecap: round; }
.g-board .snake { fill: none; stroke-width: 7; stroke-linecap: round; opacity: .9; }
.g-board .snake.s0 { stroke: #e5484d; } .g-board .snake.s1 { stroke: #7c5cff; } .g-board .snake.s2 { stroke: #16a34a; }
.g-board .shead.s0 { fill: #e5484d; } .g-board .shead.s1 { fill: #7c5cff; } .g-board .shead.s2 { fill: #16a34a; }
.g-board .tok { stroke: #fff; stroke-width: 2.5; transition: transform .22s ease-out; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.g-board .tok.me { fill: #f97316; } .g-board .tok.cpu { fill: #3b82f6; }
.g-msg { min-height: 22px; font-size: 13.5px; text-align: center; font-weight: 600; }
.g-ctl { display: flex; align-items: center; justify-content: center; gap: 14px; }
.g-die { font-size: 44px; line-height: 1; }
.g-die.rolling { animation: gdie .14s linear infinite; }
@keyframes gdie { 50% { transform: rotate(18deg) scale(1.1); } }
.g-roll { padding: 10px 22px; border-radius: 99px; font-weight: 700; background: var(--accent); color: var(--accent-contrast); }
.g-roll[disabled] { opacity: .5; }
@media (max-width: 700px) { .gdock { inset-inline: 8px; bottom: 82px; width: auto; max-height: 72vh; } }

/* ---------- عملیات روی پیام کاربر: ارسال دوباره، ویرایش، کپی ---------- */
.msg.user .user-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 100%; }
.u-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg.user:hover .u-actions, .msg.user:focus-within .u-actions { opacity: 1; }
.u-actions button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.u-actions button:hover { background: var(--hover); color: var(--text); }
.u-actions svg { width: 15px; height: 15px; }
@media (hover: none) { .u-actions { opacity: 1; } }
.u-editbox { width: min(640px, 100%); border: 1px solid var(--border); background: var(--bg-elev); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.u-edit { width: 100%; resize: none; border: 0; outline: none; background: transparent; line-height: 1.7; font-size: 15px; min-height: 70px; }
.u-editrow { display: flex; gap: 8px; justify-content: flex-end; }
.u-editrow .btn { padding: 7px 16px; font-size: 13.5px; }
.amirai-theme-claude .msg.user .user-col { align-items: flex-end; }

/* انتخاب بازی و بازی مار */
.g-tabs { display: flex; gap: 6px; }
.g-tab { flex: 1; padding: 7px 10px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.g-tab.on { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.sn-hud { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.sn-wrap { position: relative; border-radius: 12px; overflow: hidden; direction: ltr; }
.sn-cv { display: block; width: 100%; aspect-ratio: 1; touch-action: none; background: #223328; }
.sn-ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(5, 20, 10, .66); color: #fff; text-align: center; padding: 16px; direction: rtl; }
.sn-ov.hide { display: none; }
.sn-ov b { font-size: 20px; } .sn-ov span { font-size: 12.5px; opacity: .85; }
.sn-ov button { margin-top: 6px; padding: 9px 26px; border-radius: 99px; border: 0; background: #22c55e; color: #052e16; font-weight: 800; font-size: 14px; cursor: pointer; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-areas: ". up ." "left . right" ". down ."; gap: 6px; justify-content: center; padding-top: 10px; direction: ltr; }
.sn-pad button { height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 16px; cursor: pointer; }
.sn-pad button:active { background: var(--accent); color: var(--accent-contrast); }
.sn-pad button:nth-child(1) { grid-area: up; } .sn-pad button:nth-child(2) { grid-area: left; } .sn-pad button:nth-child(3) { grid-area: right; } .sn-pad button:nth-child(4) { grid-area: down; }
@media (hover: hover) and (pointer: fine) { .sn-pad { display: none; } }

/* درصد روی خود تصویر در حال ساخت */
.img-skel { position: relative; }
.img-skel .is-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(34px, 9vw, 64px); font-weight: 800; letter-spacing: -.02em; color: var(--text); opacity: .85; pointer-events: none; text-shadow: 0 2px 20px var(--bg); }
.img-skel .is-bar { position: absolute; inset-inline: 0; bottom: 0; height: 5px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.img-skel .is-bar i { display: block; height: 100%; width: 0; background: var(--grad, var(--accent)); border-radius: 0 3px 3px 0; transition: width .9s ease; }

.img-skel .is-foot { position: absolute; inset-inline: 10px; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.img-skel { overflow: hidden; }
@media (max-width: 700px) {
	.gdock { overflow-y: auto; max-height: 80vh; }
	.sn-wrap { width: min(100%, 46vh); margin-inline: auto; }
	.sn-pad { grid-template-columns: repeat(4, 1fr); grid-template-areas: none; gap: 8px; padding-top: 8px; }
	.sn-pad button { grid-area: auto !important; height: 40px; }
	.sn-pad button:nth-child(1) { order: 2; } .sn-pad button:nth-child(2) { order: 1; } .sn-pad button:nth-child(3) { order: 4; } .sn-pad button:nth-child(4) { order: 3; }
}

/* انتقال گفتگو/پروژه به محیط دیگر */
.mv-box { max-width: 420px; }
.mv-note { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.mv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mv-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); color: var(--text); cursor: pointer; text-align: start; font-family: inherit; }
.mv-item:hover { background: var(--hover); border-color: var(--accent); }
.mv-ico svg { width: 24px; height: 24px; color: var(--accent); display: block; }
.mv-txt { display: flex; flex-direction: column; gap: 2px; }
.mv-txt b { font-size: 14.5px; } .mv-txt small { color: var(--muted); font-size: 12px; }

.top-move { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.top-move svg { width: 16px; height: 16px; }
.top-move:hover { background: var(--hover); }
@media (max-width: 700px) { .top-move span { display: none; } .top-move { padding: 8px; } }

/* مهارت‌ها */
.skill-chip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 2px 6px 4px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--text); font-size: 12.5px; font-weight: 600; max-width: 100%; }
.skill-chip .sc-ico svg { width: 15px; height: 15px; display: block; color: var(--accent); }
.skill-chip .sc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.skill-chip button svg { width: 12px; height: 12px; }
.skill-chip button:hover { background: var(--hover); }
.sk-open.on { color: var(--accent); }
.composer { position: relative; }
.sk-menu { position: absolute; inset-inline: 8px; bottom: calc(100% + 8px); z-index: 30; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; }
.sk-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: start; cursor: pointer; font-family: inherit; }
.sk-item.on, .sk-item:hover { background: var(--hover); }
.sk-i svg { width: 18px; height: 18px; color: var(--accent); display: block; }
.sk-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sk-t b, .sk-item > b { font-size: 14px; } .sk-t small, .sk-item > small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-t em, .sk-meta em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-inline-start: 6px; }
.sk-box { max-width: 520px; width: calc(100vw - 32px); max-height: 86vh; overflow-y: auto; }
.sk-box .field { width: 100%; margin-bottom: 10px; box-sizing: border-box; }
.sk-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sk-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); }
.sk-row.sample { border-style: dashed; }
.sk-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sk-meta b { font-size: 14.5px; } .sk-meta small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.sk-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.btn.sm { padding: 6px 14px; font-size: 12.5px; }
.sk-quota { color: var(--muted); font-size: 12.5px; padding-bottom: 8px; }
.sk-global { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 12px; }

.sk-title { display: flex; align-items: center; gap: 6px; }
.sk-box .btn svg { width: 16px; height: 16px; flex: none; }
.sk-box .row { display: flex; gap: 10px; margin-top: 4px; }
.sk-box .row .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 16px; border-radius: 99px; }
.sk-box .sk-acts .btn { flex: none; }
.sk-box .icon-btn { width: 32px; height: 32px; } .sk-box .icon-btn svg { width: 16px; height: 16px; }

/* میزگرد */
.rt-box { max-width: 900px; }
.rt-setup { display: flex; flex-direction: column; gap: 8px; }
.rt-row { display: flex; align-items: center; gap: 8px; }
.rt-row select, .rt-rounds select { flex: 1; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-family: inherit; font-size: 14px; }
.rt-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 12px; flex: none; }
.rt-ctr { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rt-rounds { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rt-rounds select { flex: none; padding: 7px 12px; }
.rt-seats { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 14px 0 6px; }
.rt-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-elev); transition: transform .25s, box-shadow .25s, border-color .25s; }
.rt-seat b { font-size: 13.5px; } .rt-seat small { color: var(--muted); font-size: 11.5px; }
.rt-seat.on { transform: translateY(-4px) scale(1.05); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
.rt-ava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.rt-ava svg { width: 24px; height: 24px; }
.rt-ava.sm { width: 34px; height: 34px; flex: none; } .rt-ava.sm svg { width: 18px; height: 18px; }
.rt-prog { position: relative; height: 22px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.rt-prog i { display: block; height: 100%; width: 0; background: var(--grad, var(--accent)); transition: width .5s ease; }
.rt-prog span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; }
.rt-feed { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.rt-msg { display: flex; gap: 10px; align-items: flex-start; }
.rt-body { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 16px; background: var(--hover); }
.rt-msg.c1 .rt-body { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.rt-msg.c2 .rt-body { background: color-mix(in srgb, #f59e0b 12%, var(--bg)); }
.rt-msg.c3 .rt-body { background: color-mix(in srgb, #10b981 12%, var(--bg)); }
.rt-who { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.rt-text { font-size: 14.5px; line-height: 1.9; }
.rt-mod { border: 1px solid var(--accent); border-radius: 16px; padding: 14px 16px; background: var(--accent-soft); }
.rt-mod-h { font-weight: 800; font-size: 14px; margin-bottom: 8px; color: var(--accent); }
.rt-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rt-feed { max-height: none; overflow: visible; }
.rt-run .rt-setup, .rt-run .cmp-q, .rt-run .cmp-note, .rt-run .rt-topic-gap { display: none; }
.rt-run .rt-seats { padding-top: 4px; }

/* بوم زنده */
.cb-live { color: var(--accent); font-weight: 700; }
.canvas-panel { width: min(48%, 760px); flex: none; display: flex; flex-direction: column; background: var(--bg-elev); border-inline-start: 1px solid var(--border); min-width: 0; direction: rtl; }
.cv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cv-title { flex: 1; min-width: 80px; font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-tabs { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--hover); }
.cv-tabs button { padding: 5px 14px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font: 700 12.5px/1.4 inherit; font-family: inherit; cursor: pointer; }
.cv-tabs button.on { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.cv-ver { padding: 5px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-family: inherit; font-size: 12px; }
.cv-stage { flex: 1; min-height: 0; display: flex; justify-content: center; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 0 0 / 18px 18px; overflow: auto; }
.cv-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.cv-frame.mobile { width: 390px; max-width: 100%; margin: 14px 0; height: calc(100% - 28px); border-radius: 22px; box-shadow: 0 0 0 8px #1c1c20, var(--shadow-lg); }
.cv-code { flex: 1; margin: 0; padding: 14px; overflow: auto; background: var(--code-bg); color: var(--code-text); font-size: 12.5px; line-height: 1.7; direction: ltr; text-align: left; white-space: pre; }
.cv-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.cv-foot .btn { display: inline-flex; align-items: center; gap: 6px; } .cv-foot .btn svg { width: 15px; height: 15px; }
.cv-hint { color: var(--muted); font-size: 11.5px; flex: 1; min-width: 160px; }
.cv-share { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--accent-soft); }
.cv-share input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); direction: ltr; font-size: 12px; }
@media (max-width: 900px) { .canvas-panel { position: fixed; inset: 0; width: auto; z-index: 85; } .app.canvas-open .main { display: none; } }
.cb-actions button, .cb-live span { white-space: nowrap; }
.cb-actions { flex-wrap: wrap; }
.cv-title { flex: 1 1 100px; }
.cv-tabs, .cv-head .icon-btn { flex: none; }
.cv-head .icon-btn { width: 32px; height: 32px; }
.cv-title { flex: 1 1 100%; order: -1; }
.cv-head .icon-btn:last-child { margin-inline-start: auto; }
.app.canvas-open .ws-switch { display: none; }

/* پادکست */
.pd-box { width: min(640px, 94vw); max-height: 90vh; overflow: auto; text-align: right; }
.pd-head { display: flex; align-items: center; justify-content: space-between; }
.pd-sub { color: var(--muted); font-size: 12.5px; line-height: 1.9; margin: 4px 0 10px; }
.pd-src { width: 100%; min-height: 120px; resize: vertical; }
.pd-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pd-status { margin: 10px 0 4px; }
.pd-feed { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 38vh; overflow: auto; }
.pd-line { padding: 9px 12px; border-radius: 14px; border: 1px solid var(--border); font-size: 13.5px; line-height: 1.9; cursor: pointer; display: flex; flex-direction: column; gap: 2px; opacity: .6; transition: opacity .2s, box-shadow .2s; }
.pd-line b { font-size: 11px; color: var(--muted); }
.pd-line.a { background: var(--accent-soft); margin-inline-end: 28px; }
.pd-line.b { background: var(--hover); margin-inline-start: 28px; }
.pd-line.ready { opacity: 1; }
.pd-line.busy { opacity: 1; animation: pdp 1s infinite alternate; }
.pd-line.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
@keyframes pdp { to { opacity: .55; } }
.pd-player { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.rs-box .rs-state { color: var(--accent); font-size: 13px; margin: 8px 0; min-height: 4px; }

/* مغز دوم */
.mm-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 40vh; overflow: auto; }
.mm-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--hover); }
.mm-t { flex: 1; font-size: 13.5px; line-height: 1.8; }
.mm-src { font-size: 10.5px; color: var(--muted); padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border); white-space: nowrap; }
.mm-item .icon-btn { width: 30px; height: 30px; flex: none; }
.pd-row .field { flex: 1; min-width: 160px; }

/* گفتگوی صوتی */
.vc-box { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(120% 90% at 50% 20%, var(--accent-soft), var(--bg) 70%); color: var(--text); overflow: auto; }
.vc-x { position: absolute; top: 14px; inset-inline-start: 14px; }
.vc-title { font-weight: 800; font-size: 15px; color: var(--muted); }
.vc-orb { position: relative; width: 150px; height: 150px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), #14b8a6); box-shadow: 0 10px 40px rgba(80, 70, 230, .35); transition: transform .2s; }
.vc-orb span { position: relative; z-index: 2; } .vc-orb span svg { width: 46px; height: 46px; }
.vc-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.vc-orb:active { transform: scale(.95); }
.vc-orb.listening i { animation: vcr 1.8s infinite; } .vc-orb.listening i:nth-child(2) { animation-delay: .6s; } .vc-orb.listening i:nth-child(3) { animation-delay: 1.2s; }
.vc-orb.speaking { animation: vcb .9s infinite alternate ease-in-out; }
.vc-orb.thinking { animation: vcs 1.2s infinite linear; filter: saturate(.7); }
.vc-orb.idle { filter: grayscale(.35); }
@keyframes vcr { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes vcb { to { transform: scale(1.1); box-shadow: 0 10px 60px rgba(20, 184, 166, .5); } }
@keyframes vcs { to { transform: rotate(360deg); } }
.vc-st { font-size: 13.5px; color: var(--muted); min-height: 22px; }
.vc-you { min-height: 28px; max-width: 560px; font-size: 16px; font-weight: 700; line-height: 1.9; }
.vc-bot { max-width: 620px; font-size: 15px; line-height: 2; color: var(--text); opacity: .85; max-height: 26vh; overflow: auto; }
.vc-left { font-size: 11.5px; color: var(--muted); }
.vc-end { margin-top: 6px; }

/* پژوهش عمیق */
.rs-box { width: min(760px, 95vw); }
.rs-map { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rs-root { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #14b8a6); color: #fff; font-size: 13.5px; line-height: 1.8; }
.rs-root svg { width: 18px; height: 18px; flex: none; }
.rs-branch { margin-inline-start: 18px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--hover); position: relative; }
.rs-branch::before { content: ''; position: absolute; inset-inline-end: -12px; top: 18px; width: 12px; border-top: 2px solid var(--border); }
.rs-branch.run { border-color: var(--accent); animation: pdp 1s infinite alternate; }
.rs-bq { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rs-bq svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.rs-bq b { flex: 1; font-weight: 700; direction: auto; }
.rs-bst { font-size: 11px; color: var(--muted); white-space: nowrap; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rs-chip { font-size: 11.5px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); text-decoration: none; direction: ltr; animation: rsin .35s both; }
@keyframes rsin { from { opacity: 0; transform: translateY(4px); } }
.rs-report { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; max-height: 50vh; overflow: auto; }
.rs-report sup a { color: var(--accent); font-weight: 700; text-decoration: none; padding: 0 2px; }
.rs-src { margin-top: 12px; } .rs-src h4 { margin: 0 0 6px; font-size: 13px; }
.rs-s { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.rs-s a { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-s small { color: var(--muted); direction: ltr; }

/* ===== کیف پول و درگاه پرداخت ===== */
.wl-sb small { margin-inline-start: auto; font-size: 11px; color: var(--accent); font-weight: 800; }
.wl-box { width: min(560px, 96vw); max-height: 92vh; overflow: auto; padding: 18px 18px 22px; text-align: right; }
.wl-card { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 20px 16px; color: #fff; margin: 4px 0 14px; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 45%, #0ea5e9 100%); box-shadow: 0 18px 40px -12px rgba(79, 70, 229, .55); }
.wl-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 40%); pointer-events: none; }
.wl-orb { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .55; }
.wl-orb.a { width: 150px; height: 150px; background: #22d3ee; top: -60px; inset-inline-start: -40px; }
.wl-orb.b { width: 130px; height: 130px; background: #f0abfc; bottom: -60px; inset-inline-end: -30px; }
.wl-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; }
.wl-chip svg { width: 16px; height: 16px; }
.wl-plan { font-size: 11.5px; font-weight: 800; padding: 4px 12px; border-radius: 99px; background: rgba(0,0,0,.22); }
.wl-bal { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 8px; margin: 14px 0 12px; }
.wl-bal b { font-size: 36px; font-weight: 900; letter-spacing: -.5px; line-height: 1.2; }
.wl-bal span { font-size: 13px; opacity: .85; }
.wl-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wl-stats > div { padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 1px; }
.wl-stats b { font-size: 15px; } .wl-stats small { font-size: 10.5px; opacity: .8; }
.wl-meter { position: relative; z-index: 1; height: 5px; border-radius: 9px; background: rgba(255,255,255,.22); margin-top: 12px; overflow: hidden; }
.wl-meter i { display: block; height: 100%; border-radius: 9px; background: #fff; }
.wl-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--hover); margin-bottom: 14px; }
.wl-tabs button { flex: 1; padding: 9px 6px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: 700 13px/1.4 inherit; font-family: inherit; cursor: pointer; transition: .2s; }
.wl-tabs button.on { background: var(--bg-elev); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.wl-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wl-pc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--bg-elev); }
.wl-pc.hot { border-color: transparent; background: linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box, linear-gradient(135deg, #7c3aed, #0ea5e9) border-box; box-shadow: 0 12px 30px -14px rgba(124,58,237,.6); }
.wl-pc.cur { outline: 2px solid var(--accent); outline-offset: 2px; }
.wl-ribbon { position: absolute; top: -9px; inset-inline-start: 12px; font-size: 10.5px; font-weight: 800; color: #fff; padding: 2px 10px; border-radius: 99px; background: linear-gradient(135deg, #7c3aed, #0ea5e9); }
.wl-pn { font-weight: 900; font-size: 15px; }
.wl-pp { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; } .wl-pp b { font-size: 21px; } .wl-pp span { font-size: 11px; color: var(--muted); }
.wl-pc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.wl-pc li { font-size: 12.3px; line-height: 1.7; color: var(--text); padding-inline-start: 18px; position: relative; }
.wl-pc li::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; width: 9px; height: 5px; border-inline-start: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.wl-cur { font-size: 12px; font-weight: 800; color: var(--accent); min-height: 18px; }
.wl-buy, .wl-pay { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border: 0; border-radius: 14px; color: #fff; font: 800 14px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; background: linear-gradient(135deg, #5b4ff0, #0ea5e9); box-shadow: 0 10px 24px -10px rgba(79,70,229,.7); transition: transform .15s, filter .15s; }
.wl-buy:hover, .wl-pay:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.wl-pay { width: 100%; margin-top: 14px; padding: 15px; font-size: 15px; }
.wl-pay:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.wl-pay svg { width: 17px; height: 17px; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.wl-chip2 { padding: 10px 16px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--bg-elev); color: var(--text); font: 800 13.5px/1 inherit; font-family: inherit; cursor: pointer; transition: .15s; }
.wl-chip2:hover { border-color: var(--accent); } .wl-chip2.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.wl-amt { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--bg-elev); color: var(--text); font: 800 18px/1 inherit; font-family: inherit; direction: ltr; text-align: center; box-sizing: border-box; }
.wl-amt:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.wl-hint { text-align: center; color: var(--muted); font-size: 12.5px; min-height: 22px; margin-top: 6px; }
.wl-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 12.3px; line-height: 1.9; }
.wl-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font: 700 12.5px/1 inherit; font-family: inherit; cursor: pointer; padding: 6px 0; margin-bottom: 8px; }
.wl-back svg { width: 15px; height: 15px; transform: scaleX(-1); }
.wl-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--hover); border: 1px solid var(--border); }
.wl-sum small { display: block; color: var(--muted); font-size: 11.5px; } .wl-sum b { font-size: 14.5px; }
.wl-sum-p { display: flex; align-items: baseline; gap: 5px; } .wl-sum-p b { font-size: 22px; color: var(--accent); } .wl-sum-p span { font-size: 11.5px; color: var(--muted); }
.wl-co h4 { margin: 16px 2px 8px; font-size: 13px; }
.wl-gws { display: flex; flex-direction: column; gap: 8px; }
.wl-gw { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--bg-elev); color: var(--text); text-align: right; cursor: pointer; font-family: inherit; transition: .15s; }
.wl-gw:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.wl-gw.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.wl-gw:disabled { opacity: .5; cursor: not-allowed; }
.wl-gb { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; font: 900 18px/1 inherit; flex: none; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
.wl-gb svg { width: 21px; height: 21px; }
.wl-gt { flex: 1; display: flex; flex-direction: column; gap: 2px; } .wl-gt b { font-size: 14px; } .wl-gt small { font-size: 11.5px; color: var(--muted); }
.wl-rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex: none; position: relative; }
.wl-gw.on .wl-rad { border-color: var(--accent); } .wl-gw.on .wl-rad::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.wl-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 11.5px; } .wl-secure svg { width: 14px; height: 14px; }
.wl-cc { position: relative; overflow: hidden; border-radius: 20px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #1f2937, #4c1d95 60%, #6d28d9); box-shadow: 0 16px 34px -14px rgba(76,29,149,.7); min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 14px; }
.wl-cc-b { font-weight: 800; opacity: .9; } .wl-cc-n { font: 800 21px/1.3 'Courier New', monospace; letter-spacing: 2px; text-align: left; margin: 14px 0 8px; position: relative; z-index: 1; } .wl-cc-h { font-size: 13px; opacity: .9; position: relative; z-index: 1; }
.wl-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.wl-steps > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 13px; background: var(--hover); font-size: 13px; }
.wl-steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.wl-steps strong { color: var(--accent); }
.wl-copy { margin-inline-start: auto; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 99px; padding: 5px 12px; font: 700 11.5px/1 inherit; font-family: inherit; cursor: pointer; }
.wl-co .field { margin-top: 8px; width: 100%; box-sizing: border-box; }
.wl-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 6px 8px; }
.wl-center h3 { margin: 8px 0 0; font-size: 18px; }
.wl-spin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: vcs 1s linear infinite; margin: 20px auto; }
.wl-done { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 14px 34px -10px rgba(34,197,94,.7); animation: wlpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.wl-done.wait { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 14px 34px -10px rgba(245,158,11,.7); } .wl-done.bad { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 14px 34px -10px rgba(239,68,68,.7); }
.wl-done svg { width: 42px; height: 42px; }
@keyframes wlpop { from { transform: scale(.3); opacity: 0; } }
.wl-hist { display: flex; flex-direction: column; gap: 8px; } .wl-hist h4 { margin: 10px 2px 2px; font-size: 13px; }
.wl-tx { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev); }
.wl-tx > div:first-child { display: flex; flex-direction: column; gap: 2px; } .wl-tx small { color: var(--muted); font-size: 11.5px; }
.wl-amt2 { font-weight: 900; font-size: 14.5px; } .wl-amt2.pos { color: #16a34a; } .wl-amt2.neg { color: #dc2626; }
.wl-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .wl-plans { grid-template-columns: 1fr; } .wl-box { padding: 14px; } .wl-bal b { font-size: 30px; } }
.modal.wl-box { max-width: 580px; width: min(580px, 96vw); }
.wl-pc li { font-size: 12px; }

/* ---------- مربی گفتار ---------- */
.vc-timer { font-size: 13px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.co-pg { position: absolute; inset: 0; z-index: 30; background: var(--bg); overflow: auto; padding: 22px 16px 56px; }
.co-pg-in { max-width: 760px; margin: 0 auto; }
.co-box { text-align: right; }
.co-back { margin-bottom: 8px; }
.co-box .m-logo { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 17px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.co-box .m-logo svg { width: 29px; height: 29px; }
.co-box > p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.co-box h3 { margin: 4px 0 6px; text-align: center; }
.co-box > p { text-align: center; }
.co-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.co-card { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: right; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.co-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.co-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.co-card b { font-size: 13.5px; }
.co-card small { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.co-card em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--hover); color: var(--muted); margin-top: auto; }
.co-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.co-card.on .co-ic { background: var(--accent); color: #fff; }
.co-ic svg { width: 18px; height: 18px; }
.co-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.co-seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--hover); gap: 2px; }
.co-seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 99px; cursor: pointer; }
.co-seg button.on { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.co-lbl { display: block; font-size: 13px; color: var(--muted); margin: 6px 0; }
.co-go { width: 100%; justify-content: center; margin: 12px 0 8px; }
.co-prog { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.co-prog:empty { display: none; }
.co-ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.co-ph b { display: block; font-size: 14px; }
.co-ph small { color: var(--muted); font-size: 12px; }
.co-spark { width: 120px; height: 34px; color: var(--accent); }
.co-hist { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: right; }
.co-hist:hover { background: var(--hover); }
.co-hist .co-ht { flex: 1; font-size: 13.5px; font-weight: 600; }
.co-hist small { color: var(--muted); font-size: 11.5px; }
.co-mini { min-width: 36px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; font-size: 13px; color: #fff; }
.co-mini.good, .co-track i.good { background: #16a34a; }
.co-mini.mid, .co-track i.mid { background: #d97706; }
.co-mini.low, .co-track i.low { background: #dc2626; }
.co-top { display: flex; gap: 18px; align-items: center; margin: 8px 0 16px; }
.co-top-t { flex: 1; }
.co-top-t h3 { text-align: right; margin: 0 0 6px; }
.co-sum { font-size: 14px; line-height: 1.95; color: var(--text); }
.co-delta { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--hover); color: var(--muted); }
.co-delta.up { background: color-mix(in srgb, #16a34a 16%, transparent); color: #16a34a; }
.co-delta.down { background: color-mix(in srgb, #dc2626 14%, transparent); color: #dc2626; }
.co-ring { --c: #16a34a; flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--bg-elev) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--hover) 0); }
.co-ring.mid { --c: #d97706; } .co-ring.low { --c: #dc2626; }
.co-ring b { font-size: 34px; line-height: 1; }
.co-ring small { font-size: 11px; color: var(--muted); }
.co-bars { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.co-bar { display: grid; grid-template-columns: 112px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.co-bar b { text-align: left; font-size: 13px; }
.co-track { height: 9px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.co-track i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.co-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 8px; }
.co-chipst { padding: 9px 4px; border-radius: 14px; background: var(--hover); text-align: center; }
.co-chipst b { display: block; font-size: 16px; }
.co-chipst small { font-size: 10.5px; color: var(--muted); line-height: 1.5; display: block; }
.co-sec { margin-top: 14px; }
.co-sec h4 { margin: 0 0 8px; font-size: 14px; }
.co-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.co-list li { position: relative; padding-inline-start: 22px; font-size: 13.5px; line-height: 1.9; }
.co-list.ok li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: #16a34a; font-weight: 800; }
.co-imp { padding: 10px 12px; border-radius: 14px; background: var(--hover); margin-bottom: 8px; }
.co-imp b { font-size: 13.5px; }
.co-imp p { margin: 4px 0 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.co-rw { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.co-said { padding: 9px 12px; font-size: 13px; color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, #dc2626 55%, transparent); }
.co-better { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: 13.5px; font-weight: 700; background: color-mix(in srgb, #16a34a 10%, transparent); }
.co-next { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.9; }
.co-next b { color: var(--accent); }
.co-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.co-wait { text-align: center; }
.co-wait .typing { display: inline-flex; margin: 10px 0; }
@media (max-width: 560px) {
	.co-grid { grid-template-columns: repeat(2, 1fr); }
	.co-top { flex-direction: column; text-align: center; }
	.co-top-t h3 { text-align: center; }
	.co-bar { grid-template-columns: 88px 1fr 28px; }
	.co-chips { grid-template-columns: repeat(3, 1fr); }
}

.co-pg-in.wide { max-width: 1100px; }
.co-pg .modal, .co-pg .cmp-box { position: static; width: auto !important; max-width: none !important; max-height: none !important; overflow: visible; background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; animation: none; display: block; }
.co-pg .cmp-box { display: flex; flex-direction: column; }
.co-pg .wl-box, .co-pg .pj-modal { padding: 0; }

/* ---------- حالت مطالعه ---------- */
.st-root h3 { margin: 4px 0 6px; }
.st-build { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-elev); }
.st-ta { min-height: 130px; }
.st-brow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.st-cnt { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.st-cnt select { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; padding: 6px 10px; }
.st-files { display: flex; flex-wrap: wrap; gap: 6px; }
.st-files:empty { display: none; }
.st-file { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 99px; background: var(--hover); font-size: 12.5px; }
.st-file button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.st-file svg { width: 12px; height: 12px; }
.st-go { width: 100%; justify-content: center; }
.st-status { min-height: 18px; text-align: center; }
.st-lh { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 8px; }
.st-lh small { color: var(--muted); font-size: 12px; }
.st-list { display: flex; flex-direction: column; gap: 8px; }
.st-deck { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); color: var(--text); font: inherit; text-align: right; cursor: pointer; transition: border-color .15s, transform .15s; }
.st-deck:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.st-dt b { display: block; font-size: 14.5px; }
.st-dt small { color: var(--muted); font-size: 12px; }
.st-dr { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-width: 128px; }
.st-due { font-size: 11.5px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.st-ok { font-size: 11.5px; color: #16a34a; font-weight: 700; }
.st-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: #16a34a; border-radius: 99px; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.st-top .co-back { margin-bottom: 0; }
.st-acts { display: flex; gap: 4px; }
.st-title { margin: 6px 0 12px !important; text-align: right !important; font-size: 21px; }
.st-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.st-tabs button { flex: 1; }
.st-sum { margin: 0 0 14px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 2; }
.st-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.st-all { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px; }
.st-all summary { cursor: pointer; padding: 8px 0; font-weight: 700; font-size: 14px; }
.st-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.9; }
.st-row b { font-weight: 700; } .st-row span { color: var(--muted); } .st-row small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.st-prog { height: 5px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-bottom: 16px; }
.st-prog i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.st-cnt2 { color: var(--muted); font-size: 13px; font-weight: 700; }
.st-flash { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 28px 22px; border: 1px solid var(--border); border-radius: 24px; background: var(--bg-elev); box-shadow: var(--shadow); cursor: pointer; margin-bottom: 14px; }
.st-q { font-size: 20px; font-weight: 800; line-height: 2; }
.st-ans { font-size: 16px; line-height: 2.1; color: var(--text); padding-top: 16px; border-top: 1px dashed var(--border); width: 100%; animation: fade .2s; }
.st-rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-rate button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font: inherit; cursor: pointer; }
.st-rate button small { font-size: 11px; color: var(--muted); }
.st-rate .bad:hover { background: color-mix(in srgb, #dc2626 12%, transparent); border-color: #dc2626; }
.st-rate .mid:hover { background: color-mix(in srgb, #d97706 12%, transparent); border-color: #d97706; }
.st-rate .good:hover { background: color-mix(in srgb, #16a34a 12%, transparent); border-color: #16a34a; }
.st-qq { font-size: 18px; font-weight: 800; line-height: 2.1; margin: 4px 0 16px; }
.st-opts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.st-opt { text-align: right; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.9; cursor: pointer; transition: background .15s, border-color .15s; }
.st-opt:hover { border-color: var(--accent); }
.st-opt.ok { background: color-mix(in srgb, #16a34a 16%, transparent); border-color: #16a34a; }
.st-opt.bad { background: color-mix(in srgb, #dc2626 14%, transparent); border-color: #dc2626; }
.st-opt.dim { opacity: .55; }
.st-exp { padding: 12px 14px; border-radius: 14px; background: var(--hover); font-size: 13.5px; line-height: 2; margin-bottom: 12px; }
.st-h { margin: 14px 0 8px; font-size: 14px; }
.st-dist { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; text-align: center; }
.st-dcol { display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; }
.st-dcol i { display: block; width: 70%; border-radius: 8px 8px 0 0; background: var(--accent); }
.st-dcol b { font-size: 14px; } .st-dcol small { font-size: 10.5px; color: var(--muted); }
.st-spark { text-align: center; margin: 6px 0 10px; } .st-spark .co-spark { width: 220px; height: 56px; }
@media (max-width: 560px) { .st-chips { grid-template-columns: repeat(2, 1fr); } .st-row { grid-template-columns: 1fr; gap: 2px; } .st-dr { min-width: 96px; } .st-dist { gap: 4px; } }

/* ---------- ورودی پیام در موبایل: متن در یک خط کامل، دکمه‌ها زیر آن ---------- */
@media (max-width: 640px) {
	.composer-row { flex-wrap: wrap; align-items: center; row-gap: 2px; column-gap: 2px; }
	.composer-row textarea { order: -1; flex: 1 1 100%; width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; font-size: 16px; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 4px; }
	.composer-row .attach-btn { width: 38px; height: 38px; }
	.composer-row .model-picker { margin-inline-start: auto; min-width: 0; }
	.composer-row .send-btn { margin-inline-start: 4px; }
	.composer { padding: 6px 8px 8px; }
}

/* ---------- پایان‌نامه ---------- */
.th-root { max-width: 1040px; margin: 0 auto; }
.th-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.th-h { margin: 0; font-size: 22px; } .th-sub { color: var(--text-dim, var(--muted, #777)); font-size: 13.5px; }
.th-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.th-title { flex: 1; font-weight: 700; font-size: 16px; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-status { font-size: 12px; color: var(--text-dim, #888); }
.th-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.th-tab { flex: none; border: 0; background: transparent; padding: 9px 14px; border-radius: 99px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.th-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.th-pane { display: flex; flex-direction: column; gap: 12px; }
.th-sec-t { font-weight: 700; font-size: 15px; margin-top: 10px; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 14px; }
.th-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.th-fl { font-size: 13px; color: var(--text-dim, #777); }
.th-hint { font-size: 12px; color: var(--text-dim, #888); line-height: 1.7; }
.th-in, .th-sel, .th-ta, .th-edit { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font: inherit; font-size: 14.5px; }
.th-ta, .th-edit { resize: vertical; line-height: 1.9; }
.th-edit { min-height: 420px; font-size: 15px; }
.th-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .th-row > .th-f, .th-row > .th-in, .th-row > textarea { flex: 1 1 220px; }
.th-grow { flex: 1; }
.th-chk { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.th-list, .th-reflist { display: flex; flex-direction: column; gap: 10px; }
.th-card, .th-item, .th-ref { border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: var(--bg-elev); display: flex; flex-direction: column; gap: 8px; }
.th-card-t { font-weight: 700; } .th-card-m { font-size: 13px; color: var(--text-dim, #777); } .th-card-a { display: flex; gap: 8px; }
.th-new { border: 1px dashed var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.th-chs { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.th-side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 8px; }
.th-ch { display: flex; gap: 6px; align-items: baseline; text-align: right; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.th-ch.on { border-color: var(--accent); background: var(--accent-soft); } .th-ch span { flex: 1; } .th-ch small { color: var(--text-dim, #888); font-size: 11px; }
.th-total { font-size: 12px; color: var(--text-dim, #888); margin-top: 6px; }
.th-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.th-tools, .th-ctr { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.th-tb { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 10px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.th-tb:hover { border-color: var(--accent); color: var(--accent); }
.th-wc { font-size: 12px; color: var(--text-dim, #888); margin-inline-start: auto; }
.th-pv { border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; background: #fff; color: #111; line-height: 2; font-size: 15px; min-height: 300px; }
.th-pv h2, .th-pv h3, .th-pv h4 { margin: 16px 0 6px; } .th-pv blockquote { margin: 8px 24px; font-style: italic; } .th-pv figure { margin: 12px 0; text-align: center; } .th-pv figcaption, .th-cap { font-weight: 700; font-size: 13px; text-align: center; margin: 6px 0; }
.th-t3 { width: 100%; border-collapse: collapse; border-top: 2px solid #000; border-bottom: 2px solid #000; font-size: 13px; } .th-t3 th { border-bottom: 1px solid #000; padding: 5px 8px; } .th-t3 td { padding: 4px 8px; text-align: center; }
.th-note { font-size: 12px; margin-top: 4px; } .th-warn { color: #b3261e; font-size: 13.5px; line-height: 1.8; }
.th-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.th-pk { display: flex; gap: 10px; text-align: right; align-items: baseline; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 13px; cursor: pointer; } .th-pk:hover { border-color: var(--accent); } .th-pk b { flex: none; color: var(--accent); }
.th-pop-bg { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 14px; }
.th-pop { background: var(--bg, #fff); color: var(--text); border-radius: 20px; padding: 18px; width: min(720px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.th-pop-t { display: flex; justify-content: space-between; align-items: center; } .th-x { border: 0; background: transparent; font-size: 24px; color: var(--text); cursor: pointer; }
.th-out { min-height: 220px; }
.th-ref-t code { direction: ltr; unicode-bidi: embed; font-size: 12px; color: var(--accent); } .th-ref-b { line-height: 1.9; font-size: 14px; }
.th-chips { display: flex; gap: 6px; flex-wrap: wrap; } .th-chip { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; } .th-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.th-scroll { overflow: auto; max-width: 100%; } .th-dt { border-collapse: collapse; font-size: 12.5px; } .th-dt th, .th-dt td { border: 1px solid var(--border); padding: 4px 8px; white-space: nowrap; } .th-dt th { background: var(--accent-soft); }
.th-prev { margin: 4px 0; } .th-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.th-res { display: flex; flex-direction: column; gap: 10px; } .th-restitle { font-weight: 700; } .th-interp { line-height: 2; font-size: 14.5px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.th-advice { font-size: 13.5px; line-height: 1.9; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--accent); }
.th-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; } .th-chart { background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--border); } .th-chart svg { max-width: 100%; height: auto; display: block; }
.th-checks { display: flex; flex-direction: column; gap: 4px; } .th-chk-i { font-size: 14px; } .th-chk-i.ok { color: #1b7a43; } .th-chk-i.no { color: #b3261e; }
@media (max-width: 760px) { .th-chs { grid-template-columns: 1fr; } .th-side { position: static; } .th-edit { min-height: 320px; } }

/* ---------- درون‌ریزی (2.13) ---------- */
.im-root { max-width: 820px; margin: 0 auto; text-align: right; }
.im-head { margin-bottom: 14px; } .im-h { margin: 0 0 4px; font-size: 21px; } .im-sub { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.im-drop { border: 2px dashed var(--border); border-radius: 18px; padding: 30px 18px; text-align: center; cursor: pointer; background: var(--bg-elev); transition: border-color .15s, background .15s; }
.im-drop:hover, .im-drop.on, .im-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: 0; }
.im-drop-t { font-weight: 700; font-size: 15.5px; margin-bottom: 6px; } .im-drop-s { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.im-sec-t { font-weight: 700; font-size: 15px; margin: 18px 0 8px; } .im-sec { margin-top: 12px; }
.im-hows { display: flex; flex-direction: column; gap: 8px; }
.im-how { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; background: var(--bg-elev); }
.im-how summary { cursor: pointer; font-size: 14px; } .im-how ol { margin: 8px 0 6px; padding-inline-start: 20px; font-size: 13.5px; line-height: 2; }
.im-note { font-size: 12.5px; color: var(--muted); line-height: 1.9; margin: 6px 0; }
.im-err { background: rgba(220, 60, 60, .12); color: #d33; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin: 10px 0; line-height: 1.8; }
.im-status { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0; }
.im-sum { font-size: 14px; margin: 8px 0 12px; }
.im-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; max-height: 46vh; overflow-y: auto; margin-top: 8px; }
.im-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.im-row:last-child { border-bottom: 0; } .im-row:hover { background: var(--hover); }
.im-row input, .im-prow input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.im-rt { display: flex; flex-direction: column; min-width: 0; } .im-rtt { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .im-rts { font-size: 12px; color: var(--muted); }
.im-prow { display: flex; gap: 10px; align-items: center; margin: 6px 0; flex-wrap: wrap; } .im-prow .th-in { flex: 1 1 200px; width: auto; }
.im-acts { display: flex; gap: 8px; margin-top: 8px; } .im-foot { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.im-bar { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; margin: 16px 0 6px; } .im-bar-i { height: 100%; width: 0; background: var(--grad, var(--accent)); transition: width .25s; }
.im-res { line-height: 2.1; font-size: 14.5px; padding-inline-start: 20px; }

/* ---------- منابع آنلاین ---------- */
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: hbspin .7s linear infinite; vertical-align: -3px; }
@keyframes hbspin { to { transform: rotate(360deg); } }
.attach-btn.hb-open.on { color: var(--accent); background: var(--accent-soft); }
.hb-chip button { margin-inline-start: 6px; }
.hb-chip svg { width: 15px; height: 15px; vertical-align: -3px; }
.composer { position: relative; }
.hb-menu { position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0; width: min(340px, 94vw); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.25); z-index: 40; display: flex; flex-direction: column; gap: 4px; animation: pop .15s ease; }
.hb-mh { font-size: 12px; color: var(--muted); padding: 6px 8px 8px; line-height: 1.8; }
.hb-menu button { text-align: right; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; color: var(--text); }
.hb-menu button:hover, .hb-menu button.on { background: var(--accent-soft); }
.hb-menu button b { font-size: 13.5px; } .hb-menu small { color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.hb-menu .hb-all { color: var(--accent); font-size: 13px; font-weight: 600; flex-direction: row; justify-content: center; }
.hb-st { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.hb-st svg, .hb-uc svg { width: 15px; height: 15px; }
.hb-used { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hb-uc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; border: 1px solid var(--border); color: var(--muted); }
.hb-uc.ok { color: #12a05c; border-color: color-mix(in srgb, #12a05c 45%, var(--border)); }
.hb-uc.bad { color: #d92d20; border-color: color-mix(in srgb, #d92d20 45%, var(--border)); }
.hb-uc.run { opacity: .7; }
.hb-ask { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); }
.hb-ask-i { display: flex; flex-direction: column; gap: 2px; font-size: 13px; } .hb-ask-i code { direction: ltr; text-align: left; font-size: 11.5px; color: var(--muted); }
.hb-ask-b { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-root { text-align: right; }
.hb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hb-h { margin: 0 0 4px; font-size: 20px; } .hb-sub { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.hb-quota { flex: none; font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; }
.hb-search { width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font: inherit; margin-bottom: 10px; }
.hb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hb-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border); font-size: 13px; color: var(--text); }
.hb-tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); font-weight: 600; }
.hb-list { display: grid; gap: 8px; }
.hb-card { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); overflow: hidden; }
.hb-card.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.hb-ct { width: 100%; text-align: right; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.hb-ct b { font-size: 13.5px; line-height: 1.8; } .hb-ct code { direction: ltr; text-align: left; font-size: 11px; color: var(--muted); }
.hb-form { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.hb-desc { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.hb-fs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.hb-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.hb-f > span { color: var(--muted); direction: ltr; text-align: right; }
.hb-f input[type=text], .hb-f input[type=number], .hb-f select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.hb-f small { color: var(--muted); font-size: 11px; line-height: 1.7; }
.hb-act { display: flex; gap: 8px; }
.hb-out { display: flex; flex-direction: column; gap: 10px; }
.hb-note { margin: 0; font-size: 11.5px; color: var(--muted); }
.hb-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-bar .gm-btn { padding: 7px 14px; font-size: 13px; }
.hb-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; } .hb-empty.bad { color: #d92d20; }
.hb-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.hb-tbl { border-collapse: collapse; width: 100%; font-size: 12px; }
.hb-tbl th, .hb-tbl td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: top; }
.hb-tbl td { white-space: normal; min-width: 70px; max-width: 320px; }
.hb-tbl th { background: var(--hover); font-weight: 600; direction: ltr; }
.hb-dl { margin: 0; display: grid; gap: 4px; font-size: 12.5px; } .hb-dl.in { margin-inline-start: 6px; padding-inline-start: 10px; border-inline-start: 2px solid var(--border); }
.hb-kv { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .hb-kv.big { flex-direction: column; align-items: stretch; gap: 2px; }
.hb-kv dt { color: var(--muted); direction: ltr; font-size: 11.5px; min-width: 90px; } .hb-kv dd { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hb-ul { margin: 0; padding-inline-start: 18px; font-size: 12.5px; } .hb-nil { color: var(--muted); }

/* ---------- دکمه‌ی «+» و منوی ابزارهای ورودی ---------- */
.plus-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s, transform .2s; }
.plus-btn svg { width: 20px; height: 20px; }
.plus-btn:hover { background: var(--hover); color: var(--text); }
.plus-btn[aria-expanded="true"] { transform: rotate(45deg); color: var(--accent); background: var(--accent-soft); }
.plus-btn.on { color: var(--accent); }
.plus-menu { display: none; position: absolute; bottom: calc(100% + 10px); inset-inline-start: 0; width: min(260px, 92vw); padding: 6px; flex-direction: column; gap: 2px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 16px 44px rgba(0,0,0,.28); z-index: 45; }
.plus-menu.open { display: flex; animation: pop .15s ease; }
.plus-menu .attach-btn { direction: rtl; width: 100%; height: auto; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; color: var(--text); text-align: start; }
.plus-menu .attach-btn[style*="display: none"], .plus-menu .attach-btn[style*="display:none"] { display: none !important; }
.plus-menu .attach-btn svg { width: 19px; height: 19px; flex: none; color: var(--muted); }
.plus-menu .attach-btn::after { content: attr(aria-label); font-size: 13.5px; font-weight: 500; }
.plus-menu .attach-btn:hover { background: var(--hover); }
.plus-menu .attach-btn:hover svg, .plus-menu .attach-btn.on svg { color: var(--accent); }
.plus-menu .attach-btn.on { background: var(--accent-soft); }

/* ---------- کادر گرادیانت چرخشیِ ۶ رنگ دور باکس‌های پیام ---------- */
@property --amirai-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes amirai-gb-spin { to { --amirai-ang: 360deg; } }
.composer, .u-editbox { position: relative; border-color: transparent !important; }
.composer::before, .u-editbox::before {
	content: ''; position: absolute; inset: -1px; padding: 2px; border-radius: inherit; pointer-events: none; z-index: 0;
	background: conic-gradient(from var(--amirai-ang), #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
	animation: amirai-gb-spin 4s linear infinite; opacity: .9;
}
.composer:focus-within::before, .u-editbox:focus-within::before { opacity: 1; animation-duration: 2.4s; }
@media (prefers-reduced-motion: reduce) { .composer::before, .u-editbox::before { animation: none; } }

/* ---------- داشبورد نمای کلی (بازار و بورس) ---------- */
.hd-root { margin-bottom: 18px; display: flex; flex-direction: column; gap: 14px; }
.hd-load, .hd-none { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.hd-warn { padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.hd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hd-age { font-size: 11.5px; color: var(--muted); }
.hd-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.hd-live { width: 8px; height: 8px; border-radius: 50%; background: #16c784; box-shadow: 0 0 0 0 rgba(22,199,132,.6); animation: hdpulse 1.8s infinite; }
@keyframes hdpulse { 70% { box-shadow: 0 0 0 9px rgba(22,199,132,0); } 100% { box-shadow: 0 0 0 0 rgba(22,199,132,0); } }
.hd-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; background: var(--hover); }
.hd-seg button { padding: 6px 14px; border-radius: 99px; font-size: 12.5px; color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.hd-seg button.on { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 6px rgba(0,0,0,.18); }
.hd-seg.sm button { padding: 4px 11px; font-size: 12px; }
.hd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.hd-card, .hd-dc { position: relative; text-align: right; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 10px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, var(--bg-elev)), var(--bg-elev)); overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
.hd-card { cursor: pointer; } .hd-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.hd-card.on { border-color: color-mix(in srgb, var(--accent) 65%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 10px 30px color-mix(in srgb, var(--accent) 14%, transparent); }
.hd-ch { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hd-cp { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; } .hd-cp small, .hd-kv small { font-size: 11px; font-weight: 500; color: var(--muted); }
.hd-sp { width: 100%; height: 34px; display: block; }
.hd-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.hd-chip.up { color: #16c784; background: rgba(22,199,132,.12); } .hd-chip.down { color: #ea3943; background: rgba(234,57,67,.12); } .hd-chip.flat { color: var(--muted); background: var(--hover); }
.hd-panel { padding: 16px 16px 14px; border-radius: 22px; border: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--bg-elev)), var(--bg-elev)); }
.hd-panel h3 { margin: 0 0 10px; font-size: 14px; }
.hd-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .hd-ph h3 { margin: 0 0 4px; font-size: 15px; }
.hd-pv { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; } .hd-pv small { font-size: 12px; color: var(--muted); font-weight: 500; }
.hd-cv { position: relative; height: 260px; touch-action: pan-y; cursor: crosshair; }
.hd-cv svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hd-gl { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.hd-cx { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: 0; pointer-events: none; transition: opacity .12s; }
.hd-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: currentColor; border: 2px solid var(--bg); opacity: 0; pointer-events: none; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent); }
.hd-tip { position: absolute; top: 4px; opacity: 0; pointer-events: none; padding: 6px 11px; border-radius: 12px; background: #12141f; color: #fff; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 22px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 1px; font-size: 12px; transition: opacity .12s; white-space: nowrap; z-index: 2; } .hd-tip b { font-size: 13px; direction: ltr; } .hd-tip span { opacity: .75; font-size: 11px; }
.hd-ax { position: absolute; font-size: 10.5px; color: var(--muted); pointer-events: none; background: color-mix(in srgb, var(--bg-elev) 70%, transparent); padding: 0 4px; border-radius: 6px; font-variant-numeric: tabular-nums; direction: ltr; }
.hd-ax.hi { top: 0; inset-inline-end: 4px; } .hd-ax.lo { bottom: 18px; inset-inline-end: 4px; } .hd-ax.l { bottom: -2px; inset-inline-start: 2px; } .hd-ax.r { bottom: -2px; inset-inline-end: 2px; }
.hd-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; } .hd-stats > div { flex: 1; min-width: 92px; padding: 8px 12px; border-radius: 14px; background: var(--hover); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; } .hd-stats small { color: var(--muted); font-size: 11px; }
.hd-sub { margin: 4px 2px 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.hd-der { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.hd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hd-kpi { padding: 12px 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-elev); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .hd-kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.hd-kpi.lead { grid-column: span 2; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 16%, var(--bg-elev)), var(--bg-elev)); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.hd-kv { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .hd-kpi.lead .hd-kv { font-size: 30px; letter-spacing: -.02em; } .hd-kv.sm { font-size: 16px; }
.hd-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.hd-gwrap { position: relative; width: 190px; margin: 0 auto 6px; } .hd-gauge { width: 100%; display: block; } .hd-gl2 { position: absolute; inset: 34px 0 0; display: flex; flex-direction: column; align-items: center; } .hd-gl2 b { font-size: 26px; line-height: 1; } .hd-gl2 small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.hd-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin-top: 8px; } .hd-stack i { display: block; min-width: 3px; }
.hd-lg, .hd-lg2 { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; color: var(--muted); } .hd-lg2 b { color: var(--text); }
.hd-mv { margin-bottom: 9px; } .hd-mv i { display: block; height: 4px; border-radius: 99px; margin-top: 5px; opacity: .85; }
.hd-mvh { display: flex; align-items: center; gap: 8px; font-size: 13px; } .hd-mvh b { flex: 1; } .hd-mvh span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; } .hd-mvh.row { padding: 7px 0; border-bottom: 1px solid var(--border); } .hd-mvh.row:last-child { border: 0; }
@media (max-width: 640px) { .hd-cv { height: 210px; } .hd-kpi.lead { grid-column: span 1; } .hd-cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- فرم‌ها: هم‌ارتفاع و حلقه‌ی چرخشیِ ۶ رنگ هنگام فوکوس ---------- */
.th-in, .th-sel { height: 46px; min-height: 0; resize: none; line-height: 1.4; }
.th-grid .th-in, .th-grid .th-sel { height: 46px; }
.th-in, .th-sel, .th-ta, .th-edit, .cmp-q {
	border: 2px solid transparent !important; outline: 0;
	background: linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box, linear-gradient(var(--border), var(--border)) border-box;
	transition: box-shadow .2s;
}
.th-in:focus, .th-sel:focus, .th-ta:focus, .th-edit:focus, .cmp-q:focus {
	background: linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box, conic-gradient(from var(--amirai-ang), #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981) border-box;
	animation: amirai-gb-spin 3s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .th-in:focus, .th-sel:focus, .th-ta:focus, .th-edit:focus, .cmp-q:focus { animation: none; } }

/* ---------- بانک داده ---------- */
.db-root { position: relative; text-align: right; min-height: 60vh; }
.dbt-dataset { --tc: 158 55% 42%; } .dbt-book { --tc: 24 85% 52%; } .dbt-notes { --tc: 212 80% 55%; } .dbt-paper { --tc: 272 55% 58%; } .dbt-drawing { --tc: 346 72% 55%; }
.dbt-model3d { --tc: 188 70% 40%; } .dbt-slides { --tc: 42 90% 48%; } .dbt-image { --tc: 318 60% 55%; } .dbt-code { --tc: 100 45% 40%; } .dbt-other { --tc: 222 12% 52%; }
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.db-title { display: flex; align-items: center; gap: 12px; } .db-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad, var(--accent)); color: #fff; flex: none; }
.db-h { margin: 0; font-size: 22px; } .db-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.db-head-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .db-quota { font-size: 12.5px; color: var(--muted); background: var(--hover); padding: 6px 12px; border-radius: 99px; }
.db-add { display: inline-flex; align-items: center; gap: 6px; }
.db-sbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.db-qwrap { position: relative; flex: 1 1 260px; min-width: 0; } .db-qi { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.db-q { width: 100%; box-sizing: border-box; padding: 13px 16px; padding-inline-start: 42px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); color: inherit; font: inherit; font-size: 15px; }
.db-q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.db-sel { padding: 11px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev); color: inherit; font: inherit; font-size: 13px; }
.db-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; } .db-seg-b { border: 0; background: var(--bg-elev); color: var(--muted); padding: 9px 11px; cursor: pointer; display: grid; place-items: center; } .db-seg-b.on { background: var(--accent-soft); color: var(--accent); }
.db-filter-btn { display: none; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--bg-elev); color: inherit; padding: 10px 14px; border-radius: 12px; font: inherit; font-size: 13px; cursor: pointer; }
.db-types { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.db-tchip { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--border); background: var(--bg-elev); color: inherit; padding: 8px 13px; border-radius: 99px; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.db-tchip svg { color: hsl(var(--tc, 222 12% 52%)); } .db-tchip em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.db-tchip:hover { border-color: hsl(var(--tc, 222 70% 55%) / .6); } .db-tchip.on { background: hsl(var(--tc, 222 70% 55%) / .13); border-color: hsl(var(--tc, 222 70% 55%) / .7); font-weight: 700; }
.db-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.db-aside { position: sticky; top: 8px; border: 1px solid var(--border); border-radius: 18px; padding: 14px; background: var(--bg-elev); max-height: calc(100vh - 120px); overflow-y: auto; }
.db-aside-h, .db-aside-x { display: none; }
.db-fs { margin-bottom: 14px; } .db-ft { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.db-scopes, .db-flist { display: flex; flex-direction: column; gap: 3px; } .db-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-scope, .db-fi { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13.5px; text-align: right; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.db-scope:hover, .db-fi:hover { background: var(--hover); } .db-scope.on, .db-fi.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; } .db-fi em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.db-chip { border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 99px; cursor: pointer; } .db-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.db-yr { display: flex; align-items: center; gap: 6px; } .db-yi { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: inherit; font: inherit; }
.db-reset { width: 100%; }
.db-meta { font-size: 13px; color: var(--muted); margin: 2px 0 10px; min-height: 18px; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; } .db-grid.list { grid-template-columns: 1fr; gap: 8px; }
.db-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: 18px; padding: 14px; background: var(--bg-elev); cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; outline: none; }
.db-card:hover, .db-card:focus-visible { border-color: hsl(var(--tc, 222 70% 55%) / .65); box-shadow: 0 8px 22px hsl(var(--tc, 222 70% 55%) / .13); transform: translateY(-2px); }
.db-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.db-card.list { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; } .db-card.list:hover { transform: none; }
.db-tile { width: 54px; height: 54px; border-radius: 15px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: hsl(var(--tc, 222 12% 52%)); background: hsl(var(--tc, 222 12% 52%) / .12); }
.db-tile b { font-size: 9.5px; letter-spacing: .04em; opacity: .85; }
.db-card:not(.list) { display: grid; grid-template-columns: 54px 1fr; grid-template-areas: "t b" "f f"; } .db-card:not(.list) .db-tile { grid-area: t; } .db-card:not(.list) .db-cb { grid-area: b; } .db-card:not(.list) .db-cf { grid-area: f; }
.db-cb { min-width: 0; flex: 1; } .db-ct { font-weight: 700; font-size: 14.5px; line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.db-cs { font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-badges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; } .db-bd { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: var(--hover); color: var(--muted); } .db-bd.pub { background: hsl(212 80% 55% / .13); color: hsl(212 70% 48%); } .db-bd.ai { background: hsl(158 55% 42% / .15); color: hsl(158 55% 34%); }
.db-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 11.5px; color: var(--muted); } .db-tags.big { margin: 10px 0; } .db-tags.big button { border: 0; background: var(--hover); color: inherit; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 99px; cursor: pointer; }
.db-cf { display: flex; align-items: center; gap: 8px; } .db-card.list .db-cf { flex: none; } .db-sz { font-size: 12px; color: var(--muted); margin-inline-end: auto; }
.db-mini { border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 99px; cursor: pointer; } .db-mini:hover { border-color: var(--accent); color: var(--accent); }
.db-sw { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; padding: 3px 8px 3px 4px; border-radius: 99px; cursor: pointer; }
.db-sw-t { font-size: 11px; font-weight: 700; } .db-knob { width: 26px; height: 15px; border-radius: 99px; background: var(--border); position: relative; transition: background .15s; } .db-knob::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.db-sw.on { border-color: hsl(158 55% 42% / .6); color: hsl(158 55% 34%); } .db-sw.on .db-knob { background: hsl(158 55% 42%); } .db-sw.on .db-knob::after { inset-inline-start: 13px; }
.db-card input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.db-more { display: block; margin: 16px auto 4px; } .db-err { color: #d33; padding: 14px; } .db-load { padding: 30px; text-align: center; color: var(--muted); }
.db-empty { text-align: center; padding: 50px 16px; color: var(--muted); } .db-empty-i { color: var(--accent); opacity: .7; margin-bottom: 10px; } .db-empty b { display: block; color: inherit; font-size: 16px; margin-bottom: 6px; } .db-empty p { max-width: 460px; margin: 0 auto 16px; line-height: 1.9; font-size: 13.5px; }
.db-pickbar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); box-shadow: 0 -6px 18px rgba(0,0,0,.06); font-size: 14px; }
/* جزئیات */
.db-drawer, .db-modal { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-start; }
.db-dr-bg { position: absolute; inset: 0; background: rgba(8, 12, 24, .5); backdrop-filter: blur(2px); }
.db-dr-in { position: relative; width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--bg); padding: 18px; box-shadow: 0 0 40px rgba(0,0,0,.25); animation: db-in .22s ease; }
@keyframes db-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.db-dr-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; } .db-dr-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: hsl(var(--tc)); background: hsl(var(--tc) / .13); }
.db-dr-tt { flex: 1; min-width: 0; } .db-dr-tt h3 { margin: 0 0 3px; font-size: 18px; line-height: 1.6; }
.db-x { border: 0; background: var(--hover); color: inherit; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 18px; flex: none; }
.db-pv { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg-elev); margin-bottom: 12px; min-height: 120px; }
.db-pv-pdf { width: 100%; height: 62vh; border: 0; display: block; } .db-pv-img { max-width: 100%; display: block; margin: 0 auto; max-height: 60vh; }
.db-pv-3d { height: 340px; position: relative; color: var(--fg, inherit); } .dbv-cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.dbv-bar { position: absolute; inset-inline: 8px; bottom: 8px; display: flex; gap: 6px; align-items: center; pointer-events: none; } .dbv-b { pointer-events: auto; border: 1px solid var(--border); background: var(--bg-elev); color: inherit; font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 99px; cursor: pointer; } .dbv-b.on { background: var(--accent-soft); color: var(--accent); } .dbv-i { font-size: 11.5px; color: var(--muted); margin-inline-start: auto; }
.db-pv-note { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.db-pv-none { padding: 30px 16px; text-align: center; color: hsl(var(--tc)); } .db-pv-none p { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 8px 0 0; }
.db-pv-tw { overflow: auto; max-height: 300px; } .db-pv-tb { border-collapse: collapse; font-size: 12px; width: 100%; } .db-pv-tb th, .db-pv-tb td { border-bottom: 1px solid var(--border); padding: 6px 10px; white-space: nowrap; text-align: right; } .db-pv-tb th { position: sticky; top: 0; background: var(--bg-elev); }
.db-pv-pre { margin: 0; padding: 12px; font-size: 12px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; max-height: 280px; overflow: auto; direction: auto; text-align: start; }
.db-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; position: relative; }
.db-airow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; } .db-airow p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.db-sec { margin: 14px 0; } .db-st { font-weight: 700; font-size: 13px; margin-bottom: 6px; } .db-p { margin: 0; line-height: 2; font-size: 14px; } .db-hint { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0 0 8px; }
.db-kvs, .db-sec .db-kv { display: block; } .db-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; } .db-kv span { color: var(--muted); flex: none; } .db-kv b { font-weight: 500; text-align: left; word-break: break-word; min-width: 0; }
.db-det summary { cursor: pointer; font-size: 13px; color: var(--muted); } .db-del { border: 0; background: transparent; color: #d33; font: inherit; font-size: 13px; cursor: pointer; padding: 8px 0; margin-top: 8px; }
.db-pm { position: absolute; top: 100%; inset-inline-start: 0; z-index: 5; min-width: 220px; max-height: 240px; overflow: auto; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.18); } .db-pm-i { display: block; width: 100%; text-align: right; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13.5px; padding: 9px 12px; border-radius: 10px; cursor: pointer; } .db-pm-i:hover { background: var(--hover); }
/* فرم و آپلود */
.db-form { display: flex; flex-direction: column; gap: 10px; } .db-frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .db-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .db-fl { font-size: 12px; color: var(--muted); }
.db-editbox { padding-top: 6px; }
.db-modal { align-items: center; justify-content: center; padding: 14px; } .db-mbox { position: relative; width: min(640px, 100%); max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 22px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); } .db-mh { margin: 0 0 4px; font-size: 18px; }
.db-drop { margin: 12px 0; padding: 22px 14px; } .db-pubsw { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin-bottom: 10px; } .db-pubsw input { width: 18px; height: 18px; accent-color: var(--accent); }
.db-ql { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; } .db-qi2 { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; position: relative; overflow: hidden; } .db-qi2.ok { border-color: hsl(158 55% 42% / .6); } .db-qi2.err { border-color: #d33; } .db-qi2.err .db-qmsg { color: #d33; }
.db-qh { display: flex; align-items: center; gap: 10px; } .db-qic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: hsl(var(--tc)); background: hsl(var(--tc) / .13); flex: none; } .db-qt { flex: 1; min-width: 0; } .db-qt b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .db-qmsg { font-size: 12px; color: var(--muted); }
.db-qi2 details { margin-top: 8px; } .db-qi2 summary { cursor: pointer; font-size: 12.5px; color: var(--accent); } .db-qb { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: transparent; } .db-qbar { display: block; height: 100%; width: 0; background: var(--grad, var(--accent)); transition: width .2s; }
@media (max-width: 860px) {
	.db-body { grid-template-columns: 1fr; } .db-filter-btn { display: inline-flex; }
	.db-aside { display: none; position: fixed; inset: auto 0 0 0; z-index: 70; border-radius: 22px 22px 0 0; max-height: 78vh; top: auto; box-shadow: 0 -20px 50px rgba(0,0,0,.35); }
	.db-aside.open { display: block; } .db-aside-h { display: block; font-weight: 700; font-size: 16px; margin-bottom: 10px; } .db-aside-x { display: block; position: absolute; top: 12px; inset-inline-start: 12px; border: 0; background: var(--hover); color: inherit; font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 99px; }
	.db-dr-in { width: 100%; } .db-grid { grid-template-columns: 1fr; } .db-head-r { width: 100%; justify-content: space-between; } .db-pv-pdf { height: 50vh; }
}

/* v2.18.1: منوی کناری قابل اسکرول + دکمه‌های اقدام پاسخ بدون روی‌هم‌افتادن */
.sidebar { min-height: 0; overflow: hidden; }
.sidebar .nav-box { flex: 0 1 auto; min-height: 140px; max-height: 70%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.sidebar .conv-list { min-height: 0; }
.studio-mode .sidebar .nav-box { max-height: none; }
.msg .actions { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.msg .actions button { flex: none; }
.msg .actions button.lbl { flex: none; width: auto !important; min-width: max-content; height: 30px; padding: 0 10px; white-space: nowrap; direction: ltr; }
.msg .actions button.lbl > span { display: inline-block; line-height: 1; }

/* v2.18.2: جستجوی بالای منو (بدون زوم iOS) با کادر گرادیانت ۶ رنگ هنگام فوکوس */
.sidebar .nav-search { position: relative; display: flex; align-items: center; margin: 2px 0 6px; border-radius: 99px; background: var(--bg); cursor: text; }
.sidebar .nav-search::before {
	content: ''; position: absolute; inset: 0; padding: 2px; border-radius: inherit; pointer-events: none;
	background: var(--border); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
}
.sidebar .nav-search:focus-within::before { background: conic-gradient(from var(--amirai-ang), #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981); animation: amirai-gb-spin 2.4s linear infinite; }
.sidebar .nav-search .ns-ico { position: absolute; inset-inline-start: 14px; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.sidebar .nav-search .ns-ico svg { width: 18px; height: 18px; }
.sidebar .nav-search .search { flex: 1; width: 100%; box-sizing: border-box; margin: 0; padding: 11px 16px 11px 44px; padding-inline: 44px 16px; border: 0 !important; border-radius: 99px; background: transparent !important; box-shadow: none !important; outline: 0; font-size: 16px; text-align: start; direction: rtl; -webkit-appearance: none; appearance: none; }
.sidebar .nav-search .search::-webkit-search-cancel-button { display: none; }
@media (prefers-reduced-motion: reduce) { .sidebar .nav-search:focus-within::before { animation: none; } }
/* انتخاب حالت منابع آنلاین داخل منوی + */
.pm-seg { display: flex; gap: 6px; padding: 2px 14px 8px; }
.pm-seg button { flex: 1; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 13px; }
.pm-seg button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.db-submit.st-pending { border-color: #f59e0b; background: rgba(245,158,11,.08); } .db-submit.st-approved { border-color: #16a34a; background: rgba(22,163,74,.08); } .db-submit.st-rejected { border-color: #dc2626; background: rgba(220,38,38,.07); }
/* v2.20: تصویر شاخص و عنوان انگلیسی در بانک داده */
.db-tile { position: relative; overflow: hidden; }
.db-tile.has-cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.db-tile.has-cv b { position: absolute; inset-inline-end: 3px; bottom: 3px; padding: 1px 5px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; opacity: 1; }
.db-cen { font-size: 12px; color: var(--muted); text-align: left; margin: 1px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-cvp { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px dashed var(--border); border-radius: 14px; margin-bottom: 10px; }
.db-cvp-box { position: relative; flex: none; width: 74px; height: 98px; border-radius: 10px; background: var(--hover); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.db-cvp-box svg { width: 26px; height: 26px; } .db-cvp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; } .db-cvp-box.has .db-cvp-img { display: block; } .db-cvp-box.has .db-cvp-ph { display: none; }
.db-cvp-t small { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 8px; line-height: 1.7; } .db-cvp-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* استودیوهای سفارشی */
.studio-pill { display: inline-flex; align-items: center; gap: 6px; margin: 4px auto 10px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; width: fit-content; position: sticky; top: 4px; z-index: 5; }
.studio-pill button { border: 0; background: rgba(0,0,0,.08); color: inherit; width: 20px; height: 20px; border-radius: 50%; line-height: 1; cursor: pointer; }
.bot-btn .st-ic { display: inline-grid; place-items: center; width: 20px; font-size: 15px; }

/* مقاله / شبیه‌ساز دفاع */
.th-qa { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.th-qa-q { padding: 10px 12px; border-radius: 12px; background: var(--amirai-surface-2, rgba(127,127,127,.12)); }
.th-qa-a { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--amirai-line, rgba(127,127,127,.3)); }
.th-checks .th-chk-i { line-height: 1.7; }

/* نوشتن خودکار مقاله */
.th-auto { margin: 14px 0; padding: 14px; border: 1px solid var(--amirai-line, rgba(127,127,127,.3)); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.th-ap-l { font-size: 14px; margin: 6px 0 10px; font-weight: 600; }
.th-ap-steps { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.th-ap-s { font-size: 14px; opacity: .55; } .th-ap-s.on { opacity: 1; font-weight: 700; } .th-ap-s.done { opacity: .9; color: #1b7a43; }
.th-ap-live { max-height: 140px; overflow: hidden; font-size: 13px; line-height: 1.8; opacity: .7; margin: 8px 0 12px; white-space: pre-wrap; }

.th-gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;margin:8px 0}.th-gi{border:1px solid var(--bd,#ddd);border-radius:10px;background:transparent;padding:4px;cursor:pointer;display:flex;flex-direction:column;gap:3px;align-items:center;font-size:11px}.th-gi img{width:100%;height:80px;object-fit:cover;border-radius:7px}.th-gi:hover{border-color:var(--acc,#6b5bd6)}

/* ---------- v2.23: سایدبار رنگی؛ هر بخش رنگ و قاب مخصوص خود را دارد ---------- */
.nc-indigo { --nc: #6366f1; } .nc-amber { --nc: #f59e0b; } .nc-blue { --nc: #3b82f6; } .nc-orange { --nc: #f97316; }
.nc-violet { --nc: #8b5cf6; } .nc-teal { --nc: #14b8a6; } .nc-rose { --nc: #f43f5e; } .nc-lime { --nc: #84cc16; }
.nc-cyan { --nc: #06b6d4; } .nc-slate { --nc: #64748b; } .nc-green { --nc: #10b981; }
.nav-item.nc { background: color-mix(in srgb, var(--nc) 11%, transparent); border: 1px solid color-mix(in srgb, var(--nc) 28%, transparent); border-radius: 14px; margin: 3px 0; font-weight: 600; }
.nav-item.nc:hover { background: color-mix(in srgb, var(--nc) 20%, transparent); color: var(--text); }
.nav-item.nc > svg:first-child { color: var(--nc); width: 20px; height: 20px; padding: 5px; box-sizing: content-box; border-radius: 10px; background: color-mix(in srgb, var(--nc) 16%, transparent); }
.nav-item.nc.open { border-color: color-mix(in srgb, var(--nc) 55%, transparent); box-shadow: 0 1px 0 color-mix(in srgb, var(--nc) 25%, transparent); }
.nav-sub.nc { margin: 2px 6px 8px; padding: 6px; border: 1px solid color-mix(in srgb, var(--nc) 28%, transparent); border-inline-start: 3px solid var(--nc); border-radius: 14px; background: color-mix(in srgb, var(--nc) 6%, transparent); gap: 2px; }
.nav-sub.nc .bot-btn { border-radius: 10px; }
.nav-sub.nc .bot-btn:hover { background: color-mix(in srgb, var(--nc) 16%, transparent); }
.nav-sub.nc .bot-btn > svg { color: var(--nc); }
.nav-item.nav-studio.nc { background: linear-gradient(135deg, color-mix(in srgb, #8b5cf6 20%, transparent), color-mix(in srgb, #ec4899 16%, transparent)); }
.nav-item.nav-new.nc { background: color-mix(in srgb, var(--nc) 16%, transparent); }

/* لوگوی سفارشی AMIR STUDIO */
.brand-mark .brand-img, .empty-logo .brand-img, .m-logo .brand-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.brand-mark:has(.brand-img) { width: 40px !important; height: 40px !important; background: none !important; border-radius: 10px !important; }
.empty-logo .brand-img { max-height: 72px; }

/* ---------- v2.26: پروژه‌های مکانیک در منوی پروژه‌ها ---------- */
.proj-mech { margin-top: 6px; border-top: 1px dashed var(--border); padding-top: 6px; }
.proj-mech-head { width: 100%; font-weight: 700; color: var(--text); }
.proj-mech-head .pi-ico svg { color: #f97316; }
.proj-mech-head .pi-cnt { margin-inline-start: auto; font-size: 11.5px; color: var(--muted); background: var(--hover); border-radius: 99px; padding: 1px 8px; }
.proj-mech-head .pi-chev svg { width: 14px; height: 14px; transition: transform .15s; } .proj-mech-head.open .pi-chev svg { transform: rotate(180deg); }
.proj-mech-list { margin-inline-start: 12px; padding-inline-start: 8px; border-inline-start: 2px solid color-mix(in srgb, #f97316 40%, transparent); display: grid; gap: 1px; }
.proj-item.sub { font-size: 13px; }
/* جلوگیری از سرریز افقی کل صفحه در موبایل */
@media (max-width: 860px) { html, body { max-width: 100%; overflow-x: hidden; } .main { min-width: 0; max-width: 100%; } }

/* پلن‌های ۶گانه: رنگ‌بندی کارت کیف پول */
.wl-pc.pro { border-color: color-mix(in srgb, #0ea5e9 55%, var(--border)); }
.wl-pc.ultra { border-color: color-mix(in srgb, #f59e0b 60%, var(--border)); }
.wl-pc.team { border-color: color-mix(in srgb, #10b981 60%, var(--border)); }
.wl-pc.enterprise { border-color: color-mix(in srgb, #111827 60%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, #f59e0b 8%, var(--bg-elev)), var(--bg-elev)); }
.wl-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .wl-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .wl-plans { grid-template-columns: 1fr; } }

/* تصویر رسید کارت‌به‌کارت */
.wl-rc { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--border); border-radius: 14px; }
.wl-rc-t { font-size: 12.5px; font-weight: 600; }
.wl-rc-b { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-rc-prev { display: flex; align-items: center; gap: 10px; }
.wl-rc-prev img { max-width: 120px; max-height: 120px; border-radius: 10px; border: 1px solid var(--border); object-fit: cover; }

/* آیتم «استودیو هوش مصنوعی»: رنگ نوشته مثل بقیه‌ی آیتم‌ها (نه آبیِ حالت فعال) */
.nav-item.nav-studio.on, .nav-item.nav-studio.on span { color: var(--text); }
.nav-item.nav-studio.on { background: linear-gradient(135deg, color-mix(in srgb, #8b5cf6 28%, transparent), color-mix(in srgb, #ec4899 22%, transparent)); }
.nav-item.nav-studio.on > svg { color: var(--nc); }

.model-img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }

/* ---------- ابزارهای PDF رایگان ---------- */
.pdf-root { direction: rtl; text-align: right; }
.pdf-root h2 { margin: 4px 0 5px; font-size: 24px; }
.pdf-lead { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.pdf-back { margin-bottom: 10px; }
.pdf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pdf-card { position: relative; display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); color: var(--text); font: inherit; text-align: right; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.pdf-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); box-shadow: 0 7px 18px rgba(30,50,90,.08); }
.pdf-card-ic { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 17px; }
.pdf-card-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pdf-card-t b { font-size: 13px; }
.pdf-card-t small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.pdf-card em { position: absolute; left: 10px; top: 9px; color: #39914b; font-style: normal; font-size: 10px; }
.pdf-work { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.pdf-hidden-input { display: none; }
.pdf-selected { min-height: 44px; padding: 10px; border: 1px dashed var(--border); border-radius: 13px; background: var(--bg-elev); }
.pdf-files { display: flex; flex-wrap: wrap; gap: 7px; }
.pdf-file { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 9px; background: var(--hover); color: var(--text); font-size: 12px; }
.pdf-empty { color: var(--muted); font-size: 12px; }
.pdf-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pdf-field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.pdf-field input, .pdf-field select { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; background: var(--bg-elev); color: var(--text); font: inherit; }

/* ---------- ابزارهای عکس رایگان ---------- */
.img-root { direction: rtl; text-align: right; }
.img-root h2 { margin: 4px 0 5px; font-size: 24px; }
.img-lead { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.img-back { margin-bottom: 10px; }
.img-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.img-card { position: relative; display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); color: var(--text); font: inherit; text-align: right; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.img-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); box-shadow: 0 7px 18px rgba(30,50,90,.08); }
.img-ic { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 18px; }
.img-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.img-t b { font-size: 13px; }
.img-t small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.img-card em { position: absolute; left: 10px; top: 9px; color: #39914b; font-style: normal; font-size: 10px; }
.img-work { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.img-hidden { display: none; }
.img-selected { min-height: 44px; padding: 10px; border: 1px dashed var(--border); border-radius: 13px; background: var(--bg-elev); }
.img-files { display: flex; flex-wrap: wrap; gap: 7px; }
.img-files span { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 9px; background: var(--hover); color: var(--text); font-size: 12px; }
.img-muted { color: var(--muted) !important; background: transparent !important; }
.img-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.img-field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.img-field input[type=text], .img-field input[type=number], .img-field input[type=range], .img-field select { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; background: var(--bg-elev); color: var(--text); font: inherit; }
.img-field input[type=color] { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); }
.img-field input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
@media (max-width: 760px) { .pdf-grid, .img-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .pdf-grid, .pdf-controls, .img-grid, .img-controls { grid-template-columns: 1fr; } .pdf-card, .img-card { min-height: 70px; } }

/* ---------- پیشرفت زنده‌ی پردازش ابزارهای عکس ---------- */
.img-progress { padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 80%, var(--bg-elev)), var(--bg-elev)); box-shadow: 0 10px 30px rgba(38, 74, 150, .08); overflow: hidden; }
.img-progress-top { display: flex; align-items: center; gap: 14px; }
.img-progress-ring { position: relative; width: 78px; height: 78px; flex: 0 0 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--accent) 0deg, var(--accent) 0deg, var(--border) 0deg); color: var(--text); isolation: isolate; }
.img-progress-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-elev); z-index: -1; }
.img-progress-ring b { font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.img-progress-ring small { color: var(--muted); font-size: 9px; }
.img-progress-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.img-progress-copy b { font-size: 14px; }
.img-progress-copy span { color: var(--muted); font-size: 12px; line-height: 1.7; }
.img-progress-track { height: 9px; margin: 16px 0 12px; border-radius: 99px; background: color-mix(in srgb, var(--border) 70%, transparent); overflow: hidden; }
.img-progress-fill { position: relative; display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #7c3aed, #06b6d4); transition: width .35s ease; overflow: hidden; }
.img-progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,.5) 45%, transparent 75%); transform: translateX(-100%); animation: img-progress-shimmer 1.35s infinite; }
.img-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.img-step { position: relative; padding: 7px 8px; border-radius: 9px; background: color-mix(in srgb, var(--border) 45%, transparent); color: var(--muted); text-align: center; font-size: 10.5px; transition: background .25s, color .25s, transform .25s; }
.img-step.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; transform: translateY(-1px); }
.img-step.done::before { content: '✓ '; font-weight: 900; }
.img-progress.success { border-color: color-mix(in srgb, #16a34a 42%, var(--border)); }
.img-progress.success .img-progress-ring { background: conic-gradient(#16a34a 360deg, #16a34a 360deg); }
.img-progress.success .img-progress-fill { background: #16a34a; }
.img-progress.error { border-color: color-mix(in srgb, #dc2626 42%, var(--border)); }
.img-progress.error .img-progress-ring { background: conic-gradient(#dc2626 30deg, var(--border) 30deg); }
@keyframes img-progress-shimmer { to { transform: translateX(100%); } }
@media (max-width: 500px) { .img-progress { padding: 13px; border-radius: 16px; } .img-progress-ring { width: 66px; height: 66px; flex-basis: 66px; } .img-progress-ring b { font-size: 15px; } .img-progress-copy span { font-size: 11px; } .img-step { font-size: 9.5px; padding-inline: 3px; } }

/* ---------- پیشرفت زنده‌ی ابزارهای PDF ---------- */
.pdf-progress { padding: 15px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 80%, var(--bg-elev)), var(--bg-elev)); box-shadow: 0 10px 30px rgba(38,74,150,.07); }
.pdf-progress-top { display: flex; align-items: center; gap: 13px; }
.pdf-progress-ring { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) 0deg, var(--border) 0deg); position: relative; isolation: isolate; }
.pdf-progress-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg-elev); z-index: -1; }
.pdf-progress-ring b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pdf-progress-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pdf-progress-copy b { font-size: 13px; }
.pdf-progress-copy span { color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.pdf-progress-track { height: 8px; margin-top: 14px; border-radius: 99px; background: color-mix(in srgb, var(--border) 70%, transparent); overflow: hidden; }
.pdf-progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #7c3aed, #06b6d4); transition: width .35s ease; position: relative; }
.pdf-progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,.5) 45%, transparent 75%); transform: translateX(-100%); animation: pdf-progress-shimmer 1.35s infinite; }
.pdf-progress.success { border-color: color-mix(in srgb, #16a34a 42%, var(--border)); }
.pdf-progress.success .pdf-progress-fill { background: #16a34a; }
.pdf-progress.error { border-color: color-mix(in srgb, #dc2626 42%, var(--border)); }
@keyframes pdf-progress-shimmer { to { transform: translateX(100%); } }
@media (max-width: 500px) { .pdf-progress { padding: 12px; border-radius: 15px; } .pdf-progress-ring { width: 56px; height: 56px; flex-basis: 56px; } .pdf-progress-copy span { font-size: 10.5px; } }

/* ---------- استودیو کلاس: فضای کاری ضبط، متن و جزوه ---------- */
.class-root { --cs-ink:#15213b; --cs-muted:#6e7891; --cs-blue:#4f6cf7; --cs-violet:#7c3aed; --cs-cyan:#12b8d9; --cs-soft:#eef2ff; --cs-line:#e4e9f5; width:100%; min-height:100%; color:var(--cs-ink); }
[data-mode="dark"] .class-root { --cs-ink:#f4f6ff; --cs-muted:#aeb8d1; --cs-line:#303b57; --cs-soft:#202b4b; }
.class-header { position:relative; padding:30px 30px 26px; border-radius:26px; overflow:hidden; background:radial-gradient(circle at 8% 10%,rgba(34,211,238,.25),transparent 29%),radial-gradient(circle at 92% 0%,rgba(124,58,237,.28),transparent 34%),linear-gradient(130deg,#15213b,#344b98 56%,#6672e8); color:#fff; box-shadow:0 18px 45px rgba(42,57,136,.22); }
.class-header::after { content:''; position:absolute; width:260px; height:260px; right:-85px; bottom:-145px; border:1px solid rgba(255,255,255,.25); border-radius:50%; box-shadow:0 0 0 26px rgba(255,255,255,.05),0 0 0 52px rgba(255,255,255,.04); }
.class-eyebrow,.class-kicker { letter-spacing:.11em; font-size:10px; font-weight:800; opacity:.78; }
.class-header h1 { position:relative; z-index:1; margin:9px 0 6px; font-size:clamp(27px,4vw,42px); letter-spacing:-.03em; }
.class-header p { position:relative; z-index:1; margin:0; max-width:680px; line-height:1.9; color:rgba(255,255,255,.82); font-size:13px; }
.class-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:14px 0; }
.class-stat { padding:16px 18px; border:1px solid var(--cs-line); border-radius:17px; background:var(--bg-elev,#fff); box-shadow:0 8px 24px rgba(33,49,104,.05); }
.class-stat span,.class-stat small { display:block; color:var(--cs-muted); font-size:11px; }
.class-stat b { display:block; margin:5px 0 1px; font-size:24px; font-variant-numeric:tabular-nums; }
.class-stat.cs-0 b { color:var(--cs-blue); }.class-stat.cs-1 b { color:var(--cs-violet); }.class-stat.cs-2 b { color:var(--cs-cyan); }
.class-layout { display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:15px; align-items:start; }.class-main { min-width:0; }.class-title-row { display:flex; gap:10px; margin-bottom:12px; }
.class-title-input,.class-select { min-height:44px; border:1px solid var(--cs-line); border-radius:12px; background:var(--bg-elev,#fff); color:var(--cs-ink); padding:0 13px; font:inherit; outline:none; }.class-title-input { flex:1; min-width:0; }.class-select { width:120px; cursor:pointer; }.class-title-input:focus,.class-select:focus,.class-transcript:focus { border-color:var(--cs-blue); box-shadow:0 0 0 3px rgba(79,108,247,.12); }
.class-card,.class-side-card { border:1px solid var(--cs-line); border-radius:20px; background:var(--bg-elev,#fff); box-shadow:0 10px 28px rgba(33,49,104,.05); }.class-card { padding:20px; margin-bottom:15px; }.class-side-card { padding:18px; margin-bottom:15px; }.class-card-head,.class-side-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }.class-card h2 { margin:4px 0 0; font-size:18px; }.class-side-card h3 { margin:5px 0 16px; font-size:15px; }.class-muted { color:var(--cs-muted); font-size:12px; line-height:1.85; margin:13px 0; }
.class-live-badge { border-radius:99px; padding:6px 10px; color:var(--cs-muted); background:color-mix(in srgb,var(--cs-line) 60%,transparent); font-size:10px; white-space:nowrap; }.class-live-badge.on { background:#dcfce7; color:#15803d; }.class-status { display:flex; gap:10px; align-items:center; padding:11px 13px; border-radius:13px; background:var(--cs-soft); color:var(--cs-ink); }.class-status > div { display:flex; flex-direction:column; gap:2px; min-width:0; }.class-status b { font-size:12px; }.class-status span:not(.class-status-pulse) { color:var(--cs-muted); font-size:11px; }.class-status-pulse { width:9px; height:9px; flex:0 0 9px; border-radius:50%; background:var(--cs-blue); box-shadow:0 0 0 5px rgba(79,108,247,.13); }.class-status.recording .class-status-pulse { background:#ef4444; animation:cs-pulse 1s infinite; }.class-status.done .class-status-pulse { background:#16a34a; }.class-status.error { background:#fff1f2; color:#be123c; }.class-status.warn { background:#fff7ed; color:#c2410c; }
.class-record-visual { position:relative; min-height:106px; display:flex; flex-direction:column; justify-content:center; gap:12px; margin:16px 0; padding:15px 20px; border-radius:17px; overflow:hidden; background:linear-gradient(120deg,#172443,#334a98); }.class-record-visual::before { content:''; position:absolute; inset:0; opacity:.35; background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px); background-size:22px 22px; }.class-wave { position:relative; z-index:1; display:flex; justify-content:center; align-items:center; gap:4px; height:42px; }.class-wave i { width:3px; height:13px; border-radius:4px; background:linear-gradient(#6ee7f9,#a78bfa); opacity:.75; animation:cs-wave 1.1s ease-in-out infinite alternate; animation-delay:calc(var(--n,0)*.04s); }.class-wave i:nth-child(3n){height:27px}.class-wave i:nth-child(4n){height:39px}.class-wave i:nth-child(5n){height:20px}.class-record-time { position:relative; z-index:1; text-align:center; color:#fff; font-size:17px; font-weight:800; letter-spacing:.08em; font-variant-numeric:tabular-nums; }.class-record-actions,.class-output-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:13px; }.class-record-btn,.class-upload-btn,.class-action { min-height:42px; border:0; border-radius:11px; padding:0 15px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; transition:transform .2s,box-shadow .2s,background .2s; }.class-record-btn { background:#172443; color:#fff; box-shadow:0 8px 18px rgba(23,36,67,.18); }.class-record-btn:hover,.class-upload-btn:hover,.class-action:hover { transform:translateY(-1px); }.class-record-btn.recording { background:#dc2626; }.class-rec-dot { display:inline-block; width:8px; height:8px; margin-left:7px; border-radius:50%; background:#fb7185; }.class-record-btn.recording .class-rec-dot { border-radius:2px; background:#fff; }.class-upload-btn,.class-action { display:inline-flex; align-items:center; justify-content:center; background:var(--cs-soft); color:var(--cs-blue); }.class-upload-btn input { display:none; }.class-action.primary { background:linear-gradient(135deg,var(--cs-blue),var(--cs-violet)); color:#fff; box-shadow:0 8px 18px rgba(79,108,247,.2); }.class-action.ghost { background:transparent; border:1px solid var(--cs-line); color:var(--cs-muted); }
.class-file-card { display:flex; align-items:center; gap:10px; min-height:46px; margin:14px 0 10px; padding:8px 11px; border:1px dashed var(--cs-line); border-radius:12px; color:var(--cs-muted); font-size:11px; }.class-file-card.has-file { border-style:solid; color:var(--cs-ink); background:var(--cs-soft); }.class-file-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; color:var(--cs-violet); background:#ede9fe; font-size:17px; }.class-transcript { display:block; width:100%; min-height:270px; resize:vertical; border:1px solid var(--cs-line); border-radius:14px; background:color-mix(in srgb,var(--bg-elev,#fff) 90%,var(--cs-soft)); color:var(--cs-ink); padding:15px; font:inherit; font-size:13px; line-height:2; outline:none; }
.class-steps { display:grid; gap:13px; list-style:none; margin:0; padding:0; }.class-steps li { display:flex; align-items:flex-start; gap:10px; color:var(--cs-muted); font-size:11px; line-height:1.7; }.class-steps b { display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:8px; color:#fff; background:linear-gradient(135deg,var(--cs-blue),var(--cs-violet)); }.class-side-title h3 { margin:0; }.class-side-title span { padding:4px 7px; border-radius:6px; color:#15803d; background:#dcfce7; font-size:10px; }.class-session { display:flex; align-items:center; gap:9px; width:100%; padding:9px 0; border:0; border-top:1px solid var(--cs-line); background:none; color:var(--cs-ink); text-align:right; cursor:pointer; }.class-session:first-child { border-top:0; }.class-session-icon { display:grid; place-items:center; width:31px; height:31px; flex:0 0 31px; border-radius:9px; color:var(--cs-blue); background:var(--cs-soft); }.class-session-meta { min-width:0; display:flex; flex-direction:column; gap:2px; }.class-session-meta b,.class-session-meta small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.class-session-meta b { font-size:11px; }.class-session-meta small { color:var(--cs-muted); font-size:9px; }.class-empty { padding:18px 4px; color:var(--cs-muted); font-size:11px; text-align:center; }
@keyframes cs-wave { from{transform:scaleY(.45);opacity:.4} to{transform:scaleY(1);opacity:1} } @keyframes cs-pulse { 50%{box-shadow:0 0 0 8px rgba(239,68,68,.03)} }
@media (max-width:850px) { .class-layout { grid-template-columns:1fr; }.class-side { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.class-side-card { margin-bottom:0; }.class-header { padding:24px 20px; } }
@media (max-width:560px) { .class-root { padding:0; }.class-header { border-radius:18px; padding:22px 17px; }.class-stats { gap:7px; }.class-stat { padding:12px 10px; border-radius:13px; }.class-stat span,.class-stat small { font-size:9px; }.class-stat b { font-size:18px; }.class-title-row { display:grid; grid-template-columns:1fr 96px; }.class-card { padding:15px; border-radius:16px; }.class-side { display:block; }.class-side-card { border-radius:16px; }.class-record-actions,.class-output-actions { display:grid; grid-template-columns:1fr; }.class-record-btn,.class-upload-btn,.class-action { width:100%; }.class-card-head { align-items:flex-start; }.class-live-badge { font-size:9px; }.class-transcript { min-height:220px; } }

/* ---------- قابلیت‌های پیشرفته‌ی استودیو کلاس ---------- */
.class-meta-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:13px 0 2px; }.class-meta-input,.class-feature-input { min-height:38px; width:100%; min-width:0; border:1px solid var(--cs-line); border-radius:10px; background:var(--bg-elev,#fff); color:var(--cs-ink); padding:0 10px; font:inherit; font-size:11px; outline:none; }.class-meta-input:focus,.class-feature-input:focus { border-color:var(--cs-blue); box-shadow:0 0 0 3px rgba(79,108,247,.1); }.class-audio-player { width:100%; height:35px; margin:8px 0 12px; }.class-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }.class-feature-card { min-width:0; padding:14px; border:1px solid var(--cs-line); border-radius:15px; background:color-mix(in srgb,var(--cs-soft) 33%,var(--bg-elev,#fff)); }.class-feature-card > b { display:block; font-size:12px; }.class-feature-card > p { margin:6px 0 10px; color:var(--cs-muted); font-size:10.5px; line-height:1.75; }.class-inline-action { display:flex; gap:6px; }.class-inline-action .class-feature-input { flex:1; }.class-mini-btn { min-height:36px; padding:0 10px; border:0; border-radius:9px; background:var(--cs-blue); color:#fff; font:inherit; font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }.class-feature-output { max-height:145px; overflow:auto; margin-top:9px; }.class-feature-empty,.class-feature-heading { color:var(--cs-muted); font-size:10px; line-height:1.8; }.class-result-line,.class-generated-item { margin:5px 0; padding:7px 8px; border-radius:8px; background:var(--bg-elev,#fff); color:var(--cs-ink); font-size:10px; line-height:1.8; white-space:pre-line; }.class-result-line { border-right:3px solid var(--cs-blue); }.class-timeline { max-height:138px; overflow:auto; margin-top:8px; }.class-segment { display:grid; grid-template-columns:42px 48px minmax(0,1fr); align-items:start; gap:5px; width:100%; padding:6px 0; border:0; border-top:1px solid var(--cs-line); background:transparent; color:var(--cs-ink); text-align:right; cursor:pointer; }.class-segment:first-child { border-top:0; }.class-segment time { color:var(--cs-blue); font-size:9px; direction:ltr; }.class-segment b { overflow:hidden; color:var(--cs-violet); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }.class-segment span { font-size:10px; line-height:1.65; }.class-extract-card { grid-column:1 / -1; }.class-extract-tags { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }.class-extract-tags span { padding:6px 8px; border-radius:8px; color:var(--cs-violet); background:#ede9fe; font-size:10px; }.class-extract-card small { color:var(--cs-muted); font-size:9px; line-height:1.7; }.class-studio-nav-btn { background:linear-gradient(90deg,rgba(124,58,237,.1),transparent); }
@media (max-width:560px) { .class-meta-grid { grid-template-columns:1fr; }.class-feature-grid { grid-template-columns:1fr; }.class-extract-card { grid-column:auto; }.class-inline-action { align-items:stretch; }.class-feature-card { padding:12px; } }
.class-frame-output { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-top:10px; }.class-frame-img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; border:1px solid var(--cs-line); cursor:pointer; transition:transform .2s,box-shadow .2s; }.class-frame-img:hover { transform:scale(1.03); box-shadow:0 5px 18px rgba(30,41,93,.2); }
@media (max-width:560px) { .class-frame-output { grid-template-columns:repeat(2,1fr); } }

/* ---------- داشبورد شخصی ---------- */
.dash-root { --d-ink:#17213c; --d-muted:#74809a; --d-line:#e6eaf4; width:100%; min-height:100%; color:var(--d-ink); }.dash-hero { position:relative; overflow:hidden; padding:28px 30px; border-radius:25px; color:#fff; background:radial-gradient(circle at 8% 0%,rgba(45,212,191,.3),transparent 28%),radial-gradient(circle at 94% 5%,rgba(251,146,60,.3),transparent 30%),linear-gradient(128deg,#12223d,#236b83 58%,#477bc8); box-shadow:0 18px 45px rgba(26,71,112,.2); }.dash-hero::after { content:'✦'; position:absolute; left:30px; bottom:-35px; color:rgba(255,255,255,.08); font-size:170px; }.dash-eyebrow,.dash-kicker { font-size:10px; font-weight:800; letter-spacing:.12em; opacity:.78; }.dash-hero h1 { margin:10px 0 5px; font-size:clamp(28px,4vw,43px); letter-spacing:-.04em; }.dash-hero p { max-width:600px; margin:0; color:rgba(255,255,255,.82); font-size:13px; line-height:1.9; }.dash-hero-date { position:absolute; z-index:1; top:28px; left:30px; display:flex; flex-direction:column; gap:4px; align-items:flex-start; font-size:11px; }.dash-hero-date b { font-size:15px; }.dash-tiles { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:14px 0; }.dash-tile { position:relative; min-height:165px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end; overflow:hidden; padding:18px; border-radius:19px; color:#fff; box-shadow:0 12px 25px rgba(30,51,110,.13); }.dash-tile::after { content:''; position:absolute; width:125px; height:125px; top:-46px; left:-32px; border:1px solid rgba(255,255,255,.23); border-radius:50%; box-shadow:0 0 0 18px rgba(255,255,255,.06); }.dash-date { background:linear-gradient(140deg,#5164e8,#7d5bd7); }.dash-clock { background:linear-gradient(140deg,#087f8c,#12a5a1); }.dash-member { background:linear-gradient(140deg,#e56b39,#f2a33b); }.dash-streak { background:linear-gradient(140deg,#d43964,#ee6e70); }.dash-tile-icon { position:absolute; z-index:1; top:17px; right:18px; display:grid; place-items:center; width:37px; height:37px; border:1px solid rgba(255,255,255,.25); border-radius:12px; background:rgba(255,255,255,.16); font-size:20px; }.dash-tile small,.dash-tile em { position:relative; z-index:1; font-size:10px; opacity:.84; }.dash-tile b { position:relative; z-index:1; margin:4px 0; font-size:21px; }.dash-tile em { font-style:normal; font-size:9px; }.dash-card { margin-bottom:14px; padding:20px; border:1px solid var(--d-line); border-radius:20px; background:var(--bg-elev,#fff); box-shadow:0 10px 28px rgba(33,49,104,.05); }.dash-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }.dash-card-head h2 { margin:4px 0 0; font-size:18px; }.dash-card-head small { padding:5px 8px; border-radius:7px; background:#ecfeff; color:#0e7490; font-size:10px; }.dash-muted { margin:8px 0 14px; color:var(--d-muted); font-size:11px; line-height:1.8; }.dash-shortcuts { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }.dash-shortcut,.dash-add-shortcut { position:relative; display:flex; min-height:92px; flex-direction:column; align-items:flex-start; justify-content:flex-end; gap:7px; padding:13px; border:0; border-radius:14px; color:#fff; text-align:right; cursor:pointer; transition:transform .2s,box-shadow .2s; }.dash-shortcut:hover,.dash-add-shortcut:hover { transform:translateY(-2px); box-shadow:0 9px 18px rgba(36,48,104,.14); }.dash-shortcut::after { content:'↗'; position:absolute; top:11px; left:12px; opacity:.6; }.dash-shortcut-icon { display:grid; place-items:center; width:29px; height:29px; border-radius:9px; background:rgba(255,255,255,.2); font-size:16px; }.dash-shortcut span:last-child { font-size:11px; font-weight:700; }.ds-blue { background:linear-gradient(135deg,#3b82f6,#6366f1); }.ds-violet { background:linear-gradient(135deg,#7c3aed,#a855f7); }.ds-rose { background:linear-gradient(135deg,#e11d48,#f43f5e); }.ds-amber { background:linear-gradient(135deg,#d97706,#f59e0b); }.ds-teal { background:linear-gradient(135deg,#0d9488,#14b8a6); }.ds-green { background:linear-gradient(135deg,#16a34a,#22c55e); }.ds-pink { background:linear-gradient(135deg,#db2777,#ec4899); }.dash-add-shortcut { align-items:center; justify-content:center; border:1px dashed #b7c1d8; background:transparent; color:var(--d-muted); }.dash-add-shortcut::before { content:'+'; display:grid; place-items:center; width:31px; height:31px; border-radius:50%; background:#eef2ff; color:#4f6cf7; font-size:20px; }.dash-add-shortcut::after { display:none; }.dash-insight { display:flex; align-items:center; gap:13px; background:linear-gradient(110deg,#f8fafc,#eef2ff); }.dash-insight-mark { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border-radius:13px; color:#fff; background:linear-gradient(135deg,#4f6cf7,#8b5cf6); font-size:21px; }.dash-insight b { font-size:12px; }.dash-insight p { margin:4px 0 0; color:var(--d-muted); font-size:11px; line-height:1.8; }
.dashboard-nav-btn { background:linear-gradient(90deg,rgba(20,184,166,.1),transparent); }
@media (max-width:850px) { .dash-tiles { grid-template-columns:repeat(2,1fr); }.dash-shortcuts { grid-template-columns:repeat(2,1fr); }.dash-hero-date { position:relative; top:auto; left:auto; margin-top:18px; align-items:flex-start; } }
@media (max-width:560px) { .dash-hero { padding:22px 17px; border-radius:18px; }.dash-hero-date { margin-top:15px; }.dash-tiles { gap:8px; }.dash-tile { min-height:130px; padding:13px; border-radius:14px; }.dash-tile b { font-size:16px; }.dash-tile-icon { top:12px; right:12px; width:31px; height:31px; font-size:16px; }.dash-card { padding:15px; border-radius:16px; }.dash-shortcuts { gap:7px; }.dash-shortcut,.dash-add-shortcut { min-height:80px; padding:10px; }.dash-insight { align-items:flex-start; } }

/* ---------- زیرمنوی استودیو کلاس ---------- */
.class-tabs { display:flex; gap:8px; margin:14px 0; padding:6px; border:1px solid var(--cs-line); border-radius:15px; background:var(--bg-elev,#fff); box-shadow:0 7px 20px rgba(33,49,104,.04); }.class-tabs button { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 14px; border:0; border-radius:10px; background:transparent; color:var(--cs-muted); font:inherit; font-size:11px; cursor:pointer; }.class-tabs button span { display:grid; place-items:center; width:24px; height:24px; border-radius:7px; background:var(--cs-soft); color:var(--cs-blue); }.class-tabs button.on { color:#fff; background:linear-gradient(135deg,var(--cs-blue),var(--cs-violet)); box-shadow:0 6px 14px rgba(79,108,247,.18); }.class-tabs button.on span { color:#fff; background:rgba(255,255,255,.2); }.class-view-panel { padding:20px; border:1px solid var(--cs-line); border-radius:20px; background:var(--bg-elev,#fff); box-shadow:0 10px 28px rgba(33,49,104,.05); }.class-view-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:15px; }.class-view-head h2 { margin:4px 0; font-size:19px; }.class-view-head p { margin:0; color:var(--cs-muted); font-size:11px; line-height:1.8; }.class-view-count { padding:6px 9px; border-radius:7px; background:var(--cs-soft); color:var(--cs-blue); font-size:10px; white-space:nowrap; }.class-archive-filters { display:grid; grid-template-columns:2fr 1fr; gap:8px; margin-bottom:13px; }.class-archive-search { min-height:42px; width:100%; border:1px solid var(--cs-line); border-radius:11px; background:var(--bg-elev,#fff); color:var(--cs-ink); padding:0 12px; font:inherit; font-size:11px; outline:none; }.class-archive-search:focus { border-color:var(--cs-blue); box-shadow:0 0 0 3px rgba(79,108,247,.1); }.class-archive-list,.class-notes-list { display:grid; gap:9px; }.class-archive-item,.class-note-item { display:flex; align-items:flex-start; gap:11px; padding:13px; border:1px solid var(--cs-line); border-radius:14px; background:color-mix(in srgb,var(--cs-soft) 30%,var(--bg-elev,#fff)); }.class-archive-icon,.class-note-cover { display:grid; place-items:center; width:37px; height:37px; flex:0 0 37px; border-radius:11px; color:#fff; background:linear-gradient(135deg,var(--cs-blue),var(--cs-violet)); }.class-archive-item > div,.class-note-item > div:nth-child(2) { min-width:0; flex:1; }.class-archive-item b,.class-note-item b { display:block; font-size:12px; }.class-archive-item small,.class-note-item small { display:block; margin-top:3px; color:var(--cs-violet); font-size:9px; }.class-archive-item p,.class-note-item p { overflow:hidden; margin:5px 0 0; color:var(--cs-muted); font-size:10px; line-height:1.7; text-overflow:ellipsis; white-space:nowrap; }.class-archive-item time { color:var(--cs-muted); font-size:9px; white-space:nowrap; }
@media (max-width:560px) { .class-tabs { overflow:auto; }.class-tabs button { flex:1; min-width:110px; justify-content:center; padding:0 8px; }.class-view-panel { padding:15px; border-radius:16px; }.class-archive-filters { grid-template-columns:1fr; }.class-view-head { display:block; }.class-view-count { display:inline-block; margin-top:9px; }.class-archive-item,.class-note-item { padding:10px; }.class-archive-item time { display:none; } }
/* 2.39.1 — dashboard, public popup and typing helper */
.nav-dashboard-first{order:-20!important}
.dash-date-toggle{display:block;margin:9px auto 0;border:0;background:rgba(124,156,255,.12);color:var(--accent,#5267d9);border-radius:9px;padding:5px 9px;font:inherit;font-size:11px;cursor:pointer}
.dash-market-card{margin-top:16px}.dash-market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.dash-market-tile{position:relative;overflow:hidden;min-height:145px;padding:16px;border-radius:20px;background:linear-gradient(145deg,rgba(91,110,244,.13),rgba(255,255,255,.02));border:1px solid var(--border);display:flex;flex-direction:column;gap:6px}.dash-market-tile.up{--mcolor:#16a765}.dash-market-tile.down{--mcolor:#e55353}.dash-market-icon{font-size:25px}.dash-market-tile small{color:var(--muted)}.dash-market-tile>b{font-size:18px;direction:ltr;text-align:right}.dash-market-change{font-size:12px;color:var(--mcolor);font-weight:700}.dash-market-spark{position:absolute;inset:auto 12px 10px 12px;width:calc(100% - 24px);height:42px;opacity:.8}.dash-market-spark polyline{stroke:var(--mcolor);stroke-width:2.4;vector-effect:non-scaling-stroke}
.public-popup{max-width:520px!important;text-align:right}.public-popup-image{display:block;width:100%;max-height:190px;object-fit:cover;border-radius:16px;margin:-4px 0 18px}.public-popup-consent{display:flex;align-items:flex-start;gap:9px;margin:18px 0;font-size:13px}.public-popup-consent input{accent-color:var(--accent,#5267d9);margin-top:4px}.amirai-copyright{width:100%;padding:12px 18px;text-align:center;color:var(--muted);font-size:11px;line-height:1.9;opacity:.85}.keyboard-tip{position:fixed;z-index:9999;bottom:22px;left:50%;transform:translateX(-50%);max-width:min(92vw,520px);padding:13px 16px;border-radius:15px;background:#20243b;color:#fff;box-shadow:0 12px 32px #0003;display:flex;align-items:center;gap:14px;font-size:13px}.keyboard-tip button{border:0;background:#6578ff;color:#fff;border-radius:9px;padding:7px 11px;cursor:pointer;white-space:nowrap}.acc-typing-settings{margin:18px 0;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface,#fff);display:flex;flex-direction:column;gap:10px}.acc-typing-settings>b{font-size:14px}.acc-typing-settings label{display:flex;gap:8px;align-items:flex-start;font-size:13px}.acc-typing-settings input{accent-color:#6578ff;margin-top:3px}
@media(max-width:700px){.dash-market-grid{grid-template-columns:1fr}.dash-market-tile{min-height:118px}.keyboard-tip{bottom:10px;flex-wrap:wrap;justify-content:center}.amirai-copyright{padding-bottom:22px}}
/* Dashboard correction pass */
.dashboard-nav-btn{order:initial!important;display:flex!important;background:linear-gradient(90deg,rgba(20,184,166,.16),rgba(20,184,166,.04))!important;border:1px solid rgba(20,184,166,.22)}
.dash-date{justify-content:flex-start!important}.dash-date small{margin-top:50px}.dash-date .dash-tile-icon{right:auto;left:18px}.dash-date b{font-size:15px;line-height:2.05;white-space:normal}.dash-market-spark{display:block;inset:auto 12px 9px 12px!important;height:42px!important}.dash-market-spark svg{display:block;width:100%;height:100%}.dash-market-usd{position:relative;z-index:2;color:var(--muted);font-size:10px;direction:ltr;text-align:right}.account-card{padding:9px 7px 3px!important;border-radius:14px;background:linear-gradient(90deg,rgba(124,58,237,.08),transparent);border:1px solid rgba(124,58,237,.12)}
@media(max-width:700px){.dash-date small{margin-top:45px}.dash-date b{font-size:13px}}
.account-card .icon-btn{width:34px;height:34px;border-radius:10px;background:rgba(124,58,237,.12);color:#6d4be8}.account-card .icon-btn:hover{background:rgba(124,58,237,.2)}
/* 2.39.2 — unified navigation and account/conversation cards */
.dashboard-nav-btn,.account-card,.conv-toggle{min-height:46px!important;padding:9px 12px!important;border-radius:14px!important;box-sizing:border-box}.dashboard-nav-btn{margin:3px 0!important}.account-card{width:100%;margin-top:8px!important;min-height:52px!important;display:flex!important;align-items:center!important}.account-card .user-name{display:block!important;visibility:visible!important;opacity:1!important;color:var(--text)!important;font-weight:650!important}.conv-box{margin:4px 0 8px;padding:0;border:1px solid color-mix(in srgb,#64748b 24%,transparent);border-radius:14px;background:color-mix(in srgb,#64748b 6%,transparent);overflow:hidden}.conv-toggle{display:flex;align-items:center;gap:8px;width:100%;margin:0;border:0;background:transparent;color:var(--text);font:inherit;font-size:13px;font-weight:650;cursor:pointer}.conv-toggle svg:first-child{width:19px;height:19px;color:#64748b}.conv-toggle svg:last-child{width:14px;height:14px;margin-inline-start:auto;transition:transform .2s}.conv-toggle.open svg:last-child{transform:rotate(90deg)}.conv-body{max-height:280px;overflow:auto;padding:3px 6px 6px;border-top:1px solid color-mix(in srgb,#64748b 18%,transparent)}.conv-body.closed{display:none}.conv-body .conv-list{margin:0;padding:0}.conv-box .conv-row{border-radius:10px}.dash-date .dash-tile-icon{right:18px!important;left:auto!important}.dash-date small{margin-top:50px!important}.dash-date b{max-width:100%;font-size:14px!important;line-height:2!important}.keyboard-tip{direction:rtl}

.dashboard-nav-btn{min-height:46px!important}.account-card{min-height:46px!important}
/* 2.39.3 — visible conversation panel and equal nav-card sizing */
.sidebar .nav-box{min-width:0}.conv-box{display:block!important;flex:0 0 auto!important;width:100%;min-height:48px;visibility:visible!important;opacity:1!important}.conv-toggle{width:100%!important;min-height:48px!important;padding:11px 13px!important;display:flex!important}.conv-body{display:block;max-height:260px;overflow-y:auto}.conv-body.closed{display:none!important}.dashboard-nav-btn{width:100%!important;min-height:48px!important;height:48px!important;padding:11px 13px!important;margin:3px 0!important;display:flex!important;align-items:center!important;box-sizing:border-box!important}.account-card{width:100%!important;min-height:48px!important;box-sizing:border-box!important}.conv-box + .nav-item,.conv-box + .nav-sub{margin-top:4px}
/* 2.39.4 — local audio tools */
.audio-root{--au-ink:#17213c;--au-muted:#71809c;--au-line:#e4e9f3;width:100%;color:var(--au-ink)}.audio-card{padding:24px;border:1px solid var(--au-line);border-radius:24px;background:var(--bg-elev,#fff);box-shadow:0 14px 36px rgba(34,53,112,.08)}.audio-card-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:4px 0 18px}.audio-kicker{font-size:10px;font-weight:800;letter-spacing:.12em;color:#6478ed}.audio-card h1{margin:8px 0 5px;font-size:28px}.audio-card p{margin:0;color:var(--au-muted);font-size:12px;line-height:1.9}.audio-badge{padding:7px 12px;border-radius:10px;background:#dcfce7;color:#16834b;font-size:11px;font-weight:700}.audio-actions{display:flex;gap:9px;flex-wrap:wrap;margin:10px 0 14px}.audio-primary,.audio-secondary,.audio-tool-grid button{border:0;border-radius:11px;padding:10px 15px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}.audio-primary{background:linear-gradient(135deg,#526cf5,#7657d8);color:#fff}.audio-secondary{background:#eef2ff;color:#4f61d2}.audio-status{padding:11px 13px;border-radius:12px;background:#f0fdf9;color:#167455;font-size:11px}.audio-status.error{background:#fff1f2;color:#be123c}.audio-file-list{display:grid;gap:7px;margin:12px 0}.audio-file-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--au-line);border-radius:12px;background:#fbfcff}.audio-file-num{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#eef2ff;color:#5065da;font-size:11px}.audio-file-meta{min-width:0;flex:1}.audio-file-meta b,.audio-file-meta small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audio-file-meta b{font-size:12px}.audio-file-meta small{margin-top:2px;color:var(--au-muted);font-size:10px}.audio-remove{border:0;background:transparent;color:#d04e63;font:inherit;font-size:11px;cursor:pointer}.audio-player{width:100%;margin:12px 0}.audio-controls{margin:14px 0;padding:15px;border:1px solid var(--au-line);border-radius:15px;background:#fafbff}.audio-controls h2{margin:0 0 10px;font-size:14px}.audio-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.audio-fields input{min-height:39px;padding:0 10px;border:1px solid var(--au-line);border-radius:10px;font:inherit;font-size:11px}.audio-volume{display:flex;align-items:center;gap:10px;margin-top:10px;color:var(--au-muted);font-size:11px}.audio-volume input{flex:1;accent-color:#596eea}.audio-tool-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.audio-tool-grid button{min-height:66px;background:linear-gradient(145deg,#eef2ff,#fdfdff);border:1px solid #dce3fb;color:#4759c5}.audio-tool-grid button:hover{background:#e3e9ff}.audio-note{margin-top:14px;padding:10px 12px;border-radius:11px;background:#fff8e8;color:#926b1c;font-size:10px;line-height:1.8}.audio-progress{height:4px;border-radius:99px;background:#e7eaf2}.audio-progress i{display:block;height:100%;width:0;background:#526cf5}@media(max-width:700px){.audio-card{padding:16px;border-radius:18px}.audio-card h1{font-size:22px}.audio-card-head{display:block}.audio-badge{display:inline-block;margin-top:12px}.audio-tool-grid{grid-template-columns:repeat(2,1fr)}.audio-tool-grid button:last-child{grid-column:1/-1}.audio-fields{grid-template-columns:1fr}}
/* fresh loads start with every expandable box closed */
.conv-box .conv-body.closed{display:none!important}
/* Strict keyboard gate and Word-like correction suggestion */
.keyboard-gate{position:fixed;z-index:10001;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:22px;background:rgba(15,20,38,.62);backdrop-filter:blur(8px)}.keyboard-gate>*{max-width:430px}.keyboard-gate-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:17px;background:#e0e7ff;color:#4f61d5;font-size:28px}.keyboard-gate h3{margin:14px 0 4px;color:#fff;font-size:19px}.keyboard-gate p{margin:0 0 14px;color:#e5e7ff;text-align:center;font-size:13px;line-height:1.9}.keyboard-gate .btn{width:min(430px,90vw);margin-top:6px}.keyboard-gate-secondary{width:min(430px,90vw);margin-top:8px;padding:10px;border:1px solid rgba(255,255,255,.35);border-radius:10px;background:transparent;color:#fff;font:inherit;cursor:pointer}.spell-tip{position:fixed;z-index:10000;right:22px;bottom:92px;display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid #f0a4ae;border-radius:10px;background:#fff7f8;color:#8f2331;box-shadow:0 8px 24px #0002;font-size:11px;direction:rtl}.spell-tip button{border:0;border-radius:7px;padding:5px 7px;background:#ffe1e5;color:#a52334;font:inherit;font-weight:700;cursor:pointer}.spell-tip button:hover{text-decoration:underline}@media(max-width:600px){.spell-tip{right:10px;bottom:80px;max-width:92vw;flex-wrap:wrap}.keyboard-gate{padding:18px}}
/* 2.39.5 — Presentation and Translation Studios */
.pres-root,.tr-root{width:100%;color:var(--text)}.pres-top,.tr-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:6px 0 18px}.pres-kicker,.tr-kicker{font-size:10px;letter-spacing:.13em;font-weight:800;color:#6575e8}.pres-root h1,.tr-root h1{margin:7px 0 5px;font-size:28px}.pres-root p,.tr-root p{margin:0;color:var(--muted);font-size:12px}.pres-free{padding:8px 11px;border-radius:10px;background:#e8f8ef;color:#16754a;font-size:11px}.pres-settings{display:grid;grid-template-columns:auto 1.5fr auto 1fr auto 1fr;gap:8px;align-items:center;padding:13px;border:1px solid var(--border);border-radius:15px;background:var(--surface,#fff)}.pres-settings label{font-size:11px;color:var(--muted)}.pres-settings input,.pres-settings select,.pres-field,.tr-toolbar select{min-height:38px;border:1px solid var(--border);border-radius:9px;padding:0 10px;background:var(--bg,#fff);font:inherit;font-size:12px}.pres-actions,.tr-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.pres-actions button,.tr-toolbar button{border:1px solid var(--border);border-radius:10px;padding:9px 12px;background:var(--surface,#fff);font:inherit;font-size:11px;cursor:pointer}.pres-actions .pres-primary,.tr-primary{background:linear-gradient(135deg,#536cf4,#795bd9);border-color:transparent;color:#fff}.pres-work,.tr-work{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(320px,1.1fr);gap:14px}.pres-work h2,.tr-work h2{font-size:14px;margin:10px 0}.pres-slides{display:grid;gap:9px}.pres-slide-card{padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface,#fff)}.pres-slide-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px}.pres-slide-head button{border:0;background:transparent;color:#c34b61;font:inherit;font-size:10px;cursor:pointer}.pres-slide-card select{width:100%;margin-bottom:7px;min-height:32px;border:1px solid var(--border);border-radius:8px;font:inherit;font-size:11px}.pres-field{width:100%;box-sizing:border-box;margin-bottom:7px}.pres-body{height:90px;padding:8px!important;resize:vertical}.pres-preview{display:grid;gap:12px}.pres-preview-slide{min-height:180px;padding:20px;border-radius:17px;box-shadow:0 10px 28px #0001;direction:rtl;overflow:hidden}.pres-preview-slide.blue{background:linear-gradient(135deg,#eff4ff,#dfe7ff);color:#172d63}.pres-preview-slide.executive{background:#f7f2e7;color:#1e293b}.pres-preview-slide.ocean{background:#e7f8fb;color:#064e5e}.pres-preview-slide.violet{background:#f2ebff;color:#3c1d70}.pres-preview-slide.green{background:#eaf8ed;color:#14532d}.pres-preview-slide.warm{background:#fff1e9;color:#6b2c16}.pres-preview-slide.midnight{background:#182238;color:#f8fafc}.pres-preview-slide small{opacity:.65;font-size:9px}.pres-preview-slide h3{font-size:21px;margin:24px 0 14px}.pres-preview-text{white-space:pre-wrap;font-size:12px;line-height:2}.tr-toolbar{align-items:center}.tr-status{padding:10px 12px;border-radius:10px;background:#eef6ff;color:#39558b;font-size:11px}.tr-progress{height:4px;width:0;background:#6376eb;border-radius:99px;margin:8px 0;transition:width .2s}.tr-work{margin-top:10px}.tr-pages{display:grid;grid-template-columns:repeat(2,minmax(100px,1fr));gap:9px;max-height:550px;overflow:auto;padding:8px;border:1px solid var(--border);border-radius:14px;background:var(--surface,#fff)}.tr-page{padding:6px;border:1px solid var(--border);border-radius:10px;background:var(--bg,#fff)}.tr-page img{display:block;width:100%;height:160px;object-fit:contain;background:#f5f6fa}.tr-page small{display:block;margin-top:5px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tr-result{width:100%;min-height:550px;box-sizing:border-box;resize:vertical;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface,#fff);font:inherit;font-size:13px;line-height:2;direction:rtl}.tr-head{border-bottom:1px solid var(--border);margin-bottom:10px}@media(max-width:760px){.pres-top,.tr-head{display:block}.pres-settings{grid-template-columns:1fr 1fr}.pres-settings label{margin-top:4px}.pres-work,.tr-work{grid-template-columns:1fr}.tr-result{min-height:360px}.tr-pages{max-height:330px}.pres-preview{order:-1}.pres-root h1,.tr-root h1{font-size:22px}}

/* 2.39.7 — standalone studios and robust translation toolbar */
.nav-presentation,.nav-translation{margin:3px 0!important;border:1px solid color-mix(in srgb,var(--nc) 24%,transparent)!important;background:color-mix(in srgb,var(--nc) 8%,transparent)!important}
.nav-presentation:hover,.nav-translation:hover{background:color-mix(in srgb,var(--nc) 16%,transparent)!important}
.tr-toolbar{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));align-items:stretch!important;gap:9px!important;padding:12px;border:1px solid var(--border);border-radius:16px;background:var(--surface,#fff)}
.tr-toolbar button,.tr-toolbar select{width:100%;min-width:0;min-height:42px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;white-space:normal;line-height:1.5}
.tr-toolbar select{padding:0 8px!important;text-align:center}
.tr-toolbar .tr-primary{min-width:0}.tr-status{min-height:20px;display:flex;align-items:center}.tr-head{flex-wrap:wrap}.tr-head>div{min-width:0}.tr-work>div{min-width:0}
@media(max-width:520px){.tr-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));padding:9px}.tr-toolbar button,.tr-toolbar select{font-size:10px;min-height:40px}.tr-toolbar .tr-primary{grid-column:span 2}.tr-pages{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Translation toolbar visibility fix */
.tr-toolbar>button,.tr-toolbar>select,.tr-toolbar>.tr-lang-box{min-width:0;color:#17213c!important;background:#fff!important;border:1px solid #d9e0ee!important;opacity:1!important;text-shadow:none!important}
.tr-toolbar>button{display:flex!important}.tr-toolbar>.tr-primary{color:#fff!important;background:linear-gradient(135deg,#536cf4,#795bd9)!important;border-color:transparent!important}
.tr-toolbar>.tr-lang-box{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:5px 8px;border-radius:10px;box-sizing:border-box;font-size:10px;font-weight:700;line-height:1.2}
.tr-lang-box span{color:#667085!important}.tr-lang-select{display:block!important;width:100%;min-height:25px!important;padding:0 4px!important;border:0!important;box-shadow:none!important;border-radius:5px!important;background:#fff!important;color:#17213c!important;font:inherit!important;font-size:11px!important;outline:0!important}
.tr-toolbar>.tr-lang-box select option{color:#17213c!important;background:#fff!important}
/* 2.39.9 — professional dark mode for every built-in studio */
:root[data-mode="dark"] .pres-root,:root[data-mode="dark"] .tr-root,:root[data-mode="dark"] .audio-root,:root[data-mode="dark"] .pdf-root,:root[data-mode="dark"] .img-root,:root[data-mode="dark"] .dash-root{color:var(--text)}
:root[data-mode="dark"] .pres-settings,:root[data-mode="dark"] .pres-slide-card,:root[data-mode="dark"] .tr-toolbar,:root[data-mode="dark"] .tr-pages,:root[data-mode="dark"] .tr-page,:root[data-mode="dark"] .tr-result,:root[data-mode="dark"] .audio-card,:root[data-mode="dark"] .audio-file-row,:root[data-mode="dark"] .audio-controls,:root[data-mode="dark"] .pdf-card,:root[data-mode="dark"] .pdf-controls,:root[data-mode="dark"] .img-card,:root[data-mode="dark"] .img-controls,:root[data-mode="dark"] .dash-card{background:var(--bg-elev)!important;color:var(--text)!important;border-color:var(--border)!important}
:root[data-mode="dark"] .pres-settings input,:root[data-mode="dark"] .pres-settings select,:root[data-mode="dark"] .pres-field,:root[data-mode="dark"] .pres-slide-card select,:root[data-mode="dark"] .tr-result,:root[data-mode="dark"] .tr-lang-box,:root[data-mode="dark"] .tr-lang-select,:root[data-mode="dark"] .pdf-field,:root[data-mode="dark"] .img-field,:root[data-mode="dark"] .audio-fields input{background:var(--bg)!important;color:var(--text)!important;border-color:var(--border)!important}
:root[data-mode="dark"] .pres-root h1,:root[data-mode="dark"] .tr-root h1,:root[data-mode="dark"] .audio-card h1,:root[data-mode="dark"] .pres-work h2,:root[data-mode="dark"] .tr-work h2,:root[data-mode="dark"] .audio-controls h2,:root[data-mode="dark"] .dash-card-head h2{color:var(--text)!important}
:root[data-mode="dark"] .pres-root p,:root[data-mode="dark"] .tr-root p,:root[data-mode="dark"] .audio-card p,:root[data-mode="dark"] .tr-lang-box span,:root[data-mode="dark"] .dash-muted{color:var(--muted)!important}
:root[data-mode="dark"] .tr-status{background:#172b43!important;color:#b9d8ff!important}.tr-progress{background:#526cf5}
:root[data-mode="dark"] .tr-page img{background:#111827!important}
:root[data-mode="dark"] .tr-toolbar>button,:root[data-mode="dark"] .tr-toolbar>.tr-lang-box{background:var(--bg-elev)!important;color:var(--text)!important;border-color:var(--border)!important}
:root[data-mode="dark"] .tr-toolbar>.tr-primary,:root[data-mode="dark"] .pres-actions .pres-primary,:root[data-mode="dark"] .audio-primary{color:#fff!important}
:root[data-mode="dark"] .audio-secondary,:root[data-mode="dark"] .audio-tool-grid button{background:#292552!important;color:#c8c4ff!important;border-color:#403a70!important}
:root[data-mode="dark"] .audio-status{background:#12362f!important;color:#9de5c4!important}.audio-status.error{background:#431f2a!important;color:#ffb5c2!important}
:root[data-mode="dark"] .audio-note{background:#3b3014!important;color:#f4d486!important}.audio-progress{background:#343746!important}
:root[data-mode="dark"] .pdf-card-t,:root[data-mode="dark"] .img-t,:root[data-mode="dark"] .pdf-lead,:root[data-mode="dark"] .img-lead,:root[data-mode="dark"] .pdf-muted,:root[data-mode="dark"] .img-muted{color:var(--muted)!important}
:root[data-mode="dark"] .pdf-empty,:root[data-mode="dark"] .img-files,:root[data-mode="dark"] .img-grid{background:var(--bg-elev)!important;color:var(--text)!important}
:root[data-mode="dark"] .dash-insight{background:linear-gradient(110deg,#1b2433,#24224a)!important}.dash-root{color:var(--text)}
@media (prefers-color-scheme:dark){
 :root[data-ws]:not([data-mode="light"]) .pres-settings,:root[data-ws]:not([data-mode="light"]) .pres-slide-card,:root[data-ws]:not([data-mode="light"]) .tr-toolbar,:root[data-ws]:not([data-mode="light"]) .tr-pages,:root[data-ws]:not([data-mode="light"]) .tr-page,:root[data-ws]:not([data-mode="light"]) .tr-result,:root[data-ws]:not([data-mode="light"]) .audio-card,:root[data-ws]:not([data-mode="light"]) .audio-file-row,:root[data-ws]:not([data-mode="light"]) .audio-controls,:root[data-ws]:not([data-mode="light"]) .pdf-card,:root[data-ws]:not([data-mode="light"]) .pdf-controls,:root[data-ws]:not([data-mode="light"]) .img-card,:root[data-ws]:not([data-mode="light"]) .img-controls,:root[data-ws]:not([data-mode="light"]) .dash-card{background:var(--bg-elev)!important;color:var(--text)!important;border-color:var(--border)!important}
 :root[data-ws]:not([data-mode="light"]) .pres-settings input,:root[data-ws]:not([data-mode="light"]) .pres-settings select,:root[data-ws]:not([data-mode="light"]) .pres-field,:root[data-ws]:not([data-mode="light"]) .pres-slide-card select,:root[data-ws]:not([data-mode="light"]) .tr-result,:root[data-ws]:not([data-mode="light"]) .tr-lang-box,:root[data-ws]:not([data-mode="light"]) .tr-lang-select,:root[data-ws]:not([data-mode="light"]) .pdf-field,:root[data-ws]:not([data-mode="light"]) .img-field,:root[data-ws]:not([data-mode="light"]) .audio-fields input{background:var(--bg)!important;color:var(--text)!important;border-color:var(--border)!important}
 :root[data-ws]:not([data-mode="light"]) .pres-root h1,:root[data-ws]:not([data-mode="light"]) .tr-root h1,:root[data-ws]:not([data-mode="light"]) .audio-card h1,:root[data-ws]:not([data-mode="light"]) .pres-work h2,:root[data-ws]:not([data-mode="light"]) .tr-work h2,:root[data-ws]:not([data-mode="light"]) .audio-controls h2{color:var(--text)!important}
 :root[data-ws]:not([data-mode="light"]) .pres-root p,:root[data-ws]:not([data-mode="light"]) .tr-root p,:root[data-ws]:not([data-mode="light"]) .audio-card p,:root[data-ws]:not([data-mode="light"]) .tr-lang-box span{color:var(--muted)!important}
 :root[data-ws]:not([data-mode="light"]) .tr-status{background:#172b43!important;color:#b9d8ff!important}
 :root[data-ws]:not([data-mode="light"]) .audio-secondary,:root[data-ws]:not([data-mode="light"]) .audio-tool-grid button{background:#292552!important;color:#c8c4ff!important;border-color:#403a70!important}
}
/* 2.39.10 — Presentation export buttons in dark mode */
:root[data-mode="dark"] .pres-actions button,:root[data-mode="dark"] .pres-actions button[type="button"]{background:var(--bg-elev)!important;color:var(--text)!important;border:1px solid var(--border)!important;box-shadow:none!important;text-shadow:none!important;opacity:1!important}
:root[data-mode="dark"] .pres-actions button:hover{background:var(--hover)!important;color:var(--text)!important;border-color:var(--accent)!important}
:root[data-mode="dark"] .pres-actions button.pres-primary{background:linear-gradient(135deg,#526cf5,#7657d8)!important;color:#fff!important;border-color:transparent!important}
@media (prefers-color-scheme:dark){:root[data-ws]:not([data-mode="light"]) .pres-actions button,:root[data-ws]:not([data-mode="light"]) .pres-actions button[type="button"]{background:var(--bg-elev)!important;color:var(--text)!important;border:1px solid var(--border)!important;box-shadow:none!important;text-shadow:none!important;opacity:1!important}:root[data-ws]:not([data-mode="light"]) .pres-actions button:hover{background:var(--hover)!important;color:var(--text)!important;border-color:var(--accent)!important}:root[data-ws]:not([data-mode="light"]) .pres-actions button.pres-primary{background:linear-gradient(135deg,#526cf5,#7657d8)!important;color:#fff!important;border-color:transparent!important}}

/* 2.39.11 — AI presentation generation and typing helper polish */
.pres-ai-box{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;margin:12px 0;padding:14px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--accent) 7%,var(--bg-elev,#fff))}.pres-ai-label{grid-column:1/-1;color:var(--text);font-size:12px;font-weight:800}.pres-ai-topic{width:100%;min-height:64px;resize:vertical;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:var(--bg,#fff);color:var(--text);padding:9px 11px;font:inherit;font-size:12px;line-height:1.8;outline:0}.pres-ai-topic:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}.pres-ai-generate{min-height:42px;padding:0 16px;border:0;border-radius:10px;background:linear-gradient(135deg,#536cf4,#795bd9);color:#fff;font:inherit;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}.pres-ai-generate:disabled{opacity:.62;cursor:wait}@media(max-width:560px){.pres-ai-box{grid-template-columns:1fr}.pres-ai-generate{width:100%}}
:root[data-mode="dark"] .pres-ai-box{background:#211e38!important;border-color:var(--border)!important}.pres-ai-topic{color:var(--text)!important}.pres-ai-topic::placeholder{color:var(--muted)!important}
@media(prefers-color-scheme:dark){:root[data-ws]:not([data-mode="light"]) .pres-ai-box{background:#211e38!important;border-color:var(--border)!important}}
/* دکمه‌ی پشتیبانی بالای کارت حساب کاربری */
.side-foot .support-card { width:100%; box-sizing:border-box; min-height:48px; padding:10px 13px; border-radius:14px; display:flex; align-items:center; gap:10px; border:1px solid rgba(20,184,166,.35); background:linear-gradient(90deg,rgba(20,184,166,.14),rgba(20,184,166,.04)); color:var(--text); font:inherit; font-weight:650; cursor:pointer; text-align:right; margin-top:4px; transition:background .2s,border-color .2s,transform .15s; }
.side-foot .support-card svg { width:20px; height:20px; flex:none; color:#14b8a6; }
.side-foot .support-card:hover { background:rgba(20,184,166,.22); border-color:rgba(20,184,166,.6); }
.side-foot .support-card:active { transform:scale(.98); }
.side-foot .support-card:focus-visible { outline:2px solid #14b8a6; outline-offset:2px; }
/* پشتیبانی (تیکت‌ها) داخل استودیو */
.sp-root { width:100%; max-width:760px; margin:0 auto; padding:4px 0 28px; color:var(--text); }
.sp-head { display:flex; align-items:center; gap:10px; margin:2px 0 14px; }
.sp-head h2 { margin:0; font-size:20px; flex:1; }
.sp-back { width:38px; height:38px; border-radius:12px; border:1px solid var(--border); background:var(--bg-elev); color:var(--text); font-size:18px; cursor:pointer; flex:none; }
.sp-btn { min-height:40px; padding:8px 16px; border-radius:12px; border:1px solid var(--border); background:var(--bg-elev); color:var(--text); font:inherit; font-size:13.5px; font-weight:650; cursor:pointer; }
.sp-btn.primary { background:linear-gradient(135deg,#14b8a6,#2563eb); border-color:transparent; color:#fff; }
.sp-btn:disabled { opacity:.6; cursor:default; }
.sp-card { border:1px solid var(--border); background:var(--bg-elev); border-radius:16px; padding:14px 16px; margin-bottom:10px; box-sizing:border-box; }
.sp-item { display:block; width:100%; text-align:right; font:inherit; color:inherit; cursor:pointer; transition:border-color .15s,transform .15s; }
.sp-item:hover { border-color:#14b8a6; } .sp-item:active { transform:scale(.99); }
.sp-item-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sp-item-top b { font-size:14.5px; line-height:1.7; overflow:hidden; text-overflow:ellipsis; }
.sp-meta { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:6px; color:var(--muted); font-size:11.5px; }
.sp-chip { flex:none; padding:3px 10px; border-radius:999px; font-size:11.5px; font-weight:700; background:rgba(37,99,235,.14); color:#2563eb; }
.sp-chip.st-answered { background:rgba(22,199,132,.16); color:#0f9d6b; } .sp-chip.st-closed { background:rgba(120,120,130,.18); color:var(--muted); }
.sp-skel { height:68px; background:linear-gradient(90deg,var(--bg-elev),var(--hover),var(--bg-elev)); background-size:200% 100%; animation:spsh 1.2s infinite; }
@keyframes spsh { to { background-position:-200% 0; } }
.sp-empty { text-align:center; padding:40px 12px; color:var(--muted); } .sp-empty-ico { font-size:38px; margin-bottom:6px; }
.sp-f { display:flex; flex-direction:column; gap:5px; font-size:12.5px; margin-bottom:12px; color:var(--muted); }
.sp-in { width:100%; box-sizing:border-box; padding:10px 12px; border-radius:12px; border:1px solid var(--border); background:var(--bg); color:var(--text); font:inherit; font-size:14px; }
textarea.sp-in { resize:vertical; line-height:1.9; }
.sp-row3 { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.sp-form .sp-btn { width:100%; }
.sp-thread { display:flex; flex-direction:column; gap:10px; margin:12px 0; }
.sp-msg { max-width:88%; padding:10px 14px; border-radius:16px; box-sizing:border-box; border:1px solid var(--border); background:var(--bg-elev); }
.sp-msg.me { align-self:flex-start; background:rgba(20,184,166,.12); border-color:rgba(20,184,166,.3); }
.sp-msg.staff { align-self:flex-end; background:rgba(37,99,235,.1); border-color:rgba(37,99,235,.28); }
.sp-msg.ai { align-self:flex-end; background:rgba(124,58,237,.1); border-color:rgba(124,58,237,.28); }
.sp-who { display:flex; justify-content:space-between; gap:12px; font-size:12px; margin-bottom:4px; } .sp-who small { color:var(--muted); }
.sp-text { white-space:pre-wrap; line-height:1.95; font-size:14px; word-break:break-word; }
.sp-att { display:inline-block; margin-top:6px; font-size:12px; color:#14b8a6; }
.sp-note { text-align:center; color:var(--muted); font-size:12.5px; padding:12px; }
@media (max-width:640px) { .sp-row3 { grid-template-columns:1fr; } .sp-msg { max-width:96%; } .sp-head h2 { font-size:18px; } .sp-reply-bar .sp-btn { width:100%; } }
/* پیوست، پیشرفت آپلود و تب‌های نوع پاسخ‌گویی */
.sp-file-in { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.sp-attach { position:relative; }
.sp-drop { width:100%; box-sizing:border-box; display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:16px; border:1.5px dashed rgba(20,184,166,.55); background:linear-gradient(135deg,rgba(20,184,166,.07),rgba(37,99,235,.05)); color:var(--text); font:inherit; cursor:pointer; text-align:right; transition:border-color .2s,background .2s,transform .15s,box-shadow .2s; }
.sp-drop:hover,.sp-drop.over { border-color:#14b8a6; background:linear-gradient(135deg,rgba(20,184,166,.15),rgba(37,99,235,.1)); box-shadow:0 6px 18px rgba(20,184,166,.15); }
.sp-drop.over { transform:scale(1.015); }
.sp-drop:active { transform:scale(.99); }
.sp-drop-ico { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; flex:none; color:#fff; background:linear-gradient(135deg,#14b8a6,#2563eb); box-shadow:0 6px 14px rgba(20,184,166,.3); }
.sp-drop-t { display:flex; flex-direction:column; gap:2px; min-width:0; } .sp-drop-t b { font-size:14px; } .sp-drop-t small { color:var(--muted); font-size:11.5px; }
.sp-fcard { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:16px; border:1px solid rgba(20,184,166,.4); background:rgba(20,184,166,.08); animation:spin .25s ease-out; }
@keyframes spin { from { opacity:0; transform:translateY(4px) scale(.98); } }
.sp-fico { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; font-size:20px; background:var(--bg-elev); flex:none; }
.sp-fname { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; } .sp-fname b { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:ltr; text-align:right; } .sp-fname small { color:var(--muted); font-size:11px; }
.sp-fx { width:30px; height:30px; border-radius:10px; border:0; background:rgba(234,57,67,.12); color:#ea3943; cursor:pointer; flex:none; }
.sp-prog { display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:16px; border:1px solid rgba(37,99,235,.35); background:linear-gradient(135deg,rgba(37,99,235,.1),rgba(20,184,166,.08)); animation:spin .25s ease-out; }
.sp-ring { position:relative; width:64px; height:64px; flex:none; } .sp-ring svg { transform:rotate(-90deg); display:block; }
.sp-ring circle { fill:none; stroke-width:6; } .sp-ring .bg { stroke:rgba(120,130,150,.22); } .sp-ring .fg { stroke:url(#none); stroke:#14b8a6; stroke-linecap:round; filter:drop-shadow(0 0 4px rgba(20,184,166,.5)); }
.sp-ring b { position:absolute; inset:0; display:grid; place-items:center; font-size:13px; }
.sp-prog.done .sp-ring .fg { stroke:#16c784; }
.sp-prog-t { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; } .sp-prog-t b { font-size:13.5px; } .sp-prog-t small { color:var(--muted); font-size:11.5px; }
.sp-bar { height:6px; border-radius:99px; background:rgba(120,130,150,.2); overflow:hidden; } .sp-bar i { display:block; height:100%; width:0; border-radius:99px; background:linear-gradient(90deg,#14b8a6,#2563eb,#14b8a6); background-size:200% 100%; animation:spbar 1.1s linear infinite; }
@keyframes spbar { to { background-position:-200% 0; } }
.sp-tabs { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:0; padding:4px; border-radius:18px; border:1px solid var(--border); background:var(--bg); }
.sp-tab-thumb { position:absolute; top:4px; bottom:4px; right:4px; width:calc(50% - 4px); border-radius:14px; background:linear-gradient(135deg,rgba(20,184,166,.22),rgba(37,99,235,.2)); border:1px solid rgba(20,184,166,.45); box-shadow:0 4px 14px rgba(20,184,166,.18); transition:transform .32s cubic-bezier(.3,.8,.3,1); }
.sp-tabs.ai .sp-tab-thumb { transform:translateX(-100%); }
.sp-tab { position:relative; z-index:1; display:flex; align-items:center; gap:9px; padding:9px 10px; border:0; background:transparent; color:var(--muted); font:inherit; cursor:pointer; text-align:right; min-width:0; transition:color .2s; }
.sp-tab.on { color:var(--text); }
.sp-tab-ico { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; flex:none; background:var(--bg-elev); overflow:hidden; } .sp-tab-ico img { width:100%; height:100%; object-fit:cover; }
.sp-tab-t { display:flex; flex-direction:column; gap:1px; min-width:0; } .sp-tab-t b { font-size:12.5px; line-height:1.5; } .sp-tab-t small { font-size:10.5px; opacity:.8; }
.sp-reply .sp-attach,.sp-reply .sp-tabs { margin-top:10px; } .sp-reply .sp-btn { width:100%; margin-top:10px; }
@media (max-width:640px) { .sp-tab { flex-direction:column; text-align:center; gap:4px; padding:8px 4px; } .sp-tab-t b { font-size:11.5px; } .sp-drop-t small { font-size:11px; } }
@media (prefers-reduced-motion:reduce) { .sp-tab-thumb,.sp-bar i,.sp-fcard,.sp-prog { transition:none; animation:none; } }

/* 2.39.15 — Article standards review studio */
.sr-root{--sr-ink:#17213c;--sr-muted:#71809c;--sr-line:#e2e7f2;--sr-soft:#f5f7ff;--sr-blue:#526cf5;direction:rtl;width:100%;max-width:1180px;margin:0 auto;color:var(--sr-ink)}
.sr-hero{display:flex;align-items:center;gap:16px;padding:24px;border-radius:24px;background:linear-gradient(135deg,#526cf5,#7657d8 58%,#d978ad);color:#fff;box-shadow:0 16px 35px rgba(74,85,170,.2)}
.sr-hero-mark{display:grid;place-items:center;width:56px;height:56px;flex:0 0 56px;border-radius:18px;background:rgba(255,255,255,.2);font-size:32px;font-weight:900}.sr-title{margin:0;font-size:25px}.sr-sub{margin:7px 0 0;opacity:.9;font-size:12px;line-height:1.8}.sr-hero-score{margin-inline-start:auto;min-width:84px;text-align:center;padding:10px;border-radius:15px;background:rgba(255,255,255,.16)}.sr-hero-score b,.sr-hero-score small{display:block}.sr-hero-score b{font-size:24px}.sr-hero-score small{font-size:10px}
.sr-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.sr-field{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700}.sr-field>span{color:var(--sr-muted)}.sr-field input,.sr-field select{width:100%;min-height:42px;box-sizing:border-box;padding:0 11px;border:1px solid var(--sr-line);border-radius:12px;background:var(--bg-elev,#fff);color:var(--sr-ink);font:inherit;font-size:11px;outline:none}.sr-field input:focus,.sr-field select:focus{border-color:var(--sr-blue);box-shadow:0 0 0 3px rgba(82,108,245,.1)}
.sr-tabs{display:flex;gap:7px;overflow:auto;padding:5px;margin-bottom:14px;border:1px solid var(--sr-line);border-radius:15px;background:var(--bg-elev,#fff)}.sr-btn{min-height:38px;padding:0 14px;border:0;border-radius:10px;background:transparent;color:var(--sr-muted);font:inherit;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}.sr-tabs .sr-btn{flex:1}.sr-btn:hover{background:#eef2ff;color:#4d62dc}.sr-btn.active,.sr-btn.primary{background:linear-gradient(135deg,#526cf5,#7657d8);color:#fff;box-shadow:0 7px 15px rgba(82,108,245,.2)}.sr-btn.secondary{background:#eef2ff;color:#4d62dc}
.sr-grid{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(0,1.6fr);gap:14px}.sr-panel{min-width:0;padding:20px;border:1px solid var(--sr-line);border-radius:20px;background:var(--bg-elev,#fff);box-shadow:0 10px 28px rgba(33,49,104,.05)}.sr-panel h2{margin:0 0 9px;font-size:17px}.sr-panel h3{margin:22px 0 10px;font-size:13px}.sr-guide-info{align-self:start}.sr-kicker{margin-bottom:6px;color:#526cf5;font-size:10px;font-weight:800;letter-spacing:.08em}.sr-guide-info p,.sr-panel>p{color:var(--sr-muted);font-size:11px;line-height:1.9}.sr-info-box{margin-top:14px;padding:11px 12px;border-radius:12px;background:#f5f7ff;color:#55617c;font-size:10px;line-height:1.9}.sr-meter{margin-top:18px}.sr-meter-top,.sr-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sr-meter-top{font-size:11px}.sr-meter-top span{color:#526cf5;font-weight:800}.sr-meter-track{height:7px;margin-top:8px;overflow:hidden;border-radius:99px;background:#e9edf7}.sr-meter-track i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#526cf5,#d978ad)}.sr-chip{display:inline-flex;padding:5px 8px;border-radius:99px;font-size:10px;font-weight:800}.sr-chip.ok{background:#dcfce7;color:#16834b}.sr-chip.warn{background:#fff4d8;color:#946b17}.sr-chip.bad{background:#ffe4e8;color:#b32d49}
.sr-check{display:grid;grid-template-columns:22px minmax(0,1fr) 150px;align-items:center;gap:9px;padding:11px 0;border-bottom:1px solid #edf0f6}.sr-check:last-child{border-bottom:0}.sr-check>input,.sr-tick input{width:17px;height:17px;accent-color:#526cf5}.sr-check.done .sr-check-main b{text-decoration:line-through;color:#71809c}.sr-check-main{min-width:0}.sr-check-main b,.sr-check-main small{display:block}.sr-check-main b{font-size:11px;line-height:1.7}.sr-check-main small{margin-top:3px;color:var(--sr-muted);font-size:9px}.sr-note{width:100%;min-width:0;box-sizing:border-box;padding:7px;border:1px solid var(--sr-line);border-radius:8px;background:var(--sr-soft);font:inherit;font-size:9px}.sr-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:16px}.sr-metric{padding:12px 7px;text-align:center;border-radius:12px;background:var(--sr-soft)}.sr-metric b,.sr-metric small{display:block}.sr-metric b{font-size:20px;color:#526cf5}.sr-metric small{margin-top:3px;color:var(--sr-muted);font-size:9px}.sr-issue,.sr-success{margin:8px 0;padding:11px 12px;border-radius:10px;font-size:11px;line-height:1.8}.sr-issue{background:#fff4e5;color:#95651b}.sr-success{background:#e9fbf2;color:#167455}.sr-tick{display:flex;align-items:flex-start;gap:8px;margin:9px 0;color:#52617e;font-size:11px;line-height:1.7}.sr-readiness{display:grid;gap:7px;margin:13px 0 16px}.sr-read{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;background:#f7f8fc}.sr-read>span{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;font-weight:900}.sr-read.yes>span{background:#dcfce7;color:#16834b}.sr-read.no>span{background:#fff0d4;color:#9a6a18}.sr-read b{font-size:11px}.sr-read small{margin-inline-start:auto;color:var(--sr-muted);font-size:9px}.sr-actions{display:flex;gap:7px;flex-wrap:wrap}.sr-report{max-width:none}.sr-report-text{direction:rtl;white-space:pre-wrap;overflow:auto;min-height:260px;margin:16px 0;padding:16px;border:1px solid var(--sr-line);border-radius:13px;background:#f8f9fd;color:#39445e;font:12px/2 Vazirmatn,Tahoma,sans-serif}.sr-empty{padding:65px 20px;text-align:center;border:1px dashed #cbd4e8;border-radius:20px;background:var(--sr-soft)}.sr-empty-icon{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 14px;border-radius:20px;background:#e8edff;color:#526cf5;font-size:34px}.sr-empty h2{margin:0 0 8px;font-size:18px}.sr-empty p{max-width:420px;margin:0 auto;color:var(--sr-muted);font-size:11px;line-height:1.9}
html[data-mode="dark"] .sr-root{--sr-ink:#eef1ff;--sr-muted:#aeb7d2;--sr-line:rgba(150,165,220,.2);--sr-soft:#202943}.sr-root .sr-panel,.sr-root .sr-field input,.sr-root .sr-field select{background:var(--bg-elev,#202943);color:var(--sr-ink)}html[data-mode="dark"] .sr-info-box,.sr-root .sr-report-text{background:#182038;color:#cbd5f2}html[data-mode="dark"] .sr-metric,.sr-root .sr-read{background:#1d2742}
@media(max-width:720px){.sr-hero{padding:18px;border-radius:18px}.sr-hero-mark{width:44px;height:44px;flex-basis:44px;font-size:25px}.sr-title{font-size:19px}.sr-sub{font-size:10px}.sr-hero-score{min-width:64px}.sr-hero-score b{font-size:18px}.sr-toolbar,.sr-grid{grid-template-columns:1fr}.sr-panel{padding:15px;border-radius:16px}.sr-tabs .sr-btn{flex:0 0 auto}.sr-check{grid-template-columns:22px minmax(0,1fr)}.sr-note{grid-column:2;width:100%}.sr-metrics{grid-template-columns:repeat(2,1fr)}.sr-panel-head{align-items:flex-start}.sr-actions{margin-top:5px}}

/* 2.39.15 — correction workflow and Word export */
.sr-check .sr-btn{min-height:30px;padding:0 9px;font-size:10px}.sr-fix-overlay{position:fixed;z-index:12000;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,20,38,.62);backdrop-filter:blur(8px)}.sr-fix-modal{width:min(900px,96vw);max-height:90vh;overflow:auto;padding:20px;border:1px solid rgba(255,255,255,.7);border-radius:20px;background:var(--bg-elev,#fff);box-shadow:0 25px 70px rgba(0,0,0,.3);direction:rtl}.sr-fix-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.sr-fix-head h2{margin:0;font-size:18px}.sr-fix-help{margin:10px 0;color:var(--sr-muted,#71809c);font-size:11px;line-height:1.9}.sr-fix-text{display:block;width:100%;min-height:260px;box-sizing:border-box;padding:13px;border:1px solid var(--sr-line,#e2e7f2);border-radius:12px;background:var(--sr-soft,#f5f7ff);color:var(--sr-ink,#17213c);font:12px/2 Vazirmatn,Tahoma,sans-serif;direction:rtl;resize:vertical}.sr-fix-status{margin:10px 0;color:var(--sr-muted,#71809c);font-size:10px}.sr-fix-modal .sr-actions{display:flex;gap:8px;flex-wrap:wrap}.sr-fix-modal .sr-actions .sr-btn{min-height:40px}.sr-root .sr-panel-head>.sr-actions{justify-content:flex-end}.sr-root .sr-panel-head>.sr-actions .sr-btn{font-size:10px}
@media(max-width:720px){.sr-check{grid-template-columns:22px minmax(0,1fr)}.sr-check>.sr-btn{grid-column:2;justify-self:start}.sr-fix-overlay{padding:10px}.sr-fix-modal{padding:15px;border-radius:16px}.sr-fix-text{min-height:220px}.sr-panel-head{flex-wrap:wrap}.sr-root .sr-panel-head>.sr-actions{width:100%;justify-content:flex-start}}

/* 2.41.0 — databank: groups tree, external sources */
.db-tabs{display:flex;gap:6px;margin-top:10px;width:100%}.db-tab{border:1px solid var(--border);background:var(--bg-elev);color:inherit;font:inherit;font-size:13.5px;padding:8px 16px;border-radius:99px;cursor:pointer}.db-tab.on{background:var(--accent-soft);color:var(--accent);border-color:var(--accent);font-weight:700}
.db-tree .db-sg{padding-inline-start:26px;font-size:13px}.db-tree .db-g.open{font-weight:700}.db-gmanage{margin-top:8px}
.db-gm .db-gadd{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-bottom:10px}.db-grow{display:flex;align-items:center;gap:10px;padding:9px 6px;border-bottom:1px solid var(--border)}.db-grow.sub{padding-inline-start:26px;font-size:13.5px}.db-grow b,.db-grow span:first-child{flex:1}.db-grow em{font-style:normal;color:var(--muted);font-size:12px}.db-gact{display:flex;gap:6px}.db-mini.dng{color:#c0392b}.db-lock{font-size:11.5px;color:var(--muted)}.db-gaddsub{margin:4px 0 8px 0}
@media(max-width:560px){.db-gm .db-gadd{grid-template-columns:1fr}}
.db-ext{padding:4px 0 24px}.db-exbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.db-exbar .db-qwrap{flex:1;min-width:200px}.db-exnote{margin:10px 2px}
.db-exi{border:1px solid var(--border);background:var(--bg-elev);border-radius:16px;padding:14px 16px;margin-bottom:10px}.db-ext-t{display:block;font-weight:700;font-size:15px;line-height:1.7;color:inherit;text-decoration:none}.db-ext-t:hover{color:var(--accent);text-decoration:underline}
.db-exs{margin:8px 0 4px;font-size:13px;line-height:1.9;color:var(--muted);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.db-exi .db-acts{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}.db-exi a.gm-btn{text-decoration:none;display:inline-flex;align-items:center}.db-more{display:block;margin:12px auto}

/* 2.41.1 — منوی «استودیو» در نوار بالا + استودیوی لینک‌دار */
.top-pickers{display:flex;align-items:center;gap:8px;min-width:0}.top-pickers .model-picker{min-width:0}
.studio-btn svg:first-child{width:18px;height:18px;color:var(--accent)}.studio-btn span{font-weight:700}
.studio-menu{z-index:600;overflow-y:auto;padding:10px;animation:pop .14s ease-out}
.studio-menu .sm-title{font-size:11px;font-weight:800;letter-spacing:.04em;color:var(--muted);padding:8px 6px 4px}
.sm-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.studio-menu .sm-item{display:flex;align-items:center;gap:8px;width:100%;text-align:start;padding:9px 10px;min-height:44px;font:inherit;font-size:13px;font-weight:600;color:var(--text);cursor:pointer;background:color-mix(in srgb,var(--nc) 11%,transparent);border:1px solid color-mix(in srgb,var(--nc) 28%,transparent);border-radius:14px}
.studio-menu .sm-item:hover{background:color-mix(in srgb,var(--nc) 20%,transparent)}
.studio-menu .sm-ic{flex:0 0 28px;height:28px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--nc) 16%,transparent);color:var(--nc);font-size:15px}.studio-menu .sm-ic svg{width:17px;height:17px}
.studio-menu .sm-l{flex:1;min-width:0;line-height:1.5}.studio-menu .sm-item>svg{width:14px;height:14px;opacity:.6}
@media(max-width:720px){.sm-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){
.topbar{flex-wrap:nowrap!important;row-gap:0}
.topbar>.top-pickers{order:2;flex:1 1 auto;min-width:0;gap:6px}
.topbar>.top-right{order:3;flex:0 0 auto}
.top-pickers .model-picker{flex:1 1 0;min-width:0}
.top-pickers .studio-picker{flex:0 0 auto}
.top-pickers .model-btn{width:100%;padding:7px 9px;gap:5px;font-size:13px;white-space:nowrap}
.top-pickers .model-btn>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-pickers .studio-btn{width:auto}
}
.nav-item.nl-ic,.nav-link-studio .nl-ic{width:30px;height:30px;display:inline-grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--nc) 16%,transparent);font-size:15px}
.ls-wrap{display:flex;flex-direction:column;gap:8px;height:calc(100vh - 120px);min-height:420px}.ls-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ls-sp{flex:1}.ls-frame{flex:1;width:100%;border:1px solid var(--border);border-radius:14px;background:#fff}.ls-hint{font-size:12px;color:var(--muted);margin:0}

.nav-item.nc>.nl-emo{flex:0 0 auto;width:20px;height:20px;padding:5px;box-sizing:content-box;border-radius:10px;background:color-mix(in srgb,var(--nc) 16%,transparent);display:grid;place-items:center;font-size:15px;line-height:1}
.nav-link-studio{text-align:start}.nav-link-studio>span:not(.nl-emo){flex:1;min-width:0;line-height:1.5}

.wl-coupon{margin:12px 0}.wl-crow{display:flex;gap:8px}.wl-crow input{flex:1;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface,#fff);color:inherit;text-transform:uppercase}.wl-cmsg{display:block;margin-top:6px;color:var(--muted)}.wl-cmsg.bad{color:#c0392b}.wl-cok{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;background:rgba(22,163,74,.1);color:#166534;font-size:13px}

.cr-card{margin-bottom:16px}.cr-ctl{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}.cr-btn{padding:9px 16px;border-radius:12px;border:1px solid var(--border);background:var(--surface,#fff);color:inherit;font:inherit;cursor:pointer}.cr-btn.primary{background:var(--accent,#4f46e5);border-color:transparent;color:#fff}.cr-btn.danger{background:#dc2626;border-color:transparent;color:#fff}.cr-btn:disabled{opacity:.5;cursor:default}
.cr-clock{font-variant-numeric:tabular-nums;font-size:20px;margin-inline:8px}.cr-meter{display:inline-block;width:120px;height:8px;border-radius:6px;background:var(--border);overflow:hidden}.cr-meter i{display:block;height:100%;width:0;background:#16a34a;transition:width .1s}
.cr-status{font-size:13px;color:var(--muted);margin:6px 0}.cr-status.rec{color:#dc2626}.cr-status.ok{color:#16a34a}.cr-status.bad{color:#c0392b}.cr-warn{font-size:13px;color:#b45309}.cr-q{display:block;color:var(--muted)}.cr-failed{font-size:13px;color:#c0392b;margin:6px 0}.cr-lim{color:var(--muted)}
.cr-card.rec{box-shadow:0 0 0 2px rgba(220,38,38,.35)}.cr-notes{margin-top:12px;border-top:1px solid var(--border);padding-top:12px}.cr-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.cr-prev{padding:12px 16px;border:1px solid var(--border);border-radius:12px;max-height:520px;overflow:auto;line-height:1.9}.cr-ta{width:100%;margin-top:10px;box-sizing:border-box;font:inherit;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface,#fff);color:inherit}.cr-draft{padding:8px 12px;background:rgba(79,70,229,.08);border-radius:10px;margin:8px 0;font-size:13px}

.cr-err{font-size:13px;color:#c0392b;margin:4px 0;word-break:break-word}.cr-lib{margin-top:10px;display:grid;gap:10px}.cr-sess{padding:12px;border:1px solid var(--border);border-radius:12px;display:grid;gap:6px}.cr-audio{width:100%;max-width:420px}.cr-dls{font-size:13px}.cr-dl{display:inline-block;min-width:22px;text-align:center;padding:2px 6px;border:1px solid var(--border);border-radius:8px;text-decoration:none;color:inherit}

/* v2.47.1 — رفع لغزش افقی صفحه در موبایل (استودیو کلاس) */
.co-pg { overflow-x: hidden; }
.class-root, .class-main, .class-layout, .class-card, .class-side-card, .class-view-panel { min-width: 0; max-width: 100%; box-sizing: border-box; }
.class-root img, .class-root video, .class-root audio, .class-root textarea, .class-root input, .class-root select { max-width: 100%; box-sizing: border-box; }
.class-card-head { flex-wrap: wrap; }
.cr-ctl { min-width: 0; }
.cr-card, .cr-sess { min-width: 0; overflow-wrap: anywhere; }
.cr-prev { overflow-x: auto; max-width: 100%; }
@media (max-width: 560px) {
	.class-title-row { grid-template-columns: minmax(0, 1fr) 96px; }
	.class-title-row .class-select { width: 100%; min-width: 0; padding: 0 8px; }
	.class-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.class-header { max-width: 100%; box-sizing: border-box; }
	.class-record-actions > *, .class-output-actions > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
	.cr-ctl .cr-btn { flex: 1 1 auto; }
	.cr-clock { margin-inline: 0; }
}
