/* ============================================================
   A board's events calendar (EventCalendar.dc.html) and the wall's
   "coming up" (BoardWidget.dc.html COMING UP, UpcomingAll.dc.html).

   The calendar is the board's own paper (roles: --paper, --ink,
   --line), so it follows the theme like the chat notepad. The event
   stickies are physical paper: they keep their light colours and
   dark ink in every theme (palette tokens, pinned below).
   ============================================================ */

.evc {
    --evc-chip-ink: var(--gray-900);
    --evc-voice: var(--green-100);
    --evc-sheet: var(--yellow-200);
    --evc-irl: var(--kraft-200);
    --evc-voice-dot: var(--green-500);
    --evc-sheet-dot: var(--amber-500);
    --evc-irl-dot: var(--brown-500);
    --evc-sel: var(--blue-500);
    --evc-live: var(--red-700);
    --evc-now: var(--amber-500);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: 16px minmax(0, 1fr);
    max-width: 1280px;
    height: calc(100% - 16px);
    margin: 16px auto 0;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
    border: 2.5px solid var(--line);
    border-radius: 6px 8px 14px 10px;
    box-shadow: 5px 6px 0 var(--line), var(--shadow-soft);
    font-family: var(--font-hand);
}
.evc button, .evc input, .evc textarea { font-family: inherit; color: inherit; }
.evc .icon { fill: none; stroke: currentColor; }

/* the binding strip the calendar hangs from */
.evc-bind { grid-column: 1 / -1; display: flex; justify-content: space-around; align-items: center; padding: 0 40px; background: var(--navy); }
.evc-bind i { width: 10px; height: 10px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 2px var(--night-900); }

.evc-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.evc.desk .evc-main { grid-column: 1; grid-row: 2; }
.evc-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; flex-wrap: wrap; }
.evc-month { margin: 0 4px 0 0; font-family: var(--font-marker); font-weight: 700; font-size: 42px; line-height: 1; }
.evc-month small { font-family: var(--font-hand); font-weight: 400; font-size: 17px; color: var(--ink-soft); margin-left: 6px; }
.evc-ib { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 2px solid var(--line); border-radius: 50% 45% 52% 48%; background: var(--paper); cursor: pointer; box-shadow: 2px 2px 0 var(--line); }
.evc-ib:disabled { opacity: .35; cursor: default; box-shadow: none; }
.evc-today { min-height: 36px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--paper); font-size: 15px; cursor: pointer; }
.evc-seg { display: flex; padding: 2px; margin-left: auto; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
.evc-seg button { min-height: 34px; padding: 0 12px; border: none; border-radius: 9px; background: none; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.evc-seg button.on { background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 var(--line); }
.evc-new { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 2.5px solid var(--gray-900); border-radius: 20px 16px 20px 14px; background: var(--yellow-500); color: var(--gray-900) !important; font-size: 16px; cursor: pointer; box-shadow: 2px 2px 0 var(--gray-900); }
.evc-new:hover { rotate: -1deg; }
.evc-new.float { position: absolute; right: 14px; bottom: 14px; z-index: 5; }
.evc-tz { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 0 16px 6px; font-size: 13px; color: var(--ink-soft); }
.evc-key { display: flex; gap: 12px; margin-left: auto; }
.evc-key span { display: flex; align-items: center; gap: 5px; }
.evc-key i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--line); }
.evc-key i.k-voice { background: var(--evc-voice); }
.evc-key i.k-sheet { background: var(--evc-sheet); }
.evc-key i.k-irl { background: var(--evc-irl); }

/* month grid (desktop): a day cell never grows */
.evc-dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 12px; font-size: 14px; color: var(--ink-soft); }
.evc-dow span { padding: 2px 8px; }
.evc-dow.ph { padding: 0 10px; text-align: center; }
.evc-dow.ph span { padding: 0; }
.evc-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 12px 12px; border-top: 2px solid var(--line); border-left: 2px solid var(--line); }
.evc-cell { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 0; padding: 4px 5px; overflow: hidden; user-select: none; border-right: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.evc-cell.wkend { background: color-mix(in srgb, var(--amber-200) 35%, transparent); }
.evc-cell.out { background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--ink) 5%, transparent) 7px 8px); }
.evc-cell.out .evc-num { color: var(--ink-faint); }
.evc-cell.evc-dsel { background: color-mix(in srgb, var(--yellow-200) 55%, transparent); box-shadow: inset 0 0 0 3px var(--evc-sel); }
.evc-num { display: grid; place-items: center; width: 30px; height: 28px; margin: -2px 0 0 -4px; flex-shrink: 0; font-family: var(--font-marker); font-weight: 700; font-size: 22px; line-height: 1; }
.evc-numb { padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; }
.evc-numb:hover { background: var(--yellow-500); color: var(--gray-900); }
/* today: a red marker ring round the number */
.evc .today .evc-num { color: var(--red-700); border-radius: 50% 46% 52% 44%; box-shadow: 0 0 0 2px var(--red-700); }
.evc-chip { display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0; width: 100%; min-width: 0; min-height: 34px; padding: 2px 6px 2px 7px; box-sizing: border-box; overflow: hidden; border: 2px solid var(--gray-900); border-radius: 7px 5px 8px 4px; background: var(--evc-sheet); color: var(--evc-chip-ink) !important; font-size: 14px; line-height: 1.1; text-align: left; white-space: nowrap; cursor: pointer; }
.evc-chip .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.evc-chip .h { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--gray-700); }
.evc-chip:hover { rotate: -1.5deg; }
.evc-chip.k-voice { background: var(--evc-voice); }
.evc-chip.k-irl { background: var(--evc-irl); }
.evc-chip.past { opacity: .5; }
.evc-chip.off .t { text-decoration: line-through; }
.evc-chip.sel { outline: 3px solid var(--evc-sel); outline-offset: 1px; }
.evc-chip.now { box-shadow: inset 0 0 0 2px var(--evc-now); }
.evc-tick { display: grid; place-items: center; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; background: var(--green-500); color: var(--white); }
.evc-tick.sm { width: 12px; height: 12px; margin-left: auto; }
.evc-stack { display: inline-block; width: 14px; height: 10px; margin-right: 4px; vertical-align: -1px; border: 1.5px solid var(--line); border-radius: 2px; background: var(--evc-sheet); box-shadow: 2px -2px 0 -.5px var(--paper), 2px -2px 0 1px var(--line); }
.evc-more { display: flex; align-items: center; min-height: 24px; flex-shrink: 0; padding: 0 4px; border: none; border-radius: 6px; background: none; font-size: 13px; text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.evc-more:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* phone month: dots per day, a count from 4 */
.evc-pgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 10px; }
.evc-pday { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 44px; padding: 3px 0 0; border: none; border-radius: 10px; background: none; cursor: pointer; touch-action: manipulation; }
.evc-pday .evc-num { margin: 0; width: 30px; height: 26px; font-size: 21px; }
.evc-pday.out .evc-num { color: var(--ink-faint); }
.evc-pday.on { background: var(--yellow-500); color: var(--gray-900); box-shadow: inset 0 0 0 2px var(--gray-900); }
.evc-dots { display: flex; gap: 3px; height: 7px; }
.evc-dots i { width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--line); }
.evc-dots i.k-voice { background: var(--evc-voice-dot); }
.evc-dots i.k-sheet { background: var(--evc-sheet-dot); }
.evc-dots i.k-irl { background: var(--evc-irl-dot); }
.evc-cnt { display: grid; place-items: center; min-width: 18px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 11px; line-height: 1; }
.evc-pday.on .evc-cnt { background: var(--gray-900); color: var(--cream); }

/* list */
.evc-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 14px; }
.evc-list.under { border-top: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent); margin-top: 6px; }
.evc-day { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; font-family: var(--font-marker); font-weight: 700; font-size: 24px; }
.evc-day small { font-family: var(--font-hand); font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.evc-list > .evc-day:first-child, .evc-list > div:first-child > .evc-day { margin-top: 4px; }
.evc-day.part { font-size: 20px; color: var(--ink-soft); }
.evc-quiet { margin: 8px 2px 0; font-size: 14px; color: var(--ink-soft); }
.evc-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-bottom: 6px; padding: 6px 10px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--surface); font-size: 16px; text-align: left; cursor: pointer; }
.evc-row:hover { background: color-mix(in srgb, var(--yellow-200) 30%, var(--surface)); }
.evc-row.sel { outline: 3px solid var(--evc-sel); outline-offset: 1px; }
.evc-row.now { background: color-mix(in srgb, var(--yellow-100) 70%, var(--surface)); box-shadow: inset 0 0 0 2px var(--evc-now); }
.evc-row.past, .evc-drow.past { opacity: .55; }
.evc-row.off .evc-rb b, .evc-drow.off .evc-drb { text-decoration: line-through; }
.evc-rt { width: 62px; flex-shrink: 0; font-size: 15px; line-height: 1.1; }
.evc-rt small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.evc-rb { flex: 1; min-width: 0; line-height: 1.15; }
.evc-rb b { display: block; overflow: hidden; font-weight: 400; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; }
.evc-rm { display: flex; align-items: center; gap: 4px; overflow: hidden; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.evc-rm > span { overflow: hidden; text-overflow: ellipsis; }
.evc-rs { flex-shrink: 0; font-size: 13.5px; line-height: 1.15; color: var(--ink-soft); text-align: right; }
.evc-offtag { color: var(--danger-text); }
.evc-bar { width: 6px; align-self: stretch; flex-shrink: 0; border: 1.5px solid var(--line); border-radius: 3px; background: var(--evc-sheet-dot); }
.evc-bar.k-voice { background: var(--evc-voice-dot); }
.evc-bar.k-irl { background: var(--evc-irl-dot); }
.evc-live { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--evc-live); color: var(--white); font-size: 11px; line-height: 17px; }
.evc-live.top { margin-bottom: 4px; }
.evc-fold { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; margin: 0 0 8px; border: 2px dashed color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 12px 9px 12px 10px; background: none; font-size: 15px; cursor: pointer; }
.evc-fold:hover { border-style: solid; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.evc-empty { margin: 18px 4px; padding: 14px; border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 12px; font-size: 15px; color: var(--ink-soft); text-align: center; }

/* the side column (desktop) / the event's bottom sheet (phone) */
.evc-side { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 14px 16px; box-sizing: border-box; border-left: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); background: color-mix(in srgb, var(--ink) 2%, var(--paper)); }
.evc-lbl { margin: 10px 0 4px; font-family: var(--font-marker); font-weight: 700; font-size: 21px; color: var(--ink-soft); }
.evc-lbl:first-child { margin-top: 0; }
.evc-lbl small { font-family: var(--font-hand); font-weight: 400; font-size: 13px; }
.evc-mini { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 4px 6px; box-sizing: border-box; border: none; border-radius: 10px; background: none; font-size: 15px; line-height: 1.1; text-align: left; cursor: pointer; }
.evc-mini:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.evc-mini .b { flex: 1; min-width: 0; }
.evc-mini .b > small { display: block; font-size: 13px; color: var(--ink-soft); }
.evc-sidefoot { margin-top: auto; padding-top: 12px; font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); }
.evc-sidefoot b { font-weight: 400; color: var(--ink); }
.evc-d { width: 38px; flex-shrink: 0; overflow: hidden; border: 2px solid var(--gray-900); border-radius: 5px; background: var(--amber-200); color: var(--gray-900); line-height: 1; text-align: center; }
.evc-d > b { display: block; padding: 1px 0; background: var(--navy); color: var(--amber-200); font-weight: 400; font-size: 10.5px; }
.evc-d > span { display: block; padding: 1px 0; font-family: var(--font-marker); font-weight: 700; font-size: 21px; }
.evc-d.big { width: 58px; }
.evc-d.big > b { padding: 2px 0; font-size: 13px; }
.evc-d.big > span { padding: 2px 0; font-size: 34px; }
.evc-x { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; margin-left: auto; padding: 0; border: none; border-radius: 50%; background: none; cursor: pointer; }
.evc-x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.evc-dt { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.evc-dt.mid { align-items: center; }
.evc-dt .grow { flex: 1; min-width: 0; }
.evc-dt h3 { margin: 0; font-family: var(--font-marker); font-weight: 700; font-size: 28px; line-height: 1; overflow-wrap: anywhere; }
.evc-dt .w { margin-top: 4px; font-size: 15px; line-height: 1.2; color: var(--ink-soft); }
.evc-drow { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; margin-bottom: 5px; padding: 4px 8px 4px 6px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 10px 8px 11px 7px; background: var(--surface); font-size: 15px; line-height: 1.1; text-align: left; cursor: pointer; }
.evc-drow:hover { background: color-mix(in srgb, var(--yellow-200) 30%, var(--surface)); }
.evc-drow.now { box-shadow: inset 0 0 0 2px var(--evc-now); }
.evc-drt { width: 50px; flex-shrink: 0; font-size: 13.5px; color: var(--ink-soft); }
.evc-drb { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evc-drb small { display: block; overflow: hidden; font-size: 12.5px; color: var(--ink-soft); text-overflow: ellipsis; }
.evc-where { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 10px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--surface); font-size: 15px; text-align: left; cursor: pointer; }
.evc-where.flat { cursor: default; }
.evc-where small { margin-left: auto; font-size: 13px; color: var(--link-ink); }
.evc-where .k-voice { color: var(--green-500); }
.evc-where .k-sheet { color: var(--yellow-700); }
.evc-where .k-irl { color: var(--brown-500); }
.evc-notes { margin: 8px 0 2px; font-size: 15px; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; }
.evc-host { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--ink-soft); }
.evc-av { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; overflow: hidden; box-sizing: border-box; border: 2px solid var(--line); border-radius: 50% 45% 55% 48%; color: var(--white); font-family: var(--font-marker); font-weight: 700; font-size: 17px; }
.evc-av .face-img { width: 100%; height: 100%; object-fit: cover; }
.evc-faces { display: flex; align-items: center; margin-top: 6px; }
.evc-faces .evc-av { margin-left: -7px; }
.evc-faces .evc-av:first-child { margin-left: 0; }
.evc-faces .n { margin-left: 8px; font-size: 14px; color: var(--ink-soft); }
.evc-rsvp { display: flex; gap: 6px; margin-top: 10px; }
.evc-rsvp button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; border: 2.5px solid var(--line); border-radius: 20px 16px 20px 14px; background: var(--paper); font-size: 16px; cursor: pointer; }
.evc-rsvp button.on { background: var(--green-200); color: var(--gray-900); box-shadow: 2px 2px 0 var(--line); }
.evc-rsvp button.on.maybe { background: var(--yellow-200); }
.evc-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 2px; border: none; background: none; font-size: 15px; line-height: 1.15; text-align: left; cursor: pointer; }
.evc-opt small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.evc-knob { position: relative; width: 38px; height: 22px; flex-shrink: 0; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
.evc-knob::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.evc-knob.on { background: var(--green-500); }
.evc-knob.on::after { left: 18px; background: var(--cream); }
.calm .evc-knob::after { transition: none; }
.evc-link { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 2px; border: none; background: none; font-size: 15px; color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.evc-link.back { margin: -6px 0 4px; color: var(--ink-soft); }
.evc-runs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent); }
.evc-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--paper); font-size: 15px; cursor: pointer; }
.evc-btn.warn { color: var(--danger-text); border-color: var(--danger-text); }
.evc-btn.go { border-width: 2.5px; border-color: var(--gray-900); background: var(--yellow-500); color: var(--gray-900); font-size: 16px; box-shadow: 2px 2px 0 var(--gray-900); }
.evc-btn:disabled { opacity: .6; cursor: default; }
.evc-past { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 7%, var(--paper)); font-size: 14px; }
.evc-cancel { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--red-100); color: var(--red-900); font-size: 14px; }
.evc-dim { position: absolute; inset: 0; z-index: 25; padding: 0; border: none; background: color-mix(in srgb, var(--night-900) 30%, transparent); cursor: pointer; }
.evc-dim.form { z-index: 35; }
.evc-grab { display: grid; place-items: center; width: 100%; height: 28px; flex-shrink: 0; margin-top: 4px; padding: 0; border: none; background: none; cursor: pointer; }
.evc-grab span { width: 56px; height: 6px; border-radius: 4px; background: var(--ink); opacity: .35; }

/* new event / change it: desktop = "how it'll look" beside the set-up; phone = a tall sheet */
.evc-form { position: absolute; z-index: 40; display: flex; box-sizing: border-box; background: var(--paper); border: 2.5px solid var(--line); }
.evc.desk .evc-form { left: 50%; top: 50%; translate: -50% -50%; width: min(800px, calc(100% - 32px)); max-height: calc(100% - 24px); border-radius: 16px 12px 18px 14px; box-shadow: 6px 7px 0 var(--line); }
.evc-fprev { display: flex; flex-direction: column; gap: 6px; width: 258px; flex-shrink: 0; box-sizing: border-box; padding: 16px 16px 18px; overflow-y: auto; border-right: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 14px 0 0 16px; background: color-mix(in srgb, var(--yellow-200) 30%, var(--paper)); }
.evc-pcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 12px 9px 13px 10px; background: var(--surface); box-shadow: 3px 3px 0 var(--line); rotate: -1deg; }
.calm .evc-pcard { rotate: none; }
.evc-pcard .evc-dt { margin: 0; }
.evc-dtb { flex: 1; min-width: 0; }
.evc-pcard h4 { margin: 0; font-family: var(--font-marker); font-weight: 700; font-size: 26px; line-height: 1; overflow-wrap: anywhere; }
.evc-pcard h4.empty { color: var(--ink-faint); }
.evc-pcard .w { margin-top: 3px; font-size: 14px; line-height: 1.2; color: var(--ink-soft); }
.evc-pwhere { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 2px 8px; border: 2px solid var(--gray-900); border-radius: 10px 8px 11px 7px; color: var(--gray-900); font-size: 14px; overflow-wrap: anywhere; }
.evc-pwhere.voice { background: var(--evc-voice); }
.evc-pwhere.sheet { background: var(--evc-sheet); }
.evc-pwhere.irl { background: var(--evc-irl); }
.evc-pwhere.none { background: none; border-style: dashed; border-color: var(--line); color: var(--ink-soft); }
.evc-pnotes { font-size: 14px; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; }
.evc-pbtns { display: flex; gap: 6px; }
.evc-pbtns span { flex: 1; display: grid; place-items: center; min-height: 30px; border: 2px solid var(--line); border-radius: 14px 11px 14px 10px; font-size: 14px; color: var(--ink-soft); }
.evc-pchat { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 2px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 10px; background: var(--surface); font-size: 13.5px; line-height: 1.2; }
.evc-pchat b { font-weight: 400; }
.evc-pchat .c { padding: 4px 8px; border: 2px solid var(--line); border-radius: 8px 6px 9px 6px; font-size: 13px; overflow-wrap: anywhere; }
.evc-pkey { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--ink-soft); }
.evc-pkey i { width: 12px; height: 12px; border: 1.5px solid var(--gray-900); border-radius: 3px; background: var(--evc-sheet); }
.evc-pkey i.voice { background: var(--evc-voice); }
.evc-pkey i.irl { background: var(--evc-irl); }
.evc-fbody { position: relative; display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; padding: 14px 20px 16px; overflow-y: auto; }
.evc-fh { display: flex; align-items: center; gap: 8px; margin-bottom: -6px; }
.evc-mk { font-family: var(--font-marker); font-weight: 700; font-size: 30px; line-height: 1; }
.evc-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.evc-sech { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-marker); font-weight: 700; font-size: 22px; line-height: 1; color: var(--ink-soft); }
.evc-sech small { font-family: var(--font-hand); font-weight: 400; font-size: 13px; }
.evc-tin { width: 100%; box-sizing: border-box; padding: 2px 2px 4px; border: none; border-bottom: 2.5px solid var(--line); border-radius: 0; background: none; color: var(--ink); font-family: var(--font-marker) !important; font-weight: 700; font-size: 34px; line-height: 1.1; }
.evc-tin::placeholder { color: var(--ink-faint); }
.evc-tin:focus { outline: none; border-bottom-color: var(--amber-600); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--yellow-500) 45%, transparent) 62%); }
.evc-tin.bad { border-bottom-color: var(--danger-text); }
.evc-when { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 6px 14px 6px 8px; box-sizing: border-box; border: 2.5px solid var(--line); border-radius: 14px 11px 15px 10px; background: var(--surface); text-align: left; box-shadow: 2px 2px 0 var(--line); cursor: pointer; }
.evc-when:hover { background: color-mix(in srgb, var(--yellow-200) 30%, var(--surface)); }
.evc-when.open { outline: 3px solid var(--amber-500); outline-offset: 1px; }
.evc-when .evc-d { width: 46px; }
.evc-when .evc-d > span { font-size: 26px; }
.evc-when .b { flex: 1; min-width: 0; line-height: 1.1; }
.evc-when .b b { display: block; font-family: var(--font-marker); font-weight: 700; font-size: 27px; }
.evc-when .b small { font-size: 14px; color: var(--ink-soft); }
.evc-when .go { font-size: 14.5px; color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }
.evc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.evc-tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 28px 6px 10px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--surface); text-align: left; font-size: 16px; line-height: 1.1; cursor: pointer; }
.evc-tile:hover { background: color-mix(in srgb, var(--yellow-200) 30%, var(--surface)); }
.evc-tile .t { min-width: 0; overflow-wrap: anywhere; }
.evc-tile small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.evc-tile .ic { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; box-sizing: border-box; border: 2px solid var(--gray-900); border-radius: 50% 45% 52% 48%; color: var(--gray-900); background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
.evc-tile .ic.voice { background: var(--evc-voice); }
.evc-tile .ic.sheet { background: var(--evc-sheet); }
.evc-tile .ic.irl { background: var(--evc-irl); }
.evc-tile .ic.none { border-color: var(--line); color: var(--ink); }
.evc-tile.on { border-width: 2.5px; background: color-mix(in srgb, var(--yellow-200) 55%, var(--surface)); box-shadow: 2px 2px 0 var(--line); }
.evc-tile .tk { position: absolute; right: 8px; top: 8px; width: 18px; height: 18px; }
.evc-addn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 2px dashed color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 12px 9px 12px 10px; background: none; font-size: 15px; text-align: left; cursor: pointer; }
.evc-addn small { font-size: 13px; color: var(--ink-soft); }
.evc-addn:hover { border-style: solid; }
.evc-in, .evc-ta { width: 100%; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--surface); font-size: 16px; }
.evc-in { min-height: 42px; padding: 0 12px; }
.evc-ta { min-height: 64px; padding: 8px 12px; font-size: 15px; resize: none; field-sizing: content; }
.evc-in:focus, .evc-ta:focus { outline: 3px solid var(--amber-500); outline-offset: 1px; }
.evc-ffoot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent); }
.evc-ffoot .evc-opt { flex: 1; min-width: 0; }
.evc-ask { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border: 2px solid var(--yellow-700); border-radius: 12px 9px 13px 10px; background: color-mix(in srgb, var(--yellow-100) 80%, var(--paper)); }
.evc-ask > b { font-weight: 400; font-size: 16px; }
.evc-ask small { font-size: 13px; color: var(--ink-soft); }
.evc-ask .row { display: flex; flex-wrap: wrap; gap: 8px; }
.evc-err { margin-top: -6px; font-size: 14px; color: var(--danger-text); }

/* ---------- phone: full screen, no binding; sheets for the event and the set-up ---------- */
.evc.phone { display: flex; flex-direction: column; height: 100%; margin: 0; max-width: none; border: none; border-radius: 0; box-shadow: none; }
.evc.phone .evc-main { flex: 1; }
.evc.phone .evc-head { padding: 8px 12px 4px; gap: 6px; }
.evc.phone .evc-month { font-size: 32px; }
.evc.phone .evc-list { padding: 4px 12px 90px; }
.evc.phone .evc-side.open { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 92%; padding: 0 16px 18px; border: 2.5px solid var(--line); border-bottom: none; border-radius: 18px 22px 0 0; background: var(--paper); box-shadow: 0 -4px 0 color-mix(in srgb, var(--gray-900) 18%, transparent), 0 -18px 40px color-mix(in srgb, var(--night-900) 20%, transparent); }
.evc.phone .evc-form { left: 0; right: 0; bottom: 0; top: 22px; flex-direction: column; overflow: hidden; border-bottom: none; border-radius: 18px 22px 0 0; box-shadow: 0 -4px 0 color-mix(in srgb, var(--gray-900) 18%, transparent), 0 -18px 40px color-mix(in srgb, var(--night-900) 20%, transparent); }
.evc.phone .evc-fbody { padding: 0 16px; }
.evc.phone .evc-ffoot { position: sticky; bottom: 0; flex-wrap: wrap; padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); background: var(--paper); }
.evc.phone .evc-ffoot .evc-opt { flex-basis: 100%; }
.evc.phone .evc-ffoot .evc-btn { flex: 1; min-height: 46px; }
.evc.phone .evc-ask { margin-bottom: 14px; }

/* the board page in events, on a phone: the calendar fills the screen (no tab bar, no
   dock), under a slim header: back to the board, "events", board · times are in your time */
.events-head { display: none; }
@media (max-width: 759.98px) {
    .canvases-shell:has(.app-page.events-page) :is(.marks, .dock) { display: none; }
    .canvases-shell .app-page.events-page { padding-bottom: 0; }
    .events-page :is(.side-btn, .search-btn, .app-tools) { display: none; }
    .events-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .events-back { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 2.5px solid var(--line); border-radius: 50% 45% 52% 48%; background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 var(--line); }
    .events-ttl { flex: 1; min-width: 0; }
    .events-ttl b { display: block; font-family: var(--font-marker); font-weight: 700; font-size: 30px; line-height: 1; }
    .events-ttl span { display: block; overflow: hidden; font-size: 13px; color: var(--ink-soft); white-space: nowrap; text-overflow: ellipsis; }
}

/* the event card in chat (ChatPad.dc.html cp-evc): "say so in #chat" */
.evcard { display: flex; gap: 12px; width: 400px; max-width: 100%; margin-top: 6px; padding: 10px 12px 12px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 12px 9px 13px 10px; background: var(--surface); box-shadow: 3px 4px 0 color-mix(in srgb, var(--gray-900) 20%, transparent); rotate: -.3deg; }
.evcard.compact { width: 270px; }
.evcard.off { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.evcard-d { width: 50px; align-self: flex-start; }
.evcard-d > b { padding: 3px 0; font-size: 12px; letter-spacing: .06em; }
.evcard-d > span { padding: 2px 0 3px; font-size: 28px; }
.evcard-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.evcard-k { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-soft); }
.evcard-t { overflow: hidden; font-family: var(--font-marker); font-weight: 700; font-size: 25px; line-height: 1.05; white-space: nowrap; text-overflow: ellipsis; }
.evcard.off .evcard-t { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-soft); }
.evcard-w { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14px; color: var(--ink-soft); }
.evcard-w svg { flex-shrink: 0; }
.evcard-w span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evcard-off { margin-top: 4px; font-size: 14px; color: var(--danger-text); }
.evcard-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.evcard-r .go { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px 9px 12px 10px; background: var(--surface); font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.evcard-r .go.on { background: var(--green-200); color: var(--gray-900); box-shadow: 2px 2px 0 var(--line); }
.evcard-r .go.on.maybe { background: var(--yellow-200); }
.evcard-r .n { font-size: 13.5px; color: var(--ink-soft); }
.evcard-r .open { margin-left: auto; min-height: 34px; padding: 0 4px; border: none; background: none; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.evcard.compact .evcard-r .open { margin-left: 0; }

/* the wall's "coming up" (BoardWidget.dc.html COMING UP): amber paper, one date badge a day */
.ww-up {
    --ww-paper: var(--amber-200);
    --ww-row: var(--cream);
    --ww-tag: color-mix(in srgb, var(--amber-950) 10%, transparent);
    border-radius: 3px 5px 14px 4px / 3px 4px 9px 5px;
    gap: 6px;
}
.ww-up .ww-kind { color: var(--amber-950); }
.ww-up::before { rotate: 3deg; }
.ww-updays { display: flex; flex-direction: column; gap: 5px; }
.ww-upday { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.ww-upd { width: 36px; margin-top: 3px; }
.ww-upd > span { font-size: 20px; }
.ww-uplines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ww-upl .ww-go { min-height: 44px; padding: 3px 2px 3px 8px; }
.ww-upday.now .ww-upl:first-child { background: var(--yellow-100); box-shadow: inset 0 0 0 2px var(--amber-500); }
.ww-upb { flex: 1; min-width: 0; }
.ww-upt { display: flex; align-items: center; gap: 4px; font-size: 14.5px; }
.ww-upn { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ww-ups { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12.5px; color: var(--ww-soft); white-space: nowrap; }
.ww-upm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ww-chip.sm { width: 10px; height: 10px; }
.ww-gone { display: grid; place-items: center; width: 13px; height: 13px; flex-shrink: 0; border-radius: 50%; background: var(--green-500); color: var(--white); }
.ww-live { align-self: flex-start; margin-top: 2px; padding: 0 6px; border-radius: 7px; background: var(--ww-alert); color: var(--ww-on-alert); font-size: 11.5px; white-space: nowrap; }
.ww-bell { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; margin-right: 3px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--ww-soft); cursor: pointer; }
.ww-bell:hover { background: color-mix(in srgb, var(--ww-ink) 8%, transparent); color: var(--ww-ink); }
.ww-bell.on { background: var(--ww-hi); color: var(--ww-ink); }
.ww-upmore { align-self: flex-start; min-height: 30px; padding: 0 8px; border: none; border-radius: 8px; background: none; color: var(--amber-950); font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ww-upall { margin-left: auto; min-height: 32px; padding: 0 10px; border: 2px solid var(--ww-line); border-radius: 12px 9px 12px 10px; background: var(--cream); color: var(--ww-ink); font-size: 13.5px; cursor: pointer; }
.ww-upmore:hover, .ww-upall:hover { background: color-mix(in srgb, var(--amber-950) 10%, transparent); }

/* "see all" (UpcomingAll.dc.html): a week a page. Paper, so it stays light in every theme */
.ua {
    --ua-ink: var(--gray-900);
    --ua-soft: var(--gray-600);
    position: relative;
    box-sizing: border-box;
    width: 520px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border: 2.5px solid var(--ua-ink);
    border-radius: 16px 12px 18px 14px;
    background: var(--cream);
    color: var(--ua-ink);
    box-shadow: 6px 7px 0 var(--ua-ink);
    font-family: var(--font-hand);
}
.ua.ua-sheet { width: min(390px, 100vw); max-width: 100vw; max-height: min(800px, calc(100vh - 40px)); padding: 0 14px 14px; border-bottom: none; border-radius: 18px 22px 0 0; box-shadow: 0 -4px 0 color-mix(in srgb, var(--gray-900) 18%, transparent); }
.ua button { font-family: inherit; color: inherit; }
.ua-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.ua-grab { display: none; place-items: center; width: 100%; height: 28px; margin-top: 4px; padding: 0; border: none; background: none; cursor: pointer; }
.ua-grab span { width: 56px; height: 6px; border-radius: 4px; background: var(--ua-ink); opacity: .35; }
.ua.ua-sheet .ua-grab { display: grid; }
.ua-hd { display: flex; align-items: center; gap: 10px; }
.ua-hd h2 { margin: 0; font-family: var(--font-marker); font-weight: 700; font-size: 34px; line-height: 1; }
.ua-hd .ua-x { margin-left: auto; }
.ua-sub { margin-top: 2px; font-size: 14px; color: var(--ua-soft); }
.ua-wk { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.ua-ib { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--ua-ink); border-radius: 50% 45% 52% 48%; background: var(--cream); box-shadow: 2px 2px 0 var(--ua-ink); cursor: pointer; }
.ua-ib:disabled { opacity: .35; box-shadow: none; cursor: default; }
.ua-wk b { flex: 1; text-align: center; font-family: var(--font-marker); font-weight: 700; font-size: 24px; }
.ua-wk b small { display: block; font-family: var(--font-hand); font-weight: 400; font-size: 13px; color: var(--ua-soft); }
.ua-day { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; font-family: var(--font-marker); font-weight: 700; font-size: 22px; }
.ua-day small { font-family: var(--font-hand); font-weight: 400; font-size: 13.5px; color: var(--ua-soft); }
.ua-row { display: flex; align-items: center; min-width: 0; margin-bottom: 4px; overflow: hidden; border: 2px solid var(--ua-ink); border-radius: 10px 8px 11px 7px; background: var(--white); }
.ua-row.now { background: var(--yellow-100); box-shadow: inset 0 0 0 2px var(--amber-500); }
.ua-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 4px 3px 8px; border: none; background: none; font-size: 15px; line-height: 1.1; text-align: left; cursor: pointer; }
.ua-go:hover { background: color-mix(in srgb, var(--ua-ink) 5%, transparent); }
.ua-t { width: 52px; flex-shrink: 0; font-size: 13.5px; color: var(--gray-700); }
.ua-n { flex: 1; min-width: 0; }
.ua-n b { display: flex; align-items: center; gap: 4px; font-weight: 400; white-space: nowrap; overflow: hidden; }
.ua-n b span { overflow: hidden; text-overflow: ellipsis; }
.ua-n small { display: flex; align-items: center; gap: 4px; overflow: hidden; font-size: 12.5px; color: var(--gray-700); white-space: nowrap; }
.ua .ww-chip { --ww-line: var(--ua-ink); }
.ua-tick { display: grid; place-items: center; width: 13px; height: 13px; flex-shrink: 0; border-radius: 50%; background: var(--green-500); color: var(--white); }
.ua-live { flex-shrink: 0; padding: 0 6px; border-radius: 6px; background: var(--red-700); color: var(--white); font-size: 11px; line-height: 17px; }
.ua-bell { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; margin-right: 2px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--ua-soft); cursor: pointer; }
.ua-bell:hover { background: color-mix(in srgb, var(--ua-ink) 8%, transparent); color: var(--ua-ink); }
.ua-bell.on { background: var(--yellow-500); color: var(--ua-ink); }
.ua-more { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 38px; margin-bottom: 4px; border: 2px dashed color-mix(in srgb, var(--ua-ink) 40%, transparent); border-radius: 10px 8px 11px 7px; background: none; font-size: 14.5px; cursor: pointer; }
.ua-more:hover { border-style: solid; background: color-mix(in srgb, var(--ua-ink) 4%, transparent); }
.ua-none { margin: 14px 0 6px; padding: 14px; border: 2px dashed color-mix(in srgb, var(--ua-ink) 30%, transparent); border-radius: 12px; color: var(--gray-700); font-size: 15px; text-align: center; }
.ua-foot { margin-top: 10px; padding-top: 8px; border-top: 2px dashed color-mix(in srgb, var(--ua-ink) 20%, transparent); font-size: 13px; color: var(--ua-soft); }
