/* Watermark: layout. Colours come from the --sl-* tokens that shared/theme/theme.js sets (with fallbacks). */
:root {
  --wm-bg: var(--sl-background, #161616); --wm-panel: var(--sl-surface, #1f1f1f); --wm-line: var(--sl-border, #333);
  --wm-fg: var(--sl-text, #ececec); --wm-dim: color-mix(in srgb, var(--wm-fg) 70%, transparent);
  --wm-accent: var(--sl-accent, #a2fff6); --wm-on-accent: var(--sl-on-accent, #0a1817); --wm-radius: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--wm-bg); color: var(--wm-fg); font: 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; display: flex; flex-direction: column; overflow: hidden; }
p, h2 { margin: 0; }
.wm-bar { position: sticky; top: 0; z-index: 5; background: var(--wm-panel); border-bottom: 1px solid var(--wm-line); padding: 0 16px; }
/* The header (shared/appbar): the home link first (brand/brand.js draws the app's icon in it), and the shared header buttons
   (Tour, Theme, Apps: shared/ui/hbtn.css) in the look of the bar's own buttons. */
.wm-bar { --tlbx-hbtn-h: 36px; --tlbx-hbtn-radius: 8px; --tlbx-hbtn-bg: var(--wm-panel); --tlbx-hbtn-line: var(--wm-line); --tlbx-hbtn-fs: 13px; }
.wm-bar .brand { display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: var(--wm-accent); text-decoration: none; }
/* The List · View · Panel layout (shared/frame/frame.css): files left, preview centre, watermark panel right. */
.wm-main { flex: 1 1 auto; min-height: 0; --sf-list-w: 340px; }
.wm-files { display: flex; flex-direction: column; gap: 14px; padding: 14px; overflow-y: auto !important; }
.wm-work { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.wm-back { display: none; align-self: flex-start; }
.sf-phone:not(.sf-nolist) .wm-back { display: inline-flex; }
.wm-stage { display: grid; place-items: center; gap: 6px; min-height: 260px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius);
  background: repeating-conic-gradient(color-mix(in srgb, var(--wm-fg) 16%, var(--wm-bg)) 0 25%, color-mix(in srgb, var(--wm-fg) 8%, var(--wm-bg)) 0 50%) 0 0 / 16px 16px; padding: 10px; overflow: hidden; }
.wm-preview { width: 100%; display: grid; place-items: center; }
.wm-preview-name { font-size: 12.5px; color: var(--wm-fg); background: var(--wm-panel); padding: 2px 10px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-preview-name:empty { display: none; }
.wm-panel-open { display: none; justify-self: start; }
.wm-off { color: var(--wm-fg); background: var(--wm-panel); text-align: center; max-width: 42ch; padding: 10px 14px; border-radius: var(--wm-radius); }
.wm-note { color: var(--wm-dim); font-size: 13px; min-height: 0; }
.wm-note:empty { display: none; }
.wm-drop { border: 1px dashed var(--wm-line); border-radius: var(--wm-radius); padding: 14px; background: var(--wm-panel); }
.wm-list-wrap { display: grid; gap: 8px; }
.wm-groups { display: grid; gap: 8px; }
.wm-group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wm-group { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px;
  border: 1px solid var(--wm-line); border-radius: var(--wm-radius); background: var(--wm-panel); min-width: 0; }
.wm-gname { font-weight: 600; overflow-wrap: anywhere; }
.wm-gset { display: grid; gap: 8px; margin-top: 6px; }
.wm-gset.is-off { opacity: .5; }
.wm-gset select { width: 100%; }
.wm-gset .wm-field { color: var(--wm-dim); }
.wm-gset .wm-range input:disabled, .wm-gset select:disabled { opacity: .5; }
.wm-count { color: var(--wm-dim); font-size: 13px; }
.wm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wm-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 12px; align-items: center; padding: 8px;
  border: 1px solid var(--wm-line); border-radius: var(--wm-radius); background: var(--wm-panel); min-width: 0; }
.wm-row .wm-acts { grid-column: 1 / -1; justify-content: flex-start; }
.wm-row .wm-acts .sui-btn { padding-inline: 8px; }
.wm-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #0003; cursor: pointer; }
.wm-thumb-none { display: grid; place-items: center; font-size: 11px; text-transform: uppercase; color: var(--wm-dim); }
.wm-row.is-chosen { border-color: var(--wm-accent); }
.wm-name { cursor: pointer; }
.wm-acts [aria-pressed="true"] { border-color: var(--wm-accent); }
.wm-meta { display: grid; gap: 2px; min-width: 0; }
.wm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wm-dim, .wm-state { color: var(--wm-dim); font-size: 12.5px; overflow-wrap: anywhere; }
.wm-state.is-done { color: var(--wm-accent); }
.wm-state.is-error { color: #ff6b82; }
.wm-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wm-progress { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wm-progress progress { flex: 1 1 200px; accent-color: var(--wm-accent); }
.wm-settings-box { display: grid; gap: 10px; }
.wm-h { font-size: 15px; font-weight: 650; }
.wm-field { display: grid; gap: 4px; font-size: 13px; color: var(--wm-dim); }
.wm-range { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
.wm-range output { text-align: right; font-variant-numeric: tabular-nums; color: var(--wm-fg); }
.wm-range input { width: 100%; accent-color: var(--wm-accent); }
.wm-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.wm-check input { accent-color: var(--wm-accent); }
.wm-fine { color: var(--wm-dim); font-size: 12px; }
@media (max-width: 560px) { .wm-bar { --tlbx-hbtn-h: 32px; } }
@media (max-width: 860px) {
  .wm-work, .wm-files { padding: 12px 16px; }
  .wm-panel-open { display: inline-flex; align-self: flex-start; }
  .sf-phone .wm-panel { max-height: 62vh; }
}
