.mb-add{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mb-add button{padding:12px 4px}.mb-birthday{margin:10px 0}.mb-day{margin:12px 0;border-top:1px solid #d6e2e5;padding-top:10px}.mb-schedule{display:block;width:100%;text-align:left;border:0;background:#f4f7f8;border-radius:6px;padding:9px;margin:5px 0;color:#19343d;cursor:pointer}.mb-schedule small{display:block;color:#5a7682}.mb-worked{background:#e2f2ee!important;box-shadow:inset 3px 0 #367d87}.mb-dialog{border:1px solid #d6e2e5;border-radius:12px;background:#fff;color:#19343d;padding:22px;width:min(600px,calc(100vw - 30px));max-height:90vh;overflow:auto;box-sizing:border-box;font-family:'DM Sans',sans-serif}.mb-dialog::backdrop{background:#142d3670}.mb-dialog header,.mb-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.mb-dialog header h2{margin:0;font-size:22px}.mb-dialog header p{font-size:13px;color:#5a7682;margin:5px 0}.mb-dialog footer{justify-content:flex-end;margin-top:18px}.mb-dialog label{display:block;font-size:13px;margin:9px 0}.mb-dialog input,.mb-dialog select,.mb-dialog textarea{margin-top:4px}.mb-dialog [data-error]{color:#b3261e;white-space:pre-wrap}.mb-dialog [data-error]:empty{display:none}.mb-fields{display:grid;grid-template-columns:1fr 1fr;gap:4px 14px}.mb-wide{grid-column:1/-1}.mb-category{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:20px}.mb-category button{text-align:left;min-height:60px}.mb-group{background:#f2f5f6;padding:14px;border-radius:9px;margin:15px 0}.mb-group h3,.mb-tools h3{font-size:15px;margin:8px 0}.mb-seating{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:10px}.mb-seating input{width:100px}#mb-flyer{width:min(1100px,calc(100vw - 30px))}.mb-flyer-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:16px}.mb-canvas{position:relative;aspect-ratio:8.5/11;background:#faf6ee;overflow:hidden;container-type:inline-size;border:1px solid #c4d4d8}.mb-canvas>img{position:absolute;width:100%;height:100%;object-fit:cover}.mb-veil{position:absolute;inset:0;background:white;pointer-events:none}.mb-text{position:absolute;line-height:1.2;white-space:pre-wrap;overflow-wrap:anywhere;outline:1px dashed #819ca3;cursor:pointer}.mb-text.selected{outline:2px solid #367d87}.mb-drag,.mb-resize{position:absolute;border:0;background:#367d87;color:white;width:24px;height:24px;touch-action:none;cursor:move;font:15px sans-serif}.mb-drag{left:-1px;top:-24px}.mb-resize{right:-1px;bottom:-1px;cursor:nwse-resize}.mb-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-height:260px;overflow:auto;margin:8px 0}.mb-gallery button{border:1px solid #d6e2e5;background:#fff;border-radius:5px;padding:4px;cursor:pointer;color:#19343d}.mb-gallery img{width:100%;height:90px;object-fit:cover}.mb-gallery span{display:block;font-size:11px}.mb-font-samples{display:flex;flex-wrap:wrap;gap:6px}.mb-font-samples button{background:#faf6ee;border:1px solid #d6e2e5;border-radius:6px;font-size:20px;padding:9px;cursor:pointer}.mb-print{width:8.5in;height:11in;box-sizing:border-box}.mb-dialog [hidden]{display:none!important}@media(max-width:700px){.mb-flyer-grid{grid-template-columns:1fr}.mb-canvas{max-width:400px;margin:auto}.mb-fields{gap:4px 8px}.mb-dialog{padding:16px}.mb-dialog input,.mb-dialog textarea,.mb-dialog select{font-size:16px}}@media print{.mb-dialog{display:none!important}}
.mb-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-tools,.mb-flyer-grid>div{min-width:0}.mb-dialog input:not([type=checkbox]):not([type=range]),.mb-dialog select,.mb-dialog textarea{width:100%;min-width:0;box-sizing:border-box}.mb-dialog input[type=range]{width:100%}.mb-tools .admin-tabs{display:flex;flex-wrap:wrap}.mb-seating{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.mb-category{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-dialog header>div{min-width:0}.mb-dialog header h2{overflow-wrap:anywhere}.mb-gallery span{overflow-wrap:anywhere}

/* A composed page first; tools appear when the director chooses to edit. */
#mb-flyer{width:min(960px,calc(100vw - 24px));padding:18px;max-height:94dvh}
.mb-flyer-top{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:12px 0;padding-bottom:10px;border-bottom:1px solid #d6e2e5}
.mb-flyer-top button{font-size:13px;padding:7px 10px}
.mb-flyer-grid{grid-template-columns:minmax(0,1.4fr) minmax(190px,1fr);gap:18px;margin-top:12px;align-items:start}
.mb-flyer-grid>div:first-child{background:#edf3f3;padding:14px;border-radius:8px}
.mb-canvas{width:100%;max-width:420px;margin:auto;background:#fffaf0;border:0;box-shadow:0 2px 12px #19343d20}
.mb-text{outline:none;user-select:none;touch-action:none}
.mb-text.selected{outline:1px dashed #367d87;background:#367d8708}
.mb-drag,.mb-resize{display:none;width:13px;height:13px;font-size:9px}
.mb-text.selected .mb-drag,.mb-text.selected .mb-resize{display:block}
.mb-drag{top:-13px}
.mb-preview .mb-flyer-grid{grid-template-columns:minmax(0,1fr)}
.mb-preview .mb-tools,.mb-preview .mb-edit-help,.mb-preview .mb-overlay{display:none}
.mb-preview .mb-canvas{max-width:520px;width:min(100%,calc((100dvh - 230px) * .7727))}
.mb-preview .mb-text,.mb-preview .mb-text.selected{outline:none;background:transparent}
.mb-preview .mb-drag,.mb-preview .mb-resize{display:none}
#mb-flyer footer{position:sticky;bottom:-18px;background:#fff;padding:10px 0;margin-top:10px;border-top:1px solid #d6e2e5;z-index:2}
.mb-tools .mb-font-samples button{font-size:16px;padding:6px}
@media(max-width:560px){.mb-flyer-grid{grid-template-columns:minmax(0,1fr)}.mb-canvas{max-width:320px}.mb-preview .mb-canvas{width:min(100%,calc((100dvh - 250px) * .7727))}.mb-flyer-top button{padding:7px;font-size:12px}}

/* Match the approved flyer-text-editor mockup. */
#mb-flyer{width:min(800px,calc(100vw - 24px));font-size:14px;padding:18px}
#mb-flyer header h2{font-size:20px}
#mb-flyer header p{font-size:12px;margin:4px 0;color:#607780}
#mb-flyer button,#mb-flyer input,#mb-flyer select,#mb-flyer textarea{border:1px solid #d3e1e4;border-radius:6px;background:#fff;color:#19343d;font:inherit;padding:7px;min-width:0}
#mb-flyer button{cursor:pointer}
#mb-flyer label{font-size:12px;margin:0;display:flex;flex-direction:column;gap:5px}
#mb-flyer .btn-primary,#mb-flyer [aria-pressed=true]{background:#117e8b;color:white;border-color:#117e8b}
.mb-flyer-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #d3e1e4;padding:12px 0}
.mb-flyer-top{gap:10px;margin:0;padding:12px 0;flex-wrap:wrap}
.mb-flyer-top label{margin-right:auto!important}
.mb-flyer-grid{grid-template-columns:minmax(0,1.65fr) minmax(180px,1fr);gap:18px;margin-top:16px}
.mb-canvas-wrap{padding:14px;background:#eef4f4;border-radius:8px}
.mb-canvas{max-width:none;border:0;background:#fff9ed;box-shadow:0 2px 8px #0002}
.mb-text{cursor:move;line-height:1.2;outline:none}
.mb-text.selected{outline:1px dashed #117e8b;background:#117e8b09}
#mb-flyer .mb-resize{padding:0;background:#117e8b;border:2px solid white;border-radius:0;width:12px;height:12px}
.mb-tools{display:flex;flex-direction:column;gap:10px}
.mb-tools h3{font-size:14px;margin:0}
.mb-tools small{font-size:12px;color:#607780}
.mb-tools .mb-fields{gap:10px}
.mb-format{display:flex;gap:6px;align-items:center}
.mb-format select{flex:1;width:50px}
#mb-flyer footer{gap:10px}
#mb-flyer .mb-tools input[type=color]{height:36px;padding:3px}
@media(max-width:560px){.mb-flyer-grid{grid-template-columns:1fr}.mb-canvas-wrap{max-width:380px;width:100%;margin:auto}.mb-tools{display:grid;grid-template-columns:1fr 1fr}.mb-tools h3,.mb-tools>label:first-of-type,.mb-tools>small,.mb-tools .mb-format{grid-column:1/-1}#mb-flyer{padding:12px}}
#mb-flyer header,#mb-flyer footer,#mb-flyer .mb-flyer-tabs,#mb-flyer .mb-flyer-top,#mb-flyer .admin-tabs{position:static;top:auto;bottom:auto;z-index:auto}

/* Artwork options stay left; automatic library choices fill the space below the preview. */
#mb-flyer.mb-artwork:not(.mb-preview) .mb-flyer-grid{grid-template-columns:minmax(180px,1fr) minmax(0,1.65fr);grid-template-areas:"options canvas" "options library";align-items:start}
#mb-flyer.mb-artwork:not(.mb-preview) .mb-tools{grid-area:options}
#mb-flyer.mb-artwork:not(.mb-preview) .mb-canvas-wrap{grid-area:canvas}
#mb-flyer .mb-library{grid-area:library;min-width:0;border-top:1px solid #d6e2e5;padding-top:12px}
#mb-flyer .mb-library h3{font-size:17px;margin:0}
#mb-flyer .mb-library .mb-gallery{max-height:none;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:12px}
#mb-flyer .mb-library .mb-gallery img{height:150px}
#mb-flyer .mb-library .mb-gallery span{font-size:14px;margin:6px 0}
#mb-flyer .mb-library .mb-gallery small{display:block;color:#367d87;font-size:12px;margin-bottom:5px}
#mb-flyer .mb-library .mb-gallery>p{grid-column:1/-1}
#mb-flyer.mb-preview .mb-library{display:none}
@media(max-width:560px){#mb-flyer.mb-artwork:not(.mb-preview) .mb-flyer-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"options" "canvas" "library"}#mb-flyer.mb-artwork .mb-tools{display:flex}}

#mb-flyer .mb-library .mb-carousel{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x pan-y;max-height:none;padding:4px 2px 12px;gap:12px}
#mb-flyer .mb-library .mb-carousel>button{flex:0 0 160px;scroll-snap-align:start;scroll-snap-stop:always;text-align:left}
#mb-flyer .mb-library .mb-carousel>p{flex:1;margin:0}
#mb-flyer .mb-carousel-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px}
#mb-flyer .mb-carousel-controls button{min-width:44px;min-height:44px;font-size:22px}
#mb-flyer .mb-carousel-controls span{font-size:13px;color:#607780}

/* Flyer and carousel on the left; artwork choices on the right. */
#mb-flyer.mb-artwork:not(.mb-preview) .mb-flyer-grid{grid-template-columns:minmax(0,1.65fr) minmax(180px,1fr);grid-template-areas:"canvas options" "library options"}
@media(max-width:560px){#mb-flyer.mb-artwork:not(.mb-preview) .mb-flyer-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"canvas" "library" "options"}}

.mb-look-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mb-look-choices button{padding:5px;border:1px solid #d6e2e5;background:white;border-radius:6px;font-size:12px;text-align:left;color:#19343d}.mb-look-choices button[aria-pressed=true]{outline:2px solid #367d87}.mb-look-swatch{display:block;height:52px;border-radius:4px;margin-bottom:6px}.mb-look-swatch.noir{background:linear-gradient(130deg,#111824 35%,#b19d6c 36%,#23323c 46%,#0c141e 65%)}.mb-look-swatch.deco{background:repeating-conic-gradient(from 10deg at 50% 110%,#bb9359 0 9deg,#182b35 10deg 20deg)}.mb-look-swatch.modern{background:linear-gradient(90deg,#d57540 25%,#f0e6d5 26% 70%,#203e48 71%)}

.mb-copy-flow{cursor:ns-resize;touch-action:pan-x;user-select:none}.mb-copy-flow [data-flow-text]:focus-visible{outline:2px dashed #367d87;outline-offset:3px}.mb-preview .mb-copy-flow{cursor:default}

.mb-position-choices{display:flex;flex-wrap:wrap;gap:6px}.mb-position-choices button{flex:1;min-width:95px;min-height:44px;font-size:13px}.mb-position-choices button[aria-pressed=true]{background:#367d87;color:white}

/* Nine event categories in a centered, compact chooser. */
#mb-event.mb-category-dialog{position:fixed;inset:0;margin:auto;width:min(590px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 32px);padding:24px}
.mb-category-dialog .mb-category{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}
.mb-category-dialog .mb-category button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:112px;padding:12px 8px;text-align:center;white-space:normal;line-height:1.3;font-size:15px}
.mb-category-icon{font-size:30px;line-height:1}
@media(max-width:480px){#mb-event.mb-category-dialog{padding:16px}.mb-category-dialog .mb-category{gap:8px}.mb-category-dialog .mb-category button{min-height:108px;padding:8px 4px;font-size:12px}.mb-category-icon{font-size:26px}}

/* Center the existing-activity editor as well as the category chooser. */
#mb-event{position:fixed;inset:0;margin:auto;height:fit-content;max-height:calc(100dvh - 32px)}

/* Continuous day feed; colours and content come from the master calendar. */
.mb-day-feed{max-height:65vh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 6px 8px 0}
.mb-day-preview{margin:0 0 20px;padding:0;border:0;background:transparent;box-shadow:none}
.mb-day-date{margin:0 0 4px;font-size:17px;line-height:1.4;font-weight:700;color:#19343d}
.mb-day-preview .acs-ev{display:block;font-size:18px;line-height:1.5;margin:0;padding:3px 0;cursor:pointer;border:0;background:transparent;box-shadow:none;overflow-wrap:normal}
.mb-day-preview .acs-ev:hover{text-decoration:underline;text-underline-offset:3px}
.mb-day-preview .acs-ev:focus-visible{outline:2px solid #127b87;outline-offset:2px}
.mb-day-preview .acs-t,.mb-day-preview .acs-loc{white-space:nowrap}
.mb-day-key{font-size:15px;line-height:1.6;margin:12px 0}

/* Add pane: a slim add row, then the month as a phone-calendar list (day on the left, one line per entry). */
.mb-addrow{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 0 8px}
.mb-addrow>button{height:30px;min-height:0;padding:0 11px;font-size:13px}
.mb-cele{position:relative;margin-left:auto}
.mb-cele>summary{list-style:none;cursor:pointer;font-size:12px;font-weight:600;color:#117e8b;padding:5px 2px}
.mb-cele>summary::-webkit-details-marker{display:none}
.mb-cele>summary::after{content:' ▾'}
.mb-celemenu{position:absolute;right:0;top:100%;z-index:20;min-width:170px;background:#fff;border:1px solid #cfd6d8;border-radius:10px;box-shadow:0 8px 24px #0003;padding:5px;display:flex;flex-direction:column}
.mb-celemenu button{text-align:left;border:0;background:transparent;padding:8px 10px;font:inherit;font-size:13px;border-radius:6px;cursor:pointer;color:#19343d}
.mb-celemenu button:hover{background:#e8f3f4}
.mb-bar{display:flex;align-items:baseline;gap:8px;margin:2px 0 6px;font-size:12px;color:#5a7682}.mb-bar b{font-size:14px;color:#19343d}
.mb-day-feed{max-height:calc(100vh - 330px);min-height:240px}
.mb-day-preview.mb-b{display:grid;grid-template-columns:38px minmax(0,1fr);gap:6px;margin:0;padding:5px 0;border-top:1px solid #e8eef0}
.mb-dn{text-align:center;line-height:1}.mb-dn small{display:block;font-size:10px;font-weight:700;letter-spacing:.04em;color:#6a838d}.mb-dn b{font-size:19px;color:#19343d}
.mb-today .mb-dn b{display:inline-block;width:28px;height:28px;line-height:28px;font-size:15px;border-radius:50%;background:#117e8b;color:#fff}
.mb-ents{min-width:0}
.mb-b .acs-ev{font-size:13.5px;line-height:1.4;padding:1px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-day-key{font-size:12px;line-height:1.5;margin:8px 0 4px;color:#5a7682}
.mb-cele{margin-left:0;flex-basis:100%}
.mb-celemenu{right:auto;left:0}
.act-subkind{display:flex;gap:6px;flex-wrap:nowrap}.act-subkind .btn{flex:1 1 0;min-width:0;padding:0 4px;white-space:nowrap;font-size:13px;height:34px;min-height:0;display:inline-flex;align-items:center;justify-content:center;gap:4px}
.act-danger{color:#b3202a!important}

/* Celebrations sits in the row as a button like Event, Clinic and Outing, with its own small drop-down. */
.mb-cele{margin-left:0;flex-basis:auto}
.mb-cele>summary{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 10px;font-size:13px;font-weight:600;color:#117e8b;border:1px solid #117e8b;border-radius:8px;background:#fff;cursor:pointer}
.mb-cele>summary::after{content:'▾';font-size:11px}
.mb-celemenu{left:auto;right:0}
.mb-addrow{gap:5px}
.mb-addrow>button{padding:0 9px}
.mb-addrow{gap:4px;flex-wrap:nowrap}
.mb-addrow>button,.mb-cele>summary{padding:0 7px;font-size:12.5px;white-space:nowrap}
.mb-celemenu{min-width:150px}
/* The three celebration types never overflow, at any text size: they share the row and wrap when they must. */
.act-subkind{flex-wrap:wrap;gap:6px}
.act-subkind .btn{flex:1 1 auto;min-width:0;padding:0 10px;font-size:13px;overflow:hidden;text-overflow:ellipsis}
.act-subkind .btn i{flex:none}

/* Celebrations is exactly the size and look of Event, Clinic and Outing: same height, border, weight, colour. */
.mb-addrow .mb-cele>summary.mb-celebtn{display:flex;align-items:center;gap:4px;box-sizing:border-box;height:30px;min-height:0;padding:0 7px;border:2px solid #0e7c8a;border-radius:8px;background:#fff;color:#0e7c8a;font:700 12.5px/normal 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}
.mb-addrow .mb-cele[open]>summary.mb-celebtn{background:#e8f3f4}

/* The four add buttons (Event, Clinic, Outing, Celebrations): one compact line, thin 1px border, same width as before
   (the lost border pixel went into the padding). They never wrap, so Celebrations stays beside the others. */
.mb-addrow{flex-wrap:nowrap;gap:4px}
.mb-addrow>button,.mb-addrow .mb-cele>summary.mb-celebtn{height:30px;min-height:0;padding:0 8px;border:1px solid #0e7c8a;border-radius:8px;font:700 12.5px/normal 'DM Sans',sans-serif;white-space:nowrap}
