/* 双人课表：模板视觉在本站的落地样式。
   作用域全部落在 #dual-schedule-root / #schedule-settings-view-dual / .dual-schedule-sheet 内，
   不向共享样式表丢裸类名。 */

.schedule-subline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    min-height: 21px;
}

.dual-schedule-toggle {
    appearance: none;
    border: 1px solid #e1e5ee;
    background: #fff;
    color: #5b5ce6;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .18s ease;
}

.dual-schedule-toggle:active { transform: scale(.96); }
.dual-schedule-toggle[aria-pressed="true"] {
    background: #5b5ce6;
    border-color: #5b5ce6;
    color: #fff;
}

.dual-schedule-root {
    --ds-spring: cubic-bezier(0.32, 0.72, 0, 1);
    --ds-ink: #111827;
    --ds-sub: #8e8e93;
    --ds-line: #e8ecf4;
    --ds-soft: #f5f6fa;
    --ds-indigo: #5b5ce6;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    color: var(--ds-ink);
    font-family: inherit;
}

.dual-schedule-root[hidden] { display: none !important; }

#page-schedule.dual-mode #schedule-calendar-strip,
#page-schedule.dual-mode #schedule-viewport,
#page-schedule.dual-mode #schedule-empty,
#page-schedule.dual-mode #schedule-main-back-current-week {
    display: none !important;
}

/* ---------- 状态条 ---------- */
.ds-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px 0;
    padding: 5px 7px 5px 11px;
    min-height: 34px;
    background: var(--ds-soft);
    border: 1px solid var(--ds-line);
    border-radius: 14px;
}

.ds-status-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.ds-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: #c9d2e3;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .12);
}

.ds-status-dot.is-busy { background: #e64980; box-shadow: 0 0 0 3px rgba(230, 73, 128, .12); }
.ds-status-dot.is-soon { background: #f59f00; box-shadow: 0 0 0 3px rgba(245, 159, 0, .13); }
.ds-status-dot.is-free { background: #2eb872; box-shadow: 0 0 0 3px rgba(46, 184, 114, .13); }
.ds-status-dot.is-live { animation: dsPulse 2.2s ease-in-out infinite; }

@keyframes dsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.ds-status-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .75rem;
    color: #64748b;
    line-height: 1.35;
}

.ds-time-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--ds-line);
    background: #fff;
    color: var(--ds-indigo);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: .6875rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.3;
}

.ds-time-btn:active { transform: scale(.97); }
.ds-time-btn svg { width: 12px; height: 12px; }

.ds-scrubber {
    margin: 6px 16px 0;
    padding: 9px 11px 8px;
    background: #f8f9fb;
    border: 1px solid var(--ds-line);
    border-radius: 13px;
}
.ds-scrubber[hidden] { display: none; }
.ds-scrubber-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .71875rem;
    color: #64748b;
}
.ds-scrubber-head button {
    border: 0;
    background: none;
    color: var(--ds-indigo);
    font-size: .6875rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}
.ds-scrubber-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
}
.ds-scrubber input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: #dfe4ee;
    outline: none;
    margin: 8px 0;
}
.ds-scrubber input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d8dee9;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    cursor: pointer;
}
.ds-scrubber input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d8dee9;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    cursor: pointer;
}
.ds-scrubber-value {
    min-width: 42px;
    text-align: right;
    font-size: .75rem;
    font-weight: 700;
    color: var(--ds-indigo);
}

/* ---------- 控制条 ---------- */
.ds-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 16px 5px;
}

.ds-segmented {
    position: relative;
    display: flex;
    width: 150px;
    flex: 0 0 auto;
    padding: 3px;
    border-radius: 999px;
    background: #eef1f6;
}

.ds-seg-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
    transition: transform .34s var(--ds-spring);
}

.ds-segmented button {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    border: 0;
    background: none;
    padding: 4px 0;
    font-size: .75rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1.35;
}
.ds-segmented button.active { color: #111827; }

.ds-pills { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }

.ds-pill {
    border: 1px solid var(--ds-line);
    background: #fff;
    color: #64748b;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: .71875rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
    cursor: pointer;
}
.ds-pill:active { transform: scale(.96); }
.ds-pill.active {
    background: #eef0ff;
    border-color: rgba(91, 92, 230, .3);
    color: var(--ds-indigo);
}
.ds-pill.free.active {
    background: #ecfdf5;
    border-color: rgba(5, 150, 105, .28);
    color: #047857;
}
.ds-pill[hidden] { display: none; }

/* ---------- 周条 ---------- */
.ds-week-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px 8px;
    flex: 0 0 auto;
}

.ds-month {
    width: 44px;
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: .75rem;
    color: #8e8e93;
    font-weight: 600;
    line-height: 1.3;
    border: 0;
    background: none;
    text-align: left;
    padding: 0;
    cursor: pointer;
}

.ds-month:active { opacity: .7; }

.ds-days {
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ds-day {
    border: 0;
    background: none;
    padding: 2px 0 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    border-radius: 10px;
    min-width: 0;
    color: inherit;
}
.ds-day:active { transform: scale(.95); }
.ds-day .dow { font-size: .6875rem; color: #8e8e93; font-weight: 600; line-height: 1.2; }
.ds-day .num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .8125rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}
.ds-day.active .num {
    background: var(--ds-indigo);
    color: #fff;
    box-shadow: 0 3px 8px rgba(91, 92, 230, .3);
}
.ds-day.today .dow { color: var(--ds-indigo); }
.ds-day.is-weekend .num { color: #64748b; }

/* ---------- 横幅 ---------- */
.ds-banner {
    margin: 0 16px 6px;
    padding: 6px 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    background: #f8f9fb;
    font-size: .6875rem;
    color: #64748b;
    line-height: 1.35;
}
.ds-banner[hidden] { display: none; }
.ds-banner .ds-banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-indigo);
    flex: 0 0 auto;
}
.ds-banner .ds-banner-text { flex: 1; min-width: 0; }
.ds-banner button {
    border: 0;
    background: none;
    color: var(--ds-indigo);
    font-size: .6875rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

/* ---------- 主区 ---------- */
.ds-main {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.ds-week-panel {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 26px;
}

.ds-empty {
    margin: 18px 16px;
    padding: 22px 18px;
    border: 1px dashed #d8dee9;
    border-radius: 16px;
    text-align: center;
    background: #fbfcfe;
}
.ds-empty strong { display: block; font-size: .875rem; color: #334155; }
.ds-empty p { margin: 6px 0 12px; font-size: .75rem; color: #8e8e93; line-height: 1.5; }
.ds-empty button {
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    padding: 8px 14px;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
}

.ds-loading {
    padding: 26px 16px;
    text-align: center;
    font-size: .75rem;
    color: #8e8e93;
}

/* 节次周视图 */
.ds-week-scroll {
    display: flex;
    padding: 0 6px 0 0;
}
.ds-period-gutter {
    width: 34px;
    flex: 0 0 34px;
    padding-top: 0;
}
.ds-period-gutter .ds-period-cell {
    height: 58px;
    box-sizing: border-box;
    padding: 3px 4px 0 0;
    text-align: right;
}
.ds-period-gutter b { display: block; font-size: .8125rem; color: #334155; line-height: 1.2; }
.ds-period-gutter span { display: block; font-size: .59375rem; color: #8e8e93; margin-top: 1px; white-space: nowrap; }

.ds-week-days {
    flex: 1 1 auto;
    display: grid;
    min-width: 0;
}
.ds-week-col {
    position: relative;
    border-left: 1px solid #f0f2f7;
    min-width: 0;
}
.ds-week-col.selected { background: rgba(249, 250, 255, .55); }
.ds-week-line { position: absolute; left: 0; right: 0; border-bottom: 1px solid #f2f4f8; pointer-events: none; }

.ds-course-card {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 10px;
    border: 0;
    padding: 4px 2px;
    overflow: hidden;
    cursor: pointer;
    z-index: 3;
    background: var(--ds-soft);
    box-shadow: none;
    text-align: center;
    color: var(--ds-ink, #1f2937);
}
.ds-course-card:active { transform: scale(.98); }
.ds-course-card .ds-course-bar {
    width: 14px;
    height: 2.5px;
    border-radius: 999px;
    margin: 0 auto 4px;
}
.ds-week-col .ds-course-card { padding-top: 10px; }
.ds-week-col .ds-course-bar {
    display: block;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}
.ds-week-scroll.is-solo .ds-course-bar {
    width: 16px;
    height: 3px;
}
.ds-course-card .ds-course-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .625rem;
    font-weight: 750;
    line-height: 1.2;
    word-break: break-all;
    color: var(--ds-ink, #1f2937);
}
.ds-course-card .ds-course-loc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    font-size: .53125rem;
    color: var(--ds-sub, #8e8e93);
    line-height: 1.15;
    word-break: break-all;
}
.ds-course-card.partner {
    background: var(--ds-partner-soft, #FDEBF2);
    border: 1.5px dashed var(--ds-partner-border, #f3b6cc);
    box-shadow: none;
}
.ds-course-card.partner .ds-course-name { color: var(--ds-partner-ink, #b4235a); }
.ds-course-card.partner .ds-course-loc { color: var(--ds-partner-sub, #c25e84); }
.ds-course-card.partner .ds-ta-tag {
    display: inline-block;
    font-size: .53125rem;
    color: #8e8e93;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0 3px;
    margin-bottom: 2px;
    line-height: 1.4;
}
.ds-course-card.source-makeup .ds-course-bar { background-image: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.ds-course-card.source-reschedule .ds-course-bar { opacity: .7; }

.ds-overlap-badge {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ds-indigo);
    color: #fff;
    font-size: .53125rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
}

.ds-relation-chip {
    position: absolute;
    left: 3px;
    bottom: 3px;
    max-width: calc(100% - 22px);
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(91, 92, 230, .1);
    color: #5b5ce6;
    font-size: .5rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 7;
}

.ds-free-block {
    position: absolute;
    left: 1px;
    right: 1px;
    z-index: 0;
    border: 1px dashed rgba(91, 92, 230, .32);
    border-radius: 7px;
    background-color: rgba(91, 92, 230, .035);
    background-image: repeating-linear-gradient(45deg, rgba(91, 92, 230, .055) 0, rgba(91, 92, 230, .055) 4px, rgba(46, 184, 114, .045) 4px, rgba(46, 184, 114, .045) 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    pointer-events: auto;
    cursor: pointer;
    padding: 2px;
    overflow: hidden;
}
.ds-free-block b { font-size: .625rem; color: #5b5ce6; font-weight: 750; line-height: 1.2; }
.ds-free-block span { font-size: .5625rem; color: #64748b; line-height: 1.2; }

/* 5 日并排 */
.ds-week-col.five-day .ds-course-card { left: 1px; right: 1px; }
.ds-week-col.five-day .ds-course-card.mine { right: calc(50% + 1px); }
.ds-week-col.five-day .ds-course-card.partner { left: calc(50% + 1px); }

/* 绝对时间轴 */
.ds-abs-wrap { display: flex; padding: 0 10px 0 0; }
.ds-abs-gutter {
    width: 44px;
    flex: 0 0 44px;
    position: relative;
    height: 800px;
}
.ds-abs-gutter .ds-hour-label {
    position: absolute;
    right: 4px;
    transform: translateY(-50%);
    font-size: .5625rem;
    color: #8e8e93;
    white-space: nowrap;
}
.ds-abs-days { flex: 1 1 auto; display: grid; min-width: 0; }
.ds-abs-col { position: relative; border-left: 1px solid #f0f2f7; min-width: 0; }
.ds-abs-col.selected { background: rgba(249, 250, 255, .55); }
.ds-abs-col .ds-hour-line { position: absolute; left: 0; right: 0; border-bottom: 1px solid #f2f4f8; pointer-events: none; }
.ds-abs-col .ds-course-card { border-radius: 8px; padding: 2px 3px; }
.ds-abs-col .ds-course-card .ds-course-name { font-size: .625rem; -webkit-line-clamp: 4; }
.ds-abs-col .ds-course-card .ds-course-loc { font-size: .53125rem; -webkit-line-clamp: 1; }

.ds-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: #fa5252;
    z-index: 12;
    pointer-events: none;
}
.ds-now-line::before {
    content: "";
    position: absolute;
    left: -2px;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fa5252;
}

/* 今日双轴 */
.ds-today-head {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: 48px 1fr 1fr;
    gap: 10px;
    padding: 4px 12px 7px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #f0f2f7;
}
.ds-today-head .ds-axis-label { font-size: .6875rem; color: #8e8e93; align-self: end; padding-bottom: 2px; }
.ds-today-col-head {
    border-radius: 12px;
    padding: 5px 7px;
    min-width: 0;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.ds-today-col-head.mine { background: #f8f9fb; }
.ds-today-col-head.partner { background: #fbfaff; border: 1px dashed #dfe2f5; }
.ds-today-col-head b { display: block; font-size: .75rem; color: #1f2937; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-today-col-head span { display: block; margin-top: 2px; font-size: .625rem; color: #8e8e93; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-today-body { position: relative; margin: 0 12px; height: 941px; }
.ds-today-body .ds-hour-line { position: absolute; left: 0; right: 0; border-bottom: 1px solid #f2f4f8; pointer-events: none; }
.ds-today-gutter { position: absolute; left: 0; top: 0; bottom: 0; width: 48px; }
.ds-today-gutter .ds-hour-label { position: absolute; right: 4px; transform: translateY(-50%); font-size: .5625rem; color: #8e8e93; }
.ds-today-col { position: absolute; top: 0; bottom: 0; }
.ds-today-col.mine { left: 58px; right: calc(50% + 5px); background: rgba(248, 249, 251, .5); border-radius: 14px; }
.ds-today-col.partner { right: 0; left: calc(50% + 5px); background: rgba(251, 250, 255, .55); border-radius: 14px; }
.ds-today-head.single { grid-template-columns: 48px 1fr; }
.ds-today-head.single .ds-today-col-head { grid-column: 2; }
.ds-today-body.single .ds-today-col { left: 58px; right: 0; }
.ds-today-col .ds-course-card { left: 3px; right: 3px; border-radius: 14px; padding: 6px 7px; min-height: 52px; }
.ds-today-col .ds-course-card .ds-course-name { font-size: .8125rem; -webkit-line-clamp: 3; }
.ds-today-col .ds-course-card .ds-course-loc { font-size: .6875rem; -webkit-line-clamp: 2; }
.ds-today-col .ds-course-card .ds-course-time { display: block; margin-top: 3px; font-size: .65625rem; color: #94a3b8; }
.ds-today-free {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 0;
    border-radius: 9px;
    border: 1px dashed rgba(91, 92, 230, .3);
    background-image: repeating-linear-gradient(45deg, rgba(91, 92, 230, .05) 0, rgba(91, 92, 230, .05) 4px, rgba(46, 184, 114, .04) 4px, rgba(46, 184, 114, .04) 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    padding: 2px;
    text-align: center;
    overflow: hidden;
}
.ds-today-free b { font-size: .6875rem; color: #5b5ce6; line-height: 1.25; }
.ds-today-free span { font-size: .59375rem; color: #64748b; line-height: 1.25; }

.ds-today-now {
    position: absolute;
    left: 48px;
    right: 0;
    z-index: 14;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.ds-today-now .ds-now-pill {
    background: #fa5252;
    color: #fff;
    border-radius: 999px;
    font-size: .5625rem;
    font-weight: 800;
    padding: 2px 5px;
    line-height: 1.3;
    transform: translateX(-100%);
    margin-left: -2px;
}
.ds-today-now .ds-now-bar { flex: 1; height: 1.5px; background: #fa5252; }

/* ---------- 抽屉 ---------- */
.dual-schedule-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, .35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.dual-schedule-sheet-overlay.active { display: flex; }

.dual-schedule-sheet {
    width: 100%;
    max-width: 480px;
    max-height: calc(var(--skxs-vh, 1vh) * 86);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
    transform: translateY(104%);
    transition: transform .38s var(--ds-spring);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
}
.dual-schedule-sheet-overlay.active .dual-schedule-sheet { transform: translateY(0); }

.ds-grabber {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: #e2e6ee;
    margin: 8px auto 0;
    flex: 0 0 auto;
}
.ds-sheet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 8px;
    flex: 0 0 auto;
}
.ds-sheet-head h3 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
    color: #111827;
    line-height: 1.35;
}
.ds-sheet-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f8;
    color: #64748b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.ds-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

/* 详情 */
.ds-detail-hero {
    border-radius: 16px;
    padding: 14px;
    background: var(--ds-soft, #f8f9fb);
}
.ds-detail-hero.partner {
    background: var(--ds-partner-soft, #FDEBF2);
    border: 1.5px dashed var(--ds-partner-border, #f3b6cc);
}
.ds-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ds-detail-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    color: var(--ds-ink, #5b5ce6);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.5;
}
.ds-detail-hero.partner .ds-detail-badge { background: rgba(255, 255, 255, .75); color: var(--ds-partner-ink, #b4235a); }
.ds-detail-day { flex: 0 0 auto; font-size: .6875rem; font-weight: 600; color: var(--ds-sub, #8e8e93); opacity: .8; }
.ds-detail-eyebrow { font-size: .6875rem; color: #8e8e93; font-weight: 650; }
.ds-detail-title { margin-top: 0; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; word-break: break-word; color: var(--ds-ink, #111827); }
.ds-detail-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ds-detail-meta-row { display: flex; align-items: flex-start; gap: 6px; font-size: .8125rem; color: var(--ds-sub, #64748b); line-height: 1.4; }
.ds-detail-meta-row svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.ds-detail-section { margin-top: 16px; }
.ds-detail-section h4 { margin: 0 0 8px; font-size: .75rem; color: #8e8e93; font-weight: 700; }
.ds-detail-actions { display: flex; gap: 8px; margin-top: 14px; }
.ds-detail-actions .ds-btn { background: #F3F4F6; border-color: #F3F4F6; color: #111827; padding: 9px 12px; }
.ds-btn {
    flex: 1;
    border: 1px solid #e2e6ee;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    padding: 10px 12px;
    font-size: .8125rem;
    font-weight: 700;
    cursor: pointer;
}
.ds-btn:active { transform: scale(.98); }
.ds-btn.primary { background: #111827; border-color: #111827; color: #fff; }
.ds-btn.danger { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.ds-btn.ghost { background: #f8f9fb; }
.ds-btn[disabled] { opacity: .45; cursor: default; }

.ds-overlap-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ds-overlap-card {
    border-radius: 13px;
    border: 1px solid #eef1f6;
    padding: 9px;
    background: #fbfcfe;
    min-width: 0;
}
.ds-overlap-card.partner { border-style: dashed; background: #fff; }
.ds-overlap-card small { display: block; font-size: .625rem; color: #8e8e93; margin-bottom: 3px; }
.ds-overlap-card b { display: block; font-size: .75rem; line-height: 1.3; word-break: break-word; }
.ds-overlap-card span { display: block; margin-top: 3px; font-size: .65625rem; color: #64748b; line-height: 1.35; word-break: break-word; }

.ds-compare-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef0ff;
    color: #4344c7;
    font-size: .78125rem;
    font-weight: 600;
    line-height: 1.4;
}
.ds-compare-banner svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ds-compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-compare-stack { display: flex; flex-direction: column; gap: 10px; }
.ds-compare-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
    background: var(--ds-soft, #f8f9fb);
}
.ds-compare-card.partner {
    background: var(--ds-partner-soft, #FDEBF2);
    border: 1.5px dashed var(--ds-partner-border, #f3b6cc);
}
.ds-compare-badge {
    align-self: flex-start;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: var(--ds-ink, #5b5ce6);
    font-size: .625rem;
    font-weight: 700;
    line-height: 1.6;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ds-compare-card.partner .ds-compare-badge { color: var(--ds-partner-ink, #b4235a); }
.ds-compare-name { margin-top: 7px; font-size: .90625rem; font-weight: 800; line-height: 1.3; color: var(--ds-ink, #111827); word-break: break-word; }
.ds-compare-card.partner .ds-compare-name { color: var(--ds-partner-ink, #b4235a); }
.ds-compare-meta { margin-top: 6px; font-size: .75rem; line-height: 1.35; color: var(--ds-sub, #64748b); word-break: break-word; }
.ds-compare-time { margin-top: 3px; font-size: .6875rem; line-height: 1.35; color: var(--ds-sub, #64748b); opacity: .85; }
.ds-compare-card .ds-btn { margin-top: 10px; padding: 6px; font-size: .71875rem; border-radius: 9px; }

.ds-free-hero {
    border-radius: 18px;
    padding: 18px 16px;
    border: 1px dashed rgba(91, 92, 230, .35);
    background-color: #fbfbff;
    background-image: repeating-linear-gradient(45deg, rgba(91, 92, 230, .055) 0, rgba(91, 92, 230, .055) 5px, rgba(46, 184, 114, .04) 5px, rgba(46, 184, 114, .04) 10px);
    text-align: center;
}
.ds-free-hero .ds-detail-eyebrow { color: #5b5ce6; }
.ds-free-hero .ds-free-range { margin-top: 6px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.4px; color: #111827; font-variant-numeric: tabular-nums; }
.ds-free-hero .ds-free-duration {
    display: inline-block;
    margin-top: 9px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    font-size: .75rem;
    color: #047857;
    font-weight: 700;
}
.ds-free-tip {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f9fb;
    border: 1px solid #f1f5f9;
    font-size: .8125rem;
    color: #475569;
    line-height: 1.55;
}
.ds-free-tip b { display: block; margin-bottom: 3px; color: #111827; font-size: .8125rem; }
.ds-free-tip p { margin: 0; }
.ds-free-copy-wrap { margin-top: 14px; }
.ds-free-copy { width: 100%; padding: 10px; border-radius: 12px; font-size: .84375rem; }
.ds-free-note { margin-top: 12px; font-size: .75rem; color: #64748b; line-height: 1.55; }

/* 设置页 */
#schedule-settings-view-dual { padding-bottom: 8px; }
.ds-settings-section { margin-bottom: 16px; }
.ds-settings-section h4 {
    margin: 0 0 7px;
    font-size: .75rem;
    color: #8e8e93;
    font-weight: 650;
    letter-spacing: .01em;
}
.ds-settings-card {
    background: #f8f9fb;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    overflow: hidden;
}
.ds-binding-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border-bottom: 1px solid #eef1f6;
}
.ds-binding-row:last-child { border-bottom: 0; }
.ds-avatar {
    position: relative;
    overflow: hidden;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0ff;
    color: #5b5ce6;
    font-size: .875rem;
    font-weight: 800;
}
.ds-avatar::before { content: attr(data-initial); }
.ds-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.ds-avatar-img.is-broken { display: none; }
.ds-binding-main { flex: 1 1 auto; min-width: 0; }
.ds-binding-name { display: flex; align-items: center; gap: 5px; font-size: .875rem; font-weight: 750; color: #1f2937; line-height: 1.3; }
.ds-relation-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: #eef0ff;
    color: #5b5ce6;
    font-size: .59375rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.ds-binding-sub { margin-top: 2px; font-size: .6875rem; color: #8e8e93; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-binding-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.ds-mini-btn {
    border: 1px solid #e2e6ee;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: .65625rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.ds-mini-btn.danger { color: #be123c; border-color: #fecdd3; background: #fff7f8; }
.ds-current-tag { font-size: .625rem; color: #2eb872; font-weight: 750; }

.ds-empty-line { padding: 16px 12px; text-align: center; font-size: .75rem; color: #8e8e93; line-height: 1.5; }
.ds-settings-add {
    width: 100%;
    border: 0;
    border-top: 1px dashed #dfe4ee;
    background: none;
    color: #5b5ce6;
    padding: 11px 12px;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.ds-settings-add:active { opacity: .65; }

.ds-rel-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ds-rel-btn {
    border: 1px solid #e2e6ee;
    background: #fff;
    border-radius: 11px;
    padding: 8px 2px;
    font-size: .71875rem;
    color: #475569;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.3;
}
.ds-rel-btn.active { background: #111827; border-color: #111827; color: #fff; }
.ds-field { margin-top: 10px; }
.ds-field label { display: block; font-size: .6875rem; color: #64748b; font-weight: 650; margin-bottom: 5px; }
.ds-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e2e6ee;
    border-radius: 11px;
    background: #f8f9fb;
    padding: 10px 11px;
    font-size: .875rem;
    color: #111827;
    outline: none;
}
.ds-input:focus { border-color: #5b5ce6; background: #fff; box-shadow: 0 0 0 3px rgba(91, 92, 230, .12); }
.ds-code-box {
    margin-top: 10px;
    border-radius: 14px;
    border: 1px dashed #cfd3f5;
    background: #f7f7ff;
    padding: 14px 12px;
    text-align: center;
}
.ds-code-box .ds-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .18em; font-weight: 800; color: #111827; word-break: break-all; }
.ds-code-box p { margin: 6px 0 0; font-size: .6875rem; color: #8e8e93; line-height: 1.45; }
.ds-code-actions { display: flex; gap: 8px; margin-top: 12px; }
.ds-code-actions .ds-btn { flex: 1; }

.ds-preview-card {
    margin-top: 10px;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}
.ds-preview-top { display: flex; align-items: center; gap: 9px; }
.ds-preview-top .ds-avatar { width: 40px; height: 40px; }
.ds-preview-name { font-size: .875rem; font-weight: 750; }
.ds-preview-rel { margin-top: 2px; font-size: .6875rem; color: #8e8e93; }
.ds-scope-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ds-scope-list li { position: relative; padding-left: 14px; font-size: .71875rem; color: #64748b; line-height: 1.45; }
.ds-scope-list li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 5px; height: 5px; border-radius: 50%; background: #c7cbe8; }
.ds-form-hint { margin-top: 6px; font-size: .65625rem; color: #8e8e93; line-height: 1.45; }
.ds-error { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff1f2; color: #be123c; font-size: .6875rem; line-height: 1.45; }
.ds-error[hidden] { display: none; }
.ds-loading-inline { margin-top: 8px; font-size: .6875rem; color: #8e8e93; text-align: center; }

.ds-invite-row { padding: 10px 12px; border-bottom: 1px solid #eef1f6; display: flex; align-items: center; gap: 8px; }
.ds-invite-row:last-child { border-bottom: 0; }
.ds-invite-main { flex: 1; min-width: 0; }
.ds-invite-main b { display: block; font-size: .75rem; color: #334155; }
.ds-invite-main span { display: block; margin-top: 2px; font-size: .65625rem; color: #8e8e93; }

/* ---------- 深色 ---------- */
[data-color-mode="dark"] .dual-schedule-toggle { background: #1c1c1e; border-color: #3a3a3c; color: #a5b4fc; }
[data-color-mode="dark"] .dual-schedule-toggle[aria-pressed="true"] { background: #5b5ce6; color: #fff; border-color: #5b5ce6; }
[data-color-mode="dark"] .dual-schedule-root { color: #f5f5f7; --ds-ink: #f5f5f7; --ds-sub: #8e8e93; --ds-line: #2c2c2e; --ds-soft: #1c1c1e; }
[data-color-mode="dark"] .ds-status-bar { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-status-text { color: #a1a1aa; }
[data-color-mode="dark"] .ds-time-btn { background: #2c2c2e; border-color: #3a3a3c; color: #a5b4fc; }
[data-color-mode="dark"] .ds-scrubber { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-scrubber input[type="range"] { background: #3a3a3c; }
[data-color-mode="dark"] .ds-segmented { background: #1c1c1e; }
[data-color-mode="dark"] .ds-seg-thumb { background: #3a3a3c; }
[data-color-mode="dark"] .ds-segmented button.active { color: #f5f5f7; }
[data-color-mode="dark"] .ds-pill { background: #1c1c1e; border-color: #2c2c2e; color: #a1a1aa; }
[data-color-mode="dark"] .ds-pill.active { background: rgba(91, 92, 230, .22); border-color: rgba(165, 180, 252, .28); color: #c7d2fe; }
[data-color-mode="dark"] .ds-pill.free.active { background: rgba(5, 150, 105, .18); border-color: rgba(52, 211, 153, .28); color: #6ee7b7; }
[data-color-mode="dark"] .ds-day .num { color: #e5e7eb; }
[data-color-mode="dark"] .ds-course-card {
    background: rgba(255, 255, 255, .07);
    color: #e5e7eb;
}
[data-color-mode="dark"] .ds-course-card .ds-course-name { color: #e5e7eb; }
[data-color-mode="dark"] .ds-course-card .ds-course-loc { color: #9ca3af; }
[data-color-mode="dark"] .ds-course-card.partner {
    background: rgba(244, 114, 182, .13);
    border-color: rgba(244, 114, 182, .48);
}
[data-color-mode="dark"] .ds-course-card.partner .ds-course-name { color: #f9a8d4; }
[data-color-mode="dark"] .ds-course-card.partner .ds-course-loc { color: #f0a6c3; }
[data-color-mode="dark"] .ds-day.active .num { background: #6366f1; color: #fff; }
[data-color-mode="dark"] .ds-banner { background: #1c1c1e; color: #a1a1aa; }
[data-color-mode="dark"] .ds-empty { background: #151517; border-color: #3a3a3c; }
[data-color-mode="dark"] .ds-empty strong { color: #e5e7eb; }
[data-color-mode="dark"] .ds-week-col { border-left-color: #2c2c2e; }
[data-color-mode="dark"] .ds-week-col.selected { background: rgba(99, 102, 241, .08); }
[data-color-mode="dark"] .ds-week-line { border-bottom-color: #26262a; }
[data-color-mode="dark"] .ds-course-card { background: #1c1c1e; border-color: #2c2c2e; color: #e5e7eb; box-shadow: none; }
[data-color-mode="dark"] .ds-course-card.partner { background: rgba(244, 114, 182, .10); border-color: rgba(244, 114, 182, .52); }
[data-color-mode="dark"] .ds-course-card.partner .ds-course-name { color: #fbcfe8; }
[data-color-mode="dark"] .ds-free-block { background-color: rgba(99, 102, 241, .055); border-color: rgba(165, 180, 252, .28); background-image: repeating-linear-gradient(45deg, rgba(129, 140, 248, .06) 0, rgba(129, 140, 248, .06) 4px, rgba(52, 211, 153, .035) 4px, rgba(52, 211, 153, .035) 8px); }
[data-color-mode="dark"] .ds-free-block b { color: #a5b4fc; }
[data-color-mode="dark"] .ds-free-block span { color: #8b95a7; }
[data-color-mode="dark"] .ds-period-gutter b { color: #d1d5db; }
[data-color-mode="dark"] .ds-abs-col { border-left-color: #2c2c2e; }
[data-color-mode="dark"] .ds-abs-col .ds-hour-line { border-bottom-color: #26262a; }
[data-color-mode="dark"] .ds-today-head { background: rgba(18, 18, 20, .94); border-bottom-color: #2c2c2e; }
[data-color-mode="dark"] .ds-today-col-head.mine { background: #1c1c1e; }
[data-color-mode="dark"] .ds-today-col-head.partner { background: #1a1a22; border-color: #34344a; }
[data-color-mode="dark"] .ds-today-col-head b { color: #e5e7eb; }
[data-color-mode="dark"] .ds-today-col.mine { background: rgba(28, 28, 30, .5); }
[data-color-mode="dark"] .ds-today-col.partner { background: rgba(26, 26, 34, .55); }
[data-color-mode="dark"] .ds-today-body .ds-hour-line { border-bottom-color: #26262a; }
[data-color-mode="dark"] .dual-schedule-sheet { background: #121214; }
[data-color-mode="dark"] .ds-sheet-head h3 { color: #f5f5f7; }
[data-color-mode="dark"] .ds-sheet-close { background: #2c2c2e; color: #a1a1aa; }
[data-color-mode="dark"] .ds-detail-hero { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-detail-title { color: #f5f5f7; }
[data-color-mode="dark"] .ds-detail-meta-row { color: #a1a1aa; }
[data-color-mode="dark"] .ds-btn { background: #1c1c1e; border-color: #3a3a3c; color: #e5e7eb; }
[data-color-mode="dark"] .ds-btn.primary { background: #f5f5f7; border-color: #f5f5f7; color: #111827; }
[data-color-mode="dark"] .ds-btn.danger { background: rgba(190, 18, 60, .16); border-color: rgba(251, 113, 133, .3); color: #fda4af; }
[data-color-mode="dark"] .ds-btn.ghost { background: #1c1c1e; }
[data-color-mode="dark"] .ds-overlap-card { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-overlap-card b { color: #f5f5f7; }
[data-color-mode="dark"] .ds-free-hero { background-color: #17171f; border-color: rgba(129, 140, 248, .35); }
[data-color-mode="dark"] .ds-free-hero .ds-free-range { color: #f5f5f7; }
[data-color-mode="dark"] .ds-free-hero .ds-free-duration { background: #1c1c1e; border-color: #3a3a3c; color: #cbd5e1; }
[data-color-mode="dark"] .ds-free-note { color: #a1a1aa; }
[data-color-mode="dark"] .ds-free-tip { background: #1c1c1e; border-color: #2c2c2e; color: #a1a1aa; }
[data-color-mode="dark"] .ds-free-tip b { color: #f5f5f7; }
[data-color-mode="dark"] .ds-settings-card { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-binding-row { border-bottom-color: #2c2c2e; }
[data-color-mode="dark"] .ds-avatar { background: #2a2a44; color: #c7d2fe; }
[data-color-mode="dark"] .ds-binding-name { color: #f5f5f7; }
[data-color-mode="dark"] .ds-relation-tag { background: #2a2a44; color: #c7d2fe; }
[data-color-mode="dark"] .ds-binding-sub { color: #8e8e93; }
[data-color-mode="dark"] .ds-mini-btn { background: #2c2c2e; border-color: #3a3a3c; color: #d1d5db; }
[data-color-mode="dark"] .ds-mini-btn.danger { background: rgba(190, 18, 60, .14); border-color: rgba(251, 113, 133, .3); color: #fda4af; }
[data-color-mode="dark"] .ds-settings-add { border-top-color: #3a3a3c; color: #a5b4fc; }
[data-color-mode="dark"] .ds-rel-btn { background: #1c1c1e; border-color: #3a3a3c; color: #d1d5db; }
[data-color-mode="dark"] .ds-rel-btn.active { background: #f5f5f7; border-color: #f5f5f7; color: #111827; }
[data-color-mode="dark"] .ds-input { background: #1c1c1e; border-color: #3a3a3c; color: #f5f5f7; }
[data-color-mode="dark"] .ds-input:focus { border-color: #818cf8; background: #1c1c1e; }
[data-color-mode="dark"] .ds-preview-card { background: #1c1c1e; border-color: #2c2c2e; }
[data-color-mode="dark"] .ds-preview-name { color: #f5f5f7; }
[data-color-mode="dark"] .ds-scope-list li { color: #a1a1aa; }
[data-color-mode="dark"] .ds-code-box { background: #17172a; border-color: #3b3b6b; }
[data-color-mode="dark"] .ds-code-box .ds-code { color: #f5f5f7; }
[data-color-mode="dark"] .ds-invite-row { border-bottom-color: #2c2c2e; }
[data-color-mode="dark"] .ds-invite-main b { color: #e5e7eb; }

@media (max-width: 360px) {
    .ds-controls { padding-left: 12px; padding-right: 12px; }
    .ds-segmented { width: 138px; }
    .ds-pill { font-size: .6875rem; padding: 4px 6px; }
    .ds-status-bar { margin-left: 12px; margin-right: 12px; }
    .ds-week-strip { padding-left: 12px; padding-right: 12px; }
    .ds-month { width: 38px; flex-basis: 38px; }
    .ds-today-head { grid-template-columns: 42px 1fr 1fr; gap: 7px; }
    .ds-today-head.single { grid-template-columns: 42px 1fr; }
    .ds-today-col.mine { left: 49px; right: calc(50% + 3.5px); }
    .ds-today-col.partner { left: calc(50% + 3.5px); }
    .ds-today-body.single .ds-today-col { left: 49px; right: 0; }
    .ds-today-now { left: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .dual-schedule-toggle,
    .ds-seg-thumb,
    .dual-schedule-sheet {
        transition: none !important;
    }
    .ds-status-dot.is-live { animation: none; }
}

/* ---------- 补全：色条、空闲按钮、空态、加载与周选择 ---------- */
.ds-course-card .ds-course-bar {
    background: var(--ds-color, #5b5ce6);
}
.ds-week-col .ds-course-card.partner .ds-course-bar {
    background-color: var(--ds-partner-bar, #e64980);
}

.ds-free-block {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    padding: 4px 2px;
    pointer-events: auto;
    text-align: center;
}

.ds-free-block:active { transform: scale(.985); }

.ds-day-empty {
    position: absolute;
    top: 8px;
    left: 3px;
    right: 3px;
    padding: 7px 5px;
    border-radius: 8px;
    background: #f8f9fb;
    color: #8e8e93;
    font-size: .5625rem;
    line-height: 1.45;
    text-align: center;
}

.ds-col-empty {
    position: absolute;
    top: 10px;
    left: 6px;
    right: 6px;
    padding: 8px 4px;
    border-radius: 10px;
    background: #f8f9fb;
    color: #8e8e93;
    font-size: .625rem;
    line-height: 1.5;
    text-align: center;
}

.ds-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #dfe4ee;
    border-top-color: #5b5ce6;
    border-radius: 50%;
    animation: ds-spin .8s linear infinite;
}

.ds-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 42px 16px;
    color: #8e8e93;
    font-size: .75rem;
}

@keyframes ds-spin { to { transform: rotate(360deg); } }

.ds-empty-binding strong { font-size: .9375rem; }

.ds-detail-note {
    margin: 12px 0 0;
    padding-top: 11px;
    border-top: 1px solid #eef1f6;
    color: #8e8e93;
    font-size: .6875rem;
    line-height: 1.55;
}

.ds-week-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.ds-week-pick {
    appearance: none;
    border: 1px solid #e8ecf4;
    background: #fff;
    border-radius: 10px;
    padding: 7px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #64748b;
    font-family: inherit;
    cursor: pointer;
}

.ds-week-pick b { font-size: .625rem; color: #334155; }
.ds-week-pick span { font-size: .5rem; color: #8e8e93; white-space: nowrap; }
.ds-week-pick.active { background: #5b5ce6; border-color: #5b5ce6; }
.ds-week-pick.active b, .ds-week-pick.active span { color: #fff; }

.ds-binding-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef1f6;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.ds-binding-row:last-child { border-bottom: 0; }

/* 设置页 v2：与站内设置的分组卡片统一，补足留白与层级 */
#schedule-settings-view-dual {
    padding: 6px 16px calc(26px + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.ds-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin: 2px 0 14px;
    border: 1px solid #e6e9f7;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7f7ff 0%, #fbfcff 58%, #f2fbf7 100%);
}
.ds-hero-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #5b5ce6;
    box-shadow: 0 3px 10px rgba(91, 92, 230, .12);
}
.ds-hero-icon svg { width: 23px; height: 23px; }
.ds-hero-copy { flex: 1 1 auto; min-width: 0; }
.ds-hero-title { font-size: 1rem; font-weight: 800; color: #111827; line-height: 1.25; }
.ds-hero-sub { margin-top: 4px; font-size: .6875rem; color: #6b7280; line-height: 1.45; }
.ds-hero-state {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8f8ef;
    color: #1f9d63;
    font-size: .625rem;
    font-weight: 750;
    white-space: nowrap;
}

.ds-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.ds-action-card {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid #e6e9f2;
    border-radius: 15px;
    background: #fff;
    color: #1f2937;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .035);
    transition: transform .16s ease, box-shadow .16s ease;
}
.ds-action-card:active { transform: scale(.975); }
.ds-action-card.primary { border-color: #dfe0ff; background: #f6f6ff; }
.ds-action-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0ff;
    color: #5b5ce6;
    font-size: 1rem;
    font-weight: 700;
}
.ds-action-card:not(.primary) .ds-action-icon { background: #f2f4f8; color: #64748b; }
.ds-action-icon svg { width: 15px; height: 15px; }
.ds-action-copy { min-width: 0; }
.ds-action-copy b { display: block; font-size: .8125rem; font-weight: 750; line-height: 1.3; }
.ds-action-copy small { display: block; margin-top: 2px; font-size: .625rem; color: #8e8e93; line-height: 1.35; }

.ds-settings-block { margin-bottom: 18px; }
.ds-block-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.ds-block-head h4 { margin: 0; font-size: .75rem; font-weight: 700; color: #6b7280; }
.ds-block-head span { font-size: .625rem; color: #a1a1aa; }

.ds-bind-list { display: flex; flex-direction: column; gap: 8px; }
.ds-bind-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 12px;
    border: 1px solid #eaedf4;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .03);
}
.ds-bind-card .ds-avatar { width: 40px; height: 40px; font-size: .9375rem; }
.ds-rel-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .59375rem;
    font-weight: 750;
    line-height: 1.55;
    white-space: nowrap;
}
.ds-rel-chip-icon { display: inline-flex; width: 11px; height: 11px; flex: 0 0 auto; }
.ds-rel-chip-icon svg { width: 100%; height: 100%; }
.ds-bind-card .ds-binding-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 5px; white-space: normal; }
.ds-bind-card .ds-binding-sub .ds-rel-chip { flex: 0 0 auto; }

.ds-empty-card {
    padding: 22px 16px;
    border: 1px dashed #dfe3ee;
    border-radius: 15px;
    background: #fbfcfe;
    text-align: center;
}
.ds-empty-card b { display: block; font-size: .8125rem; color: #4b5563; }
.ds-empty-card p { margin: 5px 0 0; font-size: .6875rem; color: #9ca3af; line-height: 1.5; }
.ds-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 50%; background: #f1f3f9; color: #a5aec4; }
.ds-empty-icon svg { width: 19px; height: 19px; }

.ds-invite-card {
    padding: 13px;
    margin-bottom: 8px;
    border: 1px solid #e6e9f2;
    border-radius: 15px;
    background: #fff;
}
.ds-invite-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-invite-expiry { font-size: .625rem; color: #9ca3af; white-space: nowrap; }
.ds-invite-code {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    padding: 9px 11px;
    border-radius: 11px;
    background: #f7f7ff;
    border: 1px dashed #d9dbf7;
}
.ds-invite-code code {
    flex: 1 1 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .1em;
    color: #312e81;
    word-break: break-all;
}
.ds-invite-missing { margin: 9px 0 0; font-size: .6875rem; color: #9ca3af; line-height: 1.45; }
.ds-invite-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .625rem; color: #9ca3af; }
.ds-text-danger { border: 0; background: none; padding: 2px 0; color: #be123c; font: inherit; font-size: .65625rem; font-weight: 700; cursor: pointer; }

.ds-toggle-card { border: 1px solid #eaedf4; border-radius: 15px; background: #fff; overflow: hidden; }
.ds-toggle-row { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid #f0f2f7; }
.ds-toggle-row:last-child { border-bottom: 0; }
.ds-toggle-copy { flex: 1 1 auto; min-width: 0; }
.ds-toggle-copy b { display: block; font-size: .8125rem; font-weight: 700; color: #1f2937; line-height: 1.35; }
.ds-toggle-copy span { display: block; margin-top: 2px; font-size: .625rem; color: #9ca3af; line-height: 1.4; }
.ds-switch {
    width: 44px;
    height: 26px;
    flex: 0 0 auto;
    padding: 3px;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    cursor: pointer;
    transition: background .2s ease;
}
.ds-switch i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform .2s ease; }
.ds-switch.on { background: #5b5ce6; }
.ds-switch.on i { transform: translateX(18px); }

.ds-tip-card { padding: 13px 14px; border-radius: 15px; background: #f7f8fb; border: 1px solid #eef1f6; }
.ds-tip-card b { display: block; font-size: .6875rem; color: #6b7280; margin-bottom: 4px; }
.ds-tip-card p { margin: 0; font-size: .6875rem; color: #9ca3af; line-height: 1.6; }

.ds-panel { padding: 2px 0 4px; }
.ds-panel-head { margin-bottom: 14px; }
.ds-step { display: inline-block; margin-bottom: 7px; padding: 3px 8px; border-radius: 999px; background: #eef0ff; color: #5b5ce6; font-size: .59375rem; font-weight: 750; }
.ds-panel-head h3 { margin: 0; font-size: 1.0625rem; font-weight: 800; color: #111827; line-height: 1.3; }
.ds-panel-head p { margin: 6px 0 0; font-size: .75rem; color: #8e8e93; line-height: 1.55; }
.ds-panel-actions { display: flex; gap: 8px; margin-top: 16px; }
.ds-panel-actions .ds-btn { flex: 1; }
.ds-panel-note { margin: 10px 2px 0; font-size: .625rem; color: #9ca3af; line-height: 1.5; }
.ds-rel-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; }
.ds-rel-btn-icon { display: flex; align-items: center; justify-content: center; width: 100%; margin-bottom: 3px; }
.ds-rel-btn-icon svg { width: 15px; height: 15px; }
.ds-rel-btn.active .ds-rel-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }

.ds-code-panel { padding: 2px 0 4px; }
.ds-code-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-live-dot { display: inline-flex; align-items: center; gap: 5px; font-size: .625rem; color: #1f9d63; font-weight: 700; }
.ds-live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #2eb872; box-shadow: 0 0 0 3px rgba(46, 184, 114, .14); }
.ds-code-title { margin: 14px 0 10px; font-size: 1.0625rem; font-weight: 800; color: #111827; }
.ds-code-card { padding: 20px 14px 14px; border-radius: 18px; border: 1px solid #e0e2fb; background: linear-gradient(180deg, #fbfbff 0%, #f4f4ff 100%); text-align: center; }
.ds-code-groups { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ds-code-groups span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: min(1.75rem, 7.2vw);
    font-weight: 800;
    letter-spacing: .12em;
    color: #312e81;
}
.ds-code-groups span + span { position: relative; }
.ds-code-groups span + span::before { content: ''; position: absolute; left: -9px; top: 12%; bottom: 12%; border-left: 1px dashed #c7c9ef; }
.ds-copy-wide {
    width: 100%;
    margin-top: 17px;
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-size: .8125rem;
    font-weight: 750;
    cursor: pointer;
}
.ds-copy-wide.copied, .ds-mini-btn.copied { background: #e8f8ef; border-color: #bfe8d2; color: #1f9d63; }
.ds-code-meta { margin: 11px 0 0; text-align: center; font-size: .65625rem; color: #9ca3af; }
.ds-code-tip { margin: 12px 2px 0; font-size: .65625rem; color: #9ca3af; line-height: 1.55; }
.ds-copy-wide:active { opacity: .86; }

@media (max-width: 350px) {
    .ds-rel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ds-code-groups span { font-size: 1.5rem; }
    .ds-action-card { padding: 11px 9px; gap: 7px; }
    .ds-action-icon { width: 26px; height: 26px; }
}

[data-color-mode="dark"] #schedule-settings-view-dual .ds-hero {
    border-color: #2c2c44;
    background: linear-gradient(135deg, #1b1b2e 0%, #1a1a22 60%, #16231d 100%);
}
[data-color-mode="dark"] #schedule-settings-view-dual .ds-hero-icon { background: #26263a; color: #a5b4fc; box-shadow: none; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-hero-title,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-panel-head h3,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-title { color: #f5f5f7; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-hero-sub,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-panel-head p,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-toggle-copy span,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-tip-card p,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-tip,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-meta { color: #8e8e93; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-hero-state { background: rgba(46, 184, 114, .16); color: #6ee7a8; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-action-card,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-bind-card,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-invite-card,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-toggle-card { background: #1c1c1e; border-color: #2f2f33; box-shadow: none; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-action-card.primary { background: #20203a; border-color: #38386a; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-action-icon { background: #2a2a44; color: #a5b4fc; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-action-copy b,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-toggle-copy b { color: #e5e7eb; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-block-head h4 { color: #a1a1aa; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-empty-card { background: #18181b; border-color: #2f2f33; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-empty-card b { color: #d1d5db; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-empty-icon { background: #232327; color: #8b93a7; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-invite-code { background: #20203a; border-color: #38386a; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-invite-code code { color: #c7d2fe; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-toggle-row { border-bottom-color: #2c2c2e; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-switch { background: #3a3a3c; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-switch.on { background: #6366f1; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-tip-card { background: #18181b; border-color: #2c2c2e; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-tip-card b { color: #a1a1aa; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-card { background: linear-gradient(180deg, #1b1b2e 0%, #17172a 100%); border-color: #35356a; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-groups span { color: #e0e7ff; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-code-groups span + span::before { border-left-color: #3f3f6e; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-copy-wide { background: #f5f5f7; color: #111827; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-copy-wide.copied,
[data-color-mode="dark"] #schedule-settings-view-dual .ds-mini-btn.copied { background: rgba(46, 184, 114, .18); border-color: rgba(110, 231, 168, .32); color: #6ee7a8; }
[data-color-mode="dark"] #schedule-settings-view-dual .ds-step { background: #2a2a44; color: #a5b4fc; }

@media (prefers-reduced-motion: reduce) {
    .ds-spinner { animation: none; }
}
