:root{font-family:system-ui,sans-serif;color:#18312c;background:#f6f7f4}*{box-sizing:border-box}body{margin:0}main{max-width:1500px;margin:auto;padding:28px}h1{margin:0;font-size:28px}p{color:#65716a}button,input,textarea{font:inherit}button{cursor:pointer;border:1px solid #ced8d1;border-radius:7px;background:white;padding:9px 14px;color:#18312c}button:hover,button[aria-pressed=true]{background:#d8eee5}button:disabled{opacity:.5;cursor:wait}input,textarea{width:100%;padding:10px;border:1px solid #bdcbc2;border-radius:6px}input[type=checkbox]{width:auto}label{display:block;margin:15px 0}.top,.calendar-title{display:flex;justify-content:space-between;align-items:center}nav{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.calendar-title span{font-size:13px;color:#65716a}.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:white;border-left:1px solid #dce3dd;border-top:1px solid #dce3dd}.day{border-right:1px solid #dce3dd;border-bottom:1px solid #dce3dd;min-height:130px;padding:7px}.day header{margin-bottom:6px}.new-day{padding:4px 8px;border:0}.today{background:#f0faf5}.today .new-day{background:#17634f;color:white}.event{display:block;width:100%;text-align:left;background:#dceee6;border:0;border-left:3px solid #277b5e;border-radius:4px;padding:6px;font-size:12px;margin:4px 0;overflow-wrap:anywhere}.all-day{min-height:80px;border-bottom:1px solid #dce3dd}.hour{min-height:64px;border-bottom:1px solid #ecf0ec}small{font-size:10px;color:#748278}.login{max-width:420px;padding-top:12vh}.login button,button[type=submit],#new{background:#17634f;color:white}dialog{width:min(520px,95vw);border:0;border-radius:12px;padding:25px;max-height:90vh;overflow:auto}dialog::backdrop{background:#142a2688}dialog footer{display:flex;gap:8px;justify-content:flex-end}#delete{color:#a12a24}#status,#editor-status{min-height:20px;font-size:13px}#calendar{overflow:auto}.week{min-width:850px}.month{min-width:620px}@media(max-width:700px){main{padding:14px}.top{align-items:flex-start}.top p{font-size:12px}.calendar-title span{display:none}.calendar-title h2{font-size:22px}}

/* Drag feedback. */
.event[draggable=true]{cursor:grab}
.is-dragging .event{cursor:grabbing}
.event.drag-source{opacity:.35;outline:1px dashed #277b5e}
.day.drop-target{background:#d6f1e4;box-shadow:inset 0 0 0 3px #277b5e}
.day.drop-target header::after{content:"Drop here";display:inline-block;margin-left:6px;font-size:11px;font-weight:600;color:#17634f}

.event.event-all-day{background:#dceee6;border-left-color:#277b5e;color:#183e30}
.event.event-all-day:hover{background:#c9e5d7}
.event.event-timed{background:#e0eafb;border-left-color:#446ab3;color:#213e70}
.event.event-timed:hover{background:#ccdafa}
.event:focus-visible{outline:2px solid #18312c;outline-offset:2px}
.event-legend{display:flex;gap:18px;font-size:12px;color:#53645d;margin:0 0 12px}
.event-legend span{display:inline-flex;align-items:center;gap:6px}
.event-legend span::before{content:"";width:10px;height:10px;border-radius:3px}
.legend-all-day::before{background:#277b5e}
.legend-timed::before{background:#446ab3}

select{font:inherit;width:100%;padding:10px;border:1px solid #bdcbc2;border-radius:6px;background:white;color:#18312c}
.date-time-row{display:flex;gap:12px}
.date-time-row label{flex:1;min-width:0}
[hidden]{display:none!important}
#all-day-hint{font-size:12px}
@media(max-width:400px){.date-time-row{flex-direction:column;gap:0}}

.day header{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.day .add-event{margin-left:auto;flex-shrink:0;width:26px;height:26px;padding:0;font-size:20px;line-height:1;background:#f0f5f1;color:#17634f;border:1px solid #ced8d1;border-radius:6px}
.day .add-event:hover{background:#c9e5d7;border-color:#277b5e}
.day .new-day:focus-visible{outline:2px solid #17634f;outline-offset:2px}
.day.drop-target header::after{order:3;width:100%;margin-left:0}

.title-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}
.title-filter label{margin:0;font-size:14px;font-weight:600}
.title-filter input{width:min(320px,100%)}
.title-filter small{flex-basis:100%;font-size:12px}
.event.filter-match{box-shadow:inset 0 0 0 2px #b88014;background:#fff0bf;color:#513b0b}
.event.filter-match:hover{background:#ffe59a}
.event.filter-muted,.event.filter-muted:hover{background:#edf0ed;border-left-color:#b7bfba;color:#89928c;box-shadow:none}
/* Share week rows so all-day and hourly sections align across all days. */
.week{grid-template-rows:auto minmax(80px,auto) repeat(12,minmax(64px,auto))}
.week .day{grid-row:1 / span 14;display:grid;grid-template-rows:subgrid;min-height:0;padding:0}
.week .day header{margin:0;padding:7px;align-self:stretch;align-content:center}
.week .all-day{min-height:0;padding:7px}
.week .hours{display:contents}
.week .hour{min-height:0;padding:3px 7px}

.event{display:flow-root}
.note-icon{float:right;position:relative;width:20px;height:24px;margin:0 0 3px 8px;background:#ffe680;border:1px solid #c89b23;border-radius:2px;box-shadow:1px 2px 2px #765b2426}
.note-icon::before{content:"";position:absolute;inset:6px 3px 3px;background:repeating-linear-gradient(to bottom,transparent 0 3px,#b39039 3px 4px)}
.note-icon::after{content:"";position:absolute;left:2px;right:2px;top:3px;border-top:2px dotted #8e6c20}
.internal-note{margin-top:20px;padding:14px;border:1px solid #d5ddd8;border-radius:8px;background:#f4f7f4}
.internal-note h3{margin:0;font-size:16px}
.internal-note h3 small{display:block;margin-top:5px;font-size:12px}
.internal-note p{font-size:12px;line-height:1.5}
.internal-note label{margin:10px 0}
.internal-note textarea:disabled{background:#e8ece9}
#note-status{min-height:18px;margin-bottom:0}

/* Fresco branding. */
.brand-header{background:#242b2b;color:#fff;border-radius:12px;padding:20px 24px}
.top.brand-header{gap:18px;flex-wrap:wrap;align-items:center}
.brand-lockup{display:flex;align-items:center;gap:22px;min-width:0}
.brand-logo{display:block;width:180px;height:auto;flex-shrink:0}
.brand-copy{min-width:0;border-left:1px solid #ffffff30;padding-left:22px}
.brand-header h1{color:#fff}
.brand-header p{color:#c3ceca;margin:6px 0 0;overflow-wrap:anywhere}
.brand-header button{background:transparent;border-color:#ffffff60;color:#fff}
.brand-header button:hover{background:#ffffff15}
.brand-header button:focus-visible{outline:2px solid #fa872b;outline-offset:3px}
.login-brand .brand-logo{width:140px}
.login-brand .brand-lockup{gap:16px}
.login-brand .brand-copy{padding-left:16px}
.login-brand h1{font-size:24px}
@media(max-width:700px){.brand-header{padding:16px}.brand-lockup{gap:14px}.brand-logo{width:130px}.brand-copy{padding-left:14px}.brand-header h1{font-size:22px}.top.brand-header p{font-size:11px}}
@media(max-width:400px){.top.brand-header .brand-lockup{flex-wrap:wrap}.top.brand-header .brand-copy{border-left:0;padding-left:0;flex-basis:100%}.login-brand .brand-logo{width:120px}}

/* Mobile installation and safe areas. */
.app-install{display:flex;align-items:flex-start;gap:12px;margin:12px 0;font-size:13px}
.app-install details{padding:8px 0;max-width:620px}
.app-install summary{cursor:pointer;color:#53645d}
.app-install p{line-height:1.5;margin:8px 0}
#install-app,.reconnect{display:inline-block;background:#17634f;color:white;border-radius:7px;padding:9px 14px;text-decoration:none}
@media(display-mode:standalone){#app-install{display:none}}
@supports(padding:env(safe-area-inset-top)){body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}}
@media(max-width:700px){button{min-height:36px}input,select,textarea{font-size:16px}.day .add-event{width:30px;height:30px;min-height:30px}}

.header-link{display:inline-block;padding:9px 14px;border:1px solid #ffffff60;border-radius:7px;color:#fff;text-decoration:none}
.header-link:hover{background:#ffffff15}
.top.brand-header form{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.user-admin-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:28px;align-items:start}
.user-editor{background:white;border:1px solid #dce3dd;border-radius:10px;padding:20px}
.user-editor h2{margin-top:0}
.user-table-wrap{overflow:auto}
.user-table{width:100%;border-collapse:collapse;background:white;text-align:left}
.user-table th,.user-table td{padding:12px;border-bottom:1px solid #dce3dd;vertical-align:middle}
.user-table th{font-size:13px;background:#eaf0eb}
.user-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.button-link{display:inline-block;padding:9px 14px;border:1px solid #ced8d1;border-radius:7px;text-decoration:none;color:#18312c;background:white}
.button-link:hover{background:#d8eee5}
.danger,.admin-error{color:#a12a24}
.admin-notice{color:#17634f}
.field-hint{font-size:12px;line-height:1.5}
@media(max-width:900px){.user-admin-layout{grid-template-columns:1fr}.user-editor{max-width:600px}}
.user-admin-layout>section{min-width:0}
@media(max-width:900px){.user-admin-layout{grid-template-columns:minmax(0,1fr)}}

.remove-user button{background:white;border-color:#dfc4be;color:#a12a24}
.remove-user button:hover{background:#faeae6}

.notes-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0}
.notes-toolbar p{margin:0;line-height:1.5}
.notes-toolbar button{flex-shrink:0}
.notes-feed{display:grid;gap:16px}
.note-feed-item{background:white;border:1px solid #dce3dd;border-left:4px solid #dfb232;border-radius:9px;padding:20px;min-width:0}
.note-feed-heading{display:flow-root}
.note-feed-heading .note-icon{width:24px;height:28px;margin-left:12px}
.note-summary{margin:0;color:#18312c;line-height:1.6;font-size:16px;overflow-wrap:anywhere}
.note-updated{font-size:12px;margin:8px 0}
.note-event-details{font-size:14px;color:#53645d;line-height:1.5;margin:10px 0}
.note-feed-body{white-space:pre-wrap;overflow-wrap:anywhere;color:#243a30;background:#fff9df;border-radius:6px;padding:14px;line-height:1.6;font-size:14px;margin-top:12px}
.note-event-unavailable{font-size:13px;color:#8a6531}
.note-calendar-link{margin-top:14px;font-size:13px}
.note-full{margin-top:12px;font-size:13px}
.note-full summary{cursor:pointer;color:#17634f}
.notes-empty{padding:24px;background:white;border:1px solid #dce3dd;border-radius:9px}
.notes-count,#notes-status{font-size:13px}
.notes-pagination{justify-content:space-between}
@media(max-width:700px){.notes-toolbar{align-items:flex-start;flex-direction:column}.note-feed-item{padding:16px}}
