/* Bitmap Lab: a working, local-first creative tool inside the existing tools page. */
#view-tools .tool-card--bitmap{cursor:pointer;transition:transform .32s cubic-bezier(.2,.7,.2,1),border-color .28s ease,box-shadow .32s ease}
#view-tools .tool-card--bitmap:hover{transform:translateY(-5px);border-color:rgba(142,171,255,.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 22px 48px rgba(0,0,0,.28),0 0 26px rgba(110,145,255,.08)}
#view-tools .tool-card--bitmap:focus-visible{outline:2px solid #9ab1ff;outline-offset:4px}
#view-tools .tool-card--bitmap .tool-ready{border-color:rgba(142,171,255,.5);background:rgba(142,171,255,.1);color:#b5c6ff}
#view-tools .tool-card--bitmap .tool-card-action{border-color:rgba(244,243,237,.34);background:rgba(142,171,255,.06);color:#b9caff}
#view-tools .tool-card--bitmap:hover .tool-card-action{border-color:#9db5ff;background:#8eabff;color:#101522}

.bitmap-dialog{position:fixed;inset:0;width:min(96vw,1680px);height:min(94svh,1040px);max-width:none;max-height:none;margin:auto;padding:0;overflow:hidden;overscroll-behavior:contain;border:1px solid rgba(238,235,228,.22);border-radius:8px;background:#171819;color:#f4f2ed;color-scheme:dark;box-shadow:0 32px 120px rgba(0,0,0,.55)}
.bitmap-dialog::backdrop{background:rgba(8,8,9,.78);backdrop-filter:blur(10px)}
.bitmap-app{display:flex;min-width:0;width:100%;height:100%;flex-direction:column;overflow:hidden;background:radial-gradient(ellipse at 100% 0,rgba(56,76,132,.13),transparent 34%),#171819;font-family:"Manrope",Arial,sans-serif}
.bitmap-topbar{display:flex;min-height:49px;align-items:center;justify-content:space-between;gap:16px;padding:0 23px;border-bottom:1px solid rgba(244,242,237,.12)}
.bitmap-brand{display:flex;align-items:center;gap:11px;color:rgba(244,242,237,.55);font:500 8px/1 "DM Mono",monospace;letter-spacing:.1em}
.bitmap-mark{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#8eabff;color:#171819;font-size:8px;font-weight:700;letter-spacing:-.04em}
.bitmap-brand i{color:#8eabff;font-style:normal}
.bitmap-top-separator{color:rgba(244,242,237,.28)}
.bitmap-brand-app{color:#bfcaff}
.bitmap-close{display:grid;width:30px;height:30px;place-items:center;border:1px solid rgba(244,242,237,.22);border-radius:50%;background:transparent;color:#f4f2ed;font-size:21px;line-height:1;cursor:pointer;transition:transform .2s ease,background .2s ease,border-color .2s ease}
.bitmap-close:hover{transform:rotate(90deg);border-color:#8eabff;background:#8eabff;color:#111521}
.bitmap-heading{display:flex;min-height:100px;align-items:center;justify-content:space-between;gap:20px;padding:19px 25px 15px;border-bottom:1px solid rgba(244,242,237,.1)}
.bitmap-heading>div:first-child{max-width:700px}
.bitmap-kicker{color:#9ab1ff;font:500 8px/1.2 "DM Mono",monospace;letter-spacing:.12em}
.bitmap-heading h2{margin:6px 0 4px;color:#f4f2ed;font-size:clamp(25px,3vw,38px);font-weight:600;line-height:.98;letter-spacing:-.075em}
.bitmap-heading p{max-width:72ch;margin:0;color:rgba(244,242,237,.6);font-size:10px;line-height:1.55}
.bitmap-heading-index{padding-right:8px;color:#b9c6f4;font:500 16px/1 "DM Mono",monospace}
.bitmap-heading-index span{color:rgba(244,242,237,.35);font-size:9px}
.bitmap-layout{display:grid;min-height:0;flex:1;grid-template-columns:minmax(250px,310px) minmax(0,1fr)}
.bitmap-controls{min-height:0;padding:0 18px 20px;overflow:auto;overscroll-behavior:contain;border-right:1px solid rgba(244,242,237,.12);scrollbar-color:rgba(142,171,255,.35) transparent;scrollbar-width:thin}
.bitmap-control-group{padding:17px 0 16px;border-bottom:1px solid rgba(244,242,237,.12)}
.bitmap-group-heading{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.bitmap-group-heading>span{color:#8eabff;font:500 8px/1 "DM Mono",monospace}
.bitmap-group-heading h3{margin:0;color:#f4f2ed;font-size:12px;font-weight:600;letter-spacing:-.025em}
.bitmap-dropzone{position:relative;display:flex;width:100%;min-height:103px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:11px;border:1px dashed rgba(244,242,237,.3);border-radius:4px;background:rgba(244,242,237,.025);color:inherit;text-align:center;cursor:pointer;transition:border-color .2s ease,background .2s ease}
.bitmap-dropzone:hover{border-color:#8eabff;background:rgba(142,171,255,.07)}
.bitmap-dropzone:focus-within{outline:2px solid #9ab1ff;outline-offset:3px;border-color:#9ab1ff}
.bitmap-file-overlay{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.bitmap-upload-icon{display:grid;width:24px;height:24px;place-items:center;border:1px solid rgba(142,171,255,.65);border-radius:50%;color:#a8baff;font-size:17px;line-height:1}
.bitmap-dropzone strong{font-size:9px;font-weight:600}
.bitmap-dropzone small{color:rgba(244,242,237,.47);font-size:8px}
.bitmap-browse-pill{margin-top:5px;padding:5px 9px;border-radius:999px;background:rgba(142,171,255,.14);color:#c0ccf5;font-size:8px;font-weight:600}
.bitmap-file-name{margin-top:8px;overflow:hidden;color:rgba(244,242,237,.45);font:400 8px/1.4 "DM Mono",monospace;text-overflow:ellipsis;white-space:nowrap}
.bitmap-field{display:grid;gap:6px;margin-top:10px}
.bitmap-field>span,.bitmap-color-field>span{color:rgba(244,242,237,.58);font-size:8px}
.bitmap-field select,.bitmap-favorites select,.bitmap-export select{width:100%;min-height:31px;padding:0 9px;border:1px solid rgba(244,242,237,.19);border-radius:3px;background:#202224;color:#f4f2ed;font:500 9px "Manrope",Arial,sans-serif}
.bitmap-color-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.bitmap-color-field{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border:1px solid rgba(244,242,237,.15);border-radius:3px}
.bitmap-color-field input{width:28px;height:22px;padding:0;border:0;background:none;cursor:pointer}
.bitmap-range{display:grid;gap:6px;margin:11px 0}
.bitmap-range>span{display:flex;justify-content:space-between;gap:10px;color:rgba(244,242,237,.65);font-size:8px}
.bitmap-range output{color:#b9c8ff;font:500 8px "DM Mono",monospace}
.bitmap-range input{width:100%;height:12px;margin:0;accent-color:#93aaff;cursor:pointer}
.bitmap-range small{color:rgba(244,242,237,.36);font-size:7px}
.bitmap-check{display:flex;align-items:center;gap:8px;margin-top:11px;color:rgba(244,242,237,.66);font-size:8px;cursor:pointer}
.bitmap-check input{accent-color:#8eabff}
.bitmap-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.bitmap-presets button,.bitmap-control-actions button,.bitmap-fav-head button,.bitmap-save{min-height:28px;padding:5px 6px;border:1px solid rgba(244,242,237,.17);border-radius:3px;background:rgba(244,242,237,.035);color:rgba(244,242,237,.76);font-size:8px;cursor:pointer;transition:border-color .18s ease,background .18s ease,color .18s ease}
.bitmap-presets button:hover,.bitmap-control-actions button:hover,.bitmap-fav-head button:hover,.bitmap-save:hover{border-color:#8eabff;background:rgba(142,171,255,.1);color:#dbe2ff}
.bitmap-favorites{margin-top:15px}
.bitmap-fav-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;color:rgba(244,242,237,.5);font-size:8px}
.bitmap-fav-head button{min-height:22px;padding:3px 7px;color:rgba(244,242,237,.47)}
.bitmap-favorites select{min-height:29px}
.bitmap-save{width:100%;margin-top:6px;color:#c1ceff}
.bitmap-control-actions{display:flex;gap:7px;padding-top:13px}
.bitmap-control-actions button:first-child{flex:1;border-color:rgba(142,171,255,.45);color:#b8c7ff}
.bitmap-stage{display:flex;min-width:0;min-height:0;flex-direction:column;padding:0 18px 15px}
.bitmap-stage-top,.bitmap-stage-bottom{display:flex;min-height:46px;align-items:center;justify-content:space-between;gap:12px}
.bitmap-stage-top{border-bottom:1px solid rgba(244,242,237,.1)}
.bitmap-preview-label{display:flex;align-items:center;gap:8px;color:rgba(244,242,237,.58);font:500 8px "DM Mono",monospace;letter-spacing:.06em}
.bitmap-preview-label>i{width:6px;height:6px;border-radius:50%;background:#666}
.bitmap-stage.has-image .bitmap-preview-label>i{background:#95d3a8;box-shadow:0 0 9px rgba(149,211,168,.5)}
.bitmap-preview-label b{margin-left:3px;color:rgba(244,242,237,.36);font-weight:400;letter-spacing:0}
.bitmap-view-actions{display:flex;align-items:center;gap:7px;color:rgba(244,242,237,.55);font:8px "DM Mono",monospace}
.bitmap-view-actions button{display:grid;min-width:27px;height:27px;place-items:center;padding:0 7px;border:1px solid rgba(244,242,237,.18);border-radius:3px;background:transparent;color:#f4f2ed;font:inherit;cursor:pointer;transition:border-color .18s ease,color .18s ease}
.bitmap-view-actions button:hover{border-color:#8eabff;color:#b8c7ff}
.bitmap-view-actions .bitmap-compare{padding-inline:9px;border-color:rgba(142,171,255,.35);color:#bfccff;font-family:"Manrope",Arial,sans-serif;font-size:8px}
.bitmap-canvas-area{position:relative;display:grid;min-height:170px;flex:1;place-items:center;overflow:auto;overscroll-behavior:contain;background-color:#1b1c1d;background-image:linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%),linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%);background-position:0 0,8px 8px;background-size:16px 16px;scrollbar-color:rgba(142,171,255,.35) transparent;scrollbar-width:thin}
.bitmap-canvas-area.is-dragging{outline:2px dashed #9ab1ff;outline-offset:-7px;background-color:#22283a}
.bitmap-canvas-wrap{display:none;max-width:100%;max-height:100%;place-items:center;transform:scale(var(--bitmap-zoom,1));transform-origin:center;transition:transform .18s ease}
.bitmap-stage.has-image .bitmap-canvas-wrap{display:grid}
.bitmap-canvas-wrap canvas{display:block;max-width:100%;max-height:min(100%,70svh);object-fit:contain;background:#f7f4ef;box-shadow:0 12px 44px rgba(0,0,0,.35)}
.bitmap-empty{display:flex;max-width:350px;flex-direction:column;align-items:center;gap:8px;padding:28px;text-align:center}
.bitmap-stage.has-image .bitmap-empty{display:none}
.bitmap-empty-glyph{display:grid;width:46px;height:46px;place-items:center;border:1px solid rgba(142,171,255,.55);border-radius:50%;color:#a9bcff;font-size:22px}
.bitmap-empty strong{color:rgba(244,242,237,.83);font-size:12px;font-weight:600;letter-spacing:-.03em}
.bitmap-empty p{margin:0;color:rgba(244,242,237,.47);font-size:9px;line-height:1.6}
.bitmap-empty button{margin-top:3px;padding:8px 12px;border:1px solid rgba(142,171,255,.45);border-radius:999px;background:rgba(142,171,255,.11);color:#c2ceff;font-size:9px;cursor:pointer}
.bitmap-stage-bottom{min-height:53px;border-top:1px solid rgba(244,242,237,.1)}
.bitmap-local-note{color:rgba(244,242,237,.42);font:400 7px/1.4 "DM Mono",monospace}
.bitmap-export{display:flex;align-items:center;gap:7px}
.bitmap-export>button,.bitmap-export label{display:flex;min-height:31px;align-items:center;justify-content:center;gap:6px;padding:0 10px;border:1px solid rgba(244,242,237,.19);border-radius:3px;background:rgba(244,242,237,.03);color:rgba(244,242,237,.78);font-size:8px;white-space:nowrap}
.bitmap-export>button{cursor:pointer;transition:background .18s ease,border-color .18s ease}
.bitmap-export>button:hover{border-color:#9ab1ff;background:rgba(142,171,255,.11)}
.bitmap-export label{padding:3px 4px 3px 9px;color:rgba(244,242,237,.48)}
.bitmap-export select{width:auto;min-height:23px;padding:0 6px;font-size:8px}
.bitmap-export .bitmap-download{border-color:#8eabff;background:#8eabff;color:#111521;font-weight:700}
.bitmap-export .bitmap-download:hover{background:#b4c5ff}
.bitmap-export .bitmap-send-texture{border-color:rgba(142,171,255,.42);color:#c4d0ff}
.bitmap-export .bitmap-send-texture:hover{border-color:#9ab1ff;background:rgba(142,171,255,.13);color:#fff}

@media(max-width:760px){
  .bitmap-dialog{inset:0;width:100%;height:100%;height:100dvh;margin:0;border:0;border-radius:0}
  .bitmap-app{overflow-y:auto;overflow-x:hidden}
  .bitmap-topbar{position:sticky;top:0;z-index:5;min-height:48px;padding:0 15px;background:rgba(23,24,25,.96);backdrop-filter:blur(12px)}
  .bitmap-brand{gap:8px;font-size:7px}
  .bitmap-heading{min-height:0;padding:16px 16px 13px}
  .bitmap-heading h2{font-size:29px}
  .bitmap-heading p{font-size:9px}
  .bitmap-heading-index{font-size:13px}
  .bitmap-layout{display:flex;flex-direction:column;overflow:visible}
  .bitmap-stage{order:-1;min-height:52svh;padding:0 12px 10px}
  .bitmap-stage-top{min-height:40px}
  .bitmap-canvas-area{min-height:34svh;max-height:44svh;flex:none}
  .bitmap-canvas-wrap canvas{max-height:42svh}
  .bitmap-stage-bottom{align-items:flex-start;flex-direction:column;gap:9px;padding:9px 0 10px}
  .bitmap-local-note{font-size:7px}
  .bitmap-export{width:100%;justify-content:space-between;gap:5px}
  .bitmap-export>button,.bitmap-export label{min-height:34px;padding-inline:8px;font-size:8px}
  .bitmap-export label{padding-left:8px}
  .bitmap-controls{order:0;overflow:visible;padding:0 16px 26px;border-top:1px solid rgba(244,242,237,.13);border-right:0}
  .bitmap-control-group{padding-block:16px}
  .bitmap-control-actions{padding-bottom:10px}
}
@media(max-width:380px){
  .bitmap-export>button,.bitmap-export label{padding-inline:6px;font-size:7px}
  .bitmap-stage{padding-inline:9px}
  .bitmap-heading{padding-inline:13px}
  .bitmap-controls{padding-inline:13px}
}
@media(prefers-reduced-motion:reduce){
  #view-tools .tool-card--bitmap,.bitmap-close,.bitmap-view-actions button,.bitmap-export>button{transition:none}
}

/* The site's footprint cursor sits under native dialogs. Restore the system pointer in the app. */
html.bitmap-tool-open,html.bitmap-tool-open body{overflow:hidden!important;overscroll-behavior:none}
body.bitmap-tool-open,body.bitmap-tool-open *{cursor:auto!important}
body.bitmap-tool-open .custom-cursor{display:none!important}

/* Quick recipes, focused color controls, and a compact preview zoom dock. */
.bitmap-quick-presets{display:flex;min-height:66px;align-items:center;justify-content:space-between;gap:20px;padding:9px 25px;border-bottom:1px solid rgba(244,242,237,.1);background:linear-gradient(100deg,rgba(142,171,255,.075),transparent 52%)}
.bitmap-quick-label{display:grid;grid-template-columns:auto 1fr;column-gap:9px;align-items:center;min-width:170px}
.bitmap-quick-label>span{grid-row:span 2;color:#8eabff;font:500 8px "DM Mono",monospace}
.bitmap-quick-label strong{color:rgba(244,242,237,.8);font-size:9px;font-weight:600}
.bitmap-quick-label small{color:rgba(244,242,237,.35);font:400 7px "DM Mono",monospace;letter-spacing:.08em}
.bitmap-preset-strip{display:flex;min-width:0;gap:7px;overflow:auto;padding:2px;scrollbar-width:none}
.bitmap-preset-strip::-webkit-scrollbar{display:none}
.bitmap-preset-strip button{display:flex;min-width:108px;align-items:center;gap:8px;padding:7px 10px;border:1px solid rgba(244,242,237,.13);border-radius:4px;background:rgba(244,242,237,.025);color:rgba(244,242,237,.68);font:500 8px "Manrope",Arial,sans-serif;white-space:nowrap;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.bitmap-preset-strip button:hover{transform:translateY(-1px);border-color:rgba(142,171,255,.6);background:rgba(142,171,255,.08);color:#f4f2ed}
.bitmap-preset-strip button.is-active{border-color:#8eabff;background:rgba(142,171,255,.11);color:#e3e9ff;box-shadow:inset 0 1px rgba(255,255,255,.08)}
.bitmap-preset-swatch{position:relative;display:block;width:24px;height:24px;flex:0 0 24px;overflow:hidden;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:var(--swatch-paper)}
.bitmap-preset-swatch::before,.bitmap-preset-swatch::after{position:absolute;top:0;bottom:0;width:50%;content:""}
.bitmap-preset-swatch::before{left:0;background:var(--swatch-ink)}
.bitmap-preset-swatch::after{right:0;background:var(--swatch-tone)}
.bitmap-preset-swatch--cmyk{background:conic-gradient(#00a8c7 0 25%,#d52f87 25% 50%,#f0c928 50% 75%,#201b19 75%)}
.bitmap-preset-swatch--cmyk::before,.bitmap-preset-swatch--cmyk::after{display:none}
.bitmap-color-note{margin:8px 0 0;padding:7px 8px;border-left:2px solid #8eabff;background:rgba(142,171,255,.06);color:rgba(244,242,237,.55);font-size:8px;line-height:1.45}
.bitmap-color-note[hidden],.bitmap-color-field[hidden],.bitmap-noise-range[hidden]{display:none!important}
.bitmap-color-row{grid-template-columns:repeat(2,minmax(0,1fr))}
.bitmap-color-row:has([data-bitmap-color-field="tone"]:not([hidden])){grid-template-columns:repeat(3,minmax(0,1fr))}
.bitmap-color-row.is-disabled{opacity:.45}
.bitmap-noise-range{padding:8px;border:1px solid rgba(142,171,255,.18);border-radius:4px;background:rgba(142,171,255,.035)}
.bitmap-zoom-dock{position:absolute;right:12px;bottom:12px;z-index:2;display:flex;min-height:37px;align-items:center;gap:7px;padding:4px 6px;border:1px solid rgba(244,242,237,.2);border-radius:999px;background:rgba(23,24,25,.87);box-shadow:0 8px 28px rgba(0,0,0,.28);backdrop-filter:blur(12px)}
.bitmap-zoom-dock button{display:grid;min-width:27px;height:27px;place-items:center;padding:0 7px;border:1px solid rgba(244,242,237,.14);border-radius:50%;background:rgba(244,242,237,.04);color:#f4f2ed;font-size:12px;cursor:pointer;transition:background .18s ease,border-color .18s ease}
.bitmap-zoom-dock button:hover{border-color:#8eabff;background:rgba(142,171,255,.15);color:#dce4ff}
.bitmap-zoom-dock input{width:92px;height:13px;margin:0;accent-color:#9ab1ff;cursor:pointer}
.bitmap-zoom-dock output{min-width:38px;color:#c5d0f8;font:500 8px "DM Mono",monospace;text-align:center}
.bitmap-zoom-dock>span{width:1px;height:18px;background:rgba(244,242,237,.15)}
.bitmap-zoom-dock .bitmap-zoom-fit{width:auto;padding:0 10px;border-radius:999px;font:500 8px "Manrope",Arial,sans-serif}
@media(max-width:760px){
  .bitmap-quick-presets{min-height:0;align-items:flex-start;flex-direction:column;gap:8px;padding:11px 14px}
  .bitmap-quick-label{min-width:0}
  .bitmap-quick-label small{display:none}
  .bitmap-preset-strip{width:100%;gap:6px}
  .bitmap-preset-strip button{min-width:98px;padding:6px 8px}
  .bitmap-preset-swatch{width:21px;height:21px;flex-basis:21px}
  .bitmap-zoom-dock{right:8px;bottom:8px;min-height:34px;gap:5px;padding:3px 5px}
  .bitmap-zoom-dock input{width:72px}
  .bitmap-zoom-dock button{min-width:25px;height:25px}
}
@media(max-width:380px){
  .bitmap-zoom-dock input{width:54px}
  .bitmap-zoom-dock .bitmap-zoom-fit{padding-inline:7px}
}
.bitmap-range{gap:5px;margin:8px 0;padding:8px 10px;border:1px solid rgba(244,242,237,.075);border-radius:7px;background:linear-gradient(135deg,rgba(255,255,255,.035),rgba(255,255,255,.012));transition:border-color .18s ease,background .18s ease,transform .18s ease}
.bitmap-range:hover{border-color:rgba(142,171,255,.26);background:linear-gradient(135deg,rgba(142,171,255,.075),rgba(255,255,255,.018));transform:translateY(-1px)}
.bitmap-range>span{align-items:center;color:rgba(244,242,237,.72);font-size:8px;letter-spacing:.015em}
.bitmap-range output{min-width:42px;padding:4px 7px;border:1px solid rgba(142,171,255,.26);border-radius:5px;background:linear-gradient(180deg,rgba(142,171,255,.12),rgba(142,171,255,.055));color:#d3dcff;font:500 8px/1 "DM Mono",monospace;text-align:center;box-shadow:inset 0 1px rgba(255,255,255,.055)}
.bitmap-range input[type="range"],.bitmap-zoom-dock input[type="range"],.bitmap-view-actions input[type="range"]{-webkit-appearance:none;appearance:none;height:25px;margin:0;padding:0;border:0;background:transparent;accent-color:#9ab1ff;cursor:pointer;--range-progress:50%;touch-action:pan-y}
.bitmap-range input[type="range"]{width:100%}
.bitmap-range input[type="range"]::-webkit-slider-runnable-track,.bitmap-zoom-dock input[type="range"]::-webkit-slider-runnable-track,.bitmap-view-actions input[type="range"]::-webkit-slider-runnable-track{height:6px;border:1px solid rgba(255,255,255,.065);border-radius:99px;background:repeating-linear-gradient(90deg,transparent 0 24px,rgba(18,20,26,.28) 24px 25px),linear-gradient(90deg,#718cff 0%,#b9c8ff var(--range-progress),rgba(244,242,237,.14) var(--range-progress),rgba(244,242,237,.14) 100%);box-shadow:inset 0 1px 2px rgba(0,0,0,.42),0 1px rgba(255,255,255,.035)}
.bitmap-range input[type="range"]::-moz-range-track,.bitmap-zoom-dock input[type="range"]::-moz-range-track,.bitmap-view-actions input[type="range"]::-moz-range-track{height:6px;border:1px solid rgba(255,255,255,.065);border-radius:99px;background:repeating-linear-gradient(90deg,transparent 0 24px,rgba(18,20,26,.28) 24px 25px),rgba(244,242,237,.14);box-shadow:inset 0 1px 2px rgba(0,0,0,.42)}
.bitmap-range input[type="range"]::-moz-range-progress,.bitmap-zoom-dock input[type="range"]::-moz-range-progress,.bitmap-view-actions input[type="range"]::-moz-range-progress{height:6px;border-radius:99px;background:linear-gradient(90deg,#718cff,#b9c8ff);box-shadow:0 0 10px rgba(142,171,255,.25)}
.bitmap-range input[type="range"]::-webkit-slider-thumb,.bitmap-zoom-dock input[type="range"]::-webkit-slider-thumb,.bitmap-view-actions input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:17px;height:17px;margin-top:-6px;border:1px solid rgba(255,255,255,.95);border-radius:50%;background:radial-gradient(circle at center,#829cff 0 3px,#f2f4ff 3.5px 100%);box-shadow:0 0 0 3px rgba(142,171,255,.19),0 2px 7px rgba(0,0,0,.48);transition:transform .16s ease,box-shadow .16s ease}
.bitmap-range input[type="range"]::-moz-range-thumb,.bitmap-zoom-dock input[type="range"]::-moz-range-thumb,.bitmap-view-actions input[type="range"]::-moz-range-thumb{width:15px;height:15px;border:1px solid rgba(255,255,255,.95);border-radius:50%;background:radial-gradient(circle at center,#829cff 0 3px,#f2f4ff 3.5px 100%);box-shadow:0 0 0 3px rgba(142,171,255,.19),0 2px 7px rgba(0,0,0,.48);transition:transform .16s ease,box-shadow .16s ease}
.bitmap-range input[type="range"]:hover::-webkit-slider-thumb,.bitmap-zoom-dock input[type="range"]:hover::-webkit-slider-thumb,.bitmap-view-actions input[type="range"]:hover::-webkit-slider-thumb{transform:scale(1.12);box-shadow:0 0 0 4px rgba(142,171,255,.23),0 2px 8px rgba(0,0,0,.5)}
.bitmap-range input[type="range"]:active::-webkit-slider-thumb,.bitmap-zoom-dock input[type="range"]:active::-webkit-slider-thumb,.bitmap-view-actions input[type="range"]:active::-webkit-slider-thumb{transform:scale(1.06);background:radial-gradient(circle at center,#647fe8 0 3px,#fff 3.5px 100%)}
.bitmap-range input[type="range"]:hover::-moz-range-thumb,.bitmap-zoom-dock input[type="range"]:hover::-moz-range-thumb,.bitmap-view-actions input[type="range"]:hover::-moz-range-thumb{box-shadow:0 0 0 4px rgba(142,171,255,.23),0 2px 8px rgba(0,0,0,.5)}
.bitmap-range input[type="range"]:focus-visible,.bitmap-zoom-dock input[type="range"]:focus-visible,.bitmap-view-actions input[type="range"]:focus-visible{outline:none}
.bitmap-range input[type="range"]:focus-visible::-webkit-slider-thumb,.bitmap-zoom-dock input[type="range"]:focus-visible::-webkit-slider-thumb,.bitmap-view-actions input[type="range"]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 5px rgba(142,171,255,.24),0 0 0 1px #d3dcff}
.bitmap-range input[type="range"]:focus-visible::-moz-range-thumb,.bitmap-zoom-dock input[type="range"]:focus-visible::-moz-range-thumb,.bitmap-view-actions input[type="range"]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 5px rgba(142,171,255,.24),0 0 0 1px #d3dcff}
.bitmap-range small{padding-top:1px;color:rgba(244,242,237,.4);font-size:7px}
.bitmap-view-actions .bitmap-compare[aria-pressed="true"]{border-color:#9ab1ff;background:rgba(142,171,255,.12);color:#dce4ff}
.bitmap-view-actions input[type="range"]{width:92px;height:25px}
.bitmap-view-actions input[type="range"][hidden]{display:none}
.bitmap-canvas-wrap{position:relative;isolation:isolate}
.bitmap-original-canvas{position:absolute;inset:0;z-index:2;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:fill;clip-path:inset(0 calc(100% - var(--compare-position,50%)) 0 0);background:transparent;box-shadow:none;opacity:0;pointer-events:none}
.bitmap-canvas-wrap.is-comparing .bitmap-original-canvas{opacity:1}
.bitmap-split-divider{position:absolute;top:0;bottom:0;left:var(--compare-position,50%);z-index:4;display:none;width:28px;align-items:center;justify-content:center;transform:translateX(-50%);touch-action:none;cursor:ew-resize}
.bitmap-split-divider::before{position:absolute;top:0;bottom:0;left:50%;width:2px;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.7);content:""}
.bitmap-split-divider span{position:relative;display:grid;width:27px;height:27px;place-items:center;border:1px solid rgba(255,255,255,.9);border-radius:50%;background:#171819;color:#fff;font-size:12px;box-shadow:0 2px 12px rgba(0,0,0,.45)}
.bitmap-canvas-wrap.is-comparing .bitmap-split-divider{display:flex}
.bitmap-compare-labels{position:absolute;top:10px;right:10px;left:10px;z-index:3;display:none;justify-content:space-between;pointer-events:none}
.bitmap-compare-labels span{padding:4px 7px;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:rgba(20,21,23,.72);color:#fff;font:500 7px "DM Mono",monospace;letter-spacing:.05em}
.bitmap-canvas-wrap.is-comparing .bitmap-compare-labels{display:flex}
.bitmap-stage-bottom{min-height:64px}
.bitmap-stage-bottom-actions{display:grid;justify-items:end;gap:6px}
.bitmap-transparent-option{display:flex;align-items:center;gap:6px;color:rgba(244,242,237,.5);font-size:7px;cursor:pointer}
.bitmap-transparent-option input{width:12px;height:12px;margin:0;accent-color:#9ab1ff}
.bitmap-transparent-option:has(input:checked){color:#c5d0f8}
.bitmap-angle-range[hidden]{display:none!important}
@media(max-width:760px){
  .bitmap-view-actions{gap:5px}
  .bitmap-view-actions input[type="range"]{width:72px}
  .bitmap-stage-bottom{min-height:0}
  .bitmap-stage-bottom-actions{width:100%;justify-items:stretch}
  .bitmap-transparent-option{align-self:flex-end;font-size:8px}
  .bitmap-split-divider span{width:25px;height:25px}
}
body.bitmap-tool-open input[type="range"]{cursor:pointer!important}
body.bitmap-tool-open .bitmap-split-divider{cursor:ew-resize!important}

/* Full-screen creative workstation: preview stays fixed while controls scroll. */
.bitmap-dialog{inset:0;width:100vw;height:100vh;height:100dvh;margin:0;border:0;border-radius:0;box-shadow:none}
.lab-app-switch{display:flex;min-width:0;align-items:center;justify-content:center;gap:4px;margin-inline:auto;padding:3px;border:1px solid rgba(244,242,237,.1);border-radius:999px;background:rgba(244,242,237,.035)}
.lab-app-switch button{min-height:25px;padding:0 10px;border:0;border-radius:999px;background:transparent;color:rgba(244,242,237,.48);font:500 8px/1 "DM Mono",monospace;white-space:nowrap;cursor:pointer;transition:background .18s ease,color .18s ease}
.lab-app-switch button:hover,.lab-app-switch button[aria-current="page"]{background:rgba(142,171,255,.14);color:#dbe3ff}
.bitmap-dialog .bitmap-app-switch{flex:0 1 auto}
@media(max-width:760px){
  .bitmap-app{height:100%;overflow:hidden}
  .bitmap-topbar{position:relative;min-height:42px;flex:0 0 42px;padding:0 9px}
  .bitmap-brand{gap:6px;font-size:6px}.bitmap-brand .bitmap-mark{width:20px;height:20px}
  .lab-app-switch{max-width:calc(100vw - 112px);gap:2px;padding:2px}
  .lab-app-switch button{min-height:23px;padding-inline:6px;font-size:6px}
  .bitmap-topbar .bitmap-close{width:27px;height:27px;flex:0 0 27px}
  .bitmap-heading{min-height:63px;flex:0 0 63px;padding:7px 12px}
  .bitmap-heading h2{margin:2px 0;font-size:23px}.bitmap-heading p{font-size:8px;line-height:1.35}.bitmap-heading-index{font-size:11px}
  .bitmap-quick-presets{min-height:43px;height:43px;flex:0 0 43px;align-items:center;flex-direction:row;gap:8px;padding:4px 9px;overflow:hidden}
  .bitmap-quick-label{min-width:45px;gap:4px}.bitmap-quick-label small{display:none}
  .bitmap-preset-strip{min-width:0;flex:1;gap:4px;padding:2px}.bitmap-preset-strip button{min-width:auto;min-height:29px;gap:5px;padding:4px 6px;font-size:7px}
  .bitmap-layout{display:flex;min-height:0;flex:1;flex-direction:column;overflow:hidden}
  .bitmap-stage{order:0;min-height:0;height:clamp(205px,36svh,330px);flex:0 0 auto;padding:0 9px 6px}
  .bitmap-stage-top{min-height:30px;flex:0 0 30px}.bitmap-canvas-area{min-height:0;max-height:none;flex:1}
  .bitmap-canvas-wrap canvas{max-height:calc(36svh - 42px)}
  .bitmap-stage-bottom{min-height:38px;align-items:center;flex:0 0 38px;flex-direction:row;gap:6px;padding:4px 0}
  .bitmap-local-note{max-width:34%;font-size:6px;line-height:1.2}
  .bitmap-stage-bottom-actions{width:auto;justify-items:end;gap:4px}.bitmap-export{width:auto;gap:4px}
  .bitmap-export>button,.bitmap-export label{min-height:28px;padding-inline:6px;font-size:7px}.bitmap-export label{padding-left:6px}.bitmap-export select{min-height:20px;padding-inline:3px;font-size:7px}
  .bitmap-transparent-option{font-size:7px}
  .bitmap-controls{order:1;min-height:0;flex:1;overflow-x:hidden;overflow-y:auto;padding:0 12px 20px;border-top:1px solid rgba(244,242,237,.13);border-right:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .bitmap-control-group{padding-block:11px}
}
@media(max-width:390px){
  .bitmap-brand .bitmap-brand-label,.bitmap-brand .bitmap-top-separator{display:none}
  .lab-app-switch{max-width:calc(100vw - 75px)}
  .lab-app-switch button{padding-inline:5px;font-size:5.5px}
  .bitmap-stage{height:clamp(195px,34svh,285px)}
  .bitmap-local-note{display:none}.bitmap-stage-bottom-actions{width:100%;justify-items:stretch}
  .bitmap-export{width:100%;justify-content:space-between}
}
