.rich-editor{margin:8px 0 16px;border:1px solid #bdcfd3;border-radius:10px;overflow:hidden;background:#fff;color:#253e36;min-width:0}
.editor-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:8px;background:#edf4f0;border-bottom:1px solid #cddbd3}
.editor-toolbar button{font:inherit;font-size:12px;line-height:1.4;background:#fff;color:#294c3a;border:1px solid #ccd9d1;border-radius:6px;padding:7px 10px;cursor:pointer}
.editor-toolbar button:hover,.editor-toolbar button:focus-visible{background:#dfece4;border-color:#668e76;outline:2px solid #8caf99;outline-offset:1px}
.editor-area{padding:14px 16px;min-height:150px;max-height:480px;overflow:auto;outline:none;cursor:text;font-weight:400;white-space:pre-wrap;overflow-wrap:anywhere}
.editor-area:focus{box-shadow:inset 0 0 0 2px #5a8a6c}
.editor-area:empty::before{content:attr(data-placeholder);color:#738378;pointer-events:none}
.editor-status{padding:5px 12px;font-size:11px;color:#60736a;background:#f8faf8;border-top:1px solid #e2e9e3;font-weight:400}
.rich-editor.is-invalid{border-color:#b53636}.rich-editor.is-invalid .editor-status{color:#9f2222}
.rich-content{overflow-wrap:anywhere;line-height:1.75;white-space:normal;font-weight:400}
.rich-content p{margin:0 0 12px}.rich-content p:last-child{margin-bottom:0}.rich-content ul,.rich-content ol{padding-left:24px;margin:12px 0}.rich-content li{margin:5px 0}.rich-content blockquote{margin:14px 0;padding:8px 16px;border-left:4px solid #73987e;background:#edf4ed}.rich-content a{text-decoration:underline}.rich-content h2,.rich-content h3{line-height:1.3;margin:18px 0 10px}.rich-content strong{font-weight:700}
.cms-page{margin:14px 0;padding:18px;border:1px solid #d7e2d9;border-radius:10px}.cms-page summary{cursor:pointer}.cms-page form{margin-top:18px}
.chat-panel{align-self:start;min-width:0}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.chat-heading h2{margin:0}.chat-heading .badge{white-space:nowrap}.chat-log{max-height:520px;overflow:auto;overscroll-behavior:contain;background:#f0f5f2;padding:18px;border:1px solid #dce7de;border-radius:12px;margin:18px 0;display:flex;flex-direction:column;gap:12px}
.chat-bubble{max-width:92%;align-self:flex-start;background:#fff;border:1px solid #d9e4dc;border-radius:14px 14px 14px 3px;padding:12px 15px;overflow-wrap:anywhere;color:#2b4335}.chat-bubble.mine{align-self:flex-end;background:#e2f1e7;border-color:#bcd8c6;border-radius:14px 14px 3px 14px}.chat-bubble small{display:block;font-size:11px;color:#4e6c59;margin-bottom:7px}.chat-bubble .rich-content{font-size:14px}.chat-hint{font-size:12px;color:#5b6f60}.rich-editor-chat .editor-area{min-height:110px;max-height:260px}.chat-send-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media(max-width:640px){.editor-toolbar{gap:4px;padding:6px}.editor-toolbar button{font-size:11px;padding:8px}.editor-area{min-height:130px;padding:12px}.chat-log{max-height:420px;padding:12px}.chat-bubble{max-width:96%;padding:10px 12px}.chat-heading{align-items:flex-start;flex-direction:column}.cms-page{padding:14px}.chat-send-row .btn{width:100%;justify-content:center}}

.cms-section-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0 28px}.cms-section-tabs a{background:#eef3fa;border:1px solid #cedbeb;color:#345880;border-radius:9px;padding:10px 14px;text-decoration:none;font-weight:650;font-size:13px}.cms-section-tabs a:hover{background:#dfeaf8}.cms-layout-panel{scroll-margin-top:120px;margin-bottom:24px}.cms-fields-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.cms-link-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) 80px 110px;gap:14px;border-bottom:1px solid #e1e8ef;padding:10px 0;align-items:center}.cms-link-row label{min-width:0}.cms-image-preview{display:block;width:100%;height:200px;object-fit:cover;border-radius:12px;margin:18px 0}.cms-logo-preview{display:block;width:80px;height:80px;object-fit:contain;margin:16px 0}.cms-layout-panel .cms-page summary{overflow-wrap:anywhere}.cms-layout-panel .cms-page[open] summary{margin-bottom:22px}
@media(max-width:640px){.cms-fields-two{grid-template-columns:1fr;gap:0}.cms-link-row{grid-template-columns:minmax(0,1fr) 90px;gap:10px}.cms-link-row label:nth-child(1),.cms-link-row label:nth-child(2){grid-column:1/-1}.cms-image-preview{height:150px}.cms-section-tabs a{font-size:12px;padding:9px}}

.editor-toolbar{background:linear-gradient(110deg,#eef4fb,#edf6f0);padding:10px;gap:6px}.editor-toolbar button{min-width:36px;min-height:36px;border-radius:8px;font-size:13px;font-weight:650}.editor-toolbar button[aria-pressed=true]{background:#d9e9f9;color:#234f81;border-color:#93b2d4}.editor-toolbar select{width:auto;min-width:135px;max-width:100%;min-height:36px;margin:0;border-radius:8px;font-size:13px;padding:5px 10px;background:#fff}.editor-toolbar button:disabled{opacity:.45;cursor:default}.editor-area{font-size:15px;line-height:1.8;min-height:190px}.rich-editor-chat .editor-area{min-height:110px}.editor-preview .editor-area{background:#fbfdfb;cursor:default;padding:22px}.editor-fullscreen{position:fixed;inset:18px;z-index:1000;margin:0;display:flex;flex-direction:column;box-shadow:0 12px 80px #16344850}.editor-fullscreen .editor-area{flex:1;max-height:none;min-height:0;padding:30px clamp(20px,8vw,140px);background:#fff}.editor-fullscreen .editor-status{flex-shrink:0}.has-editor-fullscreen{overflow:hidden}.editor-link-dialog{width:calc(100% - 32px);max-width:440px;padding:28px;border:1px solid #cdddec;border-radius:18px;color:#30465c}.editor-link-dialog::backdrop{background:#162c4699}.editor-link-dialog h2{margin:0 0 20px;font-size:22px}.editor-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
@media(max-width:640px){.editor-toolbar{padding:7px}.editor-toolbar button{font-size:12px;min-height:36px}.editor-fullscreen{inset:8px}.editor-fullscreen .editor-area{padding:18px}.editor-toolbar select{min-width:120px}.editor-link-dialog{padding:22px}}

textarea[data-rich-editor][hidden]{display:none!important}
