/* ============================================================
   zr.html 专属样式（紧凑版，一屏显示）
   ============================================================ */

.zr-body {
    background-color: var(--light-bg);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 182, 193, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 182, 193, 0.15) 0%, transparent 20%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.zr-container {
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 20px);
    background: var(--light-card);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(255, 140, 140, 0.15);
    border: 1px solid var(--light-border);
    padding: 16px 22px 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---------- 头部（缩小） ---------- */
.zr-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-border);
    flex-shrink: 0;
}

.zr-header h1 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 0 0 4px 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.zr-date {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------- 组标题（缩小） ---------- */
.zr-group-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.zr-group-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 140, 140, 0.4);
    transition: transform 0.3s ease;
}

.zr-group-value.changing {
    animation: zrPulse 0.5s ease;
}

@keyframes zrPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.zr-lock-indicator {
    font-size: 1rem;
    margin-left: 4px;
    cursor: help;
    user-select: none;
}

/* ---------- 任务网格（自适应填满） ---------- */
.zr-task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    flex: 1 1 auto;
    align-content: center;
    overflow: hidden;
}

/* 单个任务卡（压缩） */
.zr-task-card {
    padding: 10px 14px;
    background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1.5px solid var(--light-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    min-height: 0;
}

.zr-task-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 14px rgba(255, 140, 140, 0.18);
    transform: translateY(-1px);
}

.zr-task-icon {
    font-size: 1.6rem;      /* 图标缩小 */
    margin-bottom: 4px;
    line-height: 1;
}

.zr-task-title {
    font-size: 1.15rem;     /* 任务名放大 */
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1.5px dashed var(--light-border);
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.3px;
}

.zr-task-people {
    font-size: 1.1rem;      /* 名字放大 */
    color: #4b5563;
    line-height: 1.4;
    font-weight: 600;
    word-break: break-all;
}

/* 加载 / 空 / 错误状态 */
.zr-loading,
.zr-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px dashed var(--light-border);
    background: #fffafc;
    box-sizing: border-box;
    grid-column: 1 / -1;
    color: #9ca3af;
    flex: 1 1 auto;
}

.zr-loading {
    color: var(--primary-color);
}

/* ---------- 控制栏（压缩） ---------- */
.zr-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--light-border);
    flex-wrap: wrap;
    flex-shrink: 0;
    min-height: 52px;
    box-sizing: border-box;
}

.zr-controls button {
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* A/B/C/D 圆按钮（缩小） */
.zr-group-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--light-border);
    background: #fff;
    color: var(--light-text);
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.zr-group-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.zr-group-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 140, 140, 0.4);
}

/* 铅笔 / 取消按钮 */
.zr-edit-btn,
.zr-cancel-btn {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
}

.zr-edit-btn {
    background: rgba(255, 140, 140, 0.1);
    border: 1px dashed var(--light-border);
    color: var(--primary-color);
}

.zr-edit-btn:hover {
    background: rgba(255, 140, 140, 0.2);
    border-style: solid;
    transform: translateY(-1px);
}

.zr-cancel-btn {
    background: #f5f5f5;
    color: #888;
    border: 1px solid #e0e0e0;
}

.zr-cancel-btn:hover {
    background: #ebebeb;
    color: #555;
}

/* ---------- 页脚（压缩） ---------- */
.zr-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--light-border);
    margin-top: 4px;
    font-size: 0.75rem;
    color: #b0b0b0;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.zr-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.zr-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .zr-container {
        padding: 12px 14px 10px;
        border-radius: 12px;
    }

    .zr-header h1 {
        font-size: 1.2rem;
    }

    .zr-date {
        font-size: 0.72rem;
    }

    .zr-group-title-wrap {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .zr-group-value {
        width: 32px;
        height: 32px;
        font-size: 1.15rem;
    }

    .zr-task-grid {
        gap: 8px;
    }

    .zr-task-card {
        padding: 8px 10px;
    }

    .zr-task-icon {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }

    .zr-task-title {
        font-size: 1rem;
        margin-bottom: 5px;
        padding-bottom: 4px;
    }

    .zr-task-people {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .zr-group-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .zr-edit-btn,
    .zr-cancel-btn {
        font-size: 0.8rem;
        padding: 7px 14px;
    }
}

@media (max-width: 480px) {
    .zr-body {
        padding: 6px;
        align-items: stretch;
    }

    .zr-container {
        max-height: none;
        padding: 10px 10px 8px;
    }

    .zr-header h1 {
        font-size: 1.05rem;
    }

    .zr-group-title-wrap {
        font-size: 0.88rem;
    }

    .zr-group-value {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    /* 单列显示 */
    .zr-task-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .zr-task-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 6px 12px;
        gap: 10px;
    }

    .zr-task-icon {
        font-size: 1.3rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .zr-task-title {
        font-size: 0.9rem;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        width: auto;
        text-align: left;
        flex-shrink: 0;
    }

    .zr-task-people {
        font-size: 0.88rem;
        text-align: right;
        flex: 1;
    }

    .zr-edit-btn,
    .zr-cancel-btn {
        font-size: 0.78rem;
        padding: 6px 12px;
    }

    .zr-group-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}