/* Progressive deterrence only: browser code cannot prevent OS screenshots or external camera photos. */
html.protection-enabled body { -webkit-user-select:none; user-select:none; }
html.protection-enabled input,
html.protection-enabled textarea,
html.protection-enabled select,
html.protection-enabled [contenteditable] { -webkit-user-select:text; user-select:text; }
html.protection-enabled img { -webkit-user-drag:none; }
html.protection-capture-blur body > :not(.protection-toast):not(.protection-focus-mask) { filter:blur(20px) !important; }
.protection-toast { position:fixed; z-index:2147483647; top:24px; left:50%; transform:translateX(-50%); background:#111; color:white; padding:14px 24px; border-radius:12px; font:600 15px/1.4 Arial,sans-serif; text-align:center; pointer-events:none; opacity:0; visibility:hidden; transition:opacity .12s; }
.protection-toast.protection-toast-show { opacity:1; visibility:visible; }
.protection-focus-mask { position:fixed; inset:0; z-index:2147483646; background:#000; color:#fff; display:none; align-items:center; justify-content:center; font:700 clamp(22px,4vw,38px)/1.5 Arial,sans-serif; }
html.protection-focus-lost .protection-focus-mask { display:flex; }
.protection-watermark { position:fixed; inset:0; z-index:99999; pointer-events:none; overflow:hidden; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); grid-template-rows:repeat(10, minmax(0,1fr)); opacity:.025; color:#000; filter:blur(.3px); user-select:none; }
.protection-watermark span { display:block; white-space:nowrap; overflow:hidden; font:18px Arial,sans-serif; letter-spacing:5px; transform:rotate(-30deg); }
.protection-watermark.protection-watermark-visible { opacity:.055; }
.protection-image-wrap { position:relative; display:inline-block; vertical-align:middle; }
.protection-image-canvas { display:block; width:100%; height:auto; }
.protection-image-shield { position:absolute; inset:0; background:transparent; pointer-events:auto; }
@media print { html.protection-enabled body { visibility:hidden!important; } }

/* Blackout guard, separate from the protected body content. */
#browser-blackout-guard { position:fixed; inset:0; z-index:2147483647; background:#000; color:#fff; display:none; align-items:center; justify-content:center; text-align:center; font:700 clamp(22px,4vw,36px)/1.5 Arial,sans-serif; pointer-events:none; }
html.browser-blackout-active #browser-blackout-guard { display:flex; }
html.browser-blackout-active body > :not(#browser-blackout-guard):not(.protection-focus-mask) { filter:blur(25px) brightness(.2) !important; }

/* Portfolio is public: keep it visible when a mobile in-app browser loses focus. */
html.protection-focus-lost body:has(.showcase-gallery) .protection-focus-mask,
html.protection-focus-lost body:has(.showcase-preview) .protection-focus-mask,
html.browser-blackout-active body:has(.showcase-gallery) #browser-blackout-guard,
html.browser-blackout-active body:has(.showcase-preview) #browser-blackout-guard { display:none!important; }
html.browser-blackout-active body:has(.showcase-gallery) > :not(#browser-blackout-guard):not(.protection-focus-mask),
html.browser-blackout-active body:has(.showcase-preview) > :not(#browser-blackout-guard):not(.protection-focus-mask) { filter:none!important; }
