.wm-app {
  --wm-ink: #172033;
  --wm-muted: #667085;
  --wm-line: #e4e9f2;
  --wm-blue: #4361ee;
  --wm-blue-dark: #304bd1;
  --wm-green: #139b70;
  width: min(100% - 32px, 940px);
  margin: 38px auto 56px;
  color: var(--wm-ink);
  font-family: inherit;
}
.wm-app *, .wm-app *::before, .wm-app *::after { box-sizing: border-box; }
.wm-hero { text-align: center; margin: 0 auto 26px; max-width: 760px; }
.wm-hero h1 { margin: 15px 0 10px; color: var(--wm-ink); font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; font-weight: 850; letter-spacing: -.035em; }
.wm-hero > p { max-width: 660px; margin: 0 auto; color: var(--wm-muted); font-size: 15px; line-height: 1.8; }

.wm-panel { padding: clamp(16px, 3.5vw, 30px); background: #fff; border: 1px solid var(--wm-line); border-radius: 24px; box-shadow: 0 16px 50px rgba(31, 48, 84, .075); margin-bottom: 24px; }

.wm-drop-zone { border: 2px dashed #cbd5e8; border-radius: 19px; padding: clamp(24px, 5vw, 44px) 16px; text-align: center; background: linear-gradient(135deg, #f8faff, #fcfdff); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; outline: none; }
.wm-drop-zone:hover, .wm-drop-zone:focus-visible, .wm-drop-zone.is-dragover { border-color: var(--wm-blue); background: #f1f5ff; }
.wm-upload-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 15px; border-radius: 20px; color: var(--wm-blue); background: #e8edff; }
.wm-upload-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wm-drop-zone h2 { margin: 0; color: var(--wm-ink); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.wm-drop-zone > p { margin: 7px 0 19px; color: var(--wm-muted); font-size: 13px; }

.wm-upload-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.wm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 17px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; transition: background .18s, border-color .18s, transform .18s, box-shadow .18s; }
.wm-btn:hover { transform: translateY(-1px); }
.wm-btn-primary { color: #fff !important; background: var(--wm-blue); box-shadow: 0 6px 15px rgba(67, 97, 238, .2); }
.wm-btn-primary:hover { background: var(--wm-blue-dark); }
.wm-btn-success { color: #fff !important; background: var(--wm-green); box-shadow: 0 6px 15px rgba(19, 155, 112, .2); }
.wm-btn-secondary { color: #39465b; background: #fff; border-color: #dce2ec; }
.wm-btn-secondary:hover { background: #f7f9fc; border-color: #c3ccdc; }

.wm-file-hint { margin-top: 18px; color: #7b8798; font-size: 11px; }
.wm-file-hint span { padding: 0 5px; color: #b5bdca; }
.wm-notice { margin-top: 14px; padding: 12px 14px; color: #a52b39; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 11px; font-size: 13px; line-height: 1.5; }

.wm-editor-area { padding-top: 10px; }
.wm-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; background: #f8fafc; border: 1px solid var(--wm-line); border-radius: 16px; padding: 20px; }
.wm-field label { display: block; font-size: 12px; font-weight: 750; color: var(--wm-ink); margin-bottom: 6px; }
.wm-field input[type="text"], .wm-field select { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 13px; background: #fff; color: var(--wm-ink); outline: none; }
.wm-field input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--wm-blue); }
.wm-color-picker { width: 100%; height: 40px; border: 1px solid #cbd5e1; border-radius: 10px; cursor: pointer; padding: 2px; background: #fff; }

.wm-tip { font-size: 13px; color: var(--wm-blue); text-align: center; margin-bottom: 16px; font-weight: 600; }
.wm-canvas-wrap { text-align: center; margin-bottom: 20px; overflow: auto; max-height: 600px; border-radius: 14px; border: 1px solid var(--wm-line); background: #fdfdfe; padding: 10px; }
#wm-canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; box-shadow: 0 4px 12px rgba(0,0,0,0.06); cursor: grab; touch-action: none; border-radius: 8px; }
#wm-canvas:active { cursor: grabbing; }

.wm-action-row { display: flex; flex-direction: row; gap: 12px; justify-content: center; align-items: center; width: 100%; margin-top: 20px; }
.wm-action-row .wm-btn { flex: 1; }

.wm-article { margin-top: 38px; padding: 28px; background: #fff; border: 1px solid var(--wm-line); border-radius: 24px; box-shadow: 0 12px 40px rgba(31, 48, 84, 0.05); }
.wm-article h2 { margin: 0 0 15px; color: var(--wm-ink); font-size: clamp(21px, 3vw, 27px); font-weight: 800; line-height: 1.35; }
.wm-article-content { color: var(--wm-muted); font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.wm-article-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 12px 0; }

/* Styling Ikon FAQ */
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary .faq-icon {
  transform: rotate(45deg);
  color: #ef4444;
}
.faq-icon {
  transition: transform 0.2s ease, color 0.2s ease;
}

/* ============================================================
   TAMBAHAN WATERMARK FOTO (tampilan modern)
   Tempel di PALING BAWAH assets/css/watermark-foto.css
   ============================================================ */

.wm-app [hidden] { display: none !important; }

/* ---------- Pilihan jenis watermark (segmented control) ---------- */
.wm-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: #eef1f8;
  border-radius: 14px;
}
.wm-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5b6779;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.wm-mode-btn:hover { color: var(--wm-ink); }
.wm-mode-btn.is-active {
  background: #fff;
  color: var(--wm-blue-dark);
  box-shadow: 0 2px 8px rgba(31, 48, 84, .12);
}
.wm-mode-btn:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-mode-ico { font-size: 14px; line-height: 1; }

/* ---------- Kartu pengaturan ---------- */
.wm-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: linear-gradient(180deg, #f9fbff, #f5f7fc);
  border-radius: 18px;
}
.wm-field-wide { grid-column: 1 / -1; }
.wm-field label { letter-spacing: .01em; }
.wm-field input[type="text"]:focus,
.wm-field select:focus {
  border-color: var(--wm-blue);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, .15);
}

/* Slider modern */
.wm-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  background: transparent;
}
.wm-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #d9e0f0;
}
.wm-field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d9e0f0;
}
.wm-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--wm-blue);
  box-shadow: 0 2px 6px rgba(31, 48, 84, .3);
}
.wm-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--wm-blue);
  box-shadow: 0 2px 6px rgba(31, 48, 84, .3);
}

/* Baris pilih logo */
.wm-logo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.wm-logo-name {
  min-width: 0;
  flex: 1 1 160px;
  color: var(--wm-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Saklar bayangan
   (selector diperkuat dengan .wm-field karena CSS lama ".wm-field label"
   memaksa display:block sehingga saklar tidak tampil) */
.wm-field-switch { display: flex; align-items: flex-end; }
.wm-field .wm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 650 !important;
}
.wm-field .wm-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.wm-field .wm-switch .wm-switch-track {
  position: relative;
  display: block;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s;
}
.wm-field .wm-switch .wm-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .18s;
}
.wm-field .wm-switch input:checked + .wm-switch-track { background: var(--wm-blue); }
.wm-field .wm-switch input:checked + .wm-switch-track::after { transform: translateX(18px); }
.wm-field .wm-switch input:focus-visible + .wm-switch-track { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-field .wm-switch .wm-switch-text { display: inline; font-size: 12px; color: var(--wm-ink); }

/* ---------- Daftar foto ---------- */
.wm-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.wm-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #eef1f8;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .15s, transform .15s;
}
.wm-thumb:hover { transform: translateY(-1px); }
.wm-thumb.is-active { border-color: var(--wm-blue); box-shadow: 0 0 0 3px rgba(67, 97, 238, .18); }
.wm-thumb:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.wm-info {
  margin: 0 0 10px;
  color: var(--wm-muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}
.wm-info:empty { display: none; }

/* ---------- Canvas: latar kotak-kotak agar PNG transparan terlihat ---------- */
.wm-canvas-wrap {
  background-color: #f1f5f9;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
#wm-canvas { cursor: move; }
#wm-canvas.is-dragging { cursor: grabbing; }
#wm-canvas:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 3px; }

/* ---------- Tombol aksi ---------- */
.wm-action-row { flex-wrap: wrap; }
.wm-action-row .wm-btn { flex: 1 1 150px; }

/* Saat sedang membuat unduhan, kunci pengaturan */
.wm-editor-area.is-busy .wm-settings-grid,
.wm-editor-area.is-busy .wm-canvas-wrap,
.wm-editor-area.is-busy .wm-thumbs,
.wm-editor-area.is-busy .wm-mode {
  pointer-events: none;
  opacity: .6;
}
.wm-btn:disabled { opacity: .65; cursor: progress; transform: none; }

@media (max-width: 520px) {
  .wm-mode { display: flex; }
  .wm-mode-btn { flex: 1; justify-content: center; }
}
/* ============================================================
   TAMBAHAN WATERMARK FOTO (tampilan modern)
   Tempel di PALING BAWAH assets/css/watermark-foto.css
   ============================================================ */

.wm-app [hidden] { display: none !important; }

/* ---------- Pilihan jenis watermark (segmented control) ---------- */
.wm-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: #eef1f8;
  border-radius: 14px;
}
.wm-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5b6779;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.wm-mode-btn:hover { color: var(--wm-ink); }
.wm-mode-btn.is-active {
  background: #fff;
  color: var(--wm-blue-dark);
  box-shadow: 0 2px 8px rgba(31, 48, 84, .12);
}
.wm-mode-btn:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-mode-ico { font-size: 14px; line-height: 1; }

/* ---------- Kartu pengaturan ---------- */
.wm-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: linear-gradient(180deg, #f9fbff, #f5f7fc);
  border-radius: 18px;
}
.wm-field-wide { grid-column: 1 / -1; }
.wm-field label { letter-spacing: .01em; }
.wm-field input[type="text"]:focus,
.wm-field select:focus {
  border-color: var(--wm-blue);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, .15);
}

/* Slider modern */
.wm-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  background: transparent;
}
.wm-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #d9e0f0;
}
.wm-field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d9e0f0;
}
.wm-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--wm-blue);
  box-shadow: 0 2px 6px rgba(31, 48, 84, .3);
}
.wm-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--wm-blue);
  box-shadow: 0 2px 6px rgba(31, 48, 84, .3);
}

/* Baris pilih logo */
.wm-logo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.wm-logo-name {
  min-width: 0;
  flex: 1 1 160px;
  color: var(--wm-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Saklar bayangan
   (selector diperkuat dengan .wm-field karena CSS lama ".wm-field label"
   memaksa display:block sehingga saklar tidak tampil) */
.wm-field-switch { display: flex; align-items: flex-end; }
.wm-field .wm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 650 !important;
}
.wm-field .wm-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.wm-field .wm-switch .wm-switch-track {
  position: relative;
  display: block;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s;
}
.wm-field .wm-switch .wm-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .18s;
}
.wm-field .wm-switch input:checked + .wm-switch-track { background: var(--wm-blue); }
.wm-field .wm-switch input:checked + .wm-switch-track::after { transform: translateX(18px); }
.wm-field .wm-switch input:focus-visible + .wm-switch-track { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-field .wm-switch .wm-switch-text { display: inline; font-size: 12px; color: var(--wm-ink); }

/* ---------- Daftar foto ---------- */
.wm-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.wm-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #eef1f8;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .15s, transform .15s;
}
.wm-thumb:hover { transform: translateY(-1px); }
.wm-thumb.is-active { border-color: var(--wm-blue); box-shadow: 0 0 0 3px rgba(67, 97, 238, .18); }
.wm-thumb:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 2px; }
.wm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.wm-info {
  margin: 0 0 10px;
  color: var(--wm-muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}
.wm-info:empty { display: none; }

/* ---------- Canvas: latar kotak-kotak agar PNG transparan terlihat ---------- */
.wm-canvas-wrap {
  background-color: #f1f5f9;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
#wm-canvas { cursor: move; }
#wm-canvas.is-dragging { cursor: grabbing; }
#wm-canvas:focus-visible { outline: 3px solid #b9c6ff; outline-offset: 3px; }

/* ---------- Tombol aksi ---------- */
.wm-action-row { flex-wrap: wrap; }
.wm-action-row .wm-btn { flex: 1 1 150px; }

/* Saat sedang membuat unduhan, kunci pengaturan */
.wm-editor-area.is-busy .wm-settings-grid,
.wm-editor-area.is-busy .wm-canvas-wrap,
.wm-editor-area.is-busy .wm-thumbs,
.wm-editor-area.is-busy .wm-mode {
  pointer-events: none;
  opacity: .6;
}
.wm-btn:disabled { opacity: .65; cursor: progress; transform: none; }

@media (max-width: 520px) {
  .wm-mode { display: flex; }
  .wm-mode-btn { flex: 1; justify-content: center; }
}

/* Petunjuk kecil di bawah slider hapus latar */
.wm-hint {
  display: block;
  margin-top: 6px;
  color: var(--wm-muted);
  font-size: 12px;
  line-height: 1.5;
}
.wm-hint:empty { display: none; }