/* Trình thiết kế trên phông nền — designer-app.php */
:root {
	--d-ink: #0f172a; --d-text: #334155; --d-muted: #64748b; --d-line: #e2e8f0; --d-bg: #f1f5f9;
	--d-panel: #ffffff; --d-blue: #2563eb; --d-blue-soft: #eff6ff; --d-danger: #dc2626;
	--d-top: 64px;
}
html, body.tas-dsg-body { height: 100%; margin: 0; }
body.tas-dsg-body { background: var(--d-bg); color: var(--d-text); font: 14px/1.5 Inter, "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
.tas-dsg-body *, .tas-dsg-body *::before, .tas-dsg-body *::after { box-sizing: border-box; }
.tas-dsg-body button, .tas-dsg-body input, .tas-dsg-body select, .tas-dsg-body textarea { font: inherit; color: inherit; }
.tas-dsg-body svg { width: 18px; height: 18px; flex-shrink: 0; }
.tas-dsg-body [hidden] { display: none !important; }

.tas-dsg { display: grid; grid-template: var(--d-top) 1fr / 240px minmax(0, 1fr) 300px; grid-template-areas: "top top top" "tools stage props"; height: 100vh; height: 100dvh; }

/* Thanh trên */
.tas-dsg-top { grid-area: top; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--d-line); background: var(--d-panel); }
.tas-dsg-back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--d-line); border-radius: 10px; color: var(--d-ink); text-decoration: none; }
.tas-dsg-back:hover { background: var(--d-bg); }
.tas-dsg-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tas-dsg-title small { color: var(--d-blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tas-dsg-title strong { overflow: hidden; color: var(--d-ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.tas-dsg-hist { display: flex; gap: 4px; margin-left: 12px; }
.tas-dsg-hist button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--d-ink); cursor: pointer; }
.tas-dsg-hist button:hover:not(:disabled) { background: var(--d-bg); }
.tas-dsg-hist button:disabled { opacity: .35; cursor: default; }
.tas-dsg-buy { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.tas-dsg-price { color: var(--d-ink); font-size: 17px; font-weight: 700; white-space: nowrap; }

.tas-dsg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.tas-dsg-btn--primary { background: var(--d-blue); color: #fff !important; }
.tas-dsg-btn--primary:hover { background: #1d4ed8; }
.tas-dsg-btn--ghost { border-color: var(--d-line); background: #fff; color: var(--d-ink) !important; }
.tas-dsg-btn--ghost:hover { border-color: #cbd5e1; background: var(--d-bg); }
.tas-dsg-link { padding: 6px 0; border: 0; background: none; color: var(--d-muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tas-dsg-link:hover { color: var(--d-ink); }

/* Cột công cụ + thuộc tính */
.tas-dsg-tools, .tas-dsg-props { overflow-y: auto; padding: 18px 16px; background: var(--d-panel); }
.tas-dsg-tools { grid-area: tools; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--d-line); }
.tas-dsg-props { grid-area: props; border-left: 1px solid var(--d-line); }
.tas-dsg-label { margin: 14px 0 6px; color: var(--d-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tas-dsg-label:first-child { margin-top: 0; }
.tas-dsg-add { width: 100%; padding: 12px 14px; border: 1px solid var(--d-line); border-radius: 12px; background: #fff; color: var(--d-ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.tas-dsg-add:hover { border-color: var(--d-blue); background: var(--d-blue-soft); }
.tas-dsg .tas-dsg-add--h { font-size: 19px; font-weight: 800; }
.tas-dsg .tas-dsg-add--b { font-size: 15px; font-weight: 500; }
.tas-dsg .tas-dsg-add--s { font-size: 12.5px; color: var(--d-text); }
.tas-dsg-upload { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed #cbd5e1; border-radius: 12px; color: var(--d-ink); font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.tas-dsg-upload:hover { border-color: var(--d-blue); background: var(--d-blue-soft); }
.tas-dsg-note { margin: 0; color: var(--d-muted); font-size: 12px; }
.tas-dsg-tools-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 16px; }

.tas-dsg-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 10px; color: var(--d-muted); text-align: center; }
.tas-dsg-empty svg { width: 28px; height: 28px; color: #94a3b8; }
.tas-dsg-props textarea, .tas-dsg-props select, .tas-dsg-props input[type=number] { width: 100%; padding: 9px 11px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; outline: none; }
.tas-dsg-props textarea { resize: vertical; min-height: 72px; }
.tas-dsg-props textarea:focus, .tas-dsg-props select:focus, .tas-dsg-props input[type=number]:focus { border-color: var(--d-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.tas-dsg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tas-dsg-field { display: flex; flex-direction: column; gap: 4px; color: var(--d-muted); font-size: 12px; }
.tas-dsg-field input[type=color] { width: 100%; height: 40px; padding: 3px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; cursor: pointer; }
.tas-dsg-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tas-dsg-swatches button { width: 24px; height: 24px; border: 1px solid rgba(15, 23, 42, .15); border-radius: 50%; cursor: pointer; }
.tas-dsg-swatches button:hover { transform: scale(1.12); }
.tas-dsg-seg { display: flex; align-items: center; gap: 4px; margin-top: 14px; padding: 4px; border: 1px solid var(--d-line); border-radius: 12px; }
.tas-dsg-seg button { display: inline-flex; flex: 1; align-items: center; justify-content: center; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--d-ink); font-size: 15px; cursor: pointer; }
.tas-dsg-seg button:hover { background: var(--d-bg); }
.tas-dsg-seg button.is-on { background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-sep { width: 1px; height: 20px; background: var(--d-line); }
.tas-dsg-range { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; color: var(--d-muted); font-size: 12px; }
.tas-dsg-range span { display: flex; justify-content: space-between; }
.tas-dsg-range output { color: var(--d-ink); font-weight: 600; }
.tas-dsg-range input { width: 100%; accent-color: var(--d-blue); }
.tas-dsg-more { margin-top: 14px; border-top: 1px solid var(--d-line); padding-top: 10px; }
.tas-dsg-more summary { color: var(--d-ink); font-weight: 600; cursor: pointer; }
.tas-dsg-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--d-text); }
.tas-dsg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tas-dsg-grid button { padding: 9px 8px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; color: var(--d-ink); font-size: 13px; cursor: pointer; }
.tas-dsg-grid button:hover { border-color: #cbd5e1; background: var(--d-bg); }
.tas-dsg-grid .is-danger { color: var(--d-danger); }
.tas-dsg-grid .is-danger:hover { border-color: #fecaca; background: #fef2f2; }

/* Vùng canvas */
.tas-dsg-stage { grid-area: stage; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; overflow: auto; padding: 24px;
	background-color: #e8edf3; background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 18px 18px; }
.tas-dsg-canvas-wrap { flex-shrink: 0; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 20px 50px -20px rgba(15, 23, 42, .35); }
.tas-dsg-hint { margin: 0; color: var(--d-muted); font-size: 12.5px; text-align: center; }
.tas-dsg-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(241, 245, 249, .85); color: var(--d-ink); font-weight: 600; }
.tas-dsg-loading span, .tas-dsg-spinner { width: 22px; height: 22px; border: 3px solid #bfdbfe; border-top-color: var(--d-blue); border-radius: 50%; animation: tas-dsg-spin .8s linear infinite; }
@keyframes tas-dsg-spin { to { transform: rotate(360deg); } }

/* Hộp thoại */
.tas-dsg-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); }
.tas-dsg-modal-box { width: 100%; max-width: 440px; padding: 28px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.tas-dsg-modal-box h2 { margin: 12px 0 6px; color: var(--d-ink); font-size: 20px; }
.tas-dsg-modal-box p { margin: 0 0 16px; color: var(--d-muted); }
.tas-dsg-spinner { width: 38px; height: 38px; margin: 0 auto; border-width: 4px; }
.tas-dsg-bar { height: 6px; overflow: hidden; border-radius: 6px; background: var(--d-line); }
.tas-dsg-bar i { display: block; width: 0; height: 100%; background: var(--d-blue); transition: width .2s; }
#tas-dsg-done-img { display: block; max-width: 100%; max-height: 220px; margin: 0 auto; border: 1px solid var(--d-line); border-radius: 10px; }
.tas-dsg-modal-actions { display: flex; flex-direction: column; gap: 8px; }

/* Điện thoại / máy tính bảng */
@media (max-width: 899.98px) {
	body.tas-dsg-body { overflow: auto; }
	.tas-dsg { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
	.tas-dsg-top { position: sticky; top: 0; z-index: 20; flex-wrap: wrap; gap: 8px 10px; height: auto; padding: 10px 12px; }
	.tas-dsg-title { flex: 1; }
	.tas-dsg-hist { margin-left: 0; }
	.tas-dsg-buy { width: 100%; justify-content: space-between; }
	.tas-dsg-buy .tas-dsg-btn { flex: 1; }
	.tas-dsg-tools { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--d-line); }
	.tas-dsg-tools .tas-dsg-label, .tas-dsg-tools .tas-dsg-note { display: none; }
	.tas-dsg-add, .tas-dsg-upload { width: auto; flex: 1 1 auto; padding: 9px 12px; font-size: 13px !important; text-align: center; }
	.tas-dsg-upload { justify-content: center; border-style: solid; }
	.tas-dsg-tools-foot { flex-direction: row; width: 100%; justify-content: space-between; margin: 0; padding-top: 4px; }
	.tas-dsg-stage { padding: 12px 8px; overflow: visible; }
	.tas-dsg-hint { display: none; }
	.tas-dsg-props { border-left: 0; border-top: 1px solid var(--d-line); padding-bottom: 40px; }
	.tas-dsg-empty { padding: 16px 10px; }
}

/* ═══════════════════ Trình thiết kế v2: thẻ công cụ, kiểu chữ mẫu, hình, phông, màu, hiệu ứng, lớp ═══════════════════ */
.tas-dsg { grid-template-columns: 272px minmax(0, 1fr) 304px; }
.tas-dsg-tools { gap: 0; padding: 0; }
.tas-dsg-tabs { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--d-line); background: var(--d-panel); }
.tas-dsg-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--d-muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.tas-dsg-tabs button:hover { background: var(--d-bg); color: var(--d-ink); }
.tas-dsg-tabs button.is-on { background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-tabs svg { width: 19px; height: 19px; }
.tas-dsg-tab { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 6px; }
.tas-dsg-tab .tas-dsg-label { margin-top: 10px; }
.tas-dsg-tab .tas-dsg-label:first-child { margin-top: 0; }
.tas-dsg-label small { color: #94a3b8; font-weight: 500; letter-spacing: 0; text-transform: none; }
.tas-dsg-tools-foot { padding: 16px; }

/* Kiểu chữ mẫu */
.tas-dsg-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tas-dsg-preset { display: flex; align-items: center; justify-content: center; min-height: 62px; padding: 8px 6px; overflow: hidden; border: 1px solid #1e293b; border-radius: 12px; background: radial-gradient(120% 120% at 0 0, #334155, #0f172a); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.tas-dsg-preset:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--d-blue), 0 8px 18px -8px rgba(15, 23, 42, .5); }
.tas-dsg-preset span { max-width: 100%; padding: 4px 2px; overflow: hidden; font-size: 17px; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }

/* Hình khối + biểu tượng */
.tas-dsg-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tas-dsg-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; color: #334155; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.tas-dsg-tile:hover { border-color: var(--d-blue); background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-tile svg { width: 26px; height: 26px; }
.tas-dsg-tiles--icons { grid-template-columns: repeat(5, 1fr); }
.tas-dsg-tiles--icons svg { width: 21px; height: 21px; }

/* Lớp */
.tas-dsg-layers { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tas-dsg-layers .is-empty { padding: 14px 4px; color: var(--d-muted); font-size: 13px; }
.tas-dsg-layer { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid transparent; border-radius: 10px; }
.tas-dsg-layer:hover { background: var(--d-bg); }
.tas-dsg-layer.is-on { border-color: #bfdbfe; background: var(--d-blue-soft); }
.tas-dsg-layer.is-hidden .tas-dsg-layer-main { opacity: .45; }
.tas-dsg-layer-main { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; padding: 6px; border: 0; background: none; color: var(--d-ink); text-align: left; cursor: pointer; }
.tas-dsg-layer-ic { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--d-line); color: var(--d-muted); }
.tas-dsg-layer-ic svg { width: 15px; height: 15px; }
.tas-dsg-layer-name { overflow: hidden; font-size: 13.5px; white-space: nowrap; text-overflow: ellipsis; }
.tas-dsg-layer-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: #94a3b8; cursor: pointer; }
.tas-dsg-layer-btn:hover { background: #fff; color: var(--d-ink); }
.tas-dsg-layer-btn.is-on { color: var(--d-blue); }
.tas-dsg-layer-btn svg { width: 16px; height: 16px; }

/* Chữ: đổi kiểu hoa/thường */
.tas-dsg-case { display: flex; gap: 6px; margin-top: 8px; }
.tas-dsg-case button { flex: 1; height: 32px; border: 1px solid var(--d-line); border-radius: 9px; background: #fff; color: var(--d-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.tas-dsg-case button:hover { border-color: #cbd5e1; background: var(--d-bg); }

/* Chọn phông */
.tas-dsg-fontpick { position: relative; }
.tas-dsg-fontbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; color: var(--d-ink); font-size: 16px !important; cursor: pointer; }
.tas-dsg-fontbtn:hover, .tas-dsg-fontbtn[aria-expanded=true] { border-color: var(--d-blue); }
.tas-dsg-fontbtn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tas-dsg-fontbtn svg { width: 16px; height: 16px; color: var(--d-muted); }
.tas-dsg-fontpop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; padding: 10px; border: 1px solid var(--d-line); border-radius: 14px; background: #fff; box-shadow: 0 24px 50px -18px rgba(15, 23, 42, .4); }
.tas-dsg-props .tas-dsg-fontpop input[type=search] { width: 100%; padding: 8px 11px; border: 1px solid var(--d-line); border-radius: 9px; outline: none; }
.tas-dsg-props .tas-dsg-fontpop input[type=search]:focus { border-color: var(--d-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.tas-dsg-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tas-dsg-chips button { padding: 4px 9px; border: 1px solid var(--d-line); border-radius: 999px; background: #fff; color: var(--d-text); font-size: 12px; cursor: pointer; }
.tas-dsg-chips button.is-on { border-color: var(--d-blue); background: var(--d-blue); color: #fff; }
.tas-dsg-fontlist { max-height: 300px; margin: 0 -4px; padding: 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.tas-dsg-fontlist button { display: block; width: 100%; padding: 8px 10px; overflow: hidden; border: 0; border-radius: 8px; background: none; color: var(--d-ink); font-size: 19px !important; line-height: 1.3; text-align: left; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.tas-dsg-fontlist button:hover { background: var(--d-bg); }
.tas-dsg-fontlist button.is-on { background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-fontlist .is-empty { padding: 12px; color: var(--d-muted); font-size: 13px; }

/* Cỡ chữ */
.tas-dsg-size { margin-top: 12px; }
.tas-dsg-stepper { display: grid; grid-template-columns: 40px 1fr 40px; overflow: hidden; border: 1px solid var(--d-line); border-radius: 10px; }
.tas-dsg-stepper button { border: 0; background: var(--d-bg); color: var(--d-ink); font-size: 18px; cursor: pointer; }
.tas-dsg-stepper button:hover { background: #e2e8f0; }
.tas-dsg-props .tas-dsg-stepper input[type=number] { border: 0; border-radius: 0; text-align: center; font-weight: 600; box-shadow: none; }

/* Bảng màu */
.tas-dsg-cw-top { display: flex; gap: 6px; }
.tas-dsg-cw-custom { position: relative; flex-shrink: 0; width: 38px; height: 38px; overflow: hidden; border: 1px solid var(--d-line); border-radius: 10px; cursor: pointer; }
.tas-dsg-cw-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tas-dsg-cw-custom span { position: absolute; inset: 4px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12); pointer-events: none; }
.tas-dsg-props .tas-dsg-cw-hex { flex: 1; min-width: 0; padding: 0 11px; border: 1px solid var(--d-line); border-radius: 10px; font-family: ui-monospace, Consolas, monospace !important; font-size: 13px; text-transform: uppercase; outline: none; }
.tas-dsg-cw-hex:focus { border-color: var(--d-blue); }
.tas-dsg-cw-eye { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; color: var(--d-ink); cursor: pointer; }
.tas-dsg-cw-eye:hover { border-color: var(--d-blue); color: var(--d-blue); }
.tas-dsg-cw-sub { margin: 10px 0 5px; color: var(--d-muted); font-size: 11.5px; font-weight: 600; }
.tas-dsg-cw-grid, .tas-dsg-cw-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tas-dsg-cw-grid { margin-top: 10px; }
.tas-dsg-cw-grid button, .tas-dsg-cw-row button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12); cursor: pointer; transition: transform .1s; }
.tas-dsg-cw-grid button:hover, .tas-dsg-cw-row button:hover { transform: scale(1.15); }
.tas-dsg-cw-grid button.is-on, .tas-dsg-cw-row button.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--d-blue); }
.tas-dsg-cw-grads { grid-template-columns: repeat(5, 1fr); }
.tas-dsg-cw-grads button { aspect-ratio: 2 / 1; }

/* Hiệu ứng chữ */
.tas-dsg-fx { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tas-dsg-fx button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px 5px; border: 1px solid var(--d-line); border-radius: 10px; background: #fff; color: var(--d-text); font-size: 11px; cursor: pointer; }
.tas-dsg-fx button:hover { border-color: var(--d-blue); }
.tas-dsg-fx i { display: flex; align-items: center; justify-content: center; width: 100%; height: 34px; border-radius: 7px; background: #e2e8f0; color: #0f172a; font: 800 19px/1 "Be Vietnam Pro", Inter, sans-serif; font-style: normal; }
.tas-dsg-fx .fx-shadow { text-shadow: 2px 3px 4px rgba(0, 0, 0, .45); }
.tas-dsg-fx .fx-outline { color: #fff; -webkit-text-stroke: 1.5px #0f172a; paint-order: stroke fill; }
.tas-dsg-fx .fx-hollow { color: transparent; -webkit-text-stroke: 1.2px #0f172a; }
.tas-dsg-fx .fx-neon { background: #0f172a; color: #fff; text-shadow: 0 0 4px #22d3ee, 0 0 10px #22d3ee; }
.tas-dsg-fx .fx-lift { color: #facc15; text-shadow: 2px 2px 0 #92400e; }
.tas-dsg-fx .fx-label i, .tas-dsg-fx .fx-label { background: #2563eb; color: #fff; }
.tas-dsg-fx .fx-glow { background: #334155; color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .9); }
.tas-dsg-more .tas-dsg-field { margin-top: 10px; }
.tas-dsg-more .tas-dsg-range { margin-top: 10px; }

/* Căn theo khung + sắp xếp */
.tas-dsg-icons6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tas-dsg-icons6 button { display: inline-flex; align-items: center; justify-content: center; height: 36px; border: 1px solid var(--d-line); border-radius: 9px; background: #fff; color: var(--d-ink); cursor: pointer; }
.tas-dsg-icons6 button:hover { border-color: var(--d-blue); background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-grid .is-on { border-color: #bfdbfe; background: var(--d-blue-soft); color: var(--d-blue); }
.tas-dsg-span2 { grid-column: span 2; }
.tas-dsg-props [data-panel] + [data-panel]:not([hidden]) { margin-top: 4px; }
.tas-dsg-props [data-panel=image] .tas-dsg-link { margin-top: 10px; }

@media (max-width: 899.98px) {
	.tas-dsg-tools { flex-direction: column; flex-wrap: nowrap; padding: 0; }
	.tas-dsg-tools .tas-dsg-label { display: block; }
	.tas-dsg-tabs { position: static; }
	.tas-dsg-tab { padding: 10px 12px 4px; }
	.tas-dsg-tab .tas-dsg-add { width: 100%; text-align: left; }
	.tas-dsg-presets { grid-template-columns: repeat(3, 1fr); }
	.tas-dsg-tiles { grid-template-columns: repeat(6, 1fr); }
	.tas-dsg-tiles--icons { grid-template-columns: repeat(8, 1fr); }
	.tas-dsg-tools-foot { padding: 8px 12px 12px; }
}
.tas-dsg-props [data-panel=fill] { margin-top: 14px; }
.tas-dsg-props [data-panel=fill] .tas-dsg-label { margin-top: 0; }

/* Thẻ "Nền": đổi phông nền */
.tas-dsg-tabs { grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 10px 8px; }
.tas-dsg-tabs button { font-size: 11.5px; }
.tas-dsg-props input.tas-dsg-bg-q, .tas-dsg-bg-q { width: 100%; padding: 8px 11px; border: 1px solid var(--d-line); border-radius: 9px; background: #fff; outline: none; }
.tas-dsg-bg-q:focus { border-color: var(--d-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.tas-dsg-tab .tas-dsg-chips { margin: 2px 0; }
.tas-dsg-bgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.tas-dsg-bgs > .tas-dsg-note { grid-column: 1 / -1; }
.tas-dsg-bg { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; color: var(--d-ink); text-align: left; cursor: pointer; }
.tas-dsg-bg-img { display: block; overflow: hidden; border: 1px solid var(--d-line); border-radius: 9px; background: var(--d-bg); transition: box-shadow .15s, border-color .15s; }
.tas-dsg-bg-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tas-dsg-bg:hover .tas-dsg-bg-img { border-color: var(--d-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.tas-dsg-bg.is-on .tas-dsg-bg-img { border-color: var(--d-blue); box-shadow: 0 0 0 2px var(--d-blue); }
.tas-dsg-bg-name { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tas-dsg-bg-meta { color: var(--d-muted); font-size: 11.5px; }
.tas-dsg-bg.is-on .tas-dsg-bg-meta { color: var(--d-blue); font-weight: 600; }
@media (max-width: 899.98px) {
	.tas-dsg-tools .tas-dsg-tab[data-tabpanel=bg] .tas-dsg-note { display: block; }
	.tas-dsg-bgs { grid-template-columns: repeat(3, 1fr); max-height: 420px; overflow-y: auto; }
}
