:root{--paper:#faf8f3;--ink:#303d36;--muted:#72786d;--green:#526b54;--line:#e3e4da;--sage:#e6eadf;--pink:#efdfdf;--serif:Georgia,'Times New Roman',serif;--sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:14px}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{border:0;background:none;color:inherit}a{color:inherit;text-decoration:none}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bd8667;outline-offset:4px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.symbols{position:absolute;width:0;height:0;overflow:hidden}.site-header{max-width:1440px;margin:auto;padding:26px 6%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-family:var(--serif);font-size:30px;letter-spacing:-1.2px;display:flex;align-items:center;gap:14px}.brand-dot{color:#be815e;margin-left:-14px}.brand-flower{width:29px;height:29px;position:relative;display:inline-block}.brand-flower i{position:absolute;width:10px;height:17px;border-radius:100%;left:10px;top:0;transform-origin:5px 15px;background:#9ba788}.brand-flower i:nth-child(2){transform:rotate(60deg);background:#d6a372}.brand-flower i:nth-child(3){transform:rotate(120deg);background:#d89294}.brand-flower i:nth-child(4){transform:rotate(180deg);background:#b3a3ce}.brand-flower i:nth-child(5){transform:rotate(240deg);background:#87a5b2}.brand-flower i:nth-child(6){transform:rotate(300deg);background:#e2c577}nav{display:flex;gap:30px;align-items:center}.nav-link{padding:8px 0;color:var(--muted);font-size:13px}.nav-link.active{color:var(--ink)}.button{background:var(--green);color:white;padding:15px 23px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:20px;font-weight:500;font-size:14px;transition:background .15s,transform .15s}.button:hover{background:#405b43;transform:translateY(-1px)}.button.small{padding:12px 17px;font-size:12px;gap:12px}main{max-width:1440px;margin:auto}.hero{display:grid;grid-template-columns:1fr 1fr;gap:35px;padding:60px 7% 55px;min-height:515px;align-items:center}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.8px;color:var(--muted);display:flex;align-items:center;gap:9px}.eyebrow>span{width:6px;height:6px;background:#8c9e7e;border-radius:50%}h1{font-family:var(--serif);font-size:clamp(45px,4.8vw,72px);font-weight:normal;letter-spacing:-2.3px;line-height:1.06;margin:25px 0 22px}h1 em{color:#7a916e;font-weight:normal}.hero-copy>p{font-size:15px;line-height:1.9;color:var(--muted);margin-bottom:26px}.hero-caption{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:10px;margin-top:23px}.colour-dots{display:flex;padding-left:3px}.colour-dots i{width:16px;height:16px;border:2px solid var(--paper);border-radius:50%;margin-left:-3px;background:#b1c0a5}.colour-dots i:nth-child(2){background:#d0b2b3}.colour-dots i:nth-child(3){background:#dcca91}.colour-dots i:nth-child(4){background:#9fa9c1}.hero-art{height:400px;position:relative;background:#edece4;border-radius:48% 48% 43% 43%;max-width:530px;min-width:0}.sample-paper{position:absolute;background:#fff;padding:10px;box-shadow:0 13px 22px #26332213;width:48%;height:78%;top:11%}.sample-paper img{width:100%;height:100%;object-fit:contain}.paper-back{transform:rotate(-12deg);left:5%;top:10%}.paper-front{transform:rotate(9deg);right:10%;background:#fffefa}.art-note{position:absolute;right:7%;top:0;font-family:var(--serif);font-size:14px;font-style:italic;transform:rotate(7deg)}.art-label{position:absolute;left:18%;bottom:0;font-family:var(--serif);font-size:16px;font-style:italic;transform:rotate(-4deg)}.pencil{position:absolute;bottom:30px;right:5%;width:12px;height:210px;border-radius:3px 3px 0 0;transform:rotate(20deg);background:linear-gradient(90deg,#638269 35%,#8ca68f 35% 67%,#4e7155 67%);box-shadow:4px 8px 6px #0001}.pencil:after{content:'';position:absolute;bottom:-25px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:25px solid #c7a484}.pencil-two{right:1%;bottom:22px;transform:rotate(28deg);height:175px;background:linear-gradient(90deg,#c5828b 35%,#dfabb2 35% 67%,#a96973 67%)}.library{padding:40px 6% 60px;border-top:1px solid var(--line)}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}h2{font-family:var(--serif);font-weight:normal;font-size:32px;letter-spacing:-.7px;margin:12px 0 0}.count-pill{font-size:11px;border:1px solid var(--line);padding:8px 13px;border-radius:20px;color:var(--muted);white-space:nowrap}.library-controls{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:30px}.filters{display:flex;gap:6px;flex-wrap:wrap}.filters button{border-radius:22px;padding:9px 15px;color:var(--muted);font-size:12px;border:1px solid transparent}.filters button:hover{border-color:var(--line)}.filters button.active{background:var(--ink);color:white}.search{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;gap:9px;padding:10px 12px;color:#8b9187;min-width:235px}.search input{background:none;border:0;outline:none;min-width:0;width:100%;font-size:12px;color:var(--ink)}.search svg{width:16px;height:16px}.sub-controls{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:21px 0 25px;font-size:11px;color:var(--muted)}.filter-selects{display:flex;gap:20px;align-items:center}.filter-selects label{display:flex;gap:8px;align-items:center}.filter-selects select{border:0;background:none;font-size:11px;color:var(--ink);max-width:180px}.page-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px}.page-card{text-align:left;padding:0;min-width:0}.page-card .page-preview{position:relative;background:#eeece6;padding:17px;border-radius:9px;height:270px;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:background .2s}.page-card:nth-child(4n+2) .page-preview{background:#e7e9e0}.page-card:nth-child(4n+3) .page-preview{background:#eee3e1}.page-card:nth-child(4n+4) .page-preview{background:#e6e7ed}.page-preview img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #0000000d);transition:transform .25s}.page-card:hover img{transform:scale(1.035)}.page-card h3{font-family:var(--serif);font-size:18px;font-weight:normal;margin:14px 0 7px;letter-spacing:-.3px}.page-meta{display:flex;justify-content:space-between;gap:6px;font-size:10px;color:var(--muted)}.page-hover{position:absolute;bottom:20px;background:var(--green);color:white;border-radius:22px;padding:9px 17px;font-size:11px;opacity:0;transform:translateY(6px);transition:.2s}.page-card:hover .page-hover,.page-card:focus-visible .page-hover{opacity:1;transform:none}.saved-chip{position:absolute;top:10px;right:10px;background:white;padding:5px 8px;border-radius:12px;font-size:9px;color:var(--green)}.load-more{display:flex;align-items:center;gap:12px;margin:40px auto 0;border:1px solid #c8cec1;border-radius:7px;padding:12px 24px;font-size:12px}.empty-state{text-align:center;padding:50px;color:var(--muted)}.empty-state h3{font:26px var(--serif);color:var(--ink)}.how-strip{border-top:1px solid var(--line);display:grid;grid-template-columns:1.1fr 1fr 1fr 1fr;gap:30px;padding:38px 6%;background:#f0f1e9}.tiny-label{font-size:9px;letter-spacing:1.5px;color:var(--muted);padding-top:6px}.step-no{font-size:10px;color:#9aab91}.how-strip h3{font-family:var(--serif);font-weight:normal;font-size:20px;margin:10px 0}.how-strip p{font-size:11px;color:var(--muted);line-height:1.7;margin:0}footer{display:flex;max-width:1440px;margin:auto;align-items:center;justify-content:space-between;padding:25px 6%;gap:16px}footer p,footer .nav-link{font-size:10px;color:var(--muted)}.footer-brand{font:21px var(--serif);letter-spacing:-.7px}
/* The studio */
#studio{height:100dvh;overflow:hidden;background:#e9ece4}.studio-header{height:70px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:12px}.icon-text{display:flex;align-items:center;gap:7px;font-size:12px;padding:10px;border-radius:5px}.icon-text:hover,.icon-btn:hover{background:#e8ece2}.icon-btn{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;flex-shrink:0}.studio-title{display:flex;flex-direction:column;gap:5px;min-width:0}.studio-title strong{font-family:var(--serif);font-weight:normal;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio-title>span{font-size:10px;color:var(--muted)}.studio-actions{display:flex;gap:6px;align-items:center}.studio-actions .button{margin-left:12px}.studio-body{display:grid;grid-template-columns:280px 1fr;height:calc(100dvh - 70px)}.tool-panel{background:var(--paper);padding:18px 20px;overflow-y:auto;border-right:1px solid var(--line);scrollbar-width:thin}.panel-heading{display:flex;align-items:center;justify-content:space-between;font:22px var(--serif);margin-bottom:16px}.panel-heading button{font:17px var(--serif);border:1px solid var(--line);width:25px;height:25px;border-radius:50%}.mode-tabs{display:flex;background:#eeeee7;border-radius:6px;padding:3px;gap:2px}.mode-tabs button{flex:1;padding:8px 2px;font-size:10px;border-radius:4px;white-space:nowrap}.mode-tabs button.active{background:white;box-shadow:0 1px 4px #0000000c;color:var(--green);font-weight:600}.tool-hint{font-size:10px;line-height:1.6;color:var(--muted);min-height:32px;margin:11px 0 13px}.brush-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.brush-button{border:1px solid var(--line);border-radius:6px;padding:7px 4px 9px;font-size:9px;display:flex;flex-direction:column;align-items:center;gap:6px}.brush-button.active{border-color:var(--green);background:#e8eee3;color:#405c42}.brush-sample{width:46px;height:18px;display:block;border-radius:50%;transform:rotate(-8deg);background:#9aa894}.brush-sample.pencil{position:static;box-shadow:none;background:repeating-linear-gradient(125deg,#7c917370 0 1px,transparent 1px 3px);width:46px;height:18px;transform:rotate(-8deg)}.brush-sample.pencil:after{display:none}.brush-sample.marker{border-radius:4px;background:#94a990}.brush-sample.paint{background:linear-gradient(0deg,#667e58,#9aad8f);border-radius:10px 35% 35% 8px}.brush-sample.watercolour{background:radial-gradient(ellipse,#98b19650 35%,#879e8550 50%,#afc4a840 65%,transparent 75%)}.brush-sample.airbrush{background:radial-gradient(ellipse,#6e896680,transparent 70%)}.brush-sample.pastel{background:repeating-radial-gradient(ellipse,#8fa38580 1px,transparent 3px,#8da18390 5px)}.brush-sample.glitter{background:radial-gradient(circle at 25% 25%,#efdeb1 0 1px,transparent 2px),radial-gradient(circle at 60% 60%,white 0 1px,transparent 2px),#9daf92;background-size:8px 9px,11px 8px,auto}.brush-sample.gradient{background:linear-gradient(90deg,#648460,#e6dab5)}.brush-sample.fill{border-radius:6px;background:#78976e}.utility-tools{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin-top:12px;padding:8px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.utility-tools .icon-text{font-size:9px;padding:7px 2px;gap:5px}.utility-tools svg{width:16px;height:16px}.utility-tools button.active{background:var(--sage);color:var(--green)}.tool-settings{margin:14px 0 19px;display:grid;gap:13px}.tool-settings label{font-size:10px;color:var(--muted);display:block}.tool-settings output{float:right;color:var(--ink);font-size:10px}input[type=range]{accent-color:var(--green);width:100%;height:5px;margin:10px 0 0;cursor:pointer}.tool-settings .gap-setting{display:flex;gap:6px;align-items:center;font-size:9px}.gap-setting input{accent-color:var(--green)}.palette-heading{display:flex;justify-content:space-between;align-items:center;font-family:var(--serif);font-size:18px;margin-bottom:14px}.palette-heading select{font:10px var(--sans);background:none;border:0;color:var(--muted);width:82px}.swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.swatch{width:28px;height:28px;border-radius:50%;margin:auto;border:2px solid transparent;outline:1px solid #00000008;outline-offset:2px}.swatch.active{border-color:var(--paper);outline:2px solid var(--ink)}.custom-colour{display:flex;justify-content:space-between;align-items:center;margin:17px 0;font-size:9px;color:var(--muted)}.custom-colour label{display:flex;gap:7px;align-items:center}.custom-colour input{width:26px;height:26px;padding:0;border:0;background:none;cursor:pointer}.custom-colour button{border:1px solid var(--line);border-radius:4px;padding:6px 8px}.shade-control{display:flex;gap:15px;align-items:center;font-size:10px;color:var(--muted)}.shade-control label{flex:1}.shade-control input{background:linear-gradient(90deg,#111,#ddd)}#current-colour{width:27px;height:27px;border-radius:50%;background:#638765}.panel-bottom{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding-top:17px;margin-top:23px;font-size:10px;color:var(--muted)}.panel-bottom button{display:flex;align-items:center;gap:5px}.panel-bottom svg{width:15px;height:15px}.selection-info{font-size:9px;color:var(--muted);background:var(--sage);padding:9px;border-radius:4px;display:flex;justify-content:space-between;margin-top:8px}.selection-info button{text-decoration:underline}.canvas-area{display:flex;flex-direction:column;overflow:hidden;position:relative}.canvas-topline,.canvas-bottomline{display:flex;justify-content:space-between;align-items:center;padding:14px 24px;font-size:10px;color:var(--muted);gap:12px}.canvas-topline{height:55px}.canvas-bottomline{height:45px;border-top:1px solid #dadfd4}.canvas-bottomline button{display:flex;gap:8px;align-items:center;white-space:nowrap}.canvas-bottomline svg{width:15px;height:15px}.zoom-controls{display:flex;gap:4px;align-items:center;background:#faf8f38c;border:1px solid #d8ddd1;border-radius:6px;padding:3px}.zoom-controls button{min-width:26px;height:25px;font-size:15px}.zoom-controls #zoom-fit{font-size:10px;min-width:40px}.viewport{flex:1;position:relative;overflow:hidden;touch-action:none;display:flex;align-items:center;justify-content:center}.canvas-wrap{position:absolute;transform-origin:center;width:400px;height:550px;box-shadow:0 6px 23px #2833231a;background:white;will-change:transform;touch-action:none}.canvas-wrap canvas{width:100%;height:100%;display:block;position:absolute;inset:0;touch-action:none}#selection-overlay{pointer-events:none}.canvas-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;background:#e9ece4d9;z-index:2;font-size:12px}.loader{width:20px;height:20px;border:2px solid #c8d0c1;border-top-color:var(--green);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}dialog{border:1px solid var(--line);background:var(--paper);border-radius:14px;padding:32px;max-width:500px;width:calc(100% - 35px);color:var(--ink);box-shadow:0 20px 80px #0002}dialog::backdrop{background:#26332266}dialog h2{margin:0 0 18px;font-size:28px}dialog p,dialog li{font-size:13px;line-height:1.8;color:var(--muted)}dialog li{margin-bottom:10px}dialog .button{margin-top:20px;padding:11px 23px}.dialog-close{position:absolute;right:12px;top:12px}.dialog-actions{display:flex;justify-content:flex-end;gap:16px;align-items:center}.dialog-actions .button{margin-top:0}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:white;border-radius:7px;padding:13px 20px;font-size:12px;z-index:100;max-width:calc(100% - 30px);transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:1600px){.page-card .page-preview{height:300px}.tool-panel{padding-top:25px}.studio-body{grid-template-columns:300px 1fr}}
@media(max-width:1000px){.site-header{padding:22px 5%}.hero{padding:45px 5%;gap:20px}.hero-art{height:340px}.library{padding-left:5%;padding-right:5%}.library-controls{flex-direction:column;align-items:stretch}.search{width:100%}.page-grid{grid-template-columns:repeat(3,1fr)}.how-strip{grid-template-columns:repeat(3,1fr)}.tiny-label{grid-column:1/-1}.studio-body{grid-template-columns:245px 1fr}.tool-panel{padding:15px}.canvas-topline,.canvas-bottomline{padding-left:14px;padding-right:14px}.canvas-bottomline>span:first-child{display:none}}
@media(max-width:650px){.site-header{padding:20px}.brand{font-size:26px;gap:10px}.brand-dot{margin-left:-10px}nav{gap:14px}.site-header nav>.button{display:none}.nav-link{font-size:11px}.hero{grid-template-columns:1fr;padding:38px 25px 32px;gap:25px}.hero-copy{position:relative}h1{font-size:55px;margin-top:20px}.hero-copy>p{font-size:13px}.hero-art{height:310px;width:100%;max-width:430px;margin:auto}.art-note{right:3%}.art-label{left:15%;font-size:14px}.pencil{height:170px}.pencil-two{height:140px}.hero-caption{margin-top:15px}.library{padding:32px 20px 40px}.section-heading{align-items:flex-start}h2{font-size:26px}.count-pill{font-size:9px;padding:6px 9px;margin-top:20px}.filters{gap:4px}.filters button{padding:8px 11px;font-size:10px}.sub-controls{align-items:flex-start;flex-direction:column;gap:13px}.filter-selects{gap:14px;flex-wrap:wrap}.filter-selects select{max-width:140px}.page-grid{grid-template-columns:repeat(2,1fr);gap:23px 14px}.page-card .page-preview{height:220px;padding:12px}.page-card h3{font-size:16px;line-height:1.25}.page-meta{font-size:9px}.page-hover{display:none}.how-strip{grid-template-columns:1fr;padding:27px 25px;gap:22px}.how-strip>div{display:grid;grid-template-columns:30px 1fr;gap:0 10px;align-items:center}.how-strip h3{margin:0;font-size:19px}.how-strip p{grid-column:2}.step-no{grid-row:1/3}footer{flex-wrap:wrap;padding:23px 20px;gap:8px}footer>.nav-link{width:100%;text-align:left}.studio-header{height:58px;padding:0 8px;gap:4px}.studio-header>.icon-text{font-size:10px;padding:6px}.studio-header>.icon-text svg{width:16px;height:16px}.studio-title strong{font-size:14px;max-width:170px}.studio-title>span{font-size:8px}.studio-actions{gap:0}.studio-actions .icon-btn{width:28px;height:32px}.studio-actions svg{width:17px;height:17px}.studio-actions .button{padding:9px;margin-left:3px}.studio-actions .button>span{display:none}.studio-body{height:calc(100dvh - 58px);display:flex;flex-direction:column-reverse}.canvas-area{flex:1;min-height:220px}.canvas-topline{height:38px;padding:5px 12px;font-size:9px}.canvas-bottomline{height:30px;padding:5px 12px;font-size:9px}.tool-panel{height:255px;flex-shrink:0;overflow-y:auto;padding:10px 13px;border-top:1px solid var(--line);border-right:0;display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.panel-heading{display:none}.mode-tabs{grid-column:1/-1}.mode-tabs button{font-size:11px;padding:7px}.tool-hint{grid-column:1/-1;min-height:0;margin:0;font-size:9px}.brush-tools{grid-column:1;grid-row:3/6;gap:5px}.brush-button{font-size:8px;padding:4px 2px;gap:3px}.brush-sample{height:13px;width:32px}.brush-sample.pencil{height:13px;width:32px}.utility-tools{grid-column:1;grid-row:6;border:0;margin:0;padding:0}.utility-tools .icon-text{font-size:8px;padding:5px 1px}.utility-tools svg{width:12px;height:12px}.palette-heading{grid-column:2;grid-row:3;font-size:15px;margin:0}.swatches{grid-column:2;grid-row:4;gap:7px}.swatch{width:21px;height:21px}.custom-colour{grid-column:2;grid-row:5;margin:0;font-size:8px}.custom-colour input{width:21px;height:21px}.custom-colour button{font-size:8px;padding:5px}.shade-control{grid-column:2;grid-row:6;font-size:8px}.tool-settings{grid-column:1/-1;grid-row:7;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:5px 0}.tool-settings .gap-setting{grid-column:1/-1}.panel-bottom{grid-column:1/-1;margin:0;padding-top:8px}.selection-info{grid-column:1/-1;margin:0}.canvas-wrap{box-shadow:0 3px 15px #0001}dialog{padding:27px}.canvas-area .zoom-controls{padding:0}.zoom-controls button{height:23px}.page-position{display:none}}
@media(max-width:380px){.brand{font-size:23px}.brand{gap:6px}.brand-flower{transform:scale(.8)}.studio-title strong{max-width:120px}.page-card .page-preview{height:180px}.tool-panel{grid-template-columns:1fr 1fr;gap:7px 10px}.swatch{width:19px;height:19px}.swatches{gap:5px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.sheet-thumbnail{width:100%;height:100%;display:flex;flex-direction:column;background:#fffefa;box-shadow:0 3px 8px #2633220a}
.sample-paper{display:flex;flex-direction:column}
.sample-paper>img{flex:1;min-height:0;height:calc(100% - 22px)}
.hero-sheet-brand{height:22px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-top:1px solid #eaede5;background:#fffefa}
.hero-sheet-brand img{width:77px;height:16px;object-fit:contain}
.page-preview .sheet-thumbnail img.page-art{flex:1;min-height:0;object-fit:contain;width:100%;height:calc(100% - 22px);filter:none}
.sheet-brand{height:22px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-top:1px solid #eaede5}
.page-preview .sheet-brand img{width:77px;height:16px;object-fit:contain;filter:none;transform:none!important}
.canvas-wrap{display:flex;flex-direction:column}
.art-surface{flex:1;min-height:0;position:relative;width:100%}
.page-brand{height:30px;flex-shrink:0;background:#fffefa;display:flex;align-items:center;justify-content:center;border-top:1px solid #e5e7df;pointer-events:none}
.page-brand img{width:100px;max-height:90%;height:auto;object-fit:contain}
.gap-setting select{font-size:9px;border:1px solid var(--line);background:white;border-radius:4px;padding:3px 4px;max-width:90px;color:var(--ink);margin-left:auto}
.tool-settings .gap-setting{min-height:20px}
/* Readable controls and legal information. */
:root{--muted:#5e685f}
body{font-size:16px;line-height:1.5}
.nav-link,.button.small{font-size:14px;min-height:44px}
.button{font-size:16px;min-height:48px}
.eyebrow,.tiny-label{font-size:14px;letter-spacing:1.1px}
.hero-copy>p{font-size:17px;line-height:1.8}
.hero-caption{font-size:14px;line-height:1.6}
.art-note,.art-label{font-size:17px}
.count-pill,.filters button,.search input,.filter-selects label,.filter-selects select,.sub-controls,.page-meta,.saved-chip,.page-hover,.load-more{font-size:14px}
.filters button{min-height:42px;padding:10px 16px}
.search{min-height:48px;min-width:260px}.search input{font-size:16px}
.filter-selects label{flex-wrap:wrap;gap:8px}.filter-selects select{max-width:250px;min-height:42px;border:1px solid var(--line);border-radius:5px;background:#fffefa;padding:7px 10px}
.page-card h3{font-size:21px;line-height:1.35}
.saved-chip{padding:5px 10px}
.how-strip h3{font-size:24px}.how-strip p{font-size:15px}.step-no{font-size:14px}
.studio-body{grid-template-columns:320px 1fr}
.panel-heading{font-size:25px}.mode-tabs button{font-size:13px;min-height:42px}
.tool-hint{font-size:13px;line-height:1.55;min-height:40px}
.brush-button{font-size:12px;min-height:61px;gap:8px}.utility-tools .icon-text{font-size:12px;min-height:44px}
.tool-settings label,.tool-settings output,.tool-settings .gap-setting,.custom-colour,.custom-colour button,.shade-control,.selection-info,.panel-bottom{font-size:13px}
.gap-setting select{font-size:13px;min-height:34px}.gap-setting input,.storage-toggle input{width:20px;height:20px}
.palette-heading{font-size:23px}.palette-heading select{font-size:13px;min-height:36px;width:95px}
.swatch{width:34px;height:34px}.swatches{gap:12px}
.custom-colour input{width:34px;height:34px}.custom-colour button{min-height:36px}.shade-control #current-colour{width:34px;height:34px}
.brush-preview-row{grid-column:1/-1;font-size:13px;color:var(--muted)}.brush-preview-row canvas{display:block;width:100%;height:62px;background:#fffefa;border:1px solid var(--line);border-radius:6px;margin-top:7px}
input[type=range]{height:9px;margin-top:14px}
.studio-title>span{font-size:12px}.studio-header>.icon-text{font-size:14px}.canvas-topline,.canvas-bottomline{font-size:13px}
.zoom-controls #zoom-fit{font-size:13px;min-width:48px}.zoom-controls button{min-width:32px;min-height:32px}
.canvas-topline{height:62px}.canvas-bottomline{height:50px}
.project-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px;font-size:13px}.project-actions button{min-height:42px;border:1px solid var(--line);padding:8px 10px;border-radius:6px;background:white}
.studio-policy-links{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin-top:20px}.studio-policy-links a,.studio-policy-links button{padding:8px 0;min-height:38px;text-decoration:underline;text-underline-offset:3px}
.canvas-bottomline #page-position{max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.studio-focus .tool-panel{display:none}.studio-focus .studio-body{grid-template-columns:1fr}
#home .eyebrow,#home .tiny-label,#home .page-meta,#home .saved-chip,#home .footer-bottom{font-size:14px}
#focus-mode{font-size:13px;min-height:40px}
.skip-link{position:absolute;left:15px;top:-80px;background:var(--ink);color:white;padding:14px;z-index:200;border-radius:6px}.skip-link:focus{top:10px}
.site-footer{display:block;padding:38px 6% 28px;border-top:1px solid var(--line)}
.footer-top{display:flex;justify-content:space-between;gap:30px;align-items:flex-start}.footer-brand{font-size:32px}.footer-top p{font-size:15px;line-height:1.8;margin:10px 0 20px}.footer-contact{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.footer-contact>a{font-size:15px;text-decoration:underline;text-underline-offset:4px}.footer-contact .nav-link{font-size:14px}
.legal-nav{display:flex;flex-wrap:wrap;gap:10px 24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.legal-nav a,.legal-nav button{font-size:14px;line-height:1.5;padding:8px 0;min-height:38px;text-align:left;color:var(--ink)}.legal-nav a:hover,.legal-nav button:hover{text-decoration:underline;text-underline-offset:4px}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:19px;color:var(--muted);font-size:14px}
.storage-notice{position:fixed;bottom:18px;left:18px;max-width:480px;z-index:80;background:var(--paper);border:1px solid #bac6b1;border-radius:10px;padding:17px 20px;box-shadow:0 6px 25px #0002;font-size:14px}.storage-notice p{margin:0 0 12px;line-height:1.6}.storage-notice>div{display:flex;gap:18px}.storage-notice button{min-height:40px;font-size:14px;text-decoration:underline;text-underline-offset:3px}.storage-notice a{text-decoration:underline}
.storage-toggle{display:flex;align-items:center;gap:10px;font-size:16px;line-height:1.5;margin:20px 0}.storage-note{font-size:14px!important}.storage-note a{text-decoration:underline}.destructive-button{border:1px solid #bc8a7c;border-radius:6px;color:#8f3e31;padding:12px 16px;min-height:44px;font-size:14px}
dialog p,dialog li{font-size:16px;line-height:1.75}dialog .button{font-size:15px}.dialog-actions button{font-size:15px;min-height:44px}
@media(max-width:1000px){.studio-body{grid-template-columns:290px 1fr}.page-card h3{font-size:20px}.filter-selects{flex-wrap:wrap}.library-controls{align-items:stretch}}
@media(max-width:650px){
 .site-header{flex-wrap:wrap;gap:10px;padding:19px 20px}.site-header nav{width:100%;justify-content:flex-start;gap:25px}.site-header .nav-link{font-size:15px}
 .hero-copy>p{font-size:16px}.hero-caption{font-size:14px}.hero{padding-top:30px}.eyebrow,.tiny-label{font-size:13px}
 .section-heading{flex-direction:column;gap:12px}.count-pill{margin-top:0}.library-controls{margin-top:22px}.filters button{font-size:14px;padding:9px 13px}
 .filter-selects{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:14px}.filter-selects label{display:flex;flex-direction:column;align-items:stretch;font-size:14px}.filter-selects select{width:100%;max-width:none;font-size:14px}.page-meta{font-size:13px;flex-wrap:wrap}.page-card h3{font-size:19px}.saved-chip{font-size:12px}
 .studio-header{height:64px;padding:0 8px}.studio-body{height:calc(100dvh - 64px)}.studio-title strong{font-size:16px;max-width:165px}.studio-title>span{font-size:11px}.studio-header>.icon-text{font-size:12px}.studio-actions .icon-btn{width:30px}#focus-mode{font-size:12px;padding:7px}
 .tool-panel{display:block;height:300px;padding:14px 16px;overflow-y:auto}.mode-tabs{margin-bottom:9px}.mode-tabs button{font-size:14px}.tool-hint{font-size:13px;min-height:0;margin:0 0 12px}.brush-tools{gap:9px}.brush-button{font-size:13px;min-height:60px}.brush-sample,.brush-sample.pencil{width:46px;height:18px}.utility-tools{margin-top:12px;border-bottom:1px solid var(--line);padding:8px 0}.utility-tools .icon-text{font-size:13px;padding:8px;min-height:42px}.utility-tools svg{width:18px;height:18px}
 .tool-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.tool-settings label,.tool-settings output,.tool-settings .gap-setting{font-size:14px}.gap-setting select{font-size:13px;max-width:100px}.tool-settings .gap-setting{grid-column:1/-1;justify-content:flex-start}.palette-heading{margin:22px 0 15px;font-size:23px}.palette-heading select{width:100px;font-size:14px}.swatches{gap:15px}.swatch{width:34px;height:34px}.custom-colour{margin:17px 0;font-size:14px}.custom-colour button,.custom-colour label{font-size:13px}.custom-colour input{width:34px;height:34px}.shade-control{font-size:14px}.panel-bottom{margin-top:20px;padding-top:15px;font-size:14px}.selection-info{margin-top:10px;font-size:13px}.project-actions{margin-top:20px}
 .canvas-topline{height:48px;padding:5px 11px;font-size:12px}.canvas-bottomline{height:40px;padding:5px 11px;font-size:12px}.zoom-controls #zoom-fit{font-size:12px}.zoom-controls button{min-height:31px}
 .footer-top{flex-direction:column;gap:12px}.footer-contact{align-items:flex-start}.site-footer{padding:30px 20px}.legal-nav{gap:10px 22px}.footer-bottom{font-size:13px;line-height:1.65}.storage-notice{bottom:10px;left:10px;max-width:calc(100% - 20px);padding:15px}
}
@media(max-width:380px){.studio-title strong{max-width:120px}.studio-header>.icon-text{font-size:11px}.studio-actions .icon-btn{width:25px}.studio-actions .button{padding:8px}.tool-panel{height:285px}.swatches{gap:13px}}
@media print{body>*{display:none!important}body>img.print-art{display:block!important;width:100%;height:95vh;object-fit:contain}}

/* Phones: give the page more of the screen. The larger-text block above sets desktop
   heights for the bars and swatches, and on a phone those left the page under half the
   screen (387px of 839 on a Pixel 7). The tools scroll inside their own panel. */
@media(max-width:650px){
.studio-header{height:52px}
.studio-body{height:calc(100dvh - 52px)}
.canvas-topline{height:38px;padding:4px 12px;font-size:12px}
.canvas-bottomline{height:34px;padding:4px 12px;font-size:12px}
.zoom-controls button{min-height:28px;min-width:30px}
.tool-panel{height:min(240px,32dvh);padding:8px 12px}
.swatch,.custom-colour input,.shade-control #current-colour{width:30px;height:30px}
.swatches{gap:9px}
}

/* The flower mark in the studio header, beside the way back to the library. */
.studio-logo{width:26px;height:26px;display:block;flex-shrink:0}
@media(max-width:650px){.studio-logo{width:22px;height:22px}}

/* Tips and the first-visit tour (guide.js). */
.guide-tip{position:fixed;z-index:300;max-width:240px;padding:8px 11px;border-radius:6px;background:var(--ink);color:#fffefa;font-size:13px;line-height:1.45;pointer-events:none;box-shadow:0 4px 14px #2833232e}
.guide-tip[hidden],.guide-ring[hidden],.guide-card[hidden]{display:none}
.guide-ring{position:fixed;z-index:290;border-radius:10px;box-shadow:0 0 0 3px var(--green),0 0 0 9999px #26332259;pointer-events:none;transition:all .2s ease}
.guide-card{position:fixed;z-index:300;width:min(320px,calc(100vw - 16px));background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:16px 18px 14px;box-shadow:0 10px 30px #2833233a}
.guide-card h2{font-family:var(--serif);font-weight:normal;font-size:21px;margin:2px 0 6px}
.guide-card p{margin:0;font-size:14px;line-height:1.55}
.guide-count{color:var(--muted);font-size:12px!important;letter-spacing:.04em}
.guide-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px}
.guide-actions span{display:flex;gap:8px;align-items:center}
.guide-skip,.guide-back{font-size:13px;color:var(--muted);min-height:40px;padding:0 6px;text-decoration:underline;text-underline-offset:3px}
.guide-back{color:var(--ink);text-decoration:none}
.guide-next{min-height:40px}
.guide-replay{margin-top:14px;min-height:42px;border:1px solid var(--line);padding:8px 12px;border-radius:6px;background:white;font-size:14px}
@media(prefers-reduced-motion:reduce){.guide-ring{transition:none}}
.guide-next{padding:10px 16px;gap:8px}

/* Footer: the flower beside the name, and a compact layout on phones, where
   the links had wrapped into uneven rows with large gaps between the blocks. */
.footer-brand{display:inline-flex;align-items:center;gap:10px}
.footer-brand .brand-flower{transform:scale(.85)}
@media(max-width:650px){
.site-footer{padding:22px 18px 18px}
.footer-top{gap:2px}
.footer-brand{font-size:25px;gap:6px}
.footer-brand .brand-flower{transform:scale(.75)}
.footer-top p{font-size:14px;line-height:1.55;margin:4px 0 6px}
.footer-contact{flex-direction:row;flex-wrap:wrap;align-items:center;gap:0 18px}
.footer-contact>a,.footer-contact .nav-link{font-size:14px;min-height:40px;display:inline-flex;align-items:center}
.legal-nav{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;padding:6px 0;margin-top:6px}
.legal-nav a,.legal-nav button{display:flex;align-items:center;min-height:42px;padding:0;font-size:14px;line-height:1.3}
#home .footer-bottom{flex-direction:column;gap:2px;margin-top:12px;font-size:12px;line-height:1.5}
}
.legal-nav a,.legal-nav button{display:inline-flex;align-items:center}

/* Phone tool tabs (tabs.js). The panel shows the pinned mode switch, the tab
   row, and one group at a time. The earlier phone grid placed every group in a
   fixed row; here each group simply stacks. */
.panel-tabs{display:none}
@media(max-width:650px){
.tool-panel{display:block;height:min(270px,34dvh);padding:8px 12px 10px}
.tool-panel>*{grid-column:auto;grid-row:auto}
.tool-panel>#mode-hint{display:none}
.mode-tabs{margin-bottom:6px}
.mode-tabs button{min-height:34px;font-size:13px;padding:5px 2px}
.panel-tabs{display:flex;gap:4px;margin-bottom:10px;border-bottom:1px solid var(--line);position:sticky;top:-8px;background:var(--paper);z-index:1;padding-top:2px}
.panel-tabs button{flex:1;min-height:38px;font-size:13px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.panel-tabs button[aria-selected="true"]{color:var(--green);border-bottom-color:var(--green);font-weight:600}
.tool-panel[data-tab="colours"]>[data-group]:not([data-group="colours"]),
.tool-panel[data-tab="brushes"]>[data-group]:not([data-group="brushes"]),
.tool-panel[data-tab="settings"]>[data-group]:not([data-group="settings"]),
.tool-panel[data-tab="more"]>[data-group]:not([data-group="more"]){display:none}
.palette-heading{margin:0 0 8px;font-size:17px}
.swatches{grid-template-columns:repeat(9,1fr);gap:8px 6px;justify-items:center}
.custom-colour{margin:10px 0 6px}
.brush-tools{gap:6px}
.brush-button{min-height:52px}
.utility-tools{margin-top:8px;padding:4px 0;border:0}
.tool-settings{margin:0}
.project-actions{margin-top:0}
.studio-policy-links{margin-top:8px}
.panel-bottom{margin-top:8px}
}

/* A larger mark in the site header. */
.site-header .brand{font-size:38px;gap:18px}
.site-header .brand-flower{transform:scale(1.3)}
@media(max-width:650px){.site-header .brand{font-size:31px;gap:14px}.site-header .brand-flower{transform:scale(1.1)}}
@media(max-width:380px){.site-header .brand{font-size:28px;gap:10px}.site-header .brand-flower{transform:scale(.95)}}
.site-header .brand-dot{margin-left:-18px}
@media(max-width:650px){.site-header .brand-dot{margin-left:-14px}}
@media(max-width:380px){.site-header .brand-dot{margin-left:-10px}}
/* Phones: Custom colour and Shade share one row so the Colours tab fits. */
@media(max-width:650px){
.tool-panel>.custom-colour,.tool-panel>.shade-control{display:inline-flex;vertical-align:middle;margin:8px 0 0;font-size:12px}
.tool-panel>.custom-colour{width:47%;margin-right:3%;gap:6px}
.tool-panel>.custom-colour label{gap:6px;font-size:12px}
.tool-panel>.custom-colour button{font-size:12px;padding:4px 7px;min-height:34px}
.tool-panel>.shade-control{width:50%;gap:8px}
.tool-panel>.shade-control input{margin-top:6px}
.tool-panel[data-tab="colours"]>[data-group]:not([data-group="colours"]){display:none}
}
@media(max-width:650px){.palette-heading{margin:0 0 4px}.palette-heading select{min-height:30px}.panel-tabs{margin-bottom:8px}}
@media(max-width:650px){
.tool-panel>.custom-colour{width:53%;margin-right:2%}
.tool-panel>.shade-control{width:45%}
.tool-panel>.custom-colour label,.tool-panel>.custom-colour button,.tool-panel>.shade-control label{white-space:nowrap}
.tool-panel>.shade-control label{display:flex;align-items:center;gap:6px;min-width:0}
.tool-panel>.shade-control input{margin-top:0;min-width:0;flex:1}
.tool-panel>.shade-control #current-colour{width:26px;height:26px;flex-shrink:0}
}
.page-credit{color:var(--muted);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}.page-credit[hidden]{display:none}

/* Phones: every tab fits the panel without scrolling. Brushes sit five to a
   row with a small sample, the four utility tools share one row, and the
   settings sliders pair up. */
@media(max-width:650px){
.tool-panel>.brush-tools{grid-template-columns:repeat(5,1fr);gap:5px}
.tool-panel .brush-button{min-height:0;height:auto;padding:5px 2px 4px;gap:3px;font-size:11px;line-height:1.15}
.tool-panel .brush-button .brush-sample,.tool-panel .brush-sample.pencil{width:30px;height:11px}
.tool-panel>.utility-tools{grid-template-columns:repeat(4,1fr);gap:4px;margin-top:6px;padding:0}
.tool-panel>.utility-tools .icon-text{min-height:40px;font-size:11px;padding:4px 2px;flex-direction:column;gap:2px;justify-content:center;text-align:center;line-height:1.1}
.tool-panel>.utility-tools svg{width:16px;height:16px}
.tool-panel>.tool-settings{grid-template-columns:1fr 1fr;gap:6px 14px}
.tool-panel>.tool-settings label,.tool-panel>.tool-settings output{font-size:12px}
.tool-panel>.tool-settings input[type=range]{margin-top:6px}
.tool-panel>.tool-settings .brush-preview-row{font-size:12px}
.tool-panel>.tool-settings .brush-preview-row canvas{height:30px;margin-top:3px}
.tool-panel>.tool-settings .gap-setting{grid-column:auto;font-size:12px;min-height:34px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tool-panel>.tool-settings .gap-setting select{min-height:30px;font-size:12px}
}
@media(max-width:650px){.tool-panel>.tool-settings .brush-preview-row{display:none}}

/* ===== The studio, page first (mobile.js). One design at every width: the
   page takes the screen, a short sheet at the bottom holds colours, Fill /
   Brush / Eraser and a bar that opens every other tool. Undo, redo and full
   screen float over the page. The tab rules above decide which group shows
   when the sheet is open. ===== */
.studio-body{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;height:calc(100dvh - 64px)!important}
.studio-body>.canvas-area{order:1;flex:1;min-height:0}
.studio-body>.tool-panel{order:2}
.canvas-topline,.canvas-bottomline{display:none!important}
.studio-actions #focus-mode,.studio-actions #undo,.studio-actions #redo{display:none}
.studio-header{height:64px}
.studio-title{align-items:center;text-align:center;flex:1}

.tool-panel{display:block!important;flex-shrink:0;width:min(780px,100%);margin:0 auto;height:auto!important;max-height:none;overflow:visible;
  background:var(--paper);border:1px solid var(--line);border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -8px 28px #2833231c;padding:4px 18px 14px}
.tool-panel:not(.m-open)>*:not(.m-quick){display:none!important}
.tool-panel.m-open{max-height:min(62dvh,560px);overflow-y:auto;overscroll-behavior:contain}
.tool-panel.m-open .m-swatches,.tool-panel.m-open .m-tools{display:none}
.tool-panel>#mode-hint,.tool-panel>.panel-heading{display:none!important}
.panel-tabs{display:flex;gap:4px;margin:4px 0 10px;border-bottom:1px solid var(--line);position:sticky;top:-4px;background:var(--paper);z-index:1}
.panel-tabs button{flex:1;min-height:40px;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.panel-tabs button[aria-selected="true"]{color:var(--green);border-bottom-color:var(--green);font-weight:600}
.tool-panel[data-tab="colours"]>[data-group]:not([data-group="colours"]),
.tool-panel[data-tab="brushes"]>[data-group]:not([data-group="brushes"]),
.tool-panel[data-tab="settings"]>[data-group]:not([data-group="settings"]),
.tool-panel[data-tab="more"]>[data-group]:not([data-group="more"]){display:none!important}
.tool-panel>.mode-tabs{margin:2px 0 6px}
.tool-panel>.brush-tools{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px}
.tool-panel .brush-button{min-height:0;padding:6px 2px 5px;gap:3px;font-size:12px;line-height:1.15}
.tool-panel .brush-button .brush-sample,.tool-panel .brush-sample.pencil{width:34px;height:12px}
.tool-panel>.utility-tools{grid-template-columns:repeat(4,1fr);gap:4px;margin-top:8px;padding:0;border:0}
.tool-panel>.utility-tools .icon-text{min-height:44px;font-size:12px;padding:4px 2px;flex-direction:column;gap:3px;justify-content:center;text-align:center}
.tool-panel>.tool-settings{grid-template-columns:1fr 1fr;gap:8px 18px;margin:0}
.tool-panel>.swatches{grid-template-columns:repeat(auto-fill,minmax(34px,1fr));gap:8px}
.tool-panel>.palette-heading{margin:0 0 8px;font-size:18px}
.m-more{display:flex;gap:10px;margin:0 0 10px}
.m-more button,.project-actions button{min-height:42px;border:1px solid var(--line);padding:8px 14px;border-radius:8px;background:white;font-size:14px}

/* The always-visible part of the sheet */
.m-handle{display:block;width:100%;height:20px;padding:0}
.m-handle span{display:block;width:42px;height:4px;border-radius:2px;background:#d6d8ce;margin:8px auto 0}
.m-swatches{display:flex;gap:10px;overflow-x:auto;padding:6px 2px 10px;scrollbar-width:none;justify-content:safe center}
.m-swatches::-webkit-scrollbar{display:none}
.m-swatch{flex:0 0 38px;width:38px;height:38px;border-radius:50%;border:2px solid #fffefa;box-shadow:0 0 0 1px #e3e4da}
.m-swatch.active{box-shadow:0 0 0 2px #fffefa,0 0 0 4px var(--ink)}
.m-custom{background:conic-gradient(#e0565b,#e8b04b,#8cc06b,#4fb3c9,#7b6fd6,#d35fb7,#e0565b)!important}
.m-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:2px 0 10px}
.m-tools button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:58px;border-radius:16px;font-size:14px;color:var(--ink)}
.m-tools button svg{width:24px;height:24px}
.m-tools button.active{background:#dfe5d6;color:var(--green);font-weight:600}
.m-summary{display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:6px 14px;border:1px solid var(--line);border-radius:26px;background:#fffefa;font-size:15px;text-align:left}
.m-chip{width:28px;height:28px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 2px #fffefa,0 0 0 3px #d6d8ce}
.m-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-summary svg{width:20px;height:20px;transition:transform .2s}
.m-summary[aria-expanded="true"] svg{transform:rotate(180deg)}

/* Floating buttons over the page */
.m-float{position:absolute;left:14px;right:14px;bottom:14px;display:flex;gap:10px;pointer-events:none;z-index:3}
.m-fab{pointer-events:auto;width:48px;height:48px;border-radius:50%;background:#fffefaf0;border:1px solid var(--line);box-shadow:0 3px 12px #2833231f;display:grid;place-items:center;color:var(--ink)}
.m-fab svg{width:22px;height:22px}
.m-fab:disabled{color:#b9bcb2}
.m-full{margin-left:auto}
.studio-focus .studio-body{height:calc(100dvh - 64px)!important}

@media(max-width:650px){
.studio-header{height:56px}
.studio-body,.studio-focus .studio-body{height:calc(100dvh - 56px)!important}
#exit-studio{font-size:0;gap:0}
#exit-studio .studio-logo{display:none}
#exit-studio svg{width:22px;height:22px}
.studio-title strong{max-width:none}
.tool-panel{border-radius:18px 18px 0 0;padding:2px 12px 10px;border-left:0;border-right:0}
.m-swatches{justify-content:flex-start;gap:8px}
.m-swatch{flex-basis:36px;width:36px;height:36px}
.m-tools button{min-height:54px}
.m-float{left:10px;right:10px;bottom:10px}
.m-fab{width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce){.m-summary svg{transition:none}}
.studio-focus .tool-panel{display:none!important}

/* ===== Fold-out strips (mobile.js). The sheet never opens into the old
   panel; each round button fans out one short strip above the sheet. ===== */
.tool-panel{position:relative;padding-top:10px}
.m-handle,.m-summary{display:none!important}
.m-tools{padding-bottom:8px}
.m-chips{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:2px 0 2px}
.m-chip-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:52px;padding:4px 2px;border-radius:14px;border:1px solid var(--line);background:#fffefa;font-size:12px;color:var(--ink);min-width:0}
.m-chip-btn svg{width:20px;height:20px}
.m-chip-btn>span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m-chip-btn[aria-expanded="true"]{background:#dfe5d6;border-color:#c7d0bd;color:var(--green);font-weight:600}
.m-chip-btn.dim{opacity:.55}
.m-dot{display:grid;place-items:center;width:22px;height:22px}
.m-dot::before{content:"";width:var(--d,12px);height:var(--d,12px);border-radius:50%;background:var(--ink)}
.m-colour{width:22px;height:22px;border-radius:50%;box-shadow:0 0 0 2px #fffefa,0 0 0 3px #d6d8ce}
.m-selection .selection-info{display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:4px 4px 8px}
.m-selection .selection-info[hidden]{display:none}

.m-pop{position:absolute;left:10px;right:10px;bottom:calc(100% + 10px);max-height:min(56dvh,440px);overflow-y:auto;overscroll-behavior:contain;
  background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 32px #28332330;padding:12px 14px 14px;z-index:5;
  transform-origin:50% 100%;animation:m-fan .18s ease-out}
.m-pop[hidden]{display:none}
@keyframes m-fan{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
.m-pop-title{margin:0 0 8px;font:600 12px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}

.m-pop #brush-tools{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.m-pop #brush-tools::-webkit-scrollbar{display:none}
.m-pop .brush-button{flex:0 0 76px;min-height:58px;padding:6px 2px;gap:4px;font-size:12px}
.m-pop label{display:block;font-size:13px;color:var(--ink);margin:0 0 10px}
.m-pop label output{float:right;color:var(--muted)}
.m-pop input[type=range]{display:block;width:100%;margin-top:8px}
.m-pop .palette-heading{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px;font-size:17px}
.m-pop .shade-control{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:13px}
.m-pop .shade-control label{flex:1;margin:0}
.m-pop .custom-colour{display:flex;justify-content:space-between;align-items:center;margin:0;font-size:13px}
.m-pop .custom-colour label{display:flex;align-items:center;gap:8px;margin:0}
.m-pop .custom-colour button{min-height:38px;padding:6px 12px;border:1px solid var(--line);border-radius:8px;background:white}
.m-more-list{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:10px}
.m-more-list .icon-text{flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:58px;border:1px solid var(--line);border-radius:14px;background:#fffefa;font-size:12px;text-align:center}
.m-more-list .icon-text.active{background:#dfe5d6;color:var(--green);font-weight:600}
.m-more-list svg{width:20px;height:20px}
.m-pop .gap-setting{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:40px;margin:0 0 4px}
.m-pop .gap-setting select{min-height:32px}
.m-more-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.m-more-actions button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:white;font-size:13px}
.m-more-actions svg{width:16px;height:16px}
.m-pop .studio-policy-links{margin-top:10px}
@media(min-width:651px){.m-pop{left:0;right:0}}
@media(prefers-reduced-motion:reduce){.m-pop{animation:none}}
.m-pop #brush-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));overflow:visible}
.m-pop .brush-button{flex:none;min-height:56px}
.m-chip-btn>span:last-child{white-space:normal;overflow:visible;text-overflow:clip;text-align:center;line-height:1.1;font-size:12px;overflow-wrap:anywhere;hyphens:auto}.m-chip-btn{min-height:56px}
.m-chip-btn>span:last-child{overflow-wrap:normal;hyphens:manual}

/* ===== My journal (journal.js): a flipbook of every page coloured on this device ===== */
body.journal-open{overflow:hidden}
.journal{position:fixed;inset:0;z-index:150;display:flex;flex-direction:column;background:#2b302a;color:#fffefa}
.journal[hidden]{display:none}
.journal-bar{display:flex;align-items:center;gap:12px;padding:10px 14px;min-height:60px}
.journal-where{flex:1;margin:0;text-align:center;font-size:14px;color:#d8dccf}
.journal-close{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;color:#fffefa}
.journal-close svg{width:24px;height:24px}
.journal-print{min-height:40px;padding:6px 14px;border:1px solid #6f776b;border-radius:20px;color:#fffefa;font-size:13px}
.journal-print:disabled{opacity:.45}
.journal-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 10px 18px}
.journal-turn{flex-shrink:0;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#ffffff14;color:#fffefa}
.journal-turn svg{width:26px;height:26px}
.journal-turn:disabled{opacity:.25}
.journal-book{position:relative;height:100%;max-height:900px;aspect-ratio:3/4;max-width:calc(100vw - 140px);perspective:2200px}
.journal-leaf{position:absolute;inset:0;display:flex;flex-direction:column;background:#fffefa;color:var(--ink);border-radius:4px 14px 14px 4px;
  box-shadow:inset 10px 0 18px -12px #00000040,0 18px 40px #0000004d;overflow:hidden;transform-origin:left center;backface-visibility:hidden;touch-action:pan-y}
.journal-art{flex:1;min-height:0;display:grid;place-items:center;padding:16px 16px 8px}
.journal-art img{max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 2px 10px #2833231f}
.journal-loading{color:var(--muted);font-size:14px}
.journal-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 18px 16px;border-top:1px solid var(--line)}
.journal-caption h2{margin:0;font:normal 20px var(--serif)}
.journal-caption p{margin:3px 0 0;font-size:13px;color:var(--muted)}
.journal-cover{align-items:center;justify-content:center;text-align:center;padding:30px;background:#f1ece0;
  background-image:linear-gradient(90deg,#00000012 0,#0000 18px)}
.journal-cover .brand-flower{transform:scale(1.9);margin-bottom:34px}
.journal-cover h2{margin:0 0 10px;font:normal clamp(28px,6vw,40px)/1.1 var(--serif);color:var(--ink)}
.journal-cover p{margin:4px 0;font-size:15px;color:var(--muted);max-width:30ch}
.journal-cover .journal-dates{color:var(--ink)}
.journal-cover .journal-hint{margin-top:26px;font-size:13px}
.journal-leaf.turn-away{z-index:2;animation:journal-away .46s ease-in forwards}
.journal-leaf.turn-in{z-index:2;animation:journal-in .46s ease-out forwards}
@keyframes journal-away{to{transform:rotateY(-100deg);opacity:.2}}
@keyframes journal-in{from{transform:rotateY(-100deg);opacity:.2}to{transform:none;opacity:1}}
@media(max-width:650px){
.journal-stage{padding:0 8px 12px;position:relative}
.journal-book{max-width:100%;width:100%;height:auto;aspect-ratio:3/4.4;max-height:100%}
.journal-turn{position:absolute;bottom:22px;z-index:3;width:44px;height:44px;background:#2b302acc}
.journal-prev{left:16px}.journal-next{right:16px}
.journal-caption{flex-wrap:wrap;padding:10px 14px 12px}
.journal-caption .journal-keep{margin-left:auto}
.journal-leaf .journal-caption{padding-right:70px;padding-left:70px}
.journal-print{font-size:12px;padding:6px 10px}
}
@media print{img.print-art{break-after:page;page-break-after:always}}
@media(prefers-reduced-motion:reduce){.journal-leaf.turn-away,.journal-leaf.turn-in{animation:none}}
@keyframes journal-away{from{transform:none;filter:none}to{transform:rotateY(-92deg);filter:brightness(.72)}}
@keyframes journal-in{from{transform:rotateY(-92deg);filter:brightness(.72)}to{transform:none;filter:none}}
@media(max-width:650px){.journal-leaf .journal-caption{padding:10px 14px 12px}}
/* Share */
.share-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.share-ready{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:120;display:flex;align-items:center;gap:12px;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:10px 10px 10px 16px;box-shadow:0 10px 40px #0002;font-size:14px;max-width:calc(100% - 24px)}
.share-ready[hidden]{display:none}.share-ready-close{font-size:22px;width:36px;height:36px;border-radius:50%}
.journal-caption .journal-share{margin-left:6px}
/* Keeping work safe on iPhone and iPad */
.keep-note{display:flex;gap:14px;align-items:center;justify-content:space-between;margin:12px 20px 0;padding:12px 16px;background:#f3eedf;border:1px solid var(--line);border-radius:10px;font-size:14px;line-height:1.5}
.keep-note p{margin:0}.keep-note .button{flex-shrink:0}
.journal-cover .journal-keep-advice{font-size:13px;max-width:34ch;margin:14px auto 0;color:var(--muted)}
.journal-acts{display:flex;align-items:center;gap:6px;flex-shrink:0}
/* Contrast fixes found by the browser test's axe run */
.how-strip .step-no{color:#566b4e}
.m-chip-btn.dim{opacity:1;color:#5d6658}.m-chip-btn.dim svg,.m-chip-btn.dim .m-dot{opacity:.5}
/* A tall page must shrink to its leaf: a grid row of auto height let max-height:100% resolve to nothing. */
.journal-art{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);overflow:hidden}
.journal-art img{min-height:0;min-width:0}

/* Brush library: keep each favourite control inside its own grid cell. */
.brush-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
.brush-search-item{position:relative;min-width:0;display:flex;align-items:stretch!important}
.brush-search-item .brush-button{min-width:0;flex:1;padding:12px 25px 12px 7px;overflow-wrap:anywhere;font-size:12px;line-height:1.25;text-align:center}
.brush-search-item .brush-star{position:absolute;right:3px;top:4px;z-index:1;line-height:1;min-width:25px;min-height:28px;display:grid;place-items:center;color:var(--green)}
.m-pop-brushes .brush-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;min-width:0}
.m-pop-brushes .brush-search-item{min-width:0;max-width:100%}
.m-pop-brushes .brush-button{font-size:13px;min-height:78px}
.m-pop-brushes{max-width:100%;overflow-x:hidden}
@media(min-width:800px){.brush-tools{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Short, wide mobile screens: preserve canvas space and keep tool choices reachable. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .m-quick{padding-bottom:max(6px,env(safe-area-inset-bottom));}
 .m-quick .m-swatches{max-height:46px;min-height:0}
 .m-quick .m-tools{gap:6px}
 .m-quick .m-chips{gap:5px}
 .m-quick .m-pop{max-height:min(72dvh,390px);overflow-y:auto;overscroll-behavior:contain}
 .m-pop-brushes .brush-tools{grid-template-columns:repeat(3,minmax(0,1fr))}
 .m-pop-brushes .brush-button{min-height:65px}
}

/* Correct the older horizontal mobile brush strip and protect canvas height. */
.m-pop-brushes #brush-tools{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;overflow-x:hidden!important;overflow-y:visible!important;width:100%;padding:2px}
.m-pop-brushes .brush-search-item{position:relative!important;display:block!important;min-width:0!important;width:100%!important}
.m-pop-brushes .brush-search-item .brush-button{box-sizing:border-box;width:100%!important;min-width:0!important;min-height:82px!important;padding:10px 34px 10px 8px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal;font-size:13px!important;line-height:1.3!important;text-align:center}
.m-pop-brushes .brush-search-item .brush-star{position:absolute!important;right:3px!important;top:4px!important;width:29px!important;height:30px!important;padding:0!important;z-index:2}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .studio-body{height:calc(100dvh - 46px)!important;min-height:0!important}
 .studio-header{height:46px!important;min-height:46px!important}
 .studio-body>.canvas-area{min-height:0!important;flex:1 1 auto!important}
 .studio-body>.tool-panel{padding:2px 10px 4px!important;flex:0 0 auto!important;max-height:36dvh!important}
 .m-quick .m-swatches{max-height:32px!important;overflow:hidden!important}
 .m-quick .m-tools,.m-quick .m-chips{display:flex!important;gap:3px!important}
 .m-quick .m-tools button,.m-quick .m-chips button{min-height:32px!important;padding:3px 5px!important}
 .m-pop{max-height:60dvh!important;overflow-y:auto!important}
 .m-pop-brushes #brush-tools{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .m-pop-brushes .brush-search-item .brush-button{min-height:66px!important;font-size:12px!important}
}

/* Advanced studio: brush cards remain readable with large text and narrow screens. */
.m-pop-brushes .brush-search-item .brush-button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:10px 38px 10px 8px!important;min-height:88px!important;box-sizing:border-box!important}
.m-pop-brushes .brush-search-item .brush-button>span:last-child{display:block;max-width:100%;overflow-wrap:anywhere;line-height:1.35}
.m-pop-brushes .brush-search-item .brush-star{display:grid!important;place-items:center!important;right:4px!important;top:50%!important;transform:translateY(-50%);border-radius:50%;background:var(--paper)!important}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .m-pop-brushes .brush-search-item .brush-button{min-height:70px!important;padding-right:34px!important}
 .m-pop-brushes .brush-search-item .brush-star{right:2px!important}
}

/* Landscape painting workspace: compact controls in a side rail, not over the artwork. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .studio-body{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(172px,29vw,245px)!important;grid-template-rows:minmax(0,1fr)!important;height:calc(100dvh - 46px)!important;overflow:hidden!important}
 .studio-body>.canvas-area{grid-column:1;grid-row:1;order:0;min-width:0!important;min-height:0!important;overflow:hidden!important}
 .studio-body>.tool-panel{grid-column:2;grid-row:1;order:0;align-self:stretch;width:100%!important;min-width:0!important;max-height:none!important;height:100%!important;overflow-y:auto!important;overflow-x:visible!important;border-radius:14px 0 0 14px!important;border:1px solid var(--line)!important;padding:8px!important;box-shadow:-4px 0 16px #2833231c!important}
 .m-quick{width:100%!important;min-width:0!important;padding:0!important}
 .m-quick .m-tools,.m-quick .m-chips{flex-wrap:wrap!important;justify-content:center!important}
 .m-quick .m-tools button{flex:1 1 28%!important;min-width:0!important}
 .m-quick .m-chips button{flex:1 1 29%!important;min-width:0!important}
 .m-quick .m-swatches{overflow-x:auto!important;overflow-y:hidden!important;max-height:44px!important}
 .m-pop{position:fixed!important;left:8px!important;right:auto!important;bottom:8px!important;top:52px!important;width:min(330px,calc(100vw - 190px))!important;max-height:none!important;z-index:30!important;overflow-y:auto!important}
 .m-pop-brushes #brush-tools{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Landscape tablets: keep expanded settings inside the tool rail so that
   opening a brush panel never obscures the colouring canvas. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .studio-body>.tool-panel{position:relative!important;overflow-x:hidden!important}
 .m-quick .m-pop{
  position:relative!important;inset:auto!important;left:auto!important;right:auto!important;
  top:auto!important;bottom:auto!important;width:100%!important;max-width:100%!important;
  max-height:min(48dvh,310px)!important;margin:6px 0 0!important;
  box-sizing:border-box!important;overflow-x:hidden!important;overflow-y:auto!important;
  box-shadow:none!important;z-index:auto!important
 }
 .m-pop-size label{display:block!important;min-width:0!important;max-width:100%!important}
 .m-pop-size input[type="range"]{width:100%!important;max-width:100%!important}
 .m-pop-brushes #brush-tools{grid-template-columns:repeat(1,minmax(0,1fr))!important}
 .m-pop-brushes .brush-search-item{min-width:0!important}
 .m-pop-brushes .brush-search-item .brush-button{min-width:0!important;width:100%!important}
}

/* Six compact choices, including the visible watercolour shortcut. */
.m-chips{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.m-chips>.m-chip-btn{min-width:0!important;font-size:clamp(9px,2.2vw,12px)!important;overflow-wrap:anywhere}
.m-chips>.m-watercolour{background:color-mix(in srgb,var(--paper) 82%,#8db6d3)!important;border-color:#7d9eaf!important;font-weight:700}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
 .m-quick .m-chips button{flex:1 1 29%!important}
 .m-quick .m-chips{display:flex!important;flex-wrap:wrap!important}
}

/* Watercolour style palette: circular choices with legible labels. */
.m-pop-watercolour .m-watercolour-wheel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;justify-items:center;padding:12px 4px}
.m-watercolour-style{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;width:100%;min-width:0;border:0;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1.25;text-align:center;cursor:pointer}
.m-watercolour-mark{display:block;width:clamp(44px,11vw,66px);height:clamp(44px,11vw,66px);border-radius:50%;border:2px solid #7f9da6;background:radial-gradient(circle at 38% 37%,#a6cad4 0%,#8db9cc 30%,#6591ac 64%,transparent 76%);box-shadow:inset 0 0 9px #ffffff9c}
.m-watercolour-style:nth-child(2) .m-watercolour-mark{background:radial-gradient(circle,#547eac 0 22%,#8db7d1 45%,transparent 76%)}
.m-watercolour-style:nth-child(3) .m-watercolour-mark{background:radial-gradient(circle,#43678f 0 12%,transparent 20%),#e1eef0}
.m-watercolour-style:nth-child(4) .m-watercolour-mark{background:repeating-linear-gradient(35deg,#6d95b4 0 3px,#d4e5e6 3px 9px)}
.m-watercolour-style:nth-child(5) .m-watercolour-mark{background:radial-gradient(circle,#d2e3ed,#b6d1e0 60%,transparent 85%)}
.m-watercolour-style:nth-child(6) .m-watercolour-mark{background:radial-gradient(circle at 60% 40%,#d9edf1 0 17%,#80b3c5 30%,#bddce2 58%,transparent 80%)}
.m-watercolour-style[aria-pressed="true"] .m-watercolour-mark{outline:3px solid #355c78;outline-offset:3px}
.m-watercolour-help{font-size:12px;line-height:1.5;margin:4px 8px 10px}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){.m-pop-watercolour .m-watercolour-wheel{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}

/* Actual canvas sketches replace generic circular gradient samples. */
.m-watercolour-mark{display:grid!important;place-items:center!important;overflow:hidden!important;background:#f6f5ee!important}
.m-watercolour-mark>.m-preset-preview{display:block;width:100%;height:100%;border-radius:50%;background:#f6f5ee}
.m-watercolour-style:nth-child(n) .m-watercolour-mark:has(.m-preset-preview){background:#f6f5ee!important}

/* Mobile painting controls: keep the artwork visible and avoid a cramped two-row chip grid. */
@media (max-width: 700px) and (orientation: portrait) {
  .m-quick .m-chips {
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    scrollbar-width:thin;
    gap:8px!important;
    padding:5px 4px 9px!important;
  }
  .m-quick .m-chips>.m-chip-btn {
    flex:0 0 92px!important;
    min-width:92px!important;
    max-width:108px!important;
    white-space:normal!important;
    overflow-wrap:normal;
    font-size:12px!important;
    line-height:1.2!important;
  }
  .m-quick .m-chips>.m-watercolour{flex-basis:110px!important;min-width:110px!important}
  .m-quick .m-tools{flex-wrap:nowrap!important}
  .m-quick .m-tools button{min-width:0!important}
  .m-pop-watercolour:not([hidden]){
    max-height:min(58dvh,460px)!important;
    overflow-y:auto!important;
  }
  .m-pop-watercolour .m-watercolour-wheel{gap:10px!important;padding:8px 2px!important}
  .m-pop-watercolour .m-watercolour-style{font-size:13px!important}
  .m-pop-watercolour .m-watercolour-help{display:none!important}
}
.m-watercolour-wetness{display:flex;flex-direction:column;gap:8px;padding:12px 10px 4px;font-size:14px}
.m-watercolour-wetness>span{display:flex;justify-content:space-between;gap:12px}
.m-watercolour-wetness input{width:100%;accent-color:#527d71;min-height:30px}

/* Portrait phone: a compact vertical painting tool rail, not a wide scrolling strip. */
@media (max-width:700px) and (orientation:portrait){
 .m-quick .m-chips{
   position:fixed!important;
   right:8px!important;
   left:auto!important;
   top:auto!important;
   bottom:clamp(180px,26dvh,260px)!important;
   z-index:22!important;
   display:flex!important;
   flex-direction:column!important;
   flex-wrap:nowrap!important;
   align-items:stretch!important;
   justify-content:flex-start!important;
   width:82px!important;
   max-width:82px!important;
   max-height:min(52dvh,430px)!important;
   overflow-x:hidden!important;
   overflow-y:auto!important;
   gap:5px!important;
   padding:6px!important;
   border-radius:18px!important;
   background:var(--paper)!important;
   border:1px solid var(--line)!important;
   box-shadow:0 6px 20px #28332325!important;
   scrollbar-width:thin;
 }
 .m-quick .m-chips>.m-chip-btn,
 .m-quick .m-chips>.m-watercolour{
   flex:0 0 auto!important;
   width:100%!important;
   min-width:0!important;
   max-width:100%!important;
   min-height:54px!important;
   box-sizing:border-box!important;
   padding:6px 3px!important;
   font-size:11px!important;
   overflow-wrap:anywhere!important;
   white-space:normal!important;
 }
 .m-quick.m-rail-collapsed .m-chips{display:none!important}
 .m-quick .m-rail-toggle{
   position:fixed;right:8px;bottom:calc(clamp(180px,26dvh,260px) - 38px);
   z-index:24;display:block;min-width:82px;min-height:34px;
   border:1px solid var(--line);border-radius:12px;
   background:var(--paper);color:var(--ink);font:600 12px var(--sans);
   box-shadow:0 4px 12px #28332320;
 }
 .m-quick .m-pop:not([hidden]){
   position:fixed!important;left:8px!important;right:98px!important;
   top:auto!important;bottom:clamp(180px,26dvh,260px)!important;
   width:auto!important;max-height:60dvh!important;
   z-index:25!important;overflow-y:auto!important;
 }
}
@media (min-width:701px), (orientation:landscape){
 .m-rail-toggle{display:none!important}
}

/* Responsive containment: all major views must stay within the device viewport. */
html,body{max-width:100%;overflow-x:clip}
*,*::before,*::after{box-sizing:border-box}
img,svg,video,canvas{max-width:100%}
.journal{width:100%;max-width:100vw;max-height:100dvh;overflow:hidden}
.journal-bar{flex-wrap:wrap;min-width:0;max-width:100%;gap:8px}
.journal-bar>*{min-width:0}
.journal-where{overflow-wrap:anywhere}
.journal-bar button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.journal-stage,.journal-book,.journal-leaf,.journal-caption{min-width:0}
.journal-gallery{max-width:100%;min-width:0}
@media(max-width:700px){
 .journal-bar{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:7px;padding:8px 12px}
 .journal-close{grid-column:1;grid-row:1}
 .journal-where{grid-column:2;grid-row:1;text-align:left;font-size:13px;line-height:1.35}
 .journal-gallery-toggle,.journal-backup,.journal-restore,.journal-print{
   grid-column:span 1;min-width:0;width:100%;min-height:38px;
   padding:6px 8px;font-size:12px;line-height:1.25;text-align:center;
 }
 .journal-bar .journal-print{grid-column:1 / -1;justify-self:stretch}
 .journal-stage{overflow:hidden;min-height:0;padding:8px 8px 12px}
 .journal-book{max-width:100%;max-height:100%;min-width:0}
 .journal-leaf .journal-caption{padding:9px 52px 12px;gap:6px}
 .journal-caption h2{font-size:clamp(14px,4vw,20px);overflow-wrap:anywhere}
 .journal-caption p{font-size:11px}
 .journal-acts{min-width:0;max-width:100%;flex-wrap:wrap}
 .journal-gallery{grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr))!important;padding:10px!important;gap:10px!important}
}
@media(max-width:360px){
 .journal-bar{grid-template-columns:44px minmax(0,1fr)}
 .journal-gallery-toggle,.journal-backup,.journal-restore{font-size:11px}
}

/* Unified medium → style flow: clear selection and an obvious way back. */
.m-brush-current{margin:0 0 10px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--paper) 84%,var(--ink) 16%);font-size:13px;line-height:1.35;color:var(--ink)}
.m-style-back{display:inline-flex;align-items:center;min-height:38px;padding:6px 10px;margin:0 0 8px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);font:600 13px var(--sans);cursor:pointer}
.m-style-back:focus-visible{outline:3px solid #527d71;outline-offset:2px}

/* Keep painting presets legible inside the narrow portrait tool rail. */
@media(max-width:700px) and (orientation:portrait){
 .m-quick .m-pop-watercolour .m-watercolour-wheel{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .m-quick .m-pop-watercolour .m-watercolour-style{min-width:0!important;font-size:12px!important;overflow-wrap:anywhere}
 .m-quick .m-pop-watercolour .m-watercolour-mark{width:clamp(40px,12vw,62px)!important;height:clamp(40px,12vw,62px)!important}
 .m-quick.m-rail-collapsed .m-pop{display:none!important}
}

/* Mobile painting rail: short labels, smaller footprint, and a truly hidden default. */
@media(max-width:700px) and (orientation:portrait){
 .m-quick .m-chips{
   width:76px!important;max-width:76px!important;
   right:8px!important;gap:3px!important;padding:4px!important;
   max-height:min(48dvh,365px)!important;border-radius:16px!important;
 }
 .m-quick .m-chips>.m-chip-btn,.m-quick .m-chips>.m-watercolour{
   min-height:47px!important;padding:5px 2px!important;
   font-size:11px!important;line-height:1.15!important;
 }
 .m-quick .m-chips .m-style-label{
   display:-webkit-box!important;-webkit-box-orient:vertical!important;
   -webkit-line-clamp:2!important;overflow:hidden!important;
   max-width:100%!important;overflow-wrap:anywhere!important;
   font-size:10px!important;line-height:1.15!important;
 }
 .m-quick .m-watercolour[data-medium="watercolour"] .m-style-label{font-size:0!important}
 .m-quick .m-watercolour[data-medium="watercolour"] .m-style-label::after{
   content:"Watercolour";font-size:10px!important;line-height:1.15!important;
 }
 .m-quick .m-rail-toggle{min-width:76px!important;right:8px!important}
 .m-quick .m-pop:not([hidden]){right:92px!important}
 .m-quick.m-rail-collapsed .m-chips{display:none!important}
}
