/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright © 2026 Marcel Rymenhout and IniqDash contributors */
/* ==========================================================================
   Calendar / Event Widget V1 — widget-specific CSS only (theme from assets/css/tokens.css).

   Identity: a small calendar leaf (month band + today's date), the next event as the hero with an
   accent rail (live events glow), then a quiet agenda: time column + title/place, and "+N more".

   Arrangements (container "ca" = the widget's own box):
     compact   < 260px   leaf + calendar, then the next event only
     standard  260–479   next event + the following one(s) when the height allows
     wide     >= 480px   next event on the left, agenda list on the right
   ========================================================================== */

.ca {
  position: relative;
  container: ca / size;
  min-width: 0;
  min-height: 92px;
  overflow: hidden;
  border-radius: var(--radius-device);
  color: var(--text-primary);
  font-family: var(--font);
  background: var(--device-surface);
  box-shadow: var(--device-shadow);
}
.ca__in {
  height: 100%;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "head" "legend" "next" "list" "more";
  row-gap: 7px;
}

/* ---- header: leaf + calendar name ---- */
.ca__head { grid-area: head; display: flex; align-items: center; gap: 9px; min-width: 0; }
.ca__leaf {
  flex: none;
  width: 32px;
  height: 34px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-tertiary);
  box-shadow: var(--shadow-icon), 0 0 0 1px var(--border-subtle);
  text-align: center;
}
.ca__leaf-m { display: block; padding: 1px 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.15; text-transform: uppercase; color: var(--page-bg); background: var(--accent); }
.ca__leaf-d { flex: 1; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ca__cal { display: flex; flex-direction: column; min-width: 0; }
.ca__cal-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__cal-day { font-size: 11px; line-height: 1.25; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- the next event ---- */
.ca__next { grid-area: next; position: relative; min-width: 0; padding-left: 11px; }
.ca__next::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--accent); }
.ca[data-live="true"] .ca__next::before { box-shadow: 0 0 8px var(--accent-line); }
.ca__when { margin: 0; font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__title { margin: 1px 0 0; font-size: 14.5px; font-weight: var(--iq-fw-title); line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word; }
.ca__where { margin: 1px 0 0; font-size: 12px; line-height: 1.3; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__where[hidden] { display: none; }
.ca__empty { margin: 0; font-size: 13px; color: var(--text-muted); }
.ca__next:has(.ca__empty)::before { background: var(--border-primary); }
.ca[data-state="unavailable"] .ca__leaf { opacity: var(--unavailable-opacity); filter: grayscale(1); }

/* ---- agenda list ---- */
.ca__list { grid-area: list; display: none; margin: 0; padding: 0; list-style: none; overflow: hidden; min-height: 0; }
.ca__row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px solid var(--border-subtle); font-size: 12px; line-height: 1.3; }
.ca__row[hidden] { display: none; }
.ca__row-t { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca__row-x { display: flex; flex-direction: column; min-width: 0; }
.ca__row-x b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__row-x span { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__row-x span:empty { display: none; }
.ca__more { grid-area: more; display: none; margin: 0; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.ca__more[hidden] { display: none; }

/* ---------------------------------------------------------------- standard: 260–479px */
@container ca (min-width: 260px) {
  .ca__in { padding: 14px 18px; }
  .ca__title { font-size: 16px; }
  .ca__list { display: block; }
  .ca__more { display: block; }
}

/* ---------------------------------------------------------------- wide: ≥ 480px */
@container ca (min-width: 480px) {
  .ca__in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head list" "legend list" "next list" ". more";
    column-gap: 22px;
  }
  .ca__next { align-self: start; }
  .ca__title { font-size: 18px; -webkit-line-clamp: 3; }
  .ca__list { border-left: 1px solid var(--border-subtle); padding-left: 18px; }
  .ca__row:first-child { border-top: 0; padding-top: 0; }
  .ca__more { padding-left: 19px; }
}

/* ---------------------------------------------------------------- own size (height too)
   narrow but tall: the agenda list appears under the next event as soon as there is room
   (rows that do not fit completely are hidden and counted, as everywhere — calendar.js fit()) */
@container ca (max-width: 259px) and (min-height: 220px) {
  .ca__list { display: block; }
  .ca__more { display: block; }
  .ca__row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
}
/* a long strip: the agenda runs in columns beside the next event instead of a clipped list */
@container ca (min-width: 720px) and (max-height: 239px) {
  .ca__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: max-content; column-gap: 16px; align-content: start; }
  .ca__row, .ca__row:first-child { border-top: 0; padding-top: 0; }
}
/* large: the next event reads from further away */
@container ca (min-height: 300px) and (min-width: 260px) {
  .ca__title { font-size: clamp(16px, 4.6cqmin, 22px); }
  .ca__when { font-size: clamp(11.5px, 3cqmin, 13.5px); }
  .ca__row { padding: 8px 0; font-size: 12.5px; }
}

/* ==========================================================================
   V2 — several calendars, views, navigation, details (see calendar.js)
   ========================================================================== */
.ca__body { display: contents; }
.ca__body[hidden] { display: none; }
.ca__head { position: relative; }
.ca__cal { flex: 1; }
.ca__nav { display: flex; gap: 4px; flex: none; }
.ca__nav[hidden] { display: none; }
.ca__navb { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-tertiary); color: var(--text-secondary); font: 600 12px/1 var(--font); cursor: pointer; }
.ca__navb:hover { color: var(--text-primary); border-color: var(--border-primary); }
.ca__navb:disabled { opacity: .45; cursor: default; }
.ca__navb:focus-visible, .ca__chip:focus-visible, .ca__ev:focus-visible, .ca__hero:focus-visible, .ca__blk:focus-visible, .ca__mo-ev:focus-visible, .ca__chipev:focus-visible, .ca__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* the calendars (legend): a tap shows / hides one on this screen */
.ca__legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ca__legend[hidden] { display: none; }
.ca__chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px 3px 6px; border: 1px solid var(--border-subtle); border-radius: 999px; background: transparent; color: var(--text-secondary); font: 600 11px/1.2 var(--font); cursor: pointer; }
.ca__chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.ca__chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__chip[aria-pressed="false"] { opacity: .5; }
.ca__chip[aria-pressed="false"] i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.ca__chip[data-ok="false"] { color: var(--text-muted); border-style: dashed; }

/* events are buttons (details on tap) and carry their calendar's colour */
.ca__hero, .ca__ev { all: unset; cursor: pointer; display: inline; overflow-wrap: anywhere; }
.ca__row-x b .ca__ev { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__next::before { background: var(--c, var(--accent)); }
.ca__when { color: var(--c, var(--accent)); }
.ca__row { position: relative; }
.ca__row-t { box-shadow: inset 3px 0 0 var(--c, transparent); padding-left: 6px; }

/* the other views share one area */
.ca__grid { grid-area: list; min-height: 0; overflow: hidden; position: relative; }
.ca[data-view]:not([data-view="agenda"]) .ca__in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head" "legend" "list"; }
.ca__grid[hidden] { display: none; }

/* LIST */
.ca__days { height: 100%; overflow-y: auto; scrollbar-width: thin; }
.ca__day h4 { margin: 8px 0 3px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ca__day h4[data-today="true"] { color: var(--accent); }
.ca__day:first-child h4 { margin-top: 0; }
.ca__day ul { margin: 0; padding: 0; list-style: none; }
.ca__lrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 8px; padding: 5px 0 5px 8px; border-left: 3px solid var(--c); margin: 3px 0; font-size: 12.5px; line-height: 1.3; }
.ca__lt { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ca__lrow .ca__ev { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__lw { grid-column: 2; color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* DAY / WEEK: all-day row, hours, events placed by time; overlapping ones share the width */
.ca__tg { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); --hw: 40px; }
.ca__tg-head, .ca__tg-all, .ca__tg-body { display: grid; grid-template-columns: var(--hw) repeat(var(--cols), minmax(0, 1fr)); }
.ca__tg-d { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-align: center; padding-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__tg-d[data-today="true"] { color: var(--accent); }
.ca__tg-all { border-bottom: 1px solid var(--border-subtle); padding-bottom: 3px; }
.ca__tg-alll { font-size: 9.5px; color: var(--text-muted); align-self: center; }
.ca__tg-ad { display: flex; flex-direction: column; gap: 2px; padding: 0 1px; min-width: 0; }
.ca__chipev, .ca__mo-ev { all: unset; cursor: pointer; display: block; font-size: 10.5px; font-weight: 600; line-height: 1.35; padding: 1px 5px; border-radius: 4px; color: var(--text-primary); background: color-mix(in srgb, var(--c) 28%, transparent); box-shadow: inset 2px 0 0 var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__tg-body { position: relative; min-height: 0; }
.ca__tg-hours { position: relative; }
.ca__tg-hours span { position: absolute; right: 6px; transform: translateY(-1px); font-size: 9.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ca__tg-col { position: relative; border-left: 1px solid var(--border-subtle); background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px); background-size: 100% calc(100% / var(--hrs, 15)); }
.ca__tg-col[data-today="true"] { background-color: color-mix(in srgb, var(--accent) 6%, transparent); }
.ca__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.ca__blk { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; padding: 2px 4px; border-radius: 5px; overflow: hidden; background: color-mix(in srgb, var(--c) 30%, var(--surface-tertiary)); border-left: 3px solid var(--c); font-size: 10.5px; line-height: 1.25; color: var(--text-primary); }
.ca__blk b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca__blk small { display: block; font-size: 9.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* MONTH */
.ca__mo { height: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(6, minmax(0, 1fr)); gap: 2px; }
.ca__mo-wd { font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; text-transform: uppercase; }
.ca__mo-c { min-width: 0; min-height: 0; overflow: hidden; border-radius: 6px; padding: 2px 3px; background: var(--surface-tertiary); display: flex; flex-direction: column; gap: 1px; }
.ca__mo-c[data-out="true"] { opacity: .45; }
.ca__mo-c[data-today="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ca__mo-n { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); }
.ca__mo-c[data-today="true"] .ca__mo-n { color: var(--accent); }
.ca__mo-ev { font-size: 9.5px; padding: 0 3px; }
.ca__mo-more { font-size: 9.5px; color: var(--text-muted); font-weight: 600; }
.ca__over { position: absolute; inset: 40% 0 auto; text-align: center; }

/* DETAILS (inside the card) */
.ca__detail { position: absolute; inset: 8px; z-index: 5; padding: 14px 16px; border-radius: calc(var(--radius-device) - 4px); background: var(--device-surface); box-shadow: 0 8px 30px rgba(0, 0, 0, .35), inset 4px 0 0 var(--c, var(--accent)); overflow: auto; }
.ca__detail[hidden] { display: none; }
.ca__close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-tertiary); color: var(--text-secondary); font: 400 18px/1 var(--font); cursor: pointer; }
.ca__d-cal { margin: 0 32px 2px 0; font-size: 11px; font-weight: 700; color: var(--c, var(--accent)); text-transform: uppercase; letter-spacing: .05em; }
.ca__d-title { margin: 0 32px 6px 0; font-size: 16px; font-weight: var(--iq-fw-title); line-height: 1.25; overflow-wrap: anywhere; }
.ca__d-when, .ca__d-where, .ca__d-desc { margin: 0 0 4px; font-size: 12.5px; color: var(--text-secondary); overflow-wrap: anywhere; }
.ca__d-where[hidden], .ca__d-desc[hidden] { display: none; }
@container ca (max-width: 330px) { .ca__tg { --hw: 30px; } .ca__tg-hours span { font-size: 8.5px; } }

/* ================================================================ CAROUSEL (view 'carousel') — the coming events as full-card slides, each over
   its kind's animated background. data-layout: 'stack' (default — orb above the text, the text from 60 % down) | 'row' (orb beside the text) */
.ca-car { position: relative; isolation: isolate; height: 100%; min-width: 0; overflow: hidden; border-radius: 20px; color: #fff; background: #12131a; font-family: var(--mai-font, var(--font)); }
.ca-car .evc-slides { position: absolute; inset: 0; }
.ca-car .evc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; cursor: pointer; outline: none; }
.ca-car .evc-slide.is-active { opacity: 1; z-index: 1; }
.ca-car .evc-slide:focus-visible { box-shadow: inset 0 0 0 2px #2fc0ff; border-radius: inherit; }
.ca-car .evc-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 13, 18, .94) 0%, rgba(12, 13, 18, .82) 38%, rgba(12, 13, 18, .2) 58%, rgba(12, 13, 18, 0) 100%); }
.ca-car .evc-body { position: absolute; left: 22px; right: 22px; top: 60%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ca-car[data-layout="row"] .evc-shade { background: linear-gradient(90deg, rgba(12, 13, 18, .88) 0%, rgba(12, 13, 18, .6) 42%, rgba(12, 13, 18, .08) 100%); }
.ca-car[data-layout="row"] .evc-body { top: auto; bottom: 20px; flex-direction: row; align-items: center; gap: 14px; }
.ca-car .evc-orb { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #1b1206;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ac) 55%, #fff) 0%, var(--ac) 60%, color-mix(in srgb, var(--ac) 70%, #000) 100%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 18%, transparent), 0 6px 18px color-mix(in srgb, var(--ac) 40%, transparent); }
.ca-car .evc-orb .bi { line-height: 1; }
.ca-car .evc-orb .evc-leaf { width: 1em; height: 1em; fill: currentColor; }
.ca-car .evc-text { min-width: 0; display: flex; flex-direction: column; gap: 2.5px; }
.ca-car .evc-type { font-size: 7.4px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; line-height: 12px; color: color-mix(in srgb, var(--ac) 70%, #fff); display: flex; align-items: center; gap: 6px; }
.ca-car .evc-due { font-style: normal; letter-spacing: .04em; padding: 1.5px 6px; border-radius: 99px; background: #ff8a2b; color: #1b1206; font-size: 6.6px; line-height: 9px; }
.ca-car .evc-due[hidden] { display: none; }
.ca-car .evc-title { font-size: 22px; font-weight: 600; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.ca-car[data-layout="row"] .evc-title { font-size: 17.5px; -webkit-line-clamp: 2; }
.ca-car .evc-when { font-size: 9.5px; line-height: 13px; color: #e6e8ee; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-car .evc-cal { font-size: 7.8px; line-height: 11px; color: #a3a8b4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-car .evc-top { position: absolute; z-index: 2; top: 13px; left: 14px; right: 14px; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.ca-car .evc-count { margin-right: auto; padding: 4.5px 10px; border-radius: 99px; background: rgba(18, 20, 27, .72); border: 1px solid rgba(255, 255, 255, .08); font-size: 8px; line-height: 11px; color: #c9ccd4; }
.ca-car .evc-count b { color: #fff; font-weight: 600; }
.ca-car .evc-btn { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); display: grid; place-items: center; color: #fff; background: rgba(18, 20, 27, .72); font-size: 11px; cursor: pointer; transition: background .2s; }
.ca-car .evc-btn:hover { background: rgba(255, 255, 255, .14); }
.ca-car .evc-room { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(18, 20, 27, .72); color: #c9ccd4; font: inherit; font-size: 8.2px; cursor: pointer; }
.ca-car .evc-room:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.ca-car .evc-dots { position: absolute; z-index: 2; left: 22px; bottom: 12px; display: flex; gap: 4.5px; }
.ca-car[data-layout="row"] .evc-dots { left: auto; right: 20px; }
.ca-car .evc-dots i { width: 5.5px; height: 5.5px; border-radius: 5.5px; background: rgba(255, 255, 255, .25); transition: width .3s, background .3s; }
.ca-car .evc-dots i.is-on { width: 16px; background: #ff8a2b; }
.ca-car .evc-hint { position: absolute; z-index: 2; right: 20px; bottom: 12px; font-size: 9px; color: rgba(255, 255, 255, .45); pointer-events: none; }
.ca-car .evc-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #8b909c; font-size: 10px; }
.ca-car .evc-empty .bi { font-size: 26px; color: #3ce06a; }
.ca-car > .evc-room { position: absolute; z-index: 2; top: 13px; right: 14px; }
/* the KINDS' animated backgrounds */
.ca-car .evbg { position: absolute; inset: 0; overflow: hidden; container-type: size; pointer-events: none; }
.ca-car .evbg > * { position: absolute; }
.ca-car .evb-glow { inset: -20% -10% -20% 35%; border-radius: 50%; filter: blur(24px); opacity: .55; animation: ev-breathe 7s ease-in-out infinite; }
.ca-car .t-birthday { background: linear-gradient(135deg, #2b1630 0%, #1c1322 55%, #141017 100%); } .ca-car .t-birthday .evb-glow { background: radial-gradient(circle, rgba(255, 111, 174, .55), transparent 65%); }
.ca-car .t-pmc { background: linear-gradient(135deg, #0f2232 0%, #111a24 55%, #0f131b 100%); } .ca-car .t-pmc .evb-glow { background: radial-gradient(circle, rgba(47, 192, 255, .45), transparent 65%); }
.ca-car .t-cardboard { background: linear-gradient(135deg, #2a1e14 0%, #1c1611 55%, #15110e 100%); } .ca-car .t-cardboard .evb-glow { background: radial-gradient(circle, rgba(217, 160, 102, .45), transparent 65%); }
.ca-car .t-organic { background: linear-gradient(135deg, #10261a 0%, #111b14 55%, #0e130f 100%); } .ca-car .t-organic .evb-glow { background: radial-gradient(circle, rgba(60, 224, 106, .38), transparent 65%); }
.ca-car .t-household { background: linear-gradient(135deg, #1d2129 0%, #16181e 55%, #121318 100%); } .ca-car .t-household .evb-glow { background: radial-gradient(circle, rgba(154, 163, 178, .35), transparent 65%); }
.ca-car .t-holiday { background: linear-gradient(135deg, #2a2211 0%, #1c180f 55%, #15130d 100%); } .ca-car .t-holiday .evb-glow { background: radial-gradient(circle, rgba(255, 200, 61, .45), transparent 65%); }
.ca-car .t-appointment { background: linear-gradient(135deg, #1c1e28 0%, #16171f 55%, #121319 100%); } .ca-car .t-appointment .evb-glow { background: radial-gradient(circle, rgba(255, 138, 43, .28), transparent 65%); }
.ca-car .evb-balloons { right: 0; top: 0; width: 70%; height: 100%; }
.ca-car .evb-balloons path { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: .5; }
.ca-car .evb-balloons .bl { animation: ev-float 7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ca-car .evb-balloons .bl:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
.ca-car .evb-balloons .bl:nth-child(3) { animation-duration: 6.4s; animation-delay: -4s; }
.ca-car .evb-cf { left: var(--x); top: -6%; width: 5.5px; height: 9px; border-radius: 1.5px; background: var(--c); opacity: .85; transform: rotate(var(--r)); animation: ev-fall var(--t) linear infinite; animation-delay: var(--d); }
.ca-car .evb-candles { right: 6%; bottom: 0; width: 22%; height: 34%; }
.ca-car .evb-candles .fl { transform-box: fill-box; transform-origin: 50% 100%; animation: ev-flicker 1.4s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 3px #ffb347); }
.ca-car .evb-big { right: 8%; top: 50%; font-size: min(62cqh, 40cqw); line-height: 1; color: rgba(47, 192, 255, .22); margin-top: calc(min(62cqh, 40cqw) / -2); animation: ev-spin 40s linear infinite; }
.ca-car .evb-bub { left: var(--x); bottom: -10%; width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; border: 1px solid rgba(140, 220, 255, .5); background: rgba(47, 192, 255, .08); animation: ev-rise var(--t) linear infinite; animation-delay: var(--d); }
.ca-car .evb-boxes { right: 2%; bottom: 0; width: 60%; height: 95%; }
.ca-car .evb-boxes .bx { animation: ev-bob 5s ease-in-out infinite; animation-delay: var(--d); transform-box: fill-box; }
.ca-car .evb-lf { left: var(--x); top: -12%; width: calc(22px * var(--s)); height: calc(22px * var(--s)); color: var(--c); opacity: .7; animation: ev-drift var(--t) linear infinite; animation-delay: var(--d); }
.ca-car .evb-lf svg { width: 100%; height: 100%; fill: currentColor; }
.ca-car .evb-bin { right: 4%; bottom: 0; width: 55%; height: 90%; }
.ca-car .evb-bin .lid { transform-box: fill-box; transform-origin: 100% 100%; animation: ev-lid 6s ease-in-out infinite; }
.ca-car .evb-sp { left: var(--x); top: var(--y); width: calc(10px * var(--s)); height: calc(10px * var(--s)); background: #ffe08a; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: ev-twinkle 3s ease-in-out infinite; animation-delay: var(--d); }
.ca-car .evb-clock { right: 0; top: 0; width: 100%; height: 100%; }
.ca-car .evb-clock .mh { transform-origin: 76px 50px; animation: ev-spin 60s linear infinite; }
.ca-car .evb-sweep { inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: ev-sweep 9s ease-in-out infinite; }
@container (max-aspect-ratio: 9 / 10) {
  .ca-car .evb-glow { inset: 0 -25% 38% -25%; }
  .ca-car .evb-balloons { top: 12%; right: 0; width: 100%; height: 44%; }
  .ca-car .evb-candles { right: 8%; bottom: 44%; width: 44%; height: 13%; }
  .ca-car .evb-big { left: 18%; right: auto; top: 14%; margin-top: 0; font-size: min(40cqh, 64cqw); }
  .ca-car .evb-boxes, .ca-car .evb-bin { right: 0; bottom: 44%; width: 100%; height: 42%; }
  .ca-car .evb-clock { top: 12%; height: 44%; width: 100%; }
  .ca-car :is(.evb-cf, .evb-lf, .evb-bub, .evb-sp) { left: calc((var(--x) - 45%) * 1.8 + 4%); }
  .ca-car .evb-sp { top: calc(12% + var(--y) * .44); }
}
@keyframes ev-breathe { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .65; transform: scale(1.06); } }
@keyframes ev-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6%) rotate(3deg); } }
@keyframes ev-fall { 0% { transform: translateY(0) rotate(var(--r)); opacity: 0; } 10% { opacity: .85; } 100% { transform: translate(-2cqw, 115cqh) rotate(calc(var(--r) + 300deg)); opacity: .6; } }
@keyframes ev-flicker { 0%, 100% { transform: scale(1, 1); opacity: 1; } 35% { transform: scale(.9, .82); opacity: .8; } 70% { transform: scale(1.05, 1.08); opacity: .95; } }
@keyframes ev-spin { to { transform: rotate(360deg); } }
@keyframes ev-rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .8; } 100% { transform: translateY(-120cqh); opacity: 0; } }
@keyframes ev-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes ev-drift { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: .7; } 100% { transform: translate(-25cqw, 125cqh) rotate(240deg); opacity: .5; } }
@keyframes ev-lid { 0%, 62%, 100% { transform: rotate(0); } 74% { transform: rotate(-14deg); } 86% { transform: rotate(-3deg); } }
@keyframes ev-twinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0); } 50% { opacity: .95; transform: scale(1) rotate(45deg); } }
@keyframes ev-sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(260%); } }
/* only the visible slide animates; nothing animates while the page is hidden */
.ca-car .evc-slide:not(.is-active) .evbg *, .ca-car.is-hidden-page .evbg * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .ca-car .evbg *, .ca-car .evb-glow { animation: none !important; } .ca-car .evc-slide { transition: none; } }

/* ================================================================ DATES (view 'dates') — date block · title · time · how soon */
.ca-dates { box-sizing: border-box; height: 100%; min-width: 0; padding: 8px 14px; border-radius: 20px; background: #0d0e12; border: 1px solid rgba(255, 255, 255, .04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3); color: #fff; font-family: var(--mai-font, var(--font)); overflow: hidden; }
.ca-dates .cad-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; }
.ca-dates .cad-row + .cad-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.ca-dates .cad-date { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.ca-dates .cad-dow, .ca-dates .cad-mon { font-size: 8.2px; font-weight: 500; color: #2fc0ff; }
.ca-dates .cad-day { font-size: 22px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.ca-dates .cad-info { min-width: 0; }
.ca-dates .cad-title { display: block; font-size: 11.5px; font-weight: 600; line-height: 16px; color: #ff8a2b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-dates .cad-time { display: flex; align-items: center; gap: 5px; font-size: 9px; line-height: 12px; color: #9ea2ad; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-dates .cad-time .bi { font-size: 8.5px; }
.ca-dates .cad-rel { font-size: 8.5px; color: #c9ccd4; white-space: nowrap; }
.ca-dates .cad-empty { display: flex; align-items: center; gap: 8px; padding: 12px 2px; font-size: 10px; color: #8b909c; }
.ca-dates .cad-empty .bi { color: #2fc0ff; font-size: 14px; }
.ca-car[data-layout="row"] .evc-hint { bottom: 24px; }
/* a narrow carousel (a phone): a smaller title, tighter insets */
.ca-car { container: cacar / inline-size; }
@container cacar (max-width: 360px) {
  .ca-car[data-layout="row"] .evc-body { left: 14px; right: 14px; bottom: 16px; }
  .ca-car[data-layout="row"] .evc-title { font-size: 13.5px; }
}
