.letter-rich-workspace{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:22px;align-items:start;min-width:0}
.letter-rich-workspace .letter-form-panel,.letter-rich-workspace .letter-result-panel{min-width:0;overflow:hidden}
.letter-rich-workspace .letter-form{padding:20px}
.letter-rich-workspace .letter-form .field{display:block;margin:14px 0}
.letter-rich-workspace .letter-form .field-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.letter-rich-workspace .letter-form .field-row .field{min-width:0}
.letter-rich-workspace .letter-form input,.letter-rich-workspace .letter-form select,.letter-rich-workspace .letter-form textarea{box-sizing:border-box}
.letter-rich-workspace .letter-template-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.letter-rich-workspace .letter-template-choice{padding:8px 8px 10px;text-align:center;min-width:0}
.letter-rich-workspace .letter-template-choice b{font-size:11px;margin-top:7px}
.letter-rich-workspace .letter-template-sheet{max-width:75px;margin:auto;aspect-ratio:210/297}
.letter-rich-workspace .letter-template-sheet:before{left:16%;right:16%;top:25%;height:40%;background:repeating-linear-gradient(#c6d0db 0 1px,transparent 1px 5px)}
.letter-rich-workspace .letter-template-sheet:after{content:"";position:absolute;left:16%;right:37%;top:13%;height:5px;background:#193b63}
.letter-rich-workspace .classic .letter-template-sheet{border:1px solid #d4dce6;background:linear-gradient(#40516a,#40516a) 50% 23%/68% 2px no-repeat #fff}
.letter-rich-workspace .formal .letter-template-sheet:after{left:28%;right:28%;background:#333}
.letter-rich-workspace .formal .letter-template-sheet:before{left:18%;right:18%}
.letter-rich-workspace .modern .letter-template-sheet{border-top:0;background:linear-gradient(#0f827c,#0f827c) 8% 10%/4% 21% no-repeat,linear-gradient(#eef8f7,#eef8f7) 50% 10%/85% 21% no-repeat #fff}
.letter-rich-workspace .modern .letter-template-sheet:after{background:#126d68}
.letter-rich-workspace .minimal .letter-template-sheet:after{height:2px;right:50%;background:#444}
.letter-rich-workspace .corporate .letter-template-sheet{border-left:0;background:linear-gradient(#173454 0 24%,#ba9755 24% 26%,#fff 26%)}
.letter-rich-workspace .corporate .letter-template-sheet:after{background:#fff}
.letter-rich-workspace .corporate .letter-template-sheet:before{top:34%}
.letter-rich-workspace .professional .letter-template-sheet{border-bottom:0;border-top:3px solid #6b4d80}
.letter-rich-workspace .professional .letter-template-sheet:after{background:#593d6c}
.letter-ai-actions,.letter-rich-workspace .letter-actions{display:flex;flex-wrap:wrap;gap:9px}
.letter-ai-actions .button{font-size:12px;padding:10px 13px}
.letter-ai-quota{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 8px;padding:13px 15px;border:1px solid #c9def6;border-radius:12px;background:#f0f7ff;color:#173b65}
.letter-ai-quota>div{display:grid;gap:3px;min-width:0}
.letter-ai-quota span{font-size:11px;font-weight:700;letter-spacing:.02em}
.letter-ai-quota strong{font-size:17px;line-height:1.3}
.letter-ai-quota small{font-size:11px;line-height:1.5;color:#526b87}
.letter-ai-quota a{flex:none;color:#075bc3;font-size:11px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.letter-ai-quota[data-state="exhausted"]{background:#fff7ed;border-color:#f2d2a9;color:#7d421b}
.letter-ai-quota[data-state="exhausted"] small{color:#865835}
.letter-ai-quota[data-state="error"]{background:#fff8f5;border-color:#edc7bd;color:#8d3628}
.letter-ai-limit,.letter-font-note,.letter-editor-hint,.letter-preview-caption{font-size:11px;line-height:1.6;color:var(--muted,#64748b);margin:10px 0 16px}
.letter-ai-limit a{color:var(--blue,#0866dc)}
.letter-format-controls{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,.8fr) minmax(0,1fr);gap:10px;margin:20px 0 8px;padding:13px;background:#f4f7fb;border:1px solid var(--line,#dce3eb);border-radius:10px}
.letter-format-controls label{min-width:0;font-size:11px;font-weight:700;color:var(--navy,#193b63)}
.letter-rich-workspace .letter-format-controls select{width:100%;margin-top:6px;padding:9px 6px;font-size:12px}
.letter-editor-field>label{display:block;font-size:13px;font-weight:700;color:var(--navy,#193b63);margin-bottom:8px}
.letter-editor-field .wp-editor-wrap{border:1px solid #ccd6e1;border-radius:9px;overflow:hidden;background:#fff}
.letter-editor-field .wp-editor-container{border:0}
.letter-editor-field .wp-editor-tools{padding:0}
.letter-editor-field .mce-toolbar-grp{background:#f4f7fb;border-bottom:1px solid #dbe3ec}
.letter-editor-field .mce-container,.letter-editor-field .mce-container-body{max-width:100%}
.letter-editor-field .mce-toolbar .mce-container-body{white-space:normal}
.letter-editor-field .mce-toolbar .mce-btn-group{float:none;display:inline-block}
.letter-editor-field .mce-btn button{padding:4px}
.letter-editor-field .mce-edit-area iframe{width:100%!important;min-height:400px}
.letter-rich-workspace .letter-editor-field textarea{margin:0;border:0;border-radius:0;min-height:420px;padding:22px;font-size:14px}
.letter-rich-workspace .letter-result-wrap{padding:16px;min-width:0}
.letter-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:12px;font-size:11px;color:#64748b}
.letter-watermark-info{border:0;background:none;padding:5px 0;color:var(--blue,#0866dc);cursor:pointer;font:inherit;text-align:right}
.letter-watermark-info:focus-visible{outline:2px solid var(--blue,#0866dc);outline-offset:3px}
.letter-rich-workspace .watermark-notice{margin:0 0 12px;font-size:11px;line-height:1.6;background:#eaf4ff;border:1px solid #c8dfff;padding:10px 12px;border-radius:8px}
.letter-document-preview{position:relative;width:100%;min-width:0;overflow:hidden;background:#e8edf4;border-radius:8px;border:1px solid #d8e0e9;min-height:160px}
.letter-document-sheet{position:relative;flex:none;width:794px;min-height:0;margin:0 auto;background:#fff;box-shadow:0 4px 14px rgba(18,54,96,.08)}
.letter-document-frame{display:block;position:absolute;left:0;top:0;width:794px;max-width:none!important;height:1123px;border:0;background:#fff;transform-origin:0 0}
.letter-preview-feedback{position:absolute;z-index:2;left:12px;right:12px;top:12px;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:11px 12px;font-size:12px;line-height:1.5;color:#294769;background:rgba(255,255,255,.96);border:1px solid #d5e0ef;border-radius:8px;box-shadow:0 2px 8px rgba(20,45,75,.07)}
.letter-document-preview[data-state="ready"] .letter-preview-feedback{display:none}
.letter-document-preview[data-state="error"] .letter-preview-feedback{background:#fff5f2;color:#8b3a27;border-color:#f2c5b8}
.letter-preview-caption{margin:12px 0 0}
.letter-saved #letter-saved-list:empty{display:none}
.letter-saved [hidden],.letter-rich-workspace [hidden],.letter-ai-dialog [hidden]{display:none!important}
.letter-ai-dialog{width:min(1000px,calc(100vw - 40px));max-height:calc(100dvh - 40px);padding:24px;border:1px solid #cbd7e6;border-radius:16px;color:#193b63;background:#fff;box-shadow:0 24px 100px rgba(10,25,45,.25)}
.letter-ai-dialog::backdrop{background:rgba(12,30,52,.55)}
.letter-ai-dialog-head{display:flex;gap:20px;justify-content:space-between;align-items:flex-start}
.letter-ai-dialog-head h2{margin:0;font-size:21px}
.letter-ai-dialog-head p{font-size:12px;line-height:1.7;color:#64748b;max-width:780px;margin:8px 0 18px}
.letter-ai-dialog-head>.button{flex:none;padding:5px 12px;font-size:23px}
.letter-ai-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.letter-ai-comparison section{min-width:0;border:1px solid #dce5f0;border-radius:10px;overflow:hidden}
.letter-ai-comparison h3{font-size:13px;background:#f3f6fb;padding:12px 16px;margin:0;border-bottom:1px solid #dce5f0}
.letter-ai-comparison pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;margin:0;max-height:50vh;overflow:auto;font:13px/1.8 Arial,sans-serif;color:#233b55}
.letter-ai-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
#letter-polish-stale{color:#a24125;font-size:12px;line-height:1.7}
@media(max-width:1250px){.letter-rich-workspace{grid-template-columns:minmax(0,1fr)}.letter-rich-workspace .letter-template-picker{grid-template-columns:repeat(6,minmax(0,1fr))}.letter-rich-workspace .letter-result-wrap{padding:20px}.letter-document-preview{max-width:794px;margin:auto}}
@media(max-width:600px){.letter-rich-workspace{gap:16px}.letter-rich-workspace .letter-form{padding:14px}.letter-rich-workspace .letter-form .field-row{grid-template-columns:minmax(0,1fr);gap:0}.letter-rich-workspace .letter-template-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.letter-rich-workspace .letter-result-wrap{padding:10px}.letter-rich-workspace .panel-head{padding:14px}.letter-rich-workspace .panel-head h2{font-size:16px}.letter-ai-quota{align-items:flex-start}.letter-ai-quota strong{font-size:15px}.letter-format-controls{gap:7px;padding:10px}.letter-ai-actions .button,.letter-rich-workspace .letter-actions .button{flex:1}.letter-preview-toolbar{font-size:10px}.letter-ai-dialog{width:calc(100vw - 20px);padding:16px}.letter-ai-comparison{grid-template-columns:minmax(0,1fr)}.letter-ai-comparison pre{max-height:30vh}.letter-ai-dialog-actions .button{flex:1;font-size:12px}.letter-ai-dialog-head h2{font-size:18px}}
