/* ═══════════════════════════════════════════════════════
   Calendar V3 — V2 API based, parallel to calendar.css
   ═══════════════════════════════════════════════════════ */

.cv3-module {
  padding: 24px 32px 60px;
  max-width: 1400px;
  margin: 0 auto;
  font-family: -apple-system, 'SF Pro Display', 'PingFang SC', sans-serif;
}

/* ── Topbar (single compact row) ── */
.cv3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.cv3-topbar-start {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.cv3-topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cv3-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ── 周导航（inline） ── */
.cv3-view-week-nav, .cv3-week-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cv3-week-label {
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
  margin-left: 6px;
  white-space: nowrap;
}
.cv3-nav-btn {
  padding: 5px 10px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-background, #fff);
  color: var(--color-text, #0f172a);
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}
.cv3-nav-btn:hover { background: var(--color-surface, #f8fafc); }
.cv3-nav-today {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
}

/* ── 筛选 compact selects ── */
.cv3-select-compact {
  padding: 5px 26px 5px 10px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 7px;
  background: var(--color-background, #fff);
  color: var(--color-text, #0f172a);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s;
}
.cv3-select-compact:focus {
  outline: none;
  border-color: var(--color-primary, #0ea5e9);
}

.cv3-btn {
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-background, #fff);
  color: var(--color-text, #0f172a);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.cv3-btn:hover { background: var(--color-surface, #f8fafc); border-color: #cbd5e1; }
.cv3-btn-primary {
  background: var(--color-primary, #0ea5e9);
  color: #fff;
  border-color: var(--color-primary, #0ea5e9);
}
.cv3-btn-primary:hover {
  background: var(--color-primary-hover, #0284c7);
  border-color: var(--color-primary-hover, #0284c7);
}
.cv3-btn-icon {
  padding: 7px 10px;
  color: var(--color-text-secondary, #64748b);
  font-size: 15px;
}

/* ── 视图切换 ── */
/* ── View dropdown ── */
.cv3-view-dropdown {
  position: relative;
}
.cv3-view-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 7px;
  background: var(--color-background, #fff);
  color: var(--color-text, #0f172a);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.cv3-view-dropdown-btn:hover { border-color: var(--color-primary, #0ea5e9); }
.cv3-dropdown-arrow { font-size: 10px; color: var(--color-text-muted, #94a3b8); }
.cv3-view-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  min-width: 130px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
.cv3-view-dropdown-menu.cv3-view-menu-open { display: block; }
.cv3-view-option {
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text, #0f172a);
  transition: background 0.1s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cv3-view-option:hover { background: var(--color-surface, #f8fafc); }
.cv3-view-option-active {
  color: var(--color-primary, #0ea5e9);
  font-weight: 600;
}
.cv3-view-option-active::after { content: '✓'; font-size: 11px; }

/* ── Status Tabs ── */
.cv3-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  margin-bottom: 16px;
}
.cv3-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.cv3-tab:hover { color: var(--color-text, #0f172a); }
.cv3-tab-active {
  color: var(--color-primary, #0ea5e9);
  border-bottom-color: var(--color-primary, #0ea5e9);
  font-weight: 600;
}

/* ── Body states ── */
.cv3-body { min-height: 240px; }
.cv3-loading, .cv3-empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--color-text-secondary, #64748b);
  font-size: 14px;
}
.cv3-error {
  padding: 40px 20px;
  text-align: center;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 13px;
}
.cv3-info {
  padding: 12px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 13px;
  color: #0c4a6e;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════
   Week hour-grid view
   ═══════════════════════════════════════════════════════ */
.cv3-week {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  background: var(--color-background, #fff);
  overflow: hidden;
}

.cv3-week-header {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  background: var(--color-surface, #f8fafc);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.cv3-day-corner {}
.cv3-day-header {
  padding: 8px 8px 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
  border-left: 1px solid var(--color-border, #e2e8f0);
  letter-spacing: 0.02em;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cv3-dow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.4;
}
.cv3-day-header .cv3-date {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  line-height: 1.3;
}
.cv3-day-header.is-today {
  background: transparent;
  color: var(--color-text, #0f172a);
}
.cv3-day-header.is-today .cv3-dow { color: #0369a1; font-weight: 600; }
.cv3-date-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #0ea5e9;
  color: #fff !important;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.cv3-week-body {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  height: calc(100vh - 210px);
  min-height: 480px;
  overflow-y: auto;
  position: relative;
}
.cv3-time-axis {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-background, #fff);
}
.cv3-time-label {
  height: 48px;             /* 48px/h — 1px = 1.25min */
  padding: 4px 8px 0 0;
  text-align: right;
  font-size: 10px;
  color: var(--color-text-muted, #94a3b8);
  font-family: 'SF Mono', Menlo, monospace;
  flex-shrink: 0;
}
.cv3-day-col {
  border-left: 1px solid var(--color-border-light, #f1f5f9);
  position: relative;
  height: 1152px;           /* 24h × 48px */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 47px,
    var(--color-border-light, #f1f5f9) 47px,
    var(--color-border-light, #f1f5f9) 48px
  );
}
.cv3-day-col.is-today {
  background-color: #fafdff;
}

/* ── Current time indicator (child of .cv3-week-body, spans today→Sunday) ── */
.cv3-time-now {
  position: absolute;
  /* left/right/top set by JS */
  height: 2px;
  background: #ef4444;
  pointer-events: none;
  z-index: 10;
}
.cv3-time-now::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
}

/* ── Post card ── */
.cv3-post-card {
  position: absolute;
  left: 4px;
  right: 4px;
  min-height: 36px;
  padding: 4px 6px 4px 8px;
  background: var(--color-background, #fff);
  border: 1px solid var(--platform-color, #0ea5e9);
  border-left-width: 3px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: box-shadow 0.15s, transform 0.15s;
  z-index: 1;
  overflow: hidden;
}
.cv3-post-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
  transform: translateY(-1px);
  z-index: 2;
}
.cv3-post-time {
  font-weight: 700;
  color: var(--color-text, #0f172a);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 10px;
  line-height: 1.4;
}
.cv3-post-title {
  font-size: 10px;
  color: var(--color-text, #0f172a);
  line-height: 1.3;
  margin-top: 1px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cv3-post-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-text-secondary, #64748b);
  margin-top: 2px;
}
.cv3-post-group {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv3-week-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
}
.cv3-muted { color: var(--color-text-muted, #94a3b8); }

/* ═══════════════════════════════════════════════════════
   Channels matrix view
   ═══════════════════════════════════════════════════════ */
.cv3-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.cv3-group-card {
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}
.cv3-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface, #f8fafc);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.cv3-group-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text, #0f172a);
}
.cv3-kind-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.cv3-kind-brand {
  background: #fce7f3;
  color: #be185d;
}
.cv3-group-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  font-weight: 500;
}
.cv3-group-channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
.cv3-channel-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
  color: var(--color-text, #0f172a);
  transition: background 0.15s;
}
.cv3-channel-chip:hover { background: var(--color-surface-2, #f1f5f9); }
.cv3-platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cv3-platform-name {
  font-weight: 500;
  min-width: 70px;
  font-size: 12px;
}
.cv3-handle {
  color: var(--color-text-muted, #94a3b8);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv3-verified {
  color: #10b981;
  font-weight: 700;
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════════
   Modal (create + detail)
   ═══════════════════════════════════════════════════════ */
.cv3-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.cv3-modal {
  background: var(--color-background, #fff);
  border-radius: 14px;
  width: 480px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.cv3-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.cv3-modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
}
.cv3-modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-muted, #94a3b8);
  cursor: pointer;
  padding: 0 4px;
}
.cv3-modal-close:hover { color: var(--color-text, #0f172a); }

.cv3-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.cv3-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-surface, #f8fafc);
}

/* ── Form ── */
.cv3-form { display: flex; flex-direction: column; gap: 14px; }
.cv3-field { display: flex; flex-direction: column; gap: 4px; }
.cv3-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
  letter-spacing: 0.02em;
}
.cv3-field input,
.cv3-field select,
.cv3-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--color-background, #fff);
  color: var(--color-text, #0f172a);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cv3-field input:focus,
.cv3-field select:focus,
.cv3-field textarea:focus {
  outline: none;
  border-color: var(--color-primary, #0ea5e9);
  box-shadow: 0 0 0 3px var(--color-primary-glow, rgba(14,165,233,.22));
}
.cv3-field textarea { resize: vertical; min-height: 60px; }

.cv3-radio-group {
  display: flex;
  gap: 14px;
  padding: 0;
  margin: 0;
  border: none;
  font-size: 13px;
}
.cv3-radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cv3-form-error {
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 12px;
  color: #b91c1c;
}

/* ── Detail panel ── */
.cv3-detail-dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 12px;
  font-size: 13px;
  margin: 0;
}
.cv3-detail-dl dt {
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
  font-size: 12px;
  align-self: center;
}
.cv3-detail-dl dd {
  margin: 0;
  color: var(--color-text, #0f172a);
}
.cv3-detail-dl code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  background: var(--color-surface-2, #f1f5f9);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Detail modal caption + misc ── */
.cv3-detail-caption {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text, #0f172a);
  background: var(--color-surface, #f8fafc);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.cv3-detail-link {
  color: var(--color-primary, #0ea5e9);
  text-decoration: none;
  font-size: 12px;
  font-family: 'SF Mono', Menlo, monospace;
}
.cv3-detail-link:hover { text-decoration: underline; }
.cv3-detail-error {
  color: #b91c1c;
  font-size: 12px;
}

.cv3-status-pill {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.cv3-status-draft        { background: #f1f5f9; color: #475569; }
.cv3-status-needs_review { background: #fef3c7; color: #92400e; }
.cv3-status-scheduled    { background: #dbeafe; color: #1e40af; }
.cv3-status-publishing   { background: #fef9c3; color: #854d0e; }
.cv3-status-published    { background: #d1fae5; color: #065f46; }
.cv3-status-failed       { background: #fee2e2; color: #991b1b; }
.cv3-status-cancelled    { background: #e2e8f0; color: #64748b; }

/* ── 清空筛选按钮 ── */
.cv3-filter-clear {
  padding: 5px 9px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-background, #fff);
  color: var(--color-text-muted, #94a3b8);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}
.cv3-filter-clear:hover {
  color: var(--color-text, #0f172a);
  border-color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════
   Hover-to-create ghost
   ═══════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════
   Post-card metrics row (M3.2)
   ═══════════════════════════════════════════════════════ */
.cv3-post-card.cv3-post-has-metrics {
  min-height: 52px;
}
.cv3-post-metrics {
  display: flex;
  gap: 6px;
  margin-top: 2px;
  font-size: 10px;
  color: var(--color-text-secondary, #64748b);
  font-family: 'SF Mono', Menlo, monospace;
  line-height: 1.2;
}
.cv3-metric {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   Detail modal metrics block (M3.2)
   ═══════════════════════════════════════════════════════ */
.cv3-metrics-block {
  margin-top: 18px;
  padding: 14px;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
}
.cv3-metrics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.cv3-metrics-head strong {
  color: var(--color-text, #0f172a);
  font-size: 13px;
  font-weight: 700;
}
.cv3-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cv3-stat-cell {
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.cv3-stat-label {
  font-size: 10px;
  color: var(--color-text-secondary, #64748b);
  font-weight: 500;
  margin-bottom: 2px;
}
.cv3-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  font-family: 'SF Mono', Menlo, monospace;
}
.cv3-metrics-empty {
  margin-top: 18px;
  padding: 14px;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 12px;
  color: #854d0e;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   Comments block (M4.0)
   ═══════════════════════════════════════════════════════ */
.cv3-comments-block {
  margin-top: 18px;
}
.cv3-comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.cv3-comments-head strong {
  color: var(--color-text, #0f172a);
  font-size: 13px;
  font-weight: 700;
}
.cv3-comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
}
.cv3-comment {
  padding: 8px 10px;
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-left: 3px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  font-size: 12px;
}
.cv3-sentiment-positive { border-left-color: #10b981; }
.cv3-sentiment-neutral  { border-left-color: #94a3b8; }
.cv3-sentiment-negative { border-left-color: #ef4444; }
.cv3-comment-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  margin-bottom: 4px;
}
.cv3-comment-sentiment { font-size: 13px; line-height: 1; }
.cv3-comment-author { font-weight: 600; color: var(--color-text, #0f172a); }
.cv3-comment-time { margin-left: auto; font-family: 'SF Mono', Menlo, monospace; font-size: 10px; }
.cv3-comment-replied {
  padding: 1px 6px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}
.cv3-comment-text {
  color: var(--color-text, #0f172a);
  line-height: 1.5;
  word-break: break-word;
}
.cv3-comment-reply {
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--color-surface, #f8fafc);
  border-radius: 6px;
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
}
.cv3-comments-empty {
  margin-top: 14px;
  padding: 10px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  text-align: center;
}

.cv3-hover-ghost {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 30px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed rgba(14, 165, 233, 0.55);
  border-radius: 6px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-primary, #0ea5e9);
  font-weight: 600;
  z-index: 0;
  font-family: 'SF Mono', Menlo, monospace;
  transition: top 0.05s linear;
}

/* ═══════════════════════════════════════════════════════
   Media upload zone
   ═══════════════════════════════════════════════════════ */
.cv3-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
  border: 2px dashed var(--color-border, #e2e8f0);
  border-radius: 10px;
  background: var(--color-surface, #f8fafc);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  user-select: none;
}
.cv3-upload-zone:hover,
.cv3-upload-zone--drag {
  border-color: var(--color-primary, #0ea5e9);
  background: #f0f9ff;
}
.cv3-upload-icon { font-size: 24px; line-height: 1; }
.cv3-upload-hint { font-size: 13px; color: var(--color-text-secondary, #64748b); line-height: 1.5; }
.cv3-upload-hint small { font-size: 11px; color: var(--color-text-muted, #94a3b8); }

.cv3-media-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.cv3-media-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-surface, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cv3-media-item--loading { opacity: 0.6; }
.cv3-media-item--error   { border-color: #fca5a5; background: #fff5f5; }
.cv3-media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cv3-media-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cv3-media-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.cv3-media-item:hover .cv3-media-remove { opacity: 1; }
.cv3-media-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--color-primary, #0ea5e9);
  border-radius: 50%;
  animation: cv3spin 0.7s linear infinite;
  display: block;
}
@keyframes cv3spin { to { transform: rotate(360deg); } }
.cv3-media-err { font-size: 20px; }

/* ═══════════════════════════════════════════════════════
   Post card status variants
   ═══════════════════════════════════════════════════════ */
.cv3-post-published {
  opacity: 0.6;
  border-style: dashed;
}
.cv3-post-failed {
  border-color: #fca5a5 !important;
  background: #fff5f5 !important;
}
.cv3-post-publishing {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
}
.cv3-card-status-icon {
  font-size: 9px;
  vertical-align: middle;
  margin-left: 2px;
}
.cv3-post-failed .cv3-card-status-icon  { color: #dc2626; }
.cv3-post-published .cv3-card-status-icon { color: #16a34a; }
.cv3-post-publishing .cv3-card-status-icon { color: #2563eb; }

/* Failed tab */
.cv3-tab-failed { color: #dc2626; }
.cv3-tab-failed.cv3-tab-active { border-bottom-color: #dc2626; color: #dc2626; }

/* ═══════════════════════════════════════════════════════
   月视图 Month Grid
   ═══════════════════════════════════════════════════════ */
.cv3-month-wrapper {
  overflow-y: auto;
  max-height: calc(100vh - 210px);
  min-height: 420px;
}
.cv3-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--color-border, #e2e8f0);
  border-top: 1px solid var(--color-border, #e2e8f0);
}
.cv3-month-head-cell {
  padding: 6px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
  border-right: 1px solid var(--color-border, #e2e8f0);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-surface, #f8fafc);
}
.cv3-month-cell {
  min-height: 96px;
  padding: 6px;
  border-right: 1px solid var(--color-border, #e2e8f0);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  cursor: pointer;
  background: var(--color-background, #fff);
  transition: background 0.1s;
  overflow: hidden;
}
.cv3-month-cell:hover {
  background: var(--color-surface, #f8fafc);
}
.cv3-month-cell.is-outside {
  background: #fafafa;
  opacity: 0.5;
}
.cv3-month-cell.is-today .cv3-month-daynum {
  background: var(--color-primary, #0ea5e9);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv3-month-daynum {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  margin-bottom: 4px;
  line-height: 1;
}
.cv3-month-pub-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 2px;
  background: var(--platform-color, #0ea5e9);
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
  opacity: 0.90;
}
.cv3-month-pub-item:hover { opacity: 1; }
.cv3-month-pub-time {
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 9px;
}
.cv3-month-pub-label {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.cv3-month-more {
  font-size: 10px;
  color: var(--color-text-secondary, #64748b);
  padding: 1px 3px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   日程视图 Agenda
   ═══════════════════════════════════════════════════════ */
.cv3-agenda-list { padding-bottom: 40px; }
.cv3-agenda-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--color-text-secondary, #64748b);
  font-size: 14px;
}
.cv3-agenda-day {
  display: grid;
  grid-template-columns: 72px 1fr;
  border-bottom: 1px solid var(--color-border-light, #f1f5f9);
  min-height: 56px;
}
.cv3-agenda-day.is-today { background: #f0f9ff; }
.cv3-agenda-date {
  padding: 14px 12px 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-right: 1px solid var(--color-border, #e2e8f0);
  flex-shrink: 0;
}
.cv3-agenda-daynum {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  line-height: 1;
}
.cv3-agenda-day.is-today .cv3-agenda-daynum {
  background: #0ea5e9;
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.cv3-agenda-dow {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
}
.cv3-agenda-month {
  font-size: 10px;
  color: var(--color-text-muted, #94a3b8);
}
.cv3-agenda-events {
  padding: 8px 0 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv3-agenda-event {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  border-radius: 6px;
  transition: background 0.1s;
}
.cv3-agenda-event:hover { background: var(--color-surface, #f8fafc); }
.cv3-agenda-time {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary, #64748b);
  width: 44px;
  flex-shrink: 0;
  padding-top: 2px;
}
.cv3-agenda-event-bar {
  flex: 1;
  border-left: 3px solid var(--platform-color, #0ea5e9);
  padding-left: 10px;
}
.cv3-agenda-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  line-height: 1.4;
}
.cv3-agenda-event-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  margin-top: 2px;
}
.cv3-status-pill-sm {
  font-size: 10px !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
}

/* ── 年视图 ── */
.cv3-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 16px 0 8px;
}
@media (max-width: 1100px) {
  .cv3-year-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .cv3-year-grid { grid-template-columns: repeat(2, 1fr); }
}
.cv3-mini-month {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 8px 8px;
  background: var(--color-surface, #fff);
}
.cv3-mini-month-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.cv3-mini-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.cv3-mini-head {
  font-size: 9px;
  color: var(--color-text-muted, #94a3b8);
  text-align: center;
  padding: 2px 0;
  font-weight: 500;
}
.cv3-mini-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1px 0 2px;
  cursor: pointer;
  border-radius: 4px;
  min-height: 22px;
}
.cv3-mini-cell:hover:not(.is-outside) { background: #f1f5f9; }
.cv3-mini-cell.is-outside { cursor: default; }
.cv3-mini-num {
  font-size: 10px;
  color: var(--color-text, #334155);
  line-height: 1.4;
}
.cv3-mini-cell.is-outside .cv3-mini-num { color: transparent; }
.cv3-mini-cell.is-today .cv3-mini-num {
  background: #0ea5e9;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}
.cv3-year-dots {
  display: flex;
  gap: 1px;
  justify-content: center;
  margin-top: 1px;
}
.cv3-year-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}
