/* ==========================================================================
   Irada Hub — Calendar & Events (events.css)
   Builds on app.css tokens (--panel*, --line*, --paper, --mut, --faint,
   --accent*, --r*, --f-head, --ease) and its primitives (.btn, .inp, .sel,
   .txa, .field, .modal, .switch, .focus-scope, .avatar, .empty, .spinner).
   Only kind colours are new tokens; each has a dark and a light value so
   chips stay legible in both modes. Every class is prefixed .ev-.
   ========================================================================== */

:root {
  --ev-event:    #7AA2FF;
  --ev-activity: #34D399;
  --ev-meeting:  #C4A1FF;
  --ev-deadline: #FF8A73;
  --ev-task:     #9a9aa2;
  --ev-wash:     16%;      /* chip background strength */
  --ev-grid-line: var(--line);
}
[data-theme="light"] {
  --ev-event:    #2453C9;
  --ev-activity: #0B7A55;
  --ev-meeting:  #6D35C2;
  --ev-deadline: #B8381F;
  --ev-task:     #5C6060;
  --ev-wash:     11%;
}

/* A kind sets --k; an event's own colour (inline --k) overrides it. */
.evk-event    { --k: var(--ev-event); }
.evk-activity { --k: var(--ev-activity); }
.evk-meeting  { --k: var(--ev-meeting); }
.evk-deadline { --k: var(--ev-deadline); }
.evk-task     { --k: var(--ev-task); }

.ev-wrap { min-width: 0; }
.ev-wrap .view-head { flex-wrap: wrap; gap: 12px; }

/* ----------------------------------------------------------- toolbar */
.ev-bar {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ev-nav { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ev-arrow { font-size: 17px; line-height: 1; padding: 5px 11px; }
.ev-title {
  font-family: var(--f-head); font-size: 18px; font-weight: 800; margin: 0;
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-modes { margin-left: auto; }

.ev-filters {
  display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.ev-fchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  font-family: var(--f-head); font-size: 12.5px; font-weight: 600;
  color: var(--mut); background: transparent; border: 1px solid var(--line2);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.ev-fchip:hover { color: var(--paper); border-color: var(--line2); background: var(--panel2); }
.ev-fchip[aria-pressed="true"] {
  color: var(--paper);
  background: color-mix(in srgb, var(--k, var(--accent)) var(--ev-wash), var(--panel));
  border-color: color-mix(in srgb, var(--k, var(--accent-line)) 55%, transparent);
}
.ev-fchip--mine[aria-pressed="true"] { --k: var(--accent-line); }
.ev-fchip[aria-pressed="false"] .ev-sw { background: transparent; }
.ev-sw {
  width: 10px; height: 10px; border-radius: 3px; flex: none;
  background: var(--k); border: 2px solid var(--k);
}
.evk-task .ev-sw { border-style: dashed; }
.ev-fsel { width: auto; min-width: 0; max-width: 220px; padding: 6px 30px 6px 11px; font-size: 12.5px; }

.ev-body { min-height: 200px; position: relative; }
.ev-body[aria-busy="true"] > :not(.spinner) { opacity: .55; transition: opacity .2s var(--ease); }
.ev-keys { margin-top: 12px; }
.ev-empty-note { text-align: center; margin-top: 12px; }

/* ------------------------------------------------------------ chips */
.ev-chip {
  display: flex; align-items: center; gap: 5px;
  width: 100%; min-width: 0; text-align: left; cursor: pointer;
  padding: 2px 6px; border-radius: 6px; border: 0;
  border-left: 3px solid var(--k);
  background: color-mix(in srgb, var(--k) var(--ev-wash), var(--panel));
  color: var(--paper); font: inherit; font-size: 11.5px; line-height: 1.4;
  transition: filter .14s var(--ease), transform .14s var(--ease);
}
.ev-chip:hover { filter: brightness(1.08); transform: translateX(1px); }
.ev-chip:focus-visible, .ev-row:focus-visible, .ev-block:focus-visible,
.ev-more:focus-visible, .ev-add:focus-visible, .ev-fchip:focus-visible {
  outline: 2px solid var(--accent-fg); outline-offset: 1px;
}
.ev-chip.is-span { background: color-mix(in srgb, var(--k) calc(var(--ev-wash) + 10%), var(--panel)); }
.ev-chip.pos-mid, .ev-chip.pos-end { border-left-style: dotted; }
.ev-chip-time { font-family: var(--f-head); font-weight: 700; font-size: 10.5px; color: var(--mut); flex: none; }
.ev-chip-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.ev-chip-cont, .ev-chip-ico { flex: none; color: var(--mut); font-size: 10.5px; }
.ev-chip.evk-task {
  background: transparent; border: 1px dashed color-mix(in srgb, var(--k) 60%, transparent);
  border-left: 3px solid var(--k); color: var(--mut);
}
.ev-chip.evk-task:hover { color: var(--paper); background: var(--panel2); }
.is-done .ev-chip-txt, .is-done .ev-row-title { text-decoration: line-through; opacity: .7; }
.is-canceled { opacity: .55; }
.is-canceled .ev-chip-txt, .is-canceled .ev-block-title, h2.is-canceled { text-decoration: line-through; }
.ev-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 2px var(--panel);
}

/* ------------------------------------------------------------ month */
.ev-month { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ev-grid-line); }
.ev-dows, .ev-mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.ev-mweek { margin-top: 1px; }
.ev-dow {
  background: var(--panel); padding: 8px 6px; text-align: center;
  font-family: var(--f-head); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mut);
}
.ev-cell {
  background: var(--panel); min-height: 112px; padding: 6px; min-width: 0;
  display: flex; flex-direction: column; gap: 4px; cursor: default;
  transition: background .15s var(--ease);
}
.ev-cell:hover { background: var(--panel2); }
.ev-cell.wkend { background: color-mix(in srgb, var(--panel2) 45%, var(--panel)); }
.ev-cell.other { background: var(--panel2); }
.ev-cell.other .ev-daynum, .ev-cell.other .ev-items { opacity: .5; }
.ev-cell.today { background: var(--accent-soft); }
.ev-cell-head { display: flex; align-items: center; gap: 4px; min-height: 22px; }
.ev-daynum {
  font-family: var(--f-head); font-size: 11.5px; font-weight: 700; color: var(--mut);
  min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%;
}
.ev-cell.today .ev-daynum { background: var(--accent); color: var(--accent-ink); }
.ev-add {
  margin-left: auto; width: 22px; height: 22px; border-radius: 6px; padding: 0;
  border: 1px solid transparent; background: transparent; color: var(--faint);
  font-size: 13px; line-height: 1; cursor: pointer; opacity: 0;
  transition: opacity .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.ev-cell:hover .ev-add, .ev-add:focus-visible { opacity: 1; }
.ev-add:hover { background: var(--panel3); color: var(--paper); border-color: var(--line); }
@media (hover: none) { .ev-add { opacity: .7; } }
.ev-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-more {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 2px 4px; border: 0; border-radius: 6px; background: transparent;
  font-family: var(--f-head); font-size: 10.5px; font-weight: 600; color: var(--mut);
}
.ev-more:hover { background: var(--panel3); color: var(--paper); }

/* ----------------------------------------------------------- list / agenda */
.ev-list { display: flex; flex-direction: column; gap: 14px; }
.ev-lday { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.ev-lday.past { opacity: .72; }
.ev-lday-h {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 4px; border-radius: var(--r-sm); background: var(--panel2); border: 1px solid var(--line);
  font-family: var(--f-head); position: sticky; top: calc(var(--topbar-h, 62px) + 8px);
}
.ev-lday.today .ev-lday-h { background: var(--accent-soft); border-color: var(--accent-line); }
.ev-lday-dow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.ev-lday-num { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--paper); }
.ev-lday-mon { font-size: 11px; color: var(--mut); font-weight: 600; }
.ev-today-tag {
  margin-top: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
}
.ev-lrows { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ev-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--paper);
  background: var(--panel); border: 1px solid var(--line);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.ev-row:hover { background: var(--panel2); border-color: var(--line2); }
.ev-row-time {
  flex: none; width: 92px; font-family: var(--f-head); font-size: 12px; font-weight: 700;
  color: var(--mut); font-variant-numeric: tabular-nums;
}
.ev-row-bar { flex: none; align-self: stretch; width: 4px; border-radius: 4px; background: var(--k); min-height: 28px; }
.ev-row.evk-task .ev-row-bar { background: transparent; border: 2px dashed var(--k); width: 0; }
.ev-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-row-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ev-row-meta { font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-kind-tag { color: color-mix(in srgb, var(--k) 70%, var(--paper)); font-weight: 600; }
.ev-tag {
  display: inline-block; font-family: var(--f-head); font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; vertical-align: middle;
  color: var(--mut); border: 1px solid var(--line2); letter-spacing: .02em;
}
.ev-tag--cancel { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.ev-rsvp-tag {
  flex: none; font-family: var(--f-head); font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--mut);
}
.ev-rsvp-tag.rsvp-invited { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ev-rsvp-tag.rsvp-going { color: var(--paper); border-color: color-mix(in srgb, var(--ev-activity) 55%, transparent); }
.ev-rsvp-tag.rsvp-declined { opacity: .7; }

/* ------------------------------------------------------------- week */
.ev-wk { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.ev-wk-row { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.ev-wk-gut {
  font-family: var(--f-head); font-size: 10px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px; text-align: right;
}
.ev-wk-head { border-bottom: 1px solid var(--line); background: var(--panel); }
.ev-wk-dh {
  display: flex; flex-direction: column; align-items: center; padding: 7px 2px; gap: 1px;
  border-left: 1px solid var(--line); font-family: var(--f-head); min-width: 0;
}
.ev-wk-dh span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.ev-wk-dh b { font-size: 17px; font-weight: 800; color: var(--paper); width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 50%; }
.ev-wk-dh.today b { background: var(--accent); color: var(--accent-ink); }
.ev-wk-allday { border-bottom: 1px solid var(--line2); background: var(--panel2); }
.ev-wk-allday .ev-wk-gut { align-self: center; }
.ev-wk-adcell {
  border-left: 1px solid var(--line); padding: 4px 3px; min-height: 34px; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.ev-wk-scroll { max-height: max(360px, calc(100vh - 340px)); overflow-y: auto; overflow-x: hidden; position: relative; }
.ev-wk-scroll:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: -2px; }
.ev-wk-grid { height: calc(var(--ev-hours) * var(--ev-hpx) + 12px); padding-top: 6px; position: relative; }
.ev-wk-hours { position: relative; padding: 0; }
.ev-wk-hl {
  position: absolute; right: 6px; transform: translateY(-50%);
  font-family: var(--f-head); font-size: 10.5px; font-weight: 600; color: var(--faint);
  font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0;
}
.ev-wk-col {
  position: relative; border-left: 1px solid var(--line); min-width: 0;
  height: calc(var(--ev-hours) * var(--ev-hpx));
  background-image: repeating-linear-gradient(to bottom,
    var(--line) 0, var(--line) 1px, transparent 1px, transparent var(--ev-hpx));
}
.ev-wk-col.today { background-color: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.ev-slot {
  position: absolute; left: 0; right: 0; height: var(--ev-hpx); padding: 0; margin: 0;
  border: 0; background: transparent; cursor: cell;
}
.ev-slot:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ev-block {
  position: absolute; z-index: 2; overflow: hidden; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 1px; padding: 3px 6px;
  border-radius: 7px; border: 1px solid color-mix(in srgb, var(--k) 45%, transparent);
  border-left: 3px solid var(--k);
  background: color-mix(in srgb, var(--k) calc(var(--ev-wash) + 6%), var(--panel));
  color: var(--paper); font: inherit; font-size: 11.5px; line-height: 1.3;
  box-shadow: 0 1px 0 var(--ring);
  transition: filter .14s var(--ease), box-shadow .14s var(--ease);
}
.ev-block:hover { filter: brightness(1.08); z-index: 3; box-shadow: var(--sh-sm, 0 2px 8px rgba(0,0,0,.2)); }
.ev-block.is-invited { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ev-block.edge-early { border-top: 2px dashed var(--k); }
.ev-block.edge-late { border-bottom: 2px dashed var(--k); }
.ev-block-time { font-family: var(--f-head); font-size: 10.5px; font-weight: 700; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-block-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ev-block-loc { font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-now {
  position: absolute; left: 0; right: 0; height: 2px; z-index: 4; pointer-events: none;
  background: var(--danger);
}
.ev-now::before {
  content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger);
}

/* ---------------------------------------------------------- modals */
.ev-modal .modal-head { align-items: flex-start; }
.ev-d-headtxt { flex: 1; min-width: 0; }
.ev-d-headtxt h2 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; margin: 4px 0 0; }
.ev-d-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-kind-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-head); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; color: var(--paper);
  background: color-mix(in srgb, var(--k) calc(var(--ev-wash) + 8%), var(--panel));
  border: 1px solid color-mix(in srgb, var(--k) 50%, transparent);
}
.ev-kind-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--k); }
.ev-detail { border-top: 4px solid var(--k); }

.ev-facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px;
  margin: 0 0 16px; font-size: 13.5px;
}
.ev-facts dt {
  font-family: var(--f-head); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mut); padding-top: 2px;
}
.ev-facts dd { margin: 0; color: var(--paper); overflow-wrap: anywhere; }
.ev-facts a { color: var(--accent-fg); text-decoration: underline; text-underline-offset: 2px; }

.ev-rsvp {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 12px; margin: 0 0 16px; border-radius: var(--r-sm);
  background: var(--panel2); border: 1px solid var(--line);
}
.ev-rsvp-q { flex: 1 1 100%; font-size: 13px; font-weight: 600; color: var(--paper); }
.ev-rsvp-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ev-rsvp-btn.rsvp-declined[aria-pressed="true"] { background: var(--panel3); color: var(--paper); border-color: var(--line2); }

.ev-att-count { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--faint); margin-left: 6px; }
.ev-att {
  list-style: none; margin: 8px 0 16px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px;
}
.ev-att-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.ev-att-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-att-rsvp { flex: none; font-size: 11px; font-weight: 600; color: var(--mut); }
.ev-att-row.rsvp-going .ev-att-rsvp { color: var(--paper); }
.ev-att-row.rsvp-declined { opacity: .6; }
.ev-desc { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin-top: 8px; }
.ev-desc a { color: var(--accent-fg); }
.ev-d-foot { flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------- form */
.ev-form .modal-body { padding-bottom: 8px; }
.ev-ferr {
  margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  color: var(--danger-ink); background: color-mix(in srgb, var(--danger) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
}
.ev-kinds { border: 0; padding: 0; margin: 0 0 15px; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ev-kinds legend { padding: 0; margin-bottom: 6px; width: 100%; }
.ev-kind-opt { position: relative; margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; cursor: pointer; }
.ev-kind-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ev-kind-opt > span {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--mut); font-family: var(--f-head); font-weight: 600;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.ev-kind-opt:hover > span { color: var(--paper); }
.ev-kind-opt input:checked + span {
  color: var(--paper); border-color: var(--k);
  background: color-mix(in srgb, var(--k) calc(var(--ev-wash) + 4%), var(--panel));
}
.ev-kind-opt input:focus-visible + span { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
.ev-when { margin-bottom: 0; }
.ev-time[hidden] { display: none; }
.ev-tz-hint { margin: -6px 0 14px; }
.ev-pick-n { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--faint); }
.ev-pick-bar { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ev-pick-bar .inp { flex: 1 1 auto; min-width: 0; padding: 7px 11px; font-size: 13.5px; }
.ev-pick-list {
  max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 4px; background: var(--panel2);
}
.ev-pick-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; margin: 0; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--paper);
}
.ev-pick-row:hover { background: var(--panel3); }
.ev-pick-row[hidden] { display: none; }
.ev-pick-row input { width: 16px; height: 16px; flex: none; accent-color: var(--accent-line); }
.ev-pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------- upcoming widget */
.ev-upw { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-upw-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--f-head); font-size: 13px; font-weight: 700; color: var(--paper);
}
.ev-upw-all { font-size: 12px; font-weight: 600; color: var(--accent-fg); text-decoration: none; }
.ev-upw-all:hover { text-decoration: underline; }
.ev-upw-body { display: flex; flex-direction: column; gap: 6px; }
.ev-upw-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--paper);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--k);
}
.ev-upw-row:hover { background: var(--panel2); }
.ev-upw-date {
  flex: none; width: 38px; display: flex; flex-direction: column; align-items: center;
  font-family: var(--f-head); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--mut);
}
.ev-upw-date b { font-size: 17px; line-height: 1.1; color: var(--paper); }
.ev-upw-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

/* -------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .ev-cell { min-height: 96px; }
  .ev-chip-time { display: none; }
}
@media (max-width: 640px) {
  .ev-bar { gap: 8px; }
  .ev-title { order: 3; flex: 1 1 100%; font-size: 16px; }
  .ev-modes { margin-left: auto; }
  .ev-modes button { padding: 6px 11px; }
  .ev-fsel { max-width: 100%; flex: 1 1 140px; }
  .ev-keys { display: none; }
  .ev-lday { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
  .ev-lday-num { font-size: 18px; }
  .ev-row { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .ev-row-time { width: auto; flex: 1 1 100%; order: -1; font-size: 11px; }
  .ev-row-bar { display: none; }
  .ev-row { border-left: 3px solid var(--k); }
  .ev-row.evk-task { border-left-style: dashed; }
  .ev-wk-row { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); }
  .ev-wk-gut { font-size: 8.5px; padding: 4px 2px; letter-spacing: 0; }
  .ev-wk-hl { font-size: 9px; right: 3px; }
  .ev-wk-dh { padding: 5px 0; }
  .ev-wk-dh span { font-size: 9px; letter-spacing: 0; }
  .ev-wk-dh b { font-size: 13px; width: 24px; height: 24px; line-height: 24px; }
  .ev-wk-adcell { padding: 3px 1px; }
  .ev-wk-adcell .ev-chip { padding: 1px 3px; font-size: 10px; border-left-width: 2px; }
  .ev-block { padding: 2px 3px; font-size: 10px; border-left-width: 2px; }
  .ev-block-time { display: none; }
  .ev-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ev-facts dd { margin-bottom: 8px; }
  .ev-att { grid-template-columns: minmax(0, 1fr); }
  .ev-d-foot .btn { flex: 1 1 auto; }
  .ev-d-foot .grow { display: none; }
  .ev-pick-bar { flex-wrap: wrap; }
  .ev-pick-bar .inp { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-chip, .ev-row, .ev-block, .ev-fchip, .ev-cell, .ev-add { transition: none; }
  .ev-chip:hover { transform: none; }
}
