* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }

.cdc-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cdc-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ---------- Toolbar ---------- */

.cdc-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cdc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cdc-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cdc-brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

.cdc-nav { display: flex; gap: 2px; }

.cdc-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}

.cdc-toolbar-spacer { flex: 1; }

.cdc-view-switch {
  display: inline-flex;
  background: var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 3px;
  gap: 2px;
}

.cdc-view-seg {
  appearance: none;
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: capitalize;
  cursor: pointer;
}

.cdc-view-seg.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

/* ---------- Buttons ---------- */

.cdc-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--radius-btn);
  padding: 7px 12px;
  letter-spacing: -.005em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  transition: background .12s ease;
}

.cdc-btn:hover { background: var(--hover-bg); }

.cdc-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  padding: 8px 14px;
}
.cdc-btn-primary:hover { background: var(--accent); filter: brightness(1.05); }

.cdc-btn-cat {
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  padding: 8px 14px;
}
.cdc-btn-cat:hover { filter: brightness(1.05); }

.cdc-btn-ghost {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cdc-btn-ghost:hover { background: var(--border-subtle); }

.cdc-btn-danger { color: #B91C1C; }

.cdc-icon-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: background .12s ease;
}
.cdc-icon-btn:hover { background: var(--border-subtle); }

.cdc-icon-btn--subtle { color: var(--ink-muted); }

/* ---------- Popover ---------- */

#cdc-popover-root,
#cdc-sheet-root { position: fixed; inset: 0; pointer-events: none; z-index: 9000; }

#cdc-popover-root > *,
#cdc-sheet-root > * { pointer-events: auto; }

.cdc-popover {
  position: fixed;
  width: 320px;
  background: var(--surface);
  border-radius: var(--radius-card-lg);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: var(--shadow-popover);
  padding: 18px;
  font-family: inherit;
  z-index: 9999;
  transition: opacity .12s ease;
}

.cdc-pop-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.cdc-pop-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 7px;
  flex-shrink: 0;
}

.cdc-pop-head-body { flex: 1; min-width: 0; }

.cdc-pop-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cdc-pop-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.cdc-pop-close {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin: -4px -6px 0 0;
  color: var(--ink-muted);
  border-radius: 6px;
  line-height: 0;
}
.cdc-pop-close:hover { background: var(--border-subtle); }

.cdc-pop-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.cdc-pop-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cdc-pop-icon {
  width: 16px;
  margin-top: 2px;
  color: var(--ink-tertiary);
  flex-shrink: 0;
  display: inline-flex;
}

.cdc-pop-row-body { flex: 1; min-width: 0; }
.cdc-pop-row-strong { font-weight: 500; color: var(--ink); }
.cdc-pop-row-muted { color: var(--ink-muted); }
.cdc-pop-notes { color: var(--ink-3); line-height: 1.5; white-space: pre-wrap; }

.cdc-attendees { display: flex; flex-wrap: wrap; gap: 4px; }
.cdc-attendee {
  background: var(--border-subtle);
  color: var(--ink-2);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.cdc-pop-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* ---------- Sheet ---------- */

.cdc-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
}

.cdc-sheet-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity .22s ease;
}
.cdc-sheet-scrim.is-open { opacity: 1; }

.cdc-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top-left-radius: var(--radius-sheet);
  border-top-right-radius: var(--radius-sheet);
  padding: 12px 22px max(28px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.32,.72,.32,1);
}
.cdc-sheet.is-open { transform: translateY(0); }

.cdc-sheet-handle {
  display: block;
  width: 38px;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 14px;
}

.cdc-sheet-head { margin-bottom: 14px; }
.cdc-sheet-rows { gap: 12px; font-size: 14px; }

.cdc-sheet-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.015em;
}

.cdc-sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- Settings drawer ---------- */

.cdc-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--scrim);
  opacity: 0;
  transition: opacity .18s ease;
}
.cdc-settings-overlay.is-open { opacity: 1; }

.cdc-settings {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  z-index: 8500;
  box-shadow: -10px 0 40px rgba(15,23,42,.18);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32,.72,.32,1);
  display: flex;
  flex-direction: column;
}
.cdc-settings.is-open { transform: translateX(0); }

.cdc-settings-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.cdc-settings-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.cdc-settings-body { padding: 18px 22px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; font-size: 13.5px; color: var(--ink-2); }

.cdc-settings-section h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.cdc-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cdc-member-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--hover-bg);
  border-radius: var(--radius-btn);
  font-size: 13px;
}
.cdc-member-row code { color: var(--ink-muted); font-size: 11.5px; }

.cdc-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.cdc-form-row input {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-btn);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
}
.cdc-form-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.cdc-status-bar {
  padding: 10px 22px;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-height: 0;
}
.cdc-status-bar.is-error { color: #B91C1C; background: #FEF2F2; }
.cdc-status-bar:empty { display: none; }

/* ---------- Desktop month view ---------- */

.cdc-month {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
}

.cdc-month-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.cdc-month-header {
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-right: 1px solid var(--border-subtle);
}
.cdc-month-header:last-child { border-right: none; }

.cdc-month-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  background: var(--surface);
}

.cdc-month-cell {
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 2px;
  background: var(--surface);
}
.cdc-month-cell:nth-child(7n) { border-right: none; }
.cdc-month-cell:nth-child(n+36) { border-bottom: none; }
.cdc-month-cell.is-out { background: var(--bg); }

.cdc-month-cell-head {
  display: flex;
  justify-content: flex-end;
  padding: 2px 4px 4px;
}
.cdc-month-day-num {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 2px 6px;
}
.cdc-month-cell.is-out .cdc-month-day-num { color: var(--ink-disabled); }
.cdc-month-day-circle {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
}

.cdc-month-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.cdc-month-chip {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  transition: background .12s ease;
  width: 100%;
  min-width: 0;
}
.cdc-month-chip:hover { background: var(--hover-bg); }
.cdc-month-chip.is-dimmed { opacity: .5; }

.cdc-month-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.cdc-month-chip-time {
  color: var(--ink-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.cdc-month-chip-title {
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.cdc-month-chip.is-allday {
  color: #fff;
  padding: 2px 8px;
  font-weight: 500;
  letter-spacing: -.005em;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.cdc-month-chip.is-allday:hover { filter: brightness(1.05); background: inherit; }

.cdc-month-more {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-weight: 500;
  padding: 2px 8px;
  cursor: pointer;
  user-select: none;
}

/* ---------- Desktop week view ---------- */

.cdc-week {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
}

.cdc-week-headers {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cdc-week-header {
  padding: 12px 14px 10px;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cdc-week-header-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cdc-week-header.is-today .cdc-week-header-name { color: var(--accent); }

.cdc-week-header-num {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
}
.cdc-week-header-circle {
  background: var(--accent);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.cdc-week-allday {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cdc-week-allday-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: var(--ink-tertiary);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10px;
}
.cdc-week-allday-cell {
  padding: 6px;
  border-left: 1px solid var(--border-subtle);
  min-height: 30px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cdc-week-allday-pill {
  appearance: none;
  border: none;
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-chip);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-family: inherit;
  display: block;
}
.cdc-week-allday-pill:hover { filter: brightness(1.05); }

.cdc-week-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  position: relative;
}

.cdc-week-grid {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  position: relative;
}

.cdc-week-gutter { position: relative; }

.cdc-week-hour-label {
  height: var(--hour-row);
  padding-right: 8px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-tertiary);
  text-align: right;
  transform: translateY(-6px);
}

.cdc-week-col {
  position: relative;
  border-left: 1px solid var(--border-subtle);
  background: var(--surface);
}
.cdc-week-col.is-today { background: var(--accent-tint); }

.cdc-week-hour-row {
  height: var(--hour-row);
  border-top: 1px solid var(--border-subtle);
}
.cdc-week-hour-row.is-first { border-top: none; }

.cdc-week-block {
  appearance: none;
  border: none;
  font-family: inherit;
  position: absolute;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  font-size: 12px;
  z-index: 2;
  text-align: left;
  box-shadow: var(--shadow-card-rest);
  transition: box-shadow .12s ease, transform .08s ease;
}
.cdc-week-block:hover { box-shadow: var(--shadow-card-hover); }

.cdc-week-block-title {
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.cdc-week-block-time {
  font-size: 11px;
  opacity: .75;
  margin-top: 1px;
}

.cdc-week-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid var(--accent);
  z-index: 4;
  pointer-events: none;
}
.cdc-week-now-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  display: block;
}

/* ---------- Mobile month view ---------- */

.cdc-mmonth {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.cdc-mmonth-header {
  padding: 8px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.cdc-mmonth-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cdc-mmonth-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-top: 1px;
}
.cdc-mmonth-nav {
  display: flex;
  gap: 4px;
}

.cdc-round-btn {
  appearance: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--ink-3);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}
.cdc-round-btn:hover { background: var(--hover-bg); }

.cdc-mmonth-day-letters {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 12px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.cdc-mmonth-day-letters > div {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.cdc-mmonth-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px;
  gap: 1px;
  flex-shrink: 0;
}

.cdc-mmonth-cell {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  aspect-ratio: 1 / 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: var(--radius-day);
  transition: background .14s ease;
  font-family: inherit;
  padding: 0;
}
.cdc-mmonth-cell.is-picked { background: var(--accent); }
.cdc-mmonth-cell-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.cdc-mmonth-cell.is-out .cdc-mmonth-cell-num { color: var(--ink-disabled); }
.cdc-mmonth-cell.is-today .cdc-mmonth-cell-num {
  color: var(--accent);
  font-weight: 700;
}
.cdc-mmonth-cell.is-picked .cdc-mmonth-cell-num {
  color: #fff;
  font-weight: 500;
}

.cdc-mmonth-cell-dots {
  display: flex;
  gap: 2.5px;
  height: 4px;
}
.cdc-mmonth-cell-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
}
.cdc-mmonth-cell.is-picked .cdc-mmonth-cell-dot {
  background: #fff !important;
  opacity: .85;
}

.cdc-mmonth-agenda {
  flex: 1;
  margin-top: 14px;
  background: var(--surface);
  border-top-left-radius: var(--radius-sheet);
  border-top-right-radius: var(--radius-sheet);
  padding: 18px 20px max(22px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-agenda-sheet);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cdc-mmonth-agenda-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.cdc-mmonth-agenda-day {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.cdc-mmonth-agenda-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.cdc-fab {
  appearance: none;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
}
.cdc-fab:hover { filter: brightness(1.05); }

.cdc-mmonth-agenda-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cdc-mmonth-agenda-empty {
  text-align: center;
  padding: 28px 0;
  color: var(--ink-tertiary);
  font-size: 13.5px;
}

/* ---------- Shared agenda row (mobile views) ---------- */

.cdc-agenda-row {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-card);
  align-items: center;
  width: 100%;
}

.cdc-agenda-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 56px;
  gap: 1px;
}
.cdc-agenda-time-start {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
}
.cdc-agenda-time-end {
  font-size: 11px;
  opacity: .65;
}

.cdc-agenda-rule {
  width: 3px;
  align-self: stretch;
  border-radius: 999px;
  flex-shrink: 0;
}

.cdc-agenda-body { flex: 1; min-width: 0; }
.cdc-agenda-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdc-agenda-location {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Mobile week view ---------- */

.cdc-mweek {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  overflow: hidden;
}

.cdc-mweek-header {
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.cdc-mweek-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cdc-mweek-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-top: 1px;
}

.cdc-mweek-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 12px 12px;
  gap: 4px;
  flex-shrink: 0;
}

.cdc-mweek-strip-cell {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 7px;
  border-radius: var(--radius-day);
  gap: 4px;
  font-family: inherit;
  transition: background .14s ease;
}
.cdc-mweek-strip-cell.is-picked { background: var(--accent); }

.cdc-mweek-strip-letter {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.cdc-mweek-strip-cell.is-picked .cdc-mweek-strip-letter { color: rgba(255,255,255,.85); }

.cdc-mweek-strip-num {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1;
}
.cdc-mweek-strip-num.is-today { color: var(--accent); }
.cdc-mweek-strip-cell.is-picked .cdc-mweek-strip-num { color: #fff; }

.cdc-mweek-strip-dots {
  display: flex;
  gap: 2.5px;
  height: 4px;
  margin-top: -1px;
}
.cdc-mweek-strip-dot {
  width: 3.5px;
  height: 3.5px;
  border-radius: 999px;
}
.cdc-mweek-strip-cell.is-picked .cdc-mweek-strip-dot {
  background: #fff !important;
}

.cdc-mweek-allday {
  padding: 6px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
  flex-shrink: 0;
}
.cdc-mweek-allday-pill {
  appearance: none;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdc-mweek-allday-pill:hover { filter: brightness(1.05); }

.cdc-mweek-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface);
  position: relative;
}

.cdc-mweek-grid {
  display: grid;
  grid-template-columns: 52px 1fr;
  position: relative;
}

.cdc-mweek-gutter { position: relative; }
.cdc-mweek-hour-label {
  height: var(--hour-row);
  padding-right: 6px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-tertiary);
  text-align: right;
  transform: translateY(-5px);
}

.cdc-mweek-col {
  position: relative;
  border-left: 1px solid var(--border-subtle);
  background: var(--surface);
}

/* ---------- Mobile toolbar adjustments ---------- */
@media (max-width: 720px) {
  .cdc-toolbar {
    gap: 8px;
    padding: 10px 14px;
  }
  .cdc-brand-name,
  .cdc-btn[data-action="today"],
  .cdc-title,
  .cdc-nav,
  .cdc-btn-primary { display: none; }
  .cdc-toolbar-spacer { flex: 1; }
}
