/* Create event page (/create-event/): cover and theme on the left, the
   event's details on the right. Date and time pickers and validation are the
   browser's own, styled here; :has() shows what follows from a choice (the
   theme's name and preview, the visibility's icon and name). Every dropdown
   (visibility, theme, time zone, the dates' calendars, the times' lists) is
   a .ce-menu-list that fades and slides in, and out (create.js closes them). */
@property --ce-ft { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --ce-fb { syntax: "<length>"; inherits: false; initial-value: 0px; }

.ce {
  --ce-panel: var(--mm-surface);
  --ce-panel-2: var(--mm-surface-2);
  --ce-line: var(--mm-line);
  --ce-ease: cubic-bezier(.2, .8, .2, 1);
  --ce-popup: min(calc(62rem * .7), calc(100vw - 2rem));  /* popups: the middle 70% of the page's width */
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
/* A draft brought back from this browser; finishing without an account. */
.ce-restored { margin: 0 0 1.25rem; padding: .7rem 1rem; border-radius: 12px; border: 1px solid var(--ce-line); background: var(--ce-panel); color: var(--mm-ink-2); font-size: .92rem; }
.ce-restored .mm-textbutton { margin-left: .4rem; }
.ce-finish { max-width: 26rem; }
.ce-finish-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.ce-finish-error { margin: .8rem 0 0; color: var(--mm-danger); font-size: .9rem; }

.ce-form { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.ce-side { position: sticky; top: calc(var(--mm-header-h) + 1.5rem); display: grid; gap: .75rem; }
.ce-main { display: grid; gap: .75rem; min-width: 0; }

.ce textarea { field-sizing: content; }
/* File inputs stay in the form (and its validation) but out of sight. */
.ce input[type="file"] { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; }

/* Cover */
.ce-cover {
  position: relative; display: block; aspect-ratio: 1; border-radius: 18px; overflow: hidden; cursor: pointer;
  background:
    radial-gradient(circle at 25% 20%, rgb(214 178 94 / .55), transparent 55%),
    radial-gradient(circle at 80% 85%, rgb(61 122 104 / .6), transparent 55%),
    var(--mm-black);
  box-shadow: var(--mm-shadow);
}
.ce-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-cover:has(img:not([hidden])) .ce-cover-empty { display: none; }
.ce-cover-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .5rem; color: #f1ece2; font-weight: 500; }
.ce-cover-empty .mm-ico { width: 2.2rem; height: 2.2rem; opacity: .85; }
.ce-cover-pick {
  position: absolute; right: .8rem; bottom: .8rem;
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: #fff; color: var(--mm-black);
  box-shadow: 0 0 0 3px rgb(15 14 12 / .55), var(--mm-shadow-sm);
  transition: transform .2s var(--ce-ease);
}
.ce-cover:hover .ce-cover-pick { transform: scale(1.08); }
/* No uploads yet: the default cover, nothing to pick. */
.ce-cover[data-ce-no-uploads] { cursor: default; }
.ce-cover[data-ce-no-uploads] .ce-cover-pick { display: none; }
.ce-cover[data-ce-no-uploads]:focus-within { outline: none; }
.ce-cover:focus-within { outline: 2px solid var(--mm-focus); outline-offset: 3px; }

/* Theme (the event's design): the selected one's name and preview link show
   (the page's <style> has a rule per design). */
.ce-theme {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .9rem; border-radius: 14px;
  background: var(--ce-panel); border: 1px solid var(--ce-line);
  transition: border-color .2s, background-color .2s;
}
.ce-theme:hover, .ce-menu[open] > .ce-theme { border-color: var(--mm-line-2); background: var(--ce-panel-2); }
.ce-theme-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ce-theme-text strong { display: none; font-size: .95rem; font-weight: 500; }
/* The dropdown and, to its right, the selected theme's Preview button. */
.ce-theme-row { display: flex; align-items: stretch; gap: .5rem; }
.ce-theme-menu { flex: 1; min-width: 0; }
.ce-theme-menu .ce-menu-list { width: 20rem; max-width: calc(100vw - 2rem); padding: 0; overflow: clip; }
.ce-theme-list { max-height: 24rem; overflow-y: auto; padding: .35rem; }
.ce-chev { color: var(--mm-muted); transition: transform .25s var(--ce-ease); }
.ce-theme-about { display: none; flex: none; }
.ce-preview-btn {
  display: inline-flex; align-items: center; gap: .4rem; height: 100%; padding: 0 .85rem; border: 1px solid var(--ce-line); border-radius: 14px;
  background: none; color: var(--mm-ink-2); font: 500 .88rem var(--mm-font); cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.ce-preview-btn:hover { border-color: var(--mm-gold); background: var(--mm-gold-wash); color: var(--mm-ink); }

/* Category and tags: a heading above a box; tags as #capsules under it. */
.ce-side-field { display: grid; gap: .45rem; margin-top: .6rem; }
.ce-side-h { margin: 0; font: 600 .95rem var(--mm-font); color: var(--mm-ink-2); }
.ce-side-h span { margin-left: .2rem; color: var(--mm-muted); font-weight: 400; font-size: .82rem; }
.ce-input {
  width: 100%; padding: .7rem .9rem; border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  color: var(--mm-ink); font: 500 .95rem var(--mm-font); transition: border-color .2s, box-shadow .2s;
}
.ce-input::placeholder { color: var(--mm-muted); font-weight: 400; font-size: .85rem; }  /* (as the optional fields' labels: summary, venue notes) */
.ce-input:hover { border-color: var(--mm-line-2); }
.ce-input:focus { outline: none; border-color: var(--mm-gold); box-shadow: 0 0 0 4px rgb(214 178 94 / .14); }
.ce-input:user-invalid { border-color: var(--mm-danger); }
/* The Enter key at the tag box's end, once something's typed: it adds the tag too. */
.ce-tag-field { position: relative; display: block; }
.ce-tag-field > .ce-input { padding-right: 2.8rem; }
.ce-tag-enter {
  position: absolute; top: 50%; right: .45rem; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0;
  border: 1px solid var(--mm-line-2); border-radius: 8px; background: var(--ce-panel-2); color: var(--mm-ink-2); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(-50%) scale(.85); transition: opacity .15s, transform .2s var(--ce-ease), background-color .15s;
}
.ce-tag-enter .mm-ico { width: .95rem; height: .95rem; }
.ce-tag-field:has(input:not(:placeholder-shown)) .ce-tag-enter { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.ce-tag-enter:hover { background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
.ce-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ce-tags:empty { display: none; }
.ce-tag {
  display: inline-flex; align-items: center; gap: .2rem; max-width: 100%; padding: .22rem .25rem .22rem .7rem;
  border-radius: 999px; background: var(--mm-gold-wash); color: var(--mm-gold-ink); font: 500 .85rem var(--mm-font);
  animation: ce-menu-in .18s var(--ce-ease);
}
.ce-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-tag > button {
  flex: none; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; cursor: pointer; opacity: .75; transition: background-color .15s, opacity .15s;
}
.ce-tag > button:hover { opacity: 1; background: rgb(0 0 0 / .08); }
.ce-tag > button .mm-ico { width: .8rem; height: .8rem; }

/* ---------- Dropdown menus ---------- */
.ce-menu { position: relative; }
.ce-menu > summary { list-style: none; cursor: pointer; }
.ce-menu > summary::-webkit-details-marker { display: none; }
.ce-menu > summary:focus { outline: none; }
.ce-menu > summary:focus-visible { outline: 2px solid var(--mm-focus); outline-offset: 2px; }
.ce-menu[open] > summary .ce-chev { transform: rotate(180deg); }
.ce-menu-list {
  position: absolute; z-index: 30; top: calc(100% + .45rem); left: 0;
  width: max-content; min-width: 100%; max-width: min(24rem, calc(100vw - 2rem));
  padding: .35rem; border-radius: 14px;
  background: var(--mm-surface); color: var(--mm-ink);
  border: 1px solid var(--mm-line-2);
  box-shadow: var(--mm-shadow-lg);
  transform-origin: top left;
}
.ce-menu-list--end { left: auto; right: 0; transform-origin: top right; }
.ce-menu[open] > .ce-menu-list { animation: ce-menu-in .2s var(--ce-ease); }
.ce-menu.ce-closing > .ce-menu-list { animation: ce-menu-out .14s ease-in forwards; }
@keyframes ce-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes ce-menu-out { to { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* An option: icon, name and a line about it, a tick when chosen. */
.ce-opt {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .2rem .75rem;
  padding: .6rem .7rem; border-radius: 10px; cursor: pointer;
  transition: background-color .15s;
}
.ce-opt:hover, .ce-opt:has(:focus-visible) { background: var(--ce-panel-2); }
/* (The radio stays in its option: focused when chosen, it would otherwise
   scroll the menu to wherever it sat.) */
.ce-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.ce-opt > .mm-ico { margin-top: .15rem; color: var(--mm-muted); }
.ce-opt span { display: grid; gap: .1rem; }
.ce-opt--plain { grid-template-columns: 1fr auto; }
.ce-opt--plain small { max-width: none; }
.ce-opt strong { font-size: .95rem; font-weight: 600; }
.ce-opt small { max-width: 15rem; color: var(--mm-muted); font-size: .82rem; line-height: 1.35; }
.ce-tick { margin-top: .2rem; color: var(--mm-ink); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--ce-ease); }
.ce-opt:has(input:checked) .ce-tick { opacity: 1; transform: none; }

/* Visibility: a box with its icon, name and a chevron. */
.ce-top { display: flex; justify-content: flex-end; }
.ce-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .7rem .42rem .75rem; border-radius: 10px;
  background: var(--ce-panel); border: 1px solid var(--mm-line-2);
  color: var(--mm-ink); font-weight: 600; font-size: .9rem; line-height: 1.2;
  transition: border-color .2s, background-color .2s;
}
.ce-pill:hover, .ce-menu[open] > .ce-pill { border-color: var(--mm-muted); background: var(--ce-panel-2); }
.ce-vis .ce-if-unlisted, .ce-vis .ce-if-private { display: none; }
.ce-vis:has(input[value="unlisted"]:checked) .ce-if-unlisted,
.ce-vis:has(input[value="private"]:checked) .ce-if-private { display: inline-block; }
.ce-vis:has(input[value="unlisted"]:checked) .ce-if-public,
.ce-vis:has(input[value="private"]:checked) .ce-if-public { display: none; }

/* Title and subtitle */
.ce-title, .ce-subtitle, .ce-row input, .ce-row textarea, .ce-slot-what input, .ce-slot-what textarea {
  width: 100%; padding-left: 0; padding-right: 0; border: 0; background: none; color: var(--mm-ink); font-family: var(--mm-font); resize: none;
}
.ce-title { padding: 0; overflow: hidden; font: 600 clamp(2rem, 4.2vw, 2.6rem)/1.2 var(--mm-font); letter-spacing: -.02em; }
.ce-subtitle { padding: 0 0 .35rem; font-size: 1.15rem; color: var(--mm-ink-2); }
.ce-title:focus, .ce-subtitle:focus, .ce-row input:focus, .ce-row textarea:focus, .ce-slot-what input:focus, .ce-slot-what textarea:focus { outline: none; }

/* A text field's label (as in the login dialog): in the field's own font
   where its text goes while it's empty, and small at the top while it's
   focused or filled. The field keeps room above its text for it (--fl-top),
   so the label never sits on the text or the caret. */
.ce-fl { position: relative; display: block; flex: 1; min-width: 0; --fl-top: .95rem; --fl-x: 0px; --fl-color: var(--mm-ink-2); }
.ce .ce-fl > input, .ce .ce-fl > textarea { padding-top: var(--fl-top); }
.ce-fl-label {
  position: absolute; top: var(--fl-top); left: var(--fl-x); right: var(--fl-x);
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: var(--fl-font); letter-spacing: var(--fl-ls, 0); color: var(--fl-color);
  transition: top .18s var(--ce-ease), font-size .18s var(--ce-ease), letter-spacing .18s, color .18s;
}
.ce-fl:focus-within > .ce-fl-label, .ce-fl > :not(:placeholder-shown) + .ce-fl-label {
  top: .15rem; font-size: .72rem; font-weight: 500; line-height: 1.2; letter-spacing: .04em; color: var(--mm-muted);
}
.ce-fl:focus-within > .ce-fl-label { color: var(--mm-gold-ink); }
/* (Up under the visibility button: the name's label, when it rises, sits at
   the left, clear of the button at the right.) */
.ce-fl--title { margin-top: -1.45rem; --fl-top: 1.3rem; --fl-font: 600 clamp(2rem, 4.2vw, 2.6rem)/1.2 var(--mm-font); --fl-ls: -.02em; --fl-color: var(--mm-muted); }
.ce-fl--title > .ce-fl-label { opacity: .75; }
.ce-fl--title:focus-within > .ce-fl-label, .ce-fl--title > :not(:placeholder-shown) + .ce-fl-label { opacity: 1; }
.ce-fl--sub { margin-top: -.6rem; --fl-top: .95rem; --fl-font: 400 1.15rem/normal var(--mm-font); --fl-color: var(--mm-muted); }
.ce-fl--row { --fl-font: 500 1rem/1.5 var(--mm-font); }
/* In a row, the resting label sits half the label's room lower than the box's
   top padding: the middle of a one-line box (and its icon with it). */
.ce-fl--row > .ce-fl-label { top: calc(var(--fl-top) / 2); }
.ce-fl--slot-title { --fl-top: .95rem; --fl-font: 600 1.1rem/1.45 var(--mm-font); --fl-color: var(--mm-ink-2); }
.ce-fl--slot { --fl-top: .9rem; --fl-font: 400 .85rem/1.5 var(--mm-font); --fl-color: var(--mm-muted); }
.ce-fl--caption { --fl-top: 1.3rem; --fl-x: 1rem; --fl-font: 500 .95rem/normal var(--mm-font); --fl-color: #8b8e93; }
.ce-fl--caption:focus-within > .ce-fl-label { color: var(--mm-gold-2); }
.ce-fl--caption > :not(:placeholder-shown) + .ce-fl-label { color: #8b8e93; }
.ce-title:user-invalid { box-shadow: inset 0 -2px 0 var(--mm-danger); }

/* Start, end and time zone. The date and time inputs are the browser's; a
   click anywhere on one opens its picker (the picker button covers it). */
.ce-when { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; gap: .6rem; }
.ce-when-rows { display: grid; gap: .3rem; padding: .35rem; border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line); }
.ce-when-row { display: grid; grid-template-columns: 1fr 10rem 7.5rem; gap: 2px; align-items: center; }
.ce-when-label { position: relative; display: flex; align-items: center; gap: .75rem; padding-left: .6rem; color: var(--mm-ink-2); font-weight: 500; }
.ce-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--mm-muted); }
.ce-dot--end { background: none; box-shadow: inset 0 0 0 1.5px var(--mm-muted); }
.ce-when-row:first-child .ce-dot::after { content: ""; position: absolute; left: calc(.6rem + .27rem - .5px); top: calc(50% + .45rem); height: 1.6rem; border-left: 1.5px dotted var(--mm-muted); }
.ce-cell {
  display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 2.4rem; padding: 0 .7rem;
  border: 0; background: var(--ce-panel-2); color: var(--mm-ink);
  font: 500 1rem var(--mm-font); font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s;
}
.ce-cell--date { border-radius: 9px 0 0 9px; }
.ce-cell--time { border-radius: 0 9px 9px 0; cursor: text; }
.ce-cell:hover, .ce-menu[open] > .ce-cell, .ce-time[data-open] > .ce-cell { background: color-mix(in srgb, var(--ce-panel-2) 80%, var(--mm-ink) 8%); }
.ce-cell:focus { outline: none; }
.ce-cell:focus-visible, .ce-time > .ce-cell:focus { box-shadow: inset 0 0 0 1.5px var(--mm-gold); }
.ce-cell:user-invalid, .ce-cell[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--mm-danger); }
.ce-date { min-width: 0; }

/* A date's calendar */
.ce-cal { width: 17.5rem; padding: .7rem; }
.ce-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.ce-cal-head strong { font-size: .95rem; }
.ce-cal-nav {
  display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 50%;
  background: none; color: var(--mm-ink-2); cursor: pointer; transition: background-color .15s;
}
.ce-cal-nav:hover { background: var(--ce-panel-2); }
.ce-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ce-cal-grid > span { padding: .25rem 0; color: var(--mm-muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.ce-cal-day {
  aspect-ratio: 1; border: 0; border-radius: 50%; background: none; color: var(--mm-ink);
  font: 500 .88rem var(--mm-font); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.ce-cal-day:hover { background: var(--ce-panel-2); }
.ce-cal-day:focus-visible { outline: 2px solid var(--mm-focus); outline-offset: -2px; }
.ce-cal-day.ce-out { color: var(--mm-muted); opacity: .55; }
.ce-cal-day.ce-today { box-shadow: inset 0 0 0 1.5px var(--mm-line-2); }
.ce-cal-day[aria-pressed="true"] { background: var(--mm-ink); color: var(--mm-bg); }

/* A time: typed, or picked from its list */
.ce-time { position: relative; min-width: 0; }
.ce-time > .ce-menu-list { display: none; }
.ce-time[data-open] > .ce-menu-list { display: block; animation: ce-menu-in .2s var(--ce-ease); }
.ce-time.ce-closing > .ce-menu-list { animation: ce-menu-out .14s ease-in forwards; }
.ce-time-list { width: 9.5rem; min-width: 0; max-height: 15rem; overflow-y: auto; padding: .3rem; left: auto; right: 0; transform-origin: top right; }
.ce-time-opt {
  display: block; width: 100%; padding: .45rem .7rem; border: 0; border-radius: 8px; background: none; text-align: left;
  color: var(--mm-ink); font: 500 .9rem var(--mm-font); font-variant-numeric: tabular-nums; cursor: pointer;
}
.ce-time-opt:hover, .ce-time-opt.ce-hl { background: var(--ce-panel-2); }
.ce-time-opt[aria-selected="true"] { background: var(--mm-gold-wash); font-weight: 600; }

.ce-tz > summary {
  display: grid; align-content: start; gap: .1rem; height: 100%;
  padding: .7rem .8rem; border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  color: var(--mm-ink-2); transition: border-color .2s, background-color .2s;
}
.ce-tz > summary:hover, .ce-tz[open] > summary { border-color: var(--mm-line-2); background: var(--ce-panel-2); }
.ce-tz > summary .mm-ico { margin-bottom: .45rem; color: var(--mm-muted); }
.ce-tz > summary strong { font-size: .9rem; }
.ce-tz > summary small { color: var(--mm-muted); font-size: .8rem; line-height: 1.3; }
.ce-tz-menu { width: 23rem; padding: 0; overflow: clip; }  /* (clip: a panel that can't be scrolled, even by focus) */
.ce-tz-search {
  display: block; width: 100%; padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--mm-line);
  background: none; color: var(--mm-ink); font: 500 .95rem var(--mm-font);
}
.ce-tz-search:focus { outline: none; }
.ce-tz-search::placeholder { color: var(--mm-muted); }
/* A list that scrolls with no scrollbar; its edges fade while there's more
   above or below (as the map's lists do). */
.ce-tz-list { max-height: 22rem; overflow-y: auto; padding: .3rem; }
.ce-scroll, .ce-tz-list {
  scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ce-ft), #000 calc(100% - var(--ce-fb)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ce-ft), #000 calc(100% - var(--ce-fb)), transparent 100%);
}
.ce-scroll::-webkit-scrollbar, .ce-tz-list::-webkit-scrollbar { display: none; }
@keyframes ce-fade-top { from { --ce-ft: 0px; } to { --ce-ft: 28px; } }
@keyframes ce-fade-bot { from { --ce-fb: 28px; } to { --ce-fb: 0px; } }
@supports (animation-timeline: scroll()) {
  .ce-scroll, .ce-tz-list { animation: ce-fade-top linear both, ce-fade-bot linear both; animation-timeline: scroll(self), scroll(self); animation-range: 0 28px, calc(100% - 28px) 100%; }
}
.ce-tz-opt {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; width: 100%;
  padding: .55rem .7rem; border: 0; border-radius: 9px; background: none; text-align: left;
  color: var(--mm-ink); font: 500 .92rem/1.35 var(--mm-font); cursor: pointer;
}
.ce-tz-opt small { color: var(--mm-muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ce-tz-opt:hover, .ce-tz-opt:focus-visible { background: var(--ce-panel-2); outline: none; }
.ce-tz-opt[aria-selected="true"] { background: var(--mm-gold-wash); }
.ce-tz-empty { padding: .8rem; color: var(--mm-muted); font-size: .9rem; }

/* A time's error (an end before its start, a time that isn't one), under
   its start and end. */
.ce-error { display: flex; align-items: center; gap: .4rem; margin: -.3rem 0 0 .25rem; color: var(--mm-danger); font-size: .85rem; font-weight: 500; animation: ce-menu-in .2s var(--ce-ease); }
.ce-error::before { content: "!"; display: grid; place-items: center; flex: none; width: 1rem; height: 1rem; border-radius: 50%; background: var(--mm-danger); color: var(--mm-bg); font-size: .7rem; font-weight: 700; }
/* A schedule item's problems: below its card, one under the other. */
.ce-slot-item { display: grid; gap: .45rem; }
.ce-slot-errors { display: grid; gap: .3rem; }
.ce-slot-errors:empty { display: none; }
.ce-slot-errors > .ce-error { margin: 0 0 0 .25rem; }
.ce-side-field > .ce-error { margin: -.1rem 0 0 .25rem; }
/* Needed fields left empty: red, with their message (create.js). */
.ce-title[aria-invalid="true"] { box-shadow: inset 0 -2px 0 var(--mm-danger); }
.ce-loc:has(input[name="location"][aria-invalid="true"]), .ce-details:has([aria-invalid="true"]), .ce-input[aria-invalid="true"] { border-color: var(--mm-danger); }

/* Location, summary, description */
.ce-row {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .5rem .9rem; border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  cursor: text; transition: border-color .2s, box-shadow .2s;
}
/* The icon in the middle of the label's line: half the label's room, then
   half of what the line (1.5rem) has over the icon (1.25em). */
.ce-row > .mm-ico, .ce-loc-main > .mm-ico { margin-top: calc(.95rem / 2 + (1.5rem - 1.25em) / 2); }
.ce-row > .mm-ico, .ce-loc-main > .mm-ico { color: var(--mm-muted); }

/* Location: the address a little larger, then its notes for getting there
   in rows like a schedule item's location and description: smaller, lighter,
   no lines between, each with its icon in the pin's column. The map's icons
   are black fills, so they're masks in the text's colour. */
.ce-loc { display: block; padding: 0; }
.ce-loc-main { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem .9rem 0; cursor: text; }
.ce-fl--loc { --fl-font: 500 1.1rem/1.5 var(--mm-font); }
.ce-loc .ce-fl--loc > input { font-size: 1.1rem; }
.ce-loc-main > .mm-ico { margin-top: calc(.95rem / 2 + (1.65rem - 1.25em) / 2); }
.ce-loc-more { display: grid; gap: .15rem; padding: .1rem .9rem .97rem; }  /* (under the last row, the space between rows) */
.ce-loc-sub { display: flex; align-items: flex-start; gap: .75rem; cursor: text; }
.ce-fl--more { --fl-top: .9rem; --fl-font: 400 .85rem/1.5 var(--mm-font); --fl-color: var(--mm-muted); }
.ce-loc .ce-fl--more > input { font-size: .85rem; font-weight: 400; line-height: 1.5; color: var(--mm-ink-2); }
/* The icon: the pin's width, on the text's line (under the label's room). */
.ce-ico { flex: none; display: grid; place-items: center; width: 1.25em; height: 1.275rem; margin-top: .9rem; color: var(--mm-muted); }
.ce-ico::before {
  content: ""; width: .95rem; height: .95rem; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.ce-loc-sub:focus-within .ce-ico { color: var(--mm-gold-ink); }
.ce-ico--note { --icon: url("/assets/img/icons/note.svg?v=9d16d8a8f37e"); }
.ce-ico--accessibility { --icon: url("/map-app/assets/icons/accessibility.svg"); }
.ce-ico--accessibility::before { width: 1.3rem; height: 1.3rem; }  /* (its drawing fills less of its box) */
.ce-ico--parking { --icon: url("/map-app/assets/icons/parking.svg"); }
.ce-ico--transit { --icon: url("/map-app/assets/icons/bus.svg"); }

.ce-row:focus-within { border-color: var(--mm-gold); box-shadow: 0 0 0 4px rgb(214 178 94 / .14); }
.ce-row:has(:user-invalid) { border-color: var(--mm-danger); }
.ce-row input, .ce-row textarea { flex: 1; min-width: 0; padding: 0; font-size: 1rem; font-weight: 500; line-height: 1.5; }
.ce-row input, .ce-row textarea { display: block; padding-bottom: 0; }  /* (inline, a textarea gets a line's descender below it) */


.ce-section { margin: 1.1rem 0 0; font: 600 .95rem var(--mm-font); color: var(--mm-ink-2); }
.ce-section span { margin-left: .35rem; color: var(--mm-muted); font-weight: 400; font-size: .82rem; }

/* Details: the summary (smaller, grey) and the description, each in its box. */
.ce-details {
  display: grid; padding: .45rem .9rem .6rem; border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  cursor: text; transition: border-color .2s, box-shadow .2s;
}
.ce-details:focus-within { border-color: var(--mm-gold); box-shadow: 0 0 0 4px rgb(214 178 94 / .14); }
.ce-details:has(:user-invalid) { border-color: var(--mm-danger); }
.ce .ce-details textarea { display: block; width: 100%; padding: var(--fl-top) 0 0; border: 0; background: none; resize: none; }
.ce-details textarea:focus { outline: none; }
.ce-fl--sum { --fl-top: .9rem; --fl-font: 400 .85rem/1.5 var(--mm-font); --fl-color: var(--mm-muted); }
.ce .ce-fl--sum > textarea { font: 400 .85rem/1.5 var(--mm-font); color: var(--mm-ink-2); }
.ce-fl--sum > .ce-fl-label, .ce-fl--desc > .ce-fl-label { top: calc(var(--fl-top) / 2); }  /* (resting, on the box's first line) */
.ce-fl--desc { --fl-top: .9rem; --fl-font: 500 1rem/1.5 var(--mm-font); --fl-color: var(--mm-ink-2); }
.ce .ce-fl--desc > textarea { min-height: calc(.9rem + 7.5em); font: 500 1rem/1.5 var(--mm-font); color: var(--mm-ink); }

/* Schedule: start and end on the left (their dates only when the event
   spans days), what happens on the right. */
.ce-schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ce-schedule:empty { display: none; }
.ce-slot {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem;
  padding: .8rem 2.6rem .8rem .8rem;
  border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  animation: ce-menu-in .22s var(--ce-ease);
}
.ce-slot:focus-within { border-color: var(--mm-gold); }
.ce-slot-when { display: grid; align-content: start; gap: 1rem; padding-top: .15rem; }
/* "Start" / "End" above their date and time, which fill the column. */
.ce-slot-when > div { display: grid; grid-template-columns: 6.25rem; align-items: center; gap: 2px; }
.ce-slot-when > div > span { grid-column: 1 / -1; margin: 0 0 .2rem .1rem; color: var(--mm-muted); font-size: .72rem; font-weight: 500; line-height: 1.2; letter-spacing: .04em; }
.ce-slot-when .ce-cell { height: 2.1rem; padding: 0 .5rem; font-size: .88rem; border-radius: 8px; }
.ce-slot-when .ce-date { display: none; }
.ce-form[data-multiday] .ce-slot-when > div { grid-template-columns: 7rem 5.75rem; }
.ce-form[data-multiday] .ce-slot-when .ce-date { display: block; }
.ce-form[data-multiday] .ce-slot-when .ce-cell--date { border-radius: 8px 0 0 8px; }
.ce-form[data-multiday] .ce-slot-when .ce-cell--time { border-radius: 0 8px 8px 0; }
.ce-slot-what { display: grid; align-content: start; gap: .15rem; }
.ce-slot .ce-slot-title { font-weight: 600; font-size: 1.1rem; line-height: 1.45; padding-bottom: .1rem; }
.ce-slot-what input[name="itinerary_location"], .ce-slot textarea { padding-bottom: .1rem; font-size: .85rem; line-height: 1.5; color: var(--mm-ink-2); }
.ce-slot-what :user-invalid { box-shadow: inset 0 -2px 0 var(--mm-danger); }
.ce-x {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; transition: background-color .15s, color .15s, transform .2s var(--ce-ease);
}
.ce-x .mm-ico { width: .95rem; height: .95rem; }
.ce-slot-remove { position: absolute; top: .55rem; right: .55rem; background: none; color: var(--mm-muted); }
.ce-slot-remove:hover { background: var(--ce-panel-2); color: var(--mm-danger); }
.ce-add, .ce-photo-add {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px dashed var(--mm-line-2); border-radius: 14px;
  background: none; color: var(--mm-ink-2); font: 500 .95rem var(--mm-font); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.ce-add { padding: .7rem; }
.ce-add:hover, .ce-photo-add:hover { border-color: var(--mm-gold); background: var(--mm-gold-wash); }

/* Links: per row, the kind (a menu button of a fixed width: its icon and
   name), the address in its own box, and the remove button after it. */
.ce-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ce-links:empty { display: none; }
.ce-link { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; animation: ce-menu-in .22s var(--ce-ease); }
.ce-link-kind { flex: none; width: 9.5rem; }
.ce-link-kind > summary {
  display: flex; height: 100%; width: 100%; padding: 0 .75rem; border-radius: 14px;
  white-space: nowrap; border-color: var(--ce-line);
}
.ce-link-kind > summary .ce-chev { margin-left: auto; }
.ce-kind-icon { display: inline-grid; color: var(--mm-muted); }
.ce-kind-icon .mm-ico { width: 1.05rem; height: 1.05rem; }
/* Five kinds in full, the sixth fading at the edge (the list scrolls). */
.ce-kind-list { --opt: 2.15rem; width: 100%; min-width: 100%; max-height: calc(.3rem + 5.5 * var(--opt)); overflow-y: auto; padding: .3rem; }
.ce-kind-opt {
  display: flex; align-items: center; gap: .65rem; width: 100%; height: var(--opt); padding: 0 .65rem;
  border: 0; border-radius: 8px; background: none; color: var(--mm-ink); font: 500 .92rem var(--mm-font); text-align: left; cursor: pointer;
}
.ce-kind-opt .mm-ico { width: 1.05rem; height: 1.05rem; color: var(--mm-muted); }
.ce-kind-opt:hover, .ce-kind-opt:focus-visible { background: var(--ce-panel-2); outline: none; }
.ce-kind-opt[aria-selected="true"] { background: var(--mm-gold-wash); }
.ce-link-box {
  flex: 1; min-width: 0; display: flex; align-items: center; padding: .45rem .9rem;
  border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line); cursor: text; transition: border-color .2s;
}
.ce-link-box:focus-within { border-color: var(--mm-gold); }
.ce-link-box:has([aria-invalid="true"]) { border-color: var(--mm-danger); }
.ce-fl--link { --fl-top: .9rem; --fl-font: 400 .95rem/1.5 var(--mm-font); }
.ce-fl--link > .ce-fl-label { top: calc(var(--fl-top) / 2); }
.ce .ce-fl--link > input { display: block; width: 100%; padding: var(--fl-top) 0 0; border: 0; background: none; color: var(--mm-ink); font: 400 .95rem/1.5 var(--mm-font); }
.ce-fl--link > input:focus { outline: none; }
.ce-link-remove { flex: none; align-self: center; background: none; color: var(--mm-muted); }
/* A link's problem: under its address box (past the kind button). */
.ce-link > .ce-error { flex: 0 0 100%; margin: 0; padding-left: calc(9.5rem + .5rem + .25rem); box-sizing: border-box; }
.ce-link-remove:hover { background: var(--ce-panel-2); color: var(--mm-danger); }

/* FAQs: a box per question, its question and answer alike (no line
   between them), the x at its corner. */
.ce-faqs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ce-faqs:empty { display: none; }
.ce-faq {
  position: relative; display: grid; gap: .15rem; padding: .45rem 2.6rem .55rem .9rem;
  border-radius: 14px; background: var(--ce-panel); border: 1px solid var(--ce-line);
  animation: ce-menu-in .22s var(--ce-ease); transition: border-color .2s;
}
.ce-faq:focus-within { border-color: var(--mm-gold); }
.ce-faq:has([aria-invalid="true"]) { border-color: var(--mm-danger); }
.ce-fl--faq { --fl-top: .9rem; --fl-font: 500 .95rem/1.5 var(--mm-font); }
.ce .ce-fl--faq > input, .ce .ce-fl--faq > textarea {
  display: block; width: 100%; padding: var(--fl-top) 0 0; border: 0; background: none; resize: none;
  color: var(--mm-ink); font: 500 .95rem/1.5 var(--mm-font);
}
.ce-fl--faq > :focus { outline: none; }
/* Resting labels on their lines (no extra room above the question); the
   answer about three lines tall. */
.ce-fl--faq > .ce-fl-label { top: calc(var(--fl-top) / 2); }
.ce .ce-fl--faq > textarea { min-height: calc(.9rem + 4.5em); }
.ce-faq-remove { position: absolute; top: .55rem; right: .55rem; background: none; color: var(--mm-muted); }
.ce-faq-remove:hover { background: var(--ce-panel-2); color: var(--mm-danger); }
.ce-faq-item { display: grid; gap: .45rem; }
.ce-faq-item > .ce-error { margin: 0 0 0 .25rem; }

/* Photos: each opens big on click; the x removes it. */
.ce-photos { --ce-tile: 7.5rem; display: grid; grid-template-columns: repeat(auto-fill, var(--ce-tile)); grid-auto-rows: var(--ce-tile); gap: .5rem; }
.ce-photo-list { display: contents; list-style: none; }
.ce-photo { position: relative; animation: ce-menu-in .22s var(--ce-ease); }
.ce-photo-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--ce-panel); cursor: zoom-in; }
.ce-photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ce-ease); }
.ce-photo-open:hover img { transform: scale(1.04); }
.ce-photo-open:focus-visible { outline: 2px solid var(--mm-focus); outline-offset: 2px; }
.ce-photo .ce-x { position: absolute; top: .35rem; right: .35rem; background: rgb(15 14 12 / .72); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ce-photo .ce-x:hover { background: var(--mm-danger); transform: scale(1.08); }
.ce-photo-add { position: relative; flex-direction: column; font-size: .88rem; }
.ce-photo-add svg { width: 1.6rem; height: 1.6rem; }
/* No photos yet: the button spans the row, at a tile's height. */
.ce-photos:has(.ce-photo-list:empty) { grid-template-columns: 1fr; }
.ce-photo-add:focus-within { outline: 2px solid var(--mm-focus); outline-offset: 2px; }

/* Theme preview: the theme's page in a frame. */
/* Wide enough for the designs' desktop layout (theirs starts above 1100px). */
.ce-preview {
  width: min(1140px, calc(100vw - 2rem)); height: min(46rem, calc(100dvh - 4rem)); max-height: none; padding: 0; border: 1px solid var(--mm-line-2); border-radius: 18px;
  background: var(--mm-surface); color: var(--mm-ink); overflow: hidden; box-shadow: var(--mm-shadow-lg);
}
.ce-preview[open] { display: flex; flex-direction: column; animation: ce-menu-in .28s var(--ce-ease); }
.ce-preview::backdrop { background: rgb(10 10 12 / .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ce-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .7rem .6rem 1.1rem; border-bottom: 1px solid var(--mm-line); }
.ce-preview-head p { margin: 0; display: flex; align-items: baseline; gap: .6rem; }
.ce-preview-head span { color: var(--mm-muted); font-size: .85rem; }
.ce-preview .ce-preview-close { position: static; }
.ce-preview iframe { flex: 1; width: 100%; border: 0; background: var(--mm-bg); }

/* Photo popup (as the event pages show photos). */
.ce-lightbox {
  width: var(--ce-popup); max-height: calc(100dvh - 4rem); padding: 0; border: 0; border-radius: 18px;
  background: #0d0e0f; color: #f3f4f5; overflow: hidden; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .7);
}
.ce-lightbox[open] { animation: ce-menu-in .3s var(--ce-ease); }
.ce-lightbox::backdrop { background: rgb(10 10 12 / .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ce-lightbox img { display: block; width: 100%; height: min(26rem, calc(100dvh - 10rem)); object-fit: contain; background: #000; }
.ce-lb-caption {
  display: block; width: 100%; padding: .85rem 1rem .6rem; border: 0; border-top: 1px solid rgb(255 255 255 / .08);
  background: #141516; color: #f3f4f5; font: 500 .95rem var(--mm-font);
}

.ce-lb-caption:focus { outline: none; background: #1a1b1d; }
.ce-lb-btn {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border: 0; border-radius: 50%; background: rgb(0 0 0 / .5); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .2s, transform .2s var(--ce-ease);
}
.ce-lb-btn:hover { background: rgb(0 0 0 / .75); transform: scale(1.06); }
.ce-lb-close { top: .75rem; right: .75rem; }
.ce-lb-prev, .ce-lb-next { top: min(13rem, calc(50dvh - 5rem)); margin-top: -1.2rem; }
.ce-lb-prev { left: .75rem; }
.ce-lb-next { right: .75rem; }

.ce-submit {
  margin-top: 1.5rem; padding: .9rem; border: 0; border-radius: 12px;
  background: var(--mm-ink); color: var(--mm-bg); font: 600 1.05rem var(--mm-font); cursor: pointer;
  transition: transform .18s var(--ce-ease), opacity .2s;
}
.ce-submit:hover { transform: translateY(-1px); }
.ce-submit:disabled { opacity: .6; cursor: default; transform: none; }

@media (max-width: 820px) {
  .ce { padding-top: 1.5rem; }
  .ce-form { grid-template-columns: 1fr; gap: 1.5rem; }
  .ce-side { position: static; max-width: 24rem; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .ce { padding-left: 1rem; padding-right: 1rem; }
  .ce-when { grid-template-columns: 1fr; }
  .ce-when-row { grid-template-columns: 4.5rem 1fr 6.5rem; }
  .ce-cell { padding: 0 .3rem; font-size: .95rem; }
  .ce-tz > summary { grid-template-columns: auto auto 1fr; align-items: center; gap: .5rem; }
  .ce-tz > summary .mm-ico { margin: 0; }
  .ce-tz-menu { width: calc(100vw - 2rem); }
  .ce-slot { grid-template-columns: 1fr; gap: .5rem; }
  .ce-preview { height: calc(100dvh - 2rem); }
}
@media (prefers-reduced-motion: reduce) {
  .ce-menu-list, .ce-slot, .ce-photo, .ce-lightbox, .ce-preview { animation: none !important; }
}
