/* «Календар» (PRO-2168): one day of the calendar, web/calendar.js. Theme tokens only, so the dark theme and a
   workspace's own look work without a rule of their own here. */
.cal .screen-head .actions .icon-btn svg { width: 18px; height: 18px; }
.cal-now { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cal-now-row { display: flex; align-items: center; gap: 10px; }
.cal-now-row + .cal-now-row { padding-top: 12px; border-top: 1px solid var(--border); }
.cal-now-row .grow { min-width: 0; cursor: pointer; }
.cal-now-t { font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cal-allday { margin-bottom: 12px; }

.cal-grid-wrap { padding: 8px 10px 8px 0; overflow: hidden; }
.cal-grid { position: relative; margin-left: 50px; }
.cal-hour { position: absolute; left: -50px; right: 0; height: 0; border-top: 1px solid var(--border); }
.cal-hour span { position: absolute; left: 0; top: -8px; width: 42px; text-align: right; font-size: 11px; font-weight: 600; color: var(--fg-faint); background: var(--paper); padding-right: 6px; font-variant-numeric: tabular-nums; }
.cal-gap { position: absolute; left: 2px; right: 2px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cal-gap span { font-size: 12px; font-weight: 600; color: var(--fg-subtle); background: var(--paper); padding: 0 8px; border-radius: var(--r-sm); }
.cal-nowline { position: absolute; left: -8px; right: 0; height: 0; border-top: 2px solid var(--red); z-index: 3; pointer-events: none; }
.cal-nowline::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.cal-ev { --tone: var(--ink); position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; padding: 6px 9px 6px 11px; overflow: hidden;
  border: 0; border-radius: var(--r-md); background: color-mix(in oklab, var(--tone) 9%, var(--paper)); color: var(--fg); box-shadow: inset 3px 0 0 var(--tone), 0 0 0 1px color-mix(in oklab, var(--tone) 18%, transparent); cursor: pointer; font: inherit; }
.cal-ev:hover, .cal-ev:focus-visible { background: color-mix(in oklab, var(--tone) 15%, var(--paper)); outline: none; }
.cal-ev.k-meeting { --tone: var(--blue); }
.cal-ev.k-walk { --tone: var(--spot); }
.cal-ev.k-side { --tone: color-mix(in oklab, var(--blue) 55%, var(--red)); }
.cal-ev.t-bad { --tone: var(--fg-faint); }
.cal-ev.t-bad .cal-ev-t { text-decoration: line-through; color: var(--fg-subtle); }
.cal-ev.soft { background: color-mix(in oklab, var(--tone) 4%, var(--paper)); box-shadow: inset 3px 0 0 color-mix(in oklab, var(--tone) 45%, transparent), 0 0 0 1px var(--border); }
.cal-ev.past { opacity: .62; }
.cal-ev-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-ev-time { font-size: 11.5px; font-weight: 700; color: var(--fg-muted); font-variant-numeric: tabular-nums; flex: none; }
.cal-ev-top .chip { height: 18px; font-size: 10.5px; padding: 0 6px; min-width: 0; }
.cal-ev-t { font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cal-ev.short { flex-direction: row; align-items: center; gap: 6px; padding: 0 8px 0 10px; }
.cal-ev.short .cal-ev-t { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-faint); }
.cal-dot.green { background: var(--success); } .cal-dot.yellow { background: var(--warn); } .cal-dot.red { background: var(--error); }
.cal-ev-s { font-size: 11.5px; color: var(--fg-muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.cal-sheet { gap: 14px; }
.cal-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-acts .btn { height: 42px; padding: 0 16px; font-size: 14px; }
.cal-sync b { color: var(--fg); }
.cal-field .over { margin-bottom: 3px; }
.cal-field > div:last-child { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cal-desc { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-muted); }
.cal-more summary { cursor: pointer; color: var(--fg-muted); }
.cal-more[open] summary { margin-bottom: 8px; }

.cal-progress { padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-subtle); }
.cal-progress .meter i { background: var(--spot); }
.cal-stop { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--paper); }
.cal-stop.done { background: color-mix(in oklab, var(--spot) 7%, var(--paper)); border-color: color-mix(in oklab, var(--spot) 30%, var(--border)); }
.cal-stop.cal-busy { opacity: .6; pointer-events: none; }
.cal-stop > .grow { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-stop-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; }
.cal-tick { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--paper); color: transparent; display: grid; place-items: center; cursor: pointer; }
.cal-tick svg { width: 22px; height: 22px; stroke-width: 2.6; }
.cal-tick:hover { border-color: var(--spot); color: color-mix(in oklab, var(--spot) 50%, transparent); }
.cal-tick.on { background: var(--spot); border-color: var(--spot); color: var(--on-ink); }
.cal-angle { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--fg); }
.cal-note { min-height: 44px; font-size: 13.5px; resize: vertical; }

@media (max-width: 820px) {
  .cal-grid-wrap { padding-right: 6px; }
  .cal-grid { margin-left: 44px; }
  .cal-hour { left: -44px; }
  .cal-hour span { width: 38px; }
  .cal-now-row { flex-wrap: wrap; }
  .cal-now-row .grow { flex: 1 1 100%; }
  .cal-acts .btn { flex: 1 1 calc(50% - 8px); }
}
