:root{--focus:#739ff0}
.auth-layout{display:grid;grid-template-columns:minmax(320px,42%) 1fr;min-height:100dvh}.auth-story{background:var(--nav);color:white;padding:64px 12%;display:flex;flex-direction:column;justify-content:center}.auth-story .brand{padding:0;height:auto;margin-bottom:64px}.auth-story h1{font-size:34px;line-height:1.5;font-weight:600;letter-spacing:-.03em;margin:0 0 22px}.auth-story p{font-size:14px;line-height:1.9;color:var(--nav-muted);max-width:360px}.auth-story ul{padding-left:18px;color:#d4dff0;line-height:2.6;font-size:13px;margin-top:22px}.auth-main{display:flex;align-items:center;justify-content:center;padding:40px;background:white}.auth-form{width:100%;max-width:380px}.auth-form h2{font-size:25px;margin:0 0 9px}.auth-form>.subtle-note{margin:0 0 28px}.auth-form .field{margin-bottom:18px}.auth-form .btn{width:100%;margin-top:12px;min-height:42px}.local-banner{display:flex;align-items:center;gap:7px;background:#eef5fa;padding:8px 25px;color:#426078;font-size:11px;border-bottom:1px solid #dfebf3}.live-sidebar .brand{height:76px}.live-sidebar .site-tree{padding-top:14px}.live-stepper{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px;color:var(--muted);margin-bottom:25px}.live-stepper span{padding:7px 10px;background:white;border:1px solid var(--line);border-radius:5px}.live-stepper .current{color:var(--blue);background:var(--blue-light);border-color:#c4d5f5}.config-layout{max-width:980px}.config-layout .settings-panel{max-width:720px}.config-header{display:flex;align-items:center;gap:12px;margin-bottom:23px}.config-header h2{font-size:18px;margin:0}.config-header p{margin:4px 0 0;color:var(--muted);font-size:12px}.config-status{margin:15px 0;line-height:1.7;font-size:12px;padding:11px 13px;background:var(--bg);border-radius:6px}.config-status.success{color:var(--green);background:var(--green-light)}.config-status.failed{color:var(--red);background:#fff1f1}.live-note{font-size:12px;line-height:1.9;color:var(--muted);max-width:760px}.empty-config{background:white;border:1px dashed #bdccdf;border-radius:10px;padding:34px;text-align:center}.empty-config h2{font-size:18px;margin:0 0 10px}.empty-config p{font-size:13px;color:var(--muted);margin:0 0 20px}.connection-fieldset{padding:0;border:0;margin:22px 0 0}.connection-fieldset legend{font-weight:600;font-size:14px;margin-bottom:15px}.field input[type=password]{font-family:inherit}.test-feedback{min-height:20px;font-size:12px;margin-top:14px}.site-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.live-table .check-label{min-height:40px}.live-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 24px}.live-user-cell{min-width:130px}.live-permission-table{min-width:740px}.live-permission-table th:last-child{min-width:130px}.live-mail-title{display:flex;align-items:center;gap:6px}.live-mail-title .btn{font-size:10px;padding:5px 8px}.mailbox .live-sync-note{padding:0 22px 14px;font-size:10px;color:var(--muted);line-height:1.6}.live-reading .sender-date{white-space:normal}.live-reading .message-body{max-width:75ch}.attachment-note{font-size:11px;padding:12px;background:#f7f9fc;border-radius:6px;line-height:1.8;margin-bottom:20px}.auth-meta{font-size:11px;color:var(--muted);line-height:1.8;margin-top:19px}.live-project-empty{padding:15px;color:var(--nav-muted);font-size:12px}.topbar .user-name{font-size:12px}.reader-scroll>.error{margin-bottom:15px}.setting-row .connection-dot{height:7px;width:7px;border-radius:50%;background:#a3b0c0}.setting-row .connection-dot.verified{background:#438a63}.live-config-link{border:0;background:none;color:var(--blue);font-size:12px;text-decoration:underline;text-underline-offset:3px}.faint{color:var(--muted);font-size:11px}.save-hint{font-size:11px;color:var(--muted);margin-top:12px}.disabled-member{opacity:.65}.server-config-head{display:flex;align-items:center;justify-content:space-between;margin:26px 0 12px}.server-config-head .section-heading{margin:0}.live-primary-empty{min-height:260px}.auth-error{color:var(--red);font-size:12px;line-height:1.7}.live-actions-right{margin-left:auto;display:flex;align-items:center;gap:8px}.live-note-kind{padding:5px;border:1px solid var(--line);border-radius:6px;background:white}.live-table .btn{font-size:11px}.live-mail-filter{font-size:12px;color:var(--muted)}
@media(max-width:980px){.auth-story{padding:45px 10%}.auth-story h1{font-size:28px}.live-reading{min-width:0}.live-permission-table{min-width:640px}}
@media(max-width:640px){.auth-layout{display:block}.auth-story{padding:26px 28px}.auth-story .brand{margin-bottom:23px}.auth-story h1{font-size:23px;margin-bottom:5px}.auth-story p{font-size:12px;margin-bottom:0}.auth-story ul{display:none}.auth-main{padding:32px 25px;align-items:flex-start}.auth-form h2{font-size:23px}.local-banner{padding:7px 15px;font-size:10px}.topbar .user-name{display:none}.empty-config{padding:28px 19px}.live-stepper{font-size:10px;gap:4px}.live-stepper span{padding:5px 7px}.site-actions .btn{font-size:10px}.live-mail-title{flex-wrap:wrap}.live-toolbar{gap:8px}.live-note{font-size:12px}}
/* Mail reading: chronological correspondence with explicit quotation disclosure. */
.live-reading .reader-scroll{padding:28px clamp(18px,3vw,44px)}.conversation{margin:24px 0 28px}.conversation-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.conversation-heading h3{margin:0;font-size:16px}.conversation-heading>span,.conversation-hint{font-size:12px;color:var(--muted)}.conversation-hint{line-height:1.7;margin:7px 0 17px}.thread-entry{border-top:1px solid var(--line);min-width:0}.thread-entry:last-child{border-bottom:1px solid var(--line)}.thread-entry>summary{display:flex;align-items:center;gap:11px;cursor:pointer;list-style:none;padding:16px 0}.thread-entry>summary::-webkit-details-marker{display:none}.thread-avatar{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:50%;background:var(--bg);font-size:13px;font-weight:600;color:var(--muted)}.outgoing-entry .thread-avatar{background:var(--blue-light);color:var(--blue)}.thread-who{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px}.thread-who strong{font-size:14px;overflow-wrap:anywhere}.thread-who>span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.current-entry .thread-who>span{color:var(--blue)}.thread-entry time{font-size:11px;color:var(--muted);white-space:nowrap}.thread-entry summary svg{width:15px;height:15px;flex-shrink:0}.thread-entry[open]>summary svg{transform:rotate(90deg)}.thread-body{padding:0 0 22px;min-width:0}.thread-address{font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 14px;overflow-wrap:anywhere}.body-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 0 10px;min-height:20px}.reader-text-button{color:var(--blue);background:none;border:0;border-radius:4px;padding:6px 0;cursor:pointer;font:inherit;font-size:12px;text-align:left}.reader-text-button:hover{text-decoration:underline;text-underline-offset:3px}.frame-status{font-size:11px;color:var(--muted)}.mail-frame{width:100%;min-height:80px;height:150px;border:0;display:block;background:white}.outgoing-text{font-size:15px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px 16px;background:var(--blue-light);border-radius:6px}.internal-note{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px 16px;background:var(--amber-light);border-radius:6px;margin:14px 0}.internal-note header{color:var(--amber);font-size:11px;margin-bottom:8px}.mail-attachments{margin-top:18px}.image-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.image-tile{display:flex;flex-direction:column;align-items:stretch;gap:5px;background:white;border:1px solid var(--line);border-radius:6px;padding:8px;cursor:zoom-in;min-width:0;text-align:left;color:var(--ink)}.image-tile:hover{border-color:var(--blue)}.image-tile img{width:100%;height:132px;object-fit:contain;background:var(--bg)}.image-tile span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-tile small{color:var(--muted);font-size:11px}.file-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.file-list a{font-size:12px;color:var(--blue);overflow-wrap:anywhere;text-underline-offset:3px}.file-list a span{color:var(--muted);margin-left:6px}.image-preview{padding:0;border:0;border-radius:10px;max-width:calc(100vw - 40px);width:1100px;max-height:calc(100dvh - 40px);color:var(--ink);background:white}.image-preview::backdrop{background:rgba(12,22,35,.78)}.image-preview>header{display:flex;align-items:center;gap:18px;padding:16px 20px;border-bottom:1px solid var(--line)}.image-preview h2{font-size:15px;flex:1;min-width:0;overflow-wrap:anywhere;margin:0}.image-preview header>div{display:flex;gap:8px;flex-shrink:0}.image-stage{padding:20px;overflow:auto;max-height:calc(100dvh - 160px);display:flex;justify-content:center;background:var(--bg)}.image-stage img{object-fit:contain;max-width:100%;max-height:calc(100dvh - 200px)}.original-size .image-stage{display:block}.original-size .image-stage img{max-width:none;max-height:none}.preview-error{margin:0;padding:8px 20px;color:var(--red);font-size:13px}.preview-error:empty{display:none}[hidden]{display:none!important}.thread-entry>summary:focus-visible,.reader-text-button:focus-visible,.image-tile:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
@media(max-width:640px){.live-reading .reader-scroll{padding:22px 18px}.conversation-heading{align-items:flex-start;flex-direction:column;gap:5px}.thread-entry>summary{gap:8px}.thread-entry time{font-size:10px}.body-tools button{min-height:40px;font-size:13px}.image-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.image-preview{max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}.image-preview>header{flex-wrap:wrap;padding:12px}.image-preview h2{flex-basis:100%}.image-preview header>div{width:100%;justify-content:flex-end}.image-preview .btn{min-height:40px}.image-stage{padding:12px}.outgoing-text{font-size:16px}}

/* Page-owned polling status and the selected incoming message. */
.auto-sync-strip{display:flex;align-items:flex-start;gap:8px;padding:9px 26px;background:#f8fafc;border-bottom:1px solid var(--line);font-size:12px;line-height:1.6;flex-shrink:0;color:var(--muted)}
.auto-sync-strip>svg{width:15px;height:15px;margin-top:2px;flex-shrink:0;color:var(--blue)}
.auto-sync-strip>span{flex:1;min-width:0}.auto-sync-strip strong{font-weight:500;color:var(--ink);margin-right:14px}.auto-sync-detail{display:inline-block}
.auto-sync-strip.sync-failed{background:var(--amber-light)}.sync-errors{max-width:50%;overflow-wrap:anywhere}.sync-errors summary{cursor:pointer;color:var(--amber);text-underline-offset:3px;text-decoration:underline}.sync-errors ul{padding-left:18px;margin:8px 0 0}
.current-entry,.current-entry:last-child{border:1px solid #5482c2;border-radius:8px;margin:12px 0 18px;background:#f4f8ff;overflow:hidden}
.current-entry>summary{padding:15px 16px;background:#e5efff}
.current-entry .thread-avatar{background:#cddffd;color:#244d83}.current-entry .thread-who>span{font-size:12px;font-weight:600;color:#244d83}
.current-entry[open]>summary{border-bottom:1px solid #bbd1ef}.current-entry .thread-body{padding:16px;background:#f4f8ff}
.current-entry .mail-frame{border-radius:4px}.current-mail-end{border-top:1px solid #bbd1ef;background:#e5efff;padding:9px 16px;font-size:12px;font-weight:500;color:#244d83;text-align:center}
@media(max-width:640px){.auto-sync-strip{padding:8px 18px;gap:7px;flex-wrap:wrap}.auto-sync-strip strong,.auto-sync-detail{display:block}.sync-errors{max-width:100%;margin-left:22px}.current-entry>summary{padding:13px 12px}.current-entry .thread-body{padding:12px}.current-entry time{max-width:65px;white-space:normal;line-height:1.6}}

.draft-recovery{padding:12px 16px;background:var(--amber-light);color:var(--ink);font-size:12px;line-height:1.8;margin:0;flex-shrink:0}.draft-recovery .btn{margin-left:12px}.auth-form .draft-recovery{margin:0 0 18px;border-radius:6px}
.translation-view{padding:16px;background:white;border:1px solid var(--line);border-radius:6px}.translation-view>header{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.translation-view header strong{font-size:14px}.translation-view header span,.translation-note{font-size:12px;color:var(--muted);line-height:1.7}.translation-note{margin:10px 0 16px}.translated-text{font-size:15px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}.translation-status{font-size:14px;color:var(--muted);margin:0;line-height:1.8}.reader-text-button:disabled{cursor:wait;color:var(--muted)}@media(max-width:640px){.translated-text{font-size:16px}.translation-view{padding:12px}}

/* Chinese review and English composition share the existing reply area. */
.live-reading{container-type:inline-size;container-name:reader}
.reply-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start;margin-top:18px}
.reply-workspace>.reply-box{max-width:none;min-width:0;margin:0}.reply-workspace>.reply-box:only-child{grid-column:1/-1}
.reply-workspace .reply-heading,.reply-workspace .reply-footer{flex-wrap:wrap;gap:8px}.reply-workspace #reply{min-height:260px;font-size:14px;line-height:1.8}
.reply-assistant{min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--paper);padding:16px}
.reply-assistant header{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px}.reply-assistant h3{font-size:15px;margin:0}.reply-assistant header span{font-size:12px;color:var(--muted)}
.assistant-help,.assistant-hint,.assistant-privacy{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 0 14px}.assistant-privacy{margin:12px 0 0}
.assistant-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 16px}.assistant-status{font-size:12px;color:var(--blue);line-height:1.6}
.reply-assistant label{display:block;font-size:13px;font-weight:500;margin-bottom:8px}.reply-assistant textarea{display:block;width:100%;min-height:220px;resize:vertical;border:1px solid var(--line);border-radius:4px;padding:12px;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.8}.reply-assistant textarea::placeholder{color:var(--muted)}
.reply-assistant footer,.assistant-confirm>div{display:flex;gap:8px;flex-wrap:wrap}.reply-assistant .btn{min-height:40px;white-space:normal;line-height:1.5}.assistant-error:empty{display:none}.assistant-error{margin:0 0 12px;line-height:1.7}
.assistant-confirm{background:var(--amber-light);padding:12px;margin:12px 0;font-size:12px;line-height:1.7;border-radius:4px}.assistant-confirm p{margin:0 0 10px}
@container reader (max-width:560px){.reply-workspace{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){.reply-workspace{grid-template-columns:minmax(0,1fr)}.reply-assistant textarea,.reply-workspace #reply{font-size:16px}.reply-assistant .btn{min-height:44px}}
.live-reading .reader-toolbar{gap:8px;flex-wrap:wrap;min-height:58px;height:auto;padding-top:8px;padding-bottom:8px}.live-actions-right{flex-wrap:wrap;justify-content:flex-end}.live-reading .reader-scroll>.inline-notice{line-height:1.8;display:block}

.rules-scope{max-width:720px;margin-bottom:22px}.rules-scope .field{max-width:360px}.rules-form-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}.rules-form-head h2,.rules-trial h2{font-size:16px;margin:0}.rules-form-head>span{color:var(--muted);font-size:12px}.rules-page textarea{display:block;box-sizing:border-box;width:100%;min-height:110px;resize:vertical;border:1px solid var(--line);border-radius:6px;background:var(--surface,#fff);color:var(--ink);padding:12px;font:inherit;font-size:14px;line-height:1.7}.rules-page textarea:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.rules-advanced{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}.rules-advanced summary,.rules-trial summary{cursor:pointer;font-size:14px;line-height:1.7;margin-bottom:16px}.rules-advanced .field{margin-top:20px}.rules-trial{border-top:1px solid var(--line);padding-top:24px;margin-top:28px}.rules-trial>label{display:block;margin:20px 0 8px;font-size:14px}.rules-trial-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.rules-page pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.8;padding:14px;background:var(--bg);border-radius:6px}.rules-page .assistant-confirm{margin-top:16px}.rules-page .assistant-confirm .btn{margin:4px 8px 4px 0}.rules-page [data-rules-result]{margin-top:18px}.rules-page .field small{line-height:1.7}
@media(max-width:640px){.rules-page textarea{font-size:16px}.rules-page .btn{min-height:44px}.rules-page .form-actions{flex-wrap:wrap}.rules-page pre{font-size:13px}.rules-scope .field{max-width:none}}
.reply-images{padding:12px;border-top:1px solid var(--line);background:var(--paper)}
.reply-image-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.reply-image-items{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px}
.image-upload-button{min-height:44px;flex-shrink:0}
.reply-image-tile{width:calc((100% - 16px)/3);min-width:64px;max-width:112px;display:flex;flex-direction:column;gap:4px;align-items:stretch}
.reply-image-preview{padding:0;background:var(--bg);border:1px solid var(--line);border-radius:6px;overflow:hidden;height:72px;cursor:pointer}
.reply-image-preview img{display:block;width:100%;height:100%;object-fit:contain}
.reply-image-tile>span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-image-tile>small,.reply-image-status{font-size:12px;color:var(--muted)}
.reply-image-tile>.reader-text-button{min-height:32px;text-align:left}
.reply-image-status{margin:0;line-height:1.6}
.reply-images .live-note{margin:4px 0;font-size:12px;line-height:1.6}
.reply-images .error{margin:8px 0 0;overflow-wrap:anywhere}
.sent-image-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
.sent-image-list .image-tile{width:112px;min-width:0}
.sent-image-list img{width:100%;height:80px;object-fit:contain}
.assistant-help>.btn{display:block;margin-bottom:8px}
@media(max-width:640px){.reply-image-tile>.reader-text-button{min-height:44px}.reply-image-tile{min-width:72px}.reply-image-preview{height:80px}}
