/* محیط AMIR CLAUDE — فضای گرم و کاغذی با تاکید خاکی-نارنجی */

:root[data-ws="claude"] {
	--bg: #fbfbfa;
	--bg-side: #f3f3f1;
	--bg-elev: #ffffff;
	--text: #1f1f1e;
	--muted: #6f6f6b;
	--border: #e6e6e2;
	--hover: #eaeae6;
	--active: #e1e1dc;
	--accent: #d97757;
	--accent-soft: #fbebe4;
	--accent-contrast: #ffffff;
	--user-bubble: #efefeb;
	--composer-bg: #ffffff;
	--composer-border: #dcdcd6;
	--composer-radius: 24px;
	--send-bg: #d97757;
	--send-fg: #ffffff;
	--shadow: 0 2px 14px rgba(60, 45, 20, .07);
	--shadow-lg: 0 20px 54px rgba(60, 45, 20, .2);
	--code-bg: #26241f;
	--code-head: #312e27;
	--code-text: #ece8dc;
	--code-muted: #a39e8d;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root[data-ws="claude"]:not([data-mode="light"]) {
		--bg: #191919;
		--bg-side: #1f1f1f;
		--bg-elev: #262626;
		--text: #ececec;
		--muted: #a3a3a0;
		--border: #323232;
		--hover: #2a2a2a;
		--active: #3a3a3a;
		--accent: #d97757;
		--accent-soft: #33241e;
		--accent-contrast: #2a160d;
		--user-bubble: #262626;
		--composer-bg: #303030;
		--composer-border: #3d3d3d;
		--send-bg: #d97757;
		--send-fg: #2a160d;
		--shadow: 0 2px 16px rgba(0, 0, 0, .4);
		--shadow-lg: 0 20px 54px rgba(0, 0, 0, .6);
		--code-bg: #181715;
		--code-head: #221f1c;
		--code-text: #ece8dc;
		--code-muted: #a39e8d;
		color-scheme: dark;
	}
}

:root[data-ws="claude"][data-mode="dark"] {
	--bg: #191919;
	--bg-side: #1f1f1f;
	--bg-elev: #262626;
	--text: #ececec;
	--muted: #a3a3a0;
	--border: #323232;
	--hover: #2a2a2a;
	--active: #3a3a3a;
	--accent: #d97757;
	--accent-soft: #33241e;
	--accent-contrast: #2a160d;
	--user-bubble: #262626;
	--composer-bg: #303030;
	--composer-border: #3d3d3d;
	--send-bg: #d97757;
	--send-fg: #2a160d;
	--shadow: 0 2px 16px rgba(0, 0, 0, .4);
	--shadow-lg: 0 20px 54px rgba(0, 0, 0, .6);
	--code-bg: #181715;
	--code-head: #221f1c;
	--code-text: #ece8dc;
	--code-muted: #a39e8d;
	color-scheme: dark;
}

/* ---------- ظاهر شبیه Claude: چیدمان LTR، سریف، منوی تخت، ورودی دوطبقه ---------- */
@font-face { font-family: "CSerif"; src: local("Tiempos Text"), local("Georgia"), local("Times New Roman"); unicode-range: U+0000-024F, U+2000-206F; }
.amirai-theme-claude { --serif: "CSerif", "Vazirmatn", ui-serif, serif; }
.amirai-theme-claude .app { direction: ltr; }
.amirai-theme-claude .sidebar { width: 268px; padding: 10px 8px; gap: 2px; border-inline-end: 0; }
.amirai-theme-claude .app.side-collapsed .sidebar { margin-inline-start: -268px; }
.amirai-theme-claude .side-head { padding: 4px 6px 10px; }
.amirai-theme-claude .brand-mark { background: none; color: var(--accent); width: 28px; height: 28px; border-radius: 0; }
.amirai-theme-claude .brand-mark svg { width: 24px; height: 24px; }
.amirai-theme-claude .brand-title { font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: 0; }
.amirai-theme-claude .brand-sub { display: none; }
.amirai-theme-claude .side-head .icon-btn { width: 32px; height: 32px; }

.amirai-theme-claude .new-chat, .amirai-theme-claude .search, .amirai-theme-claude .proj-head, .amirai-theme-claude .proj-item, .amirai-theme-claude .bot-btn {
	border: 0; background: transparent; border-radius: 9px; padding: 7px 10px; font-size: 14.5px; font-weight: 500; color: var(--text); gap: 10px;
}
.amirai-theme-claude .new-chat:hover, .amirai-theme-claude .proj-item:hover, .amirai-theme-claude .bot-btn:hover { background: var(--hover); }
.amirai-theme-claude .new-chat svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--accent); color: #fff; }
.amirai-theme-claude .search {
	padding-inline-start: 38px; background: transparent no-repeat 10px center / 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a95' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
	direction: ltr; text-align: start;
}
.amirai-theme-claude .search:hover { background-color: var(--hover); }
.amirai-theme-claude .search:focus { background-color: var(--hover); border: 0; box-shadow: none; }
.amirai-theme-claude .proj-head { color: var(--muted); font-size: 12.5px; font-weight: 500; padding-top: 14px; }
.amirai-theme-claude .conv-group { font-size: 12.5px; font-weight: 500; padding: 16px 10px 4px; }
.amirai-theme-claude .conv { border-radius: 9px; }
.amirai-theme-claude .conv-title { font-size: 14px; padding: 7px 10px; unicode-bidi: plaintext; }
.amirai-theme-claude .conv.active, .amirai-theme-claude .conv:hover { background: var(--hover); }
.amirai-theme-claude .conv.active { background: var(--active); }
.amirai-theme-claude .side-foot { border-top: 0; padding-top: 4px; }
.amirai-theme-claude .disclaimer { display: none; }
.amirai-theme-claude .avatar { width: 30px; height: 30px; background: var(--active); color: var(--text); font-size: 12.5px; }
.amirai-theme-claude .user-row { padding: 6px 8px; border-radius: 10px; }
.amirai-theme-claude .user-row:hover { background: var(--hover); }

/* نوار بالا */
.amirai-theme-claude .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; min-height: 52px; padding: 8px 12px; }
.amirai-theme-claude .top-title { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; font-size: 14.5px; max-width: 38vw; unicode-bidi: plaintext; }
.amirai-theme-claude .top-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amirai-theme-claude .top-title svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.amirai-theme-claude .ws-switch { font-size: 0; }
.amirai-theme-claude .ws-switch button { font-size: 11.5px; padding: 5px 11px; }

/* گفتگو */
.amirai-theme-claude .thread-inner { max-width: 760px; gap: 22px; }
.amirai-theme-claude .msg.user { justify-content: flex-end; }
.amirai-theme-claude .msg .bubble { background: var(--user-bubble); border-radius: 14px; padding: 9px 15px; max-width: 78%; unicode-bidi: plaintext; text-align: start; }
.amirai-theme-claude .msg.assistant .ava { display: none; }
.amirai-theme-claude .msg.assistant .body { font-family: var(--serif); font-size: 16.5px; line-height: 1.8; }
.amirai-theme-claude .md p, .amirai-theme-claude .md li, .amirai-theme-claude .md h1, .amirai-theme-claude .md h2, .amirai-theme-claude .md h3, .amirai-theme-claude .md h4, .amirai-theme-claude .md blockquote { unicode-bidi: plaintext; text-align: start; }
.amirai-theme-claude .md h1, .amirai-theme-claude .md h2, .amirai-theme-claude .md h3 { font-weight: 600; }
.amirai-theme-claude .md strong { font-weight: 700; }
.amirai-theme-claude .msg .actions { opacity: 1; margin-top: 4px; }
.amirai-theme-claude .msg .actions button { width: 28px; height: 28px; }
.amirai-theme-claude .auto-tag, .amirai-theme-claude .msg .bubble .att { font-family: "Vazirmatn", system-ui, sans-serif; }

/* حالت خالی */
.amirai-theme-claude .empty-logo { background: none; box-shadow: none; width: auto; height: auto; border-radius: 0; color: var(--accent); margin-bottom: 8px; }
.amirai-theme-claude .empty-logo svg { width: 44px; height: 44px; }
.amirai-theme-claude .empty h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.4vw, 40px); }
.amirai-theme-claude .empty p { display: none; }
.amirai-theme-claude .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.amirai-theme-claude .chip { border-radius: 10px; padding: 8px 14px; font-size: 13.5px; color: var(--muted); background: transparent; }
.amirai-theme-claude .chip:hover { color: var(--text); background: var(--hover); transform: none; }

/* ورودی: متن بالا، ابزارها پایین، مدل و ارسال سمت راست */
.amirai-theme-claude .composer { flex-direction: column; align-items: stretch; padding: 12px 12px 10px; border-radius: 24px; gap: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.12); direction: ltr; }
.amirai-theme-claude .composer-row { display: grid; grid-template-columns: auto auto auto 1fr auto auto; align-items: center; column-gap: 2px; }
.amirai-theme-claude .composer-row textarea { grid-column: 1 / -1; grid-row: 1; padding: 4px 6px 10px; unicode-bidi: plaintext; text-align: start; font-family: var(--serif); font-size: 16.5px; }
.amirai-theme-claude .composer-row .attach-btn { grid-row: 2; width: 34px; height: 34px; border-radius: 9px; }
.amirai-theme-claude .composer-row .model-picker { grid-row: 2; grid-column: 5; }
.amirai-theme-claude .composer-row .send-btn { grid-row: 2; grid-column: 6; width: 34px; height: 34px; border-radius: 9px; margin-inline-start: 4px; }
.amirai-theme-claude .composer .model-btn { font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: 9px; color: var(--muted); }
.amirai-theme-claude .composer .model-btn:hover { color: var(--text); }
.amirai-theme-claude .composer .menu { top: auto; bottom: calc(100% + 8px); inset-inline-start: auto; inset-inline-end: 0; direction: ltr; }
.amirai-theme-claude .composer-note { font-size: 11.5px; }
.amirai-theme-claude .attach-row { order: -1; }
@media (max-width: 760px) { .amirai-theme-claude .top-title { max-width: 30vw; } }
.amirai-theme-claude .proj-empty { display: none; }
.amirai-theme-claude .brand-title { font-size: 20px; }
