/* HVSC Apps - Watermark Studio: nét riêng (màu nhấn đỏ HVSC) */
.st-wm{--acc:#E31E24;--acc2:#ff5a62}
.wm-art{stroke-linecap:round;stroke-linejoin:round}
.wm-layer{display:flex;align-items:center;gap:6px;background:var(--st-p2);border:1px solid var(--st-ln);border-radius:11px;padding:4px 6px;min-height:46px;cursor:pointer}
.wm-layer.on{border-color:var(--acc);background:color-mix(in srgb,var(--acc) 14%,var(--st-p2))}
.wm-layer.drag{opacity:.4}.wm-layer.over{box-shadow:0 -3px 0 var(--acc2)}
.wm-layer .gr{cursor:grab;color:var(--st-mu);width:20px;text-align:center;font-size:16px;user-select:none}
.wm-layer .tp{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:var(--st-bg);color:var(--acc2);flex:none}
.wm-layer .tp svg,.wm-layer .ib2 svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.wm-layer .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;font-size:13px}
.wm-layer .ib2{width:34px;height:34px;min-width:34px;border:0;background:transparent;color:var(--st-mu);border-radius:8px;cursor:pointer;display:grid;place-items:center}
.wm-layer .ib2:hover{background:rgba(255,255,255,.08);color:#fff}
.wm-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.wm-pre{border:1px solid var(--st-ln);background:var(--st-p2);color:var(--st-tx);border-radius:12px;padding:8px;cursor:pointer;text-align:left;font:600 12.5px/1.3 var(--font);min-height:76px;display:flex;flex-direction:column;gap:6px}
.wm-pre:hover{border-color:var(--acc2)}
.wm-pre i{display:block;height:34px;border-radius:7px;background:linear-gradient(135deg,#3a4a6e,#1d2740);position:relative;overflow:hidden}
.wm-pre i b{position:absolute;font:700 11px var(--font);color:#fff;text-shadow:0 1px 3px #000}
.wm-gridov{position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(rgba(255,255,255,.5) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.5) 1px,transparent 1px);background-size:33.333% 33.333%;mix-blend-mode:difference;opacity:.6}
.wm-sel-rot{position:absolute;left:50%;top:calc(-30px*var(--z,1));width:calc(14px*var(--z,1));height:calc(14px*var(--z,1));margin-left:calc(-7px*var(--z,1));border-radius:50%;background:var(--acc2);border:calc(2px*var(--z,1)) solid #fff;cursor:grab;pointer-events:auto;touch-action:none}
.wm-sel-rot::after{content:"";position:absolute;left:50%;top:100%;width:calc(1.5px*var(--z,1));height:calc(16px*var(--z,1));background:var(--acc2);transform:translateX(-50%)}
.wm-sel-br{right:0;bottom:0;margin:0;position:absolute;left:auto;top:auto;transform:translate(50%,50%);cursor:nwse-resize;pointer-events:auto}
.wm-crop{position:absolute;box-shadow:0 0 0 9999px rgba(0,0,0,.6);border:calc(2px*var(--z,1)) solid #fff;z-index:4;cursor:move;touch-action:none}
.wm-crop::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.45) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.45) 1px,transparent 1px);background-size:33.333% 33.333%}
.wm-crop .st-handle{pointer-events:auto}
.wm-crop .lab{position:absolute;left:50%;bottom:calc(-30px*var(--z,1));transform:translateX(-50%);font:600 calc(12px*var(--z,1))/1 var(--mono);color:#fff;background:rgba(0,0,0,.7);padding:calc(4px*var(--z,1)) calc(9px*var(--z,1));border-radius:calc(8px*var(--z,1));white-space:nowrap}
.wm-cmpl{position:absolute;top:0;bottom:0;width:calc(3px*var(--z,1));margin-left:calc(-1.5px*var(--z,1));background:#fff;z-index:5;cursor:ew-resize;touch-action:none;box-shadow:0 0 calc(8px*var(--z,1)) rgba(0,0,0,.6)}
.wm-cmpl::after{content:"\2194";position:absolute;top:50%;left:50%;width:calc(34px*var(--z,1));height:calc(34px*var(--z,1));margin:calc(-17px*var(--z,1));border-radius:50%;background:#fff;color:#111;display:grid;place-items:center;font-size:calc(16px*var(--z,1));box-shadow:0 4px 14px rgba(0,0,0,.5)}
.wm-xp{display:flex;flex-direction:column;gap:8px}
.wm-xp .st-prog{margin:4px 0}
.wm-hide{display:none!important}

.wm-layer:not(.on) .ib2[data-a=up],.wm-layer:not(.on) .ib2[data-a=down]{display:none}
.wm-layer .ib2{width:32px;height:32px;min-width:32px}
