/* Tokens and shell geometry reused from 新会议流程网站/app/globals.css. */
:root{--brand:#197b6b;--brand-dark:#125e53;--brand-light:#eaf5f1;--nav:#172e32;--ink:#243638;--muted:#657578;--line:#e6ebea;--surface:#f5f7f7;--white:#fff;--danger:#ba5952;--warning:#a77830;--r:8px;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;font-size:14px;color:var(--ink);background:var(--surface)}*{box-sizing:border-box}body{margin:0}h1{font-size:28px;font-weight:600;margin:6px 0 8px}h2{font-size:18px}h3{font-size:15px}p{line-height:1.8;margin:8px 0;color:var(--muted)}button,input,select,textarea{font:inherit}button,.button{border:1px solid var(--line);border-radius:6px;background:white;padding:10px 14px;cursor:pointer;color:var(--ink);text-decoration:none;display:inline-block}button:hover,.button:hover{border-color:var(--brand);color:var(--brand)}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #72bca9;outline-offset:3px}.primary{background:var(--brand);color:white;border-color:var(--brand)}.primary:hover{background:var(--brand-dark);color:white}input,select,textarea{padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink);max-width:100%}input:focus,textarea:focus,select:focus{outline:2px solid #197b6b40;border-color:var(--brand)}textarea{width:100%;resize:vertical}label{font-size:13px;color:var(--muted)}aside{position:fixed;inset:0 auto 0 0;width:224px;background:var(--nav);color:#d3dfdf;display:flex;flex-direction:column}.brand{font-size:20px;font-weight:600;padding:30px 22px}.brand small{display:block;font-size:12px;margin-top:10px;color:#9eb5b3;font-weight:400}.workspace{margin:0 16px 22px;padding:12px 8px;background:#ffffff08;font-size:12px;border-radius:6px}nav{padding:0 12px}nav button{border:0;background:none;color:#b4c4c6;width:100%;text-align:left;margin-bottom:8px;padding:13px 12px}nav button.selected{background:#2b5e55;color:white}.aside-foot{margin-top:auto;padding:24px;font-size:12px;line-height:2;color:#93a8ab}.shell{margin-left:224px}header{height:68px;background:white;border-bottom:1px solid var(--line);padding:0 36px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted)}main{max-width:1600px;margin:auto;padding:32px 36px}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.heading p{font-size:13px}.eyebrow{font-size:11px;letter-spacing:1.4px;color:var(--muted)}.project-select{display:flex;gap:8px;align-items:center}.project-select select{max-width:230px}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;background:white;border:1px solid var(--line);border-radius:8px;margin-bottom:24px}.stat{padding:20px 24px;border-right:1px solid var(--line)}.stat:last-child{border:0}.stat strong{font-size:28px;display:block;margin-top:8px;font-weight:600}.stat small{display:block;margin-top:6px;color:var(--muted);font-size:11px;line-height:1.5}.stat span{color:var(--muted);font-size:13px}.panel{background:white;border:1px solid var(--line);border-radius:8px;padding:24px;margin-bottom:20px}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:18px}.toolbar h2{margin:0 auto 0 0}.upload{border:1px dashed #aac8c0;background:#f6faf8;padding:24px;border-radius:8px;margin-top:20px}.upload input{background:none;border:0}.hint{padding:12px 16px;border-left:3px solid #a7c8bd;background:#edf5f1;line-height:1.8;font-size:13px}.warn{border-color:#c6a477;background:#fbf5eb}.error{color:#963e38;background:#fff0ee;padding:12px;border-radius:6px}.notice{padding:12px;background:#e6f2ed;border-radius:6px;margin-bottom:16px}.tag{display:inline-block;border-radius:4px;background:var(--brand-light);color:var(--brand);padding:5px 8px;font-size:12px}.tag.warn{color:#865d1e;background:#faf1df}.tag.error{color:#963e38;background:#fff0ee}.table-wrap{overflow:auto;max-height:65vh}table{width:100%;border-collapse:collapse;font-size:13px}th{background:#f6f8f7;color:var(--muted);font-weight:500;text-align:left;position:sticky;top:0}td,th{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.7}td{max-width:440px;overflow-wrap:anywhere}td small{display:block;color:var(--muted)}.actions{white-space:nowrap}.actions button{padding:6px 10px;font-size:12px}a{color:var(--brand)}.empty{padding:48px;text-align:center;color:var(--muted)}.grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field label{display:block;margin-bottom:6px}.field input,.field select{width:100%}.full{grid-column:1/-1}dialog{width:min(1180px,94vw);max-height:90vh;border:1px solid var(--line);border-radius:12px;padding:0;color:var(--ink)}dialog::backdrop{background:#172e3266}.dialog-head{position:sticky;top:0;background:white;z-index:2;padding:16px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.dialog-head h2{margin:0}#detail-content{padding:24px}.source-block{border-bottom:1px solid var(--line);padding:12px 0}.source-block small{color:var(--muted)}pre{white-space:pre-wrap;font:inherit;line-height:1.8;margin:8px 0;overflow-wrap:anywhere}.image-grid{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0}.image-option{width:150px;display:flex;flex-direction:column;gap:8px}.image-option img{height:150px;width:140px;object-fit:contain;background:var(--surface);border:1px solid var(--line)}.source-pane{max-height:60vh;overflow:auto;padding-right:12px}.step{display:flex;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.step b{color:var(--brand);min-width:24px}.step p{margin:4px 0}.search{width:260px}.small{font-size:12px;color:var(--muted)}@media(max-width:1000px){.heading{align-items:flex-start;flex-direction:column}.grid{grid-template-columns:1fr}.project-select{flex-wrap:wrap}main{padding:24px}.stat{padding:16px}}@media(max-width:700px){aside{position:static;width:auto}.brand{padding:18px}.brand small,.workspace,.aside-foot{display:none}nav{display:flex;overflow:auto}nav button{min-width:120px;width:auto;font-size:12px}.shell{margin-left:0}header{padding:12px;height:auto;gap:10px;flex-wrap:wrap}main{padding:20px 16px}.stats{grid-template-columns:1fr 1fr}.stat{border-bottom:1px solid var(--line)}.form-grid{grid-template-columns:1fr}.panel{padding:16px}button{min-height:44px}.table-wrap{max-height:none}.tag{font-size:11px}h1{font-size:24px}}
.preview-workspace{display:grid;grid-template-columns:180px minmax(260px,1fr) 240px;gap:16px;margin-top:20px}.room-list,.page-inspector{background:white;border:1px solid var(--line);border-radius:8px;padding:14px;min-width:0}.room-list label,.page-inspector label{display:block;margin-bottom:12px}.room-list input,.room-list select,.page-inspector select{width:100%;margin-top:6px}.room-option{width:100%;text-align:left;margin:5px 0;white-space:normal}.room-option strong,.room-option small{display:block;line-height:1.6}.room-option small{font-size:11px;color:var(--muted)}.room-option.active,.thumbnail.active{border-color:var(--brand);background:var(--brand-light)}.preview-center{min-width:0}#preview-meta{font-size:12px;margin-bottom:12px;color:var(--muted)}#slide-viewport,#large-viewport{position:relative;background:white;overflow:hidden;border:1px solid var(--line);margin-bottom:16px}#slide-stage,#large-stage{position:absolute;transform-origin:top left;background:white;overflow:hidden}.slide-bg{position:absolute;width:100%;height:100%;object-fit:contain}.slide-element{position:absolute;overflow:hidden;font-family:'Microsoft YaHei','PingFang SC',sans-serif}.missing-photo{border:2px solid #ba5952;background:#efefef}#page-thumbnails{display:flex;gap:10px;overflow-x:auto;margin-top:18px;padding-bottom:10px}.thumbnail{min-width:140px;max-width:170px;text-align:left;white-space:normal}.thumbnail span,.thumbnail strong,.thumbnail small{display:block;font-size:12px;margin-bottom:8px}.thumbnail strong{max-height:48px;overflow:hidden}.thumbnail small{color:var(--warning)}#page-issues{font-size:12px;color:#905825;line-height:1.8;padding:10px;background:#fcf6ec}.page-inspector h3{margin-top:0}.page-inspector button{margin:4px 0;width:100%;font-size:12px}.page-inspector textarea{margin-top:6px}.layout-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.layout-inputs input{width:100%;padding:7px}.page-inspector hr{border:0;border-top:1px solid var(--line);margin:18px 0}@media(max-width:1250px){.preview-workspace{grid-template-columns:160px minmax(250px,1fr)}.page-inspector{grid-column:1/-1}.layout-inputs{grid-template-columns:repeat(5,1fr)}}@media(max-width:750px){.preview-workspace{display:block}.room-list{margin-bottom:16px}#room-buttons{display:flex;overflow:auto}.room-option{min-width:160px}.layout-inputs{grid-template-columns:1fr 1fr}.page-inspector{margin-top:20px}}
.mini-viewport{position:relative;width:140px;overflow:hidden;border:1px solid var(--line);margin-bottom:10px;background:white}.mini-stage{position:absolute;transform-origin:top left;background:white;overflow:hidden}.thumbnail{min-width:166px}.room-list{max-height:650px;overflow-y:auto}
.template-dialog{width:min(1500px,97vw);max-height:96vh}.template-body{padding:20px}.template-grid{display:grid;grid-template-columns:minmax(300px,1fr) 245px;gap:20px}.template-paper{position:relative;overflow:hidden;border:1px solid var(--line);background:white;min-height:60px}#tpl-stage{position:absolute;transform-origin:top left;overflow:hidden;background:white;touch-action:none;user-select:none;outline:none}.template-element{position:absolute;cursor:move;white-space:pre-wrap}.template-element:hover{outline:1px dashed #5fc6b0}.template-content{width:100%;height:100%;overflow:hidden;object-fit:contain;pointer-events:none}.tpl-selected{outline:2px solid #197b6b!important;z-index:1}.template-handle{position:absolute;right:0;bottom:0;width:12px;height:12px;background:#197b6b;border:1px solid white;cursor:nwse-resize;z-index:4}.template-card{position:absolute;top:0;height:100%}.template-cards{border:1px dashed #8ebdb1}.template-grid .page-inspector input,.template-grid .page-inspector select{width:100%}.template-grid .page-inspector button{width:auto}.template-grid .page-inspector label{margin-bottom:8px}#tpl-status{font-size:13px;min-height:40px}.template-grid .page-inspector{grid-column:auto}@media(max-width:850px){.template-grid{grid-template-columns:1fr}.template-grid .layout-inputs{grid-template-columns:repeat(3,1fr)}}

.template-dialog [hidden]{display:none!important}
.export-choice{display:block;margin:12px 0}.export-previews{display:flex;overflow:auto;gap:12px;margin-top:16px}.export-previews button{min-width:220px;max-width:260px}.export-previews img{width:100%;height:95px;object-fit:contain}.export-previews small{display:block}.export-large{display:block;width:100%;max-height:calc(90vh - 160px);object-fit:contain}

#diff-new [hidden],#diff-old [hidden]{display:none!important}

/* Use the full editor width without stretching the slide aspect ratio. */
.template-dialog{width:98vw;max-width:none;height:96vh}.template-grid{grid-template-columns:minmax(0,1fr) 280px;align-items:start}.template-grid>div{min-width:0}.template-grid .page-inspector{position:sticky;top:0}.template-body{overflow:auto}.template-grid .layout-inputs{grid-template-columns:1fr 1fr}@media(max-width:850px){.template-grid{grid-template-columns:1fr}.template-grid .page-inspector{position:static}}
.portrait-dialog{width:min(1100px,95vw);max-height:95vh}.portrait-viewport{max-height:55vh;overflow:auto;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/20px 20px;padding:12px}.portrait-viewport canvas{display:block;max-width:none;touch-action:none;cursor:crosshair}.portrait-dialog input[type=range]{width:100px}.portrait-dialog input[type=color]{width:52px;height:32px;padding:2px}

#local-batch-progress{width:100%;height:10px;accent-color:var(--brand);margin:8px 0 20px}.batch-card h3{overflow-wrap:anywhere}.batch-card details{padding:12px 0;border-top:1px solid var(--line);margin-bottom:12px}.batch-card summary{cursor:pointer;color:var(--brand)}

/* One consistent five-field biography view; original formatting stays in source disclosure. */
.profile-unified{max-width:940px;margin:0 auto}.profile-source{margin-bottom:20px}.profile-source select{max-width:100%;width:100%}.profile-original{margin-top:12px}.profile-unified summary{cursor:pointer;color:var(--brand);font-weight:600;padding:10px 0}.profile-unified .form-grid{grid-template-columns:1fr}.profile-unified input:not([type=radio]):not([type=checkbox]),.profile-unified textarea{font:inherit;line-height:1.7;width:100%}.profile-unified textarea{white-space:pre-wrap;resize:vertical}.profile-unified .image-option{padding:12px;border:1px solid var(--line);border-radius:8px;width:174px}.profile-unified .image-option img{width:148px;height:168px;object-fit:contain}.profile-unified .image-option:has(input:checked){border-color:var(--brand);background:var(--brand-light)}.profile-unified #edit-portrait{margin-bottom:20px}.profile-tools{margin-top:20px}.profile-tools:not([open]){padding:8px 16px}
/* Photo content transforms are independent of the frame geometry. */
#tpl-photo-options input[type=checkbox],#page-photo-options input[type=checkbox]{width:auto;display:inline-block;margin-right:.4rem}
#tpl-stage,#slide-stage{touch-action:none}

/* Reference-deck fonts, served locally; no third-party font requests. */
@font-face{font-family:'Source Han Sans SC Medium';src:local('Source Han Sans SC Medium'),url('/fonts/SourceHanSansSC-Medium.woff2?v=060') format('woff2');font-weight:400 700;font-display:swap}
@font-face{font-family:'Source Han Sans SC Bold';src:local('Source Han Sans SC Bold'),url('/fonts/SourceHanSansSC-Bold.woff2?v=060') format('woff2');font-weight:400 700;font-display:swap}

/* Collection thumbnails must work with the strict no-inline-style CSP. */
#collection-rows img{display:block;width:55px;height:84px;object-fit:contain}
#collection-rows details p{white-space:pre-wrap}

/* Main counters are supporting context, not dashboard hero cards. */
#stats{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:14px}
#stats>.stat{display:flex;align-items:baseline;flex:1 1 auto;flex-wrap:wrap;gap:5px 7px;padding:10px 14px;min-width:0}
#stats>.stat>span{font-size:12px}
#stats>.stat>strong{display:inline;font-size:20px;line-height:1.3;margin:0}
#stats>.stat>small{display:inline;font-size:11px;line-height:1.5;margin:0}
@media(max-width:700px){#stats>.stat{padding:8px 10px}#stats>.stat>strong{font-size:18px}}


/* External rules work under style-src self; dimensions also reserve image space. */
.smart-portrait{display:block;width:80px;height:100px;max-width:100%;object-fit:contain;background:var(--surface)}
.expert-thumb{display:block;width:55px;height:84px;object-fit:contain;max-width:100%}
.source-thumb{width:120px;height:160px;object-fit:contain;max-width:100%;vertical-align:top}
.decoration-thumb{width:120px;height:70px;object-fit:contain;max-width:100%}
.selected-portrait{width:100px;height:140px;object-fit:contain;max-width:100%}
#upload-packages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}#upload-packages>.panel{min-width:0;padding:12px;margin:0}#upload-packages h3{margin:0 0 8px}#upload-packages .inline-help{max-width:100%;margin-left:4px}#upload-packages input[type=file],#upload-packages select{width:100%;min-width:0;font-size:12px;padding:6px}#upload-packages label{display:flex;align-items:center;gap:6px;font-size:11px}#upload-packages label select{flex:1;width:0}@media(max-width:650px){#upload-packages{grid-template-columns:minmax(0,1fr)}#upload-packages>.panel:nth-child(4){grid-column:1/-1}}

.compare-portrait{display:inline-block;width:120px;height:150px;max-width:100%;object-fit:contain;margin:4px;vertical-align:top;background:var(--surface)}
.smart-compare-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(280px,1fr);gap:16px;overflow-x:auto}
.smart-compare-grid .panel{min-width:0}
.compare-field{margin:0 0 12px;overflow-wrap:anywhere}
.compare-line{white-space:pre-wrap;overflow-wrap:anywhere;min-height:1em}
.compare-difference{background:#fff0bf}


/* Compact supporting progress; keep the editor as the main surface. */
.room-progress-compact{font-size:12px;margin-bottom:12px}
.panel.room-progress-compact,.progress-container{padding:12px 16px}
.room-progress-compact h3{font-size:13px;margin:0 0 8px;line-height:1.5}
.progress-row{display:flex;align-items:baseline;gap:12px;border-bottom:1px solid var(--line);padding:7px 0}
.progress-row h4{font-size:12px;margin:0;flex:0 0 30px}
.progress-row .stats{display:flex;flex-wrap:wrap;gap:6px 20px;margin:0;background:transparent;border:0;border-radius:0}
.progress-row .stat{display:flex;align-items:baseline;gap:5px;padding:0;border:0}
.progress-row .stat span,.progress-row .stat small{font-size:12px;margin:0}
.progress-row .stat strong{font-size:16px;line-height:1.4;margin:0}
.room-progress-compact details{margin-top:6px}
.room-progress-compact summary{cursor:pointer;line-height:1.6;color:var(--brand)}
.room-progress-compact p{font-size:12px;margin:5px 0;line-height:1.6}
.room-progress-compact .hint{padding:6px 9px}
.room-progress-compact ul{padding-left:20px;margin:6px 0}
.room-progress-compact li{margin:6px 0}
.progress-container>label{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.progress-container select{padding:5px 8px}
@media(max-width:700px){.progress-row{gap:8px}.progress-row .stats{gap:6px 12px}.room-progress-compact summary{padding:5px 0}}


.inline-help{display:inline-block;max-width:min(calc(100% - 8px),72vw,850px);vertical-align:middle;font-size:11px;font-weight:400;line-height:1.4;color:#657578;background:none;border:0;padding:0;margin:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:normal}.inline-help:focus,.inline-help:hover{white-space:normal;overflow-wrap:anywhere;outline-offset:2px}.toolbar>.inline-help{flex:1 1 220px;min-width:0;margin-left:0}.toolbar:has(>.inline-help){gap:8px;margin-bottom:10px}@media(max-width:700px){.inline-help{max-width:min(calc(100% - 8px),75vw)}.toolbar>.inline-help{flex-basis:160px}}

#detail-content .inline-help:hover,#detail-content .inline-help:focus{white-space:nowrap}

/* Compact application shell; preserve slide geometry and readable editing fields. */
@media(min-width:901px){aside{width:196px}.shell{margin-left:196px}.brand{padding:20px 18px}.workspace{margin-bottom:12px}nav button{padding:10px 12px;margin-bottom:4px}header{height:48px;padding:0 22px}main{max-width:none;padding:18px 22px}.heading{gap:12px;margin-bottom:12px}.heading h1{font-size:23px;margin:2px 0 4px}.heading p{margin:3px 0}.panel{padding:16px;margin-bottom:12px}.toolbar{gap:8px;margin-bottom:10px}.toolbar button,.project-select button{padding:7px 11px}.table-wrap td,.table-wrap th{padding-top:10px;padding-bottom:10px}.template-body{padding:12px}.template-grid{gap:12px}}

@media(min-width:901px){#upload-packages>.panel:nth-child(4){grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 12px}#upload-packages>.panel:nth-child(4)>h3{margin:0}}

/* Compact expert editor: photo left, identity right, complete bio below. */
.profile-edit-top{display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:start;margin:16px 0}
.profile-photo-column{min-width:0}.profile-photo-column h3{margin:0}.profile-photo-column .inline-help{font-size:11px}
.profile-photo-column .image-grid{display:flex;flex-wrap:nowrap;overflow-x:auto;align-items:flex-start;gap:8px;margin:8px 0;max-width:100%}
.profile-unified .profile-photo-column .image-option{flex:0 0 200px;width:200px;padding:8px;gap:5px}
.profile-unified .profile-photo-column .image-option img{width:100%;height:200px;object-fit:contain}
.profile-photo-column .image-option small{font-size:11px;line-height:1.4}
.profile-photo-empty{display:flex;align-items:center;gap:5px;font-size:12px;margin:8px 0}
.profile-unified .profile-photo-column #edit-portrait{margin:0;padding:7px 10px;font-size:12px}
.profile-unified .profile-identity-fields{gap:10px;min-width:0}.profile-identity-fields .field{min-width:0}
@media(max-width:600px){.profile-edit-top{grid-template-columns:1fr;gap:12px}.profile-photo-column .image-grid{max-width:100%}}

/* Keep all upload choices visible on narrow screens, without sideways form scrolling. */
@media(max-width:700px){.heading{gap:10px;margin-bottom:12px}.heading h1{font-size:22px}.heading .eyebrow{display:none}.heading p{margin:4px 0}.project-select button{padding:7px 10px}}

/* Modal scroll stays inside the active dialog; closing preserves page position. */
html{scrollbar-gutter:stable}
html:has(dialog:modal),body:has(dialog:modal){overflow:hidden;overscroll-behavior:none}
dialog:modal{overflow:auto;overscroll-behavior:contain}

#agenda-follow-list{max-height:55vh;overflow:auto;position:relative}.agenda-follow-item{display:block;text-align:left;width:100%;margin:5px 0;white-space:normal}.agenda-follow-item small{display:block}.agenda-follow-item.active{background:#e4f3ee;border:2px solid #197b6b;color:#125f53}#agenda-comparison{background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px;margin-bottom:10px}#agenda-copy-source{width:100%;resize:vertical;font-size:14px;margin:8px 0}#agenda-comparison pre{white-space:pre-wrap;max-height:160px;overflow:auto}

.review-mode>aside,.review-mode aside{display:none}.review-mode .shell{margin-left:0}.review-mode main{padding:16px}.review-mode .preview-workspace{grid-template-columns:260px minmax(0,1fr)}.review-mode #open-review-window,.review-mode #canvas-settings,.review-mode #template-editor,.review-mode #meeting-portraits,.review-mode #room-settings{display:none}.review-mode #agenda-follow-list{max-height:68vh}.review-mode .room-list{max-height:85vh;position:sticky;top:12px}.review-mode #page-inspector{grid-column:1/-1}@media(max-width:800px){.review-mode .preview-workspace{display:block}.review-mode .room-list{position:static;max-height:32vh}.review-mode #agenda-follow-list{max-height:22vh}}

/* Dedicated review shares editing state, but exposes only agenda and slides. */
.review-mode .shell>header,.review-mode main>.heading,.review-mode #stats,.review-mode #page-inspector,.review-mode #online-properties,.review-mode #preflight-open,.review-mode #export-open,.review-mode #content>.toolbar>.inline-help,.review-mode #online-toolbar>small,.review-mode #page-issues{display:none}
.review-mode .preview-workspace{grid-template-columns:minmax(0,var(--agenda-width,36%)) 12px minmax(0,1fr);gap:0;align-items:start}
.review-mode .room-list{position:static;max-height:calc(100vh - 110px);overflow:auto;min-width:0;padding:12px}
.review-mode #agenda-follow-list{max-height:28vh}.review-mode #agenda-comparison{margin-top:12px}.review-mode #agenda-copy-source{min-height:140px}
.review-mode .preview-center{min-width:0;padding-left:12px;max-height:calc(100vh - 110px);overflow:auto}
#review-divider{align-self:stretch;min-height:65vh;cursor:col-resize;touch-action:none;background:linear-gradient(90deg,transparent 4px,#b6d4cd 4px,#b6d4cd 8px,transparent 8px);border-radius:6px}
#review-divider:hover,#review-divider:focus{background:#197b6b;outline:2px solid #b6d4cd}
@media(max-width:800px){.review-mode .preview-workspace{display:block}#review-divider{display:none}.review-mode .room-list,.review-mode .preview-center{max-height:none;overflow:visible}.review-mode .preview-center{padding:12px 0}.review-mode #agenda-follow-list{max-height:22vh}}

.fullscreen-preview{border-radius:0}.fullscreen-preview [data-full-canvas]{position:relative;overflow:hidden;margin-left:auto;margin-right:auto}.fullscreen-preview [data-full-stage]{position:absolute;transform-origin:top left;overflow:hidden;background:white}.fullscreen-controls{height:48px;display:flex;align-items:center;justify-content:center;gap:12px}

.tpl-property-group{border-top:1px solid var(--line);padding:10px 0}.tpl-property-group summary{font-weight:600;cursor:pointer}.tpl-property-fields,.tpl-cm-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tpl-property-fields>div,.tpl-property-extra{grid-column:1/-1}.tpl-property-fields label{margin:6px 0}.tpl-property-fields input,.tpl-property-fields select{min-width:0;width:100%}.tpl-property-fields input[type=checkbox]{width:auto}.tpl-format-tools{display:flex;flex-wrap:wrap;gap:6px}.tpl-format-tools small{flex-basis:100%}.template-grid>.page-inspector{max-height:75vh;overflow:auto}.tpl-property-group[hidden]{display:none}

@media(min-width:1000px){.preview-workspace.resizable-editor{grid-template-columns:minmax(160px,var(--editor-left,200px)) 10px minmax(320px,1fr) 10px minmax(160px,var(--editor-right,280px));gap:6px;align-items:stretch}.resizable-editor>#page-inspector{grid-column:auto}.resizable-editor>.room-list{display:flex;flex-direction:column;max-height:none;height:auto;min-height:0;overflow:hidden}.resizable-editor #agenda-follow-list{flex:1;min-height:0;max-height:none;contain:size;overflow:auto}.editor-divider{cursor:col-resize;touch-action:none;background:linear-gradient(90deg,transparent 3px,#b6d4cd 3px,#b6d4cd 6px,transparent 6px);border-radius:4px}.editor-divider:hover,.editor-divider:focus{background:#197b6b;outline:1px solid #b6d4cd}}
@media(max-width:999px){.editor-divider{display:none}}

.page-action-row{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;align-items:center;padding:3px 0 6px}.page-action-row #online-toolbar{display:contents}.page-action-row button{flex:0 0 auto;white-space:nowrap;padding:8px 10px}.page-action-row #online-status{flex:0 0 auto;white-space:nowrap;font-size:12px}

.resizable-agenda-table{table-layout:fixed;min-width:0}.resizable-agenda-table th{position:sticky;top:0;z-index:2;background:#f6f8f7;padding-right:16px;box-shadow:inset 0 -1px var(--line)}.resizable-agenda-table td{overflow-wrap:anywhere;white-space:normal}.table-column-grip{position:absolute;right:0;top:0;bottom:0;width:9px;cursor:col-resize;touch-action:none;border-right:2px solid #b6d4cd}.table-column-grip:hover,.table-column-grip:focus{background:#197b6b44;outline:none;border-right-color:#197b6b}.resizable-agenda-table .actions{white-space:normal}

#page-thumbnails{align-items:stretch}#page-thumbnails .thumbnail{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;min-height:180px;flex:0 0 170px}#page-thumbnails .thumbnail strong{max-height:none;overflow:visible;white-space:normal;overflow-wrap:anywhere;line-height:1.4}#page-thumbnails .thumbnail>.mini-viewport{flex-shrink:0;margin-bottom:8px}#page-thumbnails .thumbnail>span{flex-shrink:0}

@media(min-width:1000px){.resizable-editor>.preview-center{display:flex;flex-direction:column}.resizable-editor>.preview-center>div{flex-shrink:0}.resizable-editor #page-thumbnails{flex:0 0 auto;padding-bottom:10px}}

.toolbar:has(>#category){justify-content:flex-start}.toolbar:has(>#category)>h2{margin:0}.toolbar:has(>#category)>.inline-help{margin-left:0;text-align:left}

.online-agenda-row{flex-wrap:nowrap;gap:10px;margin-top:12px;overflow-x:auto}.online-agenda-row>h3{margin:0;flex-shrink:0}.online-agenda-row>button,.online-agenda-row>small{flex-shrink:0;white-space:nowrap}

@media(min-width:1000px){.resizable-editor>.room-list,.resizable-editor>#page-inspector{height:82vh;max-height:82vh;min-height:0;align-self:start}.resizable-editor>#page-inspector{overflow-y:auto;overscroll-behavior:contain}.resizable-editor #agenda-follow-list{overscroll-behavior:contain}.resizable-editor>.editor-divider{height:82vh;align-self:start}}

.inbox-heading{flex-wrap:nowrap;justify-content:flex-start}.inbox-heading>h2{margin:0;flex-shrink:0}.inbox-heading>.inline-help{min-width:0;margin-left:0}

.canvas-settings-form{display:flex;flex-direction:column;gap:16px}.canvas-settings-form>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.canvas-settings-form>.form-grid label{display:flex;flex-direction:column;gap:6px}.canvas-setting-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.canvas-setting-row>label{display:flex;align-items:center;gap:10px}.canvas-setting-row p{margin:0}.canvas-setting-row input[type=file]{max-width:360px}.canvas-setting-row .inline-help{min-width:0}

.collection-person{display:flex;align-items:flex-start;gap:14px}.collection-person-photo{flex:0 0 55px;font-size:12px;color:var(--muted)}.collection-person-photo .expert-thumb{margin:0;display:block}.collection-person-info{min-width:0;flex:1}.collection-person-info details p{white-space:pre-wrap}

.collection-photo-placeholder{display:inline-block;margin-left:8px;font-size:12px;white-space:normal;line-height:1.5;color:var(--muted)}
.collection-row-actions{display:flex;flex-wrap:wrap;gap:6px}.collection-row-actions button{white-space:nowrap;padding:8px 10px}

html,body{overscroll-behavior-x:none}.table-wrap,#page-thumbnails,.page-action-row,dialog{overscroll-behavior-x:contain}

.toolbar:has(>#agenda-auto-match){justify-content:flex-start}.toolbar:has(>#agenda-auto-match)>h2{margin:0;flex:0 0 auto}

.room-progress-compact h3{font-size:16px}.progress-row h4{font-size:14px;flex-basis:34px}.progress-row .stat span,.progress-row .stat small{font-size:14px}.progress-row .stat strong{font-size:20px}

.expert-photo-candidate-grid{display:flex;flex-wrap:wrap;gap:12px}.expert-photo-candidate-grid button{width:190px;display:flex;flex-direction:column;align-items:center;gap:8px;overflow-wrap:anywhere}.expert-photo-candidate-grid img{width:160px;height:180px;object-fit:contain}.expert-photo-candidate-grid small{font-size:12px}#expert-photo-preview{max-width:240px;max-height:320px;object-fit:contain}

#page-inspector .layout-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}#page-inspector .layout-inputs label{display:flex;flex-direction:column;gap:5px}#page-inspector input[type=number],#page-inspector input[type=color]{height:32px;min-height:32px;padding:4px 8px}#page-inspector .layout-inputs input{width:100%;margin:0}#page-inspector input[type=color]{padding:3px 5px}

/* Keep text-alignment selectors level with the compact numeric controls. */
#page-inspector .layout-inputs select{height:32px;min-height:32px;padding:4px 8px;width:100%;margin:0}

#check-measure{position:fixed;left:-20000px;top:0;width:1000px;visibility:hidden;pointer-events:none}#check-measure>div{position:relative;transform-origin:top left}

.agenda-risk-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:10px;border-top:1px solid var(--line);margin-top:10px}.agenda-risk-summary small{flex-basis:100%}.agenda-review-table{max-height:58vh;overflow:auto}.agenda-review-table th{position:sticky;top:0;background:var(--surface);z-index:1}.agenda-review-table td{vertical-align:top;overflow-wrap:anywhere}.review-original{white-space:pre-wrap;font-size:12px;max-width:600px}.agenda-review-table input[type=checkbox]{width:auto}

.agenda-review-table th:last-child,.agenda-review-table td:last-child{min-width:76px;width:76px;white-space:nowrap}.agenda-review-table button{white-space:nowrap}

/* Shared manual venue binding controls; keyboard-visible and contained at all widths. */
.template-room-picker{margin:6px 0;min-width:0;max-width:100%}
.template-room-picker summary{cursor:pointer;padding:8px 10px;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere}
.template-room-picker summary:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.template-room-choices{display:grid;gap:8px;padding:12px;max-height:320px;overflow:auto;min-width:0;overscroll-behavior:contain}
.template-room-choices label{display:flex;align-items:center;gap:8px;overflow-wrap:anywhere}
.template-room-choices input{width:auto;flex:0 0 auto}
#upload-packages select[multiple]{min-height:112px}
@media(max-width:700px){.page-action-row{flex-wrap:wrap;overflow:visible}.page-action-row #online-status{white-space:normal;flex-basis:100%}}

/* Statistics detail: wide roster and stable two-row verification controls. */
#detail:has(#stat-detail-rows){width:98vw;max-width:1800px}
#detail:has(#stat-detail-rows) table{min-width:1050px}
#detail:has(#stat-detail-rows) th:first-child{width:56px;white-space:nowrap}
.stat-verification{width:300px;min-width:300px}
.stat-verification-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:start}
.stat-verification-grid>button{white-space:nowrap;padding:8px 10px}
.stat-source-action{grid-row:2;grid-column:1}
.stat-appearances{grid-row:2;grid-column:2}
.stat-appearances>summary{cursor:pointer;line-height:1.6;padding:9px 0}
.stat-detail-toolbar{gap:12px}
.stat-detail-toolbar input{width:330px}
@media(max-width:700px){#detail:has(#stat-detail-rows) #detail-content{padding:12px}.stat-detail-toolbar input{width:100%}}

#page-photo-options>label:has(.photo-number-control),#tpl-photo-options>label:has(.photo-number-control){display:flex;flex-direction:column;align-items:stretch;gap:5px}
.photo-number-control{display:flex;align-items:center;gap:6px;width:100%;min-width:0}
#page-photo-options .photo-number-control input,#tpl-photo-options .photo-number-control input{width:0;flex:1;min-width:90px;margin:0;font-variant-numeric:tabular-nums}
.photo-number-control button{flex:0 0 34px;padding:4px;margin:0;min-height:32px}

.template-settings{border:1px solid #dce5e4;border-radius:8px;margin:10px 0;padding:10px 12px}.template-settings>summary{cursor:pointer;font-weight:600;color:#276c63}.template-settings[open]>summary{margin-bottom:12px}.template-settings .toolbar{align-items:center}

/* Focused task surfaces: supporting progress stays available without displacing the work. */
.work-progress{border:1px solid var(--line);border-radius:8px;background:var(--white);margin:10px 0;padding:10px 14px;font-size:12px}
.work-progress>summary,.delivery-settings>summary{cursor:pointer;color:var(--brand);font-weight:600}
.work-progress-body{padding-top:12px}.work-progress-body:empty{padding:0}
.delivery-settings{position:relative;margin-left:auto}.delivery-settings>summary{padding:9px 12px;border:1px solid var(--line);border-radius:6px;background:white;font-size:13px}
.delivery-settings[open]{flex-basis:100%;margin-left:0}.delivery-settings[open]>summary{display:list-item;width:max-content;margin-bottom:10px}.delivery-settings>.toolbar{margin-bottom:0}
main:has(.preview-workspace)>#stats{display:none}
#agenda-comparison .agenda-source-details>summary{cursor:pointer;padding:8px 0;font-size:13px}
#content:has(#task-rows) #task-count{font-size:12px;line-height:1.5;margin:8px 0}
#content:has(#task-rows) .table-wrap th:first-child{min-width:82px;white-space:nowrap}
@media(max-width:700px){.delivery-settings{margin-left:0}.work-progress>summary{line-height:1.7}}
/* Optional instructions stay compact until requested. */
.editor-help{font-size:12px;color:var(--muted);margin:6px 0}
.editor-help>summary{cursor:pointer;width:max-content;color:var(--brand)}
.editor-help[open]{flex-basis:100%}
.editor-help p{max-width:76em;line-height:1.6;margin:8px 0}

/* Keep page navigation visible and separate source changes from page editing. */
.page-action-row{flex-wrap:wrap;overflow-x:visible}
.page-action-row #online-toolbar{display:flex;flex-wrap:wrap;flex-basis:100%;gap:6px;margin:0}
.source-edit-settings{margin-bottom:16px;font-size:12px}
.source-edit-settings>summary{cursor:pointer;color:var(--brand);font-weight:600}
.source-edit-settings[open]>summary{margin-bottom:10px}
.source-edit-settings button{margin-bottom:6px}

.expert-intake>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--brand)}
.expert-intake[open]>summary{margin-bottom:16px}

.progress-container>summary{cursor:pointer;color:var(--brand);font-size:13px;font-weight:600}
.progress-container[open]>summary{margin-bottom:12px}

.form-save-bar{position:sticky;bottom:0;z-index:1;display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--white);border-top:1px solid var(--line);padding:12px 0;margin-top:16px;box-shadow:0 -5px 10px #24363808}
.form-save-bar .save-confirmation{flex-basis:100%;line-height:1.6}
#expert-form input,#expert-form textarea,#task-form input,#task-form textarea,#task-form select{scroll-margin-bottom:150px;scroll-margin-top:90px}
@media(max-width:700px){.form-save-bar{padding:8px 0}.form-save-bar button{min-height:44px}}

#project-actions{position:relative;flex-shrink:0}
#project-actions>summary{cursor:pointer;border:1px solid var(--line);border-radius:6px;background:white;padding:8px 12px;font-size:13px}
#project-actions>div{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:flex;flex-direction:column;gap:6px;min-width:150px;padding:10px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 20px #24363818}
#project-actions button{text-align:left}
#project-actions #delete-project{color:var(--danger);border-top:1px solid var(--line);margin-top:4px}
@media(max-width:700px){#project-actions>summary{min-height:44px;display:flex;align-items:center}}

/* Editor-only warning; keep selection handles and the original text box intact. */
.slide-element.text-boundary-overflow{outline:2px dashed #ba3d32!important;outline-offset:-2px}

.receipt-stats{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Project selector: readable empty state and long names on narrow screens. */
.project-select{flex-wrap:wrap;min-width:0}.project-select label{white-space:nowrap}.project-select select{width:230px;min-width:180px;max-width:100%;text-overflow:ellipsis}select:disabled{opacity:1;color:var(--muted);cursor:not-allowed}@media(max-width:600px){.project-select{width:100%}.project-select select{flex:1;min-width:140px}.heading{flex-wrap:wrap}}

/* Keep primary template editing visible and thumbnails independent of long titles. */
.delivery-toolbar{flex-wrap:wrap;justify-content:flex-start}.delivery-toolbar>#template-editor{flex-shrink:0}.delivery-toolbar>h2{flex-basis:100%}
#page-thumbnails{align-items:flex-start}#page-thumbnails .thumbnail{height:auto;min-height:180px;align-self:flex-start}#page-thumbnails .thumbnail strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:5em;overflow:hidden}

/* Courseware evidence is literal and readable on narrow screens. */
.cw-evidence{white-space:pre-wrap;overflow-wrap:anywhere;max-height:40vh;overflow:auto;font:inherit;background:var(--bg,#f5f7f7);padding:12px}
#cw-summary .stat{min-width:0;text-align:left}
#cw-bundle{display:inline-block;padding:10px 14px;border:1px solid var(--line,#dfe5e5);border-radius:6px;text-decoration:none}
#cw-files>details{padding:12px 0;border-bottom:1px solid var(--line,#dfe5e5)}

#cw-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
#cw-summary .stat{border:0;border-radius:0;border-right:1px solid var(--line,#dfe5e5)}
#cw-summary .stat:last-child{border-right:0}
#cw-table{min-width:850px}
#cw-table button{white-space:nowrap}
@media(max-width:700px){#cw-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#content:has(#cw-table) .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}}
