/* Часть (в): стили календаря, общего доступа, уведомлений, настроек, корзины и слотов панели задачи.
   Классы — с приставкой m-. Цвета — только переменные из /shared/tokens.css. Телефон (390 px) в первую очередь. */

/* ───────── общее ───────── */
.m-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.m-stack { display: inline-flex; align-items: center; }
.m-stack > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); border-radius: 50%; }
.m-stack > *:first-child { margin-left: 0; }
.m-stack-n { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700; }
.m-pend { display: inline-flex; align-items: center; gap: 3px; color: var(--warn); font-size: 11.5px; font-weight: 600; }
.m-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.m-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.m-btnrow .btn { flex: 1 1 auto; }
.m-url { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font: 500 14px/1.3 var(--font); min-width: 0; }
.m-url .ic { color: var(--muted); }
.m-qr { width: min(260px, 70vw); margin: 4px auto 8px; padding: 12px; background: #fff; border-radius: 18px; border: 1px solid var(--line); aspect-ratio: 1; }
.m-qr svg { width: 100%; height: 100%; }
.m-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.m-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }

/* строки настроек */
.m-sets { margin-top: 0; }
.m-set { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.m-set:last-child { border-bottom: 0; }
.m-set-col { flex-direction: column; align-items: stretch; gap: 10px; }
.m-set-t { font-size: 15px; font-weight: 550; color: var(--ink); }
.m-set-s { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.m-set-c { flex: none; display: flex; align-items: center; gap: 8px; }
.m-set .notice { margin: 0; width: 100%; }
.m-group { margin-top: 22px; }
.m-group .sec-h { margin-bottom: 8px; padding-inline: 4px; }
.m-sel { min-height: 40px; padding-block: 6px; font-size: 14px; width: auto; max-width: 190px; }
.m-tz { max-width: 210px; }
.m-time { width: 112px; min-height: 40px; padding: 6px 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.m-quiet { gap: 8px; }
.m-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 12px; }
.m-choice { display: flex; flex-direction: column; gap: 6px; }
.m-choice-i { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t), background var(--t); }
.m-choice-i:hover { border-color: var(--line-strong); }
.m-choice-i.on { border-color: var(--brand); background: var(--primary-soft); }
.m-choice-i input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.m-choice-i input:focus-visible + .m-radio { box-shadow: var(--ring); }
.m-radio { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; }
.m-choice-i.on .m-radio { border-color: var(--primary); }
.m-choice-i.on .m-radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.m-me { flex-direction: row; align-items: center; gap: 14px; color: var(--ink); text-decoration: none !important; }
.m-me:hover { border-color: var(--line-strong); }
.m-me-n { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.m-sync { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.m-sync.ok .ic { color: var(--ok); }
.m-sync.err { color: var(--danger); }
.m-morepage .menu { margin-top: 14px; }
.m-upd { margin-top: 18px; }
.m-ver { margin: 22px 0 8px; }
.m-acc { margin-top: 8px; }
.m-about { align-items: flex-start; }
.m-dl { margin: 0; display: grid; gap: 6px; width: 100%; }
.m-dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; min-width: 0; }
.m-dl dt { color: var(--muted); }
.m-dl dd { margin: 0; font-weight: 600; min-width: 0; }
.m-feed-hero { margin-top: 8px; }
.m-feed-off { margin: 14px 4px; }
.m-how { font-size: 13.5px; color: var(--ink-2); }
.m-how summary { cursor: pointer; font-weight: 650; color: var(--primary); min-height: 32px; display: flex; align-items: center; }
.m-how p { margin: 6px 0; }
.m-drop-file { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 16px; border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer; color: var(--ink-2); }
.m-drop-file:hover, .m-drop-file:focus-within { border-color: var(--brand); background: var(--primary-soft); }
.m-drop-file.busy .ic { animation: tb-spin 1s linear infinite; }
.m-report { padding: 14px; border-radius: 14px; background: var(--ok-soft); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.m-report .ic { color: var(--ok); }
.m-report details summary { cursor: pointer; font-weight: 600; }
.m-report ul { margin: 6px 0 0; padding-left: 18px; }

/* ───────── комментарии (панель задачи) ───────── */
.m-comments .sec-h { margin-bottom: 6px; }
.m-cmts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.m-cmt { display: flex; gap: 10px; align-items: flex-start; }
.m-cmt-b { flex: 1; min-width: 0; padding: 8px 12px 9px; border-radius: 4px 16px 16px 16px; background: var(--surface-2); }
.m-cmt.mine .m-cmt-b { background: var(--primary-soft); }
.m-cmt-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.m-cmt-h b { color: var(--ink); font-size: 13.5px; max-width: 60%; }
.m-cmt-t { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.m-cmt-act { display: flex; gap: 14px; margin-top: 2px; }
.m-cmt-act .link { min-height: 28px; font-size: 12.5px; }
.m-cmt-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.m-cmt-empty { margin: 2px 0 6px; }
.m-cmt-new { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; padding: 8px 0 4px; background: var(--surface); }
.m-cmt-new .input { min-height: 44px; max-height: 180px; resize: none; padding-block: 11px; border-radius: 22px; font-size: 15px; line-height: 1.35; }
.m-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; transition: opacity var(--t), transform var(--t-fast); }
.m-send:disabled { opacity: .35; cursor: default; }

/* ───────── история ───────── */
.m-hist { margin-bottom: 8px; }
.m-hist-tg { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink-2); font-weight: 650; font-size: 14.5px; text-align: left; }
.m-hist-tg:hover { color: var(--ink); }
.m-chev { transition: transform var(--t) var(--ease); color: var(--faint); }
.m-chev.on { transform: rotate(180deg); }
.m-hist-b { padding: 4px 0 8px; }
.m-hl { list-style: none; margin: 0 0 8px; padding: 0; }
.m-h { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.m-h:last-child { border-bottom: 0; }
.m-h-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.m-h-t { font-size: 14px; font-weight: 600; }
.m-h-ch { margin: 2px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.m-h-ch s { text-decoration-thickness: 1px; }
.m-h-w { display: flex; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 2px; min-width: 0; }

/* кнопка «Поделиться» в шапке списка */
.m-sharebtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; min-width: 42px; padding: 0 9px; border-radius: 12px; color: var(--ink-2); text-decoration: none !important; justify-content: center; }
.m-sharebtn:hover { background: var(--surface-2); }
.m-sharebtn.on { padding-left: 6px; }
.m-sb-n { display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 12px; font-weight: 700; place-items: center; }
/* телефон: в шапке списка только число участников и кнопка — имя списка не режется */
@media (max-width: 599px) {
  .m-sharebtn .m-stack { display: none; }
  .m-sharebtn .m-sb-n { display: inline-grid; }
  .m-sharebtn { gap: 2px; padding: 0 6px; min-width: 40px; }
}

/* ───────── общий доступ ───────── */
.m-mems, .m-plist, .m-invs { list-style: none; margin: 0; padding: 0; }
.m-mem, .m-pp, .m-inv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.m-mem:last-child, .m-pp:last-child, .m-inv:last-child { border-bottom: 0; }
.m-mem-n { font-weight: 650; }
.m-mem-r { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.m-invite { gap: 14px; }
.m-invite .sec-h { margin-bottom: 0; }
.m-role { display: flex; flex-direction: column; gap: 8px; }
.m-role .seg { align-self: flex-start; }
.m-invlink { display: flex; flex-direction: column; gap: 10px; }
.m-invlink > .btn { align-self: flex-start; }
.m-byid .row { align-items: stretch; }
.m-byid .input { min-width: 0; }
.m-people { margin-top: 4px; }
.m-leave-h { display: flex; gap: 6px; align-items: center; margin: 18px 0; }

/* /join */
.m-join { min-height: 100dvh; display: flex; flex-direction: column; background:
  radial-gradient(80% 50% at 100% 0%, color-mix(in oklab, var(--brand) 14%, transparent), transparent 70%),
  radial-gradient(60% 40% at 0% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 70%), var(--bg); }
.m-join-top { padding: calc(16px + env(safe-area-inset-top)) 20px 0; display: flex; justify-content: center; min-height: 44px; }
.m-join-in { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding-top: 6vh; padding-bottom: 32px; }
.m-join-card { width: 100%; max-width: 440px; align-items: center; text-align: center; gap: 12px; padding: 28px 22px; border-radius: 26px; box-shadow: var(--sh-2); }
.m-join-card .btn { width: 100%; }
.m-join-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: var(--lc); background: color-mix(in oklab, var(--lc) 14%, var(--surface)); }
.m-join-from { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }

/* ───────── уведомления ───────── */
.m-ntfs { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.m-ntfs > li { border-bottom: 1px solid var(--line); }
.m-ntfs > li:last-child { border-bottom: 0; }
.m-ntf { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.m-ntf:hover { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.m-ntf.unread { background: color-mix(in oklab, var(--primary-soft) 55%, var(--surface)); }
.m-ntf-av { position: relative; flex: none; }
.m-ntf-ev { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 2px var(--surface); }
.m-ntf-t { font-weight: 600; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.m-ntf-b { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.m-ntf-w { color: var(--muted); font-size: 12px; margin-top: 3px; }
.m-ntf-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.m-pinv { gap: 10px; }

/* ───────── корзина ───────── */
.m-trs { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.m-tr { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.m-tr:last-child { border-bottom: 0; }
.m-tr-ic { flex: none; color: var(--faint); display: grid; place-items: center; width: 24px; }
.m-tr-t { font-weight: 600; font-size: 15px; display: block; max-width: 100%; }
.m-tr-open { border: 0; background: none; padding: 0; color: var(--ink); text-align: left; cursor: pointer; }
.m-tr-open:hover { color: var(--primary); }
.m-tr-s { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tr-w { font-size: 12px; color: var(--muted); }
.m-tr-act { display: flex; align-items: center; gap: 2px; flex: none; }
.m-tr-del { color: var(--danger); }
.m-tr-del:hover { background: var(--danger-soft); }
.m-tr-note { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; }


/* ───────── календарь ───────── */
.m-calpage { min-height: 0; }
.m-cal { --hour: 48px; --gut: 50px; container-type: inline-size; display: flex; flex-direction: column;
  height: calc(100dvh - var(--tab-h) - 20px - env(safe-area-inset-bottom)); min-height: 420px; }
@media (min-width: 900px) { .m-cal { height: 100dvh; } }
.m-cal-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title nav' 'views views'; align-items: center; gap: 6px 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px; }
.m-cal-tt { grid-area: title; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.m-cal-tt h1 { font-size: 22px; letter-spacing: -.02em; }
.m-cal-rel { font-size: 13px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.m-cal-nav { grid-area: nav; display: flex; align-items: center; gap: 2px; }
.m-today.on { border-color: var(--brand); color: var(--primary); }
.m-cal-views { grid-area: views; display: flex; align-items: center; gap: 8px; min-width: 0; }
.m-cal-views .seg { flex: 1 1 auto; }
.m-cal-views .seg-i { flex: 1; }
.m-nd-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: 14px; }
.m-nd-btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-soft-ink); font-size: 12px; display: grid; place-items: center; }
@media (max-width: 420px) { .m-nd-btn > span:not(.ic) { display: none; } }
@media (min-width: 900px) { .m-cal-top { padding: 18px 20px 10px 28px; } .m-cal-tt h1 { font-size: 26px; } }
@container (min-width: 780px) {
  .m-cal-top { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'title nav views'; }
  .m-cal-views .seg { flex: none; }
}
@container (min-width: 860px) { .m-nd-btn { display: none; } }
.m-cal-hint { display: flex; align-items: center; gap: 6px; margin: 0 16px 8px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 550; }
@media (min-width: 900px) { .m-cal-hint { margin: 0 20px 10px 28px; } }

.m-cal-load { display: flex; gap: 10px; align-items: center; margin: 0 16px 8px; }
@media (min-width: 900px) { .m-cal-load { margin: 0 20px 10px 28px; } }
.m-cal-body { flex: 1; min-height: 0; display: flex; gap: 0; border-top: 1px solid var(--line); background: var(--surface); }
.m-cal-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.m-nodue { display: none; }
@container (min-width: 860px) {
  .m-nodue { display: flex; flex-direction: column; gap: 6px; width: 260px; flex: none; border-left: 1px solid var(--line); padding: 14px 12px; overflow-y: auto; background: var(--bg); }
}
.m-nodue-h { display: flex; align-items: center; gap: 8px; }
.m-nodue-h h2 { font-size: 16px; }
.m-nd-list ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.m-nd-i { display: flex; align-items: center; gap: 2px; }
.m-nd-i .icon-btn { width: 38px; height: 38px; color: var(--muted); }
.m-nd { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 550; color: var(--ink); text-align: left; cursor: grab; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.m-nd:hover { border-color: var(--line-strong); }
.m-nd.ro { cursor: pointer; }
.m-nd-empty { display: flex; gap: 6px; align-items: center; padding: 12px 0; }

/* полоса недели (телефон, вид «день») */
.m-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 8px 8px; }
.m-sd { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 56px; padding: 4px 0; border: 0; border-radius: 14px; background: none; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.m-sd b { font-size: 17px; color: var(--ink); font-weight: 700; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.m-sd i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.m-sd i.on { background: var(--brand); }
.m-sd.today b { color: var(--primary); box-shadow: inset 0 0 0 2px var(--brand); }
.m-sd.on b { background: var(--primary); color: var(--on-primary); box-shadow: none; }

/* сетка по времени */
.m-tg { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; position: relative; }
.m-tg-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.m-tg-row { display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); }
.m-gut { border-right: 1px solid var(--line); }
.m-gut-ad { font-size: 10.5px; line-height: 1.15; color: var(--faint); text-align: right; padding: 6px 6px 0 0; font-weight: 600; }
.m-dh { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0 4px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; font-weight: 650; min-width: 0; }
.m-dh:last-child { border-right: 0; }
.m-dh b { font-size: 18px; color: var(--ink); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.m-dh:hover b { background: var(--surface-2); }
.m-dh.today { color: var(--primary); }
.m-dh.today b { background: var(--primary); color: var(--on-primary); }
.m-dh.we { color: var(--faint); }
.m-tg-ad { border-top: 1px solid var(--line); }
.m-tg.one .m-tg-ad { border-top: 0; }
.m-ad { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 4px 3px 22px; min-height: 40px; border-right: 1px solid var(--line); min-width: 0; }
.m-ad:last-child { border-right: 0; }
.m-ad-add { position: absolute; right: 3px; bottom: 2px; width: 22px; height: 20px; border-radius: 6px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; opacity: .35; }
.m-ad:hover .m-ad-add, .m-ad-add:focus-visible { opacity: 1; background: var(--surface-2); }
@media (hover: none) { .m-ad-add { opacity: .7; } }
.m-more { align-self: flex-start; border: 0; background: none; padding: 1px 6px; min-height: 22px; border-radius: 6px; color: var(--primary); font-size: 12px; font-weight: 700; }
.m-more:hover { background: var(--primary-soft); }

.m-tg-grid { position: relative; display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); height: calc(var(--hour) * 24); }
.m-hours { position: relative; border-right: 1px solid var(--line); }
.m-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 550; }
.m-col { position: relative; border-right: 1px solid var(--line); min-width: 0; cursor: cell;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in oklab, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% var(--hour); background-position: 0 0, 0 calc(var(--hour) / 2); }
.m-col:last-child { border-right: 0; }
.m-col.we { background-color: color-mix(in oklab, var(--surface-2) 35%, transparent); }
.m-col.today { background-color: color-mix(in oklab, var(--primary-soft) 40%, transparent); }
.m-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.m-now i { position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* задача в сетке, в «весь день», в месяце */
.m-ev { --lc: var(--c-indigo); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.m-blk { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 3px 6px 4px 8px; overflow: hidden; cursor: grab;
  border-radius: 8px; border: 1px solid color-mix(in oklab, var(--lc) 35%, transparent); border-left: 3px solid var(--lc);
  background: color-mix(in oklab, var(--lc) 16%, var(--surface)); color: var(--ink); font-size: 12.5px; line-height: 1.25; text-align: left;
  box-shadow: 0 1px 2px rgba(20,22,41,.06); transition: box-shadow var(--t-fast), opacity var(--t-fast); }
.m-blk:hover { box-shadow: var(--sh-2); z-index: 3; }
.m-blk:focus-visible { box-shadow: var(--ring); z-index: 3; }
.m-blk-t { display: flex; align-items: center; gap: 4px; font-weight: 650; min-width: 0; }
.m-blk-t .ic { flex: none; color: var(--lc); }
.m-blk-s { color: var(--ink-2); font-size: 11.5px; }
.m-blk.tiny { flex-direction: row; align-items: center; padding-block: 0; }
.m-rsz { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; touch-action: none; }
.m-rsz::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--lc); opacity: 0; transition: opacity var(--t-fast); }
.m-blk:hover .m-rsz::after { opacity: .7; }
.m-chip { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 22px; padding: 1px 6px; border-radius: 6px; border: 0; border-left: 3px solid var(--lc);
  background: color-mix(in oklab, var(--lc) 15%, var(--surface)); color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left; cursor: grab; min-width: 0; }
.m-chip:hover { background: color-mix(in oklab, var(--lc) 24%, var(--surface)); }
.m-chip .ic { flex: none; color: var(--lc); }
.m-chip-tm { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 550; }
.m-ev.shadow { border-style: dashed; background: color-mix(in oklab, var(--lc) 7%, var(--surface)); opacity: .82; }
.m-chip.shadow { border-left-style: dashed; }
.m-ev.done { opacity: .5; }
.m-ev.done .ell { text-decoration: line-through; }
.m-ev.ro { cursor: pointer; }
.m-ev.p3 .m-blk-t .ell::before, .m-chip.p3 > .ell::before { content: '!'; color: var(--p3); font-weight: 800; margin-right: 3px; }

/* месяц */
.m-mg { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; }
.m-mg-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.m-mg-wd span { padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.m-mg-wd span.we { color: var(--faint); }
.m-mg-cells { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(76px, 1fr); }
@media (min-width: 900px) { .m-mg-cells { grid-auto-rows: minmax(104px, 1fr); } }
.m-mc { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 4px 3px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; cursor: cell; }
.m-mc:nth-child(7n) { border-right: 0; }
.m-mc.other { background: color-mix(in oklab, var(--surface-2) 50%, transparent); }
.m-mc.other .m-mc-n { color: var(--faint); }
.m-mc-n { align-self: flex-start; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 99px; border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.m-mc-n:hover { background: var(--surface-2); }
.m-mc.today .m-mc-n { background: var(--primary); color: var(--on-primary); }
.m-mc.sel:not(.today) .m-mc-n { box-shadow: inset 0 0 0 2px var(--brand); }
@media (max-width: 600px) { .m-mc .m-chip { font-size: 10.5px; padding: 0 3px; border-left-width: 2px; min-height: 18px; } .m-mc .m-chip .ic { display: none; } }

/* перетаскивание */
html.m-dragging, html.m-dragging * { cursor: grabbing !important; }
html.m-dragging .m-tg, html.m-dragging .m-mg { scroll-behavior: auto; }
.m-ghost { position: fixed !important; z-index: 500; pointer-events: none; margin: 0 !important; opacity: .92; box-shadow: var(--sh-3) !important; transform-origin: 0 0; rotate: -1.5deg; }
.m-src { opacity: .35 !important; }
.m-drop { position: fixed; z-index: 450; pointer-events: none; display: none; }
.m-drop-time { border-radius: 8px; border: 2px dashed var(--brand); background: color-mix(in oklab, var(--brand) 12%, transparent); color: var(--primary); font: 700 11.5px/1 var(--font); padding: 4px 6px; }
.m-drop-cell { border-radius: 8px; box-shadow: inset 0 0 0 2px var(--brand); background: color-mix(in oklab, var(--brand) 9%, transparent); }

.m-slot-when { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; margin-top: -4px; }
