@font-face{font-family:MemoryWenKai;src:url('assets/fonts/LXGWWenKai-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:MemoryArabic;src:url('assets/fonts/NotoNaskhArabic.ttf') format('truetype');font-style:normal;font-weight:400 700;font-display:swap}
:root{--serif:MemoryWenKai,MemoryArabic,Georgia,serif;--sans:'Segoe UI','Microsoft YaHei','PingFang SC',system-ui,sans-serif}
body{font-size:14px}.intro h1{letter-spacing:1px;font-size:31px}.intro p{font-size:12px}.panel-heading p{font-size:12px}.editor label:not(.upload-area):not(.audio-upload):not(.import-label){font-size:12px}.editor label input,.editor label textarea{font-size:14px}.panel-heading h2{font-size:24px}.header-actions{gap:17px}select{font:inherit;color:inherit;border:1px solid #dfe1d5;border-radius:5px;padding:9px 10px;background:#fffdf7;max-width:100%}select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}#ui-language{font-size:11px;padding:7px;width:110px}.editor select{width:100%;display:block;margin-top:8px;font-size:12px;min-height:43px}.ai-composer{border:1px solid #dce1cf;background:linear-gradient(130deg,#f1f3e8,#f8f6ed);border-radius:7px;padding:22px;margin-bottom:35px}.ai-heading{display:flex;align-items:center;gap:11px}.ai-heading h2{font:22px/1.6 var(--serif);margin:4px 0 0}.ai-spark{font-size:29px;color:#8c9b70}.ai-heading .section-index{font-size:8px;letter-spacing:1.6px}.agent-chip{margin-inline-start:auto;flex-shrink:0;font-size:8px;background:#e7ecdc;padding:5px 7px;border-radius:20px;color:#788765}.ai-intro{font-size:11px;line-height:1.9;color:#8c947c;margin:11px 0 18px}.ai-composer label{margin-top:13px!important}.ai-composer .field-row{gap:12px}.ai-composer input,.ai-composer textarea,.ai-composer select{background:#fffef8}.ai-composer textarea{line-height:1.9}.source-tools{display:flex;align-items:center;gap:20px;margin-top:11px;flex-wrap:wrap}.source-tools button,.source-tools label{font-size:10px;margin:0!important}#ai-audio-name{max-width:100%;font-size:9px;overflow-wrap:anywhere;color:#8c947c}.voice-tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.voice-tools audio{width:100%;height:35px}.voice-tools .button{font-size:11px;padding:8px;min-height:35px}.voice-tools .small-note{margin:0;font-size:9px}.ai-actions{display:flex;align-items:center;gap:12px;margin-top:20px}.ai-actions .button{font-size:12px;min-width:150px}.ai-working{font-size:10px;color:#899174;line-height:1.8}.ai-privacy{font-size:9px;line-height:1.9;color:#969c86;margin:14px 0 0}.result-top{border-top:1px solid #d7ddca;margin-top:23px;padding-top:18px;display:flex;justify-content:space-between;align-items:center}.result-mode{display:flex;align-items:center;border-bottom:1px solid #d9decd;margin:18px 0 12px;gap:13px}.result-mode button{font-size:11px;padding:8px 0;color:#90997f}.result-mode button.selected{color:var(--accent);border-bottom:2px solid var(--accent)}.result-mode span{margin-inline-start:auto;font-size:9px;color:#a0a58e}#result-text{font-family:var(--serif);font-size:17px;line-height:2}#ai-result[data-language=ar] #result-text{font-family:MemoryArabic,serif;font-size:22px;line-height:1.9}.result-review{margin-top:13px;font-size:10px;line-height:1.9;color:#839073}.result-review details{padding:6px 0}.result-review summary{cursor:pointer}.result-review ul{padding-inline-start:20px;margin:6px 0}.result-review .review-questions{color:#9e7956}.page-edit{margin-top:17px;padding:15px 0;border-top:1px solid var(--line);font-size:11px;color:#7d8870}.page-edit summary{cursor:pointer}.page-edit textarea{font-family:var(--serif);font-size:16px!important}.page-edit .small-note{font-size:9px}.book-page{font-family:MemoryWenKai,MemoryArabic,Georgia,serif}.book-page h3{font-size:clamp(16px,1.55vw,25px);letter-spacing:1px}.book-right .story-preview-body{font-size:clamp(10px,.82vw,13px);line-height:2.05;bottom:23%}.story-preview-body::first-letter{font-size:inherit;float:none;line-height:inherit;margin:0;color:inherit}.book-page[data-story-lang=ar]{font-family:MemoryArabic,serif}.book-page[data-story-lang=ar] .story-preview-body{font-size:clamp(13px,1vw,17px);line-height:1.8;letter-spacing:0}.book-page[data-story-lang=ar] h3{font-family:MemoryArabic,serif;font-size:24px;letter-spacing:0}.doodle{display:block;aspect-ratio:2/3;background-image:url('assets/story-doodles.png');background-size:300% 200%;background-repeat:no-repeat;flex-shrink:0;direction:ltr}.book-doodle{width:60%;max-height:58%;margin:8px auto 0}.book-page.has-photo .book-doodle{position:absolute;width:27%;height:24%;bottom:5%;inset-inline-end:5%;margin:0;transform:rotate(7deg);z-index:2}.book-page.has-doodle:not(.has-photo) .sample-label{margin-top:4px}.book-page .doodle-label{font:5px var(--sans);color:#a49a83;text-align:center;margin-top:5px}.print-sheet{font-family:MemoryWenKai,MemoryArabic,Georgia,serif}.memory-page{display:flex;flex-direction:column;justify-content:flex-start}.memory-page .memory-page-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.memory-page h2{font-size:28px;letter-spacing:1px}.memory-page .page-doodle{width:110px;max-height:150px;margin-inline-start:auto}.memory-page .page-art{display:flex;align-items:center;justify-content:center;gap:20px;margin:10px 0 15px}.memory-page .page-art:has(.full-photo) .page-doodle{width:85px}.memory-page .page-art .full-photo{width:65%;max-height:70mm;margin:0;object-fit:contain}.memory-page .page-story{font-size:16px;line-height:2.05;margin:10px 0;white-space:pre-wrap}.memory-page .page-story.empty{color:#aaa}.memory-page[data-story-lang=ar]{font-family:MemoryArabic,serif}.memory-page[data-story-lang=ar] .page-story{font-size:20px;line-height:1.9}.memory-page .memory-rule{height:1px;background:#d6ceb8;margin:15px 0}.memory-page .memory-end{font-size:8px;color:#a79f8c;margin-top:auto;padding-top:20px;display:flex;justify-content:space-between;gap:10px}.sample-label{font-size:6px}.cover-preview h3{font-family:MemoryWenKai,MemoryArabic,Georgia,serif}.book-preview[dir=rtl] .book-left{border-right:0;border-left:1px solid #9b938333;background-image:linear-gradient(270deg,transparent 85%,#4b442c13)}.book-preview[dir=rtl] .book-right{background-image:linear-gradient(270deg,#4b442c0d,transparent 12%)}html[dir=rtl]{--sans:'Segoe UI',Tahoma,MemoryArabic,sans-serif}html[dir=rtl] .brand,html[dir=rtl] .panel-heading h2,html[dir=rtl] .ai-heading h2,html[dir=rtl] .intro h1{font-family:MemoryArabic,serif;letter-spacing:0}html[dir=rtl] .sidebar{border-right:0;border-left:1px solid var(--line)}html[dir=rtl] .step{text-align:right}html[dir=rtl] .optional{float:left}html[dir=rtl] .edition{text-align:left;align-items:flex-start}html[dir=rtl] .brand{letter-spacing:0}html[dir=rtl] .intro h1{font-size:35px}html[dir=rtl] .intro p{font-size:14px;line-height:1.9}html[dir=rtl] .ai-intro{font-size:13px}html[dir=rtl] .editor label:not(.upload-area){font-size:13px}html[dir=rtl] .gentle-note>span{transform:scaleX(-1)}html[dir=rtl] .gentle-note svg{margin-left:0;margin-right:auto}html[dir=rtl] .upload-plus{margin-left:0;margin-right:auto}html[dir=rtl] .story-preview-heading{letter-spacing:0}.page-story[dir=rtl]{text-align:right;unicode-bidi:plaintext}.book-right .story-preview-body[dir=rtl]{text-align:right;unicode-bidi:plaintext}
@media(min-width:1100px){.workspace{grid-template-columns:minmax(370px,.9fr) minmax(390px,1.1fr);gap:35px}.preview-column{align-self:start;position:sticky;top:25px}.book-stage{min-height:490px}}@media(max-width:1200px){.app-shell{grid-template-columns:175px minmax(0,1fr)}.workspace{grid-template-columns:minmax(330px,1fr) minmax(320px,1fr);gap:23px}.ai-composer{padding:17px}.ai-heading h2{font-size:19px}.intro h1{font-size:26px}}
@media(max-width:1000px){.app-shell{grid-template-columns:1fr}.sidebar{border-left:0!important}.workspace{grid-template-columns:minmax(310px,.95fr) minmax(320px,1.05fr)}}
@media(max-width:740px){.header-actions{gap:8px}.header-actions>#backup-button{display:none}#ui-language{width:83px;font-size:10px;padding:7px 4px}.brand{font-size:18px;gap:7px}.brand-mark{width:25px;height:32px}.workspace{display:flex;flex-direction:column}.preview-column{position:static;order:2}.editor{order:1;padding-top:0;border:0}.intro h1{font-size:24px}.intro p{font-size:12px}.ai-composer{padding:17px;margin-bottom:28px}.ai-heading h2{font-size:21px}.ai-heading .section-index{font-size:7px}.agent-chip{font-size:7px;padding:5px}.ai-composer .field-row{gap:10px}.ai-composer input,.ai-composer textarea{font-size:14px}.ai-privacy{font-size:10px}.ai-intro{font-size:12px}.preview-column{border-top:1px solid var(--line);padding-top:22px}.book-right .story-preview-body{font-size:clamp(9px,2.4vw,12px);line-height:1.9;bottom:22%}.book-page h3{font-size:clamp(14px,3.8vw,21px)}.book-doodle{width:53%;margin-top:3px}.book-page.has-photo .book-doodle{width:25%;height:25%}.book-page[data-story-lang=ar] .story-preview-body{font-size:clamp(11px,3vw,15px);line-height:1.7}.book-page[data-story-lang=ar] h3{font-size:18px}.memory-page .page-story{font-size:15px;line-height:2}.memory-page[data-story-lang=ar] .page-story{font-size:19px}.memory-page h2{font-size:25px}.memory-page .page-doodle{width:80px;max-height:110px}.memory-page .page-art:has(.full-photo) .page-doodle{width:60px}.dialog-header .button{max-width:150px}.preview-bottom{font-size:9px;line-height:1.7}html[dir=rtl] .intro h1{font-size:29px}.header-middle{display:none}}
.doodle[data-doodle=notebook]{clip-path:inset(0 7% 0 9%)}.book-right .story-preview-body{top:22%;bottom:17%;line-height:1.9}.cover-doodle{width:130px;margin:20px auto}.cover-doodle .doodle{width:100%;height:195px}.chat-tools{display:flex;justify-content:space-between;gap:10px;margin-top:13px}.chat-tools .text-button{font-size:10px}.moment-card{background:#fffdf5;border:1px solid #dce1cf;padding:15px;border-radius:5px;margin-top:12px}.moment-card h3{font:18px var(--serif);margin:0 0 9px}.moment-card p,.moment-card blockquote{font-size:11px;line-height:1.9}.moment-card blockquote{white-space:pre-wrap;padding-inline-start:10px;border-inline-start:2px solid #ccd5bb;margin:10px 0;color:#8a927b;max-height:130px;overflow:auto}.moment-card button{font-size:11px}
@media print{.memory-page{display:block;min-height:170mm}.memory-page .page-art{break-inside:avoid}.memory-page .page-story{font-size:12pt;line-height:1.95;overflow:visible}.memory-page[data-story-lang=ar] .page-story{font-size:15pt;line-height:1.8}.memory-page .memory-end{margin-top:15mm}.memory-page h2{font-size:25pt;break-after:avoid}.memory-page .page-doodle{width:30mm;height:45mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.brand-mark svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.3}.theme-sample svg{width:40px;height:58px;fill:none;stroke:currentColor;stroke-width:1.2}.end-book-mark{width:50px;height:45px;margin:0 auto 20px;fill:none;stroke:var(--book-accent);stroke-width:1.2}svg.doodle{background:none;overflow:hidden}.source-modes{display:flex;border-bottom:1px solid #d9decb;gap:18px;margin:20px 0 5px}.source-modes button{font-size:12px;padding:10px 0;color:#8c957d;border-bottom:2px solid transparent}.source-modes button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.illustration-preferences{border-top:1px solid #e0e4d6;margin-top:19px;padding-top:12px;font-size:11px;color:#899378}.illustration-preferences summary{cursor:pointer;list-style:none}.illustration-preferences summary:after{content:'＋';float:right;color:#9ba58c}html[dir=rtl] .illustration-preferences summary:after{float:left}.illustration-preferences[open] summary:after{content:'−'}.story-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:12px;scrollbar-width:thin;align-items:center}.story-tab{flex-shrink:0;max-width:165px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.add-story{position:sticky;inset-inline-end:0;flex-shrink:0;background:var(--bg);padding:8px 5px}.eyebrow,.stage-note,.section-index{text-transform:uppercase}html[dir=rtl] .eyebrow,html[dir=rtl] .stage-note,html[dir=rtl] .section-index{letter-spacing:0}
.source-record{border-top:1px solid var(--line);padding:15px 0;margin-top:12px;color:#859177;font-size:11px}.source-record summary{cursor:pointer}.source-record p{font:12px/2 var(--sans);white-space:pre-wrap;max-height:260px;overflow:auto;background:#efefe5;padding:14px;border-radius:4px}
#record-status{font-size:10px;color:#a05d48}.is-recording:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#b55f49;margin-inline-end:6px;animation:recordPulse 1s infinite alternate}@keyframes recordPulse{to{opacity:.35}}@media(prefers-reduced-motion:reduce){.is-recording:before{animation:none}}
@media(max-width:740px){.book-stage{padding:42px 18px 25px}.spread{grid-template-columns:1fr;aspect-ratio:auto;gap:16px;transform:none;box-shadow:none}.book-page{min-height:390px;aspect-ratio:auto;padding:28px 25px 48px;box-shadow:0 7px 16px #40422d12}.book-page h3{font-size:23px;margin-top:16px}.book-page .book-kicker,.book-page .book-date{font-size:9px}.book-page .page-number{font-size:8px;bottom:15px}.book-left{border:0!important}.book-right .story-preview-body{position:static;display:block;-webkit-line-clamp:unset;max-height:none;overflow:visible;font-size:15px;line-height:1.95;margin-top:27px}.book-page[data-story-lang=ar] .story-preview-body{font-size:19px;line-height:1.85}.book-page[data-story-lang=ar] h3{font-size:25px}.book-doodle{width:58%;height:230px;max-height:none;margin:14px auto 0}.book-page .sample-label{font-size:8px;margin-top:10px}.book-right .story-preview-heading{font-size:9px;line-height:1.8}.preview-truncation{position:static;font-size:9px;margin-top:25px;text-align:start}.photo-frame figcaption{font-size:9px;max-height:none}.book-preview[dir=rtl] .book-left,.book-preview[dir=rtl] .book-right{background-image:none}.source-modes{gap:14px}.source-modes button{font-size:11px}.brand small{display:none}.ai-actions{flex-wrap:wrap}.book-stage .stage-note{font-size:8px}.main-footer a{color:var(--accent)}}
html[lang=en],html[lang=pt-BR]{--serif:Georgia,MemoryWenKai,MemoryArabic,serif}.book-page[data-story-lang=en],.book-page[data-story-lang=pt-BR],.print-sheet[lang=en],.print-sheet[lang=pt-BR],#ai-result[data-language=en] #result-text,#ai-result[data-language=pt-BR] #result-text{font-family:Georgia,MemoryWenKai,MemoryArabic,serif}.print-sheet[lang=ar],.book-preview[dir=rtl] .cover-preview h3{font-family:MemoryArabic,MemoryWenKai,serif}.cover-preview h3{font-family:var(--serif)}.main-footer a{color:var(--accent)}html[dir=rtl] .ai-actions .button>span{transform:rotate(180deg)}
.doodle-control{margin-top:18px}.doodle-control>.field-title{font-size:12px}.doodle-picker{display:flex;align-items:center;gap:14px;width:100%;text-align:start;border:1px solid #dce0d0;background:#fffdf7;border-radius:6px;padding:9px 15px;margin-top:9px;min-height:90px}.doodle-picker strong{display:block;font-weight:400;font-size:14px;line-height:1.6}.doodle-picker small{display:block;font-size:11px;color:#989d8b;margin-top:4px}.doodle-picker .picker-arrow{margin-inline-start:auto;color:var(--accent);font-size:17px}#current-doodle-art{display:grid;place-items:center;width:65px;height:68px;flex-shrink:0}#current-doodle-art .doodle{width:55px;height:68px;max-height:68px;aspect-ratio:auto}.no-art-mark{color:#b1b79f;font-size:32px;font-weight:300}#doodle-dialog{width:min(1000px,94vw);max-width:1000px;padding:30px 34px 24px;max-height:90vh;background:#f7f5ee}.gallery-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.gallery-heading h2{font:29px/1.55 var(--serif);margin:10px 0 5px;letter-spacing:.3px}.gallery-heading p{font-size:12px;color:#8a927d;margin:0;line-height:1.8}.gallery-heading .round-button{flex-shrink:0}.gallery-filters{display:grid;grid-template-columns:1.4fr 1fr .8fr;gap:14px;margin:24px 0 0;padding-bottom:18px;border-bottom:1px solid #dde0d3}.gallery-filters label{font-size:11px;color:#828a75}.gallery-filters input,.gallery-filters select{display:block;width:100%;margin-top:8px;height:43px;font-size:12px;background:#fffdf8}.gallery-info{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:13px 0 19px}.gallery-info p{font-size:11px;color:#969c89;line-height:1.8;max-width:75%;margin:0}.gallery-info>span{font-size:11px;color:#8c947e;white-space:nowrap}.doodle-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.doodle-card{min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;border:1px solid #e0e2d7;border-radius:7px;background:#fffdf8;padding:14px 12px 15px;transition:border-color .15s,background .15s}.doodle-card:hover{border-color:#b6bea1;filter:none;background:#fffefb}.doodle-card[aria-pressed=true]{border-color:#a5af8d;background:#f0f2e7}.doodle-card-art{display:flex;align-items:center;justify-content:center;width:100%;height:155px}.doodle-card-art .doodle{width:100%;height:100%;aspect-ratio:auto;max-width:150px}.doodle-card-name{font:12px/1.6 var(--sans);color:#7a846c;text-align:center;margin-top:8px;overflow-wrap:anywhere}.doodle-card-check{display:none;position:absolute;inset-inline-end:10px;top:9px;font-size:12px;color:#71815e}.doodle-card[aria-pressed=true] .doodle-card-check{display:block}.gallery-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #dfe2d5;padding-top:19px;margin-top:24px}.gallery-footer .text-button{font-size:12px}.gallery-footer .button{font-size:12px}.gallery-empty{padding:50px 10px;text-align:center;color:#919a82;font:16px/2 var(--serif)}html[dir=rtl] .gallery-heading h2{font-family:MemoryArabic,serif;font-size:32px}html[dir=rtl] .doodle-card-name{font-family:MemoryArabic,serif;font-size:17px;line-height:1.5}.doodle[aria-hidden=true]{pointer-events:none}@media(max-width:740px){#doodle-dialog{width:95vw;padding:20px 17px;max-height:94vh}.gallery-heading h2{font-size:24px}.gallery-heading .section-index{font-size:8px}.gallery-filters{grid-template-columns:1fr 1fr;gap:11px;margin-top:19px}.gallery-filters label:first-child{grid-column:1/-1}.gallery-filters select{font-size:11px;padding-inline:7px}.doodle-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.doodle-card{padding:10px 9px 12px}.doodle-card-art{height:130px}.gallery-info{gap:10px}.gallery-info p{font-size:10px;max-width:79%}.doodle-card-name{font-size:11px}.gallery-footer{gap:10px;flex-wrap:wrap}.gallery-footer .text-button{font-size:11px}.gallery-footer .button{font-size:11px}.doodle-picker strong{font-size:13px}.doodle-picker small{font-size:10px}html[dir=rtl] .gallery-heading h2{font-size:28px}html[dir=rtl] .doodle-card-name{font-size:16px}}
.doodle[data-doodle=notebook]{clip-path:none}.new-day-action{display:block;font-size:12px;padding:9px 12px;margin:-5px 0 18px;border:1px solid #d8dec9;border-radius:5px;background:#eff2e5}

.chat-batch{border-top:1px solid var(--line);margin-top:20px;padding-top:17px}.chat-batch>h3{font:23px/1.5 var(--serif);margin:0 0 8px}.chat-batch>details{border:1px solid #dce1d1;border-radius:8px;padding:16px;margin-top:16px}.chat-batch summary{cursor:pointer;font-size:13px;line-height:1.7;color:#66795a}.batch-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:15px 0}.batch-actions .button{font-size:12px;white-space:normal;min-height:39px}.batch-actions .text-button{font-size:11px}.batch-card .batch-select{display:flex;align-items:flex-start;gap:10px;margin:0!important;font:18px/1.6 var(--serif)}.batch-select input[type=checkbox]{width:17px;height:17px;flex:0 0 17px;margin-top:5px;accent-color:#6b7d59}.batch-card>small{font-size:10px;color:#8c947c;overflow-wrap:anywhere}.batch-card textarea{width:100%;font-size:15px;min-height:100px}.batch-card input:not([type=checkbox]){width:100%;font-size:15px}.batch-card details{margin:12px 0}.batch-card label{display:block}.chat-batch .external-ai{background:#f0f3e8}#batch-summary{font-size:12px;color:#697d5c}#batch-files{max-height:140px;overflow:auto;font-size:11px;line-height:1.8;overflow-wrap:anywhere}#batch-status{white-space:pre-wrap}.chat-batch button:disabled{opacity:.5;cursor:default}@media(max-width:740px){.chat-batch>details{padding:12px}.batch-actions{gap:10px}.batch-actions .button{font-size:11px;max-width:100%}.batch-card .batch-select{font-size:17px}}

.public-preview-note{padding:12px 15px;border:1px solid var(--line);border-radius:8px;background:var(--accent-soft);font-size:12px;line-height:1.9}.agent-chip{max-width:190px;white-space:normal}#save-original{max-width:100%;white-space:normal;text-align:start}
