/* Open Calendar: a shared wall planner where everyone writes in their own marker colour. */

@font-face {
  font-family: "Commissioner";
  src: url("/static/fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Commissioner";
  src: url("/static/fonts/commissioner-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("/static/fonts/commissioner-greek-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Big Shoulders";
  src: url("/static/fonts/big-shoulders-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page: #EDF1F6;      /* planner board */
  --paper: #FFFFFF;     /* the sheet */
  --ink: #1B2B4B;       /* navy pen ink: text and primary actions */
  --ink-2: #4E5F7A;     /* secondary text */
  --ink-3: #8A98AD;     /* days outside the month */
  --rule: #CCD6E2;      /* grid lines */
  --rule-soft: #E2E8F0;
  --weekend: #F5F7FB;
  --red: #D92D20;       /* today's circle, deleting */
  --red-soft: #FBE3E1;
  --focus: #2F62D9;

  --font-ui: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Big Shoulders", "Commissioner", system-ui, sans-serif;

  --r-chip: 4px;
  --r-control: 8px;
  --r-sheet: 14px;
  --r-dialog: 18px;
}

/* Marker colours: one per author, so you can see at a glance who wrote what. */
.mk-0 { --mk-bg: #DCE7FF; --mk-bar: #2F62D9; --mk-text: #15336F; }
.mk-1 { --mk-bg: #D7F1E1; --mk-bar: #1E8A4C; --mk-text: #10472A; }
.mk-2 { --mk-bg: #FFE3CA; --mk-bar: #D9640F; --mk-text: #6E3106; }
.mk-3 { --mk-bg: #EBE1FF; --mk-bar: #7445D6; --mk-text: #3A1F78; }
.mk-4 { --mk-bg: #FFDCE8; --mk-bar: #C92A62; --mk-text: #721535; }
.mk-5 { --mk-bg: #D1EFEF; --mk-bar: #0E8C8C; --mk-text: #0A4646; }
.mk-6 { --mk-bg: #FFF0B3; --mk-bar: #C29400; --mk-text: #5A4400; }
.mk-7 { --mk-bg: #E6E9EF; --mk-bar: #5B6475; --mk-text: #262C37; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

a { color: var(--focus); }

/* ------------------------------------------------------------------ top bar */

.topbar { padding: 14px 24px 0; }
.topbar-inner {
  max-width: 1192px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.005em;
}
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { flex: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* ------------------------------------------------------------------ buttons */

.btn {
  font: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border-radius: var(--r-control); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2A3F68; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--paper); border-color: #B3C0D1; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #B42318; }
.btn-danger-quiet { background: transparent; color: var(--red); border-color: #F0C4BF; }
.btn-danger-quiet:hover { background: var(--red-soft); }
.btn-wide { width: 100%; }

.icon-btn {
  flex: none; display: inline-grid; place-items: center;
  width: 38px; height: 38px; margin: -6px -8px 0 0;
  border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { background: var(--page); color: var(--ink); }

.link-btn {
  font: inherit; font-weight: 600; color: var(--focus);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* account button + menu */
.account-area { position: relative; }
.account-btn {
  font: inherit; display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 10px 0 5px;
  border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink);
  cursor: pointer; font-weight: 600; font-size: 0.9375rem;
}
.account-btn:hover { background: var(--paper); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--mk-bg); color: var(--mk-text); box-shadow: inset 0 0 0 2px var(--mk-bar);
  font-size: 0.8125rem; font-weight: 700;
}
.account-btn .caret { color: var(--ink-2); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 230px; padding: 6px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 16px 40px -16px rgba(20, 36, 66, 0.35);
}
.menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--rule-soft); margin-bottom: 4px; }
.menu-head strong { display: block; font-size: 0.9375rem; }
.menu-head span { font-size: 0.8125rem; color: var(--ink-2); }
.menu-item {
  font: inherit; font-size: 0.9375rem; width: 100%; text-align: left;
  display: block; padding: 10px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--page); outline: none; }
.menu-item.danger { color: var(--red); }
.badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 0.6875rem; font-weight: 700; vertical-align: 2px;
}

/* ------------------------------------------------------------------ page + calendar head */

.page { max-width: 1240px; margin: 0 auto; padding: 8px 24px 40px; }

.cal-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  flex-wrap: wrap; margin: 18px 0 16px;
}
.cal-title {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72;
  font-weight: 800;
  font-size: clamp(2.75rem, 3.2vw + 1.6rem, 4.75rem);
  line-height: 0.88;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.cal-controls { display: flex; gap: 10px; flex-wrap: wrap; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
}
.seg-btn {
  font: inherit; font-weight: 600; font-size: 0.875rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; min-width: 36px; padding: 0 12px;
  border: 0; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer;
}
.seg-btn:hover { background: var(--page); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
#prev-btn, #next-btn { padding: 0; }
.seg-icon { display: inline-grid; place-items: center; padding: 0 3px 0 7px; color: var(--ink-2); }

/* A segmented control made of radio buttons (the time zone of an entry). */
.seg-radio .seg-btn { position: relative; }
.seg-radio input {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer;
}
.seg-radio .seg-btn:has(input:checked) { background: var(--ink); color: #fff; }
.seg-radio .seg-btn:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ the sheet (FullCalendar) */

.calendar-wrap {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-sheet);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(27, 43, 75, 0.04), 0 18px 40px -30px rgba(27, 43, 75, 0.45);
}

.fc {
  --fc-border-color: var(--rule-soft);
  --fc-page-bg-color: var(--paper);
  --fc-neutral-bg-color: var(--weekend);
  --fc-neutral-text-color: var(--ink-2);
  --fc-today-bg-color: #FFF8F7;
  --fc-highlight-color: rgba(47, 98, 217, 0.12);
  --fc-now-indicator-color: var(--red);
  --fc-list-event-hover-bg-color: #F4F7FB;
  --fc-more-link-bg-color: transparent;
  --fc-more-link-text-color: var(--ink-2);
  --fc-small-font-size: 0.8125rem;
  font-family: var(--font-ui);
  color: var(--ink);
}
.fc-theme-standard .fc-scrollgrid { border: 0; }
.fc-theme-standard td, .fc-theme-standard th { border-color: var(--rule-soft); }

/* weekday headings */
.fc .fc-col-header-cell { background: var(--paper); }
.fc .fc-col-header-cell-cushion {
  display: block; padding: 10px 10px 8px; text-align: left;
  font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.fc .fc-dayGridMonth-view .fc-col-header-cell { text-align: left; }

/* day cells */
.fc .fc-daygrid-day.fc-day-sat, .fc .fc-daygrid-day.fc-day-sun,
.fc .fc-timegrid-col.fc-day-sat, .fc .fc-timegrid-col.fc-day-sun { background: var(--weekend); }
.fc .fc-daygrid-day.fc-day-today, .fc .fc-timegrid-col.fc-day-today { background: var(--fc-today-bg-color); }
.fc .fc-dayGridMonth-view .fc-daygrid-day-frame { min-height: 118px; }
.fc .fc-daygrid-day-frame, .fc .fc-timegrid-slot-lane { cursor: cell; }
.fc .fc-daygrid-day-top { flex-direction: row; padding: 8px 8px 2px; }
.fc .fc-daygrid-day-number {
  position: relative;
  padding: 0 2px;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72;
  font-weight: 750;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.fc .fc-day-other .fc-daygrid-day-number { color: var(--ink-3); font-weight: 600; }
.fc .fc-day-other .fc-daygrid-day-top { opacity: 1; }

/* today: circled with the red marker */
.fc .fc-day-today .fc-daygrid-day-number { color: var(--red); }
.fc .fc-day-today .fc-daygrid-day-number::before {
  content: "";
  position: absolute; inset: -7px -9px -6px -9px;
  border: 2.5px solid var(--red);
  border-radius: 52% 46% 55% 44% / 58% 44% 56% 42%;
  transform: rotate(-9deg);
  pointer-events: none;
}

/* entries: highlighter-marker chips */
.fc .fc-h-event, .fc .fc-v-event {
  background: var(--mk-bg, #E6E9EF);
  border: 0;
  border-left: 4px solid var(--mk-bar, #5B6475);
  border-radius: var(--r-chip);
}
.fc .fc-h-event .fc-event-main, .fc .fc-v-event .fc-event-main { color: var(--mk-text, #262C37); }
.fc .fc-daygrid-event { margin: 1px 6px 3px; font-size: 0.8125rem; line-height: 1.35; cursor: pointer; }
.fc .fc-daygrid-block-event .fc-event-time,
.fc .fc-daygrid-block-event .fc-event-title { padding: 2px 3px; }
.fc .fc-daygrid-block-event .fc-event-time { font-weight: 700; padding-right: 0; font-variant-numeric: tabular-nums; }
.fc .fc-event-title { font-weight: 550; }
.fc .fc-h-event:not(.fc-event-start) { border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fc .fc-h-event:not(.fc-event-end) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fc .fc-event:hover { box-shadow: 0 0 0 1px var(--mk-bar, #5B6475); }
.fc .fc-event:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; box-shadow: none; }
.fc .fc-event.fc-event-mirror { opacity: 0.8; }

.fc .fc-daygrid-more-link { margin: 0 6px; padding: 1px 4px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.fc .fc-daygrid-more-link:hover { background: var(--page); color: var(--ink); }
.fc .fc-popover { border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; box-shadow: 0 16px 40px -16px rgba(20, 36, 66, 0.35); }
.fc .fc-popover-header { background: var(--page); padding: 8px 10px; font-weight: 600; }

/* week view */
.fc .fc-timegrid-slot { height: 2.6em; }
.fc .fc-timegrid-slot-label-cushion, .fc .fc-timegrid-axis-cushion {
  font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.fc .fc-timeGridWeek-view .fc-col-header-cell-cushion { text-align: center; }
.fc .fc-timegrid-event { box-shadow: 0 0 0 1px var(--paper); cursor: pointer; }
.fc .fc-timegrid-event .fc-event-main { padding: 3px 5px; font-size: 0.8125rem; }
.fc .fc-timegrid-event .fc-event-time { font-weight: 700; }

/* entry content: both start times above the title */
.fc .ev { display: block; min-width: 0; padding: 2px 4px 3px; color: var(--mk-text, #262C37); }
.fc .ev-times {
  display: flex; flex-wrap: wrap; column-gap: 9px;
  font-size: 0.75rem; line-height: 1.3; font-variant-numeric: tabular-nums;
}
.fc .ev-t { white-space: nowrap; }
.fc .ev-t b { font-weight: 750; }
.fc .ev-z { font-weight: 550; opacity: 0.78; }
.fc .ev-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  white-space: normal; overflow-wrap: anywhere; font-weight: 550;
}
.fc .fc-timegrid-event .ev { padding: 0; }
.fc .fc-timegrid-event .ev-title { -webkit-line-clamp: 4; }

/* list view */
.fc .fc-list { border: 0; }
.fc .fc-list-table td { padding: 12px 16px; }
.fc .fc-list-day-cushion { background: var(--page) !important; padding: 9px 16px !important; }
.fc .fc-list-day-text, .fc .fc-list-day-side-text { color: var(--ink); font-weight: 700; text-decoration: none; }
.fc .fc-list-event { cursor: pointer; }
/* each row carries its own times (both zones) and colour bar */
.fc .fc-list-event-graphic { display: none; }
.fc .fc-list-event-title { width: 100%; }
.fc .lv-row { display: grid; grid-template-columns: 11.5rem 6px minmax(0, 1fr); gap: 14px; align-items: start; }
.fc .lv-when { display: grid; gap: 1px; font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fc .lv-t b { font-weight: 650; color: var(--ink); }
.fc .lv-t:first-child b { font-weight: 750; }
.fc .lv-bar { align-self: stretch; min-height: 1.4em; border-radius: 3px; background: var(--mk-bar, #5B6475); }
.fc .lv-title { display: block; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fc .lv-main .by { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--ink-2); }
.fc .fc-list-empty { background: var(--paper); }
.fc .fc-list-empty-cushion { margin: 56px 16px; color: var(--ink-2); }

.footnote { margin: 14px 2px 0; font-size: 0.875rem; color: var(--ink-2); max-width: 70ch; }

/* ------------------------------------------------------------------ dialogs */

.dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: var(--r-dialog);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 28px 70px -20px rgba(16, 31, 61, 0.45), 0 0 0 1px rgba(16, 31, 61, 0.06);
}
.dialog-wide { width: min(680px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(21, 33, 58, 0.48); }
.dialog[open] { animation: dialog-in 160ms ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }

.dialog-body { display: grid; gap: 16px; padding: 22px 24px 24px; }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; }
.dialog-head h2 { flex: 1; margin: 0; font-size: 1.375rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.lede { margin: -4px 0 0; color: var(--ink-2); }
.stack { display: grid; gap: 16px; }
.switch { margin: 0; text-align: center; color: var(--ink-2); font-size: 0.9375rem; }

/* fields */
.field { display: grid; gap: 6px; }
.label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.opt { font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.hint { font-size: 0.8125rem; color: var(--ink-2); margin: 0; }
input, textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  width: 100%; min-height: 44px; padding: 9px 12px;
  background: var(--paper); border: 1px solid #C2CDDB; border-radius: var(--r-control);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:hover, textarea:hover { border-color: #9FAEC2; }
input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(47, 98, 217, 0.3); outline-offset: 0; border-color: var(--focus); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
.form-error { margin: 0; color: #B42318; font-weight: 600; font-size: 0.9375rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.when { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.when legend { padding: 0; margin-bottom: 6px; }
.when-grid { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 9rem; gap: 8px 10px; align-items: center; }
.when-label { font-size: 0.875rem; color: var(--ink-2); }
.tz-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 4px; }
.tz-hint { color: var(--ink); font-weight: 550; }

/* entry details */
.swatch {
  flex: none; width: 10px; align-self: stretch; min-height: 28px; border-radius: 3px;
  background: var(--mk-bar, var(--ink-3));
}
.facts { margin: 0; display: grid; gap: 8px; }
.facts > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 12px; }
.facts dt { color: var(--ink-2); font-size: 0.875rem; padding-top: 1px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.when-line { display: block; font-variant-numeric: tabular-nums; }
.when-line + .when-line { margin-top: 2px; }
.when-line .zone-name { font-weight: 400; color: var(--ink-2); }
.details-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; max-height: 40vh; overflow: auto; }
.details-text:empty { display: none; }
.byline {
  margin: 0; padding-top: 12px; border-top: 1px solid var(--rule-soft);
  font-size: 0.875rem; color: var(--ink-2);
}
.byline strong { color: var(--ink); }
.confirm { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--red-soft); }
.confirm p { margin: 0; font-weight: 600; color: #7A1D15; }

/* admin: recent list */
.feed-status {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--page); color: var(--ink-2); font-size: 0.875rem;
}
.feed-status.bad { background: var(--red-soft); color: #7A1D15; font-weight: 600; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.recent-item {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 12px; align-items: stretch;
  padding: 10px 12px; border: 1px solid var(--rule-soft); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.recent-item:hover { border-color: var(--rule); background: #FAFBFD; }
.recent-item .bar { border-radius: 3px; background: var(--mk-bar); }
.recent-item strong { display: block; overflow-wrap: anywhere; }
.recent-item span { display: block; font-size: 0.8125rem; color: var(--ink-2); }
.empty { color: var(--ink-2); padding: 24px 0; text-align: center; }

/* toasts */
/* The toast area is a manual popover, so it sits above open dialogs. */
.toasts {
  position: fixed; inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%; transform: translateX(-50%);
  margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible;
  width: max-content; max-width: calc(100vw - 24px); height: auto;
  z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 11px 18px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9375rem;
  box-shadow: 0 12px 30px -12px rgba(16, 31, 61, 0.6);
  animation: toast-in 180ms ease-out;
}
.toast.error { background: #8F1D14; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 720px) {
  .topbar { padding: 12px 14px 0; }
  .page { padding: 4px 14px 28px; }
  .cal-head { margin: 12px 0; align-items: flex-start; flex-direction: column; }
  .cal-controls { width: 100%; justify-content: space-between; }
  .account-btn .name, .account-btn .caret { display: none; }
  .account-btn { padding: 0 4px; }
  .fc .fc-dayGridMonth-view .fc-daygrid-day-frame { min-height: 84px; }
  .fc .fc-daygrid-day-number { font-size: 1.2rem; }
  .fc .fc-daygrid-event { margin: 1px 2px 2px; font-size: 0.75rem; }
  .fc .fc-daygrid-block-event .fc-event-time { display: none; }
  .fc .fc-dayGridMonth-view .ev-times { display: none; }
  .fc .fc-dayGridMonth-view .ev { padding: 1px 3px; }
  .fc .fc-dayGridMonth-view .ev-title { overflow-wrap: normal; } /* narrow days: break between words only */
  .fc .fc-list-table td { padding: 11px 12px; }
  .fc .lv-row { grid-template-columns: 8.25rem 5px minmax(0, 1fr); gap: 10px; }
  .fc .lv-when { font-size: 0.8125rem; }
}

@media (max-width: 560px) {
  .dialog, .dialog-wide {
    width: 100%; max-width: 100%;
    margin: auto 0 0; max-height: 92dvh;
    border-radius: var(--r-dialog) var(--r-dialog) 0 0;
  }
  .dialog-body { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .when-grid { grid-template-columns: 3rem minmax(0, 1fr) 7.5rem; gap: 8px; }
  .brand span { max-width: 38vw; }
  #add-btn span { display: none; }
  #add-btn { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dialog[open], .toast { animation: none; }
  .btn { transition: none; }
}
