:root{color-scheme:light;--ink:#302d47;--muted:#696177;--purple:#6255b7;--line:#dbd6ed;--bg:#f0eef8;--paper:#fff;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;padding:12px 20px}button,input,select{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation;border:2px solid var(--line);border-radius:14px;background:#fff;transition:background .12s,box-shadow .12s}button:hover{border-color:#aaa0d1;background:#f9f7ff}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,[contenteditable]:focus-visible,a:focus-visible{outline:3px solid #265cd5;outline-offset:3px}button[aria-pressed=true]{background:#ede8ff;border-color:var(--purple);box-shadow:inset 0 0 0 1px var(--purple)}svg{display:block;width:42px;height:42px;flex-shrink:0}
.sr-only,.skip:not(:focus){position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;padding:0!important;border:0!important;margin:-1px!important}.skip:focus{position:fixed;top:10px;left:12px;z-index:30;padding:12px;background:white}
.app-header,main{max-width:1480px;margin:0 auto}.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:flex;align-items:center;justify-content:center;width:41px;height:41px;font-size:28px;font-weight:800;background:var(--purple);color:#fff;border-radius:12px 12px 4px 12px;transform:rotate(-5deg)}.brand-mark span{font-size:21px}.brand h1{font-size:22px;letter-spacing:-.8px;margin:0}.brand h1 span{color:var(--purple)}.utility-controls{display:flex;gap:7px}.utility-controls .visual-control{min-width:46px;min-height:46px;padding:4px 10px}.utility-controls svg{width:28px;height:28px}.question{font-size:28px;font-weight:700;line-height:1}.visual-control{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-height:62px;padding:8px 10px;min-width:0}.control-label{font-size:12px;font-weight:600;line-height:1.25;text-align:center}.action-shelf{display:flex;align-items:stretch;gap:10px;background:#e9e5f6;border:1px solid var(--line);border-radius:18px;padding:9px;margin-bottom:12px}.action-shelf .visual-control{flex:1;max-width:140px;min-height:66px;box-shadow:0 3px 0 #ddd6ef}.shelf-divider{width:1px;background:#c9c0df;margin:7px 3px}.action-shelf #undoBtn{margin-left:auto}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:18px;align-items:start}.writing-side{min-width:0}.paper{position:relative;background:#fff;border:2px solid #d8d0e9;border-radius:5px 18px 18px 5px;box-shadow:4px 4px 0 #e1dbf0;min-height:calc(100dvh - 228px);padding:21px 30px 28px 43px;overflow-wrap:anywhere}.paper:before{content:'';position:absolute;top:0;bottom:0;left:22px;width:1px;background:#eae3f0}#docTitle{display:block;width:100%;border:0;border-bottom:1px solid #eee9f5;border-radius:0;background:transparent;padding:2px 0 9px;margin-bottom:18px;font-size:24px;font-weight:700;line-height:1.3}#editor{min-height:calc(100dvh - 348px);line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;caret-color:#514099}#editor p{margin:0 0 .4em}#editor:focus-visible{outline:2px dashed #ddd4ef;outline-offset:10px}#editor::selection,#editor *::selection{background:#ded4ff;color:#241d3c}
.toolbar{background:#fbfaff;border:2px solid var(--line);border-radius:18px;padding:12px;box-shadow:0 3px 0 #e1dbf0}.tool-section+.tool-section{border-top:1px solid #e8e2f1;padding-top:10px;margin-top:10px}.font-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.font-cards .visual-control{min-height:61px;padding:7px 4px}.font-sample{font-size:36px;line-height:1.15}.size-tools{display:grid;grid-template-columns:1fr 1fr;gap:7px}.size-tools button{min-height:59px}.size-small{font-size:25px;font-weight:700}.size-large{font-size:36px;font-weight:700}.effect-tools,.align-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.effect-tools button{min-height:59px;padding:7px 2px}.effect-sample{font-family:Georgia,serif;font-size:36px;line-height:1}.effect-tools b{font-family:Arial,sans-serif;font-weight:900}.effect-tools u{text-underline-offset:5px}.align-tools svg{width:33px;height:33px}.align-tools button{min-height:53px;padding:7px 3px}.colors{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.colors button{min-height:40px;height:42px;padding:4px;border:2px solid transparent;border-radius:9px;background:transparent;box-shadow:none}.swatch{display:block;width:100%;height:100%;min-height:29px;border-radius:5px;background:var(--swatch);box-shadow:0 1px 0 #0002}.colors button[aria-pressed=true]{border-color:var(--ink);background:#fff}.colors button[aria-pressed=true] .swatch:after{content:'✓';display:block;text-align:center;color:#fff;font-size:19px;line-height:28px}.selection-tools{margin-top:10px}.selection-tools .visual-control{width:100%;min-height:46px;flex-direction:row;background:#f0ecfb}.selection-tools svg{height:31px;width:31px}
.status-bar{display:flex;align-items:center;gap:10px;padding:10px 2px 0;min-height:48px;font-size:11px}.status-bar .visual-control{min-height:38px;padding:4px 9px}.status-bar svg{width:24px;height:24px}.status-bar .control-label{font-size:11px}#saveIndicator{display:flex;align-items:center;gap:8px;margin-right:auto;min-width:0;color:#716481}#saveIndicator[data-state=ok]{color:#226e47}#saveIndicator[data-state=error]{color:#a52138;font-weight:700;font-size:13px}.save-glyph{font-size:24px;line-height:1;min-width:25px}.save-glyph:before{content:'…'}#saveIndicator[data-state=ok] .save-glyph:before{content:'✓'}#saveIndicator[data-state=error] .save-glyph:before{content:'⚠'}#saveIndicator[data-state=error]{flex:1 1 100%;order:2}.status-bar:has([data-state=error]){flex-wrap:wrap}.version-note{font-size:10px;color:#70677d;white-space:nowrap}.print-only{display:none}
/* Presentation changes affect controls, not typed content. Accessible names are always present. */
body[data-mode=symbols] .visual-control .control-label,body[data-mode=symbols] #saveIndicator:not([data-state=error]) #saveStatus{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
body[data-mode=text] .visual-control>svg,body[data-mode=text] .visual-control>.control-icon{display:none}
body[data-mode=text] .control-label{font-size:14px}body[data-mode=text] .colors{grid-template-columns:repeat(3,minmax(0,1fr))}body[data-mode=text] .colors button{height:38px;min-height:38px;padding:4px;background:#fff;border:1px solid var(--line)}body[data-mode=text] .colors button[aria-pressed=true]{border:2px solid var(--purple)}body[data-mode=text] .colors .control-label{font-size:12px}body[data-mode=text] .font-cards .control-label{font-size:17px}body[data-mode=both] .colors{grid-template-columns:repeat(4,minmax(0,1fr))}body[data-mode=both] .colors button{height:55px;min-height:55px;padding:3px;gap:3px}body[data-mode=both] .colors .control-label{font-size:10px}body[data-mode=both] .swatch{min-height:25px}body[data-mode=both] .colors .swatch:after{line-height:25px}body[data-mode=both] .toolbar .visual-control{gap:5px}
/* Dialogs are available on request; no instructional prose overlays the blank page. */
dialog{border:2px solid var(--line);border-radius:20px;padding:24px;max-width:650px;width:calc(100% - 24px);color:var(--ink);box-shadow:0 18px 100px #22233c40;max-height:88dvh;overflow:auto}dialog::backdrop{background:#29234170}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.dialog-head h2{font-size:23px;line-height:1.3;margin:0}.dialog-head button{min-width:44px;min-height:44px;font-size:22px}dialog p{font-size:14px;line-height:1.7;color:var(--muted)}dialog h3{font-size:17px;margin:22px 0 5px}.eyebrow{font-size:10px;letter-spacing:1px}.mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:20px 0}.mode-options button{display:flex;flex-direction:column;align-items:center;gap:12px;padding:15px 6px;font-size:13px;min-height:148px}.mode-preview{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-height:74px;background:#f0ecfa;border-radius:12px;padding:10px;min-width:85px}.mode-preview>span{font-size:12px}.mode-preview>strong{font-size:16px}.secondary-action{padding:12px}.download-choice{display:flex;flex-direction:column;text-align:left;gap:7px;padding:16px;width:100%;margin:12px 0}.download-choice strong{font-size:17px}.download-choice span{font-size:13px;line-height:1.5;color:var(--muted)}.muted{font-size:12px!important}.doc-row{display:flex;gap:10px;margin:10px 0}.doc-open{flex:1;display:flex;flex-direction:column;gap:5px;padding:14px;text-align:left;min-width:0;overflow-wrap:anywhere}.doc-open strong{font-size:17px}.doc-open span{font-size:11px;color:var(--muted)}.doc-delete{align-self:center;min-height:44px;padding:9px;font-size:12px;color:#a52138}.error-banner{background:#ffe5e5;padding:18px}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);width:max-content;z-index:100;background:#332d48;color:#fff;padding:13px 18px;border-radius:13px;font-size:14px;line-height:1.5}#toast[hidden]{display:none}
body.focus-mode .app-header,body.focus-mode .action-shelf,body.focus-mode .toolbar{display:none}body.focus-mode .workspace{grid-template-columns:1fr;max-width:1200px;margin:auto}body.focus-mode .paper{min-height:calc(100dvh - 80px)}body.focus-mode #editor{min-height:calc(100dvh - 190px)}
@media(max-width:1100px){body{padding:10px 12px}.workspace{grid-template-columns:minmax(0,1fr) 260px;gap:12px}.toolbar{padding:10px}.action-shelf{gap:7px}.action-shelf .visual-control{min-height:63px}.paper{padding:20px 22px 25px 38px}.paper:before{left:19px}.colors button{padding:3px}.control-label{font-size:11px}}
@media(max-width:740px){body{padding:9px}.brand h1{font-size:20px}.brand-mark{width:35px;height:35px;font-size:25px}.app-header{gap:8px}.utility-controls{gap:5px}.utility-controls .visual-control{padding:4px 8px}.action-shelf{gap:5px;padding:7px;flex-wrap:wrap}.action-shelf .visual-control{min-width:43px;flex:1;min-height:54px;padding:5px 3px}.action-shelf svg{width:32px;height:32px}.shelf-divider{display:none}.action-shelf .control-label{font-size:10px}.workspace{grid-template-columns:minmax(0,1fr);gap:10px}.paper{min-height:360px;padding:18px 19px 22px 34px}.paper:before{left:16px}#docTitle{font-size:23px;margin-bottom:15px}#editor{min-height:238px}.toolbar{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tool-section+.tool-section{margin:0;padding:0;border:0}.tool-section{min-width:0}.font-cards{gap:5px}.font-cards .visual-control{min-height:52px}.font-sample{font-size:29px}.size-tools{height:100%}.size-tools .visual-control{min-height:70px}.effect-tools .visual-control{min-height:53px}.effect-sample{font-size:30px}.align-tools .visual-control{min-height:48px}.colors{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.colors button{height:38px;min-height:38px}.color-section{grid-column:2;grid-row:2/4}.selection-tools{margin:0;grid-column:1/-1}.status-bar{gap:7px}.status-bar .version-note{font-size:9px}.toolbar .control-label{font-size:10px}body[data-mode=both] .colors{grid-template-columns:repeat(3,minmax(0,1fr))}body[data-mode=both] .colors button{min-height:50px;height:50px}body[data-mode=text] .colors{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-mode=text] .action-shelf .visual-control,body[data-mode=both] .action-shelf .visual-control{flex:1 1 21%;max-width:none}.mode-options{grid-template-columns:1fr}.mode-options button{flex-direction:row;min-height:90px;text-align:left}.mode-preview{min-height:60px;min-width:98px}body[data-mode=both] .font-cards .visual-control{min-height:67px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media print{@page{size:A4;margin:20mm}html,body{background:#fff!important;color:#000;margin:0;padding:0}.app-header,.action-shelf,.toolbar,#docTitle,.status-bar,.skip,#toast,dialog,.error-banner{display:none!important}main,.workspace,.writing-side,.paper{display:block!important;max-width:none;width:auto;margin:0;padding:0;border:0;box-shadow:none;background:transparent!important}.paper{min-height:0!important;overflow:visible}.paper:before{display:none}.print-only{display:block!important;margin:0 0 12pt;font-size:20pt;overflow-wrap:anywhere}.print-only:empty{display:none!important}#editor{display:block!important;min-height:0!important;outline:0!important;line-height:1.55!important;overflow:visible}.paper,#editor{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Genre shells: structure outside editing hosts; no instructional copy on the page. */
[hidden]{display:none!important}
.genre-options{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:24px}
.genre-card{min-height:176px;background:#fbfaff;padding:22px 12px}
.genre-card>svg{height:90px;width:90px}
.genre-card .control-label{font-size:18px}
.recipe-name-marker{display:flex;align-items:center;gap:10px;margin-bottom:8px;color:#67538a}
.recipe-name-marker svg{width:32px;height:32px}
.recipe-name-marker .control-label{font-size:14px}
.recipe-sheet{display:grid;gap:24px}
.recipe-section{padding:12px 14px 15px;border:2px solid #e5e0f0;border-radius:12px;min-width:0;background:#fff}
.recipe-section.active-section{border-color:#b8a7d8}
.recipe-caption{display:flex;align-items:center;gap:10px;margin:0 0 10px;color:#645184;user-select:none}
.recipe-caption svg{width:36px;height:36px}
.recipe-caption .control-label{font-size:16px;text-align:left}
.recipe-field{min-height:120px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;caret-color:#514099;outline-offset:4px}
.recipe-field :is(p,div){margin:0 0 .3em}
.recipe-field :is(ul,ol){margin:0;padding-left:1.45em}
.recipe-field li{padding-left:.15em}
.recipe-field::selection,.recipe-field *::selection{background:#ded4ff;color:#241d3c}
body[data-mode=symbols] :is(.recipe-caption,.recipe-name-marker) .control-label,body[data-mode=symbols] .chooser-label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
body[data-mode=text] :is(.recipe-caption,.recipe-name-marker)>svg{display:none}
body[data-mode=text] .genre-card{min-height:100px}
#freeCopyBtn{margin-right:8px;margin-bottom:8px}
@media(max-width:740px){.recipe-section{padding:10px}.recipe-field{min-height:96px}.recipe-sheet{gap:16px}.genre-options{gap:10px}.genre-card{min-height:140px;padding:16px 6px}.genre-card>svg{width:70px;height:70px}.genre-card .control-label{font-size:15px}.paper[data-kind=recipe]{padding:16px 14px 18px 27px}}
@media print{
 .paper[data-kind=recipe] #editor,#recipeNameMarker{display:none!important}
 .recipe-sheet{display:block;gap:0}
 .recipe-section{display:block;border:0;padding:0;margin:0 0 20pt;background:none;break-inside:auto}
 .recipe-caption{display:block;margin:0 0 6pt;break-after:avoid;color:#000}
 .recipe-caption svg{display:none!important}
 body[data-mode=symbols] .recipe-caption .control-label,.recipe-caption .control-label{position:static!important;clip-path:none!important;overflow:visible!important;white-space:normal!important;width:auto!important;height:auto!important;font-size:14pt;font-weight:700}
 .recipe-field{min-height:0!important;outline:0!important;line-height:1.55;overflow:visible}
 .recipe-field li{break-inside:avoid}
 .recipe-field{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Additional writing genres share the existing protected blocks, not independent forms. */
.genre-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.genre-card{min-width:0;min-height:135px;padding:14px 6px}
.genre-glyph{font-family:Georgia,serif;font-size:57px;line-height:1.2;color:#6655aa}
.field-glyph{display:inline-flex;align-items:center;justify-content:center;min-width:36px;font:28px/1 Georgia,serif;color:#584b80}
body[data-mode=text] .genre-glyph,body[data-mode=text] .field-glyph{display:none}
.paper[data-kind]:not([data-kind=free]) #editor{display:none!important}
#structuredSheet .recipe-field{min-height:74px}
#structuredSheet [data-field=items],#structuredSheet [data-field=verses],#structuredSheet [data-field=message]{min-height:165px}
@media(max-width:740px){.genre-options{grid-template-columns:repeat(2,minmax(0,1fr))}.genre-card{min-height:112px}.genre-glyph{font-size:40px}}
@media print{.paper[data-kind]:not([data-kind=free]) #editor{display:none!important}#structuredSheet{display:block}#structuredSheet[hidden]{display:none!important}}

/* Genre-driven structure: decorations and author-controlled typography are separate. */
.tool-section[hidden],.align-tools [hidden]{display:none!important}
.paper[data-kind=recipe] .recipe-field,.paper[data-kind=list] .recipe-field,
.paper[data-kind=note] .recipe-field,.paper[data-kind=invitation] .recipe-field,
.paper[data-kind=recipe] .recipe-field *, .paper[data-kind=list] .recipe-field *,
.paper[data-kind=note] .recipe-field *, .paper[data-kind=invitation] .recipe-field *{text-align:left!important}
.paper[data-kind=invitation] #docTitle,.paper[data-kind=poem] #docTitle,
.paper[data-kind=invitation] #printTitle,.paper[data-kind=poem] #printTitle{text-align:center;font-weight:700}
.paper[data-kind=recipe] .recipe-field>ul,.paper[data-kind=list] .recipe-field>ul{list-style-type:disc;list-style-position:outside}
.paper[data-kind=recipe] .recipe-field>ol{list-style-type:decimal;list-style-position:outside}
.paper[data-kind=poem] #versesEditor{white-space:pre-wrap}
@media print{
 .paper[data-kind=invitation] #printTitle,.paper[data-kind=poem] #printTitle{text-align:center!important}
 .paper[data-kind=recipe] .recipe-field>ul,.paper[data-kind=list] .recipe-field>ul{list-style-type:disc!important}
 .paper[data-kind=recipe] .recipe-field>ol{list-style-type:decimal!important}
}

