:root{--ink:#263c32;--sage:#788971;--paper:#f5f2eb;--line:#d9ded1;--gold:#b87d3f}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.6 Arial,sans-serif}header,main,footer{max-width:1400px;margin:auto;padding:24px 5%}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}a{color:inherit}header a{text-decoration:none}header a:first-child{font:30px Georgia}small{display:block;font:italic 12px Georgia}.intro{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:40px;padding:50px 0 70px}.intro img,aside img{width:100%;border-radius:8px}.eyebrow{font-size:10px;letter-spacing:2px}h1{font:normal clamp(38px,4.8vw,64px)/1.1 Georgia;letter-spacing:-2px;margin:20px 0}h1 em{color:var(--sage)}h2{font:normal 32px/1.2 Georgia;margin:10px 0 24px}p{max-width:65ch}button,.primary,.secondary,.upload{font:inherit;cursor:pointer;border:1px solid var(--line);border-radius:4px;padding:12px 18px;background:white;color:var(--ink);text-decoration:none;display:inline-block}.primary{background:var(--ink);color:white;border-color:var(--ink)}button:disabled{opacity:.5;cursor:wait}.fine{font-size:12px;color:#647063}.workspace{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(250px,.8fr);gap:50px}fieldset{border:0;border-top:1px solid var(--line);padding:24px 0;margin:0 0 20px}legend{font:23px Georgia;padding:0 12px 0 0}label{display:block;margin:12px 0;font-size:13px}input,select,textarea{font:15px/1.5 Arial;color:var(--ink);border:1px solid #cbd2c4;border-radius:4px;padding:11px;background:#fff;width:100%;margin-top:5px}textarea{resize:vertical}.row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.themes{display:flex;gap:8px;flex-wrap:wrap}.themes label{margin:0}.themes input{width:auto;margin-right:7px}.themes label{background:#e7ebdf;padding:9px 12px;border-radius:20px}.upload{border:1px dashed var(--sage)}input[type=file]{font-size:12px}.check{display:flex;gap:10px;align-items:start}.check input{width:auto;margin-top:5px}aside{background:#e8ecdf;border-radius:8px;padding:28px;align-self:start;position:sticky;top:20px}.photo-row{display:grid;grid-template-columns:72px 1fr;gap:12px;border-bottom:1px solid var(--line);padding:14px 0}.photo-row img{width:72px;height:72px;object-fit:cover;border-radius:5px}.photo-row input{margin:0}.photo-row button{font-size:12px;padding:5px 10px;margin:5px 4px 0 0}.error{color:#a03725}.notice{background:#e8ecdf;padding:16px;border-left:3px solid var(--sage)}#editor{margin-top:65px;border-top:1px solid var(--line);padding-top:36px}.editor-top{display:flex;justify-content:space-between;gap:20px}.actions{display:flex;flex-wrap:wrap;gap:6px;align-content:start}.actions button{font-size:12px;padding:8px 12px}.book-toolbar{display:flex;justify-content:center;align-items:center;gap:20px;margin:20px}.book-toolbar button{border-radius:50%}#book{display:grid;grid-template-columns:1fr 1fr;max-width:1000px;margin:auto;box-shadow:0 15px 35px #263c3220}.page{position:relative;aspect-ratio:1;min-width:0;padding:9%;background:#fffdf7;display:flex;flex-direction:column;justify-content:center;overflow:hidden;border:1px solid #e3e0d8}.page h3{font:normal clamp(20px,2.6vw,34px)/1.2 Georgia;margin:0 0 6%}.page p{font:clamp(14px,1.5vw,20px)/1.7 Georgia;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.page img{max-width:100%;max-height:100%;object-fit:contain;display:block}.page.photo{padding:5%;background:#e8ecdf}.page.cover{grid-column:1/-1;max-width:500px;width:100%;justify-self:center;text-align:center;background:#e8ecdf;gap:5%}.page.cover img{min-height:0;height:60%;width:100%;object-fit:contain}.page .number{position:absolute;bottom:3%;right:7%;font:11px Arial;color:#6c7866}.page .motif{color:var(--gold);font-size:30px;margin-bottom:6%}.edit-panel{max-width:800px;margin:30px auto}.edit-panel textarea{min-height:120px}footer{margin-top:50px;border-top:1px solid var(--line);font-size:12px}#printBook{display:none}[hidden]{display:none!important}:focus-visible{outline:3px solid #bc8b51;outline-offset:3px}@media(max-width:760px){.intro,.workspace{grid-template-columns:1fr}.intro{padding-top:25px;gap:25px}aside{position:static}.editor-top{display:block}#book{display:block}.page{margin-bottom:10px}.page p{font-size:17px}.page h3{font-size:27px}.row{grid-template-columns:1fr}header{gap:15px}header a:last-child{font-size:12px}}@media print{@page{size:200mm 200mm;margin:0}body>header,body>main,body>footer{display:none!important}#printBook{display:block}.page,.page.cover{width:200mm;height:200mm;max-width:none;break-after:page;box-shadow:none;margin:0}.page p{font-size:17pt}.page h3{font-size:27pt}.page .number{font-size:10pt}}

/* Keep every paragraph visible inside the square page. */
#book .page:not(.photo):not(.cover){padding:clamp(18px,2.8vw,36px);justify-content:flex-start}#book .page:not(.photo):not(.cover)>*{flex-shrink:0}#book .page p{font-size:clamp(13px,1.3vw,17px);line-height:1.5}#book .page h3{font-size:clamp(22px,2.3vw,30px);margin-bottom:18px}#book .page .motif{font-size:22px;margin-bottom:12px}

/* Illustrated editorial spreads: decoration belongs to the scene, copy stays readable. */
.account{border:1px solid var(--line);background:#fffdf7;padding:28px;border-radius:12px;margin-bottom:55px;scroll-margin-top:20px}.account form{max-width:780px}.account button{margin:5px 5px 5px 0}.project-item{display:block;text-align:left;width:100%}#accountError{color:#9a3d28}.style-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.style-options label{background:#fffdf7;border:1px solid var(--line);border-radius:9px;padding:15px;margin:0;cursor:pointer}.style-options label:has(input:checked){border:2px solid var(--ink);padding:14px;background:#edf1e5}.style-options input{width:auto;margin-right:10px}.style-options span{display:block;margin-top:8px;font-size:12px;color:#65705f}.character-panel{background:#edeedf;border-radius:10px;padding:20px;margin-bottom:25px}.character-panel img{display:block;max-width:100%;width:320px;border-radius:12px;margin:20px auto}.character-panel h3{font:26px Georgia}.page.story-text{background:var(--scene-paper,#fffdf7)}#book .page.story-text{padding:9% 8% 10%}.story-copy{position:relative;z-index:2;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;justify-content:center}.story-copy p{flex-shrink:0}.chapter-kicker{font:9px/1.5 Arial;letter-spacing:2px;color:#7a785e;margin-bottom:18px}.page-decoration{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 0 0,var(--scene-accent) 0,transparent 48%),radial-gradient(ellipse at 100% 100%,var(--scene-accent) 0,transparent 48%)}.page-decoration span{position:absolute;font:50px Georgia;color:#76896c;opacity:.24;transform:rotate(-20deg)}.page-decoration span:first-child{left:4%;top:2%}.page-decoration span:last-child{right:4%;bottom:2%;transform:rotate(20deg)}.page .decorative-scene{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover;opacity:.12;mask-image:linear-gradient(120deg,#000,transparent 45%,transparent 70%,#000);pointer-events:none}.page.scene-picture{background:var(--scene-accent);padding:4%}.page.scene-picture>img{height:100%;width:100%;object-fit:contain;border-radius:2px}.page .number{z-index:4;background:#fffdf7d9;border-radius:12px;padding:1px 6px}.page.picture-pair-text .decorative-scene{opacity:.72;mask-image:none}.page.picture-pair-text .story-copy{background:#fffdf7f5;padding:7%;border-radius:8px;box-shadow:0 3px 20px #263c3210}.page.picture-pair-text .page-decoration{display:none}.art-pending{position:absolute;left:8%;right:8%;bottom:8%;text-align:center;background:#fffdf7f0;padding:12px;font:12px Arial;border-radius:6px}.page.cover{border:8px solid #e0e7d7}.page.cover h3{max-width:100%}#book{border-radius:5px;overflow:hidden;background:#e1e4da}#book>.page:nth-child(2){box-shadow:inset 12px 0 18px -18px #263c32}
@media(max-width:760px){.account{padding:20px}.page.story-text{padding:9% 8% 10%!important}.story-copy p{font-size:clamp(14px,4vw,18px);line-height:1.6}.story-copy h3{font-size:clamp(22px,6vw,28px)}.page.picture-pair-text .story-copy{padding:6%}.style-options{gap:8px}.style-options label{padding:12px}.style-options label:has(input:checked){padding:11px}.page .decorative-scene{height:100%}.page.scene-picture{min-height:0}}
@media print{.page.story-text{padding:16mm}.story-copy p{font-size:17pt!important;line-height:1.6!important}.story-copy h3{font-size:25pt!important}.page{print-color-adjust:exact;-webkit-print-color-adjust:exact}.page .decorative-scene{height:100%}.story-copy{height:100%}}

.style-comparison{padding:30px 0 60px}.style-comparison>div{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:780px}.style-comparison figure{margin:0}.style-comparison img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;background:#e8ecdf}.style-comparison figcaption{font-size:12px;color:#65705f;padding:10px 0}@media(max-width:500px){.style-comparison>div{gap:12px}.style-comparison figcaption{font-size:11px}}

@media screen and (max-width:760px){#book .page.story-text{aspect-ratio:auto;min-height:300px;padding:30px!important}#book .story-copy{height:auto;min-height:240px}#book .story-copy p{font-size:18px;line-height:1.65}#book .page.picture-pair-text .story-copy{min-height:260px}.page-decoration span{font-size:36px}}

/* Illustrated page borders and larger child-friendly type. */
.page .themed-page-border{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:fill;z-index:0;pointer-events:none}.page.themed-child-page .page-decoration,.page.themed-child-page .decorative-scene{display:none}.page.themed-child-page .story-copy{z-index:2;background:none!important;box-shadow:none!important;border-radius:0;padding:0!important;justify-content:center}#book .page.themed-child-page{padding:18% 13% 24%!important}.page.themed-child-page.scene-picture{padding:8% 8% 16%!important}.page.themed-child-page.scene-picture>img:not(.themed-page-border){position:relative;z-index:2;border:5px solid #fffdf5;border-radius:12px;box-shadow:0 4px 15px #40322530}.page.child-story-page .chapter-kicker{font-size:11px;letter-spacing:1.2px;margin-bottom:12px;color:#586844}#book .page.child-story-page p{font-size:clamp(18px,1.9vw,24px);line-height:1.5}#book .page.child-story-page h3{font-size:clamp(25px,2.7vw,35px);line-height:1.15;margin-bottom:16px;color:#255c7a}.page.child-story-page:not(.themed-child-page) .page-decoration{background:radial-gradient(ellipse at 0 0,var(--scene-accent) 0,transparent 65%),radial-gradient(ellipse at 100% 100%,#f7d890 0,transparent 55%)}.page.child-story-page:not(.themed-child-page) .page-decoration span{opacity:.65;font-size:65px}.page.child-story-page:not(.themed-child-page) .decorative-scene{opacity:.3}@media(max-width:760px){#book .page.themed-child-page{aspect-ratio:auto;min-height:530px;padding:90px 14% 125px!important}#book .page.themed-child-page.scene-picture{aspect-ratio:1;min-height:0;padding:8% 8% 16%!important}#book .page.child-story-page p{font-size:20px;line-height:1.5}#book .page.child-story-page h3{font-size:28px}.page.themed-child-page .story-copy{min-height:280px!important;height:auto!important}}@media print{.page.themed-child-page{padding:32mm 25mm 42mm!important}.page.child-story-page .story-copy p{font-size:20pt!important;line-height:1.5!important}.page.child-story-page .story-copy h3{font-size:29pt!important}.page.themed-child-page.scene-picture{padding:12mm 12mm 25mm!important}}

@media(min-width:761px){#book{max-width:1200px}#book .page.child-story-page h3{font-size:clamp(24px,2.4vw,32px)}}
