/* Tools stay out of the way; personal text is always inserted as plain text. */
#open-tools{white-space:nowrap;gap:10px}.flow-key{font:10px/1.3 Arial,sans-serif;border:1px solid #cfc6cf;border-radius:5px;padding:3px 5px;color:#716778}
.tool-dialog{width:min(670px,calc(100% - 28px));padding:26px;background:#faf7f1;max-height:88dvh}
.flow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.flow-head h2{font:34px/1.12 Georgia,serif;letter-spacing:-.04em;color:#343333}.flow-head .eyebrow{color:#507264;margin-bottom:12px}.flow-head .icon-button{flex:none}
.tool-search{display:block;margin:24px 0 10px}.tool-search span{font-size:12px;color:#675f68;display:block;margin-bottom:8px}.tool-search input{background:white!important;font-size:16px!important;min-height:50px}
#tool-count{font-size:12px;line-height:1.5;color:#736c74;margin:8px 0 14px}#tool-results{max-height:48dvh;overflow:auto;overscroll-behavior:contain;display:grid;gap:6px;padding:3px}
.tool-result{width:100%;border:1px solid transparent;background:transparent;display:flex;text-align:left;align-items:center;gap:14px;padding:14px 12px;border-radius:13px;color:#37323b;min-height:76px}
.tool-result:hover,.tool-result:focus-visible{background:#eaf0e7;border-color:#a9bca8;outline:2px solid #4c705b;outline-offset:0}.tool-result-copy{flex:1;min-width:0}.tool-result strong{display:block;font-size:14px;font-weight:600;line-height:1.4}.tool-result small{display:block;font-size:12px;color:#756e75;line-height:1.55;margin-top:4px}.tool-icon{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e6ece2;color:#4c6d59;font:22px Georgia}.tool-arrow{color:#7b8b7d}.flow-note{font-size:11px;line-height:1.65;color:#776f76;margin-top:16px}.focus-memory{display:block;margin:8px 0 0 auto;font-size:12px}
.writer-dialog{width:min(1000px,calc(100% - 28px));height:min(94dvh,1050px);max-height:94dvh;padding:0;background:#f5f1e8;color:#353735;border:1px solid #d8d2c5}.writer-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.writer-header{padding:25px 30px 19px;flex:none;border-bottom:1px solid #dfd9cc}.writer-header h2{font-size:clamp(26px,3.6vw,42px);max-width:650px;line-height:1.1}.writer-header .eyebrow{font-size:10px;letter-spacing:.14em;overflow-wrap:anywhere;max-width:740px}.writer-tools{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-top:20px}.writer-tabs{display:flex;padding:4px;background:#e7e4da;border-radius:99px;gap:4px}.writer-tabs button{border:0;border-radius:99px;background:transparent;padding:9px 16px;min-height:40px;color:#5c635d;font-size:12px}.writer-tabs button[aria-pressed=true]{background:#fffdf8;color:#254d3e;box-shadow:0 2px 6px #3534290d}.writer-size{display:flex;align-items:center;gap:9px;margin:0!important;font-size:12px!important}.writer-size select{margin:0!important;width:auto!important;padding:9px 25px 9px 10px!important;font-size:12px!important;min-height:40px}#writer-count{font-size:12px;color:#687267;margin-left:auto;font-variant-numeric:tabular-nums}#writer-count[data-over=true]{color:#a43428}
.writer-workspace{overflow:auto;min-height:0;flex:1;padding:28px 45px;overscroll-behavior:contain;background:radial-gradient(ellipse at top right,#e6eadf 0,transparent 52%),#f5f1e8}.writer-paper{max-width:760px;min-height:100%;margin:auto;background:#fffdf8;border:1px solid #e2dace;box-shadow:0 14px 40px #473c2110;padding:clamp(22px,4vw,48px);position:relative;border-radius:3px}.writer-paper:before{content:'✦';position:absolute;top:20px;right:25px;font-size:18px;color:#78947b;pointer-events:none}
#writer-text,#writer-reading{width:100%;min-height:260px;margin:0;padding:16px 0;border:0;background:transparent;color:#343b35;font:20px/1.85 Georgia,'Times New Roman',serif;resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere;letter-spacing:0}.writer-dialog[data-size=large] #writer-text,.writer-dialog[data-size=large] #writer-reading{font-size:25px;line-height:1.85}#writer-text:focus{outline:2px solid #a6b69c;outline-offset:10px;border-radius:2px;box-shadow:none}#writer-reading:focus{outline:2px solid #a6b69c;outline-offset:10px}
.writer-prompts{max-width:760px;margin:20px auto 0;font-size:12px;line-height:1.7;color:#5f6d60}.writer-prompts summary{cursor:pointer;min-height:35px}.writer-prompts p{padding:10px 14px;border-left:2px solid #a7bda3;margin-top:8px;background:#eaf0e3}.writer-bottom{flex:none;border-top:1px solid #dad7cb;background:#f7f5ee;padding:15px 30px 20px}.writer-bottom>p{font-size:11px;line-height:1.5;color:#747369;margin:0 0 12px}.writer-buttons{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.writer-buttons .btn{min-height:44px;font-size:12px}#writer-apply{background:#345845;color:white;border-color:#345845}.writer-alert{padding:12px 15px;background:#f7e9d8;color:#724b26!important;border:1px solid #e4c7a3;border-radius:10px;font-size:12px!important;line-height:1.6;margin:10px 0!important}.writer-alert .inline-actions{margin-top:10px}#writer-conflict,#writer-error{overflow-wrap:anywhere}
@media(max-width:620px){.flow-key{display:none}.tool-dialog{padding:20px 16px}.tool-result{gap:10px;padding:12px 8px}.tool-result small{font-size:11px}.tool-result .tool-arrow{display:none}.writer-dialog[open]{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;inset:0;border:0;border-radius:0}.writer-header{padding:18px 16px 14px;padding-top:max(18px,env(safe-area-inset-top))}.writer-header h2{font-size:27px;line-height:1.16}.writer-header .eyebrow{font-size:8px;margin-bottom:9px;letter-spacing:.1em}.writer-workspace{padding:18px 14px}.writer-paper{padding:26px 19px;min-height:340px}.writer-tools{gap:10px;margin-top:14px}.writer-tabs button{padding:8px 12px;min-height:40px}.writer-size>span{display:none}#writer-count{margin-left:0;flex-basis:100%;font-size:11px}.writer-bottom{padding:12px 16px max(16px,env(safe-area-inset-bottom))}.writer-buttons{gap:8px}.writer-buttons .btn{flex:1 1 150px}.writer-prompts{font-size:11px}.writer-prompts summary{min-height:44px}#writer-text,#writer-reading{font-size:18px}.writer-dialog[data-size=large] #writer-text,.writer-dialog[data-size=large] #writer-reading{font-size:22px}}
@media(prefers-reduced-motion:reduce){.tool-dialog,.writer-dialog{scroll-behavior:auto}}
/* Narrow toolbars must wrap instead of pushing the first control off the left edge. */
@media(max-width:760px){.studio-actions{flex-wrap:wrap;gap:7px}.studio-actions #open-tools{order:10;flex:1 1 100%;margin-top:3px;justify-content:center}.studio-actions .icon-button:nth-of-type(2){margin-right:0}.studio-actions [data-max-vault]{margin-right:auto}}
