/* 行程月历：雪蓝、白纸和一只安静的黑猫。仅作用于月历主界面。 */
#wechat-char-schedule-host #cs-week-view {
    --cs-cal-bg: #e3ecf7;
    --cs-cal-surface: #fff;
    --cs-cal-soft: #f3f7fc;
    --cs-cal-line: #dce5f0;
    --cs-cal-blue-light: #b7d8f6;
    --cs-cal-blue: #88b6f0;
    --cs-cal-muted: #5c78a9;
    --cs-cal-ink: #293e62;
    --cs-cal-weekend: #45618e;
    --cs-cal-other: #61728b;
    --cs-cal-focus: #293e62;
    --cs-cal-pressed: #b7d8f6;
    --cs-cal-radius: 20px;
    --cs-cal-gutter: 20px;
    background: var(--cs-cal-bg);
    color: var(--cs-cal-ink);
    padding: 0 var(--cs-cal-gutter) max(16px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#wechat-char-schedule-host #cs-week-view::before { content: none; }
#app.theme-global-font-on #cs-week-view {
    font-family: 'ThemeUserFont', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#wechat-char-schedule-host #cs-week-view > * { z-index: auto; }
#cs-week-view .cs-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 64px;
    padding: max(0px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#cs-week-view .cs-topbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cs-cal-ink);
}
#cs-week-view .cs-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 4px;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--cs-cal-ink);
    -webkit-tap-highlight-color: transparent;
}
#cs-week-view .cs-topbar-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#cs-week-view #cs-settings-btn circle { fill: var(--cs-cal-bg); }
#cs-week-view .cs-month-heading {
    flex: 0 0 auto;
    position: relative;
    min-height: 112px;
    display: flex;
    align-items: center;
    padding: 8px 0 14px;
    box-sizing: border-box;
}
#cs-week-view .cs-month-heading::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 5px;
    width: 114px;
    height: 88px;
    background: url("assets/char-schedule/winter-cat-v1.webp") center / contain no-repeat;
    pointer-events: none;
}
#cs-week-view .cs-month-heading-text { min-width: 0; padding-right: 104px; }
#cs-week-view .cs-week-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cs-cal-ink);
    font-family: inherit;
    line-height: 1.08;
    letter-spacing: 0;
    white-space: normal;
}
#cs-week-view .cs-month-year { font-size: 14px; font-weight: 500; }
#cs-week-view .cs-month-number {
    font-size: 42px;
    font-weight: 650;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}
#cs-week-view .cs-month-unit { margin-left: 7px; font-size: 22px; font-weight: 500; }
#cs-week-view .cs-month-summary {
    margin: 9px 0 0;
    color: var(--cs-cal-weekend);
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
#cs-week-view .cs-week-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: 0 0 16px;
    justify-content: stretch;
}
#cs-week-view .cs-week-nav-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    border: 1px solid var(--cs-cal-line);
    border-radius: 10px;
    background: var(--cs-cal-surface);
    box-shadow: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--cs-cal-ink);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
#cs-week-view .cs-today-month-btn {
    padding: 0 16px;
    background: transparent;
    border-color: var(--cs-cal-muted);
}
#cs-week-view .cs-calendar-sheet {
    display: flex;
    flex-direction: column;
    flex: 1 0 412px;
    min-height: 412px;
    background: var(--cs-cal-surface);
    border: 1px solid var(--cs-cal-line);
    border-radius: var(--cs-cal-radius);
    overflow: hidden;
}
#cs-week-view .cs-week-header {
    margin: 0;
    padding: 0 8px;
    min-height: 42px;
    align-items: center;
    background: var(--cs-cal-surface);
    border: 0;
    border-bottom: 1px solid var(--cs-cal-line);
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
#cs-week-view .cs-header-cell {
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0;
    color: var(--cs-cal-weekend);
}
#cs-week-view .cs-week-grid {
    flex: 1;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(60px, 1fr));
    grid-auto-rows: auto;
    margin: 0;
    padding: 0 8px 8px;
    background: var(--cs-cal-surface);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
#cs-week-view .cs-day-cell {
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    padding: 3px 1px;
    border: 0;
    border-bottom: 1px solid var(--cs-cal-line);
    background: var(--cs-cal-surface);
    color: var(--cs-cal-ink);
    font-family: inherit;
    transition: background-color .12s;
    overflow: visible;
}
#cs-week-view .cs-day-cell:nth-last-child(-n+7) { border-bottom: 0; }
#cs-week-view .cs-day-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    font-weight: 500;
    color: var(--cs-cal-ink);
    font-variant-numeric: tabular-nums;
    border-radius: 50%;
}
#cs-week-view .cs-day-cell:nth-child(7n) .cs-day-num,
#cs-week-view .cs-day-cell:nth-child(7n-1) .cs-day-num { color: var(--cs-cal-weekend); }
#cs-week-view .cs-day-cell.cs-other-month { background: var(--cs-cal-soft); }
#cs-week-view .cs-other-month .cs-day-num { color: var(--cs-cal-other); }
#cs-week-view .cs-day-cell.cs-today { background: var(--cs-cal-soft); }
#cs-week-view .cs-day-cell.cs-today .cs-day-num {
    background: var(--cs-cal-ink);
    color: var(--cs-cal-surface);
    font-weight: 600;
}
#cs-week-view .cs-day-dot {
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    margin: 0;
    border-radius: 50%;
    background: var(--cs-cal-muted);
    box-shadow: none;
}
#cs-week-view .cs-day-trip {
    position: static;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 2px 3px;
    font-size: 9px;
    font-weight: 500;
    border-radius: 4px;
    line-height: 1.25;
    background: var(--cs-cal-bg);
    color: var(--cs-cal-ink);
}
#cs-week-view .cs-day-trip--business { background: var(--cs-cal-blue-light); }
#cs-week-view .cs-day-trip--travel { background: var(--cs-cal-bg); }
#cs-week-view .cs-day-trip--work { background: var(--cs-cal-ink); color: var(--cs-cal-surface); }
#cs-week-view .cs-day-trip--rest { background: var(--cs-cal-soft); box-shadow: inset 0 0 0 1px var(--cs-cal-line); }
#cs-week-view .cs-day-cell.cs-drag-selected {
    background: var(--cs-cal-blue-light) !important;
    outline: 2px solid var(--cs-cal-muted);
    outline-offset: -2px;
    z-index: 1;
}
#cs-week-view .cs-calendar-footer { flex: 0 0 auto; padding: 14px 0 0; }
#cs-week-view .cs-calendar-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--cs-cal-weekend);
    line-height: 1.5;
}
#cs-week-view .cs-legend-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cs-cal-muted); }
#cs-week-view .cs-legend-trip { margin-left: 12px; padding: 1px 4px; border-radius: 4px; background: var(--cs-cal-blue-light); color: var(--cs-cal-ink); font-size: 9px; }
#cs-week-view #cs-calendar-help { margin: 7px 0 0; color: var(--cs-cal-weekend); font-size: 10px; line-height: 1.6; }
@media (hover: hover) {
    #cs-week-view .cs-topbar-btn:hover,
    #cs-week-view .cs-week-nav-btn:hover,
    #cs-week-view .cs-day-cell:hover { background: var(--cs-cal-soft); color: var(--cs-cal-ink); }
}
#cs-week-view .cs-topbar-btn:active,
#cs-week-view .cs-week-nav-btn:active,
#cs-week-view .cs-day-cell:active { background: var(--cs-cal-pressed); }
#cs-week-view button:focus-visible { outline: 2px solid var(--cs-cal-focus); outline-offset: -3px; }
#cs-week-view button:disabled { opacity: .5; cursor: default; }
html[data-appearance="dark"] #wechat-char-schedule-host #cs-week-view {
    --cs-cal-bg: #1a263a;
    --cs-cal-surface: #23324a;
    --cs-cal-soft: #293e62;
    --cs-cal-line: #3e526d;
    --cs-cal-blue-light: #b7d8f6;
    --cs-cal-muted: #b7d8f6;
    --cs-cal-ink: #e3ecf7;
    --cs-cal-weekend: #b7d8f6;
    --cs-cal-other: #a6b6cc;
    --cs-cal-focus: #88b6f0;
    --cs-cal-pressed: #354f77;
}
html[data-appearance="dark"] #cs-week-view .cs-day-trip--business,
html[data-appearance="dark"] #cs-week-view .cs-legend-trip { color: #293e62; }
html[data-appearance="dark"] #cs-week-view .cs-day-cell.cs-drag-selected { color: #293e62; }
html[data-appearance="dark"] #cs-week-view .cs-drag-selected .cs-day-num { color: #293e62; }
html[data-appearance="dark"] #cs-week-view .cs-drag-selected .cs-day-dot { background: #293e62; }
@media (max-width: 360px) {
    #wechat-char-schedule-host #cs-week-view { --cs-cal-gutter: 14px; --cs-cal-radius: 16px; }
    #cs-week-view .cs-month-heading-text { padding-right: 84px; }
    #cs-week-view .cs-month-heading::after { width: 92px; height: 76px; top: 11px; }
    #cs-week-view .cs-topbar-title { font-size: 12px; }
    #cs-week-view .cs-week-nav-btn { padding-right: 8px; padding-left: 8px; }
    #cs-week-view .cs-week-header { padding-right: 4px; padding-left: 4px; }
    #cs-week-view .cs-week-grid { padding-right: 4px; padding-left: 4px; }
}
@media (max-height: 740px) {
    #cs-week-view .cs-topbar { min-height: 44px; }
    #cs-week-view .cs-month-heading { min-height: 64px; padding: 4px 0; }
    #cs-week-view .cs-week-label { flex-direction: row; align-items: baseline; gap: 8px; }
    #cs-week-view .cs-month-number { font-size: 32px; }
    #cs-week-view .cs-month-unit { font-size: 18px; }
    #cs-week-view .cs-month-summary { margin-top: 4px; }
    #cs-week-view .cs-month-heading::after { width: 86px; height: 58px; top: 0; }
    #cs-week-view .cs-week-nav { padding-bottom: 6px; }
    #cs-week-view .cs-calendar-footer { padding-top: 8px; }
    #cs-week-view #cs-calendar-help { margin-top: 4px; }
    #cs-week-view .cs-calendar-sheet { flex-basis: 312px; min-height: 312px; }
    #cs-week-view .cs-week-header { min-height: 28px; }
    #cs-week-view .cs-week-grid { grid-template-rows: repeat(6, minmax(46px, 1fr)); padding-bottom: 6px; }
    #cs-week-view .cs-day-cell { gap: 2px; padding: 2px 1px; }
    #cs-week-view .cs-day-num { width: 22px; height: 22px; }
    #cs-week-view .cs-day-dot { width: 3px; height: 3px; }
    #cs-week-view .cs-day-trip { line-height: 1; padding-top: 1px; padding-bottom: 1px; }
}
@media (max-height: 520px) {
    #cs-week-view .cs-month-heading { min-height: 46px; }
    #cs-week-view .cs-month-summary, #cs-week-view .cs-calendar-footer { display: none; }
    #cs-week-view .cs-month-heading::after { width: 72px; height: 46px; }
    #cs-week-view .cs-calendar-sheet { flex-basis: 294px; min-height: 294px; }
    #cs-week-view .cs-week-header { min-height: 24px; }
    #cs-week-view .cs-week-grid { grid-template-rows: repeat(6, minmax(44px, 1fr)); padding-bottom: 4px; }
    #cs-week-view .cs-day-cell { gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
    #cs-week-view *, #cs-week-view *::before, #cs-week-view *::after { transition: none; animation: none; }
}
