/* Card writing workspace: document canvas and a persistent conversation rail. */
html:root .cw-dialog{--pw-bg:#191919;--pw-panel:#252525;--pw-line:#3b3b3b;--pw-text:#eeeeec;--pw-muted:#a7a7a3;background:var(--pw-bg);color:var(--pw-text);overflow:hidden;font:13px/1.45 var(--font-ui,Arial,sans-serif);color-scheme:dark}
html:root .cw-dialog[open]{display:flex;flex-direction:column}
html:root .cw-dialog *{box-sizing:border-box;min-width:0}
html:root .cw-dialog .cw-bar{flex-shrink:0;min-height:52px;padding:8px 16px;gap:12px;position:relative;background:#202020;border-color:var(--pw-line);color:var(--pw-text)}
html:root .cw-dialog .cw-bar strong{font-size:13px;font-weight:550;letter-spacing:.01em}
.cw-dialog .cw-tabs{display:none}
.cw-app-mark{display:grid;place-items:center;width:27px;height:29px;border-radius:4px;background:#365c4a;color:#edfff2;font:bold 17px Georgia,serif}
html:root .cw-dialog .cw-bar button{font-family:inherit;font-size:12px;line-height:1.4;background:transparent;border-color:#494949;color:var(--pw-text);padding:7px 11px;border-radius:6px}
html:root .cw-dialog .cw-bar [data-cw-close]{font-size:23px;line-height:23px;border-color:transparent;padding:3px 9px}
html:root .cw-dialog .cw-bar [role=status]:empty{min-height:0}
html:root .cw-dialog .cw-columns{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:0;flex:1;min-height:0;overflow:hidden}
.cw-dialog [data-cw-editor]{min-height:0;overflow:hidden}
html:root .cw-dialog .pe-workspace{--pe-ink:var(--pw-text);--pe-line:var(--pw-line);display:flex;flex-direction:column;height:100%;max-width:none;padding:0;margin:0;color:var(--pw-text);background:var(--pw-bg)}
html:root .cw-dialog .pe-workspace :is(button,input,textarea,select,.pe-download){font-family:inherit;font-size:12px;line-height:1.4;min-height:30px;background:#292929;color:var(--pw-text);border:1px solid #484848;border-radius:4px;padding:6px 9px}
html:root .cw-dialog :is(button,summary){cursor:pointer}
html:root .cw-dialog :is(button,summary):hover{background:#383838}
html:root .cw-dialog :is(button,summary,input,textarea,select,a):focus-visible{outline:2px solid #b5cdbb;outline-offset:2px}
html:root .cw-dialog button:disabled{opacity:.45;cursor:default}
html:root .cw-dialog a{color:#d1dfd5}
.pw-document-bar{display:flex;align-items:center;gap:20px;min-height:49px;padding:6px 22px;background:#252525;flex-shrink:0;border-bottom:1px solid #303030}
.pw-document-bar .pe-label{flex:1}
html:root .cw-dialog .pe-workspace .pw-document-bar input{font-size:15px;font-weight:550;padding:4px 7px;margin:0 0 0 -7px;max-width:470px;width:100%;background:transparent;border-color:transparent}
html:root .cw-dialog .pe-workspace .pw-document-bar input:hover,html:root .cw-dialog .pe-workspace .pw-document-bar input:focus{border-color:#535353}
.pw-case-label{max-width:35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--pw-muted);margin:0}
.pw-ribbon{position:relative;display:flex;align-items:stretch;flex-wrap:wrap;gap:0;background:#252525;border-bottom:1px solid #3b3b3b;padding:9px 8px 7px;flex-shrink:0;z-index:2}
.pw-ribbon-group{display:flex;flex-direction:column;justify-content:space-between;gap:7px;padding:0 9px;border-right:1px solid #414141}
.pw-ribbon-group:last-child{border:0}
.pw-ribbon-controls{display:flex;align-items:center;gap:4px;min-height:31px}
.pw-ribbon-caption{display:block;text-align:center;font-size:10px;line-height:16px;color:#aaa9a7}
html:root .cw-dialog .pe-workspace .pw-ribbon :is(button,select){padding:5px 7px;white-space:nowrap;background:transparent;border-color:transparent}
html:root .cw-dialog .pw-ribbon button:hover{background:#3e3e3e;border-color:#626262}
html:root .cw-dialog .pw-ribbon select{border-color:#555;padding-right:20px;max-width:132px}
.pw-ribbon [data-pe-format]{width:29px;height:30px;display:grid;place-items:center;font-size:15px!important}
.pw-ribbon svg{width:19px;height:19px}
.pw-ribbon-controls:has([data-pe-format="justifyLeft"]){display:grid;grid-template-columns:repeat(3,29px);gap:1px 3px}
html:root .cw-dialog [data-pe="templates"]{max-width:98px;white-space:normal;line-height:1.3}
.pw-menu{margin:0!important;padding:0!important;border:0!important;font-size:12px}
.pw-menu>summary{list-style:none;padding:6px 9px!important;white-space:nowrap;border-radius:4px;line-height:18px;font-weight:500!important}
.pw-menu>summary::-webkit-details-marker{display:none}
.pw-menu>summary::after{content:'⌄';margin-left:7px;color:#aaa}
.pw-menu[open]>summary{background:#3c3c3c}
html:root .cw-dialog .pw-menu-panel{position:absolute;z-index:10;top:100%;left:12px;width:min(580px,calc(100% - 24px));max-height:min(65dvh,650px);overflow:auto;background:#292929;border:1px solid #505050;box-shadow:0 16px 40px #0007;border-radius:0 0 8px 8px;padding:20px;color:var(--pw-text);color-scheme:dark}
.pw-file-menu .pw-menu-panel{width:min(350px,calc(100% - 24px))!important}
.pw-output-menu .pw-menu-panel{left:auto!important;right:12px;width:min(290px,calc(100% - 24px))!important;display:grid;gap:12px}
.pw-output-menu label{display:grid;gap:6px}
.pw-menu-panel .pe-sidebar{padding:0;border:0;display:block}
html:root .cw-dialog .pe-sidebar h3{color:#babbb6;font-size:11px;letter-spacing:.06em;text-transform:uppercase;margin:8px 0 12px}
html:root .cw-dialog .pe-sidebar button{width:100%;text-align:left;font-size:13px;margin:6px 0}
html:root .cw-dialog .pe-sidebar small{color:#aaa;font-size:11px}
html:root .cw-dialog .pw-file-menu :is(.pe-download,[data-pe="discard"],[data-pe="night"]){display:block;width:100%;margin:8px 0;text-align:left}
.pw-menu-panel .pe-recipient-grid{margin-top:0}
html:root .cw-dialog .pw-menu-panel :is(input,select,textarea){font-size:14px;background:#222;border-color:#515151}
html:root .cw-dialog .pw-menu-panel .pe-note{font-size:11px;color:#b8b8b1;margin-bottom:0}
.pw-canvas{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#555 transparent;padding:0 32px 40px;background:#191919}
.pw-ruler{display:flex;justify-content:space-between;height:27px;max-width:794px;margin:0 auto;color:#a3a3a0;font-size:8px;align-items:center;padding:0 9%;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(2.5% - 1px),#7776 calc(2.5% - 1px),#7776 2.5%) center bottom/82% 6px no-repeat}
html:root .cw-dialog .pe-paper{width:100%;max-width:794px;min-height:1123px;margin:8px auto 0;padding:68px 9% 48px;border:1px solid #ddd;background:#fff!important;color:#232323!important;box-shadow:0 4px 18px #0006;border-radius:1px;font-family:Arial,Helvetica,sans-serif;color-scheme:light}
html:root .cw-dialog .pe-paper .pe-editor{font-family:Arial,Helvetica,sans-serif;font-weight:400;font-size:15px;line-height:1.6;min-height:650px;color:#232323}
html:root .cw-dialog .pe-paper .pe-editor :is(p,h1,h2,blockquote){color:inherit!important}
html:root .cw-dialog .pe-paper .pe-reference-line{color:#565656;font-size:10px}
html:root .cw-dialog .pe-paper .pe-paper-head{font-family:Arial,Helvetica,sans-serif;color:inherit;font-size:11px;margin-bottom:36px}
.cw-dialog .pe-paper-head:has(strong:empty):has(span:empty){min-height:0}
html:root .cw-dialog .pe-paper footer{border-color:#ddd;color:#666}
html:root .cw-dialog .pe-night .pe-paper{background:#292929!important;color:#eee!important;border-color:#555;color-scheme:dark}
html:root .cw-dialog .pe-night .pe-editor{color:#eee!important}
html:root .cw-dialog .pe-night .pe-paper :is(.pe-reference-line,footer){color:#bbb}
html:root .cw-dialog .pw-blank-paper{max-width:794px;min-height:900px;margin:35px auto 0;padding:150px 40px;text-align:center;border:1px solid #ddd;border-radius:1px;background:#fff;color:#242424;box-shadow:0 4px 18px #0006}
html:root .cw-dialog .pw-blank-paper h3{font:normal 28px Georgia,serif;color:#292929;margin:0 0 16px}
.pw-blank-paper p{max-width:300px;margin:0 auto 25px;font-size:13px;color:#73736d;line-height:1.6}
html:root .cw-dialog .pw-blank-paper button{background:#294c3b;color:#fff;padding:11px 22px;border-color:#294c3b}
html:root .cw-dialog .pw-statusbar{flex-shrink:0;display:flex;gap:12px;min-height:30px;margin:0;padding:6px 18px;background:#252525;border-top:1px solid #3a3a3a;font-size:11px;color:#b7b7b3}
html:root .cw-dialog .pw-statusbar [role=alert]{color:#ffbca9}
.pw-statusbar [data-pe-status]{flex:1}
html:root .cw-dialog .pw-statusbar .pe-confirmed{padding:0;margin:0;background:none;border:none;font-size:11px;color:#cfdfce}
html:root .cw-dialog .cw-ai{padding:0;border-left:1px solid #3e3e3e;background:#1e1e1e;color:#eee;min-height:0;overflow:hidden;display:block;font-size:13px}
.pw-chat-shell{height:100%;display:flex;flex-direction:column}
.pw-chat-header{display:flex;align-items:center;gap:10px;min-height:49px;border-bottom:1px solid #373737;padding:10px 22px;flex-shrink:0}
html:root .cw-dialog .pw-chat-header h2{font-size:15px;font-weight:600;margin:0;color:#eee;letter-spacing:0}
.pw-chat-header span{font-size:11px;color:#aaa}
html:root .cw-dialog .pw-chat-header button{margin:0 0 0 auto;padding:0;width:28px;height:28px;border:0;border-radius:5px;background:none;color:#bbb;font-size:21px}
.pw-chat-body{flex:1;min-height:0;overflow:auto;padding:22px 22px 30px;scrollbar-color:#555 transparent;overscroll-behavior:contain;overflow-wrap:anywhere}
.pw-chat-body p{font-size:13px;line-height:1.7}
.pw-chat-empty{padding:65px 0 30px;text-align:center}
.pw-chat-mark{display:grid;place-items:center;width:35px;height:35px;margin:0 auto 20px;border:1px solid #5a635c;border-radius:11px;color:#d0e1d2;font:20px Georgia,serif}
html:root .cw-dialog .pw-chat-empty h3{font-size:16px;font-weight:500;letter-spacing:-.02em;color:#e8e8e4;margin:0 0 10px}
.pw-chat-empty p{color:#aaa;font-size:12px;margin:0}
.pw-chat-status{font-size:11px!important;line-height:1.6!important;color:#aaa}
.pw-chat-status:empty{display:none}
.pw-chat-status[role=alert]{color:#e6c4a8}
html:root .cw-dialog .pw-chat-body button{font-size:12px;margin:8px 0;padding:8px 10px;border:1px solid #505050;border-radius:7px;background:#2d2d2d;color:#eee}
.pw-chat-body label{font-size:11px;color:#aaa}
html:root .cw-dialog .pw-chat-body select{font-size:12px;background:#2a2a2a;border:1px solid #484848;color:#eee;border-radius:5px;width:100%}
html:root .cw-dialog .pw-user-message{width:fit-content;max-width:92%;margin:22px 0 18px auto;padding:13px 17px;border-radius:19px 19px 4px 19px;background:#333;font-size:13px;line-height:1.6;color:#eee;font-weight:400;white-space:pre-wrap;letter-spacing:0}
.wa-history details{border:0;margin:0}
html:root .cw-dialog .wa-history .wa-reply{margin:18px 0 25px;color:#e4e4e1;font-size:13px;line-height:1.8}
html:root .cw-dialog .pw-chat-body :is(h3,h4){color:#e4e4e1}
html:root .cw-dialog .pw-chat-body pre{background:#292929;color:#ddd;border-color:#444;border-radius:6px;font-size:12px}
.pw-chat-composer{position:relative;flex-shrink:0;margin:0 15px 18px;background:#2c2c2c;border:1px solid #434343;border-radius:21px;min-height:133px;box-shadow:0 4px 16px #0001;padding:12px 12px 46px}
.pw-chat-composer:empty{display:none}
.pw-chat-composer:focus-within{border-color:#777}
html:root .cw-dialog .pw-chat-composer label{margin:0;display:block}
html:root .cw-dialog .pw-chat-composer textarea{display:block;width:100%;resize:vertical;min-height:66px;max-height:180px;background:transparent;color:#eee;border:0;box-shadow:none;padding:0 3px;font-size:14px;line-height:1.65;outline:0}
.pw-chat-composer textarea::placeholder{color:#a5a5a1}
html:root .cw-dialog .pw-chat-composer button{position:absolute;bottom:10px;right:11px;display:grid;place-items:center;width:31px;height:31px;margin:0;padding:0;border:0;border-radius:50%;background:#e9eae5;color:#242424;font-size:23px}
.pw-chat-composer::after{content:'Qwen';position:absolute;bottom:18px;left:17px;font-size:10px;color:#92928d}
.cw-office-main{position:relative;display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
.cw-folio-host{display:block;width:100%;height:100%;min-height:0;overflow:auto;background:var(--pw-bg);color:#202735}
.cw-office-dialog:not([data-office-state="ready"]) .cw-folio-host{visibility:hidden}
.cw-office-opening{position:absolute;inset:0;display:grid;place-items:center;background:var(--pw-bg);color:var(--pw-muted);font-size:13px;letter-spacing:.01em}
.cw-office-dialog[data-office-state="ready"] .cw-office-opening,.cw-office-dialog[data-office-state="error"] .cw-office-opening{display:none}
.cw-office-main [data-office-error]{position:absolute;inset:20px 20px auto;padding:18px;border:1px solid #ac806c;border-radius:8px;background:var(--pw-panel);color:var(--pw-text);z-index:10}
.cw-office-main [hidden]{display:none}
.cw-office-dialog [data-office-files]{max-width:280px;background:var(--pw-panel);color:var(--pw-text);border:1px solid var(--pw-line);padding:6px;border-radius:5px;font-family:inherit;font-size:12px}
.cw-office-layout{display:flex;flex:1;min-height:0;overflow:hidden}
.cw-office-layout>.cw-office-main{min-width:0;flex:1}
.cw-office-chat{display:none;flex:0 0 350px;min-width:0;flex-direction:column;border-left:1px solid var(--pw-line);background:var(--pw-panel);color:var(--pw-text)}
.cw-office-layout[data-chat-open=true]>.cw-office-chat{display:flex}
.cw-office-dialog [data-office-chat-toggle][aria-pressed=true]{background:#365a85;border-color:#6b91bd;color:#fff}
.owc-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-bottom:1px solid var(--pw-line)}
.owc-header strong{display:block;font-size:17px}.owc-header small{display:block;margin-top:2px;color:var(--pw-muted);font-size:11px}
.cw-office-dialog .owc-header button{border:0;background:transparent;color:var(--pw-muted);font-size:23px;padding:0 5px}
.owc-messages{flex:1;min-height:0;overflow:auto;padding:18px;scroll-behavior:auto;overflow-anchor:none}
.owc-empty{display:grid;justify-items:center;gap:8px;margin:12vh auto 0;max-width:260px;text-align:center}.owc-empty>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#24528a;color:white;font-size:25px}.owc-empty strong{font-size:15px}.owc-empty p,.owc-note{color:var(--pw-muted);font-size:12px;line-height:1.5}
.owc-turn{margin-bottom:24px}.owc-question{width:fit-content;max-width:90%;margin:0 0 13px auto;padding:10px 13px;border-radius:14px 14px 3px 14px;background:#24528a;color:#fff;white-space:pre-wrap;overflow-wrap:anywhere}.owc-answer{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.owc-pending{color:var(--pw-muted)}.cw-office-dialog .owc-copy{margin-top:7px;padding:3px 0;border:0;background:transparent;color:#80b5ed;font-size:11px}
.owc-footer{padding:12px 16px 16px;border-top:1px solid var(--pw-line)}.owc-note{margin:0 0 9px}.owc-error{margin:0 0 9px;color:#e9a99d;font-size:12px}.owc-footer form{position:relative;margin:0}.owc-footer textarea{width:100%;min-height:78px;max-height:180px;resize:vertical;border:1px solid var(--pw-line);border-radius:12px;padding:11px 45px 11px 12px;background:var(--pw-bg);color:var(--pw-text);font:inherit;font-size:14px}.cw-office-dialog .owc-footer button{position:absolute;right:9px;bottom:9px;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:#24528a;color:#fff;font-size:20px}
@media(max-width:600px){.cw-office-dialog .cw-bar{flex-wrap:wrap!important}.cw-office-dialog [data-office-files]{order:5;max-width:none;flex:1 1 100%;width:100%}.cw-office-dialog .cw-bar [data-office-status]{display:none}.cw-office-dialog .cw-bar [data-office-save]{margin-left:auto}}
@media(max-width:900px){.cw-office-layout[data-chat-open=true]>.cw-office-main{display:none}.cw-office-chat{flex:1;border-left:0}.cw-office-dialog .cw-bar [data-office-chat-toggle]{order:4}}
/* Follow the existing application theme, including changes while the dialog is open. */
html:root[data-familum-night=true] .cw-dialog .pe-paper{background:#262626!important;color:#ededeb!important;border-color:#575757;color-scheme:dark}
html:root[data-familum-night=true] .cw-dialog .pe-paper .pe-editor{color:#ededeb!important}
html:root[data-familum-night=true] .cw-dialog .pe-paper :is(.pe-reference-line,footer){color:#bfbfba;border-color:#505050}
html:root[data-familum-night=true] .cw-dialog .pw-blank-paper{background:#262626;color:#ededeb;border-color:#575757}
html:root[data-familum-night=true] .cw-dialog .pw-blank-paper h3{color:#ededeb}
html:root[data-familum-night=true] .cw-dialog .pw-blank-paper p{color:#b7b7b2}
html:root:not([data-familum-night=true]) .cw-dialog{--pw-bg:#f0f1f2;--pw-panel:#fff;--pw-line:#d7d8da;--pw-text:#292a2b;--pw-muted:#747573;color-scheme:light}
html:root:not([data-familum-night=true]) .cw-dialog :is(.cw-bar,.pw-document-bar,.pw-ribbon,.cw-tabs,.pw-statusbar){background:#fff;border-color:#dedee0;color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog :is(.cw-bar button,.pw-ribbon button,.pw-ribbon select,.pw-ribbon summary){background:transparent;color:#292a2b;border-color:transparent}
html:root:not([data-familum-night=true]) .cw-dialog .cw-bar [data-cw-save-close]{border-color:#d4d5d5}
html:root:not([data-familum-night=true]) .cw-dialog .pw-ribbon select{border-color:#ccc}
html:root:not([data-familum-night=true]) .cw-dialog .pw-document-bar input{background:transparent;color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog :is(button,summary):hover{background:#ededed}
html:root:not([data-familum-night=true]) .cw-dialog .pw-ribbon-group{border-color:#ddd}
html:root:not([data-familum-night=true]) .cw-dialog :is(.pw-ribbon-caption,.pw-menu>summary::after,.pw-ruler){color:#767771}
html:root:not([data-familum-night=true]) .cw-dialog .pw-canvas{background:#f1f2f3}
html:root:not([data-familum-night=true]) .cw-dialog :is(.pe-paper,.pw-blank-paper){box-shadow:0 2px 8px #0000000a}
html:root:not([data-familum-night=true]) .cw-dialog .pw-menu-panel{background:#fff;border-color:#d4d5d5;color:#292a2b;color-scheme:light;box-shadow:0 12px 35px #0002}
html:root:not([data-familum-night=true]) .cw-dialog .pw-menu[open]>summary{background:#eaecec}
html:root:not([data-familum-night=true]) .cw-dialog .pw-menu-panel :is(input,textarea,select,button,.pe-download){background:#fafafa;color:#292a2b;border-color:#d2d4d4}
html:root:not([data-familum-night=true]) .cw-dialog :is(.pe-sidebar h3,.pe-sidebar small,.pw-menu-panel .pe-note,.pw-statusbar){color:#6c6e69}
html:root:not([data-familum-night=true]) .cw-dialog a{color:#365a46}
html:root:not([data-familum-night=true]) .cw-dialog .pw-statusbar [role=alert]{color:#9b3923}
html:root:not([data-familum-night=true]) .cw-dialog .pw-statusbar .pe-confirmed{color:#476b47}
html:root:not([data-familum-night=true]) .cw-dialog .cw-ai{background:#fcfcfc;border-color:#dedee0;color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-header{border-color:#e5e5e5}
html:root:not([data-familum-night=true]) .cw-dialog :is(.pw-chat-header h2,.pw-chat-empty h3,.pw-chat-body h3,.pw-chat-body h4,.wa-history .wa-reply){color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog :is(.pw-chat-header span,.pw-chat-header button,.pw-chat-empty p,.pw-chat-status,.pw-chat-body label){color:#767773}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-status[role=alert]{color:#8a573c}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-mark{color:#41604a;border-color:#cbd5cd}
html:root:not([data-familum-night=true]) .cw-dialog .pw-user-message{background:#eeefed;color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-body :is(button,select,pre){background:#f6f6f4;color:#333;border-color:#ddd}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-composer{background:#f0f1ee;border-color:#e0e2dd;box-shadow:none}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-composer:focus-within{border-color:#999e96}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-composer textarea{background:transparent;color:#292a2b}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-composer textarea::placeholder{color:#797d74}
html:root:not([data-familum-night=true]) .cw-dialog .pw-chat-composer button{background:#313a32;color:#fff}
html:root:not([data-familum-night=true]) .cw-dialog .cw-tabs button{color:#767773}
html:root:not([data-familum-night=true]) .cw-dialog .cw-tabs button[aria-pressed=true]{color:#292a2b;border-bottom-color:#476450}
@media(min-width:1700px){html:root .cw-dialog .cw-columns{grid-template-columns:minmax(0,1fr) 390px}.pw-canvas{padding-inline:70px}}
@media(max-width:1250px){html:root .cw-dialog .cw-columns{grid-template-columns:minmax(0,1fr) 310px}.pw-ribbon-group{padding:0 5px}.pw-ribbon{row-gap:12px}.pw-canvas{padding-inline:22px}.pw-document-bar{padding-inline:16px}.pw-case-label{display:none}}
@media(max-width:900px){html:root .cw-dialog .cw-columns{display:block;position:relative}html:root .cw-dialog [data-cw-editor]{height:100%}html:root .cw-dialog .cw-ai{display:none;height:100%;border-left:0}html:root .cw-dialog[data-tab=ai] .cw-ai{display:block}html:root .cw-dialog[data-tab=ai] [data-cw-editor]{display:none}.cw-dialog .cw-tabs{display:flex;flex-shrink:0;gap:20px;padding:0 18px;background:#252525;border-bottom:1px solid #3b3b3b}.cw-dialog .cw-tabs button{font-family:inherit;font-size:12px;padding:10px 0;background:none;border:0;border-bottom:2px solid transparent;color:#aaa}.cw-dialog .cw-tabs button[aria-pressed=true]{color:#fff;border-bottom-color:#bacbbb}.pw-chat-empty{padding-top:70px}.pw-chat-shell{max-width:650px;margin:auto}.pw-chat-composer{margin-bottom:14px}.pw-ribbon{row-gap:10px}.pw-statusbar{flex-direction:row!important;align-items:center!important}}
@media(max-width:600px){html:root .cw-dialog .cw-bar{min-height:48px;padding:6px 10px;gap:8px;flex-wrap:nowrap}html:root .cw-dialog .cw-bar strong{font-size:11px}html:root .cw-dialog .cw-bar [data-cw-save-close]{font-size:11px;padding:6px}html:root .cw-dialog .cw-bar [role=status]{flex-basis:auto;order:0}html:root .cw-dialog .cw-bar [role=status]:not(:empty){position:absolute;top:100%;left:0;width:100%;padding:10px;background:#303030;z-index:12}.cw-app-mark{display:none}.pw-document-bar{padding:6px 12px;min-height:40px}.pw-ribbon{padding:7px 6px;row-gap:8px}.pw-ribbon-group{padding:0 5px;gap:2px}.pw-ribbon-caption{font-size:9px}.pw-ribbon-controls:has([data-pe-format="justifyLeft"]){display:flex;flex-wrap:wrap;max-width:96px}.pw-ribbon [data-pe-format]{width:28px;height:28px}.pw-ribbon-controls{min-height:29px}.pw-canvas{padding:0 12px 25px}.pw-ruler{height:22px}.cw-dialog .pe-paper{padding:36px 22px 30px!important;min-height:850px!important}.cw-dialog .pe-paper .pe-editor{min-height:430px!important}.pw-statusbar{padding:7px 12px!important;font-size:10px!important}.pw-menu-panel{padding:16px!important}.pw-blank-paper{min-height:680px!important;padding:95px 22px!important;margin-top:20px!important}.pw-ribbon .pw-menu>summary{padding-inline:5px!important}.pw-ribbon select{max-width:115px!important;font-size:11px!important}.pw-chat-body{padding:18px 20px}.pw-chat-header{padding-inline:20px}}

/* Standardbriefkopf in den bestehenden Einstellungen. */
.office-letterhead-settings{padding:20px;border:1px solid var(--border,#d7dbdf);border-radius:12px;margin:20px 0}
.office-letterhead-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.office-letterhead-actions label{position:relative;overflow:hidden;cursor:pointer}
.office-letterhead-actions input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.office-letterhead-settings [hidden]{display:none!important}
.office-letterhead-settings [data-letterhead-current],.office-letterhead-settings [data-letterhead-selection]{overflow-wrap:anywhere}

/* Card writing choice, matching the application's day/night palette. */
.tc-action-submenu{display:grid;gap:6px;padding:0 0 4px 18px;border-left:2px solid var(--tc-line,#d4dce8);margin-left:12px}
.tc-action-submenu .tc-action-submenu{margin-left:6px;padding-left:8px}
.tc-dialog .tc-actions-panel button:disabled{opacity:.48;cursor:not-allowed}
.wr-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #d3d8df;border-radius:16px;background:#fff;color:#232323;overflow:auto}
.wr-dialog::backdrop{background:#0008}.wr-dialog form{display:grid;gap:18px}.wr-dialog header,.wr-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.wr-dialog h2{font-size:20px;margin:0;color:inherit}.wr-dialog label{display:grid;gap:7px;font-size:14px;min-width:0}.wr-dialog select{width:100%;min-width:0;padding:11px;border:1px solid #ccd1d8;border-radius:7px;font:inherit;background:transparent;color:inherit}.wr-dialog option{background:#fff;color:#232323}.wr-dialog button{padding:10px 14px;border:1px solid #ccd1d8;border-radius:8px;background:transparent;color:inherit;font:inherit;cursor:pointer}.wr-dialog [data-wr-open]{background:#1764c0;color:#fff;border-color:#1764c0}.wr-dialog button:disabled{opacity:.5;cursor:default}.wr-dialog [data-wr-status]:empty{display:none}.wr-dialog [data-wr-status]{margin:0}.wr-preview{white-space:pre-line;overflow-wrap:anywhere;font-size:14px;line-height:1.6;padding:14px;background:#f3f5f7;border-radius:8px}
[data-familum-night="true"] .wr-dialog{background:#252525;color:#ededeb;border-color:#4b4b4b}[data-familum-night="true"] .wr-dialog select,[data-familum-night="true"] .wr-dialog button{border-color:#555}[data-familum-night="true"] .wr-dialog option{background:#252525;color:#ededeb}[data-familum-night="true"] .wr-preview{background:#191919}
@media(max-width:600px){.wr-dialog{padding:16px}.wr-dialog footer{flex-wrap:wrap}.wr-dialog footer button{flex:1}.tc-action-submenu{padding-left:8px;margin-left:6px}}
[data-familum-night="true"] .wr-dialog h2{color:#ededeb!important}

.cw-office-dialog .owc-modes{display:flex;gap:6px;margin-bottom:10px}.cw-office-dialog .owc-modes button{position:static;width:auto;height:auto;border-radius:7px;font:inherit;font-size:12px;padding:7px 10px;background:transparent;color:var(--pw-text);border:1px solid var(--pw-line)}.cw-office-dialog .owc-modes button[aria-pressed=true]{background:#24528a;color:white;border-color:#24528a}.owc-applied{font-size:12px;color:#639473;margin:8px 0}.owc-footer form+.owc-note{margin:8px 0 0}

.owc-header-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.owc-progress{display:flex;align-items:flex-start;gap:9px;margin:0 0 10px;color:var(--pw-muted);font-size:12px;line-height:1.45}.owc-progress[hidden]{display:none}.owc-progress p{margin:0}.owc-progress small{display:block;margin-top:3px;font-size:11px}.owc-progress small[hidden]{display:none}.owc-progress-dot{flex:0 0 7px;height:7px;margin-top:5px;border-radius:50%;background:#80b5ed;animation:owc-progress-pulse 1.5s ease-in-out infinite}@keyframes owc-progress-pulse{0%,100%{opacity:.4}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.owc-progress-dot{animation:none}}
.cw-office-dialog .owc-header-actions button{min-width:36px;min-height:40px;border-radius:7px}
.cw-office-dialog .owc-header-actions button:hover,.cw-office-dialog .cw-office-chat-rail:hover{background:var(--pw-subtle);color:var(--pw-text)}
.cw-office-dialog .cw-office-chat-rail{display:flex;flex:0 0 40px;align-items:center;justify-content:flex-start;flex-direction:column;gap:12px;padding:18px 4px;border:0;border-left:1px solid var(--pw-line);border-radius:0;background:var(--pw-panel);color:var(--pw-muted);cursor:pointer}
.cw-office-chat-rail>span:first-child{font-size:25px;line-height:24px}
.cw-office-chat-rail>span:last-child{writing-mode:vertical-rl;font-size:12px}
.cw-office-layout[data-chat-open=true]>.cw-office-chat-rail{display:none}
@media(max-width:900px){.cw-office-dialog .cw-office-chat-rail{flex-basis:36px}.cw-office-dialog .owc-header-actions button{min-width:44px;min-height:44px}}
