:root{--ink:#293f33;--muted:#716b5d;--accent:#355d49;--pale:#f7efda;--border:#e1dfd0;--green:#426b4f;--cream:#fcfaf4;--gold:#bd9049;--brown:#805c40;--sage:#eaf0e1;--gold-soft:#f7efda;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--cream);font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--border);background:#fff;color:var(--ink);padding:10px 12px;border-radius:9px;font-weight:550;min-height:38px}button:hover{background:var(--pale);border-color:#bc995c}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible{outline:1px solid #bd9049;outline-offset:2px}.primary{background:var(--accent);color:white;border-color:var(--accent)}.primary:hover{background:#284c3a;color:white}.icon-only{width:36px;padding:8px;flex-shrink:0}svg{width:19px;height:19px;flex-shrink:0;display:inline-block;vertical-align:middle}header{height:92px;display:flex;align-items:center;gap:26px;padding:0 28px;border-bottom:1px solid var(--border);background:#fff}.brand{display:flex;align-items:center;gap:12px;flex-shrink:0}.brand-icon{width:44px;height:49px;border-radius:17px 17px 5px 17px;background:#e9f0df;display:grid;place-items:center;color:var(--green)}.brand-icon svg{width:28px;height:28px}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;color:var(--muted)}h1{font-family:Georgia,serif;font-size:25px;font-weight:normal;margin:5px 0 0}h2{font-size:13px;margin:0;font-weight:650}.tagline{font-family:Georgia,serif;font-size:15px;color:var(--muted);font-style:italic}.header-actions{margin-left:auto;display:flex;gap:8px}.app{display:grid;grid-template-columns:226px minmax(0,1fr) 236px;height:calc(100dvh - 92px);min-height:500px}aside{background:#fff;overflow:auto}.left{border-right:1px solid var(--border);padding:21px 18px}.right{border-left:1px solid var(--border);padding:0 17px}.section-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.tiny-pill{font-size:8px;letter-spacing:1px;background:#f6e9cb;color:var(--green);padding:5px 6px;border-radius:5px}.tools{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.tool{flex-direction:column;font-size:10px;gap:6px;height:62px;font-weight:500;border-color:#e8e4d7}.tool svg{width:21px;height:21px}.tool.active{background:var(--pale);color:#305541;border-color:#bd9049;box-shadow:inset 0 0 0 1px #bd9049}section{padding:18px 0;border-bottom:1px solid var(--border)}.label-row{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:8px;font-size:12px}output{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}input[type=range]{width:100%;accent-color:var(--accent);height:17px;margin:2px 0 12px}input[type=checkbox]{accent-color:var(--accent);width:15px;height:15px;margin:0}.check{display:flex;align-items:center;gap:8px;font-size:12px;margin:11px 0}.custom-colour{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--muted)}input[type=color]{padding:0;width:26px;height:26px;border:none;background:none;cursor:pointer;border-radius:6px}.palette{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:12px}.swatch{padding:0;min-height:24px;height:24px;width:24px;border-radius:50%;border:1px solid #00000015;position:relative}.swatch:hover{background:var(--swatch)}.swatch.active:after{content:"";position:absolute;inset:-4px;border:1.5px solid var(--accent);border-radius:50%}.hint{font-size:11px;line-height:1.6;color:var(--muted);margin:8px 0}.aside-note{display:flex;align-items:center;gap:10px;padding-top:20px;color:#7c876f}.aside-note p{font-family:Georgia,serif;font-style:italic;font-size:12px;line-height:1.6}.aside-note svg{width:24px;height:24px}main{display:flex;flex-direction:column;min-width:0;background:#eff0e8}.canvas-toolbar{height:61px;display:flex;align-items:center;justify-content:space-between;padding:0 19px;border-bottom:1px solid #e2dfd0;background:#faf8f1;gap:8px}.history,.zoom{display:flex;align-items:center;gap:6px}.canvas-toolbar button{background:transparent;border:1px solid transparent;font-size:11px}.canvas-toolbar button:hover{background:#fff;border-color:var(--border)}.zoom output{min-width:40px;text-align:center}#workspace{flex:1;position:relative;overflow:hidden;touch-action:none;outline:none;background-image:radial-gradient(#ccd0bf 0.7px,transparent 0.7px);background-size:16px 16px}#paper{position:absolute;left:0;top:0;transform-origin:0 0;box-shadow:0 5px 30px #2c3c2d18;line-height:0}canvas{display:block;touch-action:none}#overlay{position:absolute;left:0;top:0;pointer-events:none}footer{min-height:38px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 20px;font-size:10px;color:#756d5f;background:#faf8f1;border-top:1px solid #e2dfd0}#dimensions{white-space:nowrap}.picture-title{padding-top:24px}.picture-title input{font-family:Georgia,serif;width:100%;font-size:19px;border:0;border-bottom:1px solid transparent;padding:12px 0 2px;color:var(--ink);background:transparent}.picture-title input:focus{border-color:var(--accent)}.layer{display:flex;align-items:center;gap:5px;margin:7px 0;padding:8px 5px;border:1px solid var(--border);border-radius:8px}.layer.selected{background:#f2f1e6;border-color:#bfa46b}.layer input{width:100%;min-width:0;background:transparent;border:0;color:var(--ink);font-size:11px}.layer button{min-height:26px;width:25px;padding:4px;border:0;background:transparent}.layer svg{width:15px;height:15px}.layer .thumb{height:29px;width:34px;object-fit:contain;background:white;border:1px solid #ddd;border-radius:3px}.layer-actions{display:flex;gap:6px;margin:10px 0 16px}.layer-actions button{flex:1}details{padding:18px 0;border-bottom:1px solid var(--border)}summary{font-size:13px;font-weight:650;cursor:pointer}.wide{width:100%;font-size:11px;margin-top:7px}.text-button{font-size:11px;border:0;padding:5px 0;color:var(--accent)}.privacy{display:flex;gap:8px;margin-top:20px;color:#75806c}.privacy svg{width:14px}.privacy p{margin:0;font-size:10px;line-height:1.7}select{padding:9px;width:100%;border:1px solid var(--border);background:white;border-radius:6px}dialog{border:1px solid var(--border);border-radius:22px;box-shadow:0 20px 90px #273a2d26;padding:28px 32px;color:var(--ink);max-width:min(600px,94vw);width:600px}dialog::backdrop{background:#243b3052;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between}dialog h2{font-family:Georgia,serif;font-size:30px;font-weight:normal;margin:16px 0 10px}dialog p{font-size:13px;line-height:1.7;color:var(--muted)}.presets{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.preset{flex-direction:column;padding:20px 8px;gap:12px}.preset.selected{background:#f7efda;border-color:var(--accent)}.preset strong{font-size:12px}.preset small{font-size:10px;font-weight:400;color:var(--muted)}.paper-preview{display:block;border:1.5px solid #b69a64;background:#fff;box-shadow:3px 3px 0 #e6ddca;height:40px;width:64px;border-radius:2px}.square{width:40px}.portrait{width:31px}.custom-size{display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;color:var(--muted)}.custom-size label{display:flex;align-items:center;gap:8px}.custom-size input{width:76px;padding:9px 6px;border:1px solid var(--border);border-radius:7px;color:var(--ink)}.start{width:100%;margin-top:10px}.dialog-heading button{border:0}dialog li{font-size:13px;line-height:1.6;margin:10px 0}dialog ul{padding-left:18px}[hidden]{display:none!important}@media(max-width:1180px){header{gap:15px;padding:0 18px}.tagline{display:none}.app{grid-template-columns:206px minmax(0,1fr) 216px}.left{padding:21px 12px}.right{padding:0 12px}.header-actions button{font-size:11px}}@media(max-width:850px){header{height:auto;min-height:90px;flex-wrap:wrap;padding:12px 16px;gap:12px}.header-actions{gap:5px;flex-wrap:wrap}.header-actions button{padding:8px}.app{height:calc(100dvh - 115px);grid-template-columns:170px minmax(0,1fr)}.right{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;overflow:visible;border-top:1px solid var(--border);padding:12px 20px}.right .privacy{display:none}.app{min-height:700px;grid-template-rows:minmax(460px,1fr) auto}.palette{gap:7px;grid-template-columns:repeat(5,1fr)}.section-top .tiny-pill{display:none}.history button{font-size:0;gap:0;padding:7px}.canvas-toolbar{padding:0 8px}.zoom{gap:0}h1{font-size:22px}.right section{padding-top:8px}}@media(max-width:520px){.brand{width:100%}.header-actions{margin:0}.header-actions button{font-size:10px}.app{grid-template-columns:132px minmax(0,1fr);min-height:800px}.left{padding:18px 8px}.tools{grid-template-columns:repeat(2,1fr)}.palette{grid-template-columns:repeat(4,1fr)}.right{grid-template-columns:1fr;gap:0}.aside-note{display:none}.eyebrow{font-size:8px}.tool{height:55px}footer{padding:8px;flex-wrap:wrap}.presets{gap:6px}.preset{padding:14px 4px}.preset small{font-size:8px}dialog{padding:20px}.custom-size{gap:7px}.custom-size label{gap:3px}.canvas-toolbar{flex-wrap:wrap;height:80px;justify-content:center}}@media(prefers-reduced-motion:no-preference){button{transition:background .12s,border-color .12s}}
/* Keep every labelled tool visible in narrow sidebars. */
@media(max-width:850px){.tools{grid-template-columns:repeat(2,minmax(0,1fr))}.tool{min-width:0;padding:8px 4px}.section-top{overflow:hidden}}

/* Fables Library · forest / honey-gold / warm-earth theme. */
h2,summary{color:var(--brown)}
.eyebrow{color:#83643a}
.brand-icon{box-shadow:inset 0 0 0 1px #d5dfc6}
.tiny-pill{color:#795326}
.tool.active svg{color:#355d49}
.layer.selected{box-shadow:inset 3px 0 0 #bd9049}
.preset.selected{box-shadow:inset 0 0 0 1px #bd9049}
.text-button:hover{color:#805c40;text-decoration:underline}
select:focus-visible{border-color:var(--gold)}
input[type=color]:focus-visible{outline:1px solid var(--gold);outline-offset:2px}
.swatch.active:after{border-color:var(--gold)}
header{border-bottom-color:#d6c59c}
.tool:hover:not(.active){border-color:#d3bb88}
.paper-preview{box-shadow:3px 3px 0 #e6ddca}

/* WalkMe-inspired illustrated tour, local-first; separate from the drawing surface. */
.help-tour-card{display:flex;align-items:center;justify-content:space-between;gap:18px;background:var(--gold-soft);border:1px solid #dac49a;border-radius:12px;padding:14px 16px;margin:14px 0 16px}
.help-tour-card strong{font-size:14px;color:var(--ink)}
.help-tour-card .hint{margin:4px 0 0}
.help-tour-card button{flex-shrink:0}
#tourDialog{width:min(990px,96vw,calc(170dvh - 500px));max-width:96vw;max-height:96dvh;overflow:hidden;padding:0;border:1px solid #d8c59b;border-radius:18px;background:var(--cream)}
#tourDialog::backdrop{background:#192e25ad;backdrop-filter:blur(4px)}
.tour-shell{display:flex;flex-direction:column;max-height:96dvh;min-height:0}
.tour-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:76px;padding:10px 20px;background:#fffaf0;border-bottom:1px solid var(--border)}
#tourDialog .tour-top h2{font-family:Georgia,serif;font-size:clamp(18px,2.6vw,24px);font-weight:normal;margin:3px 0 0;color:var(--ink)}
.tour-top .eyebrow{color:#886437}
.tour-image-wrap{min-height:0;flex:0 0 auto;width:100%;display:block;overflow:hidden;background:#fcfaf4}
.tour-slide-image{display:block;width:100%;height:auto;max-width:100%;max-height:none;aspect-ratio:1672 / 941;object-fit:contain}
.tour-bottom{padding:10px 20px 12px;background:#fffdf8;border-top:1px solid var(--border)}
.tour-summary{display:flex;gap:12px;justify-content:space-between;align-items:baseline;min-height:44px}
#tourDialog .tour-summary p{margin:0;font-size:13px;font-weight:550;color:var(--ink);line-height:1.5}
#tourCounter{font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.tour-progress{margin:9px auto;display:flex;justify-content:center}
.tour-dots{display:flex;gap:9px;justify-content:center}
.tour-dot{width:11px;height:11px;min-height:11px;padding:0;border-radius:50%;background:#e0ddcf;border:1px solid #b4b09f;position:relative;box-shadow:none}
.tour-dot:hover{background:#bb9e66}
.tour-dot.is-active{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 3px #e3eddf}
.tour-dot:focus-visible{outline:1px solid var(--gold);outline-offset:3px}
.tour-preferences{display:flex;flex-wrap:wrap;gap:6px 30px;justify-content:center;padding:6px 8px;background:#f7f2e7;border-radius:9px;border:1px solid #ebe1ce}
.tour-preferences .check{margin:3px 0;font-size:12px;white-space:nowrap}
.tour-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px}
.tour-controls-right{display:flex;align-items:center;gap:8px}
#tourNext{min-width:145px}
.tour-skip{background:transparent;border-color:transparent;font-weight:500;text-decoration:underline;color:#725c42}
.tour-skip:hover{background:#f7efda}
#tourDialog .tour-privacy{text-align:center;margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
@media(max-width:600px){
  #tourDialog{width:97vw;max-width:97vw;max-height:97dvh;border-radius:13px}
  .tour-shell{max-height:97dvh}
  .tour-top{padding:9px 12px;min-height:72px}
  .tour-top .eyebrow{font-size:9px}
  .tour-slide-image{max-height:none}
  .tour-bottom{padding:8px 11px 10px}
  #tourDialog .tour-summary p{font-size:12px}
  .tour-summary{min-height:46px}
  .tour-preferences{gap:4px 14px}
  .tour-preferences .check{font-size:11px}
  .tour-controls{margin-top:7px}
  .tour-controls button{min-height:42px;padding:8px 10px;font-size:12px}
  #tourNext{min-width:105px}
  .help-tour-card{flex-direction:column;align-items:stretch}
  .help-tour-card button{width:100%}
}
@media(max-height:670px){.tour-bottom{padding-top:6px;padding-bottom:7px}.tour-top{padding:6px 12px}}
@media(prefers-reduced-motion:reduce){#tourDialog *{transition:none!important;animation:none!important}}

/* v4: supplied Fables Library identity, styled on the chrome, not the drawing surface.
   Background artwork is behind strong contrast scrims; all assets are local. */
.brand-icon{background:transparent;box-shadow:none;overflow:hidden;border-radius:50%;width:44px;height:44px}
.brand-icon img{display:block;width:100%;height:100%;object-fit:contain}
header{background:linear-gradient(95deg,#fff 0%,#fff 65%,rgba(255,255,255,.95) 100%),url("drawing-garden-assets/brand/fables-library-hero-brand.webp") center right/cover no-repeat}
.help-tour-card{background-image:linear-gradient(105deg,rgba(250,246,233,.98),rgba(250,246,233,.94) 65%,rgba(250,246,233,.81)),url("drawing-garden-assets/brand/fables-library-hero-brand.webp");background-size:cover;background-position:center;min-width:0}
.help-tour-card>div{flex:1;min-width:0}
.help-brand-mark{width:63px;height:63px;flex:0 0 63px;border-radius:13px;object-fit:cover;box-shadow:0 2px 9px #283b2c38}
#newDialog{position:relative;overflow:auto}
#newDialog::before{content:"";height:9px;position:absolute;top:0;left:0;right:0;background:url("drawing-garden-assets/brand/fables-library-hero-brand.webp") center/cover no-repeat;border-radius:21px 21px 0 0}
#tourDialog .tour-top{background-image:linear-gradient(90deg,rgba(26,50,37,.89),rgba(31,56,37,.76)),url("drawing-garden-assets/brand/fables-library-hero-brand.webp");background-size:cover;background-position:center 42%;border-color:#5d6b45;color:#fff;min-height:72px}
.tour-brand-lockup{display:flex;align-items:center;gap:12px;min-width:0}
.tour-brand-lockup>div{min-width:0}
.tour-brand-mark{display:block;width:54px;height:54px;flex:0 0 54px;object-fit:cover;border-radius:12px;border:1px solid #ffffff63;box-shadow:0 2px 10px #16271980}
#tourDialog .tour-top h2{color:#fff;margin:3px 0 0}
#tourDialog .tour-top .eyebrow{color:#f7dfaa}
#tourDialog .tour-top .icon-only{color:white;background:#ffffff15;border:1px solid #ffffff69}
#tourDialog .tour-top .icon-only:hover{background:#ffffff32;border-color:white}
#tourDialog .tour-top .icon-only:focus-visible{outline:1px solid #ffdc84;outline-offset:2px}
@media(max-width:600px){
  .tour-brand-mark{height:40px;width:40px;flex-basis:40px;border-radius:9px}
  #tourDialog .tour-top{min-height:53px}
  .help-brand-mark{height:48px;width:48px;flex-basis:48px}
  .help-tour-card{gap:10px}
}

/* v5 · Carbon navigation chevrons, sourced from the supplied Fables SVGs.
   Only directional controls are affected; undo/redo retain their original symbols. */
.layer-actions .carbon-chevron{display:block;width:22px;height:22px;object-fit:contain;pointer-events:none}
#layerUp,#layerDown{padding:7px}
/* Native <details> disclosure retains native keyboard/touch operation. */
.right details > summary{display:flex;align-items:center;gap:8px;list-style:none}
.right details > summary::-webkit-details-marker{display:none}
.right details > summary::marker{content:""}
.right details > summary::before{content:"";display:inline-block;flex:0 0 20px;width:20px;height:20px;background:url("drawing-garden-assets/icons/chevron-right.svg") center/20px 20px no-repeat}
.right details[open] > summary::before{background-image:url("drawing-garden-assets/icons/chevron-down.svg")}
/* Tour Previous / Next: decorative directional marks, with original button labels intact. */
#tourPrev::before,#tourNext::after{content:"";display:inline-block;flex:0 0 20px;width:20px;height:20px;background-position:center;background-size:20px 20px;background-repeat:no-repeat;pointer-events:none}
#tourPrev::before{background-image:url("drawing-garden-assets/icons/chevron-left.svg")}
#tourNext::after{background-image:url("drawing-garden-assets/icons/chevron-right.svg");filter:brightness(0) invert(1)}
#tourPrev,#tourNext{gap:6px}
@media(max-width:600px){#tourPrev::before,#tourNext::after{width:17px;height:17px;flex-basis:17px;background-size:17px 17px}}


/* v9 · Start from template in the New Picture dialog. */
.new-dialog-section{margin-top:18px}
.section-label{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;font-weight:700;color:#83643a;margin:0 0 10px}
.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.template-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:10px;border-radius:12px;min-height:0;text-align:left;background:#fff}
.template-card img{display:block;width:100%;aspect-ratio:.77;object-fit:cover;border:1px solid #d8d0c1;border-radius:9px;background:#fff}
.template-card strong{font-size:12px}
.template-card small{font-size:10px;font-weight:400;color:var(--muted)}
.template-card.selected{background:#f7efda;border-color:var(--accent);box-shadow:inset 0 0 0 1px #bd9049}
.template-hint{margin-top:10px}
@media(max-width:520px){.template-grid{grid-template-columns:1fr;gap:8px}.template-card{flex-direction:row;align-items:center}.template-card img{width:84px;flex:0 0 84px;aspect-ratio:.77}}


/* v10 · "See more" carousel pattern for Mila black-and-white templates. */
#newDialog{max-width:min(880px,96vw);width:min(880px,96vw)}
.template-discovery{margin-top:4px;border:1px solid #ccd8ca;border-radius:18px;background:#f8faf6;overflow:hidden}
.template-discovery>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;cursor:pointer;list-style:none;font-size:13px;font-weight:650;color:#355d49;background:#f6f8f3}
.template-discovery>summary::-webkit-details-marker{display:none}.template-discovery>summary::marker{content:""}
.template-summary-left{display:flex;align-items:center;gap:10px}.template-summary-left svg{width:18px;height:18px}
.template-discovery>summary::after{content:"";display:inline-block;flex:0 0 28px;width:28px;height:28px;border:1px solid #cfd8ca;border-radius:50%;background:#fff url("drawing-garden-assets/icons/chevron-down.svg") center/18px 18px no-repeat}
.template-discovery[open]>summary::after{transform:rotate(180deg)}
.template-carousel{padding:0 18px 16px}
.template-frame{position:relative;border-radius:0 0 18px 18px;overflow:hidden;background:#fff;border:1px solid #d5ddd2}
.template-slide-button{display:block;width:100%;padding:0;border:0;border-radius:0;background:#fff;position:relative}
.template-slide-button img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff}
.template-carousel.has-selected .template-slide-button{box-shadow:inset 0 0 0 2px #bd9049}
.template-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:46px;height:46px;border-radius:50%;background:#f8faf5cc;border:1px solid #ced7ca;padding:0;box-shadow:0 2px 8px #25402d20}
.template-nav:hover{background:#fff}.template-nav img{width:22px;height:22px}.template-nav#templatePrev{left:14px}.template-nav#templateNext{right:14px}
.template-count-badge{position:absolute;left:14px;bottom:14px;z-index:2;background:#f7faf3;border:1px solid #c9d5c9;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;color:#355d49}
.template-caption{padding:14px 10px 10px;text-align:center;font-size:13px;font-weight:650;color:#355d49}
.template-dots{display:flex;justify-content:center;gap:10px;padding-bottom:4px}.template-dot{width:12px;height:12px;min-height:12px;padding:0;border-radius:50%;background:#edf1ea;border:1px solid #9fb7a8}.template-dot.is-active{background:#355d49;border-color:#355d49;box-shadow:0 0 0 3px #deeadf}
@media(max-width:600px){#newDialog{width:96vw;max-width:96vw}.template-discovery>summary{padding:12px 14px}.template-carousel{padding:0 10px 12px}.template-nav{width:38px;height:38px}.template-nav img{width:18px;height:18px}.template-nav#templatePrev{left:10px}.template-nav#templateNext{right:10px}.template-count-badge{left:10px;bottom:10px;font-size:11px;padding:5px 8px}.template-caption{font-size:12px}}


/* v11 · ten-template carousel and more compact new-picture dialog. */
#newDialog{max-width:min(820px,95vw);width:min(820px,95vw);max-height:92vh;padding:24px 28px;overflow:auto}
#newDialog h2{font-size:24px;margin:12px 0 8px}
#newDialog p{font-size:12px;line-height:1.55;margin:6px 0}
#newForm{display:flex;flex-direction:column;gap:12px}
.new-dialog-section{margin-top:8px}
.section-label{margin:0 0 8px;font-size:10px;letter-spacing:1.4px}
.presets{margin:8px 0 0;gap:10px}.preset{padding:14px 8px;gap:8px}.paper-preview{height:32px;width:54px}.square{width:32px}.portrait{width:26px}
.template-discovery>summary{padding:12px 14px;font-size:12px}.template-discovery>summary::after{width:26px;height:26px;flex-basis:26px;background-size:16px 16px}
.template-carousel{padding:0 14px 12px}
.template-slide-button img{height:310px;width:100%;object-fit:contain;aspect-ratio:auto}
.template-nav{width:40px;height:40px}.template-nav img{width:18px;height:18px}.template-nav#templatePrev{left:12px}.template-nav#templateNext{right:12px}
.template-count-badge{left:12px;bottom:12px;font-size:11px;padding:5px 8px}.template-caption{padding:10px 8px 8px;font-size:12px}.template-dots{gap:8px}.template-dot{width:10px;height:10px;min-height:10px}
.template-hint{margin-top:0;font-size:11px}
.custom-size{margin-top:0;font-size:11px;justify-content:flex-start}.custom-size input{width:70px;padding:7px 6px}
.start{width:auto;min-width:180px;align-self:flex-end;margin-top:2px;padding-inline:16px}
@media(max-width:600px){#newDialog{padding:18px 16px;max-width:96vw;width:96vw}#newDialog h2{font-size:21px}.presets{gap:8px}.preset{padding:10px 6px}.template-carousel{padding:0 8px 10px}.template-slide-button img{height:220px}.custom-size{flex-wrap:wrap;justify-content:center}.start{width:100%;align-self:stretch}}

/* v12 · protected coloring outline with paint beneath. */
.layer:has(input[value="Mila outline"]){background:#f8faf5}


/* v13: compact, Carbon-inspired direct shape style choice, no dropdown. */
.shape-style-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}
.shape-style-option{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;min-width:0;min-height:67px;padding:9px 4px;background:#fff;color:#355d49;border:1px solid #e1dfd0;border-radius:9px;font-size:11px;font-weight:600}
.shape-style-option svg{width:23px;height:23px;flex:none}
.shape-style-option.selected{background:#f7efda;border:1px solid #bd9049;box-shadow:inset 0 0 0 1px #bd9049;color:#355d49}
.shape-style-option:not(.selected):hover{border-color:#d3bb88;background:#faf7ec}
.shape-style-option:focus-visible{outline:1px solid #bd9049;outline-offset:2px}
.current-colour{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:7px;align-items:center;margin-top:13px;padding:8px 7px;border:1px solid #e1dfd0;border-radius:8px;background:#faf8f1;min-width:0}
.current-colour-sample{width:26px;height:26px;display:block;background:#537863;border-radius:6px;border:1px solid #00000024;box-shadow:inset 0 0 0 2px #ffffffa8}
.current-colour-description{display:flex;flex-direction:column;gap:1px;min-width:0}
.current-colour-description span{font-size:9px;color:#716b5d;line-height:1.2}
.current-colour-description strong{font-size:11px;line-height:1.3;font-weight:600;overflow-wrap:anywhere;color:#355d49}
.current-colour-hex{font-size:9px;letter-spacing:-.2px;font-variant-numeric:tabular-nums;color:#716b5d;white-space:nowrap}
@media(max-width:850px){.current-colour{grid-template-columns:24px minmax(0,1fr);gap:6px}.current-colour-sample{width:22px;height:22px}.current-colour-hex{grid-column:2;font-size:9px}.shape-style-option{min-height:62px;font-size:10px}}
/* Keep shape choices comfortably visible in the tool sidebar at common laptop heights. */
.left{padding-top:16px}
.left section{padding-top:13px;padding-bottom:13px}
.left .palette{margin-top:9px}
.current-colour{margin-top:9px}
.shape-style-option{min-height:60px}
@media(min-width:521px){.left .tool{height:59px}}

/* v14 · imported Color Garden swatches, preserves 18 built-in colors. */
.garden-import-panel{margin-top:12px;padding:10px 0 2px;border-top:1px solid #e5d9bd;display:flex;flex-direction:column;gap:8px}
.garden-import-heading{display:flex;flex-direction:column;gap:3px;line-height:1.25}
.garden-import-heading strong{color:#365a48;font-size:12px}
.garden-import-heading span{color:#786d5a;font-size:10px}
.garden-import-swatches:empty{display:none}
.garden-import-swatches:not(:empty){display:flex;flex-wrap:wrap;gap:7px}
.garden-import-swatch{flex:0 0 22px;width:22px;height:22px;min-width:22px}
.garden-color-link{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;padding:6px 0;color:#365a48;font-size:11px;font-weight:650;text-decoration:underline;text-underline-offset:3px}
.garden-color-link:hover{color:#876133}.garden-color-link:focus-visible{outline:1px solid #bd9049;outline-offset:2px;border-radius:2px}

/* v21: genuine Fables Carbon icons, social links, and About information. */
.carbon-ui-icon{display:block;width:19px;height:19px;flex:0 0 19px;object-fit:contain}
.tool .carbon-ui-icon{width:21px;height:21px;flex-basis:21px}
.primary .carbon-ui-icon{filter:brightness(0) invert(1)} /* contrast on forest-green */
.label-with-icon{display:inline-flex;align-items:center;gap:6px}
.label-with-icon img{width:17px;height:17px;flex-shrink:0}
.about-trigger img{display:block;width:20px;height:20px}
.garden-socials{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;
  margin:1px 0 8px;padding:10px 0 0;
  border-top:1px solid var(--border);
}
.garden-socials a{
  display:grid;place-items:center;width:100%;min-width:0;height:30px;
  border-radius:7px;border:1px solid transparent;
  color:#355d49;text-decoration:none;
}
.garden-socials a:hover{background:#f7efda;border-color:#e1d3b6}
.garden-socials a:focus-visible,.about-links a:focus-visible{outline:1px solid #bd9049;outline-offset:2px}
.garden-socials img{display:block;width:21px;height:21px;object-fit:contain}
@media(max-width:850px){
  .garden-socials{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 5px}
  .garden-socials a{height:32px}
}
#aboutDialog{max-width:min(520px,94vw);width:min(520px,94vw);max-height:90dvh;overflow:auto}
.about-heading{display:flex;align-items:center;gap:14px;margin:17px 0 12px}
.about-heading>img{width:54px;height:54px;object-fit:cover;border-radius:12px;flex:0 0 54px}
#aboutDialog .about-heading h2{font-size:25px;margin:0;line-height:1.12}
#aboutDialog p{font-size:13px;line-height:1.62}
.about-links{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0 3px}
.about-links a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:41px;
  padding:9px 12px;color:#355d49;background:#f8f7f1;border:1px solid #dcd8c8;
  border-radius:9px;text-decoration:none;font-size:12px;font-weight:650}
.about-links a:hover{background:#f7efda;border-color:#bd9049}
.about-links img{width:19px;height:19px;display:block;object-fit:contain}
@media(max-width:520px){
 .garden-socials{grid-template-columns:repeat(3,minmax(0,1fr))}
 #aboutDialog{padding:19px}
 #aboutDialog .about-heading h2{font-size:22px}
 .about-links a{width:100%;justify-content:flex-start}
}

/* Grid Drawing activity tab */
.garden-tabs{display:inline-grid;grid-template-columns:1fr 1fr;gap:0;margin:10px 22px;padding:0;background:#fff;border:1px solid #7a9586;border-radius:12px;overflow:hidden}.garden-tabs button{min-height:44px;border:0;border-right:1px solid #7a9586;border-radius:0;background:#fff;font-size:14px;font-weight:650}.garden-tabs button:last-child{border-right:0}.garden-tabs button:hover,.garden-tabs button[aria-selected="true"]:hover{background:#f7f3e8;color:#355d49}.garden-tabs button:hover svg,.garden-tabs button[aria-selected="true"]:hover svg{color:#355d49}.garden-tabs [aria-selected=true]{background:var(--accent);color:#fff;border-color:var(--accent)}.app{height:calc(100dvh - 151px)}#freeDrawPanel[hidden],#gridDrawPanel[hidden]{display:none!important}#gridDrawPanel iframe{display:block;width:100%;height:calc(100dvh - 151px);min-height:650px;border:0}@media(max-width:700px){.garden-tabs{display:grid;margin:8px 12px}#gridDrawPanel iframe{height:calc(100dvh - 151px)}}

/* v30: Drawing Studio trace uploader shares Grid Drawing's Carbon file language. */
.right .trace-file-uploader{min-width:0;margin:11px 0 12px}
.right .trace-file-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px 9px;border:2px dashed #8da499;background:#f4f7f2;text-align:center;min-height:160px;transition:background-color .15s,border-color .15s}
.right .trace-file-drop:hover{border-color:#355d49;background:#eff4ee}
.right .trace-file-drop.is-dragging{border:3px solid #355d49;background:#e3eee6;padding:15px 8px}
.right .trace-file-drop .trace-file-art{width:24px;height:24px;object-fit:contain}
.right .trace-file-drop>strong{font-size:13px;font-weight:650;color:#293f33}
.right .trace-drop-or{font-size:11px;color:#666;margin:-3px 0}
.right .trace-file-browse{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;min-height:40px;width:auto;padding:0 15px;border:1px solid #355d49;background:#355d49;color:#fff;border-radius:0;font-size:13px;font-weight:650}
.right .trace-file-browse:hover{background:#244b37;border-color:#244b37;color:#fff}
.right .trace-file-browse img{width:16px;height:16px;filter:brightness(0) invert(1)}
.right .trace-file-browse:focus-visible,.right .trace-file-remove:focus-visible{outline:2px solid #355d49;outline-offset:3px}
.right .trace-file-formats{font-size:11px;line-height:1.45;color:#66746b}
.right .trace-file-item{display:flex;align-items:center;gap:9px;min-height:48px;padding:9px 10px;background:#f4f4f4;border-bottom:1px solid #8d8d8d;color:#293f33;min-width:0}
.right .trace-file-item-icon{flex:0 0 20px;width:20px;height:20px}
.right .trace-file-details{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.right .trace-file-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:650}
.right .trace-file-remove{flex:0 0 36px;width:36px;height:36px;min-height:36px;border:0;border-radius:0;background:transparent;padding:7px}
.right .trace-file-remove:hover{background:#e5e5e5}
.right .trace-file-remove img{width:20px;height:20px}
.right .trace-file-error{margin:8px 0 0;padding:9px 10px;background:#fff1f1;border-left:3px solid #da1e28;color:#a2191f;font-size:12px;line-height:1.5}
.right .trace-file-item[hidden],.right .trace-file-error[hidden]{display:none!important}


/* v31 · Carbon-inspired inline success/error notifications. Feedback is separate from file rows. */
.carbon-inline-notice{position:relative;display:flex;gap:11px;align-items:flex-start;min-width:0;margin:10px 0 5px;padding:12px 8px 12px 12px;background:#eaf0e1;border-left:3px solid #355d49;color:#293f33;font-size:12px;line-height:1.45;}
.carbon-inline-notice[data-kind="error"]{background:#fff1f1;border-left-color:#da1e28;}
.carbon-inline-notice[hidden]{display:none!important;}
.carbon-inline-notice-icon{width:20px;height:20px;flex:0 0 20px;object-fit:contain;margin-top:1px;}
.carbon-inline-notice-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;}
.carbon-inline-notice-text strong{font-size:13px;font-weight:700;line-height:1.3;}
.carbon-inline-notice-text span{font-size:11px;line-height:1.45;}
.carbon-inline-notice-close{display:flex;flex:0 0 28px;align-items:center;justify-content:center;min-height:28px;width:28px;height:28px;padding:4px;margin:-4px -3px 0 0;border:0;border-radius:0;background:transparent;cursor:pointer;}
.carbon-inline-notice-close img{width:17px;height:17px;}
.carbon-inline-notice-close:hover{background:rgba(0,0,0,.075);}
.carbon-inline-notice-close:focus-visible{outline:2px solid #355d49;outline-offset:1px;}

/* v34: shared Fables guide hierarchy */
#helpDialog.garden-help-dialog{width:min(650px,calc(100vw - 26px));max-height:min(91dvh,900px);overflow-y:auto;background:#fffdf8;border:1px solid #e7d9bc;padding:25px 29px 28px;color:#293f33}
.garden-help-kicker{font-size:10px;color:#8a6845;font-weight:800;letter-spacing:.13em}
#helpDialog.garden-help-dialog h2{font:500 30px/1.18 Georgia,serif;color:#293f33;margin:13px 0 8px}
#helpDialog .garden-help-intro{color:#466a54;font-size:14px;line-height:1.6;margin:0 0 13px}
#helpDialog .help-tour-card{margin:12px 0 17px;min-height:94px}
.garden-help-guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.garden-help-step{display:grid;grid-template-columns:27px minmax(0,1fr);gap:9px;padding:12px 10px;border:1px solid #e9e0cf;border-radius:9px;background:#fffdfa;min-width:0}
.garden-help-number{width:26px;height:26px;display:grid;place-items:center;color:#8a6845;background:#f4ecdb;border:1px solid #e1cb9d;border-radius:8px;font-size:10px;font-weight:750}
#helpDialog .garden-help-step h3{font-size:13px;line-height:1.3;color:#8a6845;font-weight:750;margin:0 0 5px}
#helpDialog .garden-help-step p{font-size:12px;line-height:1.5;color:#355d49;margin:0}
#helpDialog .garden-help-step strong{color:#2d5947;font-weight:750}
.garden-help-shortcuts{margin:16px 0 12px;padding:15px 17px;background:#f3f5ed;border-left:3px solid #d2ab66;border-radius:0 8px 8px 0}
#helpDialog .garden-help-shortcuts h3{font-size:14px;color:#8a6845;margin:0 0 8px}
#helpDialog .garden-help-shortcuts p{font-size:12px;color:#355d49;line-height:2.15;margin:2px 0}
#helpDialog kbd{display:inline-block;font:700 11px/1.2 system-ui,sans-serif;border:1px solid #d5c9ac;background:#fffdf8;color:#775a38;padding:3px 5px;border-radius:4px;white-space:nowrap}
#helpDialog .garden-help-footnote{margin:0;color:#6a7d6c;font-size:11px;line-height:1.6}
@media(max-width:540px){#helpDialog.garden-help-dialog{padding:20px 16px 22px}.garden-help-guide{grid-template-columns:1fr}#helpDialog.garden-help-dialog h2{font-size:25px}.garden-help-shortcuts{padding:12px}}

/* Carbon-style ranges, kept linked to existing Drawing Garden engine */
.dg-carbon-slider{display:grid;grid-template-columns:minmax(0,1fr) 63px;gap:9px;align-items:center;margin:1px 0 11px;min-width:0}
.dg-carbon-slider-range{min-width:0}.dg-carbon-slider-track{height:22px;display:flex;align-items:center;min-width:0}
.dg-carbon-slider .dg-carbon-slider-track input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:22px;margin:0;cursor:pointer;background:transparent;padding:0;--carbon-progress:0%;accent-color:var(--accent)}
.dg-carbon-slider input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:3px;background:linear-gradient(to right,#355d49 0%,#355d49 var(--carbon-progress),#d4ded1 var(--carbon-progress),#d4ded1 100%)}
.dg-carbon-slider input[type=range]::-moz-range-track{height:4px;border-radius:3px;background:linear-gradient(to right,#355d49 0%,#355d49 var(--carbon-progress),#d4ded1 var(--carbon-progress),#d4ded1 100%)}
.dg-carbon-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-7px;width:18px;height:18px;border:2px solid #fff;border-radius:50%;background:#355d49;box-shadow:0 0 0 1px #355d49}
.dg-carbon-slider input[type=range]::-moz-range-thumb{width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#355d49;box-shadow:0 0 0 1px #355d49}
.dg-carbon-slider-ends{display:flex;justify-content:space-between;color:#697c70;font-size:9px;margin-top:1px;line-height:1.1}
.dg-carbon-slider-number{position:relative;min-width:0;height:39px;background:#f5f7f2;border-bottom:1px solid #9eafa3}
.dg-carbon-slider-number input[type=number]{appearance:textfield;width:100%;height:100%;border:0;background:transparent;color:#293f33;padding:6px 18px 6px 7px;font-size:11px;font-weight:650;min-width:0}
.dg-carbon-slider-number input[type=number]::-webkit-inner-spin-button,.dg-carbon-slider-number input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.dg-carbon-slider-number span{position:absolute;right:5px;top:50%;transform:translateY(-50%);font-size:9px;color:#62796c;pointer-events:none}
@media(max-width:520px){.dg-carbon-slider{grid-template-columns:minmax(0,1fr) 49px;gap:5px}.dg-carbon-slider-number input[type=number]{font-size:10px;padding-left:4px}}

/* Inline paper colour control lives in the right sidebar */
.dg-paper-picker{width:100%;min-width:0;margin:8px 0 12px}.dg-paper-colours{padding:0;border:1px solid #d5c09a;border-radius:9px;background:#fffdf8;max-width:100%;overflow:hidden}
.dg-paper-colours>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:10px;min-height:46px;color:#355d49;font-size:12px;font-weight:650;cursor:pointer}
.dg-paper-colours>summary::-webkit-details-marker{display:none}.dg-paper-swatch{flex:0 0 23px;width:23px;height:23px;border:1px solid #d5ddce;border-radius:6px;background:white}.dg-paper-chevron{margin-left:auto;width:17px;height:17px;transition:transform .18s}.dg-paper-colours[open] .dg-paper-chevron{transform:rotate(180deg)}
.dg-paper-body{padding:10px 9px 12px;border-top:1px solid #e8decb;min-width:0}.dg-paper-shade{--paper-hue:0;position:relative;height:115px;width:100%;cursor:crosshair;touch-action:none;border:1px solid #d5dccf;border-radius:4px;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--paper-hue) 100% 50%))}
.dg-paper-pointer{position:absolute;left:0;top:0;width:13px;height:13px;transform:translate(-50%,-50%);border:2px solid white;box-shadow:0 0 0 1px #293f33;border-radius:50%;pointer-events:none}
.dg-hue-label{display:block;font-size:10px;color:#8a6845;margin:9px 0 4px}.dg-paper-picker #dgPaperHue{-webkit-appearance:none;appearance:none;width:100%;height:18px;border:none;border-radius:16px;margin:0 0 10px;background:linear-gradient(to right,red 0%,yellow 16.7%,lime 33.3%,cyan 50%,blue 66.7%,magenta 83.3%,red 100%)}
.dg-paper-picker #dgPaperHue::-webkit-slider-runnable-track{height:9px;background:transparent}.dg-paper-picker #dgPaperHue::-moz-range-track{height:9px;background:transparent}
.dg-paper-picker #dgPaperHue::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;height:17px;width:17px;margin-top:-4px;border-radius:50%;border:2px solid #fff;background:#355d49;box-shadow:0 0 0 1px #355d49}
.dg-paper-picker #dgPaperHue::-moz-range-thumb{width:13px;height:13px;border:2px solid #fff;background:#355d49;border-radius:50%;box-shadow:0 0 0 1px #355d49}
.dg-picked-paper{display:flex;align-items:center;gap:8px;font-size:10px;color:#355d49}.dg-picked-paper span:first-child{display:block;width:25px;height:25px;border-radius:50%;background:white;border:1px solid #d5ddce}
@media(max-width:850px){.dg-paper-picker{max-width:100%}.dg-paper-shade{height:100px}}

/* v34: keep the garden interface calm; make Color Garden a clear action. */
a.garden-color-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  width:100%;min-height:37px;padding:9px 11px;border:1px solid #c5af89;border-radius:9px;
  background:#fffdf7;color:#355d49;text-decoration:none;font-size:11px;font-weight:700;
  transition:background .15s ease,border-color .15s ease;}
a.garden-color-link:hover{background:#f4efe2;border-color:#9c825b;color:#294936;}
a.garden-color-link svg{width:16px;height:16px;flex:none;}
a.garden-color-link:focus-visible{outline:2px solid #bd9049;outline-offset:2px;border-radius:9px;}


/* v35: Drawing Studio custom ink stays inside its own left toolbox. */
.left .dg-custom-toggle{display:inline-flex;align-items:center;gap:6px;justify-content:flex-end;min-height:29px;border:1px solid transparent;background:transparent;padding:3px 1px 3px 4px;font-size:10px;font-weight:600;color:#66736b;white-space:nowrap}
.left .dg-custom-toggle:hover,.left .dg-custom-toggle[aria-expanded="true"]{color:#355d49;border-color:transparent;background:transparent}
.dg-custom-swatch{display:block;flex:0 0 20px;width:20px;height:20px;border-radius:3px;border:1px solid #dae2d5;background:#537863;box-shadow:inset 0 0 0 1px #ffffff55}
.dg-ink-chevron{display:block;flex:0 0 13px;width:13px;height:13px;transition:transform .16s ease}
.dg-custom-toggle[aria-expanded="true"] .dg-ink-chevron{transform:rotate(180deg)}
.left .dg-ink-panel{padding:10px 9px 11px;margin:1px 0 10px;min-width:0;max-width:100%;border:1px solid #d5c09a;border-radius:9px;background:#fffdf8}
.dg-ink-shade{--ink-hue:0;position:relative;width:100%;height:112px;border-radius:4px;border:1px solid #d4dccc;cursor:crosshair;touch-action:none;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--ink-hue) 100% 50%))}
.dg-ink-pointer{position:absolute;left:0;top:0;width:13px;height:13px;transform:translate(-50%,-50%);border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #293f33;pointer-events:none}
.dg-ink-hue-label{display:block;color:#8a6845;font-size:10px;margin:9px 0 4px}
#dgInkHue{-webkit-appearance:none;appearance:none;display:block;width:100%;height:18px;border:0;border-radius:15px;margin:0 0 9px;background:linear-gradient(to right,red 0%,yellow 16.7%,lime 33.3%,cyan 50%,blue 66.7%,magenta 83.3%,red 100%);cursor:pointer}
#dgInkHue::-webkit-slider-runnable-track{height:9px;background:transparent}
#dgInkHue::-moz-range-track{height:9px;background:transparent}
#dgInkHue::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:17px;height:17px;margin-top:-4px;border-radius:50%;background:#355d49;border:2px solid white;box-shadow:0 0 0 1px #355d49}
#dgInkHue::-moz-range-thumb{width:13px;height:13px;background:#355d49;border:2px solid white;border-radius:50%;box-shadow:0 0 0 1px #355d49}
.dg-ink-picked{display:flex;align-items:center;gap:9px;font-size:10px;color:#355d49;font-variant-numeric:tabular-nums}
.dg-ink-picked span:first-child{width:24px;height:24px;flex:0 0 24px;border-radius:50%;background:#537863;border:1px solid #d5ddce}
@media(max-width:850px){.dg-ink-shade{height:99px}.left .dg-ink-panel{padding:8px 7px 9px}}
@media(max-width:520px){.left .dg-custom-toggle{gap:3px;font-size:9px}.dg-custom-swatch{width:16px;height:16px;flex-basis:16px}.dg-ink-chevron{width:12px;height:12px;flex-basis:12px}.dg-ink-picked{font-size:9px}}

/* v36: Drawing Studio Canvas view, aligned with Sketch Garden's footer. */
.dg-canvas-footer{min-height:56px;padding:6px 12px;gap:10px;}
.dg-canvas-footer #status{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dg-footer-actions{display:flex;align-items:center;gap:12px;min-width:0;margin-left:auto;}
.dg-canvas-footer #dimensions{font-size:10px;color:#7a7a6b;white-space:nowrap;}
.dg-canvas-view{display:flex;align-items:center;gap:4px;padding:5px 7px;border:1px solid #d6e1d5;border-radius:11px;background:#fffdf8;box-shadow:0 1px 3px rgba(40,70,50,.04);flex:0 0 auto;}
.dg-canvas-view-heading{font-size:9px;letter-spacing:.12em;color:#936d41;font-weight:800;white-space:nowrap;margin:0 7px 0 4px;}
.dg-canvas-view button{height:33px;min-height:33px;display:inline-flex;gap:6px;align-items:center;justify-content:center;padding:6px 9px;border-radius:7px;border:1px solid transparent;background:transparent;color:#355d49;font-size:11px;font-weight:700;white-space:nowrap;}
.dg-canvas-view button:hover{background:#f0f4ed;border-color:#d5e2d4;}
.dg-canvas-view button:focus-visible{outline:2px solid #355d49;outline-offset:1px;}
.dg-canvas-view img{width:17px;height:17px;object-fit:contain;flex-shrink:0;pointer-events:none;}
.dg-canvas-view svg{width:17px;height:17px;flex-shrink:0;pointer-events:none;}
.dg-canvas-view-pan.active,.dg-canvas-view-pan[aria-pressed=true]{background:#eaf0e1;border-color:#355d49;box-shadow:inset 0 0 0 1px #355d49;}
.dg-canvas-view-divider{height:23px;flex:0 0 1px;background:#e4ddce;margin:0 4px;}
.dg-canvas-zoom{display:flex;align-items:center;gap:2px;min-width:0;}
.dg-zoom-label{font-size:10px;color:#647968;font-weight:650;margin:0 4px 0 2px;}
.dg-canvas-zoom button{min-width:30px;width:30px;padding:5px;}
.dg-canvas-zoom output{min-width:42px;text-align:center;font-size:11px;line-height:1;font-weight:750;color:#294b3b;font-variant-numeric:tabular-nums;white-space:nowrap;}
.dg-canvas-view .dg-zoom-fit{background:#f6f1e6;border-color:#e3d5b7;color:#355d49;}
.dg-canvas-view .dg-zoom-fit:hover{background:#f0e8d5;border-color:#d4b575;}
@media(max-width:1370px){.dg-canvas-footer #status{display:none}.dg-canvas-view-heading{display:none}.dg-canvas-footer #dimensions{display:none}.dg-footer-actions{margin-left:auto;}}
@media(max-width:1000px){.dg-canvas-footer{justify-content:flex-end}.dg-zoom-label{display:none}.dg-canvas-view-divider{margin:0 1px}.dg-canvas-view{padding:4px 5px;gap:1px}.dg-canvas-view button{padding:5px 6px;gap:3px}}
@media(max-width:850px){.dg-canvas-footer{min-height:76px;padding:4px 6px}.dg-footer-actions{width:100%;justify-content:center}.dg-canvas-view{width:100%;min-width:0;display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:31px 29px;gap:3px 5px;border:0;background:transparent;box-shadow:none;padding:3px}.dg-canvas-view-heading,.dg-canvas-view-divider{display:none}.dg-canvas-view .dg-canvas-view-pan{grid-column:1;grid-row:1 / 3;height:62px;min-height:62px;width:40px;min-width:40px;flex-direction:column;gap:1px;background:#f3f7f0;border:1px solid #dbe5d8;padding:2px}.dg-canvas-view-pan span{font-size:8px;white-space:normal;line-height:1.15;text-align:center}.dg-canvas-zoom{grid-column:2;grid-row:1;justify-content:space-between;width:100%;background:#fff;border:1px solid #dbe5d8;border-radius:7px;gap:0}.dg-canvas-zoom button{height:29px;min-height:29px;min-width:27px;width:27px}.dg-canvas-zoom output{font-size:10px}.dg-canvas-view .dg-zoom-fit{grid-column:2;grid-row:2;min-height:29px;height:29px;width:100%;padding:3px 5px;font-size:10px}.dg-zoom-fit img{width:15px;height:15px}}


/* v37 · a quiet 2px gold-brown divider beneath both drawing tabs, without altering tab spacing. */
#freeDrawPanel, #gridDrawPanel { position: relative; }
#freeDrawPanel::before, #gridDrawPanel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: #d2ab66; pointer-events: none; z-index: 6;
}
/* v37 · warmer dotted canvas surround (paper and drawn art remain unchanged). */
#workspace {
  background-color: #f7f3eb;
  background-image: radial-gradient(#ded4c3 0.7px, transparent 0.7px);
}

/* v38 · Paper colour has its own trailing Carbon chevron.
   Suppress only the global LEFT details chevron in this nested accordion. */
.right details.dg-paper-colours > summary::before {
  content: none;
  display: none;
}

/* Compact, accessible tabbed keyboard shortcut reference */
.fl-shortcuts{margin:10px 0 13px;padding:13px 15px 15px;background:#f3f5ed;border-left:3px solid #d2ab66;border-radius:0 10px 10px 0;min-width:0}
.fl-shortcuts h3{margin:0 0 9px;color:#8a6845;font-size:14px;font-weight:750;line-height:1.35}
.fl-shortcut-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0 0 10px;border-bottom:1px solid #d7dfd1;padding-bottom:7px}
.fl-shortcut-tabs button{display:block;min-height:36px;padding:7px 9px;border:1px solid #ddcfb5;border-radius:8px;background:#fffdfa;color:#355d49;font-size:11px;font-weight:750;line-height:1.2;text-align:center;cursor:pointer;white-space:normal;box-shadow:none}
.fl-shortcut-tabs button:hover{background:#f8f4eb;border-color:#bb9d6b}
.fl-shortcut-tabs button[aria-selected="true"]{background:#eaf0e1;color:#293f33;border-color:#355d49;box-shadow:inset 0 0 0 1px #355d49}
.fl-shortcut-tabs button:focus-visible{outline:2px solid #c18d42;outline-offset:2px}
.fl-shortcut-panel[hidden]{display:none!important}
.fl-shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fl-shortcut-table{width:100%;border-collapse:collapse;table-layout:auto;background:rgba(255,255,255,.70);border-radius:7px;overflow:hidden;font-family:inherit}
.fl-shortcut-table th{font-size:9px;letter-spacing:.1em;text-transform:uppercase;text-align:left;color:#8a6845;background:#edece1;padding:6px 9px;font-weight:800;line-height:1.2}
.fl-shortcut-table th:first-child{width:37%}
.fl-shortcut-table td{font-size:12px;line-height:1.35;color:#315442;padding:7px 9px;border-bottom:1px solid #e7e8df;vertical-align:middle}
.fl-shortcut-table tr:last-child td{border-bottom:none}
.fl-shortcut-table tbody tr:nth-child(even){background:#fafbf7}
.fl-shortcut-table .fl-key-cell{white-space:normal}
.fl-shortcut-table .fl-key-combo{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap;vertical-align:middle}
.fl-shortcut-table .fl-plus{font-size:11px;color:#8a6845;font-weight:650;line-height:1}
.fl-shortcut-table kbd{display:inline-block;white-space:nowrap;font:700 10px/1.2 system-ui,sans-serif;border:1px solid #d5c9ac;background:#fffdf8;color:#775a38;padding:3px 5px;border-radius:4px;box-shadow:0 1px 0 #e8dfcc}
@media(max-width:560px){
  .fl-shortcuts{padding:12px 10px}
  .fl-shortcut-grid{grid-template-columns:1fr;gap:8px}
  .fl-shortcut-table td{padding:7px 8px;font-size:11px}
  .fl-shortcut-tabs button{font-size:11px;padding:8px 5px}
}

/* Editing commands need more width than single-letter drawing shortcuts. */
.fl-shortcut-panel[id$="-panel-actions"] .fl-shortcut-table th:first-child{width:60%}
.fl-shortcut-panel[id$="-panel-actions"] .fl-key-combo{flex-wrap:nowrap}
@media(max-width:380px){.fl-shortcut-panel[id$="-panel-actions"] .fl-shortcut-table th:first-child{width:64%}}

/* v40: consistent top-bar save and print controls for both drawing modes. */
.header-actions>.grid-save-action{display:none}
.grid-activity .header-actions>.studio-save-action{display:none}
.grid-activity .header-actions>.grid-save-action{display:inline-flex}
.header-actions>.grid-save-action:disabled{opacity:.44;cursor:not-allowed;filter:saturate(.7)}
.header-actions>.grid-save-action:disabled:hover{background:#fff;border-color:var(--border)}
@media(max-width:850px){.grid-activity .header-actions>.grid-save-action{min-height:36px}}
