/**
 * MailSign 前台样式
 * 主色取自环球 logo 深蓝（#24437c），参考 dot2/logosc 的卡片式操作流
 */

.ms-app {
	--ms-primary: #24437c;
	--ms-primary-deep: #1b3261;
	--ms-primary-soft: #eef2f9;
	--ms-accent: #3a6bc4;
	--ms-ink: #26303f;
	--ms-ink-2: #5a6472;
	--ms-ink-3: #8a93a3;
	--ms-line: #e5e9ef;
	--ms-bg: #f4f6f9;
	--ms-ok: #1a9c62;
	--ms-err: #d64545;
	--ms-radius: 14px;
	--ms-shadow: 0 6px 24px rgba(38, 48, 63, .07);
	--ms-shadow-lg: 0 12px 40px rgba(36, 67, 124, .16);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	color: var(--ms-ink);
	/* 限制最大宽度，保证左右两栏布局在合理视口下正常显示 */
	max-width: 1400px;
	margin: 0 auto;
	padding: 24px 16px 60px;
	box-sizing: border-box;
}

.ms-app *,
.ms-app *::before,
.ms-app *::after { box-sizing: border-box; }

/* ---------- 顶部横幅 ---------- */

.ms-hero {
	background: linear-gradient(135deg, var(--ms-primary-deep) 0%, var(--ms-primary) 55%, var(--ms-accent) 100%);
	border-radius: var(--ms-radius);
	color: #fff;
	padding: 40px 44px 36px;
	position: relative;
	overflow: hidden;
	margin-bottom: 20px;
	box-shadow: var(--ms-shadow-lg);
}

.ms-hero::after {
	content: "";
	position: absolute;
	right: -80px;
	top: -80px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
}

.ms-hero::before {
	content: "";
	position: absolute;
	right: 60px;
	bottom: -120px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .06);
}

.ms-hero-inner { position: relative; z-index: 1; }

.ms-hero-badge {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .25);
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 14px;
}

.ms-hero-title {
	margin: 0;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 700;
	/* 显式白色：防止主题对 h1 的着色覆盖（横幅背景为深蓝渐变） */
	color: #fff;
}

/* ---------- 缓存提示条 ---------- */

.ms-cache-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #fff8e6;
	border: 1px solid #ffe1a1;
	border-radius: 10px;
	padding: 10px 16px;
	margin-bottom: 20px;
	font-size: 13px;
	color: #8a6116;
}

/* ---------- 主布局 ---------- */

.ms-layout {
	display: flex;
	gap: 20px;
	/* 表单列自然高度；预览列通过 align-self:stretch 拉伸到整行高，
	   否则 sticky 容器高度 = 卡片自身高度，无滚动空间 */
	align-items: flex-start;
}

.ms-form-col { flex: 2 1 56%; min-width: 0; }

.ms-preview-col {
	flex: 1 1 44%;
	/* 签名根表格 min-width 500px + ms-sign-preview 水平内边距 44px = 544，取整 550 */
	min-width: 550px;
	/* 关键：拉伸占满 .ms-layout 行高，给内部 sticky 卡片提供跟随滚动空间 */
	align-self: stretch;
}

.ms-preview-sticky {
	position: sticky;
	top: 20px;
}

/* ---------- 卡片 ---------- */

.ms-card {
	background: #fff;
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow);
	padding: 24px 26px;
	margin-bottom: 20px;
	border: 1px solid rgba(229, 233, 239, .6);
	transition: box-shadow .25s ease;
}

.ms-card:hover { box-shadow: 0 8px 28px rgba(38, 48, 63, .1); }

.ms-card-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 18px;
}

.ms-card-no {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--ms-primary-soft);
	color: var(--ms-primary);
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ms-card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ms-ink);
}

.ms-card-title small {
	font-weight: 400;
	color: var(--ms-ink-3);
	font-size: 12px;
	margin-left: 6px;
}

.ms-card-desc {
	margin: 4px 0 0;
	font-size: 12.5px;
	color: var(--ms-ink-3);
	line-height: 1.5;
}

/* 说明文本双语行：上行中文（稍深）、下行英文（浅色） */
.d-cn { display: block; color: var(--ms-ink-2); }
.d-en { display: block; color: var(--ms-ink-3); margin-top: 2px; }

/* ---------- 表单 ---------- */

.ms-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}

/* 基本信息：手动保存/删除按钮行（仅点击保存才写入 localStorage） */
.ms-info-actions {
	display: flex;
	gap: 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px dashed var(--ms-line);
}

.ms-info-tip {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--ms-ink-3);
	line-height: 1.6;
}

.ms-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--ms-ink-2);
}

.ms-field label small {
	font-weight: 400;
	color: var(--ms-ink-3);
	margin-left: 4px;
}

.ms-field input,
.ms-field textarea {
	width: 100%;
	height: 40px;
	border: 1px solid var(--ms-line);
	border-radius: 9px;
	padding: 0 12px;
	font-size: 14px;
	color: var(--ms-ink);
	background: #fbfcfe;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

/* 办公地址：多行输入，独占一行 */
.ms-field textarea {
	height: auto;
	min-height: 74px;
	padding: 10px 12px;
	line-height: 1.55;
	resize: vertical;
}

.ms-field--full { grid-column: 1 / -1; }

.ms-field input::placeholder,
.ms-field textarea::placeholder { color: #b9c0cc; }

.ms-field input:focus,
.ms-field textarea:focus {
	outline: none;
	border-color: var(--ms-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .15);
}

/* ---------- 语言版本栏 ---------- */

.ms-lang-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px dashed var(--ms-line);
}

.ms-lang-bar > label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ms-ink-2);
}

.ms-lang-bar select {
	height: 34px;
	min-width: 130px;
	border: 1px solid var(--ms-line);
	border-radius: 9px;
	background: #fbfcfe;
	padding: 0 10px;
	font-size: 13.5px;
	color: var(--ms-ink);
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.ms-lang-bar select:focus {
	outline: none;
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .15);
}

/* 添加语言行：默认 hidden，展开时上提贴近语言栏 */
.ms-lang-add {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: -10px 0 16px;
}

.ms-lang-add[hidden] { display: none; }

.ms-lang-add input {
	flex: 1 1 auto;
	min-width: 0;
	height: 34px;
	border: 1px solid var(--ms-line);
	border-radius: 9px;
	padding: 0 12px;
	font-size: 13.5px;
	color: var(--ms-ink);
	background: #fbfcfe;
}

.ms-lang-add input:focus {
	outline: none;
	border-color: var(--ms-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .15);
}

.ms-lang-add button { white-space: nowrap; }

.ms-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- 模板选择 ---------- */

.ms-tpl-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.ms-tpl-item { display: block; cursor: pointer; }

.ms-tpl-item input { position: absolute; opacity: 0; pointer-events: none; }

.ms-tpl-thumb {
	display: block;
	border: 2px solid var(--ms-line);
	border-radius: 12px;
	padding: 18px 16px 14px;
	min-height: 120px;
	background:
		repeating-linear-gradient(45deg, #f8fafc 0 10px, #f2f5f9 10px 20px);
	transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.ms-tpl-item:hover .ms-tpl-thumb { transform: translateY(-2px); }

.ms-tpl-item input:checked + .ms-tpl-thumb {
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .18);
}

.ms-tpl-logo { display: block; margin-bottom: 14px; }

.ms-tpl-logo img { display: block; width: 60px; height: auto; }

/* 模板缩略图默认装饰：模板名称文字 */
.ms-tpl-logo-text {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: var(--ms-primary);
	line-height: 1.3;
	margin-bottom: 12px;
	word-break: break-word;
}

/* 模板缩略图（后台配置的图片替代默认装饰） */
.ms-tpl-thumb-img {
	display: block;
	width: 100%;
	max-height: 100px;
	object-fit: contain;
	margin-bottom: 10px;
}

.ms-tpl-lines { display: block; }

.ms-tpl-lines i {
	display: block;
	height: 5px;
	border-radius: 3px;
	background: #d4dae4;
	margin-bottom: 7px;
}

.ms-tpl-lines i:nth-child(1) { width: 55%; background: #9fb0c8; }
.ms-tpl-lines i:nth-child(2) { width: 40%; }
.ms-tpl-lines i:nth-child(3) { width: 85%; }
.ms-tpl-lines i:nth-child(4) { width: 70%; }

.ms-tpl-icons { display: block; margin-top: 12px; }

.ms-tpl-icons i {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	background: #c3cddc;
	margin-right: 8px;
}

.ms-tpl-links { display: block; margin-top: 12px; }

.ms-tpl-links i {
	display: inline-block;
	width: 34px;
	height: 6px;
	border-radius: 3px;
	background: #c3cddc;
	margin-right: 10px;
}

.ms-tpl-name {
	display: block;
	text-align: center;
	margin-top: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ms-ink-2);
}

.ms-tpl-name small { color: var(--ms-ink-3); font-weight: 400; margin-left: 4px; }

.ms-tpl-item input:checked ~ .ms-tpl-name { color: var(--ms-primary); }

/* ---------- 样式微调 ---------- */

.ms-tweaks {
	margin-top: 18px;
	padding: 16px 18px 14px;
	background: #fafbfd;
	border: 1px solid var(--ms-line);
	border-radius: 12px;
}

.ms-tweaks-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ms-ink);
	margin-bottom: 12px;
}

.ms-tweaks-title small {
	font-weight: 400;
	color: var(--ms-ink-3);
	margin-left: 4px;
}

.ms-tweak-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.ms-tweak-row:last-of-type { margin-bottom: 0; }

.ms-tweak-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 78px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ms-ink-2);
	cursor: pointer;
}

.ms-tweak-label input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--ms-accent);
	cursor: pointer;
}

.ms-tweaks input[type="color"] {
	width: 44px;
	height: 32px;
	padding: 2px;
	border: 1px solid var(--ms-line);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.ms-tweaks input[type="color"]:disabled { opacity: .4; cursor: not-allowed; }

.ms-tweaks input[type="number"] {
	width: 76px;
	height: 32px;
	border: 1px solid var(--ms-line);
	border-radius: 8px;
	background: #fbfcfe;
	padding: 0 10px;
	font-size: 13px;
	color: var(--ms-ink);
}

.ms-tweaks input[type="number"]:focus {
	outline: none;
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .15);
	background: #fff;
}

.ms-tweak-unit { font-size: 12px; color: var(--ms-ink-3); }

.ms-tweak-foot {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--ms-line);
}

.ms-tweak-tip {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--ms-ink-3);
	line-height: 1.7;
}

/* 自定义模板缩略图首字占位 */
.ms-tpl-logo-text {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 32px;
	border-radius: 8px;
	background: var(--ms-primary-soft);
	color: var(--ms-primary);
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 14px;
}

/* ---------- 社媒勾选（v2 统一区，无分组标题） ---------- */

.ms-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.ms-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1.5px solid var(--ms-line);
	background: #fff !important;
	border-radius: 999px;
	padding: 7px 15px 7px 12px;
	font-size: 13px;
	color: var(--ms-ink-2) !important;
	cursor: pointer;
	transition: all .18s ease;
	user-select: none;
}

.ms-chip img { display: block; opacity: .45; filter: grayscale(1); transition: all .18s ease; }

.ms-chip:hover { border-color: var(--ms-accent); color: var(--ms-primary) !important; }

.ms-chip.on {
	border-color: var(--ms-accent);
	background: var(--ms-primary-soft) !important;
	color: var(--ms-primary) !important;
	font-weight: 600;
}

.ms-chip.on img { opacity: 1; filter: none; }

.ms-chip::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #c9d2dd;
	transition: all .18s ease;
}

.ms-chip.on::before { background: var(--ms-accent); box-shadow: 0 0 0 3px rgba(58, 107, 196, .2); }

.ms-social-options {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--ms-line);
}

.ms-social-opt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ms-ink-2);
	cursor: pointer;
}

.ms-social-opt input[type="checkbox"] {
	width: 15px;
	height: 15px;
	margin: 0;
	cursor: pointer;
}

/* ---------- 操作区 ---------- */

.ms-action-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 12px; /* 位于预览区字符统计 tips 之后，与提示留出间距 */
}

.ms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	padding: 0 30px;
	height: 46px;
	transition: all .2s ease;
	/* 覆盖主题 button 全局样式（防 button:focus/hover 污染） */
	-webkit-appearance: none;
	appearance: none;
	background: transparent !important;
}

.ms-btn-primary {
	background: linear-gradient(135deg, var(--ms-primary) 0%, var(--ms-accent) 100%) !important;
	/* color 加 !important：主题全局 button:hover 常将字色改为黑色，与蓝渐变背景冲突 */
	color: #fff !important;
	box-shadow: 0 6px 18px rgba(36, 67, 124, .28);
}

.ms-btn-primary:hover { color: #fff !important; transform: translateY(-1px); box-shadow: 0 9px 24px rgba(36, 67, 124, .36); }

.ms-btn-primary:active { transform: translateY(0); }

.ms-btn-ghost {
	background: #fff !important;
	color: var(--ms-ink-2) !important;
	border: 1.5px solid var(--ms-line);
}

.ms-btn-ghost:hover { border-color: var(--ms-accent); color: var(--ms-primary) !important; }

.ms-btn-sm { height: 30px; font-size: 12.5px; padding: 0 16px; border-radius: 999px; }

/* ---------- 预览 ---------- */

.ms-preview-sticky {
	background: #fff;
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow);
	border: 1px solid rgba(229, 233, 239, .6);
	padding-bottom: 20px;
	margin-bottom: 24px;
	/* 卡片高度不超过视口：超出时自身内部滚动，保证底部统计/源码始终可见 */
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ms-preview-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--ms-line);
	background: #fafbfd;
}

.ms-preview-title { font-size: 14px; font-weight: 700; color: var(--ms-ink); }
.ms-preview-title small { color: var(--ms-ink-3); font-weight: 400; margin-left: 4px; }

.ms-preview-badge {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ms-primary);
	background: var(--ms-primary-soft);
	border-radius: 999px;
	padding: 3px 12px;
}

.ms-sign-preview {
	padding: 26px 22px;
	background:
		repeating-linear-gradient(45deg, #fbfcfe 0 12px, #f6f8fb 12px 24px);
	overflow-x: auto;
	/* 禁止手动选择复制：手动复制会混入页面样式导致企业微信超限，复制必须走按钮 */
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* 隔离主题样式对签名预览的干扰 */
.ms-sign-preview table { max-width: 100%; }
.ms-sign-preview td,
.ms-sign-preview th,
.ms-sign-preview tr { padding: 0; margin: 0; border: 0; background: transparent; }
.ms-sign-preview td { overflow-wrap: anywhere; word-break: break-word; }
.ms-sign-preview img { max-width: none; height: auto; }
.ms-sign-preview a { text-decoration: none; }

/* ---------- 预览区附加：字符统计 + HTML 源码兑底 ---------- */

.ms-preview-meta {
	padding: 12px 18px 14px;
	border-top: 1px dashed var(--ms-line);
}

.ms-chars {
	font-size: 12.5px;
	color: var(--ms-ink-3);
}

.ms-chars.over { color: var(--ms-err); font-weight: 700; }

/* 企业微信保存时会重新序列化放大字符，源码超过安全阈值预警 */
.ms-chars.warn { color: #b07a1a; font-weight: 600; }

.ms-chars-tip {
	margin-top: 4px;
	font-size: 11.5px;
	color: var(--ms-ink-3);
	line-height: 1.6;
}

.ms-source {
	padding: 12px 18px 16px;
	border-top: 1px dashed var(--ms-line);
}

.ms-source-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.ms-source-title { font-size: 13px; font-weight: 700; color: var(--ms-ink); }
.ms-source-title small { color: var(--ms-ink-3); font-weight: 400; margin-left: 4px; }

.ms-source textarea {
	display: block;
	width: 100%;
	min-height: 96px;
	border: 1px solid var(--ms-line);
	border-radius: 9px;
	background: #fbfcfe;
	padding: 10px 12px;
	font: 11.5px/1.6 ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
	color: var(--ms-ink-2);
	resize: vertical;
	white-space: pre-wrap;
	word-break: break-all;
}

.ms-source textarea:focus {
	outline: none;
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 3px rgba(58, 107, 196, .15);
	background: #fff;
}

/* 源码区复制按钮位于提示文案下方，与 tip 留出间距 */
.ms-source-tip + .ms-btn { margin-top: 10px; }

.ms-source-body {
	display: none;
}
.ms-source.open .ms-source-body {
	display: block;
}

/* 展开/收起按钮文字切换 */
.ms-src-hide { display: none; }
.ms-src-show { display: inline; }
.ms-source.open .ms-src-show { display: none; }
.ms-source.open .ms-src-hide { display: inline; }

.ms-source-tip {
	margin: 8px 0 0;
	font-size: 11.5px;
	color: var(--ms-ink-3);
	line-height: 1.6;
}

/* 预览中示例数据（demo）标识：浅色斜体区分未填写字段 */
.ms-demo {
	color: #b0b8c4;
	font-style: italic;
}

/* ---------- 教程（每条上下两行双语） ---------- */
.ms-guide-steps { margin: 0; padding-left: 20px; }

.ms-guide-steps li { margin-bottom: 12px; }
.ms-guide-steps li:last-child { margin-bottom: 0; }

.g-cn {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ms-ink);
	line-height: 1.7;
}

.g-en {
	display: block;
	font-size: 12.5px;
	color: var(--ms-ink-3);
	line-height: 1.7;
	margin-top: 2px;
}

.g-en img { vertical-align: middle; margin-left: 6px; border: 1px solid var(--ms-line); border-radius: 6px; }
.ms-guide-steps a { color: var(--ms-accent); }
.ms-guide-steps b { color: var(--ms-ink); }

/* ---------- 应用签名手风琴：多邮件客户端，点击展开/收起 ---------- */

.ms-accordion { display: flex; flex-direction: column; gap: 10px; }

.ms-acc-item {
	border: 1px solid var(--ms-line);
	border-radius: 10px;
	background: #fbfcfe;
	overflow: hidden;
}

.ms-acc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.ms-acc-head:hover { background: #f3f6fc !important; }

.ms-acc-head:focus,
.ms-acc-head:focus-visible {
	outline: none;
	background: transparent !important;
	box-shadow: inset 0 0 0 3px rgba(58, 107, 196, .18);
}

.ms-acc-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--ms-ink);
	line-height: 1.4;
}

.ms-acc-title small {
	display: block;
	font-weight: 400;
	font-size: 11.5px;
	color: var(--ms-ink-3);
	margin-top: 2px;
}

.ms-acc-arrow {
	flex: 0 0 auto;
	color: var(--ms-ink-3);
	transition: transform .22s ease;
}

.ms-acc-item.open .ms-acc-arrow { transform: rotate(180deg); }

.ms-acc-body { display: none; padding: 4px 16px 16px 32px; }

.ms-acc-item.open .ms-acc-body { display: block; }

/* ---------- Toast ---------- */

.ms-toast {
	position: fixed;
	left: 50%;
	bottom: 40px;
	transform: translate(-50%, 20px);
	background: var(--ms-ink);
	color: #fff;
	font-size: 14px;
	border-radius: 999px;
	padding: 12px 28px;
	opacity: 0;
	pointer-events: none;
	transition: all .3s ease;
	z-index: 99999;
	box-shadow: 0 10px 30px rgba(38, 48, 63, .3);
	max-width: 86vw;
}

.ms-toast-show { opacity: 1; transform: translate(-50%, 0); }

.ms-toast-error { background: var(--ms-err); }

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
	.ms-layout { flex-direction: column; }
	.ms-preview-col { width: 100%; min-width: 0; }
	.ms-preview-sticky { position: static; max-height: none; overflow-y: visible; }
}

@media (max-width: 640px) {
	.ms-app { padding: 14px 10px 40px; }
	.ms-hero { padding: 26px 22px; }
	.ms-hero-title { font-size: 22px; }
	.ms-grid { grid-template-columns: 1fr; }
	.ms-tpl-list { grid-template-columns: 1fr; }
	.ms-card { padding: 18px 16px; }
	.ms-btn { width: 100%; }
	.ms-cache-banner { flex-direction: column; text-align: center; }
	.ms-lang-bar select { flex: 1 1 auto; }
	.ms-lang-add input { flex: 1 1 auto; }
	.ms-source textarea { min-height: 64px; }
}
