.fred-atelier,.fred-gallery,.fred-pages{--fred-ink:#232323;--fred-paper:#fffdf6;--fred-accent:#f8cf48;color:var(--fred-ink);font-family:inherit}.fred-atelier{max-width:1100px;margin:30px auto;padding:clamp(16px,3vw,32px);background:var(--fred-paper);border:2px solid var(--fred-ink);border-radius:14px;box-shadow:6px 6px 0 var(--fred-ink)}.fred-atelier *{box-sizing:border-box}.fred-intro span{font-size:12px;font-weight:800;letter-spacing:.16em}.fred-intro h2{font-size:clamp(26px,4vw,44px);line-height:1.15;margin:12px 0}.fred-intro p{max-width:760px}.fred-tools,.fred-options,.fred-actions{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0;align-items:center}.fred-atelier button{border:1px solid #232323;border-radius:6px;background:white;color:#232323;padding:10px 13px;font:inherit;font-size:14px;cursor:pointer;line-height:1.3}.fred-atelier button:hover{background:#fff1b6}.fred-atelier button[aria-pressed=true],.fred-atelier .fred-submit{background:var(--fred-accent);font-weight:700}.fred-atelier button:disabled{opacity:.45;cursor:not-allowed}.fred-atelier :focus-visible,.fred-gallery a:focus-visible{outline:3px solid #1e88e5;outline-offset:3px}.fred-options label{display:flex;align-items:center;gap:8px;font-size:14px}.fred-options input[type=color]{width:44px;height:36px;padding:2px;border:1px solid #444}.fred-options input[type=range]{width:110px}.fred-swatches{display:flex;flex-wrap:wrap;gap:5px;max-width:220px}.fred-atelier .fred-swatches button{width:22px;height:22px;min-height:22px;border:1px solid #777;border-radius:50%;padding:0}.fred-atelier input[type=text],.fred-atelier input:not([type]){color:#232323;background:#fff;border:1px solid #777;border-radius:5px;padding:9px;font:inherit;max-width:100%}.fred-canvas-wrap{border:2px solid #232323;background:#fff;overflow:hidden}.fred-atelier canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair}.fred-form{margin-top:30px;padding-top:20px;border-top:1px dashed #888;display:grid;gap:14px}.fred-form h3{margin:0;font-size:22px}.fred-form>label{display:block;line-height:1.5}.fred-form>label>input:not([type=checkbox]){display:block;width:100%;max-width:600px;margin-top:5px}.fred-form input[type=checkbox]{accent-color:#232323;width:18px;height:18px;vertical-align:middle}.fred-atelier .fred-honey{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.fred-small{font-size:13px;line-height:1.5;margin:0}.fred-submit{justify-self:start}.fred-status{min-height:24px;margin:0;font-weight:600}.fred-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin:30px 0}.fred-gallery figure{margin:0;background:#fffdf6;border:1px solid #232323;border-radius:8px;overflow:hidden}.fred-gallery img{width:100%;height:auto;display:block}.fred-gallery figcaption{padding:14px;overflow-wrap:anywhere}.fred-pages{display:flex;gap:16px}@media(max-width:800px){.fred-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.fred-gallery{grid-template-columns:1fr}.fred-tools button{flex:1 0 29%;padding:9px 5px}.fred-atelier{box-shadow:3px 3px 0 #232323}.fred-options{gap:14px}}

/* Keep swatches independent of Elementor/theme button backgrounds, including hover/focus. */
.fred-atelier .fred-swatches button,.fred-atelier .fred-swatches button:hover,.fred-atelier .fred-swatches button:focus,.fred-atelier .fred-swatches button:active{background:var(--fred-swatch)!important;background-image:none!important;box-shadow:none;color:transparent!important;appearance:none}
.fred-atelier [hidden]{display:none!important}.fred-text-panel{background:#fff5cd;border:1px solid #232323;border-radius:8px;padding:18px;margin:20px 0}.fred-text-panel h3{margin:0 0 8px}.fred-text-panel p{font-size:14px}.fred-text-panel textarea{display:block;width:100%;min-height:90px;padding:10px;font:inherit;background:#fff;color:#232323;border:1px solid #777;border-radius:5px}.fred-text-options{display:flex;flex-wrap:wrap;gap:16px;margin-top:14px}.fred-text-options label{display:flex;align-items:center;gap:7px}.fred-text-options select,.fred-text-options input[type=number]{background:#fff;color:#232323;border:1px solid #777;padding:6px;border-radius:4px}.fred-font-size{width:80px}

.fred-background{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px;margin:16px 0;background:#fff;border:1px solid #777;border-radius:6px}.fred-background p{flex-basis:100%}.fred-upload-label{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.fred-bg-file{max-width:100%;font:inherit;font-size:14px}.fred-dimensions{font-size:13px;font-weight:700}.fred-text-select{max-width:260px}.fred-atelier canvas{user-select:none;-webkit-user-select:none}

/* Match Le Fred Duval's existing identity rather than Astra's legacy typography. */
body .fred-atelier,body .fred-gallery,body .fred-pages{
 --fred-ink:var(--fred-charcoal,#20211f);
 --fred-paper:var(--fred-cream,#fff6de);
 --fred-accent:var(--fred-green,#42d66b);
 font-family:"Source Serif 4",Georgia,serif;
 color:var(--fred-ink);
}
body .fred-atelier{border:var(--fred-border,3px solid #20211f);border-radius:var(--fred-radius,8px);box-shadow:var(--fred-shadow,6px 6px 0 #20211f)}
body .fred-atelier h2,body .fred-atelier h3,body .fred-gallery strong{
 font-family:"Bricolage Grotesque",Arial,sans-serif!important;
 font-style:normal!important;font-weight:700!important;color:var(--fred-ink)!important;
}
body .fred-atelier .fred-intro h2{font-size:clamp(28px,4vw,44px)!important;line-height:1.1!important;letter-spacing:-.02em}
body .fred-atelier h3{font-size:clamp(20px,2.5vw,25px)!important;line-height:1.2!important}
body .fred-atelier p,body .fred-gallery figcaption{
 font-family:"Source Serif 4",Georgia,serif!important;
 font-style:normal!important;color:var(--fred-ink)!important;line-height:1.6;
 padding:0!important;
}
body .fred-atelier .fred-intro p{font-size:17px!important;line-height:1.6!important}
body .fred-atelier .fred-small{font-size:13px!important;line-height:1.5!important}
body .fred-atelier .fred-intro>span,body .fred-atelier label,body .fred-atelier output,body .fred-atelier .fred-dimensions{
 font-family:"Bricolage Grotesque",Arial,sans-serif!important;font-style:normal;
}
body .fred-atelier input,body .fred-atelier textarea,body .fred-atelier select{font-family:"Source Serif 4",Georgia,serif!important}
body .fred-atelier button{
 font-family:"Bricolage Grotesque",Arial,sans-serif!important;
 background:var(--fred-white,#fff)!important;color:var(--fred-ink)!important;
 border:2px solid var(--fred-ink)!important;border-radius:var(--fred-radius,8px)!important;
 font-size:14px!important;padding:10px 13px!important;box-shadow:2px 2px 0 var(--fred-ink);
}
body .fred-atelier button[aria-pressed=true],body .fred-atelier .fred-submit{background:var(--fred-accent)!important}
body .fred-atelier button:not(:disabled):hover{background:var(--fred-blue,#4169ff)!important;color:#fff!important;box-shadow:1px 1px 0 var(--fred-ink);transform:translate(1px,1px)}
body .fred-atelier button:disabled{transform:none;box-shadow:none}
body .fred-atelier .fred-swatches button,
body .fred-atelier .fred-swatches button:hover,
body .fred-atelier .fred-swatches button:focus,
body .fred-atelier .fred-swatches button:active{
 background:var(--fred-swatch)!important;color:transparent!important;background-image:none!important;
 width:24px!important;height:24px!important;min-height:24px!important;padding:0!important;
 border:1px solid var(--fred-ink)!important;border-radius:50%!important;box-shadow:none!important;transform:none!important;
}
body .fred-atelier .fred-text-panel{background:var(--fred-paper);border:2px solid var(--fred-ink);border-radius:var(--fred-radius,8px)}
body .fred-gallery figure{background:var(--fred-white,#fff);border:var(--fred-border,3px solid #20211f);border-radius:var(--fred-radius,8px);box-shadow:4px 4px 0 var(--fred-ink)}
@media(max-width:480px){body .fred-atelier .fred-tools button{padding:9px 5px!important;font-size:13px!important}body .fred-atelier .fred-intro p{font-size:16px!important}}

/* Compact, monochrome icons with accessible tool names and focus tooltips. */
body .fred-atelier .fred-tools{gap:8px;overflow:visible}
body .fred-atelier .fred-icon-button{
 position:relative;display:inline-flex;align-items:center;justify-content:center;
 width:42px!important;height:42px!important;min-width:42px!important;padding:8px!important;flex:0 0 42px!important;
}
body .fred-atelier .fred-icon-button svg{display:block;width:24px;height:24px;pointer-events:none}
body .fred-atelier .fred-icon-button::after{
 content:attr(data-tooltip);position:absolute;z-index:20;bottom:calc(100% + 9px);left:50%;transform:translateX(-50%);
 background:var(--fred-ink);color:#fff;border:1px solid var(--fred-ink);border-radius:6px;
 padding:7px 10px;font-family:"Bricolage Grotesque",Arial,sans-serif;font-size:12px;font-weight:600;line-height:1.2;
 white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s;
}
body .fred-atelier .fred-icon-button:hover::after,body .fred-atelier .fred-icon-button:focus-visible::after{opacity:1;visibility:visible}
body .fred-atelier .fred-tools .fred-icon-button:first-child::after{left:0;transform:none}
body .fred-atelier .fred-shortcuts{font-size:12px!important;line-height:1.5!important;margin:8px 0}
@media(max-width:480px){body .fred-atelier .fred-icon-button{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important;padding:7px!important}body .fred-atelier .fred-icon-button svg{width:22px;height:22px}}

/* Fullscreen drawing workspace, including a window-filling fallback for iPhone. */
.fred-screen-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:8px 0}
.fred-screen-hint{margin-right:auto}
body .fred-atelier .fred-fullscreen-upload{display:none}
body .fred-atelier.fred-fullscreen .fred-fullscreen-upload{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.fred-fullscreen-upload svg{width:20px;height:20px}
body .fred-atelier.fred-fullscreen>.fred-status{flex-shrink:0;min-height:0;max-height:42px;overflow:auto;font-size:12px;line-height:1.3}
body .fred-atelier.fred-fullscreen>.fred-status:empty{display:none}
.fred-screen-hint{font-size:12px}
body .fred-atelier .fred-fullscreen-toggle{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.fred-fullscreen-toggle svg{width:20px;height:20px}
body .fred-atelier.fred-fullscreen{
 position:fixed!important;inset:0!important;bottom:auto!important;z-index:2147483647!important;
 width:100%!important;height:100dvh;max-width:none!important;margin:0!important;
 padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 display:flex!important;flex-direction:column;gap:6px;overflow:hidden;background:var(--fred-paper)!important;
}
body .fred-atelier.fred-fullscreen>.fred-intro,
body .fred-atelier.fred-fullscreen>.fred-background,
body .fred-atelier.fred-fullscreen>.fred-form,
body .fred-atelier.fred-fullscreen>.fred-shortcuts{display:none!important}
body .fred-atelier.fred-fullscreen>.fred-screen-bar,
body .fred-atelier.fred-fullscreen>.fred-tools,
body .fred-atelier.fred-fullscreen>.fred-options,
body .fred-atelier.fred-fullscreen>.fred-actions{flex-shrink:0;margin:0!important}
body .fred-atelier.fred-fullscreen>.fred-tools,
body .fred-atelier.fred-fullscreen>.fred-options{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:3px 2px 5px;gap:8px}
body .fred-atelier.fred-fullscreen>.fred-options>*,body .fred-atelier.fred-fullscreen .fred-swatches{flex-shrink:0}
body .fred-atelier.fred-fullscreen .fred-swatches{flex-wrap:nowrap;max-width:none}
body .fred-atelier.fred-fullscreen>.fred-canvas-wrap{flex:1 1 0;min-height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#deddd6}
body .fred-atelier.fred-fullscreen canvas{flex:none;max-width:none!important;max-height:none!important;background:#fff}
body .fred-atelier.fred-fullscreen>.fred-text-panel{flex:0 1 auto;max-height:35%;overflow:auto;min-height:0;margin:0;padding:8px}
body .fred-atelier.fred-fullscreen .fred-text-panel h3,body .fred-atelier.fred-fullscreen .fred-text-panel>p{display:none}
body .fred-atelier.fred-fullscreen .fred-text-panel textarea{min-height:50px}
body .fred-atelier.fred-fullscreen .fred-text-options{gap:8px;margin-top:6px}
body .fred-atelier.fred-fullscreen .fred-text-panel .fred-actions{margin:6px 0}
body .fred-atelier.fred-fullscreen .fred-icon-button::after{display:none}
@media(max-height:500px){
 body .fred-atelier.fred-fullscreen{gap:3px}
 body .fred-atelier.fred-fullscreen .fred-fullscreen-toggle{padding:4px 9px!important;font-size:12px!important}
 body .fred-atelier.fred-fullscreen .fred-icon-button{width:34px!important;height:34px!important;min-width:34px!important;flex-basis:34px!important;padding:5px!important}
 body .fred-atelier.fred-fullscreen .fred-options label{font-size:12px}
 body .fred-atelier.fred-fullscreen .fred-options input[type=color]{height:28px}
}
@media(orientation:landscape) and (max-height:600px){
 body .fred-atelier.fred-fullscreen{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto minmax(0,1fr) auto;align-items:stretch}
 body .fred-atelier.fred-fullscreen>.fred-screen-bar{grid-row:1;grid-column:2}
 body .fred-atelier.fred-fullscreen .fred-screen-hint{display:none}
 body .fred-atelier.fred-fullscreen>.fred-tools{grid-row:1;grid-column:1;min-width:0}
 body .fred-atelier.fred-fullscreen>.fred-options{grid-row:2;grid-column:1;min-width:0}
 body .fred-atelier.fred-fullscreen>.fred-actions{grid-row:2;grid-column:2;gap:5px;flex-wrap:nowrap}
 body .fred-atelier.fred-fullscreen>.fred-text-panel{grid-row:3;grid-column:1 / -1;max-height:30dvh}
 body .fred-atelier.fred-fullscreen>.fred-canvas-wrap{grid-row:4;grid-column:1 / -1}
 body .fred-atelier.fred-fullscreen>.fred-status{grid-row:5;grid-column:1 / -1}
 body .fred-atelier.fred-fullscreen .fred-fullscreen-upload{padding:4px 7px!important;font-size:12px!important}
}

/* One import entry point, with explanation and explicit consent in a dialog. */
body .fred-atelier .fred-fullscreen-upload{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
body .fred-atelier .fred-background{justify-content:flex-end;background:transparent;border:0;padding:0;margin:8px 0;gap:12px}
body .fred-atelier .fred-import-dialog{
 width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;
 margin:auto;padding:clamp(18px,4vw,28px);color:var(--fred-ink);background:var(--fred-paper);
 border:var(--fred-border,3px solid #20211f);border-radius:var(--fred-radius,8px);box-shadow:6px 6px 0 var(--fred-ink);
 font-family:"Source Serif 4",Georgia,serif;
}
.fred-import-dialog::backdrop{background:rgba(32,33,31,.65)}
.fred-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body .fred-atelier .fred-dialog-heading h3{margin:0;font-size:27px!important}
body .fred-atelier .fred-import-close{padding:2px 9px!important;line-height:1;font-size:26px!important;flex-shrink:0}
body .fred-atelier .fred-import-dialog p{margin:16px 0;font-size:16px!important}
body .fred-atelier .fred-import-dialog .fred-small{font-size:13px!important}
.fred-import-warning{font-weight:700}
.fred-import-consent-label{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.5}
.fred-import-consent-label input{flex-shrink:0;width:20px;height:20px;margin-top:2px;accent-color:var(--fred-ink)}
.fred-dialog-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
body .fred-atelier .fred-import-choose{background:var(--fred-accent)!important}

/* Editable text stays at the canvas coordinates in regular and fullscreen modes. */
.fred-canvas-wrap{position:relative}
body .fred-atelier .fred-text-source{display:none}
.fred-inline-editor{position:absolute;z-index:5;border:1px dashed #4169ff;background:transparent}
body .fred-atelier .fred-inline-text{
 display:block;width:100%;max-width:none!important;min-height:0;margin:0!important;padding:0!important;
 border:0!important;border-radius:0!important;resize:none;overflow:auto;background:transparent!important;
 box-shadow:none!important;outline-offset:2px;white-space:pre;line-height:1.2!important;
}
.fred-inline-handles{display:flex;gap:4px;position:absolute;bottom:100%;left:0;margin-bottom:3px}
body .fred-atelier .fred-inline-handles button{padding:2px 7px!important;min-width:30px;height:30px;font-size:18px!important}
.fred-text-drag{touch-action:none;cursor:move}
body .fred-atelier .fred-spacing-dialog{
 width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;margin:auto;
 padding:24px;color:var(--fred-ink);background:var(--fred-paper);border:var(--fred-border,3px solid #20211f);
 border-radius:var(--fred-radius,8px);box-shadow:6px 6px 0 var(--fred-ink);
}
.fred-spacing-dialog::backdrop{background:rgba(32,33,31,.65)}
.fred-spacing-size{width:85px}
body .fred-atelier .fred-screen-bar{flex-wrap:wrap}
body .fred-atelier .fred-memeify{background:var(--fred-accent)!important}
body .fred-atelier.fred-fullscreen>.fred-screen-bar{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;min-width:0;padding:3px 2px 5px}
body .fred-atelier.fred-fullscreen>.fred-screen-bar>*{flex-shrink:0}
body .fred-atelier.fred-fullscreen .fred-screen-hint{display:none}
body .fred-atelier.fred-fullscreen .fred-screen-bar button{padding:5px 8px!important;font-size:12px!important}
@media(max-width:600px){.fred-screen-hint{display:none}body .fred-atelier .fred-screen-bar{justify-content:flex-start;gap:8px}body .fred-atelier .fred-screen-bar button{font-size:12px!important;padding:7px 9px!important}}
@media(orientation:landscape) and (max-height:600px){
 body .fred-atelier.fred-fullscreen{grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
 body .fred-atelier.fred-fullscreen>.fred-screen-bar{grid-row:1;grid-column:1 / -1;justify-content:flex-end}
 body .fred-atelier.fred-fullscreen>.fred-tools{grid-row:2;grid-column:1 / -1}
 body .fred-atelier.fred-fullscreen>.fred-options{grid-row:3;grid-column:1}
 body .fred-atelier.fred-fullscreen>.fred-actions{grid-row:3;grid-column:2}
 body .fred-atelier.fred-fullscreen>.fred-text-panel{grid-row:4}
 body .fred-atelier.fred-fullscreen>.fred-canvas-wrap{grid-row:5}
 body .fred-atelier.fred-fullscreen>.fred-status{grid-row:6}
}

/* Local image cropper, styled like the import dialog. */
body .fred-atelier .fred-crop-dialog{
 width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;margin:auto;
 padding:clamp(14px,3vw,24px);color:var(--fred-ink);background:var(--fred-paper);
 border:var(--fred-border,3px solid #20211f);border-radius:var(--fred-radius,8px);box-shadow:6px 6px 0 var(--fred-ink);
}
.fred-crop-dialog::backdrop{background:rgba(32,33,31,.65)}
.fred-crop-preview-wrap{display:flex;align-items:center;justify-content:center;background:#20211f;border:2px solid var(--fred-ink);overflow:hidden}
body .fred-atelier .fred-crop-preview{width:auto;height:auto;max-width:100%!important;touch-action:none;cursor:crosshair}
.fred-crop-fields{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
.fred-crop-fields label{display:flex;align-items:center;gap:5px;font-size:13px}
.fred-crop-fields input{width:78px;padding:6px;background:#fff;color:#20211f;border:1px solid #20211f;border-radius:5px}
body .fred-atelier .fred-crop-apply{background:var(--fred-accent)!important}
body .fred-atelier .fred-crop-cancel{padding:2px 9px!important;font-size:24px!important;line-height:1}

/* Text settings float over the workspace rather than shifting the page. */
body .fred-atelier .fred-text-panel,body .fred-atelier.fred-fullscreen>.fred-text-panel{
 position:fixed!important;z-index:25;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));
 width:min(410px,calc(100vw - 24px));max-height:35dvh!important;overflow:auto;min-height:0;margin:0!important;padding:14px!important;
 box-shadow:5px 5px 0 var(--fred-ink);background:var(--fred-paper);
}
body .fred-atelier.fred-fullscreen .fred-text-panel h3{display:block!important}
body .fred-atelier .fred-text-panel .fred-dialog-heading h3{font-size:20px!important}
body .fred-atelier .fred-text-panel-close{padding:2px 8px!important;font-size:23px!important;line-height:1}
body .fred-atelier .fred-text-panel .fred-text-options{gap:8px;margin-top:8px}
body .fred-atelier .fred-text-panel .fred-actions{margin:10px 0 0}
.fred-transform-box{position:absolute;z-index:4;border:1px dashed #4169ff;pointer-events:none}
body .fred-atelier .fred-shape-resize,body .fred-atelier .fred-text-resize{
 position:absolute;right:0;bottom:0;z-index:6;width:27px;height:27px;padding:0!important;
 font-size:21px!important;line-height:1;cursor:nwse-resize;touch-action:none;pointer-events:auto;
}
.fred-text-resize{transform:translate(40%,40%)}
@media(max-height:500px){body .fred-atelier .fred-text-panel,body .fred-atelier.fred-fullscreen>.fred-text-panel{max-height:43dvh!important;width:min(340px,calc(100vw - 24px))}}

/* Constrain all flex/grid children; site styles must not impose desktop field widths. */
body .fred-atelier{width:100%;min-width:0;max-width:1100px}
body .fred-atelier>*,body .fred-atelier .fred-form>*,body .fred-atelier label{min-width:0;max-width:100%}
body .fred-atelier .fred-form input:not([type=checkbox]),body .fred-atelier .fred-form input[type=text]{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
body .fred-atelier h2,body .fred-atelier h3,body .fred-atelier p,body .fred-atelier label{overflow-wrap:anywhere;white-space:normal}
body .fred-atelier .fred-captcha{width:100%;min-width:0;max-width:100%;overflow:hidden}
body .fred-atelier .fred-options{min-width:0}
body .fred-atelier .fred-options input[type=range]{width:88px;min-width:0}
.fred-margin-list{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
body .fred-atelier .fred-margin-list button{font-size:12px!important;padding:6px 9px!important}
.fred-wheel{position:fixed;z-index:45;width:220px;height:220px;border-radius:50%;background:var(--fred-paper);border:3px solid var(--fred-ink);box-shadow:5px 5px 0 var(--fred-ink)}
body .fred-atelier .fred-wheel{transform:translate(-50%,-50%);max-width:none}
body .fred-atelier .fred-wheel-tool{position:absolute;width:36px;height:36px;padding:5px!important;border-radius:50%!important;display:flex;align-items:center;justify-content:center}
.fred-wheel-tool svg{width:22px;height:22px;pointer-events:none}
body .fred-atelier .fred-wheel-close{position:absolute;left:88px;top:88px;width:40px;height:40px;padding:0!important;border-radius:50%!important;font-size:24px!important}
body .fred-atelier .fred-tablet-label{white-space:nowrap}
@media(max-width:600px){
 body .fred-atelier{padding:12px!important;margin:12px auto;border-width:2px!important;box-shadow:3px 3px 0 var(--fred-ink)}
 body .fred-atelier .fred-form{margin-top:18px;padding-top:14px;gap:12px}
 body .fred-atelier .fred-form h3{font-size:21px!important}
 body .fred-atelier .fred-intro h2{font-size:28px!important}
 body .fred-atelier .fred-tools{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;margin:12px 0;padding:3px 2px 6px}
 body .fred-atelier .fred-options{gap:9px;margin:12px 0}
 body .fred-atelier .fred-form input:not([type=checkbox]){font-size:16px!important}
 body .fred-atelier .fred-background{flex-wrap:wrap;justify-content:space-between}
 body .fred-atelier .fred-text-panel{right:8px;bottom:8px;width:calc(100vw - 16px);max-height:32dvh!important;padding:10px!important}
}
body .fred-atelier{box-sizing:border-box!important}
body .fred-atelier input,body .fred-atelier textarea,body .fred-atelier select{min-width:0!important;max-width:100%!important}

/* Expanded wheel with the same color, stroke and opacity controls as the toolbar. */
body .fred-atelier .fred-wheel{width:244px;height:390px;max-height:calc(100dvh - 16px);overflow:auto;transform:none;border-radius:20px!important}
body .fred-atelier .fred-wheel-close{left:100px;top:88px}
.fred-wheel-settings{position:absolute;top:224px;left:10px;right:10px;display:grid;gap:12px;border-top:1px dashed var(--fred-ink);padding-top:12px}
body .fred-atelier .fred-wheel-settings label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
.fred-wheel-settings input[type=range]{width:95px;flex:1}
.fred-wheel-settings input[type=color]{width:44px;height:30px;padding:0}
.fred-wheel-settings output{min-width:38px;font-size:11px}
.fred-wheel-trigger-wrap{position:relative;display:inline-flex;flex-shrink:0}
#fred-wheel-tip{position:absolute;z-index:30;bottom:calc(100% + 8px);left:0;width:220px;max-width:calc(100vw - 32px);padding:8px 10px;border-radius:6px;background:#20211f;color:#fff;font-size:12px;line-height:1.4;visibility:hidden;opacity:0;pointer-events:none}
.fred-wheel-trigger-wrap:hover #fred-wheel-tip,.fred-wheel-trigger-wrap:focus #fred-wheel-tip,.fred-wheel-trigger-wrap:focus-within #fred-wheel-tip{visibility:visible;opacity:1}
body .fred-atelier #fred-wheel-tip{position:fixed;bottom:auto;visibility:hidden;opacity:0}
body .fred-atelier #fred-wheel-tip.fred-tip-open{visibility:visible;opacity:1}
body .fred-atelier .fred-magic-fx{position:absolute;pointer-events:none;z-index:3;max-width:none!important;max-height:none!important;background:transparent!important}
body .fred-atelier [data-tool=fairy]{background:linear-gradient(135deg,#f8cf48,#c6adff,#42d66b)!important}
.fred-tools-management{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}
body .fred-atelier .fred-tools-management button{padding:5px 9px!important;font-size:12px!important}
.fred-tools-order-hint{font-size:12px}
.fred-organizing [data-tool]{touch-action:none;cursor:grab}
.fred-tool-dragging{opacity:.35;pointer-events:none}
body .fred-atelier.fred-fullscreen .fred-tools-management{display:none}
/* Hold an icon to pick it up; the reset remains at the end of the tool row. */
body .fred-atelier .fred-tools [data-tool]{touch-action:none;-webkit-touch-callout:none;user-select:none}
body .fred-atelier .fred-tools.fred-organizing [data-tool]{animation:fred-tool-wiggle .18s ease-in-out infinite alternate}
body .fred-atelier .fred-tool-dragging{opacity:.3;animation:none!important}
body .fred-atelier .fred-tool-ghost{position:fixed;z-index:80;pointer-events:none;width:44px;height:44px;padding:8px!important;transform:translate(-50%,-65%) rotate(-7deg)!important;box-shadow:5px 5px 0 #20211f!important;background:#f8cf48!important}
.fred-tool-ghost svg{width:24px;height:24px}
@keyframes fred-tool-wiggle{from{rotate:-2deg}to{rotate:2deg}}
@media(prefers-reduced-motion:reduce){body .fred-atelier .fred-tools.fred-organizing [data-tool]{animation:none}}
body .fred-atelier .fred-tools-reset::after{left:auto;right:0;transform:none}
body .fred-atelier .fred-tools-reset::after{display:none}
.fred-reset-tip{position:fixed;z-index:65;width:220px;max-width:calc(100vw - 16px);padding:8px 10px;background:#20211f;color:#fff;border-radius:6px;font-family:"Bricolage Grotesque",Arial,sans-serif;font-size:12px;line-height:1.3;pointer-events:none}
body .fred-atelier .fred-settings-dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;margin:auto;padding:24px;background:var(--fred-paper);color:var(--fred-ink);border:var(--fred-border,3px solid #20211f);border-radius:var(--fred-radius,8px);box-shadow:6px 6px 0 var(--fred-ink)}
.fred-settings-dialog::backdrop{background:rgba(32,33,31,.65)}
.fred-settings-fields{display:grid;gap:18px;margin-top:20px}
.fred-settings-fields label{display:flex;align-items:center;gap:10px;line-height:1.4}
.fred-settings-fields input{width:20px;height:20px;flex-shrink:0;accent-color:#20211f}
body .fred-atelier .fred-settings-close{padding:2px 9px!important;font-size:24px!important;line-height:1}
body .fred-atelier.fred-grayscale-mode{--fred-green:#aaa;--fred-blue:#777;--fred-orange:#999;--fred-cream:#f4f4f4;--fred-paper:#f4f4f4;--fred-accent:#aaa}
body .fred-atelier.fred-grayscale-mode button,body .fred-atelier.fred-grayscale-mode input[type=color],body .fred-atelier.fred-grayscale-mode input[type=range],body .fred-atelier.fred-grayscale-mode .fred-magic-fx,body .fred-atelier.fred-grayscale-mode .fred-inline-text{filter:grayscale(1)}
body .fred-atelier.fred-fullscreen .fred-settings-toggle{width:34px!important;height:34px!important;min-width:34px!important;flex-basis:34px!important;padding:5px!important}
body .fred-atelier.fred-grayscale-mode .fred-inline-editor,body .fred-atelier.fred-grayscale-mode .fred-transform-box{border-color:#777}
body .fred-atelier.fred-grayscale-mode .fred-crop-preview{filter:grayscale(1)}
body .fred-atelier .fred-shape-magic-option{position:fixed;z-index:70;padding:6px 9px!important;font-size:12px!important;background:linear-gradient(135deg,#f8cf48,#c6adff,#42d66b)!important;box-shadow:3px 3px 0 var(--fred-ink);white-space:nowrap}
body .fred-atelier .fred-options select{max-width:120px;font-size:12px;padding:5px;background:#fff;color:#20211f;border:1px solid #20211f;border-radius:5px}
body .fred-atelier [data-magical=true]{background:linear-gradient(135deg,#f8cf48,#c6adff,#42d66b)!important;outline:2px solid #8e24aa;outline-offset:2px}
.fred-line-options{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 10px;border:1px dashed var(--fred-ink);border-radius:6px}
.fred-line-options strong{font-family:"Bricolage Grotesque",Arial,sans-serif;font-size:12px}
body .fred-atelier .fred-icon-button::after{bottom:calc(100% + 18px)}
body .fred-atelier .fred-shape-magic-option{min-width:150px}
body .fred-atelier [data-tool=rect]::after,body .fred-atelier [data-tool=ellipse]::after,body .fred-atelier [data-tool=line]::after{bottom:auto;top:calc(100% + 18px)}

.fred-spray-options{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px;border:1px dashed var(--fred-ink);border-radius:8px;max-width:100%}.fred-spray-options strong{font-size:13px}.fred-spray-options output{min-width:42px;white-space:nowrap}.fred-spray-options label{flex-wrap:wrap}@media(max-width:480px){.fred-spray-options{width:100%}.fred-spray-options strong{flex-basis:100%}.fred-spray-options label{width:100%;justify-content:space-between}.fred-spray-options input[type=range]{flex:1;min-width:60px;max-width:130px}}

.fred-corner-options{display:flex;flex-wrap:wrap;gap:12px;align-items:center;max-width:100%}.fred-corner-options select{font:inherit;max-width:100%;border:1px solid var(--fred-ink);border-radius:5px;padding:6px;background:#fff}.fred-corner-options output{white-space:nowrap}@media(max-width:480px){.fred-corner-options{width:100%}.fred-corner-options label{flex-wrap:wrap}}

.fred-comic-strip{display:flex;gap:14px;overflow-x:auto;max-width:100%;padding:8px 4px 18px;align-items:flex-start;overscroll-behavior-x:contain}.fred-comic-card{flex:0 0 min(560px,80vw);width:min(560px,80vw);border:2px solid var(--fred-ink);border-radius:8px;background:#fff;padding:8px}.fred-comic-card.is-active{border-color:#d16a00;box-shadow:3px 3px 0 var(--fred-accent)}.fred-comic-card>button{display:block;margin-bottom:8px}.fred-comic-card>.fred-canvas-wrap{width:100%}.fred-comic-add{flex:0 0 52px;margin-top:80px;font-size:28px!important}.fred-comic-preview{max-width:min(95vw,1100px);max-height:92vh;overflow:auto}.fred-comic-preview canvas{max-width:100%;height:auto}.fred-comic-dialog,.fred-bubble-dialog{background:var(--fred-paper);color:var(--fred-ink);border:2px solid var(--fred-ink);border-radius:12px;padding:22px;max-width:min(92vw,520px);max-height:90vh;overflow:auto}.fred-bubble-dialog label{display:block;margin:12px 0}.fred-bubble-dialog textarea{display:block;max-width:100%;width:100%}.fred-bubble-tip{position:absolute;z-index:6;transform:translate(-50%,-50%);border-radius:50%!important;width:32px;height:32px;padding:0!important;touch-action:none;color:#1e88e5!important;background:#fff!important}.fred-comic-mode.fred-fullscreen .fred-comic-strip{flex:1;min-height:120px}.fred-comic-mode.fred-fullscreen .fred-comic-card{flex-basis:min(640px,85vw)}

.fred-comic-card>canvas{touch-action:pan-x!important;cursor:pointer}.fred-comic-dialog select,.fred-bubble-dialog select,.fred-bubble-dialog input{max-width:100%;font:inherit}.fred-comic-preview::backdrop,.fred-comic-dialog::backdrop,.fred-bubble-dialog::backdrop{background:rgba(35,35,35,.45)}

.fred-comic-dialog label{display:block;margin:12px 0}.fred-comic-dialog input{display:block;width:100%;min-width:0!important;max-width:100%}

/* BD: violet du menu mobile, distinct du jaune des memes. */
body .fred-atelier .fred-comic-open{background:#c6adff!important;color:#20211f!important;font-weight:700}
body .fred-atelier .fred-comic-open:hover{background:#d3bfff!important}

body .fred-atelier :is(.fred-comic-open,.fred-comic-preview-open,.fred-comic-create,.fred-comic-cancel,.fred-comic-preview-close,.fred-comic-add,.fred-bubble-open,.fred-bubble-done,.fred-bubble-invert,.fred-comic-card>button){background:#c6adff!important;color:#20211f!important}
body .fred-atelier :is(.fred-comic-open,.fred-comic-preview-open,.fred-comic-create,.fred-comic-cancel,.fred-comic-preview-close,.fred-comic-add,.fred-bubble-open,.fred-bubble-done,.fred-bubble-invert,.fred-comic-card>button):hover{background:#d3bfff!important}
body .fred-atelier :is(.fred-new-canvas,.fred-new-canvas-confirm){background:var(--fred-green,#42d66b)!important;color:#20211f!important;font-weight:700}
body .fred-atelier :is(.fred-new-canvas,.fred-new-canvas-confirm):hover{filter:brightness(1.05)}
.fred-new-canvas-dialog{background:var(--fred-paper);color:var(--fred-ink);border:2px solid var(--fred-ink);border-radius:12px;padding:22px;max-width:min(92vw,520px);max-height:90vh;overflow:auto}
.fred-new-canvas-dialog::backdrop{background:rgba(35,35,35,.45)}

.fred-inline-editor.is-bubble-text .fred-text-drag,.fred-inline-editor.is-bubble-text .fred-text-resize{display:none}
.fred-inline-editor.is-bubble-text .fred-inline-text{white-space:pre-wrap!important;overflow-wrap:break-word;resize:none}
body .fred-atelier .fred-bubble-edit-text{background:#c6adff!important;color:#20211f!important}

.fred-bubble-actions{position:absolute;z-index:8;display:flex;flex-direction:column;gap:5px;max-width:calc(100% - 8px)}
.fred-bubble-actions[hidden]{display:none!important}
body .fred-atelier .fred-bubble-actions button{background:#c6adff!important;color:#20211f!important;font-size:12px;padding:6px 8px;min-height:34px}

/* Les poignées gardent la même géométrie malgré les effets du thème. */
body .fred-atelier .fred-bubble-tip,
body .fred-atelier .fred-bubble-tip:hover,
body .fred-atelier .fred-bubble-tip:focus,
body .fred-atelier .fred-bubble-tip:active{transform:translate(-50%,-50%)!important;transition:none!important;animation:none!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:0!important;box-shadow:none!important;margin:0!important}
body .fred-atelier .fred-memeify,body .fred-atelier .fred-memeify:hover,body .fred-atelier .fred-memeify:focus{background:#f8cf48!important;color:#20211f!important}
body .fred-atelier .fred-new-canvas,body .fred-atelier .fred-new-canvas:hover,body .fred-atelier .fred-new-canvas:focus{background:#42d66b!important;color:#20211f!important}

.fred-shape-style-options,.fred-border-styles{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.fred-shape-style-options[hidden],.fred-bubble-type-menu[hidden]{display:none!important}
.fred-shape-style-options label{display:flex;gap:6px;align-items:center}
.fred-border-styles button{display:flex;flex-direction:column;align-items:center;font-size:11px!important;padding:5px!important}
.fred-bubble-type{position:absolute;right:35px;bottom:0;pointer-events:auto;z-index:7;font-size:12px!important;background:#c6adff!important}
.fred-bubble-type-menu{position:absolute;z-index:15;display:grid;grid-template-columns:repeat(2,1fr);gap:4px;padding:6px;background:#fffdf6;border:2px solid #232323;border-radius:7px;max-width:calc(100% - 8px)}
.fred-bubble-type-menu button{background:#c6adff!important;font-size:12px!important;padding:7px!important}

.fred-brush-choices,.fred-magic-brush-choices{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.fred-brush-choices[hidden],.fred-magic-brush-choices[hidden]{display:none!important}
.fred-brush-choices button,.fred-magic-brush-choices button{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px!important;padding:7px!important}
.fred-bubble-type-menu label{grid-column:1 / -1;font-size:12px}

body .fred-atelier .fred-solid-option{display:none!important}
.fred-fill-picker{display:flex;gap:6px;align-items:center}
.fred-controls-panel[hidden],.fred-controls-body[hidden],.fred-comic-management[hidden]{display:none!important}
body .fred-atelier .fred-controls-panel{position:fixed;z-index:90;width:min(300px,calc(100vw - 16px));max-height:60dvh;overflow:auto;background:var(--fred-paper);border:2px solid #232323;border-radius:8px;padding:8px;box-shadow:3px 3px 0 #232323}
body .fred-atelier .fred-controls-panel .fred-tools{flex-wrap:wrap!important;margin:8px 0!important;gap:5px;overflow:visible}
body .fred-atelier .fred-controls-panel .fred-options{flex-wrap:wrap!important;gap:8px;margin:8px 0}
body .fred-atelier .fred-controls-panel .fred-icon-button{width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px!important;padding:5px!important}
body .fred-atelier .fred-controls-panel .fred-swatches{flex-wrap:wrap!important;max-width:250px}
body .fred-atelier .fred-controls-panel :is(.fred-border-styles,.fred-brush-choices,.fred-magic-brush-choices){gap:4px}
body .fred-atelier .fred-controls-panel button{font-size:12px!important;padding:6px!important}
body .fred-atelier .fred-controls-panel label{font-size:12px}
body .fred-atelier .fred-controls-panel input[type=range]{width:100px}
body .fred-atelier .fred-magic-fx{pointer-events:none!important;touch-action:auto!important}
body .fred-atelier :is(.fred-magic-brush-choices,.fred-brush-choices,.fred-options,.fred-shape-style-options){touch-action:pan-y}
body .fred-atelier .fred-tools [data-tool]{touch-action:pan-y}
body .fred-atelier .fred-organizing [data-tool]{touch-action:none}
body .fred-atelier.fred-fullscreen{display:grid!important;grid-template-columns:210px minmax(0,1fr)!important;grid-template-rows:42px minmax(0,1fr) 40px!important;gap:5px!important}
body .fred-atelier.fred-fullscreen:not(.fred-controls-floating)>.fred-controls-panel{position:relative!important;grid-column:1!important;grid-row:1 / 4!important;left:auto!important;top:auto!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0;overflow-y:auto;box-shadow:none;padding:5px}
body .fred-atelier.fred-fullscreen>.fred-screen-bar{grid-column:2!important;grid-row:1!important;flex-wrap:nowrap!important;justify-content:flex-start!important;overflow:auto;min-width:0;max-height:42px}
body .fred-atelier.fred-fullscreen>.fred-actions{grid-column:2!important;grid-row:3!important;margin:0!important;flex-wrap:nowrap!important}
body .fred-atelier.fred-fullscreen>.fred-canvas-wrap,body .fred-atelier.fred-fullscreen>.fred-comic-strip{grid-column:2!important;grid-row:2!important;min-width:0;min-height:0;margin:0;padding:3px;overflow:auto}
body .fred-atelier.fred-fullscreen>.fred-status{display:none!important}
body .fred-atelier.fred-fullscreen .fred-screen-hint{display:none!important}
body .fred-atelier.fred-fullscreen .fred-comic-card{flex:0 0 min(500px,calc((100dvh - 145px)*1.6))!important;width:min(500px,calc((100dvh - 145px)*1.6))!important;padding:5px}
body .fred-atelier.fred-fullscreen .fred-comic-card>button{padding:4px 8px!important;margin-bottom:5px;font-size:12px}
body .fred-atelier.fred-fullscreen .fred-comic-strip{align-items:flex-start;overscroll-behavior:contain}
@media(orientation:portrait){body .fred-atelier.fred-fullscreen{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:40px minmax(0,1fr) 40px!important}
 body .fred-atelier.fred-fullscreen>.fred-screen-bar,body .fred-atelier.fred-fullscreen>.fred-actions,body .fred-atelier.fred-fullscreen>.fred-canvas-wrap,body .fred-atelier.fred-fullscreen>.fred-comic-strip{grid-column:1!important}
 body .fred-atelier.fred-fullscreen:not(.fred-controls-floating)>.fred-controls-panel{position:absolute!important;left:8px!important;top:48px!important;width:220px!important;max-height:calc(100dvh - 100px)!important;z-index:90}
}
.fred-shortcuts-dialog{max-width:min(520px,92vw);max-height:85dvh;overflow:auto;background:#fffdf6;border:2px solid #232323;padding:20px;border-radius:8px}
.fred-comic-management{display:grid;gap:10px;margin-top:14px}

body .fred-atelier .fred-controls-panel .fred-options label{white-space:nowrap;max-width:100%}
body .fred-atelier .fred-controls-panel :is(.fred-stroke-size,.fred-opacity-option){width:100%;display:flex}
body .fred-atelier .fred-controls-panel :is(.fred-stroke-size,.fred-opacity-option) input{flex:1;min-width:35px;width:70px}
body .fred-atelier.fred-fullscreen>.fred-screen-bar{padding-right:70px!important}
body .fred-atelier.fred-fullscreen .fred-fullscreen-toggle{position:fixed!important;right:max(8px,env(safe-area-inset-right))!important;top:max(7px,env(safe-area-inset-top))!important;z-index:95;background:#42d66b!important;padding:7px 9px!important}
/* 1.16: move/resize floating controls, shared action row, compact fill popup. */
body .fred-atelier .fred-bottom-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
body .fred-atelier .fred-bottom-bar .fred-background,body .fred-atelier .fred-bottom-bar>.fred-actions{margin:0!important;padding:0;gap:7px}
body .fred-atelier .fred-bottom-bar .fred-background{display:contents}
body .fred-atelier .fred-bottom-bar>.fred-actions{flex-wrap:nowrap;margin-left:auto!important}
body .fred-atelier.fred-fullscreen>.fred-bottom-bar{grid-column:2!important;grid-row:3!important;min-width:0;flex-wrap:nowrap;margin:0!important;overflow-x:auto;gap:8px}
body .fred-atelier.fred-fullscreen .fred-bottom-bar .fred-bg-remove{white-space:nowrap;font-size:12px!important;padding:5px 8px!important}
body .fred-atelier.fred-fullscreen .fred-bottom-bar .fred-dimensions{display:none}
body .fred-atelier .fred-controls-panel{overflow:hidden!important;display:flex;flex-direction:column;min-height:0}
body .fred-atelier .fred-controls-heading{display:flex;align-items:center;gap:6px;flex-shrink:0}
body .fred-atelier .fred-controls-body{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;padding-bottom:18px}
body .fred-atelier .fred-controls-drag,body .fred-atelier .fred-controls-resize{display:none;touch-action:none;user-select:none}
body .fred-atelier.fred-controls-floating .fred-controls-drag{display:block;cursor:move;font-size:20px!important;line-height:1!important}
body .fred-atelier.fred-controls-floating .fred-controls-resize{display:block;position:absolute;bottom:1px;right:1px;width:24px;height:24px;padding:0!important;cursor:nwse-resize;background:var(--fred-paper);z-index:1}
body .fred-atelier.fred-controls-floating>.fred-controls-panel{position:fixed!important;max-height:calc(100dvh - 16px)!important;box-shadow:3px 3px 0 #232323;padding:8px;z-index:90}
/* Coordinates stay inline; the docking rules must not override the floating geometry. */

body .fred-atelier.fred-fullscreen.fred-controls-floating{grid-template-columns:minmax(0,1fr)!important}
body .fred-atelier.fred-fullscreen.fred-controls-floating>:is(.fred-screen-bar,.fred-bottom-bar,.fred-canvas-wrap,.fred-comic-strip){grid-column:1!important}
body .fred-atelier .fred-settings-buttons{display:grid;gap:9px;margin-top:10px;padding-top:14px;border-top:1px solid #bcb7a9}
body .fred-atelier .fred-shortcuts-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
body .fred-atelier .fred-shortcuts-list table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.5}
body .fred-atelier .fred-shortcuts-list caption{text-align:left;font-weight:bold;padding:8px 0}
body .fred-atelier .fred-shortcuts-list :is(th,td){text-align:left;vertical-align:top;padding:9px 8px;border-bottom:1px solid #d5cdbd;overflow-wrap:normal;word-break:normal}
body .fred-atelier .fred-shortcuts-list th{width:40%;font-weight:700}
body .fred-atelier .fred-comic-metadata{display:grid;gap:10px;margin-bottom:14px}
body .fred-atelier .fred-comic-metadata label{display:grid;gap:5px}
body .fred-atelier .fred-comic-metadata input{width:100%;min-width:0}
body .fred-atelier .fred-fill-open{width:36px;height:30px;padding:2px!important;background:var(--fill-color,#fff)!important;border:1px solid #555;box-shadow:inset 0 0 0 3px white}
body .fred-atelier .fred-fill-open.is-transparent{background:repeating-conic-gradient(#ddd 0% 25%,#fff 0% 50%) 50% / 12px 12px!important}
body .fred-atelier .fred-fill-dialog{position:fixed;margin:0;width:250px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;background:var(--fred-paper);border:2px solid #232323;border-radius:8px;padding:12px;box-shadow:3px 3px 0 #232323}
body .fred-atelier .fred-fill-dialog::backdrop{background:transparent}
body .fred-atelier .fred-fill-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
body .fred-atelier .fred-fill-heading button{padding:1px 7px!important}
body .fred-atelier .fred-fill-swatches{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
body .fred-atelier .fred-fill-swatches button{width:27px;height:27px;padding:0!important}
body .fred-atelier .fred-fill-dialog label{display:flex;align-items:center;justify-content:space-between;font-size:12px;gap:6px}
body .fred-atelier .fred-fill-dialog input[type=color]{width:38px;min-width:0;height:30px;padding:1px}
body .fred-atelier .fred-fill-dialog .fred-fill-transparent{font-size:12px!important;padding:4px 8px!important;margin-top:10px;font-weight:400}
@media(orientation:portrait){body .fred-atelier.fred-fullscreen>.fred-bottom-bar{grid-column:1!important}}
@media(max-width:480px){body .fred-atelier .fred-bottom-bar{gap:6px;flex-wrap:nowrap}body .fred-atelier .fred-bottom-bar .fred-dimensions{display:none}body .fred-atelier .fred-bottom-bar .fred-bg-remove{padding:7px!important;font-size:12px!important}body .fred-atelier .fred-bottom-bar .fred-icon-button{width:32px!important;height:32px!important;min-width:32px!important;padding:4px!important}}
body .fred-atelier:not(.fred-fullscreen) .fred-screen-hint{display:block;flex-basis:100%;order:20;margin:3px 0 0;font-size:12px;line-height:1.5}
/* 1.17: compact, touch-safe color selection. */
body .fred-atelier .fred-color-dialog{position:fixed;margin:0;padding:12px;width:248px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;border:2px solid #232323;border-radius:8px;background:#fffdf6;color:#232323;box-shadow:3px 3px 0 #232323;font:14px/1.4 system-ui,sans-serif}
body .fred-atelier .fred-color-dialog::backdrop{background:#0002}
body .fred-atelier .fred-color-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
body .fred-atelier .fred-color-close{padding:0 7px!important;font-size:20px!important}
body .fred-atelier .fred-color-spectrum{position:relative;width:100%;height:145px;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent),hsl(var(--hue) 100% 50%);border:1px solid #555;touch-action:none;cursor:crosshair;overflow:hidden}
body .fred-atelier .fred-color-marker{position:absolute;width:12px;height:12px;border:2px solid #fff;box-shadow:0 0 0 1px #232323;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
body .fred-atelier .fred-color-dialog label{display:flex;align-items:center;gap:8px;white-space:nowrap;margin-top:9px;font:13px/1.4 system-ui,sans-serif;color:#232323}
body .fred-atelier .fred-color-hue{flex:1;width:145px;min-width:0;max-width:100%;height:22px;padding:0;accent-color:#555}
body .fred-atelier .fred-color-dialog .fred-color-hex{width:105px!important;min-width:0!important;max-width:100%;font:16px monospace!important;padding:4px!important;background:white!important;color:#232323!important;border:1px solid #777!important}
body .fred-atelier .fred-color-preview{width:24px;height:24px;border:1px solid #555;border-radius:3px;flex-shrink:0}
body .fred-atelier .fred-color-dialog .fred-color-transparent-label{font-size:12px;margin-top:10px}
body .fred-atelier .fred-color-dialog .fred-color-transparent{width:14px!important;height:14px!important;min-width:14px!important;margin:0;accent-color:#555}
body .fred-atelier .fred-color-transparent-label[hidden]{display:none!important}
body .fred-atelier .fred-wheel{z-index:120;isolation:isolate}
body .fred-atelier .fred-wheel-drag{position:absolute;top:91px;left:40px;width:62px;height:35px;padding:2px!important;font-size:10px!important;touch-action:none;cursor:move}
body .fred-atelier .fred-wheel-close{left:124px}
/* Disabling floating always restores the original, visible top toolbar. */
body .fred-atelier .fred-controls-home{display:block;min-width:0}
body .fred-atelier.fred-fullscreen{display:flex!important;flex-direction:column!important;gap:4px!important}
body .fred-atelier.fred-fullscreen>.fred-controls-home{display:contents}
body .fred-atelier.fred-fullscreen .fred-controls-home>.fred-tools{order:1;flex-shrink:0;display:flex;flex-wrap:nowrap!important;overflow:auto;max-height:45px;margin:0!important;gap:5px}
body .fred-atelier.fred-fullscreen .fred-controls-home>.fred-options{order:2;flex-shrink:0;flex-wrap:nowrap!important;overflow:auto;margin:0!important;padding:3px;max-height:65px}
body .fred-atelier.fred-fullscreen .fred-controls-home>.fred-options>*{flex-shrink:0}
body .fred-atelier.fred-fullscreen .fred-controls-home>:is(.fred-shape-style-options,.fred-brush-choices,.fred-magic-brush-choices){order:3;flex-shrink:0;max-height:70px;overflow:auto;flex-wrap:nowrap!important;margin:0!important}
body .fred-atelier.fred-fullscreen>.fred-screen-bar{order:0;flex-shrink:0;max-height:42px}
body .fred-atelier.fred-fullscreen>:is(.fred-canvas-wrap,.fred-comic-strip){order:5;flex:1 1 0!important;min-height:60px}
body .fred-atelier.fred-fullscreen>.fred-bottom-bar{order:6;flex-shrink:0;min-height:34px}
body .fred-atelier.fred-fullscreen.fred-controls-floating .fred-controls-home{display:none}
body .fred-atelier .fred-controls-home [hidden]{display:none!important}
body .fred-atelier .fred-layers-panel{position:fixed;right:12px;top:70px;z-index:105;width:300px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 90px);overflow:auto;padding:14px;background:#fffdf6;color:#232323;border:2px solid #232323;border-radius:10px;box-shadow:3px 3px 0 #232323;font:14px/1.4 system-ui,sans-serif}
body .fred-atelier .fred-layers-panel[hidden]{display:none!important}
body .fred-atelier .fred-layers-panel h3{font-size:18px;margin:0}
body .fred-atelier .fred-layers-info{font-size:12px;margin:8px 0}
body .fred-atelier .fred-layers-list{display:grid;gap:5px;max-height:36dvh;overflow:auto;margin-bottom:10px}
body .fred-atelier .fred-layer-row{display:flex;gap:5px}
body .fred-atelier .fred-layer-row button{padding:6px!important;font-size:13px!important;min-width:32px}
body .fred-atelier .fred-layer-select{flex:1;text-align:left;overflow-wrap:anywhere}
body .fred-atelier .fred-layers-panel label{display:flex;align-items:center;gap:7px;margin:9px 0;font-size:13px}
body .fred-atelier .fred-layer-name{width:100%;min-width:0!important;padding:5px!important}
body .fred-atelier .fred-layer-opacity{width:125px;min-width:0}
body .fred-atelier .fred-layer-actions{display:flex;flex-wrap:wrap;gap:5px}
body .fred-atelier .fred-layer-actions button{padding:6px!important;font-size:12px!important}
body .fred-atelier .fred-resize-dialog{max-width:min(500px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:auto;background:#fffdf6;color:#232323;border:2px solid #232323;border-radius:10px;padding:18px}
body .fred-atelier .fred-resize-fields{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}
body .fred-atelier .fred-resize-fields label{display:grid;gap:4px;flex:1}
body .fred-atelier .fred-resize-fields input{width:100%;min-width:0!important;max-width:150px;font-size:16px!important}
body .fred-atelier .fred-resize-behavior{max-width:100%;font-size:14px;white-space:normal}
body .fred-atelier :is(.fred-limit-note,.fred-margin-status,.fred-resize-info){font-size:13px;line-height:1.5}
body .fred-atelier .fred-limit-warning{background:#fff0d2;color:#7b3100;border-left:4px solid #b34700;padding:9px;font-weight:600}

/* 1.18: explicit swatch sizing survives theme button/input rules. */
body .fred-atelier .fred-fill-open,body .fred-atelier .fred-border-color{box-sizing:border-box!important;display:inline-block!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:30px!important;min-height:30px!important;flex:0 0 36px!important;padding:2px!important;border:1px solid #555!important;border-radius:0!important;box-shadow:inset 0 0 0 3px white!important}
body .fred-atelier .fred-fill-picker{display:flex;align-items:center;gap:8px;flex-shrink:0}
body .fred-atelier .fred-canvas-functions summary,body .fred-atelier .fred-controls-project>summary{cursor:pointer;padding:8px;font:600 13px system-ui;border:1px solid #555;border-radius:6px;background:white;color:#232323}
body .fred-atelier .fred-canvas-functions-body{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0}
body .fred-atelier .fred-screen-bar>.fred-canvas-functions{position:relative}
body .fred-atelier:not(.fred-controls-floating) .fred-canvas-functions[open] .fred-canvas-functions-body{position:fixed;z-index:130;width:240px;max-height:calc(100dvh - 16px);overflow:auto;padding:10px;background:#fffdf6;border:2px solid #232323;border-radius:8px;box-shadow:3px 3px 0 #232323}
body .fred-atelier .fred-controls-body{display:flex;flex-direction:column;gap:10px}
body .fred-atelier .fred-controls-body .fred-controls-project,body .fred-atelier .fred-controls-body .fred-canvas-functions{width:100%}
body .fred-atelier .fred-controls-body .fred-screen-bar{display:flex;flex-wrap:wrap!important;margin:8px 0;padding:0!important;max-height:none!important;overflow:visible!important}
body .fred-atelier .fred-controls-body .fred-screen-hint{display:none}
body .fred-atelier .fred-controls-tools[hidden]{display:none!important}
body .fred-atelier .fred-resize-presets{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
body .fred-atelier .fred-roulette-help{font:13px/1.4 system-ui;margin:0 0 8px;padding-left:24px}
body .fred-atelier .fred-wheel{height:430px!important}
body .fred-atelier .fred-wheel-tool{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:3px!important;border-radius:50%!important;box-sizing:border-box!important}
body .fred-atelier .fred-wheel-drag{top:8px!important;left:8px!important;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:3px!important;cursor:move;touch-action:none;font-size:20px!important;line-height:1!important;border-radius:6px!important}
body .fred-atelier .fred-wheel-close{top:8px!important;left:auto!important;right:8px!important;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;border-radius:6px!important}
body .fred-atelier .fred-wheel-settings{top:260px!important}
/* 1.19: shared Fred buttons, compact mobile controls, independent floating groups. */
body .fred-atelier .fred-canvas-functions>summary,
body .fred-atelier .fred-controls-project>summary,
body .fred-atelier .fred-mobile-settings>summary,
body .fred-atelier .fred-controls-collapse{box-sizing:border-box;list-style:none;appearance:none;display:block;border:2px solid #232323!important;border-radius:8px!important;box-shadow:3px 3px 0 #232323;padding:10px 13px!important;font:700 14px/1.3 system-ui,sans-serif!important;cursor:pointer;color:#232323!important;white-space:nowrap}
body .fred-atelier summary::-webkit-details-marker{display:none}
body .fred-atelier .fred-canvas-functions>summary{background:#c6adff!important}
body .fred-atelier .fred-controls-project>summary{background:#f8cf48!important}
body .fred-atelier .fred-controls-collapse{background:#42d66b!important;width:100%;text-align:left;flex-shrink:0}
body .fred-atelier :is(.fred-canvas-functions,.fred-controls-project,.fred-mobile-settings)>summary::after{content:' ▸';float:right;margin-left:10px}
body .fred-atelier :is(.fred-canvas-functions,.fred-controls-project,.fred-mobile-settings)[open]>summary::after{content:' ▾'}
body .fred-atelier .fred-controls-heading{gap:8px;margin-bottom:10px;min-height:40px}
body .fred-atelier .fred-controls-heading .fred-fullscreen-toggle{position:static!important;inset:auto!important;padding:7px!important;font-size:12px!important;white-space:nowrap}
body .fred-atelier .fred-controls-heading .fred-settings-toggle{width:36px!important;min-width:36px!important;height:36px!important;padding:5px!important}
body .fred-atelier .fred-controls-body{gap:9px}
body .fred-atelier .fred-controls-project>summary,body .fred-atelier .fred-controls-body>.fred-canvas-functions>summary{width:100%}
body .fred-atelier .fred-controls-body>.fred-controls-tools{flex-shrink:0}
body .fred-atelier .fred-controls-project{flex-shrink:0}
body .fred-atelier .fred-controls-tools .fred-tools{margin:3px 0 9px!important}
body .fred-atelier .fred-wheel-magic{position:absolute;z-index:4;width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;border-radius:50%!important;border:2px solid #232323!important;background:linear-gradient(135deg,#f8cf48,#c6adff,#42d66b)!important;box-shadow:2px 2px 0 #232323!important;font-size:20px!important;line-height:1!important;touch-action:manipulation}
body .fred-atelier .fred-wheel-magic[hidden]{display:none!important}
body .fred-atelier .fred-mobile-settings[hidden]{display:none!important}
body .fred-atelier .fred-mobile-settings>summary{background:#c6adff!important}
body .fred-atelier .fred-mobile-settings-body{position:fixed;z-index:130;background:var(--fred-paper);border:2px solid #232323;border-radius:10px;box-shadow:3px 3px 0 #232323;width:320px;max-width:calc(100vw - 16px);max-height:45dvh;overflow:auto;padding:12px;overscroll-behavior:contain}
@media(max-width:600px),(max-height:500px){
 body .fred-atelier:not(.fred-controls-floating) .fred-controls-home>.fred-tools{flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;max-height:48px!important;margin:6px 0!important;gap:6px;padding-bottom:4px}
 body .fred-atelier:not(.fred-controls-floating) .fred-controls-home>.fred-tools button{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;flex:0 0 38px!important;padding:5px!important}
 body .fred-atelier:not(.fred-controls-floating) .fred-mobile-settings{margin:6px 0;order:2;flex-shrink:0}
 body .fred-atelier:not(.fred-controls-floating) .fred-mobile-settings>summary{padding:7px 10px!important;font-size:12px!important;width:max-content}
 body .fred-atelier .fred-mobile-settings-body :is(.fred-options,.fred-shape-style-options,.fred-brush-choices,.fred-magic-brush-choices){flex-wrap:wrap!important;max-height:none!important;overflow:visible!important;margin:6px 0!important}
 body .fred-atelier .fred-mobile-settings-body .fred-options label{max-width:100%;white-space:normal}
 body .fred-atelier .fred-mobile-settings-body .fred-border-styles{gap:6px;flex-wrap:wrap}
 body .fred-atelier .fred-mobile-settings-body .fred-border-styles button{padding:5px!important;min-width:65px;flex:0 0 auto}
 body .fred-atelier:not(.fred-controls-floating)>.fred-screen-bar{margin:8px 0;gap:6px;justify-content:flex-start}
 body .fred-atelier:not(.fred-controls-floating)>.fred-screen-bar button,body .fred-atelier:not(.fred-controls-floating)>.fred-screen-bar summary{padding:7px 8px!important;font-size:12px!important}
 body .fred-atelier:not(.fred-controls-floating) .fred-screen-hint{display:none!important}
 body .fred-atelier.fred-fullscreen:not(.fred-controls-floating)>.fred-screen-bar{max-height:44px!important;min-height:40px!important;padding-right:110px!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}
 body .fred-atelier.fred-fullscreen:not(.fred-controls-floating) .fred-mobile-settings{margin:0!important;max-height:36px}
 body .fred-atelier.fred-fullscreen:not(.fred-controls-floating)>.fred-canvas-wrap{flex:1 1 0!important;min-height:100px!important}
 body .fred-atelier.fred-fullscreen .fred-bottom-bar{max-height:42px;flex-shrink:0}
 body .fred-atelier.fred-fullscreen .fred-mobile-settings-body{max-height:45dvh}
}
body .fred-atelier .fred-controls-collapse::after{content:' ▾';float:right;margin-left:10px}
body .fred-atelier .fred-controls-collapse[aria-expanded=false]::after{content:' ▸'}
body .fred-atelier .fred-mobile-settings-body .fred-swatches{flex-wrap:wrap!important;max-width:100%!important;width:100%;overflow:visible!important}
/* 1.19.1: consistent section controls and uninterrupted action-color sequence. */
body .fred-atelier .fred-canvas-functions>summary{background:var(--fred-orange,#ff783f)!important}
body .fred-atelier :is(.fred-canvas-functions,.fred-controls-project,.fred-mobile-settings)>summary,
body .fred-atelier .fred-controls-collapse{position:relative;height:44px!important;min-height:44px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;font-family:"Bricolage Grotesque",Arial,sans-serif!important;font-size:14px!important;line-height:1.3!important;padding:8px 34px 8px 12px!important;box-shadow:2px 2px 0 var(--fred-ink)!important}
body .fred-atelier :is(.fred-canvas-functions,.fred-controls-project,.fred-mobile-settings)>summary::after,
body .fred-atelier .fred-controls-collapse::after{content:''!important;position:absolute;right:12px;top:50%;transform:translateY(-50%);float:none;margin:0;width:12px;height:12px;background:linear-gradient(var(--fred-ink),var(--fred-ink)) center/12px 2px no-repeat,linear-gradient(var(--fred-ink),var(--fred-ink)) center/2px 12px no-repeat}
body .fred-atelier :is(.fred-canvas-functions,.fred-controls-project,.fred-mobile-settings)[open]>summary::after,
body .fred-atelier .fred-controls-collapse[aria-expanded=true]::after{background-size:12px 2px,0 0}
body .fred-atelier .fred-screen-bar>button{height:44px!important;min-height:44px!important;display:inline-flex;align-items:center}
body .fred-atelier .fred-controls-body .fred-screen-bar,
body .fred-atelier .fred-controls-body .fred-canvas-functions-body{justify-content:flex-start!important;align-items:flex-start!important;text-align:left!important}
body .fred-atelier .fred-controls-body :is(.fred-screen-bar,.fred-canvas-functions-body)>button{height:40px!important;min-height:40px!important;text-align:left!important;justify-content:flex-start!important;margin-left:0!important;margin-right:0!important}
body .fred-atelier .fred-shape-magic-option{z-index:160!important}
@media(max-width:600px),(max-height:500px){
 body .fred-atelier:not(.fred-controls-floating) .fred-screen-bar>button,
 body .fred-atelier:not(.fred-controls-floating) .fred-canvas-functions>summary,
 body .fred-atelier:not(.fred-controls-floating) .fred-mobile-settings>summary{height:38px!important;min-height:38px!important;font-size:12px!important}
 body .fred-atelier:not(.fred-controls-floating) .fred-screen-bar>.fred-canvas-functions>summary{padding-right:30px!important}
 body .fred-atelier:not(.fred-controls-floating) .fred-mobile-settings>summary{padding-right:30px!important}
}
@media(max-width:600px),(max-height:500px){body .fred-atelier.fred-fullscreen{gap:3px!important}}
/* 1.20: mobile magic is an explicit tool setting; PNG saving has a visible fallback. */
body .fred-atelier .fred-download-dialog{background:var(--fred-paper);color:var(--fred-ink);border:2px solid var(--fred-ink);border-radius:10px;box-shadow:4px 4px 0 var(--fred-ink);padding:18px;width:560px;max-width:calc(100vw - 20px);max-height:90dvh;overflow:auto}
body .fred-atelier .fred-download-preview{display:block;max-width:100%;max-height:40dvh;width:auto;height:auto;margin:12px auto;border:1px solid var(--fred-ink);object-fit:contain;touch-action:auto;user-select:auto;-webkit-touch-callout:default}
body .fred-atelier .fred-download-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}
body .fred-atelier .fred-download-actions a{display:inline-flex;align-items:center;color:var(--fred-ink)!important;background:#42d66b;border:2px solid var(--fred-ink);border-radius:8px;padding:10px 13px;box-shadow:2px 2px 0 var(--fred-ink);font:700 14px/1.3 "Bricolage Grotesque",Arial,sans-serif;text-decoration:none}
body .fred-atelier .fred-download-actions .fred-download-open{background:#f8cf48}
body .fred-atelier .fred-download-dialog [hidden]{display:none!important}
body .fred-atelier .fred-shape-magic-setting select{min-width:110px;max-width:100%}
@media(pointer:coarse),(max-width:600px),(max-height:500px){body .fred-atelier .fred-shape-magic-option{display:none!important}}
/* 1.21: a compact view control, with no added row above the drawing. */
body .fred-atelier .fred-canvas-wrap{position:relative;overflow:hidden}
body .fred-atelier .fred-canvas-wrap>canvas:not(.fred-magic-fx){position:absolute!important;max-width:none!important;max-height:none!important;margin:0!important;touch-action:none}
body .fred-atelier .fred-zoom{position:absolute;right:7px;top:7px;z-index:12;display:flex;align-items:center;gap:3px;padding:3px;background:var(--fred-paper);border:1px solid var(--fred-ink);border-radius:7px;box-shadow:1px 1px 0 var(--fred-ink);touch-action:manipulation}
body .fred-atelier .fred-zoom button{box-sizing:border-box!important;width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;margin:0!important;display:flex;align-items:center;justify-content:center;border:1px solid var(--fred-ink)!important;border-radius:5px!important;box-shadow:1px 1px 0 var(--fred-ink)!important;font:700 15px/1 "Bricolage Grotesque",Arial,sans-serif!important}
body .fred-atelier .fred-zoom .fred-zoom-reset{width:52px!important;min-width:52px!important;font-size:11px!important}
body .fred-atelier .fred-zoom .fred-zoom-hand svg{width:18px;height:18px}
body .fred-atelier.fred-view-hand .fred-canvas-wrap>canvas:not(.fred-magic-fx){cursor:grab!important}
body .fred-atelier.fred-view-dragging .fred-canvas-wrap>canvas:not(.fred-magic-fx){cursor:grabbing!important}
@media(pointer:coarse),(max-width:600px){body .fred-atelier .fred-zoom .fred-zoom-hand{display:none!important}}

/* Submission recovery in restricted in-app browsers. */
body .fred-atelier .fred-submit-help{border:2px solid var(--fred-ink);border-radius:8px;padding:12px;background:#fff1b6;display:grid;gap:10px}
body .fred-atelier .fred-submit-help[hidden]{display:none!important}
body .fred-atelier .fred-submit-help-message{margin:0;font-weight:700}
body .fred-atelier .fred-submit-help-actions{display:flex;flex-wrap:wrap;gap:10px}
body .fred-atelier .fred-submit-help .fred-submit-save{background:#42d66b}
body .fred-atelier .fred-submit-help .fred-submit-page-url{width:100%;font-size:14px!important}

/* Distinguish the drawable page from the surrounding workspace at every zoom. */
body .fred-atelier .fred-canvas-wrap{background:#d8d7d0!important}
body .fred-atelier .fred-canvas-wrap>canvas:not(.fred-magic-fx){outline:2px solid var(--fred-ink);outline-offset:0;box-shadow:3px 4px 0 #23232335}
body .fred-atelier .fred-zoom-hand-wrap{position:relative;display:flex;border-radius:5px}
body .fred-atelier .fred-zoom-hand-tip{display:none;position:absolute;right:0;top:calc(100% + 9px);width:230px;max-width:calc(100vw - 70px);padding:9px 11px;background:var(--fred-paper);color:var(--fred-ink);border:2px solid var(--fred-ink);border-radius:7px;box-shadow:2px 2px 0 var(--fred-ink);font:600 13px/1.4 "Bricolage Grotesque",Arial,sans-serif;pointer-events:none}
body .fred-atelier .fred-zoom-hand-wrap:is(:hover,:focus,:focus-within) .fred-zoom-hand-tip{display:block}
body .fred-atelier .fred-zoom-hand-wrap:focus-visible{outline:3px solid #1e88e5;outline-offset:3px}
@media(pointer:coarse),(max-width:600px){body .fred-atelier .fred-zoom-hand-wrap{display:none!important}}

.fred-secure-entry-host{max-width:900px;margin:30px auto;padding:24px;border:2px solid #232323;border-radius:12px;background:#fffdf6;color:#232323}
.fred-secure-entry-host .fred-secure-entry a{display:inline-block;padding:12px 16px;border:2px solid #232323;border-radius:8px;background:#42d66b;color:#232323;font-weight:700;text-decoration:none;box-shadow:3px 3px 0 #232323}

.fred-size-presets{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}.fred-size-presets button{min-width:40px;min-height:36px;padding:5px 7px}.fred-size-presets button[aria-pressed="true"]{background:#ffd866;color:#202020}.fred-gallery-sort{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:20px}.fred-gallery-sort select{padding:10px}.fred-touch-help{margin:8px 0}

body .fred-gallery img{display:block!important;width:100%!important;height:auto!important;opacity:1!important;visibility:visible!important;object-fit:contain}body .fred-gallery figure>a{display:block}

/* 1.23: one color row, independent border width, adjacent slider values. */
body .fred-atelier .fred-color-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;width:100%}
body .fred-atelier .fred-color-row .fred-shape-style-options{margin:0;gap:12px}
body .fred-atelier .fred-main-color-label[hidden],body .fred-atelier .fred-border-width-label[hidden],body .fred-atelier .fred-border-styles[hidden],body .fred-atelier .fred-stroke-size[hidden]{display:none!important}
body .fred-atelier .fred-stroke-size{display:grid!important;grid-template-columns:auto minmax(70px,120px) max-content;align-items:center;gap:6px!important;width:auto!important}
body .fred-atelier .fred-stroke-size input{width:100%!important;min-width:0!important;margin:0!important}
body .fred-atelier .fred-size-value{min-width:32px;font-variant-numeric:tabular-nums}
body .fred-atelier .fred-size-presets{margin:0}
body .fred-atelier .fred-slider-value{display:inline-grid;grid-template-columns:minmax(70px,120px) max-content;align-items:center;gap:6px}
body .fred-atelier .fred-border-width-label{display:flex;flex-wrap:wrap;gap:6px}
body .fred-atelier .fred-border-width{width:100%!important;margin:0!important}
body .fred-atelier .fred-border-width-value{min-width:38px;font-variant-numeric:tabular-nums}
body .fred-atelier .fred-border-styles{flex-basis:100%;margin:0}

body .fred-atelier .fred-size-presets[hidden]{display:none!important}

/* Roomy mobile settings: labels stay intact and sliders occupy their own row. */
@media(max-width:600px),(max-height:500px),(pointer:coarse){
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel){width:min(520px,calc(100dvw - 16px));max-height:calc(100dvh - 76px);padding:16px}
 body .fred-atelier.fred-fullscreen :is(.fred-mobile-settings-body,.fred-controls-panel){max-height:calc(100dvh - 76px)}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-options{display:flex!important;flex-direction:column;align-items:stretch!important;gap:16px!important;width:100%}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-options>*{min-width:0;max-width:100%}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) :is(label,button,span,strong){word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) :is(label,.fred-fill-picker,.fred-fill-picker>span){white-space:nowrap!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-options label{display:flex;flex-wrap:wrap;gap:8px;width:100%;font-size:14px!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-stroke-size{display:grid!important;width:100%!important;grid-template-columns:minmax(0,1fr) max-content;gap:7px!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-size-label{grid-column:1 / -1}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-stroke-size input{grid-column:1;width:100%!important;min-width:160px!important;height:30px}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-size-value{grid-column:2}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-slider-value{display:grid;width:100%;grid-template-columns:minmax(160px,1fr) max-content}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-options input[type=range]{flex:1 1 160px;width:100%!important;min-width:160px!important;height:30px}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-options .fred-opacity-option{display:grid;grid-template-columns:minmax(0,1fr) max-content}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-color-row{gap:12px}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-shape-style-options{flex-wrap:wrap!important;gap:18px!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-shape-style-options label{width:auto}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-line-options{display:flex!important;flex-direction:column;align-items:stretch;gap:10px;width:100%}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-line-options[hidden]{display:none!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) select{font-size:16px!important;min-width:120px;max-width:100%;word-break:normal!important}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-main-size-presets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
 body .fred-atelier :is(.fred-mobile-settings-body,.fred-controls-panel) .fred-size-presets button{min-width:0!important;white-space:nowrap!important;padding:8px 4px!important}
}
body .fred-atelier :is(.fred-workspace-drawer,.fred-workspace-exit)[hidden]{display:none!important}
body .fred-atelier.fred-mobile-workspace{padding:0!important;gap:0!important;border:0!important;border-radius:0!important;overflow:hidden!important}
body .fred-atelier.fred-mobile-workspace>:is(.fred-canvas-wrap,.fred-comic-strip){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;box-sizing:border-box!important}
body .fred-atelier.fred-mobile-workspace>.fred-workspace-drawer{display:block;position:absolute;z-index:90;top:max(6px,env(safe-area-inset-top));left:max(6px,env(safe-area-inset-left));max-width:calc(100% - 12px);margin:0}
body .fred-atelier .fred-workspace-drawer>summary{display:block;list-style:none;cursor:pointer;white-space:nowrap;background:#f8cf48;color:#232323;border:2px solid #232323;border-radius:7px;padding:8px 12px;font:700 14px/1.3 system-ui;box-shadow:2px 2px 0 #232323;width:max-content}
body .fred-atelier .fred-workspace-drawer-body{width:min(520px,calc(100dvw - 16px));max-height:calc(100dvh - 64px);overflow:auto;overscroll-behavior:contain;padding:12px;margin-top:6px;border:2px solid #232323;border-radius:8px;background:var(--fred-paper);box-shadow:3px 3px 0 #232323}
body .fred-atelier .fred-workspace-drawer .fred-controls-home{display:block!important}
body .fred-atelier .fred-workspace-drawer .fred-controls-home>.fred-tools{display:flex!important;flex-wrap:wrap!important;max-height:none!important;overflow:visible!important}
body .fred-atelier .fred-workspace-drawer .fred-screen-bar{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;max-height:none!important;padding:0!important;margin-top:12px!important}
body .fred-atelier .fred-workspace-drawer .fred-bottom-bar{max-height:none!important;flex-wrap:wrap!important;margin:12px 0 0!important}
body .fred-atelier .fred-workspace-drawer .fred-fullscreen-toggle{display:none!important}
body .fred-atelier.fred-mobile-workspace>.fred-workspace-exit{position:absolute!important;z-index:90;right:max(6px,env(safe-area-inset-right));top:max(6px,env(safe-area-inset-top));height:36px!important;min-height:36px!important;padding:7px 10px!important;font-size:13px!important;background:#42d66b}
body .fred-atelier.fred-mobile-workspace .fred-zoom{top:auto!important;bottom:max(6px,env(safe-area-inset-bottom))}
body .fred-atelier.fred-mobile-workspace>.fred-touch-help{display:none!important}
body .fred-atelier.fred-mobile-workspace>.fred-text-panel{position:absolute;z-index:50;left:8px;bottom:8px;max-width:calc(100% - 16px);background:var(--fred-paper)}
