/* Remaining screens inherit the approved workspace palette, not its layout.
   This asset is excluded from workspace/dashboard routes by base.html. */
body[data-ui="unified"] main {
  --page-ink:#253047; --page-muted:#65728a; --page-line:#e4e7ef;
  --page-purple:#6153a5; --page-wash:#f2eff9;
}
body[data-ui="unified"] main :is(h1,h2,h3){color:var(--page-ink);letter-spacing:0}
body[data-ui="unified"] main h1:not(.ui-home-title){font-size:28px;line-height:1.35;font-weight:700}
body[data-ui="unified"] main :is(.bg-white.border,.al-card,.km-card,.mail-panel,.db-card,.hub-card,.portal-group){
  border-color:var(--page-line);border-radius:12px;box-shadow:none;
}
body[data-ui="unified"] main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select,textarea){
  border-color:#d9deea;background-color:#fff;color:var(--page-ink);border-radius:8px;
}
body[data-ui="unified"] main :is(input,select,textarea):focus-visible{
  border-color:#9184c7;outline:2px solid #ded7f2;outline-offset:1px;box-shadow:none;
}
body[data-ui="unified"] main :is(input,select,textarea):disabled{background:#f7f8fb;color:#65728a}
body[data-ui="unified"] main input[type="checkbox"]{accent-color:var(--page-purple);flex-shrink:0}
body[data-ui="unified"] main :is(button,a):focus-visible{outline:2px solid #9184c7;outline-offset:3px}
body[data-ui="unified"] main :is(button.bg-slate-900,button.bg-indigo-600,a.bg-slate-900,a.bg-indigo-600,button.bg-blue-600,a.bg-blue-600){
  background:var(--page-purple);border-color:var(--page-purple);color:white;
}
body[data-ui="unified"] main :is(button.bg-slate-900,button.bg-indigo-600,a.bg-slate-900,a.bg-indigo-600):hover{background:#51438f}
body[data-ui="unified"] main :is(.text-slate-400,.text-gray-400){color:#768198}
body[data-ui="unified"] main :is(.text-indigo-600,.text-indigo-700){color:#6153a5}
body[data-ui="unified"] main :is(.al-muted,.mail-sub,.km-muted){color:#65728a;line-height:1.6}
body[data-ui="unified"] main :is(.al-head,.km-head,.hub-head){gap:18px;align-items:flex-start}
body[data-ui="unified"] main :is(.al-head,.km-head,.hub-head,.mail-panel) h1+p{margin-top:8px}
body[data-ui="unified"] main :is(.al-card,.km-card,.mail-panel,.hub-card){padding:22px}
body[data-ui="unified"] main :is(.al-filters,.mail-filter,.km-form){gap:14px}
body[data-ui="unified"] main :is(.al-filters,.mail-filter,.km-form) label{font-size:13px;font-weight:500;color:#4e5b73;line-height:1.6}
body[data-ui="unified"] main :is(.al-button,.km-button,.mail-button,.db-btn){border-radius:8px;min-height:40px;font-weight:500}
body[data-ui="unified"] main :is(.al-button.primary,.km-button.primary,.mail-button,.db-btn-primary){background:#6153a5;color:#fff;border-color:#6153a5}
body[data-ui="unified"] main :is(table.mail-table,table.al-table,table.km-table,table.db-table){width:100%;font-size:13px;line-height:1.65}
body[data-ui="unified"] main :is(table.mail-table,table.al-table,table.km-table,table.db-table) th{background:#f7f8fb;color:#526079;font-size:12px;font-weight:600;padding-top:12px;padding-bottom:12px}
body[data-ui="unified"] main :is(table.mail-table,table.al-table,table.km-table,table.db-table) td{border-color:#edf0f5;vertical-align:top;padding-top:16px;padding-bottom:16px}
body[data-ui="unified"] main :is(table.mail-table,table.al-table,table.km-table,table.db-table) tbody tr:hover{background:#faf9fd}
body[data-ui="unified"] main :is(table.mail-table,table.km-table,table.db-table) td:last-child a{display:inline-block;white-space:nowrap;line-height:1.9;color:#6153a5}
body[data-ui="unified"] main :is(.mail-pagination,.al-pagination,.km-pagination){margin-top:22px;padding-top:18px;border-top:1px solid #edf0f5;gap:12px;font-size:13px}
.supervisor-list-page #filters-form{padding:18px;border-radius:12px;background:#fff;border-color:#e4e7ef;box-shadow:none}
.supervisor-list-page #filters-form :is(select,input){min-height:40px}
.supervisor-list-page table th{background:#f7f8fb;font-size:12px;color:#526079;font-weight:600}
.supervisor-list-page table td{line-height:1.6;vertical-align:top}
.supervisor-list-page table tbody tr:hover{background:#faf9fd}
.compose-page{gap:24px!important;align-items:start}
.compose-writing{padding:26px!important;border-radius:12px!important}
.compose-writing #compose-form>div>label{color:#4e5b73;font-size:13px;font-weight:500;margin-bottom:7px}
.compose-context>div{border-color:#e4e7ef!important;border-radius:12px;padding:18px}
.compose-context dl>div{padding-bottom:10px;border-bottom:1px solid #edf0f5}
.compose-context dl dt{font-size:12px;margin-bottom:3px;color:#768198}
.compose-context dl dd{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.compose-writing :is(#ai-chat,#ai-assistant,section){border-color:#e4e7ef}
body[data-ui="unified"] main .ql-toolbar.ql-snow{border-color:#d9deea;background:#f7f8fb;border-radius:8px 8px 0 0;padding:10px 8px;gap:4px}
body[data-ui="unified"] main .ql-container.ql-snow{border-color:#d9deea;border-radius:0 0 8px 8px;font-family:inherit;font-size:14px}
body[data-ui="unified"] main .ql-editor{padding:20px 22px;line-height:1.85;overflow-wrap:anywhere}
body[data-ui="unified"] main .ql-editor.ql-blank::before{left:22px;right:22px;color:#929bb0;font-style:normal}
body[data-ui="unified"] main .mail-upload-box{border-color:#dce1ec;border-radius:10px;background:#f8f9fc;padding:18px}
body[data-ui="unified"] main .mail-upload-box h3{font-size:14px;font-weight:600;margin-bottom:8px}
body[data-ui="unified"] main .mail-upload-box input[type="file"]{border-color:#d9deea;border-radius:8px;background:#fff;min-height:76px}
body[data-ui="unified"] main input[type="file"]::file-selector-button{border:1px solid #d9deea;border-radius:6px;background:#fff;color:#4e5b73;padding:7px 12px;margin-right:10px;cursor:pointer}
.portal-profile #personal-info{padding:24px}
.portal-profile #personal-info>div:first-child{padding-bottom:16px;border-bottom:1px solid #edf0f5}
.portal-profile #personal-info dl{gap:0 28px;margin-top:8px}
.portal-profile #personal-info dl>div{padding:14px 0;border-bottom:1px solid #edf0f5;min-width:0}
.portal-profile #personal-info dl dt{font-size:12px;color:#768198;margin-bottom:5px}
.portal-profile #personal-info dl dd{font-size:14px;line-height:1.7;color:#253047;overflow-wrap:anywhere}
.portal-profile .portal-group h2{font-size:16px;margin-bottom:16px}
.portal-profile .portal-link-grid>a{padding:18px;background:#fff;border-color:#e4e7ef;box-shadow:none;border-radius:10px;transition:border-color .16s,background .16s}
.portal-profile .portal-link-grid>a:hover{background:#faf9fd;border-color:#c9c0e3;transform:none}
.portal-profile .portal-link-grid strong{font-size:14px;color:#39435b}
.portal-profile .portal-link-grid span{font-size:12px;line-height:1.7;color:#768198}
.date-batch .db-head h1{font-size:28px!important}
.date-batch :is(.db-card,.db-schedule){border-color:#e4e7ef;border-radius:12px;box-shadow:none}
.date-batch .db-schedule{background:#faf9fd;padding:20px}
.date-batch .db-days a{border-color:#e4e7ef;color:#65728a;border-radius:8px;min-height:40px}
.date-batch .db-days a.active{background:#6153a5;border-color:#6153a5;color:#fff}
.date-batch .db-table th:last-child,.date-batch .db-table td:last-child{min-width:116px;white-space:nowrap}
.date-batch .db-table td:nth-child(2){white-space:normal;word-break:normal;overflow-wrap:break-word}
body[data-ui="unified"] main .auth-card label{font-size:13px;color:#4e5b73;font-weight:500}
body[data-ui="unified"] main .auth-card :is(input,button[type="submit"]){min-height:46px}
body[data-ui="unified"] main .auth-frame{box-shadow:0 18px 60px #2530470b;border-color:#e4e7ef}
body[data-ui="unified"] main .ui-billing-switch{border-radius:8px;background:#f2eff9}
body[data-ui="unified"] main .ui-billing-switch button{border-radius:6px;min-height:38px}
body[data-ui="unified"] main fieldset:disabled{opacity:1}
/* Drawers are portalled outside main; keep their palette aligned without
   changing position, stacking, scrolling or the existing collapse logic. */
body[data-ui="unified"] [data-mentor-detail]{color:#253047;line-height:1.7}
body[data-ui="unified"] [data-mentor-detail] h2{font-size:18px;font-weight:650;color:#253047}
body[data-ui="unified"] [data-mentor-detail] .bg-slate-900{background:#6153a5;color:white}
body[data-ui="unified"] [data-mentor-detail] .bg-slate-900:hover{background:#51438f}
body[data-ui="unified"] [data-mentor-detail] .text-slate-400{color:#768198}
body[data-ui="unified"] [data-mentor-detail] :is(a,button):focus-visible{outline:2px solid #9184c7;outline-offset:3px}
/* Directory controls keep destructive actions distinct from primary actions. */
body[data-ui="unified"] main .lib .lib-delete{background:#fff7f8;color:#c54457;border:1px solid #efccd2}
body[data-ui="unified"] main .lib .lib-delete:hover{background:#fcebee;border-color:#dfa8b2}
body[data-ui="unified"] main .lib .lib-panel{padding:22px;border-color:#e4e7ef}
body[data-ui="unified"] main .lib .lib-filters label{font-size:13px;font-weight:500;color:#526079}
body[data-ui="unified"] main .lib .lib-table th{background:#f7f8fb;color:#526079;font-size:12px}
body[data-ui="unified"] main .lib .lib-table td{font-size:13px;line-height:1.7;padding-top:14px;padding-bottom:14px}
body[data-ui="unified"] main .lib .lib-row-actions{gap:8px}
body[data-ui="unified"] main .lib .lib-row-actions .lib-btn{min-height:34px;padding:6px 10px}
body[data-ui="unified"] main .lib .lib-table-wrap{border-color:#e4e7ef;border-radius:12px}
body[data-ui="unified"] main .lib .lib-pagination{padding-top:20px;margin-top:20px;border-top:1px solid #e4e7ef}
body[data-ui="unified"] main .hub-card label{font-size:13px;color:#526079;line-height:1.6}
body[data-ui="unified"] main .hub-card>h2{padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid #edf0f5}
body[data-ui="unified"] main .hub-notice{border-radius:8px;font-size:12px;line-height:1.7}
body[data-ui="unified"] main :is(.hub-heading,.portal-profile>header){margin-bottom:22px}
body[data-ui="unified"] main div:has(>section#ai-default)>section:first-of-type{gap:12px}
body[data-ui="unified"] main div:has(>section#ai-default)>section:first-of-type>div{background:#fff;border-color:#e4e7ef;padding:18px;border-radius:10px}
body[data-ui="unified"] main div:has(>section#ai-default)>section:first-of-type strong{color:#6153a5}
@media(max-width:767px){
  body[data-ui="unified"] main h1:not(.ui-home-title){font-size:24px}
  body[data-ui="unified"] main :is(.al-card,.km-card,.mail-panel,.hub-card){padding:16px}
  body[data-ui="unified"] main :is(.al-head,.km-head,.hub-head){flex-wrap:wrap;gap:12px}
  .compose-page{gap:16px!important}.compose-writing{padding:16px!important}
  .compose-context>div{padding:16px}
  body[data-ui="unified"] main .ql-editor{padding:16px;min-height:280px}
  .portal-profile #personal-info{padding:18px}
  .portal-profile #personal-info dl{column-gap:16px}
  .portal-profile #personal-info dl dd{font-size:13px}
  .date-batch .db-head h1{font-size:24px!important}
  body[data-ui="unified"] main :is(.al-button,.km-button,.mail-button,.db-btn){min-height:44px}
  body[data-ui="unified"] main .lib .lib-panel{padding:16px}
  body[data-ui="unified"] main div:has(>section#ai-default)>section:first-of-type{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-ui="unified"] main div:has(>section#ai-default)>section:first-of-type>div{padding:14px}
}
@media(prefers-reduced-motion:reduce){.portal-profile .portal-link-grid>a{transition:none}}

/* Function-specific layouts: directories remain dense; compose is a document;
   scheduling exposes execution state; settings separate editable groups. */
body[data-ui="unified"] main .compose-context{min-width:0}
body[data-ui="unified"] main .compose-mentor-card>div:first-child{padding-bottom:14px;border-bottom:1px solid #edf0f5}
body[data-ui="unified"] main .compose-mentor-card h2{font-size:18px;line-height:1.4;white-space:normal}
body[data-ui="unified"] main .compose-mentor-card>div:first-child>span{background:#f2eff9;color:#6153a5;border-radius:6px}
body[data-ui="unified"] main .compose-mentor-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
body[data-ui="unified"] main .compose-mentor-card dl>div{margin-top:0!important}
body[data-ui="unified"] main .compose-mentor-card dl>div:first-child,body[data-ui="unified"] main .compose-mentor-card dl>div:nth-child(n+4){grid-column:1/-1}
body[data-ui="unified"] main .compose-history-card>h2{font-size:14px;padding-bottom:12px;border-bottom:1px solid #edf0f5}
body[data-ui="unified"] main .compose-context #editor-batch-panel{border-color:#e4e7ef;box-shadow:none}
body[data-ui="unified"] main #editor-batch-panel>summary{background:#f8f7fc;border-bottom:1px solid #e4e7ef;padding:14px 16px}
body[data-ui="unified"] main #editor-batch-panel a:hover{background:#f2eff9}
body[data-ui="unified"] main .compose-picker-card input{min-height:40px}
body[data-ui="unified"] main .compose-writing #quill-editor{min-height:380px}
body[data-ui="unified"] main :is(.compose-writing,.quick-mail-page) .ql-editor{max-width:none;margin-left:0;margin-right:0}
body[data-ui="unified"] main .date-batch .db-workflow{background:transparent;border:0;padding:0;box-shadow:none}
body[data-ui="unified"] main .db-workflow>summary{width:fit-content;font-size:13px;color:#65728a;cursor:pointer;line-height:1.7;padding:9px 0}
body[data-ui="unified"] main .db-workflow[open]{padding-bottom:12px}
body[data-ui="unified"] main .batch-workflow-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;list-style:decimal inside;padding:18px 0;border-block:1px solid #e4e7ef;margin:12px 0}
body[data-ui="unified"] main .batch-workflow-steps li{font-size:13px;color:#6153a5}
body[data-ui="unified"] main .batch-workflow-steps strong{font-weight:600;color:#39435b}
body[data-ui="unified"] main .batch-workflow-steps span{display:block;margin-top:6px;font-size:12px;color:#65728a;line-height:1.7}
body[data-ui="unified"] main .date-batch .db-controls{column-gap:18px;row-gap:12px}
body[data-ui="unified"] main .date-batch .db-card>h2{padding-bottom:12px;border-bottom:1px solid #edf0f5;margin-bottom:16px}
body[data-ui="unified"] main .date-batch .db-tag:not(.sent):not(.failed){background:#f2eff9;color:#6153a5}
body[data-ui="unified"] main .date-batch .db-schedule{border-left:3px solid #9184c7;background:#faf9fd}
body[data-ui="unified"] main .batch-progress-filter{background:#fff;border:1px solid #e4e7ef;border-radius:10px;padding:16px 20px}
body[data-ui="unified"] main .batch-progress-filter label{font-size:13px;color:#526079}
body[data-ui="unified"] main .batch-progress-filter :is(button,input){min-height:40px}
body[data-ui="unified"] main .batch-progress-filter button{background:#6153a5!important;font-size:13px;font-weight:500}
body[data-ui="unified"] main .batch-live-note{margin-left:auto;color:#768198;font-size:12px}
body[data-ui="unified"] main .batch-progress-page>div:first-child>div:last-child>a:last-child:not([data-page-back]){background:#6153a5!important}
body[data-ui="unified"] main .batch-progress-page .bp-card{border-color:#e4e7ef;border-radius:12px;box-shadow:none;padding:22px}
body[data-ui="unified"] main .batch-progress-page .bp-title{font-size:17px;font-weight:600}
body[data-ui="unified"] main .batch-progress-page .bp-counts{gap:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-block:1px solid #edf0f5;padding:16px 0}
body[data-ui="unified"] main .batch-progress-page .bp-counts>span{padding:0 12px;border-right:1px solid #edf0f5;line-height:1.7}
body[data-ui="unified"] main .batch-progress-page .bp-counts>span:first-child{padding-left:0}
body[data-ui="unified"] main .batch-progress-page .bp-counts>span:last-child{border-right:0}
body[data-ui="unified"] main .batch-progress-page .bp-counts strong{display:block;font-size:24px;font-weight:600;color:#39435b}
body[data-ui="unified"] main .batch-progress-page .bp-bar>div{background:#9184c7}
body[data-ui="unified"] main .batch-progress-page .bp-table td{line-height:1.7;vertical-align:top;padding-block:15px}
body[data-ui="unified"] main .batch-progress-page .bp-table th{background:#f7f8fb;font-size:12px;color:#526079}
body[data-ui="unified"] main .batch-progress-page .bp-empty{border-radius:12px;border-color:#e4e7ef;padding:44px 20px;font-size:14px}
body[data-ui="unified"] main .import-page{max-width:960px}
body[data-ui="unified"] main .import-page>p{max-width:76ch;line-height:1.8}
body[data-ui="unified"] main .import-upload{padding:26px;border-color:#e4e7ef}
body[data-ui="unified"] main .import-upload>div:first-child{font-size:16px;font-weight:600;padding-bottom:12px;margin-bottom:18px;border-bottom:1px solid #edf0f5}
body[data-ui="unified"] main .import-upload input[type=file]{width:100%;border:0;padding:22px 16px;border-radius:8px;background:transparent}
body[data-ui="unified"] main .import-example{border:0!important;border-top:1px solid #e4e7ef!important;border-radius:0!important;background:transparent!important;padding:20px 0!important}
body[data-ui="unified"] main .import-example a{background:white}
body[data-ui="unified"] main .batch-settings-page>form>div{padding-bottom:22px;border-bottom:1px solid #edf0f5}
body[data-ui="unified"] main .batch-settings-page #excluded-school-list{max-height:22rem}
body[data-ui="unified"] main .batch-settings-page .school-option{min-height:42px;line-height:1.6}
body[data-ui="unified"] main .batch-settings-page .school-option:has(input:checked){background:#f2eff9;color:#6153a5}
body[data-ui="unified"] main .batch-settings-page>form>button{min-height:42px;padding-inline:20px}
body[data-ui="unified"] main .mail-settings-page>section{padding:24px}
body[data-ui="unified"] main .mail-settings-page section label{font-size:13px;line-height:1.6;color:#526079}
body[data-ui="unified"] main .mail-settings-page section fieldset{padding-top:14px;margin-top:14px;border-top:1px solid #edf0f5}
body[data-ui="unified"] main .mail-settings-page fieldset:disabled input{color:#65728a;opacity:1}
body[data-ui="unified"] main .portal-profile #personal-info dl dd details>summary{font-size:13px;color:#6153a5;cursor:pointer;padding:5px 0}
body[data-ui="unified"] main .portal-profile #personal-info dl dd details>p{margin-top:10px;white-space:pre-wrap;line-height:1.8}
body[data-ui="unified"] main .drafts-page{max-width:1080px}
body[data-ui="unified"] main .drafts-page>p{max-width:80ch;font-size:13px;line-height:1.8;margin-top:12px}
body[data-ui="unified"] main .drafts-page #drafts-pane>form>div:first-child{overflow:hidden}
body[data-ui="unified"] main .drafts-page #drafts-pane label{line-height:1.8}
body[data-ui="unified"] main .membership-admin-page #plan-matrix th{background:#f7f8fb;color:#526079}
body[data-ui="unified"] main .membership-admin-page #plan-matrix :is(input[type=number],input[type=text]){min-height:36px;max-width:100%}
body[data-ui="unified"] main .membership-admin-page #membership-orders table td{vertical-align:top;line-height:1.7}
body[data-ui="unified"] main :is(.al-button,.km-button,.hub-button,.db-button,.lib-btn):active:not(:disabled){transform:translateY(1px)}
@media(max-width:1000px){
  body[data-ui="unified"] main .batch-progress-page .bp-counts{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 0}
}
@media(max-width:767px){
  body[data-ui="unified"] main .batch-workflow-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  body[data-ui="unified"] main .batch-progress-page .bp-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  body[data-ui="unified"] main .batch-progress-page .bp-counts>span{padding:0 10px;border:0}
  body[data-ui="unified"] main .batch-live-note{margin-left:0;width:100%}
  body[data-ui="unified"] main .batch-progress-page .bp-card{padding:16px}
  body[data-ui="unified"] main .import-upload{padding:18px}
  body[data-ui="unified"] main .import-upload form{flex-direction:column;align-items:stretch}
  body[data-ui="unified"] main .import-upload .portal-dropzone{width:100%;flex-basis:auto;min-width:0}
  body[data-ui="unified"] main .import-upload form>button{min-height:44px}
  body[data-ui="unified"] main .mail-settings-page>section{padding:18px}
  body[data-ui="unified"] main .compose-context #editor-batch-panel{margin-top:16px}
}
@media(prefers-reduced-motion:reduce){body[data-ui="unified"] main .bp-bar>div{transition:none}}
/* Mail conversations: calm WeChat-inspired bubbles, compact reply tools. */
.thread-chat{--chat-ink:#26332c;--chat-muted:#69756e;--chat-green:#95ec69;--chat-line:#e1e7e2;background:#fff;color:var(--chat-ink)}
.thread-chat .thread-bubble{position:relative;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.8;overflow-wrap:anywhere;box-shadow:0 1px 2px #18321c08}
.thread-chat .thread-bubble-sent{background:var(--chat-green);color:#193a21;border-top-right-radius:4px}
.thread-chat .thread-bubble-received{background:#f0f1f2;color:#28332c;border-top-left-radius:4px}
.thread-chat .thread-bubble:before{content:'';position:absolute;top:14px;width:10px;height:10px;transform:rotate(45deg);background:inherit}
.thread-chat .thread-bubble-sent:before{right:-4px}.thread-chat .thread-bubble-received:before{left:-4px}
.thread-chat .thread-bubble :is(p,div,span,li,td){color:inherit!important;background:transparent!important}
.thread-chat .thread-bubble a{color:#195d32!important;text-decoration:underline;overflow-wrap:anywhere}
.thread-chat .thread-bubble img{max-width:100%;height:auto}.thread-chat .thread-bubble table{max-width:100%}
.thread-chat .thread-tracking-note{font-size:12px;color:var(--chat-muted);text-align:right;margin:8px 0 0}
.thread-chat .thread-read-log{margin-top:10px;border:1px solid var(--chat-line);border-radius:10px;background:#fafcf9;text-align:left}
.thread-chat .thread-read-log summary{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;list-style:none;cursor:pointer;font-size:12px;color:var(--chat-muted)}
.thread-chat summary::-webkit-details-marker{display:none}
.thread-chat .thread-read-label{color:#375e42;font-weight:600;white-space:nowrap}.thread-read-times{line-height:1.7;flex:1}.thread-read-toggle{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#536b59}
.thread-chat summary svg,.thread-chat .reply-tool-bar svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;flex-shrink:0;transition:transform .15s ease}
.thread-chat details[open]>summary svg{transform:rotate(180deg)}
.thread-chat .thread-read-content{border-top:1px solid var(--chat-line);padding:10px 12px;font-size:12px;color:var(--chat-muted)}
.thread-read-content p{margin:0 0 8px}.thread-read-content ul{margin:0;padding:0;list-style:none;max-height:220px;overflow:auto}.thread-read-content li{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid #edf0ec}.thread-read-content time{font-variant-numeric:tabular-nums}
.thread-chat .thread-reply-composer{margin-top:24px;padding:18px;border:1px solid var(--chat-line);border-radius:16px;background:#f8faf8}
.thread-chat .reply-disclosure{border-color:var(--chat-line);background:#fff;margin-bottom:12px}
.thread-chat .reply-body-label{display:block;font-size:13px;color:#354a3c;font-weight:600;margin-top:12px}
.thread-chat textarea[data-auto-grow]{box-sizing:border-box;min-height:104px;max-height:none;resize:none;overflow-y:hidden;line-height:1.8;font-size:14px;border-color:#d8e0da;outline-offset:3px}
.thread-chat .reply-tool-bar{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.thread-chat .reply-tool-bar button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid #dce4dd;border-radius:10px;background:#fff;font-size:13px;font-weight:500;color:#435848;cursor:pointer}
.thread-chat .reply-tool-bar button[aria-expanded=true]{background:#e9f5e7;border-color:#9bbd9c;color:#255833}.thread-chat .reply-tool-bar button span{font-size:12px;background:#edf2ed;border-radius:5px;padding:0 5px}
.thread-chat .reply-tool-panel{margin-top:10px;border:1px solid var(--chat-line);border-radius:10px;background:#fff}
.thread-chat .reply-tool-panel>summary{display:none}.thread-chat .reply-tool-panel:not([open])>:not(summary){display:none}
.thread-chat .reply-tool-panel .reply-disclosure-content{padding:14px}
.thread-chat .reply-attachment-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.reply-attachment-grid label{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;font-size:12px}.reply-attachment-grid label span{overflow-wrap:anywhere;min-width:0;flex:1}.reply-attachment-grid small{flex-shrink:0;color:#66776b;background:#f1f4f1;padding:2px 5px;border-radius:4px}
.thread-chat .reply-upload-disclosure{background:#fff;border:1px solid var(--chat-line);border-radius:10px;margin-top:10px}
.thread-chat .reply-upload-disclosure>summary{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;padding:10px 14px;cursor:pointer;font-size:13px;color:#435848;list-style:none}
.thread-chat .reply-upload-disclosure .mail-upload-box{margin:0;border:0;background:transparent}.thread-chat .reply-upload-disclosure .mail-upload-box h3{display:none}
.thread-chat :is(button,summary,textarea):focus-visible{outline:2px solid #438752;outline-offset:3px}
@media(max-width:640px){.thread-chat{padding:16px}.thread-chat [data-thread-header]{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}.thread-chat .thread-bubble{padding:12px 14px;font-size:14px}.thread-chat .thread-reply-composer{padding:14px}.thread-chat .thread-read-log summary{flex-wrap:wrap;gap:6px 10px}.thread-read-times{flex-basis:100%;order:3}.thread-read-toggle{margin-left:auto}.thread-chat .reply-attachment-grid{grid-template-columns:1fr}.thread-chat textarea[data-auto-grow]{font-size:16px}.thread-read-content li{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.thread-chat summary svg{transition:none}}
