/* PRTY OS — marketing screen styles. Screen-specific layout only; reuse components.css for everything else.
   Prefix: mk-  (sub-navigation .mk-subnav is shared with the Artwork queue) */

/* ---------- Sub-navigation (Calendar · Campaigns · Artwork queue) ---------- */
.mk-subnav { margin-bottom: var(--s-5); }

/* ---------- Item drawer: fixed-date toggle, reconciliation banner ---------- */
.mk-fixedtoggle { display: inline-flex; align-items: center; gap: 6px; margin-left: var(--s-2); color: var(--text-2); }
.mk-reconcile { margin-bottom: var(--s-3); }

/* ---------- Toolbar ---------- */
.mk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.mk-nav { display: flex; align-items: center; gap: var(--s-1); min-width: 0; }
.mk-period { font-size: var(--fs-16); font-weight: 600; letter-spacing: -0.01em; margin-left: var(--s-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Filter zone: brand chips (always visible) · campaign menu · collapsible Filters panel ---------- */
.mk-filterzone { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.mk-fbar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.mk-fbar__brands { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mk-fbar__right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mk-fbar__camp { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-fbar__n { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--inverse); color: var(--on-inverse); font-size: var(--fs-10); font-weight: 600; font-variant-numeric: tabular-nums; }

.mk-fsummary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mk-fsum {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 9px; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface-2);
  font-size: var(--fs-12); color: var(--text); white-space: nowrap;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.mk-fsum:hover { border-color: var(--text-3); background: var(--hover); }
.mk-fsum .icon { color: var(--text-3); }
.mk-fsum__n { font-size: var(--fs-11); color: var(--text-3); font-variant-numeric: tabular-nums; }
.mk-fsummary__result { font-size: var(--fs-12); color: var(--text-3); margin-left: var(--s-1); font-variant-numeric: tabular-nums; }

.mk-fpanel { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); }
.mk-fpanel__group { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: var(--s-3); }
.mk-fpanel__label { padding-top: 6px; font-size: var(--fs-11); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.mk-fpanel__chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mk-fpanel__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line-soft); }

.mk-notice { margin-bottom: var(--s-3); }
.mk-ctxicon { display: inline-flex; align-items: center; margin-right: 4px; vertical-align: -1px; color: var(--text-3); }

.mk-legend { padding: var(--s-2) 0 var(--s-3); }
.mk-hint { display: flex; align-items: center; gap: 6px; margin-top: var(--s-3); font-size: var(--fs-12); color: var(--text-4); }

/* ---------- Month grid ---------- */
.mkcal { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.mkcal.is-dragging, .mkcal.is-dragging * { cursor: grabbing !important; user-select: none; }
.mkcal__dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mkcal__dow span { height: 32px; display: flex; align-items: center; padding: 0 var(--s-3); font-size: var(--fs-11); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.mkcal__dow span.is-weekend { color: var(--text-4); }
.mkcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.mkcell {
  position: relative; min-width: 0; min-height: 138px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px 6px 8px;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.mkcell:nth-child(7n) { border-right: 0; }
.mkcell:nth-last-child(-n+7) { border-bottom: 0; }
.mkcell.is-out { background: var(--bg-2); }
.mkcell.is-out .mkcell__num { color: var(--text-4); }
.mkcell.is-selected { box-shadow: inset 0 0 0 1px var(--line-strong); }
.mkcell.is-drop { background: var(--select); box-shadow: inset 0 0 0 1px var(--focus); }

.mkcell__head { display: flex; align-items: center; gap: 4px; height: 26px; min-width: 0; }
.mkcell__marks { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; }
.mkcell__num {
  min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center; flex-shrink: 0;
  font-size: var(--fs-12); font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.mkcell.is-past:not(.is-out) .mkcell__num { color: var(--text-3); }
.mkcell.is-today .mkcell__num { background: var(--inverse); color: var(--on-inverse); font-weight: 600; }
.mkcell__add { margin-left: auto; opacity: 0; transition: opacity var(--dur-1); }
.mkcell:hover .mkcell__add, .mkcell__add:focus-visible { opacity: 1; }
.mkcal.is-dragging .mkcell__add { opacity: 0; }

.mkcell__items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mkcell__more { align-self: flex-start; height: 20px; padding: 0 6px; border-radius: var(--r-1); font-size: var(--fs-11); font-weight: 500; color: var(--text-3); }
.mkcell__more:hover { background: var(--hover); color: var(--text); }
.mkcell__dots { display: none; }

/* Show-day marker (neutral) */
.mkshow {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%;
  height: 20px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-radius: var(--r-1);
  background: var(--surface-2);
  font-size: var(--fs-11); font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: border-color var(--dur-1), color var(--dur-1);
}
.mkshow:hover { color: var(--text); border-color: var(--text-3); }
.mkshow .icon { color: var(--text-3); }
.mkshow__name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Item chip — type colour as a left edge + faint tint */
.mkchip {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0;
  height: 24px; padding: 0 3px 0 8px;
  border-radius: var(--r-1);
  background: color-mix(in srgb, var(--c) 9%, var(--surface-2));
  box-shadow: inset 2px 0 0 var(--c);
  font-size: var(--fs-12); color: var(--text); text-align: left;
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: background var(--dur-1) var(--ease), opacity var(--dur-2) var(--ease);
}
.mkchip:hover { background: color-mix(in srgb, var(--c) 17%, var(--surface-2)); }
.mkchip__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkchip__ev { color: var(--text-2); }
.mkchip__owner { display: inline-flex; flex-shrink: 0; }
.mkchip__owner .avatar { width: 18px; height: 18px; font-size: 8px; }
.mkchip.is-done .mkchip__text, .mkchip.is-done .mkchip__ev { color: var(--text-3); }
.mkchip.is-dragging { opacity: 0.35; }
.mkchip.is-moved, .mkcard.is-moved, .mkrow.is-moved { animation: mk-landed 1100ms var(--ease); }
@keyframes mk-landed { 0% { box-shadow: inset 2px 0 0 var(--c), 0 0 0 1px var(--focus); } 70% { box-shadow: inset 2px 0 0 var(--c), 0 0 0 1px var(--focus); } 100% { box-shadow: inset 2px 0 0 var(--c), 0 0 0 1px transparent; } }
.mkrow.is-moved { animation-name: mk-landed-row; }
@keyframes mk-landed-row { 0%, 60% { background: var(--select); } 100% { background: transparent; } }

/* Drag ghost (floating layer — shadow allowed) */
.mkghost { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; will-change: transform; }
.mkghost .mkchip { height: 28px; box-shadow: inset 2px 0 0 var(--c), 0 10px 28px rgba(0, 0, 0, 0.5); background: color-mix(in srgb, var(--c) 16%, var(--surface-3)); outline: 1px solid var(--line-strong); cursor: grabbing; }
.mkghost__to { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-1); background: var(--surface-3); border: 1px solid var(--line-strong); font-size: var(--fs-11); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Week view ---------- */
.mkweek-wrap { min-width: 0; }
.mkweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.mkweek.is-dragging, .mkweek.is-dragging * { cursor: grabbing !important; user-select: none; }
.mkweek__col { min-width: 0; min-height: 440px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; transition: background var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.mkweek__col:last-child { border-right: 0; }
.mkweek__col.is-drop { background: var(--select); box-shadow: inset 0 0 0 1px var(--focus); }
.mkweek__head { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px 0 var(--s-3); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mkweek__dow { font-size: var(--fs-11); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.mkweek__num { min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; }
.mkweek__month { display: none; font-size: var(--fs-12); color: var(--text-3); }
.mkweek__col.is-today .mkweek__num { background: var(--inverse); color: var(--on-inverse); }
.mkweek__col.is-past .mkweek__num { color: var(--text-3); }
.mkweek__add { margin-left: auto; opacity: 0; transition: opacity var(--dur-1); }
.mkweek__col:hover .mkweek__add, .mkweek__add:focus-visible { opacity: 1; }
.mkweek__body { display: flex; flex-direction: column; gap: 6px; padding: var(--s-2) 6px var(--s-3); flex: 1; }
.mkweek__shows { display: flex; flex-wrap: wrap; gap: 4px; }
.mkweek__empty { font-size: var(--fs-12); color: var(--text-4); padding: 4px 6px; }

.mkcard {
  display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0;
  padding: 8px 8px 8px 10px; border-radius: var(--r-2);
  background: color-mix(in srgb, var(--c) 7%, var(--surface-2));
  box-shadow: inset 2px 0 0 var(--c);
  text-align: left; cursor: grab; user-select: none; -webkit-user-select: none;
  transition: background var(--dur-1) var(--ease), opacity var(--dur-2) var(--ease);
}
.mkcard:hover { background: color-mix(in srgb, var(--c) 13%, var(--surface-2)); }
.mkcard.is-dragging { opacity: 0.35; }
.mkcard__type { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-11); font-weight: 500; color: var(--text-2); }
.mkcard__type .swatch { width: 8px; height: 8px; border-radius: 2px; }
.mkcard__title { font-size: var(--fs-13); font-weight: 500; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.mkcard__ev { font-size: var(--fs-12); color: var(--text-3); }
.mkcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.mkcard.is-done .mkcard__title { color: var(--text-3); }

/* ---------- List view (agenda) ---------- */
.mklist { overflow: hidden; }
.mklist__earlier { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 38px; font-size: var(--fs-12); font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line-soft); transition: background var(--dur-1), color var(--dur-1); }
.mklist__earlier:hover { background: var(--hover); color: var(--text); }
.mklist__day + .mklist__day { border-top: 1px solid var(--line); }
.mklist__dayhead { display: flex; align-items: center; gap: var(--s-2); min-height: 38px; padding: 6px var(--s-4); background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
.mklist__date { font-size: var(--fs-12); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mklist__day.is-past .mklist__date { color: var(--text-3); }
.mklist__day.is-today .mklist__date { color: var(--text); }
.mklist__shows { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.mklist__count { margin-left: auto; font-size: var(--fs-11); color: var(--text-4); white-space: nowrap; font-variant-numeric: tabular-nums; }

.mkrow {
  position: relative; display: grid; align-items: center; width: 100%;
  grid-template-columns: 172px minmax(0, 1fr) 120px 112px;
  gap: var(--s-4); min-height: 48px; padding: 6px var(--s-4) 6px calc(var(--s-4) + 2px);
  border-bottom: 1px solid var(--line-soft); text-align: left;
  transition: background var(--dur-1);
}
.mkrow:last-child { border-bottom: 0; }
.mkrow:hover { background: var(--hover); }
.mkrow__edge { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--c); }
.mkrow__type { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-12); color: var(--text-2); }
.mkrow__main { display: flex; flex-direction: column; min-width: 0; }
.mkrow__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkrow__sub { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkrow__subtype { display: none; }
.mkrow__owner { min-width: 0; }
.mkrow__status { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.mkrow.is-done .mkrow__title { color: var(--text-3); }

/* Mobile day detail (month view) */
.mk-daydetail { margin-top: var(--s-4); }
.mk-daydetail__shows { padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line-soft); }
.mk-empty-line { padding: var(--s-4); font-size: var(--fs-12); color: var(--text-3); }

/* ---------- Campaigns list ---------- */
.mkc-colhead, .mkc-row {
  display: grid; align-items: center; column-gap: var(--s-4);
  grid-template-columns: 30px minmax(0, 1.6fr) 120px 128px 96px minmax(0, 1fr) minmax(0, 1.1fr);
}
.mkc-colhead { padding: 0 var(--s-4) var(--s-2); font-size: var(--fs-11); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-4); }
.mkc-group { margin-top: var(--s-5); }
.mkc-colhead + .mkc-group { margin-top: 0; }
.mkc-group .section-label__text { display: inline-flex; align-items: center; gap: 6px; }
.mkc-panel { overflow: hidden; }
.mkc-row { width: 100%; min-height: 60px; padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line-soft); text-align: left; transition: background var(--dur-1); }
.mkc-row:last-child { border-bottom: 0; }
.mkc-row:hover { background: var(--hover); }
.mkc-row.is-wrapped .mkc-name { color: var(--text-3); }
.mkc-row.is-moved { animation: mk-landed-row 1300ms var(--ease); }
.mkc-row.is-flagged { box-shadow: inset 3px 0 0 var(--amber); }
.mkc-type { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); color: var(--text-2); }
.mkc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mkc-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkc-sub { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkc-brand { min-width: 0; overflow: hidden; }
.mkc-dates { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-12); white-space: nowrap; }
.mkc-owner { min-width: 0; }
.mkc-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.mkc-stat { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-12); color: var(--text-2); }
.mkc-stat__l { color: var(--text-3); }
.mkc-next { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mkc-next__when { font-size: var(--fs-11); color: var(--text-3); white-space: nowrap; }
.mkc-next__title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-12); }
.mkc-next__title .swatch { flex-shrink: 0; }

/* ---------- Drawer ---------- */
.mk-drawer__pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-3); }
.mk-drawer__delete { margin-right: auto; }
.mk-drawer__event { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg-2); }
.mk-drawer__event .icon { vertical-align: -2px; }
.mk-drawer__static { display: flex; align-items: center; gap: var(--s-2); min-height: var(--h-ctl); }
.mk-drawer__dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.mk-drawer__dates .input { padding-left: 8px; padding-right: 6px; }
.mk-typeseg { overflow-x: auto; scrollbar-width: none; }
.mk-typeseg::-webkit-scrollbar { display: none; }
.mk-typeseg .seg { display: flex; }
.mk-typeseg .seg__opt { flex: 1; justify-content: center; height: 30px; }

.mk-tpl__head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; cursor: pointer; }
.mk-plan, .mk-sales-attn { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.mk-plan__dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
.mk-plan__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.mk-plan__details .field:first-child { grid-column: 1 / -1; }
.mk-tpl__head .field__label { margin: 0; }
.mk-tpl__list, .mk-citems { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.mk-tpl__row, .mk-citem {
  display: grid; grid-template-columns: auto 48px 8px minmax(0, 1fr) auto; align-items: center; gap: var(--s-2);
  min-height: 36px; padding: 4px var(--s-3); border-bottom: 1px solid var(--line-soft); cursor: pointer; text-align: left;
  transition: background var(--dur-1);
}
.mk-citem { grid-template-columns: 48px 8px minmax(0, 1fr) auto; width: 100%; }
.mk-tpl__row:last-child, .mk-citem:last-child { border-bottom: 0; }
.mk-tpl__row:hover, .mk-citem:hover { background: var(--hover); }
.mk-tpl__row.is-past { cursor: default; opacity: 0.5; }
.mk-tpl__row .swatch, .mk-citem .swatch { width: 8px; height: 8px; border-radius: 2px; }
.mk-tpl__date { font-size: var(--fs-12); color: var(--text-2); white-space: nowrap; }
.mk-tpl__title { font-size: var(--fs-13); }
.mk-tpl__meta { white-space: nowrap; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .mkcell { min-height: 120px; padding: 4px 4px 6px; }
  .mkchip__owner { display: none; }
  .mkchip { padding-right: 6px; }
  .mkshow__name { display: none; }
  .mkshow { padding: 0 4px; }
  .mkweek-wrap { overflow-x: auto; border-radius: var(--r-3); }
  .mkweek { min-width: 980px; }
  .mkrow { grid-template-columns: 148px minmax(0, 1fr) 104px; }
  .mkrow__owner { display: none; }
  .mkc-colhead, .mkc-row { grid-template-columns: 30px minmax(0, 1.5fr) 128px minmax(0, 1fr) minmax(0, 1fr); }
  .mkc-colhead span:nth-child(3), .mkc-colhead span:nth-child(5), .mkc-brand, .mkc-owner { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .mk-plan__dates, .mk-plan__details { grid-template-columns: 1fr; }
  .mk-plan__details .field:first-child { grid-column: auto; }
  .mk-subnav { margin-bottom: var(--s-4); }
  .mk-toolbar { gap: var(--s-2); }
  .mk-period { font-size: var(--fs-14); margin-left: var(--s-2); }
  .mk-toolbar .btn--sm { --btn-h: 36px; }

  .mk-fbar { flex-direction: column; align-items: stretch; }
  .mk-fbar__brands {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--page-pad)); padding: 2px var(--page-pad);
  }
  .mk-fbar__brands::-webkit-scrollbar { display: none; }
  .mk-fbar__brands .chip, .mk-fpanel__chips .chip { height: 32px; padding: 0 12px; flex-shrink: 0; }
  .mk-fbar__right { margin-left: 0; }
  .mk-fbar__right .btn--sm { --btn-h: 36px; }
  .mk-fbar__camp { max-width: 44vw; }
  .mk-fpanel { padding: var(--s-3); }
  .mk-fpanel__group { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .mk-fpanel__label { padding-top: 0; }

  .mkc-colhead { display: none; }
  .mkc-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "type main" ". dates" ". stats" ". next"; row-gap: 6px; padding: var(--s-3) var(--s-4); }
  .mkc-type { grid-area: type; align-self: start; }
  .mkc-main { grid-area: main; }
  .mkc-name { white-space: normal; }
  .mkc-dates { grid-area: dates; flex-direction: row; gap: var(--s-2); }
  .mkc-stats { grid-area: stats; }
  .mkc-next { grid-area: next; }
  .mk-drawer__dates { grid-template-columns: minmax(0, 1fr); }
  .mk-tpl__meta { display: none; }

  .mk-legend { overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--page-pad)); padding: 0 var(--page-pad) var(--s-3); }
  .mk-legend::-webkit-scrollbar { display: none; }
  .mk-legend .legend { flex-wrap: nowrap; }

  /* Month: compact cells with colour marks; tap a day to see its items below */
  .mkcal__dow span { padding: 0; justify-content: center; font-size: var(--fs-10); }
  .mkcell { min-height: 60px; padding: 4px 2px; align-items: center; gap: 4px; cursor: pointer; }
  .mkcell__head { justify-content: center; height: 24px; }
  .mkcell__add, .mkcell__marks, .mkcell__items { display: none; }
  .mkcell__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 40px; }
  .mkcell__dots .swatch { width: 6px; height: 6px; border-radius: 2px; }
  .mkcell__dotsmore { font-size: 9px; line-height: 6px; color: var(--text-3); }
  .mkcell.is-selected { box-shadow: inset 0 0 0 1.5px var(--text-3); }

  /* Week: stack days */
  .mkweek-wrap { overflow: visible; }
  .mkweek { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .mkweek__col { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .mkweek__col:last-child { border-bottom: 0; }
  .mkweek__month { display: inline; }
  .mkweek__add { opacity: 1; }
  .mkweek__add.btn--sm { --btn-h: 36px; }

  /* List */
  .mklist__dayhead { padding: 6px var(--page-pad); }
  .mkrow { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); min-height: 60px; padding: 8px var(--s-4) 8px calc(var(--s-4) + 2px); }
  .mkrow__type { display: none; }
  .mkrow__title { white-space: normal; }
  .mkrow__subtype { display: inline; }

  .mk-drawer__pair { grid-template-columns: minmax(0, 1fr); }
}

.mk-pipeline-event { display: flex; flex-direction: column; gap: 4px; padding: 8px; margin: 4px 0; border: 1px solid var(--line); border-radius: 6px; color: inherit; text-decoration: none; font-size: 12px; overflow-wrap: anywhere; }
.mk-pipeline-event:hover { background: var(--surface-2); }
.mk-pipeline-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.mk-pipeline-list .mk-pipeline-event { padding: 14px; }

.mk-pipeline-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mk-pipeline-toolbar .input { width: auto; flex: 1 1 200px; }
.mk-pipeline-toolbar .select { width: auto; flex: 1 1 150px; }

.mk-show-reference { display: flex; flex-direction: column; gap: 3px; padding: 6px; margin: 3px 0; border: 1px solid #6a6f7b; border-left: 3px solid #c1c5ce; border-radius: 5px; color: inherit; background: var(--surface-2); font-size: 11px; text-decoration: none; overflow-wrap: anywhere; }
.mk-show-reference span { color: var(--text-3); }
