/* ===== Generador de marcas de agua =====
   Diseño solo de esta herramienta. Se carga después de /assets/style.css. */
.wm { padding: 40px 16px 80px; }
.wm h1 { font-size: clamp(28px, 5vw, 40px); margin: 16px 0 8px; letter-spacing: -.02em; }
.wm .lead { max-width: 780px; }
.wm-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .wm-layout { grid-template-columns: minmax(0, 1fr); } }
.wm-side, .wm-main { min-width: 0; }
.wm-step { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 22px 0 12px; }
.wm-step:first-child { margin-top: 0; }
.wm-step span { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; display: grid; place-items: center; flex: none; }
.wm-label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 8px; }

.wm-seg { display: flex; gap: 6px; margin-bottom: 14px; }
.wm-seg button { flex: 1; font: inherit; font-size: 15px; font-weight: 600; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
                 background: var(--bg-2); color: var(--text-2); cursor: pointer; }
.wm-seg button.active { border-color: var(--brand); background: rgba(98, 70, 234, .15); color: var(--text); }

.wm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 420px) { .wm-row { grid-template-columns: 1fr; } }
.wm-small { font-size: 15px; margin: 0; }
.wm-small select { margin-top: 8px; padding: 10px 12px; }
.wm-colors { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.wm-colors button, .wm-custom { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; margin: 0; }
.wm-colors button.active, .wm-custom.active { outline: 3px solid var(--brand); outline-offset: 1px; }
.wm-custom { position: relative; overflow: hidden; background: conic-gradient(#f43f5e, #facc15, #22c55e, #3b82f6, #a855f7, #f43f5e); }
.wm-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.wm-logo-drop { aspect-ratio: auto; min-height: 120px; position: relative;
                background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.wm-logo-drop img { max-height: 140px; width: auto; max-width: 100%; object-fit: contain; background: none; }
.wm-check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 12px 0 0; cursor: pointer; }
.wm-check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

.wm-pos-row { display: flex; gap: 14px; align-items: center; }
.wm-pos-row .chip-btn { width: auto; }
.wm-pos-row .hint { margin: 8px 0 0; font-size: 13px; }
.wm-pos { display: grid; grid-template-columns: repeat(3, 30px); gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); flex: none; }
.wm-pos button { width: 30px; height: 24px; border-radius: 5px; border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: 0; }
.wm-pos button.active { background: var(--brand); border-color: var(--brand); }
.wm-pos.off button { opacity: .45; }

.wm-range { margin: 16px 0 0; }
.wm-range output { float: right; font-weight: 700; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.wm-range input { display: block; width: 100%; margin-top: 6px; accent-color: var(--brand); }
.wm-only { width: 100%; margin-top: 20px; }

.wm-drop { aspect-ratio: auto; min-height: 110px; }
.wm-tip { margin: 8px 0 0; }
.wm-preview { margin-top: 14px; }
.wm-preview canvas { display: block; max-width: 100%; max-height: 560px; margin: 0 auto; border-radius: 10px; touch-action: none; cursor: grab;
                     background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.wm-preview canvas.tiled { cursor: default; }
.wm-preview .hint { text-align: center; margin: 8px 0 0; }

.wm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 8px; }
.wm-head .btn { width: auto; }
.wm-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.wm-thumb { position: relative; flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; padding: 0; background: #000; }
.wm-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(98, 70, 234, .2); }
.wm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff;
               font-size: 13px; line-height: 22px; text-align: center; cursor: pointer; }
.wm-go { margin-top: 12px; }
.wm-go:disabled { opacity: .5; cursor: not-allowed; }
.wm-done { display: grid; gap: 6px; margin-top: 14px; }
.wm-done .hint { margin: 0; }
.wm-done a, #file-msg a { color: var(--brand-2); font-weight: 600; }
