.gtm{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh2);padding:16px}
.gtm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.gtm-tabs{display:flex;gap:8px}
.gtm-tab{flex:0 0 auto;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:var(--r);background:var(--bg);color:var(--ink);font:600 16px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
.gtm-tab small{font-weight:400;color:var(--muted);margin-left:4px;font-size:14px}
.gtm-tab[aria-selected="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.gtm-tab[aria-selected="true"] small{color:#cbd5e1}
.gtm-tab:focus-visible,.gtm-ptab:focus-visible,.gtm-preset:focus-visible,.gtm-btn:focus-visible,.gtm-link:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
[data-gf-tool]:not(.gtm-has-img) .gtm-replace{display:none}
.gtm-body{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
.gtm-stage-col{min-width:0}
.gtm-stage{position:relative;padding:16px;background:var(--mat);background-image:linear-gradient(var(--matline) 1px,transparent 1px),linear-gradient(90deg,var(--matline) 1px,transparent 1px);background-size:24px 24px;border-radius:var(--r)}
.gtm-stage.gtm-over{outline:3px dashed var(--accent);outline-offset:-6px}
.gtm-canvas{display:block;width:100%;height:auto;border-radius:4px;touch-action:none;cursor:grab;background:#1e293b}
.gtm-square .gtm-canvas{max-width:460px;margin:0 auto}
.gtm-canvas.gtm-grab{cursor:grabbing}
.gtm-crop{position:absolute;width:16px;height:16px;border:0 solid var(--accent)}
.gtm-tl{top:4px;left:4px;border-top-width:3px;border-left-width:3px}
.gtm-tr{top:4px;right:4px;border-top-width:3px;border-right-width:3px}
.gtm-bl{bottom:4px;left:4px;border-bottom-width:3px;border-left-width:3px}
.gtm-br{bottom:4px;right:4px;border-bottom-width:3px;border-right-width:3px}
.gtm-empty{position:absolute;inset:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:#fff;border-radius:4px;padding:16px}
.gtm-empty[hidden]{display:none}
.gtm-empty-title{font:700 24px/1.2 Inter,system-ui,sans-serif;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.gtm-empty-sub{font-size:14px;color:#e2e8f0}
.gtm-empty-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:8px}
.gtm-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.gtm-hint{margin:8px 0 0;font-size:14px;color:var(--muted)}
.gtm-mini-row{display:flex;gap:12px;align-items:center;margin-top:12px}
.gtm-mini{flex:0 0 auto;width:160px;height:auto;border-radius:4px;border:1px solid var(--line)}
.gtm-mini-note{margin:0;font-size:14px;color:var(--muted)}
.gtm-panel{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r);background:#fff;min-width:0}
.gtm-ptabs{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line)}
.gtm-ptab{min-height:44px;padding:8px 4px;border:0;border-bottom:3px solid transparent;background:none;font:600 14px/1.2 Inter,system-ui,sans-serif;color:var(--muted);cursor:pointer}
.gtm-ptab[aria-selected="true"]{color:var(--primary-dk);border-bottom-color:var(--primary)}
.gtm-pane{padding:12px 16px 16px;min-height:300px}
.gtm-pane[hidden]{display:none}
.gtm-sub{margin:12px 0 8px;font-size:14px;font-weight:600;color:var(--ink)}
.gtm-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gtm-preset{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font:600 12px/1.2 Inter,system-ui,sans-serif;color:var(--ink);cursor:pointer}
.gtm-preset span{display:block;width:100%;padding:4px 0;border-radius:6px;font-size:22px;line-height:1.1}
.gtm-preset[aria-pressed="true"]{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary) inset}
.gp-pop span{background:#3b82f6;font-family:"Luckiest Guy",Impact,sans-serif;color:#ffe14d;-webkit-text-stroke:1px #1a1033}
.gp-horror span{background:#1c1917;font-family:Bangers,Impact,sans-serif;color:#ff5a5a;-webkit-text-stroke:1px #2b0000}
.gp-neon span{background:#1e1b4b;font-family:Bungee,Impact,sans-serif;color:#7df9ff;font-size:18px}
.gp-candy span{background:#ffd1ea;font-family:"Lilita One",Impact,sans-serif;color:#ffffff;-webkit-text-stroke:1px #ff2e93}
.gp-toxic span{background:#14532d;font-family:"Luckiest Guy",Impact,sans-serif;color:#d4ff3a}
.gp-clean span{background:#cbd5e1;font-family:Inter,sans-serif;font-weight:700;color:#0f172a}
.gtm-row{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.gtm-row>label:first-child{flex:0 0 84px;font-size:14px;color:var(--ink)}
.gtm-row>.gtm-check:first-child{flex:none}
.gtm-row input[type=range]{flex:1 1 120px;min-width:0;accent-color:var(--primary)}
.gtm-row select,.gtm-row input[type=text],.gtm-row textarea{flex:1 1 140px;min-width:0;min-height:40px;padding:8px;border:1px solid var(--line);border-radius:8px;font:16px/1.3 Inter,system-ui,sans-serif;background:#fff;color:var(--ink)}
.gtm-col{flex-direction:column;align-items:stretch}
.gtm-col>label:first-child{flex:none}
.gtm-col textarea{flex:none;min-height:64px;resize:vertical;font-weight:600}
.gtm-row input[type=color]{width:44px;height:36px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#fff}
.gtm-check{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--ink)}
.gtm-check input{width:18px;height:18px;accent-color:var(--primary)}
.gtm-dlbar{padding:12px 16px;border-top:1px solid var(--line);background:#fff;border-radius:0 0 var(--r) var(--r)}
.gtm-actions{display:flex;gap:8px}
.gtm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border-radius:var(--r);font:600 16px/1.2 Inter,system-ui,sans-serif;cursor:pointer;border:1px solid transparent;position:relative}
.gtm-actions .gtm-btn{flex:1 1 0;padding:8px 12px}
.gtm-btn-sm{min-height:40px;font-size:14px}
.gtm-btn-main{background:var(--primary);color:#fff}
.gtm-btn-main:hover{background:var(--primary-dk)}
.gtm-btn-line{background:#fff;color:var(--primary-dk);border-color:var(--primary)}
.gtm-btn-line:hover{background:#eff6ff}
.gtm-btn-ghost{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.7)}
.gtm-btn-ghost:hover{background:rgba(255,255,255,.26)}
.gtm-status{min-height:20px;margin:8px 0 0;font-size:14px;color:var(--accent-dk)}
.gtm-status:empty{display:none}
.gtm-link{margin-top:16px;background:none;border:0;padding:4px 0;color:var(--muted);text-decoration:underline;font-size:14px;cursor:pointer}
@media (min-width:901px){.gtm-stage-col{position:sticky;top:16px}}
@media (max-width:900px){
 .gtm-body{grid-template-columns:1fr;gap:12px}
 .gtm-stage-col{position:sticky;top:0;z-index:3;background:var(--card);padding:8px 0;margin:-8px 0 0}
 .gtm-hint,.gtm-mini-row{display:none}
 .gtm-square .gtm-canvas{max-width:200px}
 .gtm-pane{min-height:0}
 .gtm-dlbar{position:sticky;bottom:0;z-index:2;box-shadow:0 -4px 12px rgba(15,23,42,.08)}
}
@media (max-width:640px){.gtm{padding:12px}.gtm-stage{padding:10px}.gtm-empty{inset:10px;gap:4px}.gtm-empty-title{font-size:17px}.gtm-empty-sub{font-size:12px}.gtm-empty-btns .gtm-btn{min-height:40px;padding:6px 12px;font-size:14px}.gtm-tabs{flex:1 1 auto;min-width:0}.gtm-tabs .gtm-tab{flex:1 1 0;min-width:0;padding:6px 8px}.gtm-tab small{display:block;margin:2px 0 0}.gtm-crop{display:none}}
@media (max-width:360px){.gtm-actions .gtm-btn{font-size:14px;padding:8px 6px}.gtm-dlbar{padding:10px 12px}}
