:root{--accent:#a87a24;--bg:#f6f3ec;--ink:#302d28;--muted:#746f66;--line:#e5e0d6;color-scheme:light}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font:15px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}a{color:#8a621b;text-underline-offset:4px}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid transparent;border-radius:9px;padding:10px 16px;background:var(--accent);color:#fff;font-weight:600}button.quiet{background:transparent;border-color:var(--line);color:var(--ink)}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #bc963f;outline-offset:3px}[hidden]{display:none!important}.layout{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:100vh}.sidebar{background:#fbfaf6;border-right:1px solid var(--line);padding:30px 22px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{font-size:24px;font-weight:850;letter-spacing:3px;text-decoration:none}.brand span{display:block;font-size:8px;letter-spacing:2px;color:var(--muted)}.side-label{font-size:10px;letter-spacing:2px;color:var(--muted);margin:48px 10px 15px}.sidebar nav{display:grid;gap:7px}.sidebar nav button{text-align:left;background:transparent;color:var(--muted);font-weight:500}.sidebar nav button[aria-current=page]{color:#79520f;background:#eee6d3}.side-bottom{margin-top:auto;display:grid;gap:10px;font-size:11px;color:var(--muted)}.side-bottom a{color:var(--muted)}.badge{display:inline-block;background:#eee6d3;border-radius:20px;padding:4px 10px;width:max-content;color:#79520f;font-size:11px}.topbar{min-height:86px;padding:18px 32px;background:#ffffff8c;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:18px;font-size:12px;color:var(--muted)}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.topbar button{font-size:12px;padding:8px 12px}main{max-width:1280px;margin:auto;padding:32px}.page-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.page-heading{margin-bottom:25px}.page-heading h1{font-size:clamp(26px,3vw,38px);line-height:1.2;margin:5px 0 12px;letter-spacing:-1px}.page-heading p{margin:0;color:var(--muted)}.eyebrow{font-size:10px!important;letter-spacing:2px;color:#9a7429!important;font-weight:750}.notice{padding:13px 18px;border:1px solid #e3d8b9;background:#f8f0d9;border-radius:10px;font-size:13px}.notice.subtle{background:#f9f7ef;color:var(--muted);border-color:var(--line)}#error,#editor-error{padding:12px 16px;border:1px solid #efc6bc;border-radius:9px;background:#fff1ed;color:#8b3023;overflow-wrap:anywhere}.panel,.event-card,.template-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px}.panel h2{margin:0 0 12px;font-size:20px}.panel p{color:var(--muted)}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:24px 0}.metrics article{display:grid;gap:8px}.metrics span{font-size:12px;color:var(--muted)}.metrics strong{font-size:34px;line-height:1.3;font-weight:650}.status-line{justify-content:space-between;font-size:11px;color:var(--muted);margin-top:22px}.section-heading{margin:22px 0 18px}.section-heading h2{font-size:20px;margin:0}.section-heading>span{font-size:12px;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px}.event-card,.template-card{position:relative;overflow:hidden}.event-card:before{content:'';display:block;height:4px;background:var(--accent);position:absolute;top:0;left:0;right:0}.event-card h3,.template-card h3{font-size:21px;margin:13px 0 8px;line-height:1.3;overflow-wrap:anywhere}.description{color:var(--muted);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.event-card time{display:block;font-size:14px;margin:16px 0;color:var(--ink)}.roster-stat{display:flex;justify-content:space-between;font-size:13px}.meter{height:6px;border:0;width:100%;margin:14px 0;background:#eee9df;border-radius:6px;overflow:hidden}.meter::-webkit-progress-bar{background:#eee9df}.meter::-webkit-progress-value{background:var(--accent)}.meter::-moz-progress-bar{background:var(--accent)}.card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.card-actions button,.card-actions a{font-size:12px}.card-actions a{margin-right:auto}.profession{padding:6px 0;display:flex;justify-content:space-between;font-size:13px;border-bottom:1px solid #f2efe9}.empty{padding:36px 20px;border:1px dashed #d8cfbd;border-radius:12px;color:var(--muted);text-align:center;grid-column:1/-1}.guidance{margin-top:24px}.request-panel{margin-top:36px;border-top:1px solid var(--line);padding-top:4px}.request-panel h2{font-size:16px}.request-panel button{font-size:12px}details{margin-top:18px;font-size:12px;color:var(--muted)}summary{cursor:pointer}pre{background:#fff;padding:16px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;font:12px/1.5 monospace;border:1px solid var(--line);border-radius:10px}footer{font-size:11px;color:var(--muted);padding:0 32px 25px}fieldset{border:0;margin:0;padding:0}label{display:grid;gap:6px;color:var(--muted);font-size:13px;margin:16px 0}input,textarea,select{width:100%;padding:10px;border:1px solid #d7d1c6;border-radius:8px;background:white;color:var(--ink)}input[type=color]{height:42px}textarea{min-height:100px;resize:vertical}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hint{font-size:12px;color:var(--muted)}dialog{width:min(650px,calc(100% - 28px));max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:24px;color:var(--ink);background:var(--bg)}dialog::backdrop{background:#302d2870;backdrop-filter:blur(3px)}dialog .section-heading{margin-top:0}#editor-note{font-size:13px;color:var(--muted)}@media(max-width:950px){.layout{grid-template-columns:180px minmax(0,1fr)}.sidebar{padding:25px 15px}.topbar{padding:16px 22px}.topbar>span{display:none}main{padding:24px}.metrics{gap:10px}.metrics article{padding:18px}}@media(max-width:650px){.layout{display:block}.sidebar{position:static;height:auto;padding:18px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:20px}.side-label,.side-bottom{display:none}.sidebar nav{display:flex;overflow:auto;margin-top:18px;gap:5px}.sidebar nav button{white-space:nowrap;padding:8px 12px;font-size:13px}.topbar{padding:12px 18px;min-height:60px}.topbar .row{gap:7px}main{padding:22px 16px}.page-heading{align-items:flex-start}.page-heading>button{font-size:12px}.metrics{gap:8px}.metrics article{padding:12px}.metrics span{font-size:10px}.metrics strong{font-size:28px}.panel,.event-card,.template-card{padding:19px}.form-row{grid-template-columns:1fr}.status-line{gap:5px}.request-panel .section-heading{display:block}footer{padding:0 16px 20px}}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Only confirmed backend theme values reach these validated CSS variables. */
:root{--surface:#fff;--sidebar:#fbfaf6;--accent-text:#000;--accent-ink:#79520f;--selected-bg:#eee6d3;--selected-ink:#79520f;--notice-bg:#f8f0d9;--notice-ink:#302d28}
a,.brand{color:var(--accent-ink)}button{color:var(--accent-text)}.sidebar{background:var(--sidebar)}.topbar{background:var(--surface)}.panel,.event-card,.template-card,pre,input,textarea,select{background:var(--surface);color:var(--ink)}input,textarea,select{border-color:var(--line)}.sidebar nav button[aria-current=page],.badge{background:var(--selected-bg);color:var(--selected-ink)}.notice,.notice.subtle{background:var(--notice-bg);color:var(--notice-ink);border-color:var(--line)}.eyebrow{color:var(--accent-ink)!important}.profession{border-color:var(--line)}.meter,.meter::-webkit-progress-bar{background:var(--line)}.brand{overflow-wrap:anywhere;letter-spacing:1px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline-color:var(--accent-ink)}

.publication-note{font-size:12px;color:var(--muted);padding:10px 0;border-bottom:1px solid var(--line)}

.calendar-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.calendar-controls label{margin:0;min-width:160px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:24px 0}.calendar-weekday{text-align:center;font-size:12px;color:var(--muted)}.calendar-day{background:var(--surface);border-color:var(--line);color:var(--ink);min-height:78px;padding:10px;display:flex;flex-direction:column;align-items:flex-start;gap:7px}.calendar-day.outside{border-style:dashed;color:var(--muted)}.calendar-day[aria-pressed=true]{outline:2px solid var(--accent-ink);outline-offset:1px;background:var(--selected-bg);color:var(--selected-ink)}.calendar-count{font-size:10px;border-bottom:2px solid var(--accent)}.calendar-selection{display:grid;gap:14px}.calendar-selection h3{margin:8px 0}.calendar-selection:focus-visible{outline:2px solid var(--accent-ink);outline-offset:5px}@media(max-width:650px){.calendar-grid{gap:4px}.calendar-day{padding:7px 4px;min-height:66px;font-size:12px}.calendar-count{font-size:9px}.calendar-controls button{font-size:11px;padding:8px}}

/* Owner workflow: compact chrome, explicit steps, readable touch controls. */
.workspace,main,section,form,fieldset,.row,.section-heading>*,.topbar>*{min-width:0}
button,input,select{min-height:44px}input,textarea,select{font-size:16px;max-width:100%}
button,a,summary,h1,h2,h3,p,label,dd{overflow-wrap:anywhere}
.connection-state{font-size:12px;color:var(--muted);margin:0 0 14px}
.status-line{font-size:12px;gap:8px 18px;margin:14px 0 22px}
.request-panel>summary,.guidance>summary{font-size:14px;font-weight:650;min-height:44px;padding:10px 0;color:var(--ink)}
.guidance{padding:12px 20px}.guidance p{margin-bottom:6px}
.template-wizard{margin-top:20px}.wizard-progress{font-size:13px;color:var(--accent-ink);font-weight:650}
.wizard-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;list-style:none;padding:0;margin:12px 0 24px}
.wizard-steps button{width:100%;height:100%;padding:10px 7px;font-size:13px;text-align:left}
.wizard-steps button[aria-current=step]{background:var(--selected-bg);border-color:var(--accent-ink);color:var(--selected-ink)}
.wizard-panel h3{margin:0 0 8px;font-size:21px}.wizard-panel h3:focus{outline:none}
.wizard-panel h3:focus-visible{outline:2px solid var(--accent-ink);outline-offset:4px}
.wizard-panel .hint{font-size:13px;line-height:1.6}.wizard-panel label{font-size:14px}
.wizard-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.wizard-slots label{margin:8px 0}.checkbox-field{grid-template-columns:24px minmax(0,1fr);align-items:center;min-height:44px;position:relative;padding-left:34px;display:block;line-height:44px}
.checkbox-field input{position:absolute;left:0;top:10px;width:24px;height:24px;min-height:24px;margin:0;accent-color:var(--accent)}
.field-error{display:block;font-size:13px;color:var(--ink);font-weight:650;line-height:1.5}
input[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--accent-ink);box-shadow:0 0 0 1px var(--accent-ink)}
.wizard-cover{padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.wizard-cover summary{min-height:44px;padding:10px 0;color:var(--ink)}
.wizard-review{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);gap:0;margin:20px 0}
.wizard-review dt,.wizard-review dd{padding:10px 0;border-bottom:1px solid var(--line);margin:0;font-size:14px;white-space:pre-wrap}
.wizard-review dt{color:var(--muted);padding-right:16px}.wizard-actions{display:flex;justify-content:space-between;gap:12px;margin:24px 0 12px}.wizard-actions button:only-child{margin-left:auto}
dialog{width:min(760px,calc(100% - 28px));max-height:calc(100dvh - 28px)}
#editor-submit{width:100%;margin-top:8px}#editor-note{line-height:1.6}
@media(max-width:650px){
 .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:5px}
 .sidebar nav button{white-space:normal;text-align:center;padding:10px 4px;min-height:44px;font-size:12px}
 .topbar .row{width:100%}.topbar button{font-size:13px;min-height:44px}
 .topbar #identity{margin-right:auto}.page-heading{gap:14px}.page-heading>button{width:100%;font-size:14px}
 .metrics{grid-template-columns:1fr;gap:8px}.metrics article{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 16px}
 .metrics span{font-size:13px}.metrics strong{font-size:26px}.section-heading>span{font-size:13px}
 .card-actions button,.card-actions a{font-size:14px;min-height:44px;display:inline-flex;align-items:center}.card-actions{align-items:stretch}
 .card-actions button{flex:1}.section-heading #new-template{width:100%}
 .status-line{display:grid;gap:4px}.calendar-controls{gap:8px}.calendar-controls label{min-width:0;width:100%}
 .calendar-controls button{font-size:12px;flex:1;min-height:44px}.calendar-day{min-width:0;min-height:62px}
 dialog{width:calc(100% - 16px);padding:18px 14px;max-height:calc(100dvh - 16px);border-radius:12px}
 dialog .section-heading{gap:10px;flex-wrap:nowrap}dialog .section-heading h2{font-size:20px}#close-editor{font-size:13px;padding:10px}
 .wizard-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.wizard-steps button{font-size:13px;padding:10px}
 .wizard-slots{grid-template-columns:1fr}.wizard-review{grid-template-columns:1fr}.wizard-review dt{border:0;padding-bottom:0}.wizard-review dd{padding-top:3px}
 .wizard-actions button{flex:1}.request-panel button{font-size:14px}.request-panel .row button{width:100%}
}
@media(max-width:350px){main{padding:18px 12px}.sidebar{padding:16px 12px}.wizard-steps{grid-template-columns:1fr}.calendar-grid{gap:3px}.calendar-day{padding:5px 2px}.calendar-count{font-size:8px}}

/* Native checkbox keeps keyboard/label semantics while presenting a switch. */
.switch-field{display:flex!important;align-items:center;justify-content:space-between;gap:16px;min-height:44px;cursor:pointer}.switch-field input{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 48px;width:48px;height:28px;min-height:28px;border-radius:20px;padding:0;border:2px solid var(--muted);background:var(--surface);cursor:pointer}.switch-field input::after{content:"";position:absolute;width:18px;height:18px;top:3px;left:3px;border-radius:50%;background:var(--muted)}.switch-field input:checked{background:var(--accent);border-color:var(--accent)}.switch-field input:checked::after{left:23px;background:var(--accent-text)}.cover-local-preview{display:block;max-width:100%;max-height:220px;object-fit:contain;border-radius:10px;margin:16px 0}.cover-editor h4{font-size:16px;margin:14px 0}.cover-editor>div>p{font-size:12px;color:var(--muted)}input[readonly]{background:var(--selected-bg);color:var(--selected-ink)}

.saved-template-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px}.saved-template-dialog h2{margin-top:0}.saved-template-dialog>p{color:var(--muted)}@media(max-width:650px){.saved-template-actions{grid-template-columns:1fr}}

/* Custom file chooser retains the native, focusable file input. */
.cover-upload-area{border:1px dashed var(--accent-ink);border-radius:12px;background:var(--surface);padding:18px;margin:16px 0;min-width:0}.cover-file-choice{position:relative;display:inline-flex;align-items:center;margin:0;max-width:100%;cursor:pointer}.cover-file-input{position:absolute!important;width:1px!important;height:1px!important;min-height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0!important}.cover-file-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:9px;background:var(--selected-bg);color:var(--selected-ink);border:1px solid var(--accent-ink);font-size:14px;font-weight:650}.cover-file-choice:focus-within .cover-file-button{outline:3px solid var(--accent-ink);outline-offset:3px}.cover-file-choice[aria-disabled=true]{opacity:.5;cursor:not-allowed;pointer-events:none}.cover-file-meta{display:flex;align-items:baseline;gap:10px;margin:12px 0 4px;max-width:100%;min-width:0;font-size:13px;color:var(--ink)}.cover-file-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}.cover-file-size{flex:0 0 auto;color:var(--muted);font-size:12px}.cover-file-hint{margin:6px 0 0;font-size:12px}@media(max-width:650px){.cover-upload-area{padding:14px}.cover-file-choice,.cover-file-button{width:100%}.cover-file-meta{flex-wrap:wrap;gap:2px 10px}.cover-file-name{flex-basis:100%}}

/* State colors cover the complete gathering card in every view. Scoped light
   palettes remain readable even when the owner's surrounding theme is dark. */
.gathering-card{--state-bg:#f1f3f5;--state-edge:#526170;--state-badge:#e0e5eb;--state-text:#354454;--ink:#24303f;--muted:#4c5868;--surface:var(--state-bg);--line:#cbd3dc;--accent:var(--state-edge);--accent-ink:var(--state-text);--accent-text:#ffffff;--selected-bg:var(--state-badge);--selected-ink:var(--state-text);background:var(--state-bg);color:var(--ink);border:1px solid var(--state-edge);border-left:5px solid var(--state-edge);min-width:0}
.gathering-card[data-state-group=scheduled]{--state-bg:#eef5ff;--state-edge:#32649c;--state-badge:#dbeafd;--state-text:#234e7e}
.gathering-card[data-state-group=open]{--state-bg:#edf8f0;--state-edge:#267345;--state-badge:#d6eddd;--state-text:#1d5936}
.gathering-card[data-state-group=closed]{--state-bg:#fff6e5;--state-edge:#91601c;--state-badge:#f8e6be;--state-text:#6e4814}
.gathering-card[data-state-group=started]{--state-bg:#f5efff;--state-edge:#72509d;--state-badge:#e9ddf9;--state-text:#573478}
.gathering-card[data-state-group=cancelled]{--state-bg:#fff0ef;--state-edge:#aa4440;--state-badge:#f8dbd8;--state-text:#812e2b}
.gathering-card::before{background:var(--state-edge)}.gathering-card .badge{background:var(--state-badge);color:var(--state-text);font-weight:700;white-space:normal;max-width:100%;height:auto}
.gathering-card a{color:var(--state-text)}.gathering-card .card-actions{border-color:var(--state-edge)}.gathering-card button.quiet{background:var(--state-bg);border-color:var(--state-edge);color:var(--state-text)}.gathering-card time,.gathering-card h3{color:var(--ink)}.gathering-card .description,.gathering-card .publication-note,.gathering-card>p{color:var(--muted)}
@media(max-width:650px){.gathering-card{border-left-width:4px}.gathering-card .badge{font-size:12px;padding:5px 10px}.gathering-card .card-actions{gap:8px}}
