.istg-tool-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #3b82f6; --p-text: #0f172a; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); }
.istg-header-main { font-size: 1.5rem; font-weight: 800; color: var(--p-text); margin-bottom: 8px; text-align: center; }
.istg-subtitle { color: #64748b; font-size: 0.95rem; padding-bottom: 20px; border-bottom: 1px solid var(--p-border); margin-bottom: 24px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6;}
.istg-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
@media(max-width: 850px) { .istg-editor-grid { grid-template-columns: 1fr; } }
.istg-panel { display: flex; flex-direction: column; background: #ffffff; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; }
.istg-panel-header { padding: 14px 20px; background: #f8fafc; border-bottom: 1px solid var(--p-border); font-weight: 700; color: #334155; }
.istg-panel-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.istg-upload-zone { width: 100%; height: 200px; border: 2px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; }
.istg-upload-zone:hover { border-color: var(--p-primary); background: #eff6ff; }
.istg-placeholder { display: flex; flex-direction: column; align-items: center; color: #64748b; pointer-events: none; }
.istg-placeholder span { font-size: 2.5rem; margin-bottom: 8px; }
.istg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #0f172a; }
.istg-textarea { flex: 1; min-height: 100px; width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 12px; font-size: 0.95rem; color: #1e293b; outline: none; resize: none; box-sizing: border-box; }
.istg-textarea:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.istg-btn-primary, .istg-btn-warning { padding: 12px; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; display: flex; justify-content: center; color: white; transition: 0.2s; }
.istg-btn-primary { background: var(--p-primary); } .istg-btn-primary:hover { background: #2563eb; }
.istg-btn-warning { background: #f59e0b; } .istg-btn-warning:hover { background: #d97706; }

[data-theme="dark"] .istg-tool-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .istg-header-main { color: #f8fafc; }
[data-theme="dark"] .istg-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .istg-panel-header { background: #1e293b; border-color: #475569; color: #cbd5e1; }
[data-theme="dark"] .istg-upload-zone { background: #020617; border-color: #475569; }
[data-theme="dark"] .istg-upload-zone:hover { border-color: var(--p-primary); }
[data-theme="dark"] .istg-textarea { background: #020617; border-color: #475569; color: #f8fafc; }