/* ── daily-schedule.css — 角色日程表弹层样式 ── */

.ds-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
}

.ds-sheet {
    width: 100%;
    max-height: 80vh;
    background: #f5f5f5;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    animation: ds-slideup 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes ds-slideup {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ── Header ── */
.ds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.ds-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ds-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.ds-date {
    font-size: 12px;
    color: #999;
}

.ds-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Body ── */
.ds-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* ── Timeline ── */
.ds-timeline {
    display: flex;
    flex-direction: column;
}

.ds-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
}

.ds-item-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 42px;
    padding-top: 1px;
    flex-shrink: 0;
}

.ds-time-start {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.ds-time-end {
    font-size: 10px;
    color: #bbb;
    font-variant-numeric: tabular-nums;
}

.ds-item-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 4px;
}

.ds-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.ds-dot--active {
    background: #07c160;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.2);
}

.ds-track-line {
    width: 1px;
    flex: 1;
    min-height: 20px;
    background: #e4e4e4;
    margin-top: 3px;
}

.ds-item-content {
    flex: 1;
    padding-bottom: 14px;
    min-width: 0;
}

.ds-item-activity {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.4;
}

.ds-item-activity--active {
    color: #07c160;
    font-weight: 600;
}

.ds-item-note {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* ── Loading ── */
.ds-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 12px;
    color: #999;
    font-size: 13px;
}

.ds-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e8e8e8;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: ds-spin 0.75s linear infinite;
}

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

/* ── Error ── */
.ds-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px;
    gap: 12px;
    color: #e74c3c;
    font-size: 13px;
    text-align: center;
}

.ds-error button {
    padding: 8px 24px;
    background: #fff;
    border: 1px solid #e74c3c;
    border-radius: 20px;
    color: #e74c3c;
    font-size: 13px;
    cursor: pointer;
}

/* ── Empty ── */
.ds-empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
    font-size: 13px;
}

/* ── Footer ── */
.ds-footer {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.ds-regen {
    width: 100%;
    padding: 11px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    color: #576b95;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.ds-regen:hover {
    background: #ebebeb;
}

.ds-regen:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
